feat: employee history dialog & table
This commit is contained in:
parent
39272000a7
commit
3458517de4
3 changed files with 349 additions and 50 deletions
|
|
@ -44,6 +44,7 @@ import {
|
|||
Employee,
|
||||
EmployeeWork,
|
||||
EmployeeCheckup,
|
||||
EmployeeHistory,
|
||||
} from 'stores/employee/types';
|
||||
import { onMounted } from 'vue';
|
||||
|
||||
|
|
@ -113,7 +114,6 @@ const formData = ref<CustomerCreate>({
|
|||
image: null,
|
||||
});
|
||||
|
||||
const employeeHistoryDialog = ref(false);
|
||||
const inputSearch = ref<string>();
|
||||
const fieldSelectedCustomer = ref<{ label: string; value: string }>({
|
||||
label: t('all'),
|
||||
|
|
@ -363,6 +363,9 @@ const selectorList = computed(() => [
|
|||
|
||||
const customerType = ref<CustomerType>('CORP');
|
||||
|
||||
const employeeHistoryDialog = ref(false);
|
||||
const employeeHistory = ref<EmployeeHistory[]>();
|
||||
|
||||
function triggerCreate(type: CustomerType) {
|
||||
customerType.value = type;
|
||||
openDialogInputForm();
|
||||
|
|
@ -1072,7 +1075,8 @@ async function checkEmployeeForm() {
|
|||
}
|
||||
|
||||
async function openHistory(id: string) {
|
||||
console.log(id);
|
||||
const res = await employeeStore.getEditHistory(id);
|
||||
employeeHistory.value = res.reverse();
|
||||
employeeHistoryDialog.value = true;
|
||||
}
|
||||
|
||||
|
|
@ -2883,8 +2887,9 @@ watch([inputSearch, currentStatus], async () => {
|
|||
:title="$t('editHistory')"
|
||||
v-model:modal="employeeHistoryDialog"
|
||||
:close="() => (employeeHistoryDialog = false)"
|
||||
v-if="employeeHistory"
|
||||
>
|
||||
<HistoryEditComponent />
|
||||
<HistoryEditComponent v-model:history-list="employeeHistory" />
|
||||
</FormDialog>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue