chore: remove probably not use

This commit is contained in:
Methapon2001 2024-08-05 10:25:09 +07:00
parent d0abe75594
commit 0a745885ee

View file

@ -59,7 +59,8 @@ export const useCustomerForm = defineStore('form-customer', () => {
branchIndex: number;
customerType: 'CORP' | 'PERS';
saveMode: 'customer' | 'branch';
editId?: string;
editCustomerId?: string;
editCustomerBranchId?: string;
}>({
dialogType: 'info',
dialogOpen: false,
@ -67,7 +68,8 @@ export const useCustomerForm = defineStore('form-customer', () => {
branchIndex: 0,
customerType: 'CORP',
saveMode: 'customer',
editId: '',
editCustomerId: '',
editCustomerBranchId: '',
});
function isFormDataDifferent() {
@ -130,7 +132,8 @@ export const useCustomerForm = defineStore('form-customer', () => {
}
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.');
}
if (state.value.dialogType === 'edit') {
@ -140,7 +143,7 @@ export const useCustomerForm = defineStore('form-customer', () => {
}
async function submitCreate() {
customerStore.create(currentFormData.value);
// customerStore.create(currentFormData.value);
}
async function submitEdit() {}
@ -158,8 +161,3 @@ export const useCustomerForm = defineStore('form-customer', () => {
export const useEmployeeForm = defineStore('form-employee', () => {
return {};
});
export const useCustomerBranchForm = defineStore(
'form-customer-branch',
() => {},
);