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

@ -5,11 +5,13 @@ import { ref, reactive, onMounted } from "vue";
import http from "@/plugins/http";
import config from "@/app.config";
import { useDataStore } from "@/stores/data";
import type { DutyFormType } from "@/modules/10_registry/interface/index/Main";
//history dialog
import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
const dataStore = useDataStore()
const idByRow = ref<string>("");
const rows = ref<DutyFormType[]>([]);
const filter = ref<string>("");
@ -216,7 +218,7 @@ function onHistory(id: string) {
function getData() {
showLoader();
http
.get(config.API.dataUserDuty)
.get(config.API.dataUserDutyByType(dataStore.officerLink))
.then((res) => {
const data = res.data.result;
rows.value = data;
@ -233,7 +235,7 @@ function getData() {
function getHistory() {
showLoader();
http
.get(config.API.dataUserDutyHistory(idByRow.value))
.get(config.API.dataUserDutyHistoryByType(dataStore.officerLink,idByRow.value))
.then((res) => {
const data = res.data.result;
rowsHistory.value = data;