Refactoring code module 10_registry

This commit is contained in:
STW_TTTY\stwtt 2024-09-10 15:10:18 +07:00
parent 59393536f7
commit 779e33d2a5
25 changed files with 605 additions and 276 deletions

View file

@ -1,23 +1,26 @@
<script setup lang="ts">
import { useCounterMixin } from "@/stores/mixin";
import { useQuasar, type QTableProps } from "quasar";
import { ref, reactive, onMounted } from "vue";
import { ref, onMounted } from "vue";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import type { SalaryFormType } from "@/modules/10_registry/interface/index/Main";
//history dialog
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
import http from "@/plugins/http";
import config from "@/app.config";
const idByRow = ref<string>("");
const rows = ref<any[]>([]);
const filter = ref<string>("");
const rowsHistory = ref<any[]>([]);
const $q = useQuasar();
const mode = ref<any>($q.screen.gt.xs);
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
const idByRow = ref<string>("");
const rows = ref<SalaryFormType[]>([]);
const filter = ref<string>("");
const rowsHistory = ref<SalaryFormType[]>([]);
const mode = ref<boolean>($q.screen.gt.xs);
const modalHistory = ref<boolean>(false);
/** ตัวแปรข้อมูล */
@ -314,6 +317,7 @@ const columnsHistory = ref<QTableProps["columns"]>([
},
]);
/** เปิด dialog ประวัติ*/
function onHistory(id: string) {
modalHistory.value = true;
idByRow.value = id;

View file

@ -1,20 +1,21 @@
<script setup lang="ts">
import { useCounterMixin } from "@/stores/mixin";
import { useQuasar, type QTableProps } from "quasar";
import { ref, reactive, onMounted } from "vue";
//history dialog
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
import { ref, onMounted } from "vue";
import http from "@/plugins/http";
import config from "@/app.config";
import type { NopaidFormType } from "@/modules/10_registry/interface/index/Main";
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
const idByRow = ref<string>("");
const rows = ref<any[]>([]);
const rows = ref<NopaidFormType[]>([]);
const filter = ref<string>("");
const rowsHistory = ref<any[]>([]);
const rowsHistory = ref<NopaidFormType[]>([]);
const $q = useQuasar();
const mode = ref<any>($q.screen.gt.xs);
const mode = ref<boolean>($q.screen.gt.xs);
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, date2Thai } = mixin;