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,16 @@
/**
* API Structure + Org Chart
*/
import env from "../index";
const message = `${env.API_URI}/message`;
const reply = `${env.API_URI}/placement/noti`;
export default {
msgNotificate: `${message}/my-notifications`,
msgInbox: `${message}/my-inboxes`,
msgId: (id: string) => `${message}/my-notifications/${id}`,
msgNoread: () => `${message}/my-notifications/noread`,
msgInboxDelete: (id: string) => `${message}/my-inboxes/${id}`,
replyMessage: (id: string) => `${reply}/${id}`,
};

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`,
};

23
src/api/file/api.file.ts Normal file
View file

@ -0,0 +1,23 @@
import env from "../index";
const url = `${env.API_URI}/salary`;
export default {
subFile: (name: string, group: string, id: string, subId: string) =>
`${url}/sub-file/${name}/${group}/${id}/${subId}`,
subFileByFileName: (
name: string,
group: string,
id: string,
subId: string,
fileName: string
) => `${url}/sub-file/${name}/${group}/${id}/${subId}/${fileName}`,
file: (name: string, group: string, id: string) =>
`${url}/file/${name}/${group}/${id}`,
fileByPath: (name: string) =>
`${url}/file/${name}`,
fileByFile: (name: string, group: string, id: string, fileName: string) =>
`${url}/file/${name}/${group}/${id}/${fileName}`,
};

70
src/api/index.ts Normal file
View file

@ -0,0 +1,70 @@
/**config api */
import { ref } from "vue";
const env = ref<string>(process.env.NODE_ENV || "development");
export const apiUrlConfigPublish = import.meta.env.VITE_API_PUBLISH_URL;
export const apiUrlConfigReport = import.meta.env.VITE_API_REPORT_URL;
// if (process.env.VUE_APP_TEST) {
// env = "test";
// }
const config = ref<any>({
development: {
API_URI: "https://bma-ehr.frappet.synology.me/api/v1",
API_URI_ORG_SERVICE: "https://bma-ehr.frappet.synology.me/api/v1", //ใช้ชั่วคราว
API_URI_ORG_EMPLOYEE_SERVICE: "https://bma-ehr.frappet.synology.me/api/v1", //ใช้ชั่วคราว
API_URI_PROFILE_SERVICE: "https://bma-ehr.frappet.synology.me/api/v1", //ใช้ชั่วคราว
API_REPORT_URI: "https://bma-ehr.frappet.synology.me/api/v1",
MEET_URI: "meet.frappet.com",
API_REPORT2_URI: "https://bma-ehr.frappet.synology.me/api/v2",
API_REPORT_TEMPLATE_URI:
"https://report-server.frappet.synology.me/api/v1/report-template",
},
test: {
API_URI: "http://localhost:5010/api/v1",
API_CANDIDATE_URI: "https://localhost:7007/api/v1",
API_REPORT_URI: "https://localhost:7007/api/v1",
MEET_URI: "meet.frappet.com",
},
production: {
// API_URI: "https://localhost:5010",
API_URI: `${window.location.protocol}//${window.location.host}/api/v1`,
API_URI_ORG_SERVICE: `${window.location.protocol}//${window.location.host}/api/v1`, //ใช้ชั่วคราว
API_URI_ORG_EMPLOYEE_SERVICE: `${window.location.protocol}//${window.location.host}/api/v1`, //ใช้ชั่วคราว
API_URI_PROFILE_SERVICE: `${window.location.protocol}//${window.location.host}/api/v1`,
API_REPORT_URI: `${window.location.protocol}//${window.location.host}/api/v1`,
MEET_URI: "meet.frappet.com",
API_REPORT2_URI: `${window.location.protocol}//${window.location.host}/api/v2`,
API_REPORT_TEMPLATE_URI: apiUrlConfigReport,
},
});
const API_URI = ref<string>(config.value[env.value].API_URI);
const API_REPORT_URI = ref<string>(config.value[env.value].API_REPORT_URI);
const API_URI_ORG_SERVICE = ref<string>(
config.value[env.value].API_URI_ORG_SERVICE
);
const API_URI_ORG_EMPLOYEE_SERVICE = ref<string>(
config.value[env.value].API_URI_ORG_EMPLOYEE_SERVICE
);
const MEET_URI = ref<string>(config.value[env.value].MEET_URI);
const API_URI_PROFILE_SERVICE = ref<string>(
config.value[env.value].API_URI_PROFILE_SERVICE
);
const API_REPORT2_URI = ref<string>(config.value[env.value].API_REPORT2_URI);
const API_REPORT_TEMPLATE_URI = ref<string>(
config.value[env.value].API_REPORT_TEMPLATE_URI
);
export default {
env: env.value,
config: config.value,
API_URI: API_URI.value,
API_REPORT_URI: API_REPORT_URI.value,
API_URI_ORG_SERVICE: API_URI_ORG_SERVICE.value,
API_URI_ORG_EMPLOYEE_SERVICE: API_URI_ORG_EMPLOYEE_SERVICE.value,
API_URI_PROFILE_SERVICE: API_URI_PROFILE_SERVICE.value,
MEET_URI: MEET_URI.value,
API_REPORT2_URI: API_REPORT2_URI.value,
API_REPORT_TEMPLATE_URI: API_REPORT_TEMPLATE_URI.value,
};

View file

@ -0,0 +1,23 @@
/**
* api
* เมนูย่อย: ปฏิทินวันหยุด
*/
import env from "../index";
const holiday = `${env.API_URI}/metadata/holiday/`;
export default {
/**
* api
*/
listHolidayHistoryAdd: (category: string) =>
`${holiday}range/add/${category}`,
listHolidayHistoryEdit: (category: string) =>
`${holiday}range/edit/${category}`,
listHolidayHistoryDelete: (category: string) =>
`${holiday}range/delete/${category}`,
listHolidayHistoryYear: (year: number) => `${holiday}${year}`,
listHolidayHistoryYearMonth: (year: number, month: number) =>
`${holiday}${year}/${month}`,
listHolidayCopy: `${holiday}copy`,
summaryHolidayHistoryYear: (year: number) => `${holiday}summary/${year}`,
};

View file

@ -0,0 +1,48 @@
/**
* api
* เมนูย่อย: ข้อมูลเครื่องราชอิสริยาภรณ์
*/
import env from "../index";
const insignia = `${env.API_URI}/metadata/insignia/`;
const insigniaType = `${env.API_URI}/metadata/insignia-type/`;
const insigniaOrg = `${env.API_URI}/org/insignia/insignia/`;
const insigniaTypeOrg = `${env.API_URI}/org/insignia/insignia-type/`;
export default {
/**
* api
*/
insignia,
listInsigniaHistory: `${insignia}history`,
listInsigniaHistoryId: (id: string) => `${insignia}history/${id}`,
listInsigniaPublished: `${insignia}history/published`,
listInsigniaPublishedHistory: `${insignia}history/published-history`,
/**
* api
*/
insigniaType,
listInsigniaTypeHistory: `${insigniaType}history`,
listInsigniaTypeHistoryId: (id: string) => `${insigniaType}history/${id}`,
listInsigniaTypePublished: `${insigniaType}history/published`,
listInsigniaTypePublishedHistory: `${insigniaType}history/published-history`,
/**
* api
*/
// listInsigniaHistory: `${insignia}history`,
// listInsigniaHistoryId: (id: string) => `${insignia}history/${id}`,
// listInsigniaPublished: `${insignia}history/published`,
// listInsigniaPublishedHistory: `${insignia}history/published-history`,
insigniaTypeNew: `${insigniaType}draft`,
insigniaTypeNewId: (id: string) => `${insigniaType}${id}`,
insigniaNewId: (id: string) => `${insignia}${id}`,
insigniaSort: (id: string) => `${insignia}sort/${id}`,
insigniaOrg,
insigniaTypeOrg,
insigniaTypeNewOrg: `${insigniaOrg}`,
insigniaTypeNewIdOrg: (id: string) => `${insigniaTypeOrg}${id}`,
insigniaNewIdOrg: (id: string) => `${insigniaOrg}${id}`,
insigniaSortOrg: (id: string) => `${insigniaOrg}sort/${id}`,
};

View file

@ -0,0 +1,133 @@
/**
* api
* เมนูย่อย: ข้อมูลโครงสร้างหน่วยงาน
*/
import env from "../index";
const organizationMain = `${env.API_URI}/metadata/main/`;
const organization = `${env.API_URI}/metadata/organization/`;
const organizationOrganization = `${env.API_URI}/metadata/organization-organization/`;
const organizationShortName = `${env.API_URI}/metadata/organization-shortname/`;
const organizationCode = `${env.API_URI_ORG_SERVICE}/PositionMaster/`;
const organizationType = `${env.API_URI}/metadata/organization-type/`;
const organizationLevel = `${env.API_URI}/metadata/organization-level/`;
const organizationStatus = `${env.API_URI}/metadata/organization-status/`;
const organizationAgency = `${env.API_URI}/metadata/organization-agency/`;
const organizationGovernmentAgency = `${env.API_URI}/metadata/organization-government-agency/`;
const organizationTelExternal = `${env.API_URI}/metadata/organization-tel-external/`;
const organizationTelInternal = `${env.API_URI}/metadata/organization-tel-internal/`;
const organizationFax = `${env.API_URI}/metadata/organization-fax/`;
const dashbord = `${env.API_URI}/metadata/dashbord/`;
export default {
/**
* api tab tab
*/
organizationMain: `${organizationMain}organization`,
organization,
countDashbordSubHistory: (type: number) => `${dashbord}${type}`,
countDashbordHistory: `${dashbord}`,
/**
* api
*/
organizationOrganization,
listOrganizationOrganizationHistory: `${organizationOrganization}history`,
listOrganizationOrganizationHistoryId: (id: string) =>
`${organizationOrganization}history/${id}`,
listOrganizationOrganizationPublished: `${organizationOrganization}history/published`,
listOrganizationOrganizationPublishedHistory: `${organizationOrganization}history/published-history`,
/**
* api
*/
organizationShortName,
listOrganizationShortNameHistory: `${organizationShortName}history`,
listOrganizationShortNameHistoryId: (id: string) =>
`${organizationShortName}history/${id}`,
listOrganizationShortNamePublished: `${organizationShortName}history/published`,
listOrganizationShortNamePublishedHistory: `${organizationShortName}history/published-history`,
organizationCode: `${organizationCode}organization-code`,
organizationGovernmentCode: (id: string) =>
`${organizationCode}government/${id}`,
organizationAgencyCode: (id: string) => `${organizationCode}agency/${id}`,
/**
* api
*/
organizationType,
listOrganizationTypeHistory: `${organizationType}history`,
listOrganizationTypeHistoryId: (id: string) =>
`${organizationType}history/${id}`,
listOrganizationTypePublished: `${organizationType}history/published`,
listOrganizationTypePublishedHistory: `${organizationType}history/published-history`,
/**
* api
*/
organizationLevel,
listOrganizationLevelHistory: `${organizationLevel}history`,
listOrganizationLevelHistoryId: (id: string) =>
`${organizationLevel}history/${id}`,
listOrganizationLevelPublished: `${organizationLevel}history/published`,
listOrganizationLevelPublishedHistory: `${organizationLevel}history/published-history`,
/**
* api
*/
organizationStatus,
listOrganizationStatusHistory: `${organizationStatus}history`,
listOrganizationStatusHistoryId: (id: string) =>
`${organizationStatus}history/${id}`,
listOrganizationStatusPublished: `${organizationStatus}history/published`,
listOrganizationStatusPublishedHistory: `${organizationStatus}history/published-history`,
/**
* api
*/
organizationAgency,
listOrganizationAgencyHistory: `${organizationAgency}history`,
listOrganizationAgencyHistoryId: (id: string) =>
`${organizationAgency}history/${id}`,
listOrganizationAgencyPublished: `${organizationAgency}history/published`,
listOrganizationAgencyPublishedHistory: `${organizationAgency}history/published-history`,
/**
* api
*/
organizationGovernmentAgency,
listOrganizationGovernmentAgencyHistory: `${organizationGovernmentAgency}history`,
listOrganizationGovernmentAgencyHistoryId: (id: string) =>
`${organizationGovernmentAgency}history/${id}`,
listOrganizationGovernmentAgencyPublished: `${organizationGovernmentAgency}history/published`,
listOrganizationGovernmentAgencyPublishedHistory: `${organizationGovernmentAgency}history/published-history`,
/**
* api
*/
organizationTelExternal,
listOrganizationTelExternalHistory: `${organizationTelExternal}history`,
listOrganizationTelExternalHistoryId: (id: string) =>
`${organizationTelExternal}history/${id}`,
listOrganizationTelExternalPublished: `${organizationTelExternal}history/published`,
listOrganizationTelExternalPublishedHistory: `${organizationTelExternal}history/published-history`,
/**
* api
*/
organizationTelInternal,
listOrganizationTelInternalHistory: `${organizationTelInternal}history`,
listOrganizationTelInternalHistoryId: (id: string) =>
`${organizationTelInternal}history/${id}`,
listOrganizationTelInternalPublished: `${organizationTelInternal}history/published`,
listOrganizationTelInternalPublishedHistory: `${organizationTelInternal}history/published-history`,
/**
* api
*/
organizationFax,
listOrganizationFaxHistory: `${organizationFax}history`,
listOrganizationFaxHistoryId: (id: string) =>
`${organizationFax}history/${id}`,
listOrganizationFaxPublished: `${organizationFax}history/published`,
listOrganizationFaxPublishedHistory: `${organizationFax}history/published-history`,
};

View file

@ -0,0 +1,140 @@
/**
* api
* เมนูย่อย: ข้อมูลเกี่ยวกับบุคคล
*/
import env from "../index";
const person = `${env.API_URI}/metadata/main/`;
const province = `${env.API_URI}/metadata/province/`;
const district = `${env.API_URI}/metadata/district/`;
const subDistrict = `${env.API_URI}/metadata/sub-district/`;
const prefix = `${env.API_URI}/metadata/prefix/`;
const bloodGroup = `${env.API_URI}/metadata/blood-group/`;
const educationLevel = `${env.API_URI}/metadata/education-level/`;
const gender = `${env.API_URI}/metadata/gender/`;
const relationship = `${env.API_URI}/metadata/relationship/`;
const religion = `${env.API_URI}/metadata/religion/`;
const orgRelationship = `${env.API_URI}/org/metadata/relationship/`;
const orgPrefix = `${env.API_URI}/org/metadata/prefix/`;
const orgRank = `${env.API_URI}/org/metadata/rank/`;
const orgBloodGroup = `${env.API_URI}/org/metadata/bloodGroup/`;
const orgGender = `${env.API_URI}/org/metadata/gender/`;
const orgReligion = `${env.API_URI}/org/metadata/religion/`;
const orgEducationLevel = `${env.API_URI}/org/metadata/educationLevel/`;
const orgProvince = `${env.API_URI}/org/metadata/province`;
const orgDistrict = `${env.API_URI}/org/metadata/district`;
const orgSubDistrict = `${env.API_URI}/org/metadata/subDistrict`;
export default {
person: `${person}person`,
/**
* api
*/
province,
listProvinceHistory: `${province}history`,
listProvinceHistoryId: (id: string) => `${province}history/${id}`,
listProvincePublished: `${province}history/published`,
listProvincePublishedHistory: `${province}history/published-history`,
/**
* api
*/
listDistrict: (id: string) => `${district}${id}`,
listDistrictHistory: `${district}history`,
listDistrictHistoryId: (id: string | string[]) => `${district}history/${id}`,
listDistrictPublishedId: (id: string) => `${district}history/published/${id}`,
listDistrictPublishedHistory: (id: string | string[]) =>
`${district}history/published-history/${id}`,
/**
* api
*/
listSubDistrict: (id: string) => `${subDistrict}${id}`,
listSubDistrictHistory: `${subDistrict}history`,
listSubDistrictHistoryProvinceId: (
provinceId: string | string[],
district: string | string[]
) => `${subDistrict}history/${provinceId}/${district}`,
listSubDistrictHistoryId: (id: string | string[]) =>
`${subDistrict}history/${id}`,
listSubDistrictPublishedId: (id: string) =>
`${subDistrict}history/published/${id}`,
listSubDistrictPublishedHistory: (id: string | string[]) =>
`${subDistrict}history/published-history/${id}`,
/**
* api
*/
prefix,
listPrefixHistory: `${prefix}history`,
listPrefixHistoryId: (id: string) => `${prefix}history/${id}`,
listPrefixPublished: `${prefix}history/published`,
listPrefixPublishedHistory: `${prefix}history/published-history`,
/**
* api
*/
gender,
listGenderHistory: `${gender}history`,
listGenderHistoryId: (id: string) => `${gender}history/${id}`,
listGenderPublished: `${gender}history/published`,
listGenderPublishedHistory: `${gender}history/published-history`,
/**
* api
*/
relationship,
listRelationshipHistory: `${relationship}history`,
listRelationshipHistoryId: (id: string) => `${relationship}history/${id}`,
listRelationshipPublished: `${relationship}history/published`,
listRelationshipPublishedHistory: `${relationship}history/published-history`,
/**
* api
*/
bloodGroup,
listBloodGroupHistory: `${bloodGroup}history`,
listBloodGroupHistoryId: (id: string) => `${bloodGroup}history/${id}`,
listBloodGroupPublished: `${bloodGroup}history/published`,
listBloodGroupPublishedHistory: `${bloodGroup}history/published-history`,
/**
* api
*/
religion,
listReligionHistory: `${religion}history`,
listReligionHistoryId: (id: string) => `${religion}history/${id}`,
listReligionPublished: `${religion}history/published`,
listReligionPublishedHistory: `${religion}history/published-history`,
/**
* api
*/
educationLevel,
listEducationLevelHistory: `${educationLevel}history`,
listEducationLevelHistoryId: (id: string) => `${educationLevel}history/${id}`,
listEducationLevelPublished: `${educationLevel}history/published`,
listEducationLevelPublishedHistory: `${educationLevel}history/published-history`,
// API ใหม่
orgRelationship,
orgRelationshipId: (id: string) => `${orgRelationship}${id}`,
orgPrefix,
orgPrefixId: (id: string) => `${orgPrefix}${id}`,
orgRank,
orgRankId: (id: string) => `${orgRank}${id}`,
orgBloodGroup,
orgBloodGroupId: (id: string) => `${orgBloodGroup}${id}`,
orgGender,
orgGenderId: (id: string) => `${orgGender}${id}`,
orgReligion,
orgReligionId: (id: string) => `${orgReligion}${id}`,
orgEducationLevel,
orgEducationLevelId: (id: string) => `${orgEducationLevel}${id}`,
orgProvince,
orgDistrict,
orgSubDistrict,
};

View file

@ -0,0 +1,105 @@
/**
* api
* เมนูย่อย: ข้อมูลตำแหน่งของข้าราชการกรุงเทพมหานคร
*/
import env from "../index";
const position = `${env.API_URI}/metadata/main/`;
const positionExecutiveSide = `${env.API_URI}/metadata/position-executive-side/`;
const positionLevel = `${env.API_URI}/metadata/position-level/`;
const positionPath = `${env.API_URI}/metadata/position-path/`;
const positionSide = `${env.API_URI}/metadata/position-path-side/`;
const positionType = `${env.API_URI}/metadata/position-type/`;
const positionStatus = `${env.API_URI}/metadata/position-status/`;
const positionLine = `${env.API_URI}/metadata/position-line/`;
const positionExecutive = `${env.API_URI}/metadata/position-executive/`;
const orgPosType = `${env.API_URI}/org/pos/type/`;
const orgPosLevel = `${env.API_URI}/org/pos/level/`;
export default {
position: `${position}position`,
/**
* api
*/
positionExecutiveSide,
listPositionExecutiveSideHistory: `${positionExecutiveSide}history`,
listPositionExecutiveSideHistoryId: (id: string) =>
`${positionExecutiveSide}history/${id}`,
listPositionExecutiveSidePublished: `${positionExecutiveSide}history/published`,
listPositionExecutiveSidePublishedHistory: `${positionExecutiveSide}history/published-history`,
/**
* api
*/
// listPositionHistory: `${position}history`,
// listPositionHistoryId: (id: string) => `${position}history/${id}`,
// listPositionPublished: `${position}history/published`,
/**
* api
*/
positionLevel,
listPositionLevelHistory: `${positionLevel}history`,
listPositionLevelHistoryId: (id: string) => `${positionLevel}history/${id}`,
listPositionLevelPublished: `${positionLevel}history/published`,
listPositionLevelPublishedHistory: `${positionLevel}history/published-history`,
/**
* api
*/
positionPath,
listPositionPathHistory: `${positionPath}history`,
listPositionPathHistoryId: (id: string) => `${positionPath}history/${id}`,
listPositionPathPublished: `${positionPath}history/published`,
listPositionPathPublishedHistory: `${positionPath}history/published-history`,
/**
* api /
*/
positionSide,
listPositionSideHistory: `${positionSide}history`,
listPositionSideHistoryId: (id: string) => `${positionSide}history/${id}`,
listPositionSidePublished: `${positionSide}history/published`,
listPositionSidePublishedHistory: `${positionSide}history/published-history`,
/**
* api
*/
positionType,
listPositionTypeHistory: `${positionType}history`,
listPositionTypeHistoryId: (id: string) => `${positionType}history/${id}`,
listPositionTypePublished: `${positionType}history/published`,
listPositionTypePublishedHistory: `${positionType}history/published-history`,
/**
* api
*/
positionStatus,
listPositionStatusHistory: `${positionStatus}history`,
listPositionStatusHistoryId: (id: string) => `${positionStatus}history/${id}`,
listPositionStatusPublished: `${positionStatus}history/published`,
listPositionStatusPublishedHistory: `${positionStatus}history/published-history`,
/**
* api
*/
positionLine,
listPositionLineHistory: `${positionLine}history`,
listPositionLineHistoryId: (id: string) => `${positionLine}history/${id}`,
listPositionLinePublished: `${positionLine}history/published`,
listPositionLinePublishedHistory: `${positionLine}history/published-history`,
/**
* api
*/
positionExecutive,
listPositionExecutiveHistory: `${positionExecutive}history`,
listPositionExecutiveHistoryId: (id: string) =>
`${positionExecutive}history/${id}`,
listPositionExecutivePublished: `${positionExecutive}history/published`,
listPositionExecutivePublishedHistory: `${positionExecutive}history/published-history`,
orgPosType,
orgPosTypeId: (id: string) => `${orgPosType}${id}`,
orgPosLevel,
orgPosLevelId: (id: string) => `${orgPosLevel}${id}`,
};

View file

@ -0,0 +1,75 @@
/**
* api
* เมนูย่อย: ข้อมูลตำแหน่งของลูกจ้างกรุงเทพมหานคร
*/
import env from "../index";
const positionEmployee = `${env.API_URI}/metadata/main/`;
const positionEmployeePosition = `${env.API_URI}/metadata/position-employee-position/`;
const positionEmployeePositionSide = `${env.API_URI}/metadata/position-employee-position-side/`;
const positionEmployeeGroup = `${env.API_URI}/metadata/position-employee-group/`;
const positionEmployeeLine = `${env.API_URI}/metadata/position-employee-line/`;
const positionEmployeeLevel = `${env.API_URI}/metadata/position-employee-level/`;
const positionEmployeeStatus = `${env.API_URI}/metadata/position-employee-status/`;
export default {
positionEmployeeStatus: `${positionEmployeeStatus}`,
positionEmployee: `${positionEmployee}positionEmployee`,
/**
* api
*/
positionEmployeePosition,
listPositionEmployeePositionHistory: `${positionEmployeePosition}history`,
listPositionEmployeePositionHistoryId: (id: string) =>
`${positionEmployeePosition}history/${id}`,
listPositionEmployeePositionPublished: `${positionEmployeePosition}history/published`,
listPositionEmployeePositionPublishedHistory: `${positionEmployeePosition}history/published-history`,
/**
* api
*/
positionEmployeePositionSide,
listPositionEmployeePositionSideHistory: `${positionEmployeePositionSide}history`,
listPositionEmployeePositionSideHistoryId: (id: string) =>
`${positionEmployeePositionSide}history/${id}`,
listPositionEmployeePositionSidePublished: `${positionEmployeePositionSide}history/published`,
listPositionEmployeePositionSidePublishedHistory: `${positionEmployeePositionSide}history/published-history`,
/**
* api
*/
positionEmployeeGroup,
listPositionEmployeeGroupHistory: `${positionEmployeeGroup}history`,
listPositionEmployeeGroupHistoryId: (id: string) =>
`${positionEmployeeGroup}history/${id}`,
listPositionEmployeeGroupPublished: `${positionEmployeeGroup}history/published`,
listPositionEmployeeGroupPublishedHistory: `${positionEmployeeGroup}history/published-history`,
/**
* api
*/
positionEmployeeLine,
listPositionEmployeeLineHistory: `${positionEmployeeLine}history`,
listPositionEmployeeLineHistoryId: (id: string) =>
`${positionEmployeeLine}history/${id}`,
listPositionEmployeeLinePublished: `${positionEmployeeLine}history/published`,
listPositionEmployeeLinePublishedHistory: `${positionEmployeeLine}history/published-history`,
/**
* api
*/
positionEmployeeLevel,
listPositionEmployeeLevelHistory: `${positionEmployeeLevel}history`,
listPositionEmployeeLevelHistoryId: (id: string) =>
`${positionEmployeeLevel}history/${id}`,
listPositionEmployeeLevelPublished: `${positionEmployeeLevel}history/published`,
listPositionEmployeeLevelPublishedHistory: `${positionEmployeeLevel}history/published-history`,
/**
* api
*/
listPositionEmployeeStatusHistory: `${positionEmployeeStatus}history`,
listPositionEmployeeStatusHistoryId: (id: string) =>
`${positionEmployeeStatus}history/${id}`,
listPositionEmployeeStatusPublished: `${positionEmployeeStatus}history/published`,
listPositionEmployeeStatusPublishedHistory: `${positionEmployeeStatus}history/published-history`,
};

View file

@ -0,0 +1,219 @@
/**
* api -
*/
import env from "../index";
const profile = `${env.API_URI_PROFILE_SERVICE}/profile/`;
const report = `${env.API_REPORT_URI}/report/profile/`;
const organizationRoot = `${env.API_URI}/profile/organization/list/root`;
const registryNew = `${env.API_URI}/org/profile/`;
export default {
/**
* api
*/
organizationRoot,
profileUser: `${profile}user`,
profileValidateId: (profileId: string) => `${profile}validate/${profileId}`,
profilePaperDownloadId: (id: string) => `${profile}paper/download/${id}`,
profilePaperId: (id: string) => `${profile}paper/${id}`,
profileMultiId: (id: string) => `${profile}multi-paper/${id}`,
profileMultiOId: (id: string) => `${profile}multi-paper-other/${id}`,
profileMultiKId: (id: string) => `${profile}multi-paper-kk1/${id}`,
profileHistoryselfId: (profileId: string) =>
`${profile}/historyself${profileId}`,
profileOrganiNameId: (id: string) => `${profile}organization/name/${id}`,
profileOrganiId: (id: string) => `${profile}organization/${id}`,
profileOrganiSelectId: (id: string) => `${profile}organization/select/${id}`,
profileOrganiRootId: (id: string) => `${profile}organization/root/${id}`,
profileLeaveOrganiId: (id: string) => `${profile}leave/organization/${id}`,
profileSearchNewOcId: (id: string) => `${profile}search/new/oc/${id}`,
profileSearchNewOcIdType: (id: string, type: string) =>
`${profile}search/new/oc/${id}/${type}`,
profileSearchId: (id: string) => `${profile}search/${id}`,
profileSearchOcId: (id: string) => `${profile}search/oc/${id}`,
profileSearchNewOcLeaveId: (id: string) =>
`${profile}search/new/oc/leave/${id}`,
profileSearchNewOcLeaveIdType: (id: string, type: string) =>
`${profile}search/new/oc/leave/${id}/${type}`,
profileSearchOcLeaveId: (id: string) => `${profile}search/oc/leave/${id}`,
profileSearchNewEmOcId: (id: string) =>
`${profile}search/new-employee/oc/${id}`,
profileSearchNewEmOcLeaveId: (id: string) =>
`${profile}search/new-employee/oc/leave/${id}`,
profileSearchPersonal: () => `${profile}search-personal`,
profileEmployeeTempId: (id: string) => `${profile}employee/temp/${id}`,
profileCoupleId: (profileId: string) => `${profile}couple/${profileId}`,
profileFatherId: (profileId: string) => `${profile}father/${profileId}`,
profileMotherId: (profileId: string) => `${profile}mother/${profileId}`,
profileAdsId: (profileId: string) => `${profile}address/current/${profileId}`,
profileAdsCurAdrsId: (profileId: string) =>
`${profile}address/currentAdrs/${profileId}`,
profileAdsRegisId: (profileId: string) =>
`${profile}address/registration/${profileId}`,
profileInsignId: (profileId: string) => `${profile}insignia/${profileId}`,
profileInsignHisId: (profileId: string) =>
`${profile}insignia/history/${profileId}`,
profileInsignInsignId: (profileId: string) =>
`${profile}insignia/insigniadiocesan/${profileId}`,
profileInsignToolList: `${profile}insignia/tool/list`,
profileChildId: (profileId: string) => `${profile}children/${profileId}`,
profileAssessmentId: (profileId: string) =>
`${profile}assessment/${profileId}`,
profileAssessmentHisId: (profileId: string) =>
`${profile}assessment/history/${profileId}`,
profileHonorId: (profileId: string) => `${profile}honor/${profileId}`,
profileHonorHisId: (profileId: string) =>
`${profile}honor/history/${profileId}`,
profileCertId: (profileId: string) => `${profile}certificate/${profileId}`,
profileCertHisId: (profileId: string) =>
`${profile}certificate/history/${profileId}`,
profileAbiliId: (profileId: string) => `${profile}ability/${profileId}`,
profileAbiliHisId: (profileId: string) =>
`${profile}ability/history/${profileId}`,
profileDutyId: (profileId: string) => `${profile}duty/${profileId}`,
profileDutyHisId: (profileId: string) =>
`${profile}duty/history/${profileId}`,
profileOtherId: (profileId: string) => `${profile}other/${profileId}`,
profileOtherHisId: (profileId: string) =>
`${profile}other/history/${profileId}`,
profileNopaidId: (profileId: string) => `${profile}nopaid/${profileId}`,
profileNopaidHisId: (profileId: string) =>
`${profile}nopaid/history/${profileId}`,
profileAvaId: (profileId: string) => `${profile}avatar/${profileId}`,
profileAvaCurId: (profileId: string) =>
`${profile}avatar/current/${profileId}`,
profileEduId: (profileId: string) => `${profile}education/${profileId}`,
profileEduHisId: (profileId: string) =>
`${profile}education/history/${profileId}`,
profileSwapEducation: `${profile}swap_education`,
profileTrainId: (profileId: string) => `${profile}training/${profileId}`,
profileTrainHisId: (profileId: string) =>
`${profile}training/history/${profileId}`,
profileDisId: (profileId: string) => `${profile}discipline/${profileId}`,
profileDisHisId: (profileId: string) =>
`${profile}discipline/history/${profileId}`,
profileSwapDiscipline: `${profile}swap_discipline`,
profileLeaveId: (leaveId: string) => `${profile}leave/${leaveId}`,
profileLeaveHisId: (profileId: string) =>
`${profile}leave/history/${profileId}`,
profileLeaveTotalId: (profileId: string) =>
`${profile}leave/total/${profileId}`,
profileSalaryId: (profileId: string) => `${profile}salary/${profileId}`,
profileSalaryHisId: (profileId: string) =>
`${profile}salary/history/${profileId}`,
profileSalarySwapId: (id: string, direction: string) =>
`${profile}salary/swap/${id}/${direction}`,
profileSalaryCopyId: (profileId: string) =>
`${profile}salary-copy/${profileId}`,
// ************************************
profileSalaryEmployeeId: (profileId: string) =>
`${profile}salary/employee/${profileId}`,
profileSalaryEmployeeHisId: (profileId: string) =>
`${profile}salary/employee/history/${profileId}`,
// ************************************
profileInforId: (profileId: string) => `${profile}information/${profileId}`,
profileInforHisId: (profileId: string) =>
`${profile}information/history/${profileId}`,
profileGovId: (profileId: string) => `${profile}government/${profileId}`,
profileGovHisId: (profileId: string) =>
`${profile}government/history/${profileId}`,
profileCalGovId: (profileId: string) => `${profile}cal/gov/${profileId}`,
profileFamiId: (profileId: string) => `${profile}family/${profileId}`,
profileFamiHisId: (profileId: string) =>
`${profile}family/history/${profileId}`,
profileAdrsId: (profileId: string) => `${profile}address/${profileId}`,
profileAdrsHisId: (profileId: string) =>
`${profile}address/history/${profileId}`,
searchProfileByOcId: (OcId: string, type: string) =>
`${profile}search/new/oc/${OcId}/${type}`,
searchProfileTemp: (type: string) => `${profile}search/new/oc/${type}`,
profileAvatarId: (profileId: string) => `${profile}avatar/${profileId}`,
profileAvatarHistoryId: (profileId: string) =>
`${profile}avatar/history/${profileId}`,
profileCheckId: (profileId: string) => `${profile}check/${profileId}`,
profileOrganizRoot: `${profile}organization/root`,
profileCalRetire: `${profile}cal/retire`,
profilePositionNumber: `${profile}position-number`,
organizationName: (ocId: string) => `${profile}organization/${ocId}`,
profileDeactive: (profileId: string) => `${profile}deactive/${profileId}`,
profileReactive: (profileId: string) => `${profile}reactive/${profileId}`,
profileReportId: (profileId: string) => `${report}kk1/${profileId}`,
profileKp7ShortId: (profileId: string) => `${report}kp7-short/${profileId}`,
profileChangeNameId: (profileId: string) =>
`${profile}changeName/${profileId}`,
profileChangeNameHisId: (profileId: string) =>
`${profile}changeName/history/${profileId}`,
profileCitizenId: (citizenId: string) => `${profile}citizenId/${citizenId}`,
profileEmployeeIn: `${profile}information/employee`,
profileHistory: (type: string) => `${profile}search/history/oc/${type}`,
//ระบบ ลูกจ้างชั่คราว
employmentId: (profileId: string) => `${profile}employment/${profileId}`,
employmentHistoryId: (employmentId: string) =>
`${profile}employment/history/${employmentId}`,
searchPersonal: () => `${profile}search-personal`,
//สร้างข้อมูลราชการ
createProfileOfficer: () => `${profile}information/officer`,
// verify
profileVerified: (profileId: string) => `${profile}verified/${profileId}`,
profileVerifiedUnlock: (profileId: string) =>
`${profile}not-verified/${profileId}`,
profileSendVerified: (profileId: string) =>
`${profile}send-verified/${profileId}`,
listVerified: () => `${profile}list-verified`,
registryNew,
registryNewId: (id: string) => `${registryNew}${id}`,
profileNewCitizenId: (citizenId: string) =>
`${registryNew}citizenId/${citizenId}`,
/**ปรับรายการเงินเดือนขึ้น-ลง*/
salarySwap: (dierction: string, id: string) =>
`${profile}salary/swap/${dierction}/${id}`,
listProfileNew:(id:string,page:number,pageSize:number)=>`${profile}search/new-page/oc/${id}/officer?page=${page}&pageSize=${pageSize}`,
orgProfileAvatar:`${registryNew}avatar`
};

View file

@ -0,0 +1,180 @@
import env from "../index";
const registryNew = `${env.API_URI}/org/profile`;
const metadata = `${env.API_URI}/org/metadata/`;
export default {
registryNew: (type: string) => `${registryNew}${type}`,
registryNewByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/${profileId}`,
// metadata
profileNewMetaMain: `${metadata}main/person`,
profileNewProvince: `${metadata}province`,
profileNewDistrictByPId: (id: string) => `${metadata}province/${id}`,
profileNewSubDistrictByDId: (id: string) => `${metadata}district/${id}`,
// ประวัติส่วนตัว
profileNewProfileById: (dataId: string, type: string) =>
`${registryNew}${type}/${dataId}`,
profileNewProfileHisById: (dataId: string, type: string) =>
`${registryNew}${type}/history/${dataId}`,
// ข้อมูลที่อยู่
profileNewAddressByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/address/${profileId}`,
profileNewAddressById: (dataId: string, type: string) =>
`${registryNew}${type}/address/${dataId}`,
profileNewAddressHisById: (dataId: string, type: string) =>
`${registryNew}${type}/address/history/${dataId}`,
// บันทึกวันที่ไม่ได้รับเงินเดือนฯ
profileNewNoPaid: (type: string) => `${registryNew}${type}/nopaid`,
profileNewNoPaidByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/nopaid/${profileId}`,
profileNewNoPaidById: (dataId: string, type: string) =>
`${registryNew}${type}/nopaid/${dataId}`,
profileNewNoPaidHisById: (dataId: string, type: string) =>
`${registryNew}${type}/nopaid/history/${dataId}`,
// เครื่องราชฯ
profileNewInsign: (type: string) => `${registryNew}${type}/insignia`,
profileNewInsignByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/insignia/${profileId}`,
profileNewInsignById: (dataId: string, type: string) =>
`${registryNew}${type}/insignia/${dataId}`,
profileNewInsignHisById: (dataId: string, type: string) =>
`${registryNew}${type}/insignia/history/${dataId}`,
// ประกาศเกียรติคุณ
profileNewHonor: (type: string) => `${registryNew}${type}/honor`,
profileNewHonorByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/honor/${profileId}`,
profileNewHonorById: (dataId: string, type: string) =>
`${registryNew}${type}/honor/${dataId}`,
profileNewHonorHisById: (dataId: string, type: string) =>
`${registryNew}${type}/honor/history/${dataId}`,
// ผลการประเมินการปฏิบัติราชการ
profileNewAssessments: (type: string) => `${registryNew}${type}/assessments`,
profileNewAssessmentsByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/assessments/${profileId}`,
profileNewAssessmentsById: (dataId: string, type: string) =>
`${registryNew}${type}/assessments/${dataId}`,
profileNewAssessmentsHisById: (dataId: string, type: string) =>
`${registryNew}${type}/assessments/history/${dataId}`,
// การฝึกอบรม
profileNewTraining: (type: string) => `${registryNew}${type}/training`,
profileNewTrainingByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/training/${profileId}`,
profileNewTrainingByTrainingId: (trainingId: string, type: string) =>
`${registryNew}${type}/training/${trainingId}`,
profileNewTrainingHisByTrainingId: (trainingId: string, type: string) =>
`${registryNew}${type}/training/history/${trainingId}`,
// ประวัติการศึกษา
profileNewEducation: (type: string) => `${registryNew}${type}/educations`,
profileNewEducationByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/educations/${profileId}`,
profileNewEducationByEducationId: (educationId: string, type: string) =>
`${registryNew}${type}/educations/${educationId}`,
profileNewEducationHisByEducationId: (educationsId: string, type: string) =>
`${registryNew}${type}/educations/history/${educationsId}`,
// ความสามารถพิเศษ
profileNewAbility: (type: string) => `${registryNew}${type}/ability`,
profileNewAbilityByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/ability/${profileId}`,
profileNewAbilityByAbilityId: (abilityId: string, type: string) =>
`${registryNew}${type}/ability/${abilityId}`,
profileNewAbilityHisByAbilityId: (abilityId: string, type: string) =>
`${registryNew}${type}/ability/history/${abilityId}`,
// ใบอนุญาตประกอบวิชาชีพ
profileNewCertificate: (type: string) => `${registryNew}${type}/certificate`,
profileNewCertificateByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/certificate/${profileId}`,
profileNewCertificateByCertificateId: (certificateId: string, type: string) =>
`${registryNew}${type}/certificate/${certificateId}`,
profileNewCertificateHisByCertificateId: (
certificateId: string,
type: string
) => `${registryNew}${type}/certificate/history/${certificateId}`,
// ข้อมูลอื่นๆ
profileNewOther: (type: string) => `${registryNew}${type}/other`,
profileNewOtherByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/other/${profileId}`,
profileNewOtherById: (dataId: string, type: string) =>
`${registryNew}${type}/other/${dataId}`,
profileNewOtherHisById: (dataId: string, type: string) =>
`${registryNew}${type}/other/history/${dataId}`,
// ข้อมูลครอบครัว
profileNewFamily: (type: string) => `${registryNew}${type}/family`,
profileNewFamilyByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/family/${profileId}`,
profileNewFamilyByFamilyId: (familyId: string, type: string) =>
`${registryNew}${type}/family/${familyId}`,
profileNewFamilyHisByFamilyId: (familyId: string, type: string) =>
`${registryNew}${type}/family/history/${familyId}`,
// วินัย
profileNewDiscipline: (type: string) => `${registryNew}${type}/discipline`,
profileNewDisciplineByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/discipline/${profileId}`,
profileNewDisciplineByDisciplineId: (disciplineId: string, type: string) =>
`${registryNew}${type}/discipline/${disciplineId}`,
profileNewDisciplineHisByDisciplineId: (disciplineId: string, type: string) =>
`${registryNew}${type}/discipline/history/${disciplineId}`,
// ปฏิบัติราชการพิเศษ
profileNewDuty: (type: string) => `${registryNew}${type}/duty`,
profileNewDutyByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/duty/${profileId}`,
profileNewDutyByDutyId: (dutyId: string, type: string) =>
`${registryNew}${type}/duty/${dutyId}`,
profileNewDutyHisByDutyId: (dutyId: string, type: string) =>
`${registryNew}${type}/duty/history/${dutyId}`,
//ข้อมูลราชการ
profileNewGovernment: (type: string) => `${registryNew}${type}/government`,
profileNewGovernmentById: (id: string, type: string) =>
`${registryNew}${type}/government/${id}`,
profileNewGovernmentHistory: (id: string, type: string) =>
`${registryNew}${type}/government/history/${id}`,
//การลา
profileNewLeave: (type: string) => `${registryNew}${type}/leave`,
profileNewLeaveById: (id: string, type: string) =>
`${registryNew}${type}/leave/${id}`,
profileNewLeaveHistory: (id: string, type: string) =>
`${registryNew}${type}/leave/history/${id}`,
profileCheckDate: () => `${env.API_URI}/leave/user/check`,
profileNewLeaveType: () => `${env.API_URI}/leave/type`,
/** ตำแหน่งเงินเดือน*/
profileSalaryNew: (type: string) => `${registryNew}${type}/salary`,
profileListSalaryNew: (id: string, type: string) =>
`${registryNew}${type}/salary/${id}`,
profileListSalaryHistoryNew: (profileId: string, type: string) =>
`${registryNew}${type}/salary/history/${profileId}`,
profileSalarySwapNew: (type: string, id: string, type2: string) =>
`${registryNew}${type2}/salary/swap/${type}/${id}`,
// ประวัติการเปลี่ยนชื่อ-นามสกุล
profileNewChangeName: (type: string) => `${registryNew}${type}/changeName`,
profileNewChangeNameByProfileId: (profileId: string, type: string) =>
`${registryNew}${type}/changeName/${profileId}`,
profileNewChangeNameByChangeNameId: (changeNameId: string, type: string) =>
`${registryNew}${type}/changeName/${changeNameId}`,
profileNewChangeNameHisByChangeNameId: (changeNameId: string, type: string) =>
`${registryNew}${type}/changeName/history/${changeNameId}`,
//ข้อมูลครอบครับ
profileFamily: (empType: string, type: string) =>
`${registryNew}${empType}/family/${type}`,
profileFamilyHistory: (id: string, empType: string, type: string) =>
`${registryNew}${empType}/family/${type}/history/${id}`,
};

View file

@ -0,0 +1,49 @@
/**
* api
*/
import env from "../index";
const reportOrder = `${env.API_REPORT2_URI}/report/order`;
const reportRetire = `${env.API_REPORT2_URI}/report/retire`;
const reportProbation = `${env.API_REPORT2_URI}/report/probation`;
const reportResign = `${env.API_REPORT2_URI}/report/resign/33`;
const reportTransfer = `${env.API_REPORT2_URI}/report/transfer`;
const reportDeceased = `${env.API_REPORT2_URI}/report/deceased`;
const reportTemplate = `${env.API_REPORT_TEMPLATE_URI}`;
export default {
reportOrderCover: (fileType: string, id: string, commandCode: string) =>
`${reportOrder}/${commandCode}/cover/${fileType}/${id}`,
reportOrderAttachment: (fileType: string, id: string, commandCode: string) =>
`${reportOrder}/${commandCode}/attachment/${fileType}/${id}`,
reportRetireList: (fileType: string, id: string) =>
`${reportRetire}/${fileType}/${id}`,
reportResignList: (fileType: string, id: string) =>
`${reportResign}/${fileType}/${id}`,
fileCover: (format: string, fileType: string, id: string) =>
`${reportOrder}/${format}/cover/${fileType}/${id}`,
fileAttachment: (format: string, fileType: string, id: string) =>
`${reportOrder}/${format}/attachment/${fileType}/${id}`,
//ระบบทดลองงาน
reportAssign: (type: string, id: string) =>
`${reportProbation}/13/${type}/${id}`,
reportEvaluateRecord1: (type: string, id: string) =>
`${reportProbation}/14/${type}/${id}`,
// reportEvaluateRecord2:(type:string, id:string) => `${reportProbation}/15/${type}/${id}`,
reportEvaluate: (type: string, id: string) =>
`${reportProbation}/16/${type}/${id}`,
reportEvaluateChairman: (type: string, id: string) =>
`${reportProbation}/17/${type}/${id}`,
reportEvaluateResult: (type: string, id: string) =>
`${reportProbation}/19/${type}/${id}`,
// reportSurvey:(type:string, id:string) => `${reportProbation}/19/${type}/${id}`,
//filetransfer
reportTransferFile: (no: number, type: string, id: string) =>
`${reportTransfer}/${no}/${type}/${id}`,
DeceasedReport: (type: string, id: string) =>
`${reportDeceased}/36/${type}/${id}`,
reportTemplate,
};