no message
This commit is contained in:
parent
a19a0634d4
commit
9dc56a34e8
1 changed files with 25 additions and 52 deletions
|
|
@ -14,7 +14,7 @@ import { useQuasar } from "quasar";
|
|||
|
||||
const $q = useQuasar(); //ใช้ noti quasar
|
||||
const mixin = useCounterMixin();
|
||||
const { messageError, success, showLoader, hideLoader } = mixin;
|
||||
const { messageError, success, showLoader, hideLoader, dialogConfirm } = mixin;
|
||||
|
||||
const modal = ref<boolean>(false);
|
||||
const pagination = ref({
|
||||
|
|
@ -164,43 +164,7 @@ const columns2 = ref<QTableProps["columns"]>([
|
|||
]);
|
||||
|
||||
// ข้อมูลตาราง (จำลอง)
|
||||
const rows2 = ref<FormMainProbation2[]>([
|
||||
// {
|
||||
// no: "1",
|
||||
// name: "นายใจดี ยอดใจ ",
|
||||
// position: "นักวิชาการพัสดุ",
|
||||
// level: "ปฏิบัติการ",
|
||||
// institution: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒",
|
||||
// },
|
||||
// {
|
||||
// no: "2",
|
||||
// name: "นายจักกริน บัณฑิต",
|
||||
// position: "นักวิชาการพัสดุ",
|
||||
// level: "ปฏิบัติการ",
|
||||
// institution: "กลุ่มงานโครงสร้างและอัตรากำลัง ๒",
|
||||
// },
|
||||
// {
|
||||
// no: "3",
|
||||
// name: "นางสาวกัณฐิมา กาฬสินธุ์",
|
||||
// position: "นักจัดการงานทั่วไป",
|
||||
// level: "ปฏิบัติการ",
|
||||
// institution: "กลุ่มงานช่วยนักบริหาร",
|
||||
// },
|
||||
// {
|
||||
// no: "4",
|
||||
// name: "นางสาวเมขลา กระจ่างมนตรี",
|
||||
// position: "นักจัดการงานทั่วไป",
|
||||
// level: "ปฏิบัติการ",
|
||||
// institution: "กลุ่มงานช่วยนักบริหาร",
|
||||
// },
|
||||
// {
|
||||
// no: "5",
|
||||
// name: "นางสาวฐิติรัตน์ พงษ์ศิริ",
|
||||
// position: "นักจัดการงานทั่วไป",
|
||||
// level: "ปฏิบัติการ",
|
||||
// institution: "กลุ่มงานช่วยนักบริหาร",
|
||||
// },
|
||||
]);
|
||||
const rows2 = ref<FormMainProbation2[]>([]);
|
||||
|
||||
onMounted(async () => {
|
||||
getpersonalList();
|
||||
|
|
@ -291,24 +255,18 @@ const clickDelete = (id: string) => {
|
|||
};
|
||||
|
||||
const clickAdd = (id: string) => {
|
||||
$q.dialog({
|
||||
title: "ยืนยันการเพิ่มข้อมูล",
|
||||
message: "ต้องการเพิ่มข้อมูลนี้ใช่หรือไม่?",
|
||||
cancel: {
|
||||
flat: true,
|
||||
color: "negative",
|
||||
},
|
||||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => {
|
||||
showLoader();
|
||||
const postData = {
|
||||
personal_id: id,
|
||||
};
|
||||
await http
|
||||
.post(config.API.personalAdd(), postData)
|
||||
.then((res) => {
|
||||
.then(() => {
|
||||
getpersonalList();
|
||||
success($q, "เพิ่มข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -317,9 +275,24 @@ const clickAdd = (id: string) => {
|
|||
clickClose();
|
||||
hideLoader();
|
||||
});
|
||||
})
|
||||
.onCancel(() => {})
|
||||
.onDismiss(() => {});
|
||||
},
|
||||
"ยันยันการเพิ่มข้อมูล",
|
||||
"ต้องการเพิ่มข้อมูลนี้หรือไม่ ?"
|
||||
);
|
||||
// $q.dialog({
|
||||
// title: "ยืนยันการเพิ่มข้อมูล",
|
||||
// message: "ต้องการเพิ่มข้อมูลนี้ใช่หรือไม่?",
|
||||
// cancel: {
|
||||
// flat: true,
|
||||
// color: "negative",
|
||||
// },
|
||||
// persistent: true,
|
||||
// })
|
||||
// .onOk(async () => {
|
||||
|
||||
// })
|
||||
// .onCancel(() => {})
|
||||
// .onDismiss(() => {});
|
||||
};
|
||||
|
||||
const clickClose = async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue