feat: update manage field for localization and add actionRequestWork function

This commit is contained in:
puriphatt 2025-02-27 17:42:13 +07:00
parent 4dc26a3ccd
commit a3d04f5025
3 changed files with 22 additions and 2 deletions

View file

@ -20,7 +20,7 @@ export default {
confirm: 'Confirm',
login: 'Login',
logout: 'Logout',
manage: 'Manage',
manage: 'Manage {text}',
theme: 'Theme',
light: 'Light',
dark: 'Dark',

View file

@ -20,7 +20,7 @@ export default {
confirm: 'ยืนยัน',
login: 'เข้าสู่ระบบ',
logout: 'ออกจากระบบ',
manage: 'จัดการ',
manage: 'จัดการ{text}',
theme: 'ธีม',
light: 'สว่าง',
dark: 'มืด',

View file

@ -276,6 +276,24 @@ export const useRequestList = defineStore('request-list', () => {
return false;
}
async function actionRequestWork(
requestDataId: string,
step: number,
body: (Omit<Step, 'step'> & {
requestWorkId: string;
})[],
successAll?: boolean,
) {
const res = await api.put<Step[]>(
`/request-data/${requestDataId}/request-work/step-status/${step}`,
body,
{ params: { successAll } },
);
if (res.status < 400) return res.data;
return null;
}
return {
data,
page,
@ -296,6 +314,8 @@ export const useRequestList = defineStore('request-list', () => {
editStatusRequestWork,
cancelRequest,
actionRequestWork,
};
});