คอมเม้น code ระบบการลา(เพิ่มเติม)

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-11-10 14:58:49 +07:00
parent b202f2ed9d
commit ef6d41ff56
2 changed files with 33 additions and 6 deletions

View file

@ -1,17 +1,23 @@
<script setup lang="ts">
import { ref, reactive, watchEffect, watch } from "vue";
import { ref, reactive, watch } from "vue";
import { useQuasar } from "quasar";
/** importType */
import type {
changeRoundEdit,
MyObjectRoundChangeRef,
} from "@/modules/09_leave/interface/request/changeRound";
/** importStore */
import { useCounterMixin } from "@/stores/mixin";
import { useQuasar } from "quasar";
import { useChangeRoundDataStore } from "@/modules/09_leave/stores/ChangeRoundStore";
/** useStore */
const dataStore = useChangeRoundDataStore();
const $q = useQuasar();
const mixin = useCounterMixin();
const { dialogConfirm, date2Thai } = mixin;
const $q = useQuasar();
const roundRef = ref<Object | null>(null);
const resonRef = ref<Object | null>(null);
const effectiveDateRef = ref<Object | null>(null);
@ -38,6 +44,7 @@ const objectRoundChange: MyObjectRoundChangeRef = {
effectiveDate: effectiveDateRef,
};
/** Function validateForm */
function validateForm() {
const hasError = [];
for (const key in objectRoundChange) {
@ -55,6 +62,8 @@ function validateForm() {
console.log(hasError);
}
}
/** Function ยืนยันการบันทึกข้อมูล */
function onSubmit() {
dialogConfirm(
$q,

View file

@ -1,16 +1,25 @@
<script setup lang="ts">
import { ref, onMounted, reactive } from "vue";
import { useQuasar } from "quasar";
//
/** importType */
import type { dataPost } from "@/modules/09_leave/interface/request/changeRound";
import { useChangeRoundDataStore } from "@/modules/09_leave/stores/ChangeRoundStore";
/** importComponents */
import Dialogform from "@/modules/09_leave/components/4_ChangeRound/DialogForm.vue";
import Modal from "@/modules/05_placement/components/AppointEmployee/Modal.vue";
/** importStore */
import { useCounterMixin } from "@/stores/mixin";
const $q = useQuasar();
import { useChangeRoundDataStore } from "@/modules/09_leave/stores/ChangeRoundStore";
/** useStore */
const mixin = useCounterMixin();
const { dialogConfirm, date2Thai, dialogMessageNotify } = mixin;
const dataStore = useChangeRoundDataStore();
/** use */
const $q = useQuasar();
const modal = ref<boolean>(false);
const editCheck = ref<string>("");
const DataRow = ref<any>();
@ -20,16 +29,23 @@ const formData = reactive<dataPost>({
lastName: "",
});
/**
* Function openPopup
* @param check action edit,history
* @param detail รายละเอยดขอมลรอบการปฏของผใชงาน
*/
function Openmodal(check: string, detail: any) {
DataRow.value = detail;
modal.value = true;
editCheck.value = check;
}
/** Function closePopup */
function closeDialog() {
modal.value = false;
}
/** Function ค้นหาข้อมูล */
function searchData() {
if (formData.cardId || formData.firstName || formData.lastName) {
dataStore.fetchDataForCardId(formData, "click");
@ -37,6 +53,8 @@ function searchData() {
dialogMessageNotify($q, "กรุณากรอกข้อมูลอย่างน้อย 1 ช่อง");
}
}
/** Hook */
onMounted(() => {
dataStore.fetchDatainHistory([
{