Merge branch 'issue-45' into 'develop'

Closes #45 Allow update comment on invoice

See merge request ldc-web/projets/support-web!69
This commit is contained in:
Vincent BRIDIER 2023-10-12 14:54:46 +00:00
commit 8c19bc9785
2 changed files with 4 additions and 3 deletions

View file

@ -21,6 +21,7 @@ class UpdateInvoiceRequest extends StoreInvoiceRequest
$rules = array_merge($rules, parent::rules());
}
$rules = array_merge($rules, [
'comment' => 'sometimes|nullable|string|min:15',
'sent_client_date' => 'required_with:signed_date,sent_accounting_date|sometimes|nullable|date',
'signed_date' => 'required_with:sent_accounting_date|sometimes|nullable|date',
'sent_accounting_date' => 'sometimes|nullable|date',

View file

@ -8,7 +8,7 @@
@if($invoiceModel->status !== \App\Enums\Invoices\InvoiceStatusEnum::opened)
{{ __('Impossible de mettre à jour les informations d\'un devis :status.', ['status' => $invoiceModel->status->label()]) }}
@elseif($invoiceModel->signed_date)
{{ __('Impossible de mettre à jour les informations d\'un devis déjà signé, seule la section "État" est prise en compte') }}
{{ __('Impossible de mettre à jour les informations d\'un devis déjà signé, seule les sections "État" et "Commentaires" sont pris en compte') }}
@endif
</strong>
</div>
@ -215,8 +215,6 @@
<div class="row mb-3">
<div class="col-12">
@if($invoiceModel->sent_client_date)
<textarea class="form-control" disabled>{{ $invoiceModel->comment }}</textarea>
@else
@include('bo.partials.inputs.text-html', [
'id' => 'invoiceComment',
'label' => __('Commentaire du :model', [
@ -229,6 +227,8 @@
'number' => 15
]),
])
@else
<textarea class="form-control" disabled>{{ $invoiceModel->comment }}</textarea>
@endif
</div>
</div>