fix: can't create employee with img
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
This commit is contained in:
parent
e3f86136e7
commit
2ac31c2e4c
2 changed files with 3 additions and 1 deletions
|
|
@ -2514,9 +2514,10 @@ const emptyCreateDialog = ref(false);
|
|||
v-model:toggle-status="currentFromDataEmployee.status"
|
||||
fallbackCover="/images/employee-banner.png"
|
||||
:img="
|
||||
employeeFormState.profileUrl ||
|
||||
`${baseUrl}/employee/${currentFromDataEmployee.id}/image/${currentFromDataEmployee.selectedImage}`.concat(
|
||||
refreshImageState ? `?ts=${Date.now()}` : '',
|
||||
) || null
|
||||
)
|
||||
"
|
||||
:fallbackImg="`/images/employee-avatar-${currentFromDataEmployee.gender === 'male' ? 'male' : 'female'}.png`"
|
||||
:tabs-list="
|
||||
|
|
|
|||
|
|
@ -1267,6 +1267,7 @@ export const useEmployeeForm = defineStore('form-employee', () => {
|
|||
currentFromDataEmployee.value.lastNameEN.trim();
|
||||
|
||||
if (state.value.dialogType === 'create') {
|
||||
delete currentFromDataEmployee.value.image;
|
||||
const res = await employeeStore.create(
|
||||
{
|
||||
...currentFromDataEmployee.value,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue