แก้ไข popup และ fix bug ออกคำสั่ง

This commit is contained in:
Warunee Tamkoo 2023-08-11 16:19:49 +07:00
parent 0849b873f6
commit a3ccc67bdd
6 changed files with 242 additions and 538 deletions

View file

@ -125,7 +125,7 @@ import config from "@/app.config";
const $q = useQuasar(); // noti quasar
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, date2Thai, dateText, success } =
const { showLoader, hideLoader, messageError, date2Thai, dateText, success, dialogMessage } =
mixin;
const DataStore = useOrderPlacementDataStore();
@ -314,20 +314,17 @@ const redirectToPage = (id?: string, status?: string) => {
};
const clickDelete = (id: string) => {
$q.dialog({
title: "ยืนยันการลบข้อมูล",
message: "ต้องการลบข้อมูลนี้ใช่หรือไม่?",
cancel: {
flat: true,
color: "negative",
},
persistent: true,
})
.onOk(async () => {
await deleteData(id);
})
.onCancel(() => { })
.onDismiss(() => { });
dialogMessage(
$q,
"ยืนยันการลบข้อมูล",
"ต้องการลบข้อมูลนี้ใช่หรือไม่?",
"mdi-delete",
"ตกลง",
"red",
() => deleteData(id),
undefined
);
};
const deleteData = async (id: string) => {