From d176286a2e529db29c915a07694461476ac5cb15 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Fri, 15 Nov 2024 15:53:25 +0700 Subject: [PATCH] fixing create structure --- src/modules/02_organization/views/main.vue | 8 +++++++- src/modules/05_placement/components/Other/OtherDetail.vue | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/modules/02_organization/views/main.vue b/src/modules/02_organization/views/main.vue index c786c035b..d9b7d0dd8 100644 --- a/src/modules/02_organization/views/main.vue +++ b/src/modules/02_organization/views/main.vue @@ -56,7 +56,13 @@ async function fetchOrganizationActive() { const data = await res.data.result; if (data) { await store.fetchDataActive(data); - await fetchCheckIslock(data.draftId); + // ต้องมี id ของแบบร่างถึงจะเช็ค isLock + if (data.draftId) { + await fetchCheckIslock(data.draftId); + } else { + store.isLosck = false; + } + if (data.activeName === null && data.draftName === null) { isStatusData.value = false; } else { diff --git a/src/modules/05_placement/components/Other/OtherDetail.vue b/src/modules/05_placement/components/Other/OtherDetail.vue index af9a9ed34..eff3b1de1 100644 --- a/src/modules/05_placement/components/Other/OtherDetail.vue +++ b/src/modules/05_placement/components/Other/OtherDetail.vue @@ -351,9 +351,9 @@ onMounted(async () => { :readonly="!edit" :borderless="!edit" :model-value="date !== null ? date2Thai(date) : null" - :rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]" + :rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วันที่'}`]" hide-bottom-space - :label="`${'ตั้งแต่วัน'}`" + :label="`${'ตั้งแต่วันที่'}`" >