Merge branch 'develop' of github.com:Frappet/bma-ehr-frontend into me

This commit is contained in:
Thanit Konmek 2023-07-13 09:46:47 +07:00
commit a2ac793131
2 changed files with 45 additions and 13 deletions

View file

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

View file

@ -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 }}
</q-td>
<q-td key="accountStartDate" :props="props">
{{ date2Thai(props.row.accountStartDate) }}
{{ props.row.accountStartDate }}
</q-td>
<q-td key="accountExpirationDate" :props="props">
{{ date2Thai(props.row.accountExpirationDate) }}
{{ props.row.accountExpirationDate }}
</q-td>
</q-tr>
</template>