refactor: show Empoloyee in Customer

This commit is contained in:
Net 2024-08-15 09:34:26 +07:00
parent 079b70abdd
commit f0493c3bbc

View file

@ -52,6 +52,7 @@ const currentCustomerUrlImage = defineModel<string | null>(
);
const currentStatus = ref<Status | 'All'>('All');
const currentBtnOpen = ref<boolean[]>([]);
const totalBranch = ref(0);
const currentPageBranch = ref<number>(1);
@ -83,6 +84,10 @@ onMounted(async () => {
customerBranchFormState.value.currentCustomerId = parts[4];
await fetchList();
branch.value?.forEach((v) => {
currentBtnOpen.value.push(false);
});
});
const columns = [
@ -451,12 +456,19 @@ watch([customerId, inputSearch, currentStatus], async () => {
dense
round
flat
@click="() => {}"
@click="
() => {
currentBtnOpen[props.rowIndex] =
!currentBtnOpen[props.rowIndex];
}
"
/>
</q-td>
</q-tr>
<q-tr>asdadadasd</q-tr>
<q-tr v-if="currentBtnOpen[props.rowIndex]" class="q-pa-sm">
{{ props.rowIndex }}
</q-tr>
</template>
<template #item="props">
<div class="col-12 col-md-6">