Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m14s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m14s
This commit is contained in:
commit
26938fef30
2 changed files with 18 additions and 8 deletions
|
|
@ -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`,
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue