This commit is contained in:
setthawutttty 2024-11-06 16:47:02 +07:00
parent 8390a8ab01
commit 8c989e84b2
23 changed files with 201 additions and 149 deletions

View file

@ -6,13 +6,14 @@ import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useDataStore } from "@/stores/data";
import type { SalaryFormType } from "@/modules/10_registry/interface/index/Main";
//history dialog
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
const $q = useQuasar();
const daraPerson = useDataStore();
const dataPerson = useDataStore();
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
@ -22,7 +23,7 @@ const filter = ref<string>("");
const rowsHistory = ref<SalaryFormType[]>([]);
const mode = ref<boolean>($q.screen.gt.xs);
const checkType = ref<boolean>(
daraPerson.officerType == "OFFICER" ? true : false
dataPerson.officerType == "OFFICER" ? true : false
);
const modalHistory = ref<boolean>(false);
/** ตัวแปรข้อมูล */
@ -357,7 +358,7 @@ function onHistory(id: string) {
function getData() {
showLoader();
http
.get(config.API.dataUserSalary)
.get(config.API.dataUserSalaryByType(dataPerson.officerLink))
.then((res) => {
const data = res.data.result;
rows.value = data;
@ -374,7 +375,7 @@ function getData() {
function getHistory() {
showLoader();
http
.get(config.API.dataUserSalaryHistory(idByRow.value))
.get(config.API.dataUserSalaryHistoryByType(dataPerson.officerLink,idByRow.value))
.then((res) => {
const data = res.data.result;
rowsHistory.value = data;