start commit for admin system

This commit is contained in:
Warunee Tamkoo 2024-05-29 17:58:57 +07:00
commit badb676529
300 changed files with 58634 additions and 0 deletions

View file

@ -0,0 +1,14 @@
/**
* API Structure + Org Chart
*/
import env from "../index"
const treeRoot = `${env.API_URI}/Organization/treeroot`
const structChart = `${env.API_URI}/Organization/struct-chart/`
const orgChart = `${env.API_URI}/Organization/org-chart/`
export default {
chartGetTreeRoot: `${treeRoot}`,
chartGetStructure: (id: string) => `${structChart}${id}`,
chartGetOrg: (id: string) => `${orgChart}${id}`
}

View file

@ -0,0 +1,92 @@
import env from "../index";
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`;
export default {
/** โครงสร้างอัตรากำลัง*/
activeOrganization: `${organization}/active`,
orgByid: (id: string) => `${organization}/${id}`,
createOrganization: `${organization}/draft`,
createOrgLevel: (type: string) => `${organization}/${type}`,
orgLevelByid: (type: string, id: string) => `${organization}/${type}/${id}`,
orgSetDateTime: (id: string) => `${organization}/set/publish/${id}`,
organizationHistoryNew: `${organization}/history`,
organizationHistoryPostNew: `${organization}/history/publish`,
/** position*/
orgPosPosition: `${orgPos}/position`,
orgPosPositionById: (id: string) => `${orgPos}/position/${id}`,
orgPosPositionExecutive : () => `${orgPos}/position/executive`,
orgPosExecutive: `${orgPos}/executive`,
orgPosType: `${orgPos}/type`,
orgPosTypeId: (id: string) => `${orgPos}/type/${id}`,
orgPosLevel: `${orgPos}/level`,
orgPosMaster: `${orgPos}/master`,
orgPosMasterById: (id: string) => `${orgPos}/master/${id}`,
orgPosMasterList: `${orgPos}/master/list`,
orgPosSort: `${orgPos}/sort`,
orgPosMove: `${orgPos}/move`,
organizationShortName: `${organization}/sort`,
organizationPublishGet: `${organization}/get/publish`,
orgPosDNA: `${orgPos}/dna`, //สืบทอดตำแหน่ง
orgPosExecutiveById: (id: string) => `${orgPos}/executive/${id}`,
orgPosHistory: (id: string) => `${orgPos}/history/${id}`,
orgSalaryPosition: `${orgPos}/position?keyword=&type=ALL`,
/**ครองตำแหน่ง */
orgSearchProfile: `${orgProfile}/search`,
orgProfile: `${orgPos}/profile`,
orgDeleteProfile: (id: string) => `${orgPos}/profile/delete/${id}`,
orgSummary: `${orgPos}/summary`,
/** report*/
orgReport: (report: string) => `${organization}/report/${report}`,
/** struct-chart*/
orgStructChart: (id: string, type: string) =>
`${organization}/struct-chart/${id}/${type}`,
// ค้นหาคนตามเงื่อนไข
orgSearchPersonal: () => `${organization}/profile/search-personal`,
/** บรรจุแต่งตั้ง*/
orgPosPlacement: `${orgPos}/placement/search`,
orgPosPlacemenTemp: `${orgPos}/placementemp/search`,
orgPosFind: `${organization}/find/node`,
orgProfileProbation: `${organization}/profile/probation`,
activeOrganizationRoot: `${organization}/active/root`,
activeOrganizationRootById: (id: string) =>
`${organization}/active/root/${id}`,
/** ข้อมูลตำแหน่งลูกจ้างประจำ*/
orgEmployeePos: `${orgEmployeePos}/position`,
orgEmployeePosById: (id: string) => `${orgEmployeePos}/position/${id}`,
orgEmployeeType: `${orgEmployeePos}/type`,
orgEmployeeTypeById: (id: string) => `${orgEmployeePos}/type/${id}`,
orgEmployeelevel: `${orgEmployeePos}/level`,
orgEmployeelevelById: (id: string) => `${orgEmployeePos}/level/${id}`,
/** อัตรากำลังลูกจ้างประจำ*/
orgSummaryEmp: `${orgEmployeePos}/summary`,
orgReportEmp: (report: string) => `${orgEmployeePos}/report/${report}`,
orgDeleteProfileEmp: (id: string) => `${orgEmployeePos}/profile/delete/${id}`,
orgPosMasterByIdEmp: (id: string) => `${orgEmployeePos}/master/${id}`,
orgPosMasterListEmp: `${orgEmployeePos}/master/list`,
orgPosMasterEmp: `${orgEmployeePos}/master`,
orgPosSortEmp: `${orgEmployeePos}/sort`,
orgPosPositionEmpById: (id: string) => `${orgEmployeePos}/position/${id}`,
orgPosMoveEmp: `${orgEmployeePos}/move`,
orgProfileEmp: `${orgEmployeePos}/profile`,
orgSearchProfileEmp: `${orgProfile}-employee/search`,
orgProfileById:(id:string,type:string)=>`${orgProfile}${type}/${id}`,
orgDeceasedProfile:`${orgPos}/profile/search`
};

View file

@ -0,0 +1,94 @@
/**
* api Tree
*
*/
import env from "../index";
//Dropdown เพิ่มโครงร้างหน่วยงาน
// const organizationAgency = `${env.API_URI_ORG_SERVICE}/organization-agency/`;
// const organizationGovernmentAgency = `${env.API_URI_ORG_SERVICE}/organization-government-agency/`;
// const organizationPath = `${env.API_URI}/Organization/tree`;
const organizationPath = `${env.API_URI_ORG_SERVICE}/Organization/`;
const postionMasterPath = `${env.API_URI_ORG_SERVICE}/PositionMaster`;
const organizationPosition = `${env.API_URI_ORG_SERVICE}/OrganizationPosition/`;
const organizationEmployee = `${env.API_URI_ORG_EMPLOYEE_SERVICE}/organization-employee/`;
const report = `${env.API_URI}/report/organization/`;
export default {
getOCType: `${report}oc-type`,
getReportAccount1: (id: string) => `${report}account1/${id}`,
getReportAccount2: (id: string) => `${report}account2/${id}`,
getReportAccount3: (id: string) => `${report}account3/${id}`,
/**api /
* @param organizationType
* @returns organizationId and organizationName
*/
listOrganizationAgency: (organizationType: string) =>
`${organizationPath}type/${organizationType}`,
listOrganizationHistoryAgency: (organizationType: string) =>
`${organizationPath}history/type/${organizationType}`,
/**api Tree
*
*/
// treeList: `${organizationPath}`,
getTreeRoot: `${organizationPath}treeroot`,
getDraftTreeRoot: `${organizationPath}history/treeroot`,
getTreeHistory: `${organizationPath}publish-history`,
getPublishFileHistory: `${organizationPath}publish-file`,
getTreeNode: (organizationId: string, keyId: string) =>
`${organizationPath}tree?organizationId=${organizationId}&keyId=${keyId}`,
getDraftTreeNode: (organizationId: string, keyId: string) =>
`${organizationPath}history/tree?organizationId=${organizationId}&keyId=${keyId}`,
addTreeDraft: `${organizationPosition}history`,
editTreeOrgDraft: (organizationId: string) =>
`${organizationPath}history/${organizationId}`,
getOrgDraft: (organizationId: string) =>
`${organizationPath}history/${organizationId}`,
// /api/v1/Organization/history?organizationPositionId=65ab2ddc-b9d2-4422-83d4-b90dd8191b6f
delTreeOrgDraft: (organizationId: string) =>
`${organizationPath}history?organizationPositionId=${organizationId}`,
getPostionMasterDraft: (showAll: boolean) =>
`${postionMasterPath}/history?showall=${showAll}`,
getPostionMaster: (showAll: boolean) =>
`${postionMasterPath}?showall=${showAll}`,
editTreePositionDraft: (organizationPositionId: string) =>
`${organizationPosition}history?organizationPositionId=${organizationPositionId}`,
// /api/v1/OrganizationPosition/history?organizationPositionId=15ec8c2b-796f-4fad-b731-667a232e723e
delTreePositionDraft: (organizationPositionId: string) =>
`${organizationPosition}history/${organizationPositionId}`,
//PUT /api/v1/OrganizationPosition/history/publish
publishOrgPoDraft: `${organizationPosition}history/publish`,
//PUT /api/v1/OrganizationPosition/history/sync
delTreeOrgPoDraft: `${organizationPosition}history/sync`,
isOrgPohasDraft: `${organizationPosition}history/has-draft`,
isOrghasDraft: `${organizationPath}history/has-draft`,
/**
* api
*/
getPositionMaster: `${postionMasterPath}/history`,
getPositionMasterId: (id: string) => `${postionMasterPath}/history/${id}`,
getPositionMasterPublish: `${postionMasterPath}/history/publish`,
getPositionMasterSync: `${postionMasterPath}/history/sync`,
getPositionMasterHistoryId: (id: string) =>
`${postionMasterPath}/history/publish/${id}`,
getPositionMasterPositionNumber: `${postionMasterPath}/position-number`,
getPositionMasterPositionNumberId: (id: string) =>
`${postionMasterPath}/position-number/${id}`,
getPositionNumberIdByOcId: (OcId: string) =>
`${postionMasterPath}/position-number/Oc/${OcId}`,
organizationEmployee: `${organizationEmployee}`,
organizationEmployeeId: (id: string) => `${organizationEmployee}${id}`,
organizationEmployeePositionId: (profileId: string) =>
`${organizationEmployee}position/${profileId}`,
organizationEmployeeSendOrder: `${organizationEmployee}report`,
};