From eb9e53d7fa410a01b023d3d289913dc8082abff3 Mon Sep 17 00:00:00 2001 From: Net <93821485+somnetsak123@users.noreply.github.com> Date: Tue, 25 Jun 2024 16:26:46 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20=E0=B9=81=E0=B8=81=E0=B9=89=20=E0=B9=81?= =?UTF-8?q?=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82=E0=B9=80=E0=B8=9B=E0=B9=87?= =?UTF-8?q?=E0=B8=99=20=20info?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/home/PersonCard.vue | 9 +++++++-- src/pages/02_personnel-management/MainPage.vue | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/components/home/PersonCard.vue b/src/components/home/PersonCard.vue index 2fd034f1..3639ff7c 100644 --- a/src/components/home/PersonCard.vue +++ b/src/components/home/PersonCard.vue @@ -25,7 +25,12 @@ defineProps<{ defineEmits<{ (e: 'deleteCard', id: string): void; - (e: 'updateCard', action: 'FORM' | 'INFO', id: string): void; + ( + e: 'updateCard', + action: 'FORM' | 'INFO', + id: string, + isEdit?: boolean, + ): void; (e: 'enterCard', action: 'FORM' | 'INFO', id: string): void; (e: 'toggleStatus', id: string, status: boolean): void; }>(); @@ -92,7 +97,7 @@ defineEmits<{ clickable class="row q-py-sm" style="white-space: nowrap" - @click="$emit('updateCard', 'FORM', v.id)" + @click="$emit('updateCard', 'INFO', v.id, true)" v-close-popup > [ { label: 'AGENCY', count: typeStats.value?.AGENCY || 0 }, ]); -async function openDialog(action?: 'FORM' | 'INFO', idEdit?: string) { +async function openDialog( + action?: 'FORM' | 'INFO', + idEdit?: string, + isPersonEdit: boolean = false, +) { if (userStore.userOption.hqOpts.length === 0) { await userStore.fetchHqOption(); } @@ -184,8 +188,9 @@ async function openDialog(action?: 'FORM' | 'INFO', idEdit?: string) { modal.value = true; } else if (action === 'INFO') { if (!userData.value) return; + + infoDrawerEdit.value = isPersonEdit ? true : false; infoDrawer.value = true; - infoDrawerEdit.value = false; const user = userData.value.result.find((x) => x.id === idEdit); infoPersonCard.value = user ? [