Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemeted: support for showing maarg jobs in the app (#734) #744

Merged
merged 19 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
59779b5
Implemeted: support for showing maarg jobs in the app (#734)
amansinghbais Nov 14, 2024
4304ade
Improved: support to check and refresh current job if the nextExecuti…
amansinghbais Nov 15, 2024
58fe9f1
Improved: fetching the enums and showing enumName as jobName on UI (#…
amansinghbais Nov 15, 2024
a926d7f
Improved: clearing jobEnums on logout of the app (#734)
amansinghbais Nov 15, 2024
0d4f6cb
Improved: baseUrl to fetch enumeration from atp component for accessi…
amansinghbais Nov 15, 2024
579d644
Implemented: maarg jobs in the inventory, misc, orders and preorder p…
amansinghbais Nov 26, 2024
6af3916
Improved: added entry in the env for the maarg job enums (#734)
amansinghbais Nov 28, 2024
6e7541c
Merge branch 'main' of https://github.com/hotwax/job-manager into #73…
amansinghbais Nov 29, 2024
a33148b
Improved: mutation names for maargjob store, updated env entry name f…
amansinghbais Dec 2, 2024
3345c69
Improved: added all the maarg job entries and their labels on the ui …
amansinghbais Dec 3, 2024
1b873c4
Improved: added entry in locale for the missing translation of static…
amansinghbais Dec 3, 2024
d574f54
Improved: UI of the misc jobs, enumDescription to be shown in the his…
amansinghbais Dec 5, 2024
4903a07
Improved: components import in the maarg job configuration component …
amansinghbais Dec 6, 2024
1f09688
Reverted: unwanted imports and parameters in the code (#734)
amansinghbais Dec 6, 2024
f585b0c
Improved: imported the Ionlist in the maargJobConfiguration component…
amansinghbais Dec 6, 2024
38187cd
Reverted: changes made in the convertValue util method (#734-maarg-jobs)
amansinghbais Dec 6, 2024
cce65aa
Reverted: unwanted imports/changes, used logger instead of console (#…
amansinghbais Dec 6, 2024
557de0c
Reverted: unused import and the parameter (#734)
amansinghbais Dec 6, 2024
1b6511e
Merge branch 'main' into #734-maarg-jobs
ymaheshwari1 Dec 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ VUE_APP_ALIAS=
VUE_APP_DEFAULT_LOG_LEVEL="error"
VUE_APP_LOGIN_URL="http://launchpad.hotwax.io/login"
VUE_APP_BROKER_JOB_ENUMS = {"REJ_ORDR":"JOB_BKR_REJ_ORD"}
VUE_APP_FULFILLMENT_MAARG_JOB_ENUMS={"SND_FF_ACK_FEED":"SND_SHPFY_FUL_ACK_FD","GNRT_FF_ORD_ITM_FEED":"GEN_FLFLD_ORD_ITM_FD","POL_OMS_FLFLMNT_FEED":"POL_OMS_FLFLMNT_FD","GNRT_TO_FLFLD_ITM_FEED":"GEN_TO_FLFD_ITM_FD"}
VUE_APP_INVENTORY_MAARG_JOB_ENUMS={"GNRT_SHIP_RCPT_FEED":"GEN_SHPMNT_RCPT_FD","GEN_INV_VAR_FEED":"GEN_INV_VAR_FD","GEN_INVCYC_COUNT_VAR_FEED":"GEN_INV_CYCLE_VAR_FD"}
VUE_APP_ORDERS_MAARG_JOB_ENUMS={"GEN_BRKD_ORDITM_FEED":"GEN_BRKR_ORD_ITM_FD","GEN_APPEASE_FIN_FEED":"GEN_APSMNT_FNCL_FD", "GEN_RTRN_FIN_FEED": "GEN_RTNS_FNCL_FD"}
VUE_APP_MISC_MAARG_JOB_ENUMS={"BLK_SYS_MESS_SHPFY": "SND_BLK_SYS_M_SHPFY","BLK_RSLT_SHPFY":"POL_BLK_RSLT_SHPFY","ALL_RCVD_SYS_MSG":"CNSM_RCVD_SYS_MSG","ALL_PRDCD_SYS_MSG":"SND_PRDCD_SYS_MSG"}
VUE_APP_PREORD_MAARG_JOB_ENUMS={"PO_RCPT_FEED": "GEN_PO_RCPT_FD"}
VUE_APP_CRON_EXPRESSIONS={"Every 5 minutes":"0 */5 * ? * *","Every 15 minutes":"0 */15 * ? * *","Every 30 minutes":"0 */30 * ? * *","Hourly":"0 0 * ? * *","Every six hours":"0 0 */6 ? * *","Every day at midnight":"0 0 0 * * ?"}
VUE_APP_GITBOOK_API_KEY=""
VUE_APP_SPACE_ID=""
VUE_APP_GITBOOK_BASE_URL="https://api.gitbook.com/v1"
Expand Down
21 changes: 21 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"@ionic/vue-router": "^7.6.0",
"@types/file-saver": "^2.0.4",
"@types/papaparse": "^5.3.1",
"cronstrue": "^2.50.0",
"cron-parser": "^4.9.0",
"boon-js": "^2.0.3",
"core-js": "^3.6.5",
"file-saver": "^2.0.5",
Expand Down
44 changes: 38 additions & 6 deletions src/components/JobHistoryModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
<ion-icon slot="icon-only" :icon="closeOutline" />
</ion-button>
</ion-buttons>
<ion-title>{{ currentJob?.enumName }}</ion-title>
<ion-title v-if="isMaargJob">{{ currentJob?.enumDescription ? currentJob.enumDescription : currentJob.jobName }}</ion-title>
<ion-title v-else>{{ currentJob?.enumName ? currentJob.enumName : currentJob?.description }}</ion-title>
</ion-toolbar>
</ion-header>

Expand All @@ -16,7 +17,18 @@
</div>

<div v-else>
<ion-list>
<ion-list v-if="isMaargJob">
<template v-for="(history, index) in jobHistory" :key="index">
<ion-item>
<ion-label>
<h3>{{ getTime(history.startTime) }}</h3>
<p>{{ getDate(history.startTime) }}</p>
</ion-label>
<ion-badge color="dark" v-if="history.endTime">{{ timeTillRun(history.endTime) }}</ion-badge>
ymaheshwari1 marked this conversation as resolved.
Show resolved Hide resolved
</ion-item>
</template>
</ion-list>
<ion-list v-else>
<ion-item v-for="(job, index) in jobHistory" :key="index">
<ion-label>
{{ job.runTime ? getTime(job.runTime) : "-" }}
Expand Down Expand Up @@ -49,8 +61,10 @@ import { closeOutline } from 'ionicons/icons';
import { mapGetters, useStore } from 'vuex';
import { DateTime } from 'luxon';
import { JobService } from '@/services/JobService'
import { hasError } from '@/utils';
import { hasError, timeTillRun } from '@/utils';
import { translate } from '@hotwax/dxp-components';
import logger from '@/logger';
import { MaargJobService } from '@/services/MaargJobService';

export default defineComponent({
name: 'JobHistoryModal',
Expand All @@ -69,10 +83,10 @@ export default defineComponent({
},
data() {
return {
jobHistory: []
jobHistory: [] as any
}
},
props: ['currentJob'],
props: ['currentJob', 'isMaargJob'],
computed: {
...mapGetters({
getCurrentEComStore:'user/getCurrentEComStore',
Expand Down Expand Up @@ -119,17 +133,35 @@ export default defineComponent({
} catch(err) {
this.$log.error(err);
}
},
async fetchMaargJobHistory() {
try {
const resp = await MaargJobService.fetchMaargJobHistory({
jobName: this.currentJob.jobName,
pageSize: 200,
orderByField: "startTime DESC"
});

if(!hasError(resp)) {
this.jobHistory = resp.data
} else {
throw resp;
}
} catch(error: any) {
logger.error(error);
}
}
},
mounted() {
this.fetchJobHistory()
this.isMaargJob ? this.fetchMaargJobHistory() : this.fetchJobHistory()
},
setup() {
const store = useStore();

return {
closeOutline,
store,
timeTillRun,
translate
};
},
Expand Down
Loading
Loading