2023-12-26 16:21:57 +07:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { useRouter } from "vue-router";
|
|
|
|
|
import { useQuasar } from "quasar";
|
|
|
|
|
|
|
|
|
|
import DialogHeader from "@/components/DialogHeader.vue";
|
|
|
|
|
|
|
|
|
|
import { useCounterMixin } from "@/stores/mixin";
|
|
|
|
|
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
const $q = useQuasar();
|
|
|
|
|
const mixin = useCounterMixin();
|
|
|
|
|
|
|
|
|
|
const { dialogConfirm } = mixin;
|
|
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
modal: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
},
|
|
|
|
|
menu: {
|
|
|
|
|
type: Object,
|
|
|
|
|
require: true,
|
|
|
|
|
},
|
|
|
|
|
close: {
|
|
|
|
|
type: Function,
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function onCklicNext() {
|
|
|
|
|
dialogConfirm(
|
|
|
|
|
$q,
|
|
|
|
|
() => {
|
2023-12-26 16:27:59 +07:00
|
|
|
const type = props.menu ? props.menu.val?.toLowerCase() : "";
|
|
|
|
|
router.push(`/evaluate/add/${type}`);
|
2023-12-26 16:21:57 +07:00
|
|
|
},
|
|
|
|
|
"ยืนยันการดำเนินการ",
|
|
|
|
|
"ต้องการยืนยันการดำเนินการต่อใช่หรือไม่?"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<template>
|
|
|
|
|
<q-dialog v-model="props.modal">
|
|
|
|
|
<q-card style="width: 700px; max-width: 80vw">
|
|
|
|
|
<DialogHeader
|
|
|
|
|
:tittle="props.menu ? props.menu.label : ''"
|
|
|
|
|
:close="props.close"
|
|
|
|
|
/>
|
|
|
|
|
<q-separator />
|
|
|
|
|
|
|
|
|
|
<q-card-section class="q-pt-none"> </q-card-section>
|
|
|
|
|
<q-separator />
|
|
|
|
|
<q-card-actions align="right">
|
|
|
|
|
<q-btn
|
|
|
|
|
unelevated
|
|
|
|
|
dense
|
|
|
|
|
color="public"
|
|
|
|
|
label="ดำเนินการต่อ"
|
2023-12-26 16:27:59 +07:00
|
|
|
@click="onCklicNext()"
|
2023-12-26 16:21:57 +07:00
|
|
|
/>
|
|
|
|
|
</q-card-actions>
|
|
|
|
|
</q-card>
|
|
|
|
|
</q-dialog>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped></style>
|