Refactoring code module 08_registryEmployee

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-09-19 17:09:26 +07:00
parent bd33093d3e
commit 7091eaaeb9
31 changed files with 169 additions and 24405 deletions

View file

@ -1,8 +1,11 @@
<script setup lang="ts">
import { ref, watch, reactive } from "vue";
import { ref, watch } from "vue";
import { useQuasar } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useRegistryEmp } from "@/modules/08_registryEmployee/stores/registry-employee";
/** importType*/
import type { QTableProps } from "quasar";
@ -11,10 +14,6 @@ import type { DataEmployee } from "@/modules/08_registryEmployee/interface/respo
/** importComponents*/
import DialogHeader from "@/components/DialogHeader.vue";
/** inportStore*/
import { useCounterMixin } from "@/stores/mixin";
import { useRegistryEmp } from "@/modules/08_registryEmployee/stores/registry-employee";
const $q = useQuasar();
const {
success,
@ -36,9 +35,9 @@ const props = defineProps({
},
});
const filter = ref<string>("");
const rows = ref<DataEmployee[]>([]);
const selected = ref<DataEmployee[]>([]);
const filter = ref<string>(""); //
const rows = ref<DataEmployee[]>([]); //
const selected = ref<DataEmployee[]>([]); //
const columns = ref<QTableProps["columns"]>([
{
name: "no",
@ -165,6 +164,9 @@ const visibleColumns = ref<String[]>([
"statustext",
]);
/**
* งกนยนยนการสงออกคำส
*/
function onClickSendOrder() {
if (selected.value.length == 0) {
dialogMessageNotify($q, "กรุณาเลือกคนออกคำสั่ง");
@ -200,6 +202,9 @@ function onClickSendOrder() {
}
}
/**
* งกนดงขอมลราชชอสงออกคำส
*/
function fetchList() {
showLoader();
http
@ -215,11 +220,19 @@ function fetchList() {
});
}
/**
* งกนป Popup
*/
function closeDialog() {
modal.value = false;
selected.value = [];
}
/**
* ทำเม modal เป true
*
* ทำการเรยก fetchList เพอขอมลราชชอสงออกคำส
*/
watch(
() => modal.value,
() => {