refactor: handle birth date and register date
This commit is contained in:
parent
60f93a16e0
commit
aa823d68aa
1 changed files with 3 additions and 3 deletions
|
|
@ -359,10 +359,10 @@ const useCustomerStore = defineStore('api-customer', () => {
|
|||
} else {
|
||||
delete data['citizenId'];
|
||||
}
|
||||
if (!data.birthDate) delete data['birthDate'];
|
||||
if (!data.registerDate) delete data['registerDate'];
|
||||
if (data.birthDate === undefined) delete data['birthDate'];
|
||||
if (data.registerDate === undefined) delete data['registerDate'];
|
||||
|
||||
const { code, file, birthDate, citizen, ...payload } = data;
|
||||
const { code, file, citizen, ...payload } = data;
|
||||
|
||||
const res = await api.post<CustomerBranch>('/customer-branch', payload);
|
||||
if (!res) return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue