@extends('layouts.admin') @php $attachments=\App\Models\Utility::get_file('contract_attechment'); @endphp @push('css-page') @endpush @section('page-title') {{ __('Contract Detail') }} @endsection @push('script-page') @endpush @section('breadcrumb') @endsection @section('action-btn')
@if((\Auth::user()->type=='company')&&($contract->status == 'accept')) @endif @if ((\Auth::user()->type == 'company' && $contract->company_signature == '') ||(\Auth::user()->type == 'client' && $contract->client_signature == '')) @if($contract->status == 'accept') @endif @endif @php $status = App\Models\Contract::status(); @endphp @php $status = App\Models\Contract::status(); @endphp @if(\Auth::user()->type == 'client' ) @endif
@endsection @section('content')
{{ __('Attachment') }}

{{count($contract->files)}}

{{ __('Comment') }}

{{count($contract->comment)}}

{{ __('Notes') }}

{{count($contract->note)}}

{{ __('Contract Detail') }}

{{ __('Subject') }}
{{ $contract->subject}}
{{ __('Project') }}
{{ !empty($contract->projects)?$contract->projects->project_name:'-' }}
{{ __('Value') }}
{{ \Auth::user()->priceFormat($contract->value) }}
{{__('Type')}}
{{ !empty($contract->types)?$contract->types->name:'-' }}
{{__('Status')}}
{{$contract->status }}
{{__('Start Date')}}
{{ Auth::user()->dateFormat($contract->start_date) }}
{{__('End Date')}}
{{ Auth::user()->dateFormat($contract->end_date) }}
{{ __('Contract Description ') }}
{{ __('Contract Attachments') }}
@if($contract->status=='accept')
@endif
@foreach($contract->files as $file)
{{ $file->files }}

{{ number_format(\File::size(storage_path('contract_attechment/' . $file->files)) / 1048576, 2) . ' ' . __('MB') }} {{-- {{ number_format(\File::size(storage_path('uploads/lead_files/' . $file->file_path)) / 1048576, 2) . ' ' . __('MB') }} --}}

@if(((\Auth::user()->id == $file->user_id) || (\Auth::user()->type == 'company'))&&($contract->status=='accept'))
{!! Form::open(['method' => 'DELETE', 'route' => ['contracts.file.delete', $contract->id, $file->id]]) !!} {!! Form::close() !!}
@endif
@endforeach
{{__('Comments')}}
@foreach($contract->comment as $comment) @php $user = \App\Models\User::find($comment->user_id); $logo=\App\Models\Utility::get_file('uploads/avatar/'); @endphp

{{ $comment->comment }}

{{$comment->created_at->diffForHumans()}}
@if(((\Auth::user()->id == $comment->user_id) || (\Auth::user()->type == 'company'))&&($contract->status == 'accept'))
{!! Form::open(['method' => 'DELETE', 'route' => ['comment_store.destroy', $comment->id]]) !!} {!! Form::close() !!}
@endif
@endforeach
{{__('Notes')}}
@endsection