@section('title', isset($title) ? $title : 'Contracts') @push('styles') @laravelCommentsLivewireStyles @endpush @includeWhen(isset($project), 'admin.pages.projects.navbar', ['tab' => 'contracts']) @includeWhen(isset($company) && $company, 'admin.pages.company.header', ['tab' => 'contracts']) @includeWhen(isset($program), 'admin.pages.programs.program-nav', ['tab' => 'contracts']) @if (!isset($project) && !isset($company) && !isset($program) && isset($contracts))
{{-- Stats Start --}}
{{__('Contract Summary')}}
{{--
{{$contracts['total']}}
{{__('Total')}}
--}}
{{$contracts['active']}}
{{__('Active')}}
{{$contracts['paused']}}
{{__('Paused')}}
{{$contracts['not_started']}}
{{__('Not Started')}}
{{$contracts['expired']}}
{{__('Expired')}}
{{$contracts['terminateed']}}
{{__('Terminated')}}
{{$contracts['draft']}}
{{__('Draft')}}
{{-- Stats End --}} {{-- Stats Start --}}
{{__('Contract Summary')}}
{{$contracts['expiring_soon']}}
{{__('About to Expire')}}
{{$contracts['recently_added']}}
{{__('Recently Added')}}
{{$contracts['trashed']}}
{{__('Trashed')}}
{{-- Stats End --}} @endif
@if (!isset($project) && !isset($company) && !isset($program) && isset($contracts))
Search Filter
{{-- projects --}}
{!! Form::label('projects', 'Projects') !!} {!! Form::select('projects', [], [], [ 'class' => 'form-select', 'data-kt-select2' => 'true', 'data-placeholder' => __('All'), 'data-allow-clear' => 'true', 'data-remote' => route('resource-select', ['Project', 'hasContract']) ]) !!}
{{-- programs --}}
{!! Form::label('programs', 'Programs') !!} {!! Form::select('programs', [], [], [ 'class' => 'form-select', 'data-kt-select2' => 'true', 'data-placeholder' => __('All'), 'data-allow-clear' => 'true', 'data-remote' => route('resource-select', ['Program', 'hasContract']) ]) !!}
{{-- contract Status --}}
{!! Form::label('project Status', 'Contract Status') !!} {!! Form::select('filter_status', $contract_statuses, null, ['class' => 'form-select', 'data-kt-select2' => 'true', 'data-placeholder' => 'All', 'data-allow-clear' => 'true']) !!}
{{-- contract type --}}
{!! Form::label('contract_type', 'Contract Type') !!} {!! Form::select('contract_type', $contractTypes, null, ['class' => 'form-select', 'data-kt-select2' => 'true', 'data-placeholder' => 'All', 'data-allow-clear' => 'true']) !!}
{{-- client --}}
{!! Form::label('companies', 'Client') !!} {!! Form::select('companies', [], null, [ 'class' => 'form-select', 'data-kt-select2' => 'true', 'data-placeholder' => 'All Clients', 'data-allow-clear' => 'true', 'data-remote' => route('resource-select', ['groupedCompany', 'hasContract']), ]) !!}
{{-- select year$contractDueDateYears --}}
{!! Form::label('filter_ending_in_year', 'Ending In') !!} {!! Form::select('filter_ending_in_year', $contractDueDateYears, null, ['class' => 'form-select gantt_filter', 'data-kt-select2' => 'true', 'data-placeholder' => 'Any', 'data-allow-clear' => 'true']) !!}
{{-- date range --}}
{!! Form::label('date_range', 'Date Range') !!} {!! Form::text('date_range', null, [ 'class' => 'form-control gantt_filter flatpickr', 'data-flatpickr' => '{"mode": "range"}', 'placeholder' => 'Date Range' ]) !!}
{{-- payment progress --}}
{!! Form::label('payment_progress', 'Payment Progress') !!} {!! Form::select('payment_progress', [ '' => 'Any', 'no_payment' => 'No Payment (0%)', 'partially_paid' => "Partially Paid", 'fully_paid' => 'Fully Paid (100%)', 'over_paid' => 'Overpaid (>100%)', '0-10' => 'More than 0% - 10%', '10-20' => '10% - 20%', '20-30' => '20% - 30%', '30-40' => '30% - 40%', '40-50' => '40% - 50%', '50-60' => '50% - 60%', '60-70' => '60% - 70%', '70-80' => '70% - 80%', '80-90' => '80% - 90%', '90-100' => '90% to less than 100%' ], '', [ 'class' => 'form-select', 'data-placeholder' => 'Any', 'data-allow-clear' => 'true', 'data-kt-select2' => 'true', 'data-kt-template-selection'=>"multiple", // 'multiple' => 'true', ]) !!}
{{-- trashed --}} @if(iCan('read trashed contract'))
{!! Form::label('filter_contract_state', 'State') !!} {!! Form::select('filter_contract_state', [ 'trashed' => 'Trashed', 'not_trashed' => 'Not Trashed', 'both' => 'Both', ], 'not_trashed', ['class' => 'form-select', 'data-kt-select2' => 'true', 'data-placeholder' => 'Not Trashed', 'data-allow-clear' => 'true']) !!}
@endif {{-- miscellaneous filter --}}
{!! Form::label('miscellaneous_filter', 'Miscellaneous') !!} {!! Form::select('miscellaneous_filter', [ '' => 'Filter', 'Phases' => [ 'hasPhases' => 'Has Phases', 'hasPhasesWithoutDueDate' => 'Has Phases Without Due Date', 'doesnthavePhases' => 'Does Not Have Phases', ], 'Phases Value' => [ 'phasesGtContractValue' => 'Greater Than Contract Value', 'phasesLtContractValue' => 'Less Than Contract Value', 'phasesEqContractValue' => 'Equal To Contract Value', ], 'Retention' => [ 'hasRetention' => 'Has Retention', 'doesnthaveRetention' => 'Does Not Have Retention', ], 'Reference Id' => [ 'hasReferenceId' => 'Has Reference Id', 'doesnthaveReferenceId' => 'Does Not Have Reference Id', ], 'Invoice' => [ 'hasInvoices' => 'Has Invoices', 'doesnthaveInvoices' => 'Does Not Have Invoices', ], 'Currency' => [ 'localCurrency' => 'Local Currency', 'foreignCurrency' => 'Foreign Currency', ], 'Expired' => [ 'expired_30_days' => 'Expired 30 Days Ago', 'expired_60_days' => 'Expired 30-60 Days Ago', 'expired_90_days' => 'Expired 60-90 Days Ago', ], 'About To Expire' => [ 'upcomming_30_day' => 'In 30 Days', 'upcomming_60_day' => 'In 30-60 Days', 'upcomming_90_day' => 'In 60-90 Days', ], 'Comments' => [ 'has_comments' => 'Has Comments', ] ], '', [ 'class' => 'form-select', 'data-placeholder' => 'Filter', 'data-allow-clear' => 'true', 'data-kt-select2' => 'true', ]) !!}
@endif
{{$dataTable->table()}}
@push('scripts') {{$dataTable->scripts(null, ['nonce' => csp_nonce()])}} {{-- Real Time Editing Scripts --}} {{-- End Real Time Editing Scripts --}} @laravelCommentsLivewireScripts @endpush