feat: history dialog
This commit is contained in:
parent
259d7e224d
commit
2d8b9ebb92
5 changed files with 233 additions and 9 deletions
|
|
@ -31,6 +31,7 @@ import DrawerInfo from 'src/components/DrawerInfo.vue';
|
|||
import InfoForm from 'src/components/02_personnel-management/InfoForm.vue';
|
||||
import CustomerInfoComponent from 'src/components/03_customer-management/CustomerInfoComponent.vue';
|
||||
import NoData from 'components/NoData.vue';
|
||||
import HistoryEditComponent from 'src/components/03_customer-management/HistoryEditComponent.vue';
|
||||
|
||||
import {
|
||||
CustomerCreate,
|
||||
|
|
@ -118,6 +119,7 @@ const formData = ref<CustomerCreate>({
|
|||
image: null,
|
||||
});
|
||||
|
||||
const employeeHistoryDialog = ref(false);
|
||||
const inputSearch = ref<string>();
|
||||
const fieldSelectedCustomer = ref<{ label: string; value: string }>({
|
||||
label: t('all'),
|
||||
|
|
@ -1089,6 +1091,11 @@ async function checkEmployeeForm() {
|
|||
} else return true;
|
||||
}
|
||||
|
||||
async function openHistory(id: string) {
|
||||
console.log(id);
|
||||
employeeHistoryDialog.value = true;
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
const resultStats = await getStatsCustomer();
|
||||
|
||||
|
|
@ -1603,6 +1610,7 @@ watch(selectorLabel, async () => {
|
|||
|
||||
<div v-if="listEmployee.length !== 0">
|
||||
<PersonCard
|
||||
history
|
||||
:list="
|
||||
(!!inputSearch ? resultSearchEmployee ?? [] : listEmployee).map(
|
||||
(v: Employee) => ({
|
||||
|
|
@ -1629,6 +1637,7 @@ watch(selectorLabel, async () => {
|
|||
}),
|
||||
) || []
|
||||
"
|
||||
@history="openHistory"
|
||||
@update-card="openDialogInputForm"
|
||||
@enter-card="openDialogInputForm"
|
||||
@delete-card="onDelete"
|
||||
|
|
@ -2906,6 +2915,18 @@ watch(selectorLabel, async () => {
|
|||
</template>
|
||||
</InfoForm>
|
||||
</DrawerInfo>
|
||||
|
||||
<!-- employee history -->
|
||||
<FormDialog
|
||||
no-address
|
||||
no-app-box
|
||||
no-footer
|
||||
:title="$t('editHistory')"
|
||||
v-model:modal="employeeHistoryDialog"
|
||||
:close="() => (employeeHistoryDialog = false)"
|
||||
>
|
||||
<HistoryEditComponent />
|
||||
</FormDialog>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue