fix: แก้ แก้ไขเป็น info
This commit is contained in:
parent
3aab3db465
commit
eb9e53d7fa
2 changed files with 14 additions and 4 deletions
|
|
@ -25,7 +25,12 @@ defineProps<{
|
||||||
|
|
||||||
defineEmits<{
|
defineEmits<{
|
||||||
(e: 'deleteCard', id: string): void;
|
(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: 'enterCard', action: 'FORM' | 'INFO', id: string): void;
|
||||||
(e: 'toggleStatus', id: string, status: boolean): void;
|
(e: 'toggleStatus', id: string, status: boolean): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
@ -92,7 +97,7 @@ defineEmits<{
|
||||||
clickable
|
clickable
|
||||||
class="row q-py-sm"
|
class="row q-py-sm"
|
||||||
style="white-space: nowrap"
|
style="white-space: nowrap"
|
||||||
@click="$emit('updateCard', 'FORM', v.id)"
|
@click="$emit('updateCard', 'INFO', v.id, true)"
|
||||||
v-close-popup
|
v-close-popup
|
||||||
>
|
>
|
||||||
<q-icon
|
<q-icon
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,11 @@ const selectorList = computed(() => [
|
||||||
{ label: 'AGENCY', count: typeStats.value?.AGENCY || 0 },
|
{ 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) {
|
if (userStore.userOption.hqOpts.length === 0) {
|
||||||
await userStore.fetchHqOption();
|
await userStore.fetchHqOption();
|
||||||
}
|
}
|
||||||
|
|
@ -184,8 +188,9 @@ async function openDialog(action?: 'FORM' | 'INFO', idEdit?: string) {
|
||||||
modal.value = true;
|
modal.value = true;
|
||||||
} else if (action === 'INFO') {
|
} else if (action === 'INFO') {
|
||||||
if (!userData.value) return;
|
if (!userData.value) return;
|
||||||
|
|
||||||
|
infoDrawerEdit.value = isPersonEdit ? true : false;
|
||||||
infoDrawer.value = true;
|
infoDrawer.value = true;
|
||||||
infoDrawerEdit.value = false;
|
|
||||||
const user = userData.value.result.find((x) => x.id === idEdit);
|
const user = userData.value.result.find((x) => x.id === idEdit);
|
||||||
infoPersonCard.value = user
|
infoPersonCard.value = user
|
||||||
? [
|
? [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue