fix: drawer info icon & btn

This commit is contained in:
puriphatt 2024-06-13 04:21:31 +00:00
parent c50ca43437
commit 405e1bb267
3 changed files with 8 additions and 8 deletions

View file

@ -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;