ปรับ dialog บรรจุ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-08-17 11:40:46 +07:00
parent 508fb3b02b
commit 1881aa1b2f
23 changed files with 1064 additions and 1072 deletions

View file

@ -106,11 +106,10 @@
style="color: #ff8080; background-color: #ffdede"
/>
</q-card-section>
<q-card-section class="q-p-sm">
</q-card-section>
<q-card-section class="q-p-sm"> </q-card-section>
</q-card>
</q-dialog>
<!-- Dialog เลอก Image -->
<q-dialog v-model="dialogImage" persistent>
<q-card style="width: 100vw; max-width: 60vw">
@ -219,6 +218,7 @@ const {
success,
showLoader,
hideLoader,
dialogRemove,
} = mixin;
const route = useRoute();
const router = useRouter();
@ -399,17 +399,7 @@ const fetchDataDelete = async (id: string) => {
};
const deletePhoto = async (id: string) => {
dialogMessage(
$q,
"ลบข้อมูล",
"ต้องการทำการลบข้อมูลนี้ใช่หรือไม่",
"delete",
undefined,
"red",
() => fetchDataDelete(id),
undefined,
false
);
dialogRemove($q, () => fetchDataDelete(id));
};
const selectAvatarHistory = async () => {

View file

@ -602,6 +602,7 @@ const {
hideLoader,
success,
dateToISO,
dialogConfirm,
} = mixin;
const profileStore = useProfileDataStore();
@ -936,15 +937,11 @@ const conditionSave = async () => {
if (myForm.value !== null) {
myForm.value.validate().then((success) => {
if (success) {
dialogMessage(
dialogConfirm(
$q,
"ต้องการแก้ไขข้อมูลหรือไม่?",
"แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย",
"mdi-help-circle-outline",
"ตกลง",
"public",
async () => await saveData(),
undefined
"ต้องการแก้ไขข้อมูลหรือไม่?",
"แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย"
);
}
});

View file

@ -27,6 +27,7 @@ const {
success,
messageError,
date2Thai,
dialogRemove,
} = mixin;
const selected = ref<ResponseRow[]>([]);
@ -202,7 +203,7 @@ const fecthlistRecevice = async () => {
list.push({
personalId: e.id ?? "",
citizenId: e.citizenId ?? "-",
fullname: e.prefix+e.firstname + " " + e.lastname,
fullname: e.prefix + e.firstname + " " + e.lastname,
organizationName:
e.organizationName +
" " +
@ -265,17 +266,7 @@ const openModalTree = (id: string) => {
};
const openDelete = (id: string) => {
dialogMessage(
$q,
"ลบข้อมูล",
"ต้องการทำการลบข้อมูลนี้ใช่หรือไม่",
"delete",
undefined,
"red",
async () => await fetchDataDelete(id),
undefined,
false
);
dialogRemove($q, async () => await fetchDataDelete(id));
};
const fetchDataDelete = async (id: string) => {

View file

@ -9,7 +9,14 @@ import config from "@/app.config";
const $q = useQuasar();
const mixin = useCounterMixin(); //
const { date2Thai, hideLoader, messageError, showLoader, success } = mixin; //
const {
date2Thai,
hideLoader,
messageError,
showLoader,
success,
dialogConfirm,
} = mixin; //
const notFound = ref<string>("ไม่พบข้อมูลที่ค้นหา");
const noData = ref<string>("ไม่พบข้อมูลผังโครงสร้าง");
@ -205,16 +212,15 @@ const clickEditRow = () => {
const closeModal = () => {
if (editDataStatus.value == true) {
$q.dialog({
title: `ข้อมูลมีการแก้ไข`,
message: `ยืนยันที่จะปิดโดยไม่บันทึกใช่หรือไม่?`,
cancel: "ยกเลิก",
ok: "ยืนยัน",
persistent: true,
}).onOk(() => {
editDataStatus.value = false;
closeAndClear();
});
dialogConfirm(
$q,
async () => {
editDataStatus.value = false;
await closeAndClear();
},
`ข้อมูลมีการแก้ไข`,
`ยืนยันที่จะปิดโดยไม่บันทึกใช่หรือไม่?`
);
} else {
closeAndClear();
}