fix: แก้ แก้ไขเป็น info

This commit is contained in:
Net 2024-06-25 16:26:46 +07:00
parent 3aab3db465
commit eb9e53d7fa
2 changed files with 14 additions and 4 deletions

View file

@ -158,7 +158,11 @@ const selectorList = computed(() => [
{ 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
? [