probation add api
This commit is contained in:
parent
7de96b1286
commit
fb3614d88f
4 changed files with 32 additions and 3 deletions
14
src/api/05_placement/api.probation.ts
Normal file
14
src/api/05_placement/api.probation.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import env from "../index";
|
||||
const dataOptions = `${env.API_PROBATION_URI}/data-options`;
|
||||
const personal = `${env.API_PROBATION_URI}/personal`;
|
||||
|
||||
export default {
|
||||
competencyOptions: () => `${dataOptions}/competency`,
|
||||
competencyGroupOptions: () => `${dataOptions}/competency-group`,
|
||||
knowledgeOptions: () => `${dataOptions}/knowledge`,
|
||||
skillOptions: () => `${dataOptions}/skill`,
|
||||
lawOptions: () => `${dataOptions}/law`,
|
||||
|
||||
personalAdd: () => `${personal}/add`,
|
||||
// clearPosition: (personalId:string) => `${placement}/position/clear/${personalId}`
|
||||
};
|
||||
|
|
@ -26,6 +26,7 @@ const config = ref<any>({
|
|||
"https://s3cluster.frappet.com/bma-ehr-fpt/organization/strueture/tree_20230712_172702.json",
|
||||
MEET_URI: "meet.frappet.com",
|
||||
API_RETIREMENT_URI: "https://bma-ehr.frappet.synology.me/api/v1",
|
||||
API_PROBATION_URI: "http://192.168.1.151:7776/v1",
|
||||
},
|
||||
test: {
|
||||
API_URI: "http://localhost:5010/api/v1",
|
||||
|
|
@ -70,6 +71,7 @@ const API_RETIREMENT_URI = ref<string>(
|
|||
config.value[env.value].API_RETIREMENT_URI
|
||||
);
|
||||
const API_URI_ORG_TREE = ref<string>(config.value[env.value].API_URI_ORG_TREE);
|
||||
const API_PROBATION_URI = ref<string>(config.value[env.value].API_PROBATION_URI);
|
||||
|
||||
export default {
|
||||
env: env.value,
|
||||
|
|
@ -84,4 +86,5 @@ export default {
|
|||
API_URI_ORG_TREE: API_URI_ORG_TREE.value,
|
||||
MEET_URI: MEET_URI.value,
|
||||
API_RETIREMENT_URI:API_RETIREMENT_URI.value,
|
||||
API_PROBATION_URI: API_PROBATION_URI.value
|
||||
};
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import report2 from "./api/recruiting/api.report2";
|
|||
|
||||
/** API ระบบการบรรจุ แต่งตั้ง ย้าย โอน List */
|
||||
import placement from "./api/05_placement/api.placement";
|
||||
import probation from "./api/05_placement/api.probation";
|
||||
|
||||
/** API ระบบการพ้นจากราชการ List */
|
||||
import retirement from "./api/06_retirement/api.retirement";
|
||||
|
|
@ -70,6 +71,7 @@ const API = {
|
|||
...report2,
|
||||
|
||||
...placement,
|
||||
...probation,
|
||||
...retirement,
|
||||
...insignia,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -513,10 +513,10 @@ const fecthOrganiz = async () => {
|
|||
const findlist = async (id: string) => {
|
||||
let data = [
|
||||
{ criteriaType: "is_retire", criteriaValue: "false" },
|
||||
{ criteriaType: "is_probation", criteriaValue: "true" },
|
||||
{ criteriaType: "is_probation", criteriaValue: "false" },
|
||||
];
|
||||
await http
|
||||
.post(config.API.profileSearchNewOcIdType(id, "all"), {
|
||||
.post(config.API.profileSearchNewOcIdType(id, "officer"), {
|
||||
criterias: data,
|
||||
})
|
||||
.then((res) => {
|
||||
|
|
@ -557,7 +557,17 @@ const clickAdd = (id: string) => {
|
|||
persistent: true,
|
||||
})
|
||||
.onOk(async () => {
|
||||
console.log("เพิ่ม:", id);
|
||||
const postData = {
|
||||
personal_id: id,
|
||||
}
|
||||
console.log("postData:", postData);
|
||||
await http
|
||||
.post(config.API.personalAdd(), postData)
|
||||
.then((res) => {
|
||||
console.log("res:", res);
|
||||
|
||||
});
|
||||
|
||||
})
|
||||
.onCancel(() => {})
|
||||
.onDismiss(() => {});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue