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

@ -1,5 +1,6 @@
<script setup lang="ts">
import { useCounterMixin } from "@/stores/mixin";
import { useDataStore } from "@/stores/data";
import { useQuasar, type QTableProps } from "quasar";
import { ref, onMounted } from "vue";
@ -11,6 +12,7 @@ import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue";
const $q = useQuasar();
const mixin = useCounterMixin();
const dataStore = useDataStore();
const { showLoader, hideLoader, messageError, date2Thai } = mixin;
const rows = ref<ChangNameRows[]>([]);
@ -162,7 +164,7 @@ function onHistory(id: string) {
function getData() {
showLoader();
http
.get(config.API.dataUserChangeName)
.get(config.API.dataUserChangeNameByType(dataStore.officerLink))
.then((res) => {
const data = res.data.result;
rows.value = data;
@ -181,7 +183,7 @@ function getData() {
function getHistory() {
showLoader();
http
.get(config.API.dataUserChangeNameHistory + `/${idByrow.value}`)
.get(config.API.dataUserChangeNameHistoryByType(dataStore.officerLink) + `/${idByrow.value}`)
.then((res) => {
const data = res.data.result;
rowsHistory.value = data;