Version 2.0

This commit is contained in:
2026-05-12 09:23:05 +00:00
parent f2bc048219
commit f1b68e5e78
34 changed files with 564 additions and 283 deletions

View File

@@ -66,7 +66,7 @@ class EditFeedback extends EditRecord
->disk('public')
->directory('feedback-attachments')
->acceptedFileTypes(['image/jpeg', 'image/png', 'application/pdf', 'video/mp4', 'video/quicktime'])
->maxSize(51200) // 50MB in KB
->maxSize(51200)
->columnSpanFull(),
])
->action(function (array $data): void {
@@ -166,14 +166,10 @@ class EditFeedback extends EditRecord
protected function mutateFormDataBeforeSave(array $data): array
{
if (($data['is_general'] ?? false) === true) {
$data['customer_product_id'] = null;
}
$this->pendingAttachments = $data['attachments'] ?? [];
$this->pendingCollection = $data['attachment_collection'] ?? 'general';
unset($data['is_general'], $data['attachment_collection'], $data['attachments']);
unset($data['is_general'], $data['attachment_collection'], $data['attachments'], $data['product_id_virtual']);
$newStatus = $data['status'] ?? null;
if ($newStatus === 'closed' && $this->getRecord()->status !== 'closed') {
@@ -235,7 +231,7 @@ class EditFeedback extends EditRecord
protected function mutateFormDataBeforeFill(array $data): array
{
$data['is_general'] = $data['customer_product_id'] === null;
$data['is_general'] = $data['contract_id'] === null;
return $data;
}