diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts
index 72273513a..306bdee6b 100644
--- a/src/api/05_placement/api.placement.ts
+++ b/src/api/05_placement/api.placement.ts
@@ -1,5 +1,5 @@
import env from "../index";
-const placement = `${env.API_URI}/Placement/placement`;
+const placement = `${env.API_PLACEMENT_URI}/Placement/placement`;
const orgTree = `${env.API_URI_ORG_TREE}`;
export default {
@@ -18,29 +18,30 @@ export default {
//personal
placementPersonalId: (personalId: string) =>
- `${placement}personal/${personalId}`,
+ `${placement}/personal/${personalId}`,
//personal
placementPropertyId: (personalId: string) =>
- `${placement}property/${personalId}`,
+ `${placement}/property/${personalId}`,
//information
placementInformationId: (personalId: string) =>
- `${placement}information/${personalId}`,
+ `${placement}/information/${personalId}`,
//address
placementAddressId: (personalId: string) =>
- `${placement}address/${personalId}`,
+ `${placement}/address/${personalId}`,
//family
- placementFamilyId: (personalId: string) => `${placement}family/${personalId}`,
+ placementFamilyId: (personalId: string) =>
+ `${placement}/family/${personalId}`,
//certificate
placementCertId: (personalId: string) =>
- `${placement}certificate/${personalId}`,
+ `${placement}/certificate/${personalId}`,
placementCertDetailId: (personalId: string, certificateId: string) =>
- `${placement}certificate/${personalId}/${certificateId}`,
+ `${placement}/certificate/${personalId}/${certificateId}`,
//education
- placementEducationId: (id: string) => `${placement}education/${id}`,
+ placementEducationId: (id: string) => `${placement}/education/${id}`,
};
diff --git a/src/modules/05_placement/components/Main.vue b/src/modules/05_placement/components/Main.vue
index f72ff76a7..5effa66d9 100644
--- a/src/modules/05_placement/components/Main.vue
+++ b/src/modules/05_placement/components/Main.vue
@@ -125,12 +125,29 @@ onMounted(async () => {
});
const fetchPlacementData = async (val: number) => {
showLoader();
+ rows.value = [];
http
.get(config.API.MainDetail(val))
.then((res) => {
dataPlacement.value = res.data.result;
DataStore.DataMainOrig = dataPlacement.value;
- rows.value = DataStore.DataMainOrig;
+ console.log(DataStore.DataMainOrig);
+
+ // rows.value = DataStore.DataMainOrig;
+ DataStore.DataMainOrig.map((e: any) => {
+ rows.value.push({
+ examRound: e.examRound,
+ examOrder: e.examOrder,
+ examTypeName: e.examTypeName,
+ examTypeValue: e.examTypeValue,
+ accountEndDate: date2Thai(e.accountEndDate),
+ accountExpirationDate: date2Thai(e.accountExpirationDate),
+ accountStartDate: date2Thai(e.accountStartDate),
+ fiscalYear: e.fiscalYear,
+ numberOfCandidates: e.numberOfCandidates,
+ });
+ });
+
examTypeFilter();
examTimeFilter();
expiredAccountFilter();
@@ -218,13 +235,27 @@ const examTypeFilter = () => {
};
//--------------|ฟิลเตอร์|--------------------------------------//
const searchFilterTable = async () => {
+ rows.value = [];
if (examType.value !== undefined && examType.value !== null) {
await DataStore.DataUpdateMain(
examTime.value,
examType.value,
expiredAccount.value
);
- rows.value = DataStore.DataMainUpdate;
+ // rows.value = DataStore.DataMainUpdate;
+ DataStore.DataMainUpdate.map((e: any) => {
+ rows.value.push({
+ examRound: e.examRound,
+ examOrder: e.examOrder,
+ examTypeName: e.examTypeName,
+ examTypeValue: e.examTypeValue,
+ accountEndDate: date2Thai(e.accountEndDate),
+ accountExpirationDate: date2Thai(e.accountExpirationDate),
+ accountStartDate: date2Thai(e.accountStartDate),
+ fiscalYear: e.fiscalYear,
+ numberOfCandidates: e.numberOfCandidates,
+ });
+ });
}
};
@@ -416,10 +447,10 @@ const paginationLabel = (start: number, end: number, total: number) => {
{{ props.row.examTypeName }}
- {{ date2Thai(props.row.accountStartDate) }}
+ {{ props.row.accountStartDate }}
- {{ date2Thai(props.row.accountExpirationDate) }}
+ {{ props.row.accountExpirationDate }}