fix: type error
This commit is contained in:
parent
61b7f19577
commit
d740a48c7f
5 changed files with 57 additions and 57 deletions
|
|
@ -2171,7 +2171,7 @@ const emptyCreateDialog = ref(false);
|
|||
} else {
|
||||
res = await customerStore.createBranch({
|
||||
...customerFormData.customerBranch[idx],
|
||||
customerId: customerFormState.editCustomerId,
|
||||
customerId: customerFormState.editCustomerId || '',
|
||||
id: undefined,
|
||||
});
|
||||
}
|
||||
|
|
@ -2230,6 +2230,7 @@ const emptyCreateDialog = ref(false);
|
|||
<EmployerFormBranch
|
||||
:index="idx"
|
||||
prefixId="form"
|
||||
v-if="customerFormData.customerBranch"
|
||||
v-model:customer="customerFormData"
|
||||
v-model:customer-branch="customerFormData.customerBranch[idx]"
|
||||
:onCreate="customerFormState.dialogType === 'create'"
|
||||
|
|
@ -2245,6 +2246,8 @@ const emptyCreateDialog = ref(false);
|
|||
@cancel="() => customerFormUndo(false)"
|
||||
@delete="
|
||||
async () => {
|
||||
if (!customerFormState.editCustomerId) return;
|
||||
|
||||
if (idx === 0) {
|
||||
deleteCustomerById(customerFormState.editCustomerId);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ const registerName = defineModel<string>('registerName', { default: '' });
|
|||
const citizenId = defineModel<string>('citizenId', { default: '' });
|
||||
const legalPersonNo = defineModel<string>('legalPersonNo', { default: '' });
|
||||
|
||||
const businessType = defineModel<'string'>('businessType');
|
||||
const jobPosition = defineModel<'string'>('jobPosition');
|
||||
const businessType = defineModel<string>('businessType');
|
||||
const jobPosition = defineModel<string>('jobPosition');
|
||||
const telephoneNo = defineModel<string>('telephoneNo', { default: '' });
|
||||
|
||||
const branchOptions = defineModel<{ id: string; name: string }[]>(
|
||||
|
|
|
|||
|
|
@ -157,9 +157,7 @@ export const useCustomerForm = defineStore('form-customer', () => {
|
|||
wageRateText: v.wageRateText,
|
||||
payDate: v.payDate,
|
||||
jobDescription: v.jobDescription,
|
||||
jobPositionEN: v.jobPositionEN,
|
||||
jobPosition: v.jobPosition,
|
||||
businessTypeEN: v.businessTypeEN,
|
||||
businessType: v.businessType,
|
||||
employmentOffice: v.employmentOffice,
|
||||
employmentOfficeEN: v.employmentOfficeEN,
|
||||
|
|
|
|||
|
|
@ -367,7 +367,6 @@ const useCustomerStore = defineStore('api-customer', () => {
|
|||
data: CustomerBranchCreate & {
|
||||
id?: string;
|
||||
customerId: string;
|
||||
codeCustomer: string;
|
||||
},
|
||||
) {
|
||||
if (data.citizenId) {
|
||||
|
|
|
|||
|
|
@ -25,56 +25,56 @@ export type Customer = {
|
|||
|
||||
export type CustomerBranch = {
|
||||
customerCode?: string;
|
||||
wageRateText: 'string';
|
||||
wageRate: 0;
|
||||
payDateEN: 'string';
|
||||
payDate: 'string';
|
||||
jobDescription: 'string';
|
||||
jobPosition: 'string';
|
||||
businessType: 'string';
|
||||
agent: 'string';
|
||||
contactName: 'string';
|
||||
officeTel: 'string';
|
||||
contactTel: 'string';
|
||||
email: 'string';
|
||||
subDistrictId: 'string';
|
||||
districtId: 'string';
|
||||
provinceId: 'string';
|
||||
streetEN: 'string';
|
||||
street: 'string';
|
||||
mooEN: 'string';
|
||||
moo: 'string';
|
||||
soiEN: 'string';
|
||||
soi: 'string';
|
||||
addressEN: 'string';
|
||||
address: 'string';
|
||||
employmentOfficeEN: 'string';
|
||||
employmentOffice: 'string';
|
||||
homeCode: 'string';
|
||||
authorizedNameEN: 'string';
|
||||
authorizedName: 'string';
|
||||
authorizedCapital: 'string';
|
||||
registerDate: '2024-09-16T07:52:42.627Z';
|
||||
registerNameEN: 'string';
|
||||
registerName: 'string';
|
||||
legalPersonNo: 'string';
|
||||
citizenId: 'string';
|
||||
birthDate: '2024-09-16T07:52:42.627Z';
|
||||
gender: 'string';
|
||||
lastNameEN: 'string';
|
||||
lastName: 'string';
|
||||
firstNameEN: 'string';
|
||||
firstName: 'string';
|
||||
namePrefix: 'string';
|
||||
telephoneNo: 'string';
|
||||
codeCustomer: 'string';
|
||||
customerName: 'string';
|
||||
updatedByUserId: 'string';
|
||||
createdByUserId: 'string';
|
||||
code: 'string';
|
||||
wageRateText: string;
|
||||
wageRate: number;
|
||||
payDateEN: string;
|
||||
payDate: string;
|
||||
jobDescription: string;
|
||||
jobPosition: string;
|
||||
businessType: string;
|
||||
agent: string;
|
||||
contactName: string;
|
||||
officeTel: string;
|
||||
contactTel: string;
|
||||
email: string;
|
||||
subDistrictId: string;
|
||||
districtId: string;
|
||||
provinceId: string;
|
||||
streetEN: string;
|
||||
street: string;
|
||||
mooEN: string;
|
||||
moo: string;
|
||||
soiEN: string;
|
||||
soi: string;
|
||||
addressEN: string;
|
||||
address: string;
|
||||
employmentOfficeEN: string;
|
||||
employmentOffice: string;
|
||||
homeCode: string;
|
||||
authorizedNameEN: string;
|
||||
authorizedName: string;
|
||||
authorizedCapital: string;
|
||||
registerDate: string | Date | null;
|
||||
registerNameEN: string;
|
||||
registerName: string;
|
||||
legalPersonNo: string;
|
||||
citizenId: string;
|
||||
birthDate: string;
|
||||
gender: string;
|
||||
lastNameEN: string;
|
||||
lastName: string;
|
||||
firstNameEN: string;
|
||||
firstName: string;
|
||||
namePrefix: string;
|
||||
telephoneNo: string;
|
||||
codeCustomer: string;
|
||||
customerName: string;
|
||||
updatedByUserId: string;
|
||||
createdByUserId: string;
|
||||
code: string;
|
||||
statusOrder: 0;
|
||||
customerId: 'string';
|
||||
id: 'string';
|
||||
customerId: string;
|
||||
id: string;
|
||||
|
||||
status: Status;
|
||||
createdBy: string | null;
|
||||
|
|
@ -132,11 +132,11 @@ export type CustomerBranchCreate = {
|
|||
customerName?: string;
|
||||
registerName?: string;
|
||||
registerNameEN?: string;
|
||||
registerDate?: Date | null;
|
||||
registerDate?: string | Date | null;
|
||||
authorizedCapital?: string;
|
||||
authorizedName?: string;
|
||||
authorizedNameEN?: string;
|
||||
code?: 'string';
|
||||
code?: string;
|
||||
citizen?: CitizenPayload[];
|
||||
file?: {
|
||||
name?: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue