From fb3614d88f579cb2a75e7a13f9c0d40ee347fb0c Mon Sep 17 00:00:00 2001 From: waruneeta Date: Fri, 4 Aug 2023 10:40:04 +0700 Subject: [PATCH 1/6] probation add api --- src/api/05_placement/api.probation.ts | 14 ++++++++++++++ src/api/index.ts | 3 +++ src/app.config.ts | 2 ++ .../components/probation/MainProbation.vue | 16 +++++++++++++--- 4 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 src/api/05_placement/api.probation.ts diff --git a/src/api/05_placement/api.probation.ts b/src/api/05_placement/api.probation.ts new file mode 100644 index 000000000..351a6685a --- /dev/null +++ b/src/api/05_placement/api.probation.ts @@ -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}` +}; diff --git a/src/api/index.ts b/src/api/index.ts index 4ca191632..660556e1d 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -26,6 +26,7 @@ const config = ref({ "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( config.value[env.value].API_RETIREMENT_URI ); const API_URI_ORG_TREE = ref(config.value[env.value].API_URI_ORG_TREE); +const API_PROBATION_URI = ref(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 }; diff --git a/src/app.config.ts b/src/app.config.ts index 5fe96eab7..ef0aa5f39 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -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, }; diff --git a/src/modules/05_placement/components/probation/MainProbation.vue b/src/modules/05_placement/components/probation/MainProbation.vue index f28af5a48..8467377f8 100644 --- a/src/modules/05_placement/components/probation/MainProbation.vue +++ b/src/modules/05_placement/components/probation/MainProbation.vue @@ -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(() => {}); From 7ee07b9d851d28126eafe8eabeb3ac7979e4911a Mon Sep 17 00:00:00 2001 From: Thanit Konmek Date: Fri, 4 Aug 2023 14:52:57 +0700 Subject: [PATCH 2/6] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=20=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A=E0=B8=B5?= =?UTF-8?q?=E0=B8=A2=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1?= =?UTF-8?q?=E0=B8=95=E0=B8=B4=E0=B8=A5=E0=B8=B9=E0=B8=81=E0=B8=88=E0=B9=89?= =?UTF-8?q?=E0=B8=B2=E0=B8=87=E0=B8=8A=E0=B8=B1=E0=B9=88=E0=B8=A7=E0=B8=84?= =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../08_registryEmployee/request/Main.ts | 10 +- .../08_registryEmployee/views/Main.vue | 294 +++++++++--------- 2 files changed, 160 insertions(+), 144 deletions(-) diff --git a/src/modules/08_registryEmployee/request/Main.ts b/src/modules/08_registryEmployee/request/Main.ts index ed0a008b2..78ad46293 100644 --- a/src/modules/08_registryEmployee/request/Main.ts +++ b/src/modules/08_registryEmployee/request/Main.ts @@ -16,10 +16,14 @@ interface FormRegistryEmployee { dateAppoint: String | null; dateStart: String | null; createdAt: String | null; -// salaryDate: String | null; + // salaryDate: String | null; isLeave: String; -// leaveReason: string; + // leaveReason: string; leaveDateOrder: String | null; + draftPositionEmployee: String | null; + draftOrganizationOrganization: String | null; + newAgency: String | null; + currentAgency: String | null; } interface ResponseEmployeeTemp { id: string; @@ -43,5 +47,7 @@ interface ResponseEmployeeTemp { isLeave: boolean; leaveReason: string; leaveDateOrder: Date | null; + draftPositionEmployee: String | null; + draftOrganizationOrganization: String | null; } export type { ResponseEmployeeTemp, FormRegistryEmployee }; diff --git a/src/modules/08_registryEmployee/views/Main.vue b/src/modules/08_registryEmployee/views/Main.vue index 4e5908aea..36e9e8553 100644 --- a/src/modules/08_registryEmployee/views/Main.vue +++ b/src/modules/08_registryEmployee/views/Main.vue @@ -56,18 +56,12 @@
- - - +
@@ -416,18 +445,6 @@ - @@ -439,7 +456,7 @@ - + From fef7c21fcd2125cfa1e6751d0f3d346388b74a37 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Fri, 4 Aug 2023 15:12:23 +0700 Subject: [PATCH 3/6] =?UTF-8?q?fix=20api=20=E0=B8=AD=E0=B8=AD=E0=B8=81?= =?UTF-8?q?=E0=B8=84=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87=20&=20se?= =?UTF-8?q?t=20value=20step=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/05_placement/api.placement.ts | 4 +- .../OrderPlacement/MainOrderPlacement.vue | 2 +- .../components/OrderPlacement/step/step01.vue | 342 +++++------------- 3 files changed, 89 insertions(+), 259 deletions(-) diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index c2159003a..94259b628 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -54,8 +54,10 @@ export default { // order yearOptionsOrder: () => `${order}/order/fiscal-year`, + createOrder: () => `${order}/order/detail`, listOrder: () => `${order}/order`, - detailOrder:(orderId:string) => `${order}/order/${orderId}`, + detailOrder:(orderId:string) => `${order}/order/detail/${orderId}`, + deleteOrder:(orderId:string) => `${order}/order/${orderId}`, typeOrder: () => `${order}/order/order-type`, examroundOrder: () => `${order}/order/detail/exam-round`, }; diff --git a/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue b/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue index 8d0e90c74..ea465c3e6 100644 --- a/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue +++ b/src/modules/05_placement/components/OrderPlacement/MainOrderPlacement.vue @@ -423,7 +423,7 @@ const clickDelete = (id: string) => { const deleteData = async (id: string) => { showLoader(); await http - .delete(config.API.detailOrder(id)) + .delete(config.API.deleteOrder(id)) .then((res) => { success($q, "ลบข้อมูลสำเร็จ"); }) diff --git a/src/modules/05_placement/components/OrderPlacement/step/step01.vue b/src/modules/05_placement/components/OrderPlacement/step/step01.vue index 526d9a895..300a25878 100644 --- a/src/modules/05_placement/components/OrderPlacement/step/step01.vue +++ b/src/modules/05_placement/components/OrderPlacement/step/step01.vue @@ -3,24 +3,10 @@
- + @@ -29,73 +15,36 @@
- +
- +
- +
- +
- + @@ -103,24 +52,12 @@ {{ parseInt(value + 543) }}