แก้ไขสถานะ กับ ลบ
This commit is contained in:
parent
efe4fd5950
commit
e969ff7ba4
2 changed files with 38 additions and 11 deletions
|
|
@ -294,6 +294,18 @@ export const useDataStore = defineStore("systemStore", () => {
|
|||
});
|
||||
}
|
||||
|
||||
async function toggleSchedule(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.backup + "/schedule/" + id + "/toggle")
|
||||
.then(async (res) => {
|
||||
return res.data;
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
async function deleteSchedule(id: string) {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -327,5 +339,7 @@ export const useDataStore = defineStore("systemStore", () => {
|
|||
createSchedule,
|
||||
editSchedule,
|
||||
deleteSchedule,
|
||||
|
||||
toggleSchedule,
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue