From 1479320e96d4e6b14258d7999cccd799302fee58 Mon Sep 17 00:00:00 2001 From: puriphatt Date: Fri, 24 Jan 2025 09:36:43 +0700 Subject: [PATCH] feat: update warning dialog messages for better clarity --- src/pages/04_product-service/MainPage.vue | 3 +++ src/stores/utils/index.ts | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/04_product-service/MainPage.vue b/src/pages/04_product-service/MainPage.vue index 09bd0173..fb092dfb 100644 --- a/src/pages/04_product-service/MainPage.vue +++ b/src/pages/04_product-service/MainPage.vue @@ -1365,6 +1365,7 @@ function confirmDeleteWork(id: string, noDialog?: boolean) { function triggerConfirmCloseWork() { dialogWarningClose(t, { + message: t('dialog.message.warningClose'), action: () => { manageWorkNameDialog.value = false; if (workNameItems.value[workNameItems.value.length - 1].name === '') { @@ -4024,6 +4025,7 @@ watch( () => { if (workItems.length > 0 || !sameFormService()) { dialogWarningClose($t, { + message: t('dialog.message.warningClose'), action: () => { clearFormService(); dialogService = false; @@ -4363,6 +4365,7 @@ watch( () => { if (!sameFormService()) { dialogWarningClose($t, { + message: t('dialog.message.warningClose'), action: () => { clearFormService(); dialogService = false; diff --git a/src/stores/utils/index.ts b/src/stores/utils/index.ts index 870be75b..94463327 100644 --- a/src/stores/utils/index.ts +++ b/src/stores/utils/index.ts @@ -67,8 +67,8 @@ export function dialogWarningClose( color: 'warning', icon: 'mdi-alert', title: t('form.warning.title'), - actionText: opts.actionText || t('dialog.action.close'), - message: opts.message || t('dialog.message.warningClose'), + actionText: opts.actionText || t('dialog.action.ok'), + message: opts.message || t('dialog.message.close'), action: async () => { if (opts.action) opts.action(); },