From 8dd36cbc6464fbfa3624c3f8e566aeccc0c059c9 Mon Sep 17 00:00:00 2001 From: puriphatt Date: Wed, 8 Jan 2025 10:48:33 +0700 Subject: [PATCH] feat: add action text to confirmation dialogs --- src/pages/08_request-list/MainPage.vue | 1 + src/pages/09_task-order/order_view/MainPage.vue | 2 ++ src/pages/09_task-order/receive_view/MainPage.vue | 1 + 3 files changed, 4 insertions(+) diff --git a/src/pages/08_request-list/MainPage.vue b/src/pages/08_request-list/MainPage.vue index 5ca02889..7310c54b 100644 --- a/src/pages/08_request-list/MainPage.vue +++ b/src/pages/08_request-list/MainPage.vue @@ -70,6 +70,7 @@ async function fetchStats() { function triggerCancel(id: string) { dialogWarningClose(t, { message: t('form.warning.cancel'), + actionText: t('dialog.action.ok'), action: async () => { const res = await requestListStore.cancelRequest(id); if (res) { diff --git a/src/pages/09_task-order/order_view/MainPage.vue b/src/pages/09_task-order/order_view/MainPage.vue index 25c9bda3..bad3d377 100644 --- a/src/pages/09_task-order/order_view/MainPage.vue +++ b/src/pages/09_task-order/order_view/MainPage.vue @@ -467,6 +467,7 @@ async function getFileList(taskId: string) { async function remove(taskId: string, n: string) { dialogWarningClose(t, { message: t('dialog.message.confirmDelete'), + actionText: t('dialog.action.ok'), action: async () => { const res = await taskOrderStore.delAttachment({ parentId: taskId, @@ -1080,6 +1081,7 @@ watch([currentFormData.value.taskStatus], () => { @click=" dialogWarningClose(t, { message: t('dialog.message.confirmValidate'), + actionText: $t('dialog.action.ok'), action: async () => { await completeValidate(); }, diff --git a/src/pages/09_task-order/receive_view/MainPage.vue b/src/pages/09_task-order/receive_view/MainPage.vue index df4ef89b..846bd227 100644 --- a/src/pages/09_task-order/receive_view/MainPage.vue +++ b/src/pages/09_task-order/receive_view/MainPage.vue @@ -705,6 +705,7 @@ watch([currentFormData.value.taskStatus], () => { @click=" dialogWarningClose($t, { message: $t('dialog.message.confirmSending'), + actionText: $t('dialog.action.ok'), action: async () => { await sendTask(); },