ปรับ API ทะเบียนประวัติ (ใหม่)

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-05-13 18:06:06 +07:00
parent e100ac0ec3
commit f91f3d9b40
8 changed files with 645 additions and 598 deletions

View file

@ -148,7 +148,10 @@ async function fetchDataPerson(search: boolean = false) {
// check type person empType.value
http
.get(config.API.registryNew, { params: queryParams })
.get(
config.API.registryNew(empType.value !== "officer" ? "-employee" : ""),
{ params: queryParams }
)
.then((res) => {
maxPage.value = Math.ceil(res.data.result.total / formFilter.pageSize);
dataPersonMain.value = res.data.result.data;
@ -646,6 +649,7 @@ onMounted(async () => {
:fetchData="fetchDataPerson"
:fetchType="fetchType"
:total="total"
:empType="empType"
/>
</q-card-section>
</q-card>