Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m14s

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-12-22 16:32:39 +07:00
commit 26938fef30
2 changed files with 18 additions and 8 deletions

View file

@ -74,6 +74,8 @@ export default {
orgSearchPersonal: () => `${organization}/profile/search-personal`,
orgSearchPersonalByType: (type: string) =>
`${organization}/profile${type}/search-personal`,
orgSearchPersonalByTypeNoKeycloak: (type: string) =>
`${organization}/profile${type}/search-personal-no-keycloak`,
/** บรรจุแต่งตั้ง*/
orgPosPlacement: `${orgPos}/placement/search`,

View file

@ -140,19 +140,27 @@ async function searchInput() {
async function getSearch() {
showLoader();
// API
const employeeSuffix = employeeClass.value === "officer" ? "" : "-employee";
const apiMethod =
props.system === "SYS_DISCIPLINE_APPEAL"
? config.API.orgSearchPersonalByTypeNoKeycloak
: config.API.orgSearchPersonalByType;
const apiPath = apiMethod(employeeSuffix);
// query params
const queryParams = `?page=${pagination.value.page}&pageSize=${pagination.value.rowsPerPage}`;
// body
const body = {
fieldName: type.value,
keyword: search.value ? search.value.trim() : "",
system: props.system ?? undefined,
};
await http
.post(
config.API.orgSearchPersonalByType(
employeeClass.value == "officer" ? "" : "-employee"
) +
`?page=${pagination.value.page}&pageSize=${pagination.value.rowsPerPage}`,
body
)
.post(apiPath + queryParams, body)
.then((res) => {
const data = res.data.result.data;
totalList.value = Math.ceil(
@ -358,7 +366,7 @@ watch(
@update:pagination="updatePagination"
>
<template v-slot:pagination="scope">
งหมด {{ total }} รายการ
งหมด {{ total?.toLocaleString() }} รายการ
<q-pagination
v-model="pagination.page"
active-color="primary"