@extends('layouts.master')
@section('title',$company->name." | ".trans('app.chances.chances'))
@section('content')
{{trans('app.chances.posted')}} {{trans('app.chances.provided_offers')}} {{trans('app.chances.downloads')}}
@foreach($chances as $chance)
{{trans('app.chances.chance_name')}}
{{trans('app.chances.downloads')}}
{{trans('app.chances.provided_offers')}}
{{trans('app.chances.accepted')}}
{{trans('app.chances.created_at')}}
{{trans('app.chances.status')}}
@if($chance->status!=3&&$chance->status!=5)
@endforeach
{{$chance->name}}
@else
{{$chance->name}}
@endif
{{$chance->downloads}}
@if(($count=($chance->offers()->count()))>0)
{{$count}}
@else
{{$count}}
@endif
@php
$is_approved= DB::table('chances_offers_files')->where([['chance_id', $chance->id],['approved', 1]])->count()?true:false;
@endphp
{{$is_approved ? trans('app.chances.approved') : trans('app.chances.not_approved')}}
{{$chance->created_at}}
@if(in_array($chance->status,[2,0])&&!$is_approved)
{{$chance->status==2? trans('app.chances.active') : trans('app.chances.declined')}}
@endif
@if(in_array($chance->status,[3,5])&&!$is_approved)
{{trans('chances::chances.status.'.$chance->status)}}
{{trans('app.edit')}}
@endif
@if($is_approved || $chance->status==4)
{{trans('app.chances.approved_done')}}
@endif