@extends($viewLayout) @section('title', sprintf('%s - %s', transFb(sprintf('models.classes.%s', strtolower(Str::plural(class_basename($modelClass)))), Str::plural(class_basename($modelClass))), __('crud-policies::crud.edit'))) @section('description', sprintf('%s %s', __('crud-policies::crud.edit'), trans(class_basename($modelClass)))) @section('metaIndex', 'noindex,nofollow') @section('content')
@include('crud-policies::crud.modules.flashMessage')
@include('crud-policies::crud.modules.breadcrumb', ['action' => CrudAction::update()]) @include('crud-policies::crud.modules.actionbar.bar', ['action' => CrudAction::update()])
@if(!$model->signed_date)
@csrf
@else {{ __('Signé le :date', [ 'date' => $model->signed_date->isoFormat('DD/MM/YYYY') ]) }} @endif
@if(!$model->sent_client_date)
@csrf
sent_client_date)readonly @endif>
@else {{ __('Signé le :date (client)', [ 'date' => $model->sent_client_date->isoFormat('DD/MM/YYYY') ]) }} @endif
@if(!$model->sent_accounting_date)
@csrf
sent_accounting_date)readonly @endif>
@else {{ __('Signé le :date (compta)', [ 'date' => $model->sent_accounting_date->isoFormat('DD/MM/YYYY') ]) }} @endif
@method('put') @csrf
{{ __('crud-policies::crud.property') }}
{{ __('crud-policies::crud.value') }}
@foreach ($modelClass::getEditableProperties() as $fieldName => $prop) @if(in_array(CrudAction::update(), $prop['actions'])) @if($fieldName === 'tasks')
@php $taskTypeEnums = collect(App\Enums\Invoice\TaskType::toArray())->map(function($enum) { return [ 'value' => $enum->value, 'label' => $enum->label, 'price' => $enum->price, ]; }); $dataVue = [ 'tasks'=> old($fieldName) ? json_decode(old($fieldName), true): $model->{$fieldName} ?? [], 'companies' => $companies, 'packages' => $packages, 'taskRowModel' => $taskRowModel, 'taskTypeEnums' => $taskTypeEnums, ]; @endphp
@else
@include('crud-policies::crud.formfield')
@endif @endif @endforeach
@include('crud-policies::crud.modules.scriptConstants') @endsection