From 82fc9dd9083341462763bc1bbff40c339f9bc5cb Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Thu, 7 Nov 2024 11:54:40 +0700 Subject: [PATCH] feat: adjust display date format --- src/pages/05_quotation/MainPage.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/pages/05_quotation/MainPage.vue b/src/pages/05_quotation/MainPage.vue index 7ac05789..35b4dbf4 100644 --- a/src/pages/05_quotation/MainPage.vue +++ b/src/pages/05_quotation/MainPage.vue @@ -561,8 +561,18 @@ async function storeDataLocal(id: string) { :urgent="v.urgent" :code="v.code" :title="v.workName" - :created-at="new Date(v.createdAt).toLocaleString()" - :valid-until="new Date(v.dueDate).toLocaleString()" + :created-at=" + new Date(v.createdAt).toLocaleString('en-US', { + hour12: false, + }) + " + :valid-until=" + (() => { + const date = new Date(v.dueDate); + date.setHours(23, 59, 59, 0); + return date.toLocaleString('en-US', { hour12: false }); + })() + " :status="$t(`quotation.status.${v.quotationStatus}`)" :worker-count="v._count.worker" :worker-max="v.workerMax || v._count.worker"