เหตุผลที่ขอยกเลิกการลาออก

This commit is contained in:
setthawutttty 2024-02-27 14:52:25 +07:00
parent 759a7c556d
commit 2f8d318a38
2 changed files with 86 additions and 18 deletions

View file

@ -0,0 +1,79 @@
<script setup lang="ts">
import { ref, defineModel } from "vue";
import Header from "@/components/DialogHeader.vue";
import { useCounterMixin } from "@/stores/mixin";
import { useQuasar } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
const $q = useQuasar();
const modal = defineModel<boolean>("modal", { required: true });
const type = ref<string>("");
const isReadonly = ref<boolean>(false); //
const mixin = useCounterMixin();
const { dialogConfirm, date2Thai, messageError } = mixin;
const reason = ref<string>('')
/*** ฟังก์ชั่นสำหรับ validate ฟอร์ม */
function validateForm() {
onSubmit();
}
function close() {
modal.value = false;
reason.value = "";
}
function onSubmit() {
dialogConfirm($q,()=>{
modal.value = false
reason.value = "";
})
}
function inputEdit(val: boolean) {
return {
"full-width cursor-pointer inputgreen ": val,
"full-width cursor-pointer inputgreen": !val,
};
}
</script>
<template>
<q-dialog v-model="modal" persistent>
<q-card class="col-12" style="width: 30%">
<Header :tittle="`ขอยื่นขอยกเลิกการลาออก`" :close="close" />
<q-separator />
<q-card-section class="scroll" style="max-height: 70vh">
<div class="q-gutter-y-sm">
<q-input
label="เหตุผลที่ขอยกเลิกการลาออก"
v-model="reason"
outlined
dense
type="textarea"
/>
</div>
</q-card-section>
<q-separator />
<form @submit.prevent="validateForm">
<q-card-actions align="right" class="bg-white text-teal">
<!-- <q-btn flat label="OK" v-close-popup /> -->
<q-btn
type="submit"
for="#submitForm"
unelevated
dense
class="q-px-md items-center"
color="light-blue-10"
label="บันทึก"
/>
</q-card-actions>
</form>
</q-card>
</q-dialog>
</template>
<style lang="scss" scoped></style>