chore: remove probably not use
This commit is contained in:
parent
d0abe75594
commit
0a745885ee
1 changed files with 7 additions and 9 deletions
|
|
@ -59,7 +59,8 @@ export const useCustomerForm = defineStore('form-customer', () => {
|
||||||
branchIndex: number;
|
branchIndex: number;
|
||||||
customerType: 'CORP' | 'PERS';
|
customerType: 'CORP' | 'PERS';
|
||||||
saveMode: 'customer' | 'branch';
|
saveMode: 'customer' | 'branch';
|
||||||
editId?: string;
|
editCustomerId?: string;
|
||||||
|
editCustomerBranchId?: string;
|
||||||
}>({
|
}>({
|
||||||
dialogType: 'info',
|
dialogType: 'info',
|
||||||
dialogOpen: false,
|
dialogOpen: false,
|
||||||
|
|
@ -67,7 +68,8 @@ export const useCustomerForm = defineStore('form-customer', () => {
|
||||||
branchIndex: 0,
|
branchIndex: 0,
|
||||||
customerType: 'CORP',
|
customerType: 'CORP',
|
||||||
saveMode: 'customer',
|
saveMode: 'customer',
|
||||||
editId: '',
|
editCustomerId: '',
|
||||||
|
editCustomerBranchId: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
function isFormDataDifferent() {
|
function isFormDataDifferent() {
|
||||||
|
|
@ -130,7 +132,8 @@ export const useCustomerForm = defineStore('form-customer', () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function submitForm() {
|
async function submitForm() {
|
||||||
if (state.value.dialogType === 'edit' && !state.value.editId) {
|
console.log(state.value.saveMode);
|
||||||
|
if (state.value.dialogType === 'edit' && !state.value.editCustomerId) {
|
||||||
throw new Error('Form mode is set to edit but no ID is provided.');
|
throw new Error('Form mode is set to edit but no ID is provided.');
|
||||||
}
|
}
|
||||||
if (state.value.dialogType === 'edit') {
|
if (state.value.dialogType === 'edit') {
|
||||||
|
|
@ -140,7 +143,7 @@ export const useCustomerForm = defineStore('form-customer', () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function submitCreate() {
|
async function submitCreate() {
|
||||||
customerStore.create(currentFormData.value);
|
// customerStore.create(currentFormData.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function submitEdit() {}
|
async function submitEdit() {}
|
||||||
|
|
@ -158,8 +161,3 @@ export const useCustomerForm = defineStore('form-customer', () => {
|
||||||
export const useEmployeeForm = defineStore('form-employee', () => {
|
export const useEmployeeForm = defineStore('form-employee', () => {
|
||||||
return {};
|
return {};
|
||||||
});
|
});
|
||||||
|
|
||||||
export const useCustomerBranchForm = defineStore(
|
|
||||||
'form-customer-branch',
|
|
||||||
() => {},
|
|
||||||
);
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue