diff --git a/src/pages/03_customer-management/MainPage.vue b/src/pages/03_customer-management/MainPage.vue index 10820f76..87294e6b 100644 --- a/src/pages/03_customer-management/MainPage.vue +++ b/src/pages/03_customer-management/MainPage.vue @@ -34,6 +34,7 @@ import FormEmployeeVisa from 'components/03_customer-management/FormEmployeeVisa import DialogForm from 'components/DialogForm.vue'; import SideMenu from 'components/SideMenu.vue'; import { AddButton } from 'components/button'; +import TableEmpoloyee from 'src/components/03_customer-management/TableEmpoloyee.vue'; import { columnsCustomer, @@ -1347,397 +1348,31 @@ const emptyCreateDialog = ref(false); v-if="listEmployee.length !== 0" class="surface-2 q-pa-md scroll col full-width" > - - - - - - {{ $t(col.label) }} - - - - - - - { - // employeeFormState.drawerModal = true; - // employeeFormStore.assignFormDataEmployee( - // props.row.id, - // ); - // $router.push(`/customer-management/${props.row.id}/branch`); - // openDialogInputForm('INFO', props.row.id); - } - " - > - - - - - - - - - - - - - - - - {{ - `${props.row.firstName} ${props.row.lastName}` || - '-' - }} - - - - - {{ - `${props.row.firstNameEN} ${props.row.lastNameEN}` || - '-' - }} - - - - - - - {{ props.row.nationality || '-' }} - - - - {{ props.row.passportNumber || '-' }} - - - - {{ calculateAge(props.row.dateOfBirth) }} - - - - {{ dateFormat(props.row.passportExpiryDate) }} - - - - {{ props.row.nrcNo || '-' }} - - - - - - - {{ props.row.customerBranch.code }} - - - {{ - $i18n.locale === 'en-US' - ? `${props.row.customerBranch.nameEN}` - : `${props.row.customerBranch.name}` - }} - - - - - - - - {{ $t('EMPLOYEE') }} - - - - { - employeeFormState.drawerModal = true; - employeeFormState.isEmployeeEdit = true; - employeeFormStore.assignFormDataEmployee( - props.row.id, - ); - // openDialogInputForm('INFO', props.row.id); - } - " - /> - - - - - { - // openDialogInputForm('INFO', props.row.id); - employeeFormState.drawerModal = true; - employeeFormStore.assignFormDataEmployee( - props.row.id, - ); - } - " - clickable - dense - class="row q-py-sm" - style="white-space: nowrap" - > - - - {{ $t('viewDetail') }} - - - - { - await editEmployeeFormPersonal( - props.row.id, - ); - } - " - > - - - {{ $t('edit') }} - - - - - - {{ $t('delete') }} - - - - - - - { - triggerChangeStatus( - props.row.id, - props.row.status, - ); - } - " - /> - - {{ - props.row.status !== 'INACTIVE' - ? $t('switchOnLabel') - : $t('switchOffLabel') - }} - - - - - - - - - - - - - - { - await editEmployeeFormPersonal(props.row.id); - } - " - @enter-card=" - () => { - employeeFormState.drawerModal = true; - employeeFormStore.assignFormDataEmployee( - props.row.id, - ); - } - " - @delete-card=" - deleteEmployeeById({ id: props.row.id }) - " - @toggle-status=" - triggerChangeStatus(props.row.id, props.row.status) - " - /> - - - + {}" + @view=" + (item) => { + employeeFormState.drawerModal = true; + //employeeFormState.isEmployeeEdit = true; + employeeFormStore.assignFormDataEmployee(item.id); + } + " + @edit="(item) => editEmployeeFormPersonal(item.id)" + @delete=" + (item) => { + deleteEmployeeById({ id: item.id }); + } + " + @toggle-status=" + async (item) => { + triggerChangeStatus(item.id, item.status); + } + " + />