Merge branch 'nice' into develop

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-02-20 15:22:09 +07:00
commit b6b3fec14b
9 changed files with 52 additions and 36 deletions

View file

@ -4,6 +4,7 @@ const organization = `${env.API_URI}/org`;
const orgPos = `${env.API_URI}/org/pos`;
const orgProfile = `${env.API_URI}/org/profile`;
const orgEmployeePos = `${env.API_URI}/org/employee/pos`;
const orgEmployeePosTemp = `${env.API_URI}/org/employee-temp/pos`;
const orgAct = `${env.API_URI}/org/act`;
const orgPosAct = `${env.API_URI}/org/pos/act`;
const workflow = `${env.API_URI}/org/workflow`;
@ -104,12 +105,36 @@ export default {
orgProfileEmp: `${orgEmployeePos}/profile`,
orgSearchProfileEmp: `${orgProfile}-employee/search`,
/** ข้อมูลตำแหน่งลูกจ้างชั่วคราว*/
orgEmployeePosTemp: `${orgEmployeePosTemp}/position`,
orgEmployeePosByIdTemp: (id: string) =>
`${orgEmployeePosTemp}/position/${id}`,
orgEmployeeTypeTemp: `${orgEmployeePosTemp}/type`,
orgEmployeeTypeByIdTemp: (id: string) => `${orgEmployeePos}/type/${id}`,
orgEmployeelevelTemp: `${orgEmployeePosTemp}/level`,
orgEmployeelevelByIdTemp: (id: string) => `${orgEmployeePosTemp}/level/${id}`,
/** อัตรากำลังลูกจ้างชัวคราว*/
orgSummaryEmpTemp: `${orgEmployeePosTemp}/summary`,
orgReportEmpTemp: (report: string) =>
`${orgEmployeePosTemp}/report/${report}`,
orgDeleteProfileEmpTemp: (id: string) =>
`${orgEmployeePosTemp}/profile/delete/${id}`,
orgPosMasterByIdEmpTemp: (id: string) => `${orgEmployeePosTemp}/master/${id}`,
orgPosMasterListEmpTemp: `${orgEmployeePosTemp}/master/list`,
orgPosMasterEmpTemp: `${orgEmployeePosTemp}/master`,
orgPosSortEmpTemp: `${orgEmployeePosTemp}/sort`,
orgPosPositionEmpByIdTemp: (id: string) =>
`${orgEmployeePosTemp}/position/${id}`,
orgPosMoveEmpTemp: `${orgEmployeePosTemp}/move`,
orgProfileEmpTemp: `${orgEmployeePosTemp}/profile`,
orgSearchProfileEmpTemp: `${orgProfile}-employee-temp/search`,
orgProfileById: (id: string, type: string) =>
`${orgProfile}${type}/admin/${id}`,
orgDeceasedProfile: `${orgPos}/profile/search`,
//
orgCheckAvatar: (id: string) => `${orgProfile}/avatar/profileId-admin/${id}`,
orgCheckAvatarAdmin: (id: string) =>
`${orgProfile}/avatar/profileid-admin/${id}`,
@ -125,22 +150,16 @@ export default {
orgAct,
orgPosAct,
/**
*
*/
/** รายการคำร้องขอแก้ไขทะเบียนประวัติ*/
requestEdit: `${orgProfile}/edit/`,
requestEditByType: (type: string) => `${orgProfile}${type}/edit/`,
/**
* IDP
*/
/** ข้อมูลการพัฒนารายบุคคล IDP*/
requestDevelopmentEdit: `${orgProfile}/development-request/`,
requestDevelopmentEditByType: (type: string) =>
`${orgProfile}${type}/development-request/`,
/**
*
*/
/** รายการเมนู*/
orgPermissions: `${organization}/permission/menu`,
orgPermissionsSys: `${organization}/permission`,
@ -150,9 +169,7 @@ export default {
orgPosReport: `${orgPos}/report/draft`,
orgPosReportAct: `${orgPos}/act/report/draft`,
/**
* workflow
*/
/** workflow*/
workflow: `${workflow}/`,
workflowKeycloakSystem: (type: string) =>
`${workflow}/keycloak/isofficer/${type}`,

View file

@ -64,8 +64,8 @@ async function onSubmit() {
showLoader();
try {
const url = !isEditCheck.value
? config.API.orgEmployeePos
: config.API.orgEmployeePosById(props?.data?.id);
? config.API.orgEmployeePosTemp
: config.API.orgEmployeePosByIdTemp(props?.data?.id);
await http[!isEditCheck.value ? "post" : "put"](url, body);
await props.emitSearch?.(formDataPos.posName, "positionName");
await success($q, "บันทีกข้อมูลสำเร็จ");
@ -95,7 +95,7 @@ function close() {
async function fetchType() {
showLoader();
await http
.get(config.API.orgEmployeeType)
.get(config.API.orgEmployeeTypeTemp)
.then((res) => {
posTypeMain.value = res.data.result;
posTypeOp.value = res.data.result.map((e: OptionType) => ({

View file

@ -142,7 +142,7 @@ const visibleColumns = ref<string[]>([
async function fetchPosition(id: string) {
showLoader();
await http
.get(config.API.orgPosPositionEmpById(id))
.get(config.API.orgPosPositionEmpByIdTemp(id))
.then((res) => {
const data = res.data.result;
@ -193,8 +193,8 @@ function onSubmit() {
try {
const url =
props.actionType === "ADD"
? config.API.orgPosMasterEmp
: config.API.orgPosMasterByIdEmp(props.rowId);
? config.API.orgPosMasterEmpTemp
: config.API.orgPosMasterByIdEmpTemp(props.rowId);
await http[props.actionType === "ADD" ? "post" : "put"](url, body);
await props.getSummary?.();
await props.fetchDataTable?.(
@ -223,7 +223,7 @@ async function searchInput() {
showLoader();
await http
.get(
config.API.orgEmployeePos +
config.API.orgEmployeePosTemp +
`?keyword=${search.value.trim()}&type=${type.value}`
)
.then((res) => {
@ -273,7 +273,7 @@ function deletePos(id: string) {
dialogRemove($q, () => {
showLoader();
http
.delete(config.API.orgEmployeePosById(id))
.delete(config.API.orgEmployeePosByIdTemp(id))
.then(async () => {
await searchInput();
await success($q, "ลบข้อมูลสำเร็จ");

View file

@ -123,7 +123,7 @@ function onClickMovePos() {
};
showLoader();
await http
.post(config.API.orgPosMoveEmp, body)
.post(config.API.orgPosMoveEmpTemp, body)
.then(async () => {
await props.fetchDataTree?.(store.activeId);
await success($q, "ย้ายตำแหน่งสำเร็จ");

View file

@ -207,7 +207,7 @@ function close() {
async function fetchType() {
showLoader();
await http
.get(config.API.orgEmployeeType)
.get(config.API.orgEmployeeTypeTemp)
.then((res) => {
dataLevel.value = res.data.result;
typeOpsMain.value = res.data.result.map((e: OptionType) => ({
@ -276,7 +276,7 @@ function onSubmit() {
};
showLoader();
http
.post(config.API.orgProfileEmp, body)
.post(config.API.orgProfileEmpTemp, body)
.then(async () => {
await props.fetchDataTable?.(store.treeId, store.level, false);
await props.getSummary();
@ -315,7 +315,7 @@ function searchData() {
keyword: formData.personal, //
};
http
.post(config.API.orgSearchProfileEmp, reqBody)
.post(config.API.orgSearchProfileEmpTemp, reqBody)
.then((res) => {
totalPage.value = Math.ceil(res.data.result.total / pageSize.value);
const list = res.data.result.data.map((e: SelectPerson) => ({
@ -621,7 +621,6 @@ watch(
map-options
:options="columnsResult"
option-value="name"
style="min-width: 140px"
class="col-xs-12 col-sm-3 col-md-2"
/>

View file

@ -65,7 +65,7 @@ function save() {
const dataId = data.map((item: DataSortPos) => item.id);
showLoader();
http
.post(config.API.orgPosSortEmp, {
.post(config.API.orgPosSortEmpTemp, {
id: store.treeId,
type: store.level,
sortId: dataId,
@ -90,7 +90,7 @@ function save() {
function getData() {
showLoader();
http
.post(config.API.orgPosMasterListEmp, {
.post(config.API.orgPosMasterListEmpTemp, {
id: store.treeId,
type: store.level,
isAll: false,

View file

@ -107,7 +107,7 @@ const listMenu = ref<ListMenu[]>([
const documentItems = ref<DataDocumentList[]>([
{
name: "รายงานสรุปจำนวนกรอบอัตรากำลังของลูกจ้างประจำกรุงเทพมหานคร",
val: "report4-employee",
val: "report4-employee-temp",
},
]);
@ -198,7 +198,7 @@ function onClickDelete(id: string) {
dialogRemove($q, async () => {
showLoader();
await http
.delete(config.API.orgPosMasterByIdEmp(id))
.delete(config.API.orgPosMasterByIdEmpTemp(id))
.then(async () => {
await props.fetchDataTable?.(
reqMaster.value.id,
@ -271,7 +271,7 @@ function removePerson(id: string) {
async () => {
showLoader();
await http
.post(config.API.orgDeleteProfileEmp(id))
.post(config.API.orgDeleteProfileEmpTemp(id))
.then(async () => {
await props.fetchDataTable?.(
reqMaster.value.id,
@ -307,7 +307,7 @@ function onClickInherit(id: string) {
function getSummary() {
showLoader();
http
.post(config.API.orgSummaryEmp, {
.post(config.API.orgSummaryEmpTemp, {
id: reqMaster.value.id, //*Id node
type: reqMaster.value.type, //*node
isNode: reqMaster.value.isAll, //* node

View file

@ -54,7 +54,7 @@ function updateSelected(data: DataTree) {
props.fetchDataTable?.(data.orgTreeId, data.orgLevel, true);
/** ดึงข้อมูลสถิติจำนวนด้านบน*/
http
.post(config.API.orgSummaryEmp, {
.post(config.API.orgSummaryEmpTemp, {
id: data.orgTreeId, //*Id node
type: data.orgLevel, //*node
isNode: false, //* node

View file

@ -97,7 +97,7 @@ function fetchDataTable(id: string, level: number, action: boolean) {
}
posMaster.value = [];
http
.post(config.API.orgPosMasterListEmp, reqMaster)
.post(config.API.orgPosMasterListEmpTemp, reqMaster)
.then(async (res) => {
const dataMain: PosMaster[] = [];
totalPage.value = Math.ceil(res.data.result.total / reqMaster.pageSize);
@ -129,7 +129,7 @@ function fetchDataTable(id: string, level: number, action: boolean) {
*/
function getSummary() {
http
.post(config.API.orgSummaryEmp, {
.post(config.API.orgSummaryEmpTemp, {
id: reqMaster.id, //*Id node
type: reqMaster.type, //*node
isNode: reqMaster.isAll, //* node