fix: employee type

This commit is contained in:
puriphatt 2024-06-11 02:18:00 +00:00
parent 2b56c26e1b
commit 43d0caca67
2 changed files with 40 additions and 23 deletions

View file

@ -34,7 +34,7 @@ import {
CustomerBranch,
CustomerBranchCreate,
} from 'stores/customer/types';
import { EmployeeCreate } from 'stores/employee/types';
import { EmployeeCreate, Employee } from 'stores/employee/types';
import { onMounted } from 'vue';
import FormPerson from 'src/components/02_personnel-management/FormPerson.vue';
@ -825,7 +825,7 @@ watch(locale, () => {
<div>
<PersonCard
:list="
listEmployee.map((v) => ({
listEmployee.map((v: Employee) => ({
id: v.id,
name:
$i18n.locale === 'en-US'

View file

@ -2,30 +2,47 @@ import { District, Province, SubDistrict } from '../address';
import { Status } from '../types';
export type Employee = {
provinceId: string | null;
districtId: string | null;
subDistrictId: string | null;
id: string;
code: string;
nrcNo: string;
firstName: string;
firstNameEN: string;
lastName: string;
lastNameEN: string;
dateOfBirth: Date;
gender: string;
nationality: string;
address: string;
addressEN: string;
provinceId: string;
districtId: string;
subDistrictId: string;
zipCode: string;
passportType: string;
passportNumber: string;
passportIssuingCountry: string;
passportIssuingPlace: string;
passportIssueDate: Date;
passportExpiryDate: Date;
previousPassportReference: string;
visaType: string;
visaNumber: string;
visaIssueDate: Date;
visaExpiryDate: Date;
visaIssuingPlace: string;
visaStayUntilDate: Date;
workerStatus: string;
customerBranchId: string;
status: Status;
tm6Number: string;
createdAt: Date;
createdBy: string;
updatedAt: Date;
updateBy: string;
subDistrict: SubDistrict | null;
district: District | null;
province: Province | null;
arrivalCardNo: string;
arrivalBarricade: string;
telephoneNo: string;
email: string;
zipCode: string;
address: string;
addressEN: string;
lastNameEN: string;
lastName: string;
firstNameEN: string;
firstName: string;
nationality: string;
gender: string;
dateOfBirth: string;
nrcNo: string;
code: string;
status: Status;
imageUrl: string | null;
profileImageUrl: string | null;
};
export type EmployeeCreate = {