feat: add customer export

This commit is contained in:
Thanaphon Frappet 2025-09-01 14:53:52 +07:00 committed by Methapon2001
parent 764d9bab3f
commit 3e24a46f66
3 changed files with 122 additions and 1 deletions

View file

@ -548,6 +548,19 @@ async function openSpecificEmployee(id: string) {
employeeFormState.value.drawerModal = true;
}
async function triggerExport() {
switch (currentTab.value) {
case 'employer':
customerStore.customerExport({ pageSize: 10000 });
break;
case 'employee':
employeeStore.employeeExport({ pageSize: 10000 });
break;
}
}
// TODO: When in employee form, if select address same as customer then auto fill
watch(
@ -801,7 +814,7 @@ const emptyCreateDialog = ref(false);
outlined
dense
:label="$t('general.search')"
class="col col-md-3"
class="col col-md-3 q-mr-sm"
:bg-color="$q.dark.isActive ? 'dark' : 'white'"
v-model="inputSearch"
debounce="200"
@ -843,6 +856,13 @@ const emptyCreateDialog = ref(false);
</template>
</q-input>
<SaveButton
icon-only
class="q-mr-auto"
:icon="'material-symbols:download'"
@click.stop="triggerExport()"
/>
<div class="row col-md-5" style="white-space: nowrap">
<q-select
v-if="$q.screen.gt.sm"