เพิ่ม dialog confirm

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-11-08 11:15:17 +07:00
parent fe8d157c64
commit 8453e20234
7 changed files with 166 additions and 10 deletions

View file

@ -1,6 +1,7 @@
<script setup lang="ts">
import { ref, onMounted } from "vue";
import { useRouter } from "vue-router";
import { useQuasar } from "quasar";
import moment, { Moment } from "moment";
// import Type
@ -11,8 +12,9 @@ import MapCheck from "@/components/MapCheckin.vue";
import { useCounterMixin } from "@/stores/mixin";
const mixin = useCounterMixin();
const { date2Thai } = mixin;
const { date2Thai, dialogConfirm } = mixin;
const router = useRouter();
const $q = useQuasar();
const stetusCheckin = ref(true);
@ -178,7 +180,14 @@ function validateForm() {
//
const dialogTime = ref<boolean>(false);
const confirm = () => {
dialogTime.value = true;
dialogConfirm(
$q,
async () => {
dialogTime.value = true;
},
"ยืนยันการบันทึกเวลา ?",
"ต้องการยืนยันการบันทึกการลงเวลานี้ใช่หรือไม่"
);
};
// class