diff --git a/.env.example b/.env.example index b045013b..d70e9113 100644 --- a/.env.example +++ b/.env.example @@ -18,12 +18,6 @@ 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_PRD_MAARG_JOB_ENUMS={"QUEUE_CRTD_PRD_FEED":"QueueCreatedProductsFeed","QUEUE_UPDT_PRD_FEED":"QueueUpdatedProductsFeed"} 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="" diff --git a/src/locales/en.json b/src/locales/en.json index 97618dd7..854c5ab4 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -62,7 +62,6 @@ "Completed orders": "Completed orders", "Configuration missing": "Configuration missing", "Confirm": "Confirm", - "Consume All Received System Messages": "Consume All Received System Messages", "Copied job details to clipboard": "Copied job details to clipboard", "Copied to clipboard": "Copied to clipboard", "Copy details": "Copy details", @@ -117,15 +116,6 @@ "Fulfillment": "Fulfillment", "Fulfillment status": "Fulfillment status", "Generating answer...": "Generating answer...", - "Generate appeasements financial feed": "Generate appeasements financial feed", - "Generate Brokered order items feed": "Generate Brokered order items feed", - "Generate inventory cycle count variance feed": "Generate inventory cycle count variance feed", - "Generate inventory variance feed": "Generate inventory variance feed", - "Generate order items feed": "Generate order items feed", - "Generate PO shipment receipt feed": "Generate PO shipment receipt feed", - "Generate returns financial feed": "Generate returns financial feed", - "Generate Shipments Receipt Feed": "Generate Shipments Receipt Feed", - "Generate TO order items feed": "Generate TO order items feed", "Get Paid Transactions": "Get Paid Transactions", "Go to OMS": "Go to OMS", "Go to Launchpad": "Go to Launchpad", @@ -217,8 +207,6 @@ "Pipeline": "Pipeline", "Provide a valid cron expression": "Provide a valid cron expression", "Please select a scheduling for job": "Please select a scheduling for job", - "Poll current bulk operation query result": "Poll current bulk operation query result", - "Poll OMS fulfilled items feed": "Poll OMS fulfilled items feed", "Pre-order": "Pre-order", "Pre-Order": "Pre-Order", "Pre-order parking": "Pre-order parking", @@ -233,8 +221,6 @@ "Promise date changes": "Promise date changes", "Provide a future date and time": "Provide a future date and time", "Queued": "Queued", - "Queue created product feed": "Queue created product feed", - "Queue updated product feed": "Queue updated product feed", "Ready to create an app?": "Ready to create an app?", "Realtime adjustments": "Realtime adjustments", "Realtime POS sales": "Realtime POS sales", @@ -287,12 +273,9 @@ "Selected TimeZone": "Selected TimeZone", "Select a different time zone": "Select a different time zone", "Select time zone": "Select time zone", - "Send All Produced System Messages": "Send All Produced System Messages", "Send Broker Order Mail": "Send Broker Order Mail", "Send Completed Order Mail": "Send Completed Order Mail", - "Send next bulk query system message in queue": "Send next bulk query system message in queue", "Send Packed Order Mail": "Send Packed Order Mail", - "Send shopify fulfillment ack feed": "Send shopify fulfillment ack feed", "Sends notifications for open, ready-for-pickup BOPIS orders and brokered, packed, and completed Sales orders.": "Sends notifications for open, ready-for-pickup BOPIS orders and brokered, packed, and completed Sales orders.", "Service has been scheduled": "Service has been scheduled", "Service updated successfully": "Service updated successfully", diff --git a/src/store/modules/maargJob/actions.ts b/src/store/modules/maargJob/actions.ts index e7dc01c5..f045d761 100644 --- a/src/store/modules/maargJob/actions.ts +++ b/src/store/modules/maargJob/actions.ts @@ -8,14 +8,14 @@ import logger from "@/logger"; import { MaargJobService } from '@/services/MaargJobService' const actions: ActionTree = { - async fetchMaargJobs({ commit, dispatch }, jobTypeEnumIds){ + async fetchMaargJobs({ commit, dispatch }, enumTypeId){ const productStoreId = store.getters["user/getCurrentEComStore"]?.productStoreId let resp = {} as any; const maargJobs = {} as any; try { - resp = await MaargJobService.fetchMaargJobs({ jobTypeEnumId: jobTypeEnumIds, jobTypeEnumId_op: "in" }) + resp = await MaargJobService.fetchMaargJobs({ enumTypeId }) if(!hasError(resp) && resp.data?.length) { const jobs = resp.data; const jobEnumIdsToFetch = jobs.map((job: any) => job.jobTypeEnumId); diff --git a/src/store/modules/maargJob/getters.ts b/src/store/modules/maargJob/getters.ts index 8110f52b..c8734064 100644 --- a/src/store/modules/maargJob/getters.ts +++ b/src/store/modules/maargJob/getters.ts @@ -6,6 +6,9 @@ const getters: GetterTree = { getMaargJob: (state) => (jobTypeEnumId: string): any => { return state.maargJobs[jobTypeEnumId] ? state.maargJobs[jobTypeEnumId] : {} }, + getMaargJobsList: (state) => { + return state.maargJobs ? Object.values(state.maargJobs) : [] + }, getCurrentMaargJob: (state) => { return state.currentMaargJob }, diff --git a/src/views/Fulfillment.vue b/src/views/Fulfillment.vue index 762b9fff..498bc891 100644 --- a/src/views/Fulfillment.vue +++ b/src/views/Fulfillment.vue @@ -107,25 +107,13 @@ - + {{ translate("Feed") }} - - {{ translate("Generate order items feed") }} - {{ isMaargJobFound('GNRT_FF_ORD_ITM_FEED') ? getMaargJobStatus("GNRT_FF_ORD_ITM_FEED") : translate("Not found") }} - - - {{ translate("Send shopify fulfillment ack feed") }} - {{ isMaargJobFound('SND_FF_ACK_FEED') ? getMaargJobStatus("SND_FF_ACK_FEED") : translate("Not found") }} - - - {{ translate("Poll OMS fulfilled items feed") }} - {{ isMaargJobFound('POL_OMS_FLFLMNT_FEED') ? getMaargJobStatus("POL_OMS_FLFLMNT_FEED") : translate("Not found") }} - - - {{ translate("Generate TO order items feed") }} - {{ isMaargJobFound('GNRT_TO_FLFLD_ITM_FEED') ? getMaargJobStatus("GNRT_TO_FLFLD_ITM_FEED") : translate("Not found") }} + + {{ job.enumDescription ? job.enumDescription : job.jobName }} + {{ getMaargJobStatus(job.jobTypeEnumId) }} @@ -208,7 +196,6 @@ export default defineComponent({ autoCancelDays: '', enumTypeId: 'FULFILLMENT_SYS_JOB', initialLoadJobEnums: JSON.parse(process.env?.VUE_APP_INITIAL_JOB_ENUMS as string) as any, - maargJobEnums: JSON.parse(process.env.VUE_APP_FULFILLMENT_MAARG_JOB_ENUMS as string) as any, isLoading: false } }, @@ -220,6 +207,7 @@ export default defineComponent({ getTemporalExpr: 'job/getTemporalExpr', getMoreJobs: 'job/getMoreJobs', getMaargJob: 'maargJob/getMaargJob', + maargJobs: 'maargJob/getMaargJobsList', currentMaargJob: 'maargJob/getCurrentMaargJob' }), autoCancelCheckDaily(): boolean { @@ -298,7 +286,7 @@ export default defineComponent({ "enumTypeId": "FULFILLMENT_SYS_JOB" } }); - await this.store.dispatch("maargJob/fetchMaargJobs", Object.values(this.maargJobEnums)); + await this.store.dispatch("maargJob/fetchMaargJobs", "FULFILLMENT_SYS_JOB"); if (this.currentEComStore.productStoreId) { this.getAutoCancelDays(); } @@ -359,18 +347,12 @@ export default defineComponent({ translate('Disabled') }, - isMaargJobFound(id: string) { - const job = this.getMaargJob(this.maargJobEnums[id]) - return job && Object.keys(job)?.length - }, - getMaargJobStatus(id: string) { - const job = this.getMaargJob(this.maargJobEnums[id]) + const job = this.getMaargJob(id) return (job?.paused === "N" && job?.cronExpression) ? this.getCronString(job.cronExpression) ? this.getCronString(job.cronExpression) : job.cronExpression : 'Disabled' }, - async viewMaargJobConfiguration(id: any) { - const enumId = this.maargJobEnums[id]; + async viewMaargJobConfiguration(enumId: any) { const job = this.getMaargJob(enumId); await this.store.dispatch("maargJob/updateCurrentMaargJob", { job }) diff --git a/src/views/Inventory.vue b/src/views/Inventory.vue index e8a12299..8cedd6d1 100644 --- a/src/views/Inventory.vue +++ b/src/views/Inventory.vue @@ -41,21 +41,13 @@ - + {{ translate("Feed") }} - - {{ translate("Generate Shipments Receipt Feed") }} - {{ isMaargJobFound('GNRT_SHIP_RCPT_FEED') ? getMaargJobStatus("GNRT_SHIP_RCPT_FEED") : translate("Not found") }} - - - {{ translate("Generate inventory variance feed") }} - {{ isMaargJobFound('GEN_INV_VAR_FEED') ? getMaargJobStatus("GEN_INV_VAR_FEED") : translate("Not found") }} - - - {{ translate("Generate inventory cycle count variance feed") }} - {{ isMaargJobFound('GEN_INVCYC_COUNT_VAR_FEED') ? getMaargJobStatus("GEN_INVCYC_COUNT_VAR_FEED") : translate("Not found") }} + + {{ job.enumDescription ? job.enumDescription : job.jobName }} + {{ getMaargJobStatus(job.jobTypeEnumId) }} @@ -130,7 +122,6 @@ export default defineComponent({ isDesktop: isPlatform('desktop'), enumTypeId: 'INVENTORY_SYS_JOB', webhookEnums: JSON.parse(process.env?.VUE_APP_WEBHOOK_ENUMS as string) as any, - maargJobEnums: JSON.parse(process.env.VUE_APP_INVENTORY_MAARG_JOB_ENUMS as string) as any, isLoading: false } }, @@ -144,6 +135,7 @@ export default defineComponent({ getMoreJobs: 'job/getMoreJobs', getCachedWebhook: 'webhook/getCachedWebhook', getMaargJob: 'maargJob/getMaargJob', + maargJobs: 'maargJob/getMaargJobsList', currentMaargJob: 'maargJob/getCurrentMaargJob' }), isInventoryLevelUpdated (): boolean { @@ -206,7 +198,7 @@ export default defineComponent({ "enumTypeId": "INVENTORY_SYS_JOB" } }); - await this.store.dispatch("maargJob/fetchMaargJobs", Object.values(this.maargJobEnums)); + await this.store.dispatch("maargJob/fetchMaargJobs", "INVENTORY_SYS_JOB"); this.isLoading = false }, async fetchData(isCurrentJobUpdateRequired = false) { @@ -220,16 +212,11 @@ export default defineComponent({ this.store.dispatch('webhook/fetchWebhooks') await this.fetchJobs() }, - isMaargJobFound(id: string) { - const job = this.getMaargJob(this.maargJobEnums[id]) - return job && Object.keys(job)?.length - }, getMaargJobStatus(id: string) { - const job = this.getMaargJob(this.maargJobEnums[id]) + const job = this.getMaargJob(id) return (job?.paused === "N" && job?.cronExpression) ? this.getCronString(job.cronExpression) ? this.getCronString(job.cronExpression) : job.cronExpression : 'Disabled' }, - async viewMaargJobConfiguration(id: any) { - const enumId = this.maargJobEnums[id]; + async viewMaargJobConfiguration(enumId: any) { const job = this.getMaargJob(enumId); await this.store.dispatch("maargJob/updateCurrentMaargJob", { job }) this.currentJob = "" diff --git a/src/views/Miscellaneous.vue b/src/views/Miscellaneous.vue index 0c17bd5a..b3112dc0 100644 --- a/src/views/Miscellaneous.vue +++ b/src/views/Miscellaneous.vue @@ -25,26 +25,13 @@ {{ translate("Miscellaneous jobs") }} - + {{ translate("Shopify bulk query") }} - - - {{ translate("Send next bulk query system message in queue") }} - {{ isMaargJobFound('BLK_SYS_MESS_SHPFY') ? getMaargJobStatus("BLK_SYS_MESS_SHPFY") : translate("Not found") }} - - - {{ translate("Poll current bulk operation query result") }} - {{ isMaargJobFound('BLK_RSLT_SHPFY') ? getMaargJobStatus("BLK_RSLT_SHPFY") : translate("Not found") }} - - - {{ translate("Consume All Received System Messages") }} - {{ isMaargJobFound('ALL_RCVD_SYS_MSG') ? getMaargJobStatus("ALL_RCVD_SYS_MSG") : translate("Not found") }} - - - {{ translate("Send All Produced System Messages") }} - {{ isMaargJobFound('ALL_PRDCD_SYS_MSG') ? getMaargJobStatus("ALL_PRDCD_SYS_MSG") : translate("Not found") }} + + {{ job.enumDescription ? job.enumDescription : job.jobName }} + {{ getMaargJobStatus(job.jobTypeEnumId) }} @@ -138,8 +125,7 @@ export default defineComponent({ currentJobStatus: '', isJobDetailAnimationCompleted: false, isDesktop: isPlatform('desktop'), - isRetrying: false, - maargJobEnums: JSON.parse(process.env.VUE_APP_MISC_MAARG_JOB_ENUMS as string) as any + isRetrying: false } }, computed: { @@ -148,6 +134,7 @@ export default defineComponent({ getCurrentEComStore:'user/getCurrentEComStore', isMiscellaneousJobsScrollable: 'job/isMiscellaneousJobsScrollable', getMaargJob: 'maargJob/getMaargJob', + maargJobs: 'maargJob/getMaargJobsList', currentMaargJob: 'maargJob/getCurrentMaargJob' }), prepareMiscJobs() { @@ -185,7 +172,7 @@ export default defineComponent({ }, async getMiscellaneousJobs(viewSize = 100, viewIndex = 0) { await this.store.dispatch('job/fetchMiscellaneousJobs', {eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex}); - await this.store.dispatch("maargJob/fetchMaargJobs", Object.values(this.maargJobEnums)); + await this.store.dispatch("maargJob/fetchMaargJobs", "MISC_SYS_JOB"); }, async updateProductStoreConfig(isCurrentJobUpdateRequired = false) { if(isCurrentJobUpdateRequired) { @@ -218,17 +205,11 @@ export default defineComponent({ getJobRuntime(job: any) { return job.statusId !== 'SERVICE_DRAFT' && this.timeFromNow(job.runTime) ? this.timeFromNow(job.runTime) : translate('Disabled') }, - - isMaargJobFound(id: string) { - const job = this.getMaargJob(this.maargJobEnums[id]) - return job && Object.keys(job)?.length - }, getMaargJobStatus(id: string) { - const job = this.getMaargJob(this.maargJobEnums[id]) + const job = this.getMaargJob(id) return (job?.paused === "N" && job?.cronExpression) ? this.getCronString(job.cronExpression) ? this.getCronString(job.cronExpression) : job.cronExpression : 'Disabled' }, - async viewMaargJobConfiguration(id: any) { - const enumId = this.maargJobEnums[id]; + async viewMaargJobConfiguration(enumId: any) { const job = this.getMaargJob(enumId); await this.store.dispatch("maargJob/updateCurrentMaargJob", { job }) this.currentJob = "" diff --git a/src/views/Orders.vue b/src/views/Orders.vue index a639c752..34612965 100644 --- a/src/views/Orders.vue +++ b/src/views/Orders.vue @@ -93,21 +93,13 @@ - + {{ translate("Feed") }} - - {{ translate("Generate Brokered order items feed") }} - {{ isMaargJobFound('GEN_BRKD_ORDITM_FEED') ? getMaargJobStatus("GEN_BRKD_ORDITM_FEED") : translate("Not found") }} - - - {{ translate("Generate appeasements financial feed") }} - {{ isMaargJobFound('GEN_APPEASE_FIN_FEED') ? getMaargJobStatus("GEN_APPEASE_FIN_FEED") : translate("Not found") }} - - - {{ translate("Generate returns financial feed") }} - {{ isMaargJobFound('GEN_RTRN_FIN_FEED') ? getMaargJobStatus("GEN_RTRN_FIN_FEED") : translate("Not found") }} + + {{ job.enumDescription ? job.enumDescription : job.jobName }} + {{ getMaargJobStatus(job.jobTypeEnumId) }} @@ -184,7 +176,6 @@ export default defineComponent({ isDesktop: isPlatform('desktop'), enumTypeId: 'ORDER_SYS_JOB', initialLoadJobEnums: JSON.parse(process.env?.VUE_APP_INITIAL_JOB_ENUMS as string) as any, - maargJobEnums: JSON.parse(process.env.VUE_APP_ORDERS_MAARG_JOB_ENUMS as string) as any, isLoading: false } }, @@ -198,6 +189,7 @@ export default defineComponent({ getCachedWebhook: 'webhook/getCachedWebhook', getMoreJobs: 'job/getMoreJobs', getMaargJob: 'maargJob/getMaargJob', + maargJobs: 'maargJob/getMaargJobsList', currentMaargJob: 'maargJob/getCurrentMaargJob' }), promiseDateChanges(): boolean { @@ -319,19 +311,14 @@ export default defineComponent({ "enumTypeId": "ORDER_SYS_JOB" } }); - await this.store.dispatch("maargJob/fetchMaargJobs", Object.values(this.maargJobEnums)); + await this.store.dispatch("maargJob/fetchMaargJobs", "ORDER_SYS_JOB"); this.isLoading = false }, - isMaargJobFound(id: string) { - const job = this.getMaargJob(this.maargJobEnums[id]) - return job && Object.keys(job)?.length - }, getMaargJobStatus(id: string) { - const job = this.getMaargJob(this.maargJobEnums[id]) + const job = this.getMaargJob(id) return (job?.paused === "N" && job?.cronExpression) ? this.getCronString(job.cronExpression) ? this.getCronString(job.cronExpression) : job.cronExpression : 'Disabled' }, - async viewMaargJobConfiguration(id: any) { - const enumId = this.maargJobEnums[id]; + async viewMaargJobConfiguration(enumId: any) { const job = this.getMaargJob(enumId); await this.store.dispatch("maargJob/updateCurrentMaargJob", { job }) this.currentJob = "" diff --git a/src/views/PreOrder.vue b/src/views/PreOrder.vue index a6768999..922aef8b 100644 --- a/src/views/PreOrder.vue +++ b/src/views/PreOrder.vue @@ -157,13 +157,13 @@ - + {{ translate("Feed") }} - - {{ translate("Generate PO shipment receipt feed") }} - {{ isMaargJobFound('PO_RCPT_FEED') ? getMaargJobStatus("PO_RCPT_FEED") : translate("Not found") }} + + {{ job.enumDescription ? job.enumDescription : job.jobName }} + {{ getMaargJobStatus(job.jobTypeEnumId) }} @@ -248,6 +248,7 @@ export default defineComponent({ getTemporalExpr: 'job/getTemporalExpr', getMoreJobs: 'job/getMoreJobs', getMaargJob: 'maargJob/getMaargJob', + maargJobs: 'maargJob/getMaargJobsList', currentMaargJob: 'maargJob/getCurrentMaargJob' }) }, @@ -262,7 +263,6 @@ export default defineComponent({ isDesktop: isPlatform('desktop'), enumTypeId: 'PRE_ORD_SYS_JOB', preOrderBackorderCategory: {} as any, - maargJobEnums: JSON.parse(process.env.VUE_APP_PREORD_MAARG_JOB_ENUMS as string) as any, } }, methods: { @@ -380,7 +380,7 @@ export default defineComponent({ "enumTypeId": "PRE_ORD_SYS_JOB" } }); - await this.store.dispatch("maargJob/fetchMaargJobs", Object.values(this.maargJobEnums)); + await this.store.dispatch("maargJob/fetchMaargJobs", "PRE_ORD_SYS_JOB"); }, async fetchInitialData(isCurrentJobUpdateRequired = false) { if(isCurrentJobUpdateRequired) { @@ -393,16 +393,11 @@ export default defineComponent({ await this.fetchJobs(); await this.getPreOrderBackorderCategory(); }, - isMaargJobFound(id: string) { - const job = this.getMaargJob(this.maargJobEnums[id]) - return job && Object.keys(job)?.length - }, getMaargJobStatus(id: string) { - const job = this.getMaargJob(this.maargJobEnums[id]) + const job = this.getMaargJob(id) return (job?.paused === "N" && job?.cronExpression) ? this.getCronString(job.cronExpression) ? this.getCronString(job.cronExpression) : job.cronExpression : 'Disabled' }, - async viewMaargJobConfiguration(id: any) { - const enumId = this.maargJobEnums[id]; + async viewMaargJobConfiguration(enumId: any) { const job = this.getMaargJob(enumId); await this.store.dispatch("maargJob/updateCurrentMaargJob", { job }) this.currentJob = "" diff --git a/src/views/Product.vue b/src/views/Product.vue index 278c2575..b2e436a9 100644 --- a/src/views/Product.vue +++ b/src/views/Product.vue @@ -50,17 +50,13 @@ - + {{ translate("Feed") }} - - {{ translate("Queue created product feed") }} - {{ isMaargJobFound('QUEUE_CRTD_PRD_FEED') ? getMaargJobStatus("QUEUE_CRTD_PRD_FEED") : translate("Not found") }} - - - {{ translate("Queue updated product feed") }} - {{ isMaargJobFound('QUEUE_UPDT_PRD_FEED') ? getMaargJobStatus("QUEUE_UPDT_PRD_FEED") : translate("Not found") }} + + {{ job.enumDescription ? job.enumDescription : job.jobName }} + {{ getMaargJobStatus(job.jobTypeEnumId) }} @@ -133,6 +129,7 @@ export default defineComponent({ getCachedWebhook: 'webhook/getCachedWebhook', getMoreJobs: 'job/getMoreJobs', getMaargJob: 'maargJob/getMaargJob', + maargJobs: 'maargJob/getMaargJobsList', currentMaargJob: 'maargJob/getCurrentMaargJob' }), newProductsWebhook(): boolean { @@ -157,7 +154,6 @@ export default defineComponent({ enumTypeId: 'PRODUCT_SYS_JOB', initialLoadJobEnums: JSON.parse(process.env?.VUE_APP_INITIAL_JOB_ENUMS as string) as any, isLoading: false, - maargJobEnums: JSON.parse(process.env.VUE_APP_PRD_MAARG_JOB_ENUMS as string) as any, } }, mounted () { @@ -232,20 +228,15 @@ export default defineComponent({ "enumTypeId": "PRODUCT_SYS_JOB" } }); - await this.store.dispatch("maargJob/fetchMaargJobs", Object.values(this.maargJobEnums)); + await this.store.dispatch("maargJob/fetchMaargJobs", "PRODUCT_SYS_JOB"); this.store.dispatch('webhook/fetchWebhooks') this.isLoading = false }, - isMaargJobFound(id: string) { - const job = this.getMaargJob(this.maargJobEnums[id]) - return job && Object.keys(job)?.length - }, getMaargJobStatus(id: string) { - const job = this.getMaargJob(this.maargJobEnums[id]) + const job = this.getMaargJob(id) return (job?.paused === "N" && job?.cronExpression) ? this.getCronString(job.cronExpression) ? this.getCronString(job.cronExpression) : job.cronExpression : 'Disabled' }, - async viewMaargJobConfiguration(id: any) { - const enumId = this.maargJobEnums[id]; + async viewMaargJobConfiguration(enumId: any) { const job = this.getMaargJob(enumId); await this.store.dispatch("maargJob/updateCurrentMaargJob", { job }) this.currentJob = ""