@extends('layouts.admin') @php $client_keyword = Auth::user()->getGuard() == 'client' ? 'client.' : ''; @endphp @section('page-title') {{ $contract->subject }} @endsection @push('css-page') @endpush @once @php $chagptEnabled = $currentWorkspace->is_chagpt_enable(); // Replace with the correct namespace for your Workspace model @endphp @endonce @section('links') @if (\Auth::guard('client')->check()) @else @endif @if (\Auth::guard('client')->check()) @else @endif @endsection @push('scripts') @endpush @section('action-button')
@if ($chagptEnabled)
{{ __('Generate with AI') }}
@endif @if ($currentWorkspace->permission == 'Owner')
@endif @if ($currentWorkspace->permission == 'Owner') @if ($contract->status == 'accept' || $currentWorkspace->permission == 'Owner')
@endif @endif @if ($currentWorkspace->permission == 'Owner' || \Auth::user()->getGuard() == 'client')
@endif @if ($currentWorkspace->permission == 'Owner' || \Auth::user()->getGuard() == 'client')
@endif @if ( ($currentWorkspace->permission == 'Owner' && $contract->company_signature == null) || (\Auth::user()->getGuard() == 'client' && $contract->client_signature == null)) @if ($contract->status == 'accept' || $currentWorkspace->permission == 'Owner')
@endif @endif @php $editstatus = App\Models\Contract::editstatus(); @endphp @if (\Auth::user()->getGuard() == 'client')
@endif
@endsection @section('content')
{{ __('Attachment') }}

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

{{ __('Comment') }}

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

{{ __('Notes') }}

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

{{ __('Name') }}
{{ $contract->clients->name }}
{{ __('Project') }}
{{ !empty($contract->projects) ? $contract->projects->name : '' }}
{{ __('Subject') }}
{{ $contract->subject }}
{{ __('Value') }}
{{ $currentWorkspace->priceFormat($contract->value) }}
{{ __('Type') }}
{{ $contract->contract_type->name }}
{{ __('Start Date') }}
{{ App\Models\Utility::dateFormat($contract->start_date) }}
{{ __('End Date') }}
{{ App\Models\Utility::dateFormat($contract->end_date) }}
{{ __('Description') }}
{{ Form::open(['route' => [$client_keyword . 'contract.contract_description.store', [$currentWorkspace->slug, $contract->id]], 'class' => 'needs-validation', 'novalidate']) }}
@if ($contract->status == 'accept' || $currentWorkspace->permission == 'Owner') {{ Form::submit(__('Save'), ['class' => 'btn btn-primary']) }} @endif
{{ Form::close() }}
{{ __('Attachments') }}
@if ($contract->status == 'accept' || $currentWorkspace->permission == 'Owner')
@if (Auth::user()->getGuard() == 'client') {{ __('No files available') }} @else {{ __('Drop files here to upload') }} @endif
@endif
@foreach ($contract->files as $file)
{{ $file->files }}

@if (File::exists(storage_path('contract_attechment/' . $file->files))) {{ number_format(\File::size(storage_path('contract_attechment/' . $file->files)) / 1048576, 2) . ' ' . __('MB') }} @endif

@if (\Auth::guard('client')->check()) @if ($contract->status == 'accept' && \Auth::user()->id == $file->client_id)
{!! Form::open([ 'method' => 'DELETE', 'route' => [$client_keyword . 'contracts.file.delete', [$currentWorkspace->slug, $file->id]], 'id' => 'delete-form-' . $file->id, ]) !!} {!! Form::close() !!}
@endif @else
{!! Form::open([ 'method' => 'DELETE', 'route' => [$client_keyword . 'contracts.file.delete', [$currentWorkspace->slug, $file->id]], 'id' => 'delete-form-' . $file->id, ]) !!} {!! Form::close() !!}
@endif
@endforeach
{{ __('Comments') }}
@if ($chagptEnabled) @endif
{{ __('Notes') }}
@if ($chagptEnabled) @endif
@if ($contract->status == 'accept' || $currentWorkspace->permission == 'Owner')
@csrf
@endif
@endsection @push('scripts') @endpush