fix: drawer info icon & btn
This commit is contained in:
parent
c50ca43437
commit
405e1bb267
3 changed files with 8 additions and 8 deletions
|
|
@ -7,7 +7,6 @@ import {
|
|||
EmployeeCheckup,
|
||||
EmployeeCreate,
|
||||
EmployeeOther,
|
||||
EmployeeUpdate,
|
||||
EmployeeWork,
|
||||
} from './types';
|
||||
import axios from 'axios';
|
||||
|
|
@ -100,7 +99,7 @@ const useEmployeeStore = defineStore('api-employee', () => {
|
|||
) {
|
||||
const { image, ...payload } = data;
|
||||
const res = await api.put<
|
||||
Employee & { imageUrl: string; imageUploadUrl: string }
|
||||
Employee & { imageUrl: string; profileImageUploadUrl: string }
|
||||
>(`/employee/${id}`, payload, {
|
||||
headers: {
|
||||
'X-Session-Id': flow?.sessionId,
|
||||
|
|
@ -109,13 +108,13 @@ const useEmployeeStore = defineStore('api-employee', () => {
|
|||
},
|
||||
});
|
||||
|
||||
if (image)
|
||||
await axios
|
||||
.put(res.data.imageUploadUrl, image, {
|
||||
image &&
|
||||
(await axios
|
||||
.put(res.data.profileImageUploadUrl, image, {
|
||||
headers: { 'Content-Type': image.type },
|
||||
onUploadProgress: (e) => console.log(e),
|
||||
})
|
||||
.catch((e) => console.error(e));
|
||||
.catch((e) => console.error(e)));
|
||||
|
||||
if (!res) return false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue