hrms-user/src/modules/06_evaluate/components/DialogMain.vue

65 lines
1.4 KiB
Vue
Raw Normal View History

<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}`);
},
"ยืนยันการดำเนินการ",
"ต้องการยืนยันการดำเนินการต่อใช่หรือไม่?"
);
}
</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()"
/>
</q-card-actions>
</q-card>
</q-dialog>
</template>
<style scoped></style>