From fbf4a2f96c0e4a144986dc5c8bc5d1914a788a65 Mon Sep 17 00:00:00 2001 From: Noah Lancien Date: Thu, 19 Jun 2025 11:46:01 +0200 Subject: [PATCH] fix: MR feedback --- resources/ts/bo/base/common.ts | 2 +- resources/ts/modules/sweetalertConfirm.ts | 8 +++++--- resources/views/bo/pages/invoices/index.blade.php | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/resources/ts/bo/base/common.ts b/resources/ts/bo/base/common.ts index 37c1fa3..aa0bb39 100644 --- a/resources/ts/bo/base/common.ts +++ b/resources/ts/bo/base/common.ts @@ -41,7 +41,7 @@ window.addEventListener("DOMContentLoaded", () => { function (response: SweetAlertResult) { (el as HTMLFormElement).submit(); }, - { icon: "warning", html: "true" }, + { icon: "warning" }, true ); return false; diff --git a/resources/ts/modules/sweetalertConfirm.ts b/resources/ts/modules/sweetalertConfirm.ts index 020c311..afd0ad0 100644 --- a/resources/ts/modules/sweetalertConfirm.ts +++ b/resources/ts/modules/sweetalertConfirm.ts @@ -46,11 +46,13 @@ export default { }; // Enable HTML content interpretation in the modal options - let htmlActive = {}; + let message = {}; if (html) { - htmlActive = {html: text}; + message = {html: text}; + } else { + message = { text: text }; } - const fullOptions = {...saOptions, ...htmlActive}; + const fullOptions = {...saOptions, ...message}; Swal.fire(fullOptions).then((result) => { if (result.isConfirmed) { diff --git a/resources/views/bo/pages/invoices/index.blade.php b/resources/views/bo/pages/invoices/index.blade.php index 091e047..4618cb4 100644 --- a/resources/views/bo/pages/invoices/index.blade.php +++ b/resources/views/bo/pages/invoices/index.blade.php @@ -53,7 +53,8 @@ {{ $invoiceModel->sent_client_date }} {{ $invoiceModel->signed_date }} {{ $invoiceModel->sent_accounting_date }} - {{ $invoiceModel->site?->name }} + + {{ $invoiceModel->site->name }} {{ $invoiceModel->updated_at }}