เพิ่ม pop up delete

This commit is contained in:
AnandaTon 2023-07-10 09:32:58 +07:00
parent 27a1ca209d
commit 77f42cecf5

View file

@ -127,11 +127,7 @@
<q-item-section>กำหนดตำแหน</q-item-section>
</q-item>
<q-separator />
<q-item
clickable
v-close-popup
@click="editDetail(props.row, 'wait')"
>
<q-item clickable v-close-popup @click="clickDelete">
<q-item-section
style="min-width: 0px"
avatar
@ -233,7 +229,55 @@ const rowsModal = [
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
name: "นายภูวนัย ต้นทอง",
positionNum: "กทม.2",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "35,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางปริศนา ตรีวุฒิ",
positionNum: "กบห.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "38,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางเมษา เกียรติบวรสกุล ",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "25,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางพริมา พงศ์พินิจ",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "30,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางพรพักตร์ พาใจขวัญ",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
@ -245,7 +289,7 @@ const rowsModal = [
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
name: "นางชลธิมา คมสกุล ",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
@ -253,55 +297,7 @@ const rowsModal = [
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
pay: "15,000",
},
];
@ -413,7 +409,55 @@ const rows = [
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
name: "นายภูวนัย ต้นทอง",
positionNum: "กทม.2",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "35,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางปริศนา ตรีวุฒิ",
positionNum: "กบห.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "38,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางเมษา เกียรติบวรสกุล ",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "25,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางพริมา พงศ์พินิจ",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "30,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางพรพักตร์ พาใจขวัญ",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
@ -423,6 +467,18 @@ const rows = [
yearly: 2565,
pay: "40,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางชลธิมา คมสกุล ",
positionNum: "สกก.3",
position: "นักบริหาร",
path: "บริหาร",
type: "บริหาร",
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "15,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
name: "นางนัทธ์ เหล่าสกุล",
@ -457,7 +513,7 @@ const rows = [
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
pay: "17,000",
},
{
no: "0ac56905-1a74-4606-a120-233340adde95",
@ -481,7 +537,7 @@ const rows = [
level: "ชำนาญการพิเศษ",
affiliation: "ฝ่ายบริหารงานทั่วไป",
yearly: 2565,
pay: "40,000",
pay: "20,250",
},
];
@ -532,17 +588,25 @@ const clickAdd = () => {
router.push({ name: "" });
};
const editDetail = () => {
router.push({ name: "" });
};
const clickDelete = (id: string) => {
dialogMessage(
$q,
"ยืนยันการลบข้อมูล",
"ต้องการลบข้อมูลนี้ใช่หรือไม่?",
"mdi-help-circle-outline",
"ตกลง",
"red",
() => deleteData(id),
undefined
);
$q.dialog({
title: "ยืนยันการลบข้อมูล",
message: "ต้องการลบข้อมูลนี้ใช่หรือไม่?",
cancel: {
flat: true,
color: "negative",
},
persistent: true,
})
.onOk(async () => {
await deleteData(id);
})
.onCancel(() => {})
.onDismiss(() => {});
};
const nodeTree = async () => {