From 68d636beb530716f25fd1740efc34ca2137dafbf Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Fri, 9 Aug 2024 12:27:03 +0530 Subject: [PATCH 1/7] Improved: logic to show spinner and close configuration card in case of product store change (#720) --- src/views/Brokering.vue | 22 +++++++++++++++++++--- src/views/Fulfillment.vue | 20 ++++++++++++++++++-- src/views/InitialLoad.vue | 24 ++++++++++++++++++++---- src/views/Inventory.vue | 26 +++++++++++++++++++++----- src/views/Miscellaneous.vue | 15 ++++++++++++++- src/views/Orders.vue | 20 ++++++++++++++++++-- src/views/Pipeline.vue | 30 +++++++++++++++++++++++------- src/views/PreOrder.vue | 30 +++++++++++++++++++++++------- src/views/Product.vue | 24 ++++++++++++++++++++---- src/views/Reports.vue | 15 ++++++++++++++- 10 files changed, 190 insertions(+), 36 deletions(-) diff --git a/src/views/Brokering.vue b/src/views/Brokering.vue index 828fdb3d..186c253f 100644 --- a/src/views/Brokering.vue +++ b/src/views/Brokering.vue @@ -8,7 +8,13 @@ -
+
+ + + {{ translate("Fetching jobs") }} + +
+
{{ translate('Create new brokering job') }} @@ -58,7 +64,7 @@
-
@@ -83,6 +89,7 @@ import { IonMenuButton, IonPage, IonRow, + IonSpinner, IonTitle, IonToggle, IonToolbar, @@ -121,6 +128,7 @@ export default defineComponent({ IonMenuButton, IonPage, IonRow, + IonSpinner, IonTitle, IonToggle, IonToolbar, @@ -138,7 +146,8 @@ export default defineComponent({ isJobDetailAnimationCompleted: false, isDesktop: isPlatform('desktop'), enumTypeId: 'BROKER_SYS_JOB', - initialLoadJobEnums: JSON.parse(process.env?.VUE_APP_INITIAL_JOB_ENUMS as string) as any + initialLoadJobEnums: JSON.parse(process.env?.VUE_APP_INITIAL_JOB_ENUMS as string) as any, + jobsLoading: false } }, computed: { @@ -209,6 +218,12 @@ export default defineComponent({ translate('Disabled') }, async fetchJobs() { + this.jobsLoading = true; + this.currentJob = ""; + await this.store.dispatch('job/updateCurrentJob', { }); + this.currentJobStatus = ""; + this.freqType = ""; + this.isJobDetailAnimationCompleted = false; await this.store.dispatch("job/fetchJobs", { "inputFields": { // If we fetch broker sys job by not passing systemJobEnumId filter then this api @@ -225,6 +240,7 @@ export default defineComponent({ "systemJobEnumId_op": "in" } }); + this.jobsLoading = false; }, timeFromNow(time: any) { const timeDiff = DateTime.fromMillis(time).diff(DateTime.local()); diff --git a/src/views/Fulfillment.vue b/src/views/Fulfillment.vue index e1becc8e..ae112ad4 100644 --- a/src/views/Fulfillment.vue +++ b/src/views/Fulfillment.vue @@ -8,7 +8,13 @@ -
+
+ + + {{ translate("Fetching jobs") }} + +
+
@@ -110,6 +116,7 @@ import { IonLabel, IonMenuButton, IonPage, + IonSpinner, IonTitle, IonToggle, IonToolbar, @@ -142,6 +149,7 @@ export default defineComponent({ IonLabel, IonMenuButton, IonPage, + IonSpinner, IonTitle, IonToggle, IonToolbar, @@ -159,7 +167,8 @@ export default defineComponent({ isDesktop: isPlatform('desktop'), autoCancelDays: '', enumTypeId: 'FULFILLMENT_SYS_JOB', - initialLoadJobEnums: JSON.parse(process.env?.VUE_APP_INITIAL_JOB_ENUMS as string) as any + initialLoadJobEnums: JSON.parse(process.env?.VUE_APP_INITIAL_JOB_ENUMS as string) as any, + jobsLoading: false } }, computed: { @@ -233,6 +242,12 @@ export default defineComponent({ } }, async fetchJobs(){ + this.jobsLoading = true; + this.currentJob = ""; + await this.store.dispatch('job/updateCurrentJob', { }); + this.currentJobStatus = ""; + this.freqType = ""; + this.isJobDetailAnimationCompleted = false; await this.store.dispatch("job/fetchJobs", { "inputFields": { "enumTypeId": "FULFILLMENT_SYS_JOB" @@ -241,6 +256,7 @@ export default defineComponent({ if (this.currentEComStore.productStoreId) { this.getAutoCancelDays(); } + this.jobsLoading = false; }, async getAutoCancelDays(){ const payload = { diff --git a/src/views/InitialLoad.vue b/src/views/InitialLoad.vue index e1ec23dc..c7e62a8b 100644 --- a/src/views/InitialLoad.vue +++ b/src/views/InitialLoad.vue @@ -8,7 +8,13 @@ -
+
+ + + {{ translate("Fetching jobs") }} + +
+
@@ -74,6 +80,7 @@ import { IonLabel, IonMenuButton, IonPage, + IonSpinner, IonTitle, IonToggle, IonToolbar, @@ -103,6 +110,7 @@ export default defineComponent({ IonLabel, IonMenuButton, IonPage, + IonSpinner, IonTitle, IonToggle, IonToolbar @@ -115,7 +123,8 @@ export default defineComponent({ job: {} as any, lastShopifyOrderId: '', isJobDetailAnimationCompleted: false, - isDesktop: isPlatform('desktop') + isDesktop: isPlatform('desktop'), + jobsLoading: false } }, mounted() { @@ -207,14 +216,21 @@ export default defineComponent({ this.isJobDetailAnimationCompleted = true; } }, - fetchJobs(){ - this.store.dispatch("job/fetchJobs", { + async fetchJobs(){ + this.jobsLoading = true; + this.currentSelectedJobModal = ""; + await this.store.dispatch('job/updateCurrentJob', { }); + this.job = {}; + this.lastShopifyOrderId = ""; + this.isJobDetailAnimationCompleted = false; + await this.store.dispatch("job/fetchJobs", { "inputFields":{ "systemJobEnumId": Object.values(this.jobEnums), "systemJobEnumId_op": "in" } }) this.store.dispatch('webhook/fetchWebhooks') + this.jobsLoading = false; }, async updateWebhook(checked: boolean, enumId: string) { const webhook = this.getCachedWebhook[this.webhookEnums[enumId]] diff --git a/src/views/Inventory.vue b/src/views/Inventory.vue index 877f055c..77384625 100644 --- a/src/views/Inventory.vue +++ b/src/views/Inventory.vue @@ -8,7 +8,13 @@ -
+
+ + + {{ translate("Fetching jobs") }} + +
+
@@ -56,6 +62,7 @@ import { IonLabel, IonMenuButton, IonPage, + IonSpinner, IonTitle, IonToggle, IonToolbar, @@ -83,6 +90,7 @@ export default defineComponent({ IonLabel, IonMenuButton, IonPage, + IonSpinner, IonTitle, IonToggle, IonToolbar, @@ -100,6 +108,7 @@ export default defineComponent({ isDesktop: isPlatform('desktop'), enumTypeId: 'INVENTORY_SYS_JOB', webhookEnums: JSON.parse(process.env?.VUE_APP_WEBHOOK_ENUMS as string) as any, + jobsLoading: false } }, computed: { @@ -165,16 +174,23 @@ export default defineComponent({ this.getTemporalExpr(this.getJobStatus(this.jobEnums[enumId]))?.description : translate('Disabled') }, - fetchJobs(){ - this.store.dispatch("job/fetchJobs", { + async fetchJobs(){ + await this.store.dispatch("job/fetchJobs", { "inputFields":{ "enumTypeId": "INVENTORY_SYS_JOB" } }); }, - fetchData() { + async fetchData() { + this.jobsLoading = true; + this.currentJob = ""; + await this.store.dispatch('job/updateCurrentJob', { }); + this.currentJobStatus = ""; + this.freqType = ""; + this.isJobDetailAnimationCompleted = false; this.store.dispatch('webhook/fetchWebhooks') - this.fetchJobs() + await this.fetchJobs() + this.jobsLoading = false; } }, mounted () { diff --git a/src/views/Miscellaneous.vue b/src/views/Miscellaneous.vue index eaba4aad..b29bd5d2 100644 --- a/src/views/Miscellaneous.vue +++ b/src/views/Miscellaneous.vue @@ -8,7 +8,13 @@ -
+
+ + + {{ translate("Fetching jobs") }} + +
+
@@ -108,6 +114,7 @@ export default defineComponent({ isJobDetailAnimationCompleted: false, isDesktop: isPlatform('desktop'), isRetrying: false, + jobsLoading: false } }, computed: { @@ -150,7 +157,13 @@ export default defineComponent({ } }, async getMiscellaneousJobs(viewSize = 100, viewIndex = 0) { + this.jobsLoading = true; + this.currentJob = ""; + await this.store.dispatch('job/updateCurrentJob', { }); + this.currentJobStatus = ""; + this.isJobDetailAnimationCompleted = false; await this.store.dispatch('job/fetchMiscellaneousJobs', {eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex}); + this.jobsLoading = false; }, async loadMoreMiscellaneousJobs (event: any) { this.getMiscellaneousJobs( diff --git a/src/views/Orders.vue b/src/views/Orders.vue index 91adf507..f8dc427f 100644 --- a/src/views/Orders.vue +++ b/src/views/Orders.vue @@ -8,7 +8,13 @@ -
+
+ + + {{ translate("Fetching jobs") }} + +
+
@@ -105,6 +111,7 @@ import { IonLabel, IonMenuButton, IonPage, + IonSpinner, IonTitle, IonToggle, IonToolbar, @@ -133,6 +140,7 @@ export default defineComponent({ IonLabel, IonMenuButton, IonPage, + IonSpinner, IonTitle, IonToggle, IonToolbar, @@ -150,7 +158,8 @@ export default defineComponent({ isJobDetailAnimationCompleted: false, isDesktop: isPlatform('desktop'), enumTypeId: 'ORDER_SYS_JOB', - initialLoadJobEnums: JSON.parse(process.env?.VUE_APP_INITIAL_JOB_ENUMS as string) as any + initialLoadJobEnums: JSON.parse(process.env?.VUE_APP_INITIAL_JOB_ENUMS as string) as any, + jobsLoading: false } }, computed: { @@ -268,12 +277,19 @@ export default defineComponent({ translate('Disabled') }, async fetchJobs(){ + this.jobsLoading = true; + this.currentJob = "" + await this.store.dispatch('job/updateCurrentJob', { }); + this.currentJobStatus = "" + this.freqType = "" + this.isJobDetailAnimationCompleted = false this.store.dispatch('webhook/fetchWebhooks') await this.store.dispatch("job/fetchJobs", { "inputFields": { "enumTypeId": "ORDER_SYS_JOB" } }); + this.jobsLoading = false; } }, mounted () { diff --git a/src/views/Pipeline.vue b/src/views/Pipeline.vue index 2e8164fd..968c2159 100644 --- a/src/views/Pipeline.vue +++ b/src/views/Pipeline.vue @@ -31,7 +31,13 @@ -
+
+ + + {{ translate("Fetching jobs") }} + +
+
@@ -360,7 +366,8 @@ export default defineComponent({ isDesktop: isPlatform('desktop'), isRetrying: false, queryString: '' as any, - isScrollingEnabled: false + isScrollingEnabled: false, + jobsLoading: false } }, computed: { @@ -501,17 +508,17 @@ export default defineComponent({ async refreshJobs(event: any, isRetrying = false ) { this.isRetrying = isRetrying; if(this.segmentSelected === 'pending') { - this.getPendingJobs().then(() => { + await this.getPendingJobs().then(() => { if(event) event.target.complete(); this.isRetrying = false; }); } else if(this.segmentSelected === 'running') { - this.getRunningJobs().then(() => { + await this.getRunningJobs().then(() => { if(event) event.target.complete(); this.isRetrying = false; }); } else { - this.getJobHistory().then(() => { + await this.getJobHistory().then(() => { if(event) event.target.complete(); this.isRetrying = false; }); @@ -635,6 +642,15 @@ export default defineComponent({ this.getPendingJobs(); } }, + async updateProductStoreConfig() { + this.jobsLoading = true; + await this.store.dispatch('job/updateCurrentJob', { job: {} }); + this.currentJobStatus = "" + this.freqType = "" + this.isJobDetailAnimationCompleted = false + await this.refreshJobs(undefined, false); + this.jobsLoading = false; + } }, async created() { this.getPendingJobs(); @@ -646,11 +662,11 @@ export default defineComponent({ await this.store.dispatch('job/updateCurrentJob', { job: {} }); }, mounted(){ - emitter.on("productStoreOrConfigChanged", this.refreshJobs); + emitter.on("productStoreOrConfigChanged", this.updateProductStoreConfig); emitter.on("pinnedJobsUpdated", (this as any).updateSelectedPinnedJob); }, unmounted(){ - emitter.off("productStoreOrConfigChanged", this.refreshJobs); + emitter.off("productStoreOrConfigChanged", this.updateProductStoreConfig); emitter.off('jobUpdated', this.updateJobs); emitter.off("pinnedJobsUpdated", (this as any).updateSelectedPinnedJob); }, diff --git a/src/views/PreOrder.vue b/src/views/PreOrder.vue index ec1d0cbb..78823eb9 100644 --- a/src/views/PreOrder.vue +++ b/src/views/PreOrder.vue @@ -8,7 +8,13 @@ -
+
+ + + {{ translate("Fetching jobs") }} + +
+
@@ -185,6 +191,7 @@ import { IonLabel, IonMenuButton, IonPage, + IonSpinner, IonTitle, IonToolbar, isPlatform @@ -218,6 +225,7 @@ export default defineComponent({ IonLabel, IonMenuButton, IonPage, + IonSpinner, IonTitle, IonToolbar, JobConfiguration, @@ -244,7 +252,8 @@ export default defineComponent({ isJobDetailAnimationCompleted: false, isDesktop: isPlatform('desktop'), enumTypeId: 'PRE_ORD_SYS_JOB', - preOrderBackorderCategory: {} as any + preOrderBackorderCategory: {} as any, + jobsLoading: false } }, methods: { @@ -356,16 +365,23 @@ export default defineComponent({ this.getTemporalExpr(this.getJobStatus(this.jobEnums[enumId]))?.description : translate('Disabled') }, - fetchJobs(){ - this.store.dispatch("job/fetchJobs", { + async fetchJobs(){ + await this.store.dispatch("job/fetchJobs", { "inputFields":{ "enumTypeId": "PRE_ORD_SYS_JOB" } }); }, - fetchInitialData() { - this.fetchJobs(); - this.getPreOrderBackorderCategory(); + async fetchInitialData() { + this.jobsLoading = true; + this.currentJob = ""; + await this.store.dispatch('job/updateCurrentJob', { }); + this.currentJobStatus = "" + this.freqType = ''; + this.isJobDetailAnimationCompleted = false; + await this.fetchJobs(); + await this.getPreOrderBackorderCategory(); + this.jobsLoading = false; } }, mounted () { diff --git a/src/views/Product.vue b/src/views/Product.vue index 07515198..a502098f 100644 --- a/src/views/Product.vue +++ b/src/views/Product.vue @@ -8,7 +8,13 @@ -
+
+ + + {{ translate("Fetching jobs") }} + +
+
@@ -64,6 +70,7 @@ import { IonLabel, IonMenuButton, IonPage, + IonSpinner, IonTitle, IonToolbar, IonToggle, @@ -91,6 +98,7 @@ export default defineComponent({ IonLabel, IonMenuButton, IonPage, + IonSpinner, IonTitle, IonToolbar, IonToggle, @@ -126,7 +134,8 @@ export default defineComponent({ isDesktop: isPlatform('desktop'), webhookEnums: JSON.parse(process.env?.VUE_APP_WEBHOOK_ENUMS as string) as any, enumTypeId: 'PRODUCT_SYS_JOB', - initialLoadJobEnums: JSON.parse(process.env?.VUE_APP_INITIAL_JOB_ENUMS as string) as any + initialLoadJobEnums: JSON.parse(process.env?.VUE_APP_INITIAL_JOB_ENUMS as string) as any, + jobsLoading: false } }, mounted () { @@ -187,13 +196,20 @@ export default defineComponent({ this.getTemporalExpr(this.getJobStatus(this.jobEnums[enumId]))?.description : translate('Disabled') }, - fetchJobs(){ - this.store.dispatch("job/fetchJobs", { + async fetchJobs(){ + this.jobsLoading = true; + this.currentJob = "" + await this.store.dispatch('job/updateCurrentJob', { }); + this.currentJobStatus = "" + this.freqType = "" + this.isJobDetailAnimationCompleted = false + await this.store.dispatch("job/fetchJobs", { "inputFields":{ "enumTypeId": "PRODUCT_SYS_JOB" } }); this.store.dispatch('webhook/fetchWebhooks') + this.jobsLoading = false; } }, setup() { diff --git a/src/views/Reports.vue b/src/views/Reports.vue index e83e0204..80fb169f 100644 --- a/src/views/Reports.vue +++ b/src/views/Reports.vue @@ -8,7 +8,13 @@ -
+
+ + + {{ translate("Fetching jobs") }} + +
+

{{ translate("There are no reports jobs right now") }}

@@ -98,6 +104,7 @@ export default defineComponent({ isJobDetailAnimationCompleted: false, isDesktop: isPlatform('desktop'), isRetrying: false, + jobsLoading: false } }, computed: { @@ -138,7 +145,13 @@ export default defineComponent({ } }, async getReportsJobs(viewSize = 200, viewIndex = 0) { + this.jobsLoading = true; + this.currentJob = ""; + await this.store.dispatch('job/updateCurrentJob', { }); + this.currentJobStatus = ""; + this.isJobDetailAnimationCompleted = false; await this.store.dispatch('job/fetchReportsJobs', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex }); + this.jobsLoading = false; }, async loadMoreReportsJobs(event: any) { this.getReportsJobs( From b682ade02795819d4b818cd8107743ed387c9d2f Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Fri, 9 Aug 2024 12:28:22 +0530 Subject: [PATCH 2/7] Improved: added missing locale entry for the spinner static text (#720) --- src/locales/en.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/locales/en.json b/src/locales/en.json index a0250ee1..d4648be1 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -90,6 +90,7 @@ "Failed": "Failed", "Failed job reason": "Failed job reason", "Failed to schedule service(s)": "Failed to schedule {count} service(s)", + "Fetching jobs": "Fetching jobs", "Fetching TimeZones": "Fetching TimeZones", "File upload status": "File upload status", "Filters": "Filters", From 0eed41fa9b1ef31c4a6e58806ca4aa9660d543de Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Mon, 25 Nov 2024 10:40:14 +0530 Subject: [PATCH 3/7] Reverted: unnecessary arguments being passed, and unwanted await keyword (#720) --- src/views/Pipeline.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/Pipeline.vue b/src/views/Pipeline.vue index 968c2159..86e8ac1d 100644 --- a/src/views/Pipeline.vue +++ b/src/views/Pipeline.vue @@ -508,17 +508,17 @@ export default defineComponent({ async refreshJobs(event: any, isRetrying = false ) { this.isRetrying = isRetrying; if(this.segmentSelected === 'pending') { - await this.getPendingJobs().then(() => { + this.getPendingJobs().then(() => { if(event) event.target.complete(); this.isRetrying = false; }); } else if(this.segmentSelected === 'running') { - await this.getRunningJobs().then(() => { + this.getRunningJobs().then(() => { if(event) event.target.complete(); this.isRetrying = false; }); } else { - await this.getJobHistory().then(() => { + this.getJobHistory().then(() => { if(event) event.target.complete(); this.isRetrying = false; }); @@ -547,7 +547,7 @@ export default defineComponent({ text: translate('Skip'), handler: async () => { if(this.isRuntimePassed(job)) { - await this.refreshJobs(undefined, true) + await this.refreshJobs(undefined) showToast(translate("Job runtime has passed. The job data has refreshed. Please try again.")) await this.store.dispatch('job/updateCurrentJob', { job: {} }); return; @@ -593,7 +593,7 @@ export default defineComponent({ text: translate("CANCEL"), handler: async () => { if(this.isRuntimePassed(job)) { - await this.refreshJobs(undefined, true) + await this.refreshJobs(undefined) showToast(translate("Job runtime has passed. The job data has refreshed. Please try again.")) await this.store.dispatch('job/updateCurrentJob', { job: {} }); return; @@ -648,7 +648,7 @@ export default defineComponent({ this.currentJobStatus = "" this.freqType = "" this.isJobDetailAnimationCompleted = false - await this.refreshJobs(undefined, false); + await this.refreshJobs(undefined); this.jobsLoading = false; } }, From 7e556a989d83665e93813bec69cbe9b63cb9d092 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Mon, 25 Nov 2024 11:49:33 +0530 Subject: [PATCH 4/7] Improved: code to only dismiss the configuration card in case of product store change (#720) --- src/components/Menu.vue | 4 ++-- src/views/Brokering.vue | 16 +++++++++------- src/views/Fulfillment.vue | 16 +++++++++------- src/views/InitialLoad.vue | 16 +++++++++------- src/views/Inventory.vue | 16 +++++++++------- src/views/Miscellaneous.vue | 19 ++++++++++++------- src/views/Orders.vue | 16 +++++++++------- src/views/Pipeline.vue | 21 ++++++++++++--------- src/views/PreOrder.vue | 16 +++++++++------- src/views/Product.vue | 16 +++++++++------- src/views/Reports.vue | 19 ++++++++++++------- 11 files changed, 101 insertions(+), 74 deletions(-) diff --git a/src/components/Menu.vue b/src/components/Menu.vue index f5388823..b31672c2 100644 --- a/src/components/Menu.vue +++ b/src/components/Menu.vue @@ -83,12 +83,12 @@ export default defineComponent({ async setEComStore(event: CustomEvent) { if(this.userProfile && this.eComStore?.productStoreId !== event.detail.value) { await this.store.dispatch('user/setEcomStore', { 'productStoreId': event.detail.value }) - emitter.emit("productStoreOrConfigChanged") + emitter.emit("productStoreOrConfigChanged", true) } }, async setShopifyConfig(event: CustomEvent){ await this.store.dispatch('user/setCurrentShopifyConfig', { 'shopifyConfigId': event.detail.value }); - emitter.emit("productStoreOrConfigChanged") + emitter.emit("productStoreOrConfigChanged", true) } }, setup() { diff --git a/src/views/Brokering.vue b/src/views/Brokering.vue index 186c253f..9e3c293a 100644 --- a/src/views/Brokering.vue +++ b/src/views/Brokering.vue @@ -217,13 +217,15 @@ export default defineComponent({ this.getTemporalExpr(this.getJobStatus(this.jobEnums[enumId]))?.description : translate('Disabled') }, - async fetchJobs() { - this.jobsLoading = true; - this.currentJob = ""; - await this.store.dispatch('job/updateCurrentJob', { }); - this.currentJobStatus = ""; - this.freqType = ""; - this.isJobDetailAnimationCompleted = false; + async fetchJobs(JobDetailDismissRequired = false) { + if(JobDetailDismissRequired) { + this.jobsLoading = true; + this.currentJob = ""; + await this.store.dispatch('job/updateCurrentJob', { }); + this.currentJobStatus = ""; + this.freqType = ""; + this.isJobDetailAnimationCompleted = false; + } await this.store.dispatch("job/fetchJobs", { "inputFields": { // If we fetch broker sys job by not passing systemJobEnumId filter then this api diff --git a/src/views/Fulfillment.vue b/src/views/Fulfillment.vue index ae112ad4..9303dd88 100644 --- a/src/views/Fulfillment.vue +++ b/src/views/Fulfillment.vue @@ -241,13 +241,15 @@ export default defineComponent({ this.store.dispatch('job/updateJob', job) } }, - async fetchJobs(){ - this.jobsLoading = true; - this.currentJob = ""; - await this.store.dispatch('job/updateCurrentJob', { }); - this.currentJobStatus = ""; - this.freqType = ""; - this.isJobDetailAnimationCompleted = false; + async fetchJobs(JobDetailDismissRequired = false){ + if(JobDetailDismissRequired) { + this.jobsLoading = true; + this.currentJob = ""; + await this.store.dispatch('job/updateCurrentJob', { }); + this.currentJobStatus = ""; + this.freqType = ""; + this.isJobDetailAnimationCompleted = false; + } await this.store.dispatch("job/fetchJobs", { "inputFields": { "enumTypeId": "FULFILLMENT_SYS_JOB" diff --git a/src/views/InitialLoad.vue b/src/views/InitialLoad.vue index c7e62a8b..84d3de1e 100644 --- a/src/views/InitialLoad.vue +++ b/src/views/InitialLoad.vue @@ -216,13 +216,15 @@ export default defineComponent({ this.isJobDetailAnimationCompleted = true; } }, - async fetchJobs(){ - this.jobsLoading = true; - this.currentSelectedJobModal = ""; - await this.store.dispatch('job/updateCurrentJob', { }); - this.job = {}; - this.lastShopifyOrderId = ""; - this.isJobDetailAnimationCompleted = false; + async fetchJobs(JobDetailDismissRequired = false){ + if(JobDetailDismissRequired) { + this.jobsLoading = true; + this.currentSelectedJobModal = ""; + await this.store.dispatch('job/updateCurrentJob', { }); + this.job = {}; + this.lastShopifyOrderId = ""; + this.isJobDetailAnimationCompleted = false; + } await this.store.dispatch("job/fetchJobs", { "inputFields":{ "systemJobEnumId": Object.values(this.jobEnums), diff --git a/src/views/Inventory.vue b/src/views/Inventory.vue index 77384625..c7816ae3 100644 --- a/src/views/Inventory.vue +++ b/src/views/Inventory.vue @@ -181,13 +181,15 @@ export default defineComponent({ } }); }, - async fetchData() { - this.jobsLoading = true; - this.currentJob = ""; - await this.store.dispatch('job/updateCurrentJob', { }); - this.currentJobStatus = ""; - this.freqType = ""; - this.isJobDetailAnimationCompleted = false; + async fetchData(JobDetailDismissRequired = false) { + if(JobDetailDismissRequired) { + this.jobsLoading = true; + this.currentJob = ""; + await this.store.dispatch('job/updateCurrentJob', { }); + this.currentJobStatus = ""; + this.freqType = ""; + this.isJobDetailAnimationCompleted = false; + } this.store.dispatch('webhook/fetchWebhooks') await this.fetchJobs() this.jobsLoading = false; diff --git a/src/views/Miscellaneous.vue b/src/views/Miscellaneous.vue index b29bd5d2..02f44eda 100644 --- a/src/views/Miscellaneous.vue +++ b/src/views/Miscellaneous.vue @@ -101,10 +101,10 @@ export default defineComponent({ mounted() { emitter.on('jobUpdated', this.getMiscellaneousJobs); this.getMiscellaneousJobs(); - emitter.on("productStoreOrConfigChanged", this.getMiscellaneousJobs); + emitter.on("productStoreOrConfigChanged", this.updateProductStoreConfig); }, unmounted() { - emitter.off("productStoreOrConfigChanged", this.getMiscellaneousJobs); + emitter.off("productStoreOrConfigChanged", this.updateProductStoreConfig); emitter.off('jobUpdated', this.getMiscellaneousJobs); }, data() { @@ -157,12 +157,17 @@ export default defineComponent({ } }, async getMiscellaneousJobs(viewSize = 100, viewIndex = 0) { - this.jobsLoading = true; - this.currentJob = ""; - await this.store.dispatch('job/updateCurrentJob', { }); - this.currentJobStatus = ""; - this.isJobDetailAnimationCompleted = false; await this.store.dispatch('job/fetchMiscellaneousJobs', {eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex}); + }, + async updateProductStoreConfig(JobDetailDismissRequired = false) { + if(JobDetailDismissRequired) { + this.jobsLoading = true; + this.currentJob = ""; + await this.store.dispatch('job/updateCurrentJob', { }); + this.currentJobStatus = ""; + this.isJobDetailAnimationCompleted = false; + } + this.getMiscellaneousJobs(); this.jobsLoading = false; }, async loadMoreMiscellaneousJobs (event: any) { diff --git a/src/views/Orders.vue b/src/views/Orders.vue index f8dc427f..643f3843 100644 --- a/src/views/Orders.vue +++ b/src/views/Orders.vue @@ -276,13 +276,15 @@ export default defineComponent({ this.getTemporalExpr(this.getJobStatus(this.jobEnums[enumId]))?.description : translate('Disabled') }, - async fetchJobs(){ - this.jobsLoading = true; - this.currentJob = "" - await this.store.dispatch('job/updateCurrentJob', { }); - this.currentJobStatus = "" - this.freqType = "" - this.isJobDetailAnimationCompleted = false + async fetchJobs(JobDetailDismissRequired = false){ + if(JobDetailDismissRequired) { + this.jobsLoading = true; + this.currentJob = "" + await this.store.dispatch('job/updateCurrentJob', { }); + this.currentJobStatus = "" + this.freqType = "" + this.isJobDetailAnimationCompleted = false + } this.store.dispatch('webhook/fetchWebhooks') await this.store.dispatch("job/fetchJobs", { "inputFields": { diff --git a/src/views/Pipeline.vue b/src/views/Pipeline.vue index f0874d7f..ce407222 100644 --- a/src/views/Pipeline.vue +++ b/src/views/Pipeline.vue @@ -508,17 +508,17 @@ export default defineComponent({ async refreshJobs(event: any, isRetrying = false ) { this.isRetrying = isRetrying; if(this.segmentSelected === 'pending') { - this.getPendingJobs().then(() => { + await this.getPendingJobs().then(() => { if(event) event.target.complete(); this.isRetrying = false; }); } else if(this.segmentSelected === 'running') { - this.getRunningJobs().then(() => { + await this.getRunningJobs().then(() => { if(event) event.target.complete(); this.isRetrying = false; }); } else { - this.getJobHistory().then(() => { + await this.getJobHistory().then(() => { if(event) event.target.complete(); this.isRetrying = false; }); @@ -645,12 +645,15 @@ export default defineComponent({ this.getPendingJobs(); } }, - async updateProductStoreConfig() { - this.jobsLoading = true; - await this.store.dispatch('job/updateCurrentJob', { job: {} }); - this.currentJobStatus = "" - this.freqType = "" - this.isJobDetailAnimationCompleted = false + async updateProductStoreConfig(JobDetailDismissRequired = false) { + if(JobDetailDismissRequired) { + this.jobsLoading = true; + console.log('if') + await this.store.dispatch('job/updateCurrentJob', { job: {} }); + this.currentJobStatus = "" + this.freqType = "" + this.isJobDetailAnimationCompleted = false + } await this.refreshJobs(undefined); this.jobsLoading = false; } diff --git a/src/views/PreOrder.vue b/src/views/PreOrder.vue index 78823eb9..b1adcf3a 100644 --- a/src/views/PreOrder.vue +++ b/src/views/PreOrder.vue @@ -372,13 +372,15 @@ export default defineComponent({ } }); }, - async fetchInitialData() { - this.jobsLoading = true; - this.currentJob = ""; - await this.store.dispatch('job/updateCurrentJob', { }); - this.currentJobStatus = "" - this.freqType = ''; - this.isJobDetailAnimationCompleted = false; + async fetchInitialData(JobDetailDismissRequired = false) { + if(JobDetailDismissRequired) { + this.jobsLoading = true; + this.currentJob = ""; + await this.store.dispatch('job/updateCurrentJob', { }); + this.currentJobStatus = "" + this.freqType = ''; + this.isJobDetailAnimationCompleted = false; + } await this.fetchJobs(); await this.getPreOrderBackorderCategory(); this.jobsLoading = false; diff --git a/src/views/Product.vue b/src/views/Product.vue index a502098f..1f63b10e 100644 --- a/src/views/Product.vue +++ b/src/views/Product.vue @@ -196,13 +196,15 @@ export default defineComponent({ this.getTemporalExpr(this.getJobStatus(this.jobEnums[enumId]))?.description : translate('Disabled') }, - async fetchJobs(){ - this.jobsLoading = true; - this.currentJob = "" - await this.store.dispatch('job/updateCurrentJob', { }); - this.currentJobStatus = "" - this.freqType = "" - this.isJobDetailAnimationCompleted = false + async fetchJobs(JobDetailDismissRequired = false){ + if(JobDetailDismissRequired) { + this.jobsLoading = true; + this.currentJob = "" + await this.store.dispatch('job/updateCurrentJob', { }); + this.currentJobStatus = "" + this.freqType = "" + this.isJobDetailAnimationCompleted = false + } await this.store.dispatch("job/fetchJobs", { "inputFields":{ "enumTypeId": "PRODUCT_SYS_JOB" diff --git a/src/views/Reports.vue b/src/views/Reports.vue index 80fb169f..ac6dc03b 100644 --- a/src/views/Reports.vue +++ b/src/views/Reports.vue @@ -117,11 +117,11 @@ export default defineComponent({ mounted() { emitter.on('jobUpdated', this.getReportsJobs); this.getReportsJobs(); - emitter.on("productStoreOrConfigChanged", this.getReportsJobs); + emitter.on("productStoreOrConfigChanged", this.updateProductStoreConfig); }, unmounted() { emitter.on('jobUpdated', this.getReportsJobs); - emitter.off("productStoreOrConfigChanged", this.getReportsJobs); + emitter.off("productStoreOrConfigChanged", this.updateProductStoreConfig); }, methods: { async viewJobConfiguration(job: any) { @@ -145,12 +145,17 @@ export default defineComponent({ } }, async getReportsJobs(viewSize = 200, viewIndex = 0) { - this.jobsLoading = true; - this.currentJob = ""; - await this.store.dispatch('job/updateCurrentJob', { }); - this.currentJobStatus = ""; - this.isJobDetailAnimationCompleted = false; await this.store.dispatch('job/fetchReportsJobs', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex }); + }, + async updateProductStoreConfig(JobDetailDismissRequired = false) { + if(JobDetailDismissRequired) { + this.jobsLoading = true; + this.currentJob = ""; + await this.store.dispatch('job/updateCurrentJob', { }); + this.currentJobStatus = ""; + this.isJobDetailAnimationCompleted = false; + } + await this.getReportsJobs() this.jobsLoading = false; }, async loadMoreReportsJobs(event: any) { From ebf49f20ff163a092c12008fb144dc091fa5f0a8 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Mon, 25 Nov 2024 11:53:51 +0530 Subject: [PATCH 5/7] Reverted: unwanted console statement from the code (#720) --- src/views/Pipeline.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/views/Pipeline.vue b/src/views/Pipeline.vue index ce407222..3b4635c1 100644 --- a/src/views/Pipeline.vue +++ b/src/views/Pipeline.vue @@ -648,7 +648,6 @@ export default defineComponent({ async updateProductStoreConfig(JobDetailDismissRequired = false) { if(JobDetailDismissRequired) { this.jobsLoading = true; - console.log('if') await this.store.dispatch('job/updateCurrentJob', { job: {} }); this.currentJobStatus = "" this.freqType = "" From b35df664ea71127dad6bd0475cd3e28b4d0a6632 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Tue, 26 Nov 2024 15:02:26 +0530 Subject: [PATCH 6/7] Reverted: unwanted spinner on the pages since we have added skeleton text (#720) --- src/views/Brokering.vue | 15 ++------------- src/views/InitialLoad.vue | 15 ++------------- src/views/Miscellaneous.vue | 15 ++------------- src/views/PreOrder.vue | 15 ++------------- src/views/Reports.vue | 15 ++------------- 5 files changed, 10 insertions(+), 65 deletions(-) diff --git a/src/views/Brokering.vue b/src/views/Brokering.vue index 9e3c293a..3380bda7 100644 --- a/src/views/Brokering.vue +++ b/src/views/Brokering.vue @@ -8,13 +8,7 @@ -
- - - {{ translate("Fetching jobs") }} - -
-
+
{{ translate('Create new brokering job') }} @@ -89,7 +83,6 @@ import { IonMenuButton, IonPage, IonRow, - IonSpinner, IonTitle, IonToggle, IonToolbar, @@ -128,7 +121,6 @@ export default defineComponent({ IonMenuButton, IonPage, IonRow, - IonSpinner, IonTitle, IonToggle, IonToolbar, @@ -146,8 +138,7 @@ export default defineComponent({ isJobDetailAnimationCompleted: false, isDesktop: isPlatform('desktop'), enumTypeId: 'BROKER_SYS_JOB', - initialLoadJobEnums: JSON.parse(process.env?.VUE_APP_INITIAL_JOB_ENUMS as string) as any, - jobsLoading: false + initialLoadJobEnums: JSON.parse(process.env?.VUE_APP_INITIAL_JOB_ENUMS as string) as any } }, computed: { @@ -219,7 +210,6 @@ export default defineComponent({ }, async fetchJobs(JobDetailDismissRequired = false) { if(JobDetailDismissRequired) { - this.jobsLoading = true; this.currentJob = ""; await this.store.dispatch('job/updateCurrentJob', { }); this.currentJobStatus = ""; @@ -242,7 +232,6 @@ export default defineComponent({ "systemJobEnumId_op": "in" } }); - this.jobsLoading = false; }, timeFromNow(time: any) { const timeDiff = DateTime.fromMillis(time).diff(DateTime.local()); diff --git a/src/views/InitialLoad.vue b/src/views/InitialLoad.vue index 84d3de1e..6d4c39a4 100644 --- a/src/views/InitialLoad.vue +++ b/src/views/InitialLoad.vue @@ -8,13 +8,7 @@ -
- - - {{ translate("Fetching jobs") }} - -
-
+
@@ -80,7 +74,6 @@ import { IonLabel, IonMenuButton, IonPage, - IonSpinner, IonTitle, IonToggle, IonToolbar, @@ -110,7 +103,6 @@ export default defineComponent({ IonLabel, IonMenuButton, IonPage, - IonSpinner, IonTitle, IonToggle, IonToolbar @@ -123,8 +115,7 @@ export default defineComponent({ job: {} as any, lastShopifyOrderId: '', isJobDetailAnimationCompleted: false, - isDesktop: isPlatform('desktop'), - jobsLoading: false + isDesktop: isPlatform('desktop') } }, mounted() { @@ -218,7 +209,6 @@ export default defineComponent({ }, async fetchJobs(JobDetailDismissRequired = false){ if(JobDetailDismissRequired) { - this.jobsLoading = true; this.currentSelectedJobModal = ""; await this.store.dispatch('job/updateCurrentJob', { }); this.job = {}; @@ -232,7 +222,6 @@ export default defineComponent({ } }) this.store.dispatch('webhook/fetchWebhooks') - this.jobsLoading = false; }, async updateWebhook(checked: boolean, enumId: string) { const webhook = this.getCachedWebhook[this.webhookEnums[enumId]] diff --git a/src/views/Miscellaneous.vue b/src/views/Miscellaneous.vue index 02f44eda..abc0d0f9 100644 --- a/src/views/Miscellaneous.vue +++ b/src/views/Miscellaneous.vue @@ -8,13 +8,7 @@ -
- - - {{ translate("Fetching jobs") }} - -
-
+
@@ -65,7 +59,6 @@ import { IonMenuButton, IonNote, IonPage, - IonSpinner, IonTitle, IonToolbar, isPlatform, @@ -93,7 +86,6 @@ export default defineComponent({ IonMenuButton, IonNote, IonPage, - IonSpinner, IonTitle, IonToolbar, JobConfiguration @@ -113,8 +105,7 @@ export default defineComponent({ currentJobStatus: '', isJobDetailAnimationCompleted: false, isDesktop: isPlatform('desktop'), - isRetrying: false, - jobsLoading: false + isRetrying: false } }, computed: { @@ -161,14 +152,12 @@ export default defineComponent({ }, async updateProductStoreConfig(JobDetailDismissRequired = false) { if(JobDetailDismissRequired) { - this.jobsLoading = true; this.currentJob = ""; await this.store.dispatch('job/updateCurrentJob', { }); this.currentJobStatus = ""; this.isJobDetailAnimationCompleted = false; } this.getMiscellaneousJobs(); - this.jobsLoading = false; }, async loadMoreMiscellaneousJobs (event: any) { this.getMiscellaneousJobs( diff --git a/src/views/PreOrder.vue b/src/views/PreOrder.vue index b1adcf3a..cf392728 100644 --- a/src/views/PreOrder.vue +++ b/src/views/PreOrder.vue @@ -8,13 +8,7 @@ -
- - - {{ translate("Fetching jobs") }} - -
-
+
@@ -191,7 +185,6 @@ import { IonLabel, IonMenuButton, IonPage, - IonSpinner, IonTitle, IonToolbar, isPlatform @@ -225,7 +218,6 @@ export default defineComponent({ IonLabel, IonMenuButton, IonPage, - IonSpinner, IonTitle, IonToolbar, JobConfiguration, @@ -252,8 +244,7 @@ export default defineComponent({ isJobDetailAnimationCompleted: false, isDesktop: isPlatform('desktop'), enumTypeId: 'PRE_ORD_SYS_JOB', - preOrderBackorderCategory: {} as any, - jobsLoading: false + preOrderBackorderCategory: {} as any } }, methods: { @@ -374,7 +365,6 @@ export default defineComponent({ }, async fetchInitialData(JobDetailDismissRequired = false) { if(JobDetailDismissRequired) { - this.jobsLoading = true; this.currentJob = ""; await this.store.dispatch('job/updateCurrentJob', { }); this.currentJobStatus = "" @@ -383,7 +373,6 @@ export default defineComponent({ } await this.fetchJobs(); await this.getPreOrderBackorderCategory(); - this.jobsLoading = false; } }, mounted () { diff --git a/src/views/Reports.vue b/src/views/Reports.vue index ac6dc03b..33c54381 100644 --- a/src/views/Reports.vue +++ b/src/views/Reports.vue @@ -8,13 +8,7 @@ -
- - - {{ translate("Fetching jobs") }} - -
-
+

{{ translate("There are no reports jobs right now") }}

@@ -63,7 +57,6 @@ import { IonMenuButton, IonNote, IonPage, - IonSpinner, IonTitle, IonToolbar, isPlatform, @@ -91,7 +84,6 @@ export default defineComponent({ IonMenuButton, IonNote, IonPage, - IonSpinner, IonTitle, IonToolbar, JobConfiguration @@ -103,8 +95,7 @@ export default defineComponent({ currentJobStatus: '', isJobDetailAnimationCompleted: false, isDesktop: isPlatform('desktop'), - isRetrying: false, - jobsLoading: false + isRetrying: false } }, computed: { @@ -149,14 +140,12 @@ export default defineComponent({ }, async updateProductStoreConfig(JobDetailDismissRequired = false) { if(JobDetailDismissRequired) { - this.jobsLoading = true; this.currentJob = ""; await this.store.dispatch('job/updateCurrentJob', { }); this.currentJobStatus = ""; this.isJobDetailAnimationCompleted = false; } await this.getReportsJobs() - this.jobsLoading = false; }, async loadMoreReportsJobs(event: any) { this.getReportsJobs( From 1ebfa471d7c71d3b34ed4145707779e3ffe3e4a0 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Fri, 29 Nov 2024 11:04:06 +0530 Subject: [PATCH 7/7] Improved: updated the variable name for clearing current job for better understanding (#720) --- src/views/Brokering.vue | 4 ++-- src/views/Fulfillment.vue | 4 ++-- src/views/InitialLoad.vue | 4 ++-- src/views/Inventory.vue | 4 ++-- src/views/Miscellaneous.vue | 4 ++-- src/views/Orders.vue | 4 ++-- src/views/Pipeline.vue | 4 ++-- src/views/PreOrder.vue | 4 ++-- src/views/Product.vue | 4 ++-- src/views/Reports.vue | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/views/Brokering.vue b/src/views/Brokering.vue index 3380bda7..2b92075d 100644 --- a/src/views/Brokering.vue +++ b/src/views/Brokering.vue @@ -208,8 +208,8 @@ export default defineComponent({ this.getTemporalExpr(this.getJobStatus(this.jobEnums[enumId]))?.description : translate('Disabled') }, - async fetchJobs(JobDetailDismissRequired = false) { - if(JobDetailDismissRequired) { + async fetchJobs(isCurrentJobUpdateRequired = false) { + if(isCurrentJobUpdateRequired) { this.currentJob = ""; await this.store.dispatch('job/updateCurrentJob', { }); this.currentJobStatus = ""; diff --git a/src/views/Fulfillment.vue b/src/views/Fulfillment.vue index 03fdfe99..2e8a3c11 100644 --- a/src/views/Fulfillment.vue +++ b/src/views/Fulfillment.vue @@ -240,9 +240,9 @@ export default defineComponent({ this.store.dispatch('job/updateJob', job) } }, - async fetchJobs(JobDetailDismissRequired = false){ + async fetchJobs(isCurrentJobUpdateRequired = false){ this.isLoading = true; - if(JobDetailDismissRequired) { + if(isCurrentJobUpdateRequired) { this.currentJob = ""; await this.store.dispatch('job/updateCurrentJob', { }); this.currentJobStatus = ""; diff --git a/src/views/InitialLoad.vue b/src/views/InitialLoad.vue index 6d4c39a4..54bd72cc 100644 --- a/src/views/InitialLoad.vue +++ b/src/views/InitialLoad.vue @@ -207,8 +207,8 @@ export default defineComponent({ this.isJobDetailAnimationCompleted = true; } }, - async fetchJobs(JobDetailDismissRequired = false){ - if(JobDetailDismissRequired) { + async fetchJobs(isCurrentJobUpdateRequired = false){ + if(isCurrentJobUpdateRequired) { this.currentSelectedJobModal = ""; await this.store.dispatch('job/updateCurrentJob', { }); this.job = {}; diff --git a/src/views/Inventory.vue b/src/views/Inventory.vue index 7b2900fe..d7672409 100644 --- a/src/views/Inventory.vue +++ b/src/views/Inventory.vue @@ -178,8 +178,8 @@ export default defineComponent({ }); this.isLoading = false }, - async fetchData(JobDetailDismissRequired = false) { - if(JobDetailDismissRequired) { + async fetchData(isCurrentJobUpdateRequired = false) { + if(isCurrentJobUpdateRequired) { this.currentJob = ""; await this.store.dispatch('job/updateCurrentJob', { }); this.currentJobStatus = ""; diff --git a/src/views/Miscellaneous.vue b/src/views/Miscellaneous.vue index abc0d0f9..447ff4c1 100644 --- a/src/views/Miscellaneous.vue +++ b/src/views/Miscellaneous.vue @@ -150,8 +150,8 @@ export default defineComponent({ async getMiscellaneousJobs(viewSize = 100, viewIndex = 0) { await this.store.dispatch('job/fetchMiscellaneousJobs', {eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex}); }, - async updateProductStoreConfig(JobDetailDismissRequired = false) { - if(JobDetailDismissRequired) { + async updateProductStoreConfig(isCurrentJobUpdateRequired = false) { + if(isCurrentJobUpdateRequired) { this.currentJob = ""; await this.store.dispatch('job/updateCurrentJob', { }); this.currentJobStatus = ""; diff --git a/src/views/Orders.vue b/src/views/Orders.vue index ea47df05..38bbfca1 100644 --- a/src/views/Orders.vue +++ b/src/views/Orders.vue @@ -279,9 +279,9 @@ export default defineComponent({ this.getTemporalExpr(this.getJobStatus(this.jobEnums[enumId]))?.description : translate('Disabled') }, - async fetchJobs(JobDetailDismissRequired = false){ + async fetchJobs(isCurrentJobUpdateRequired = false){ this.isLoading = true; - if(JobDetailDismissRequired) { + if(isCurrentJobUpdateRequired) { this.currentJob = "" await this.store.dispatch('job/updateCurrentJob', { }); this.currentJobStatus = "" diff --git a/src/views/Pipeline.vue b/src/views/Pipeline.vue index 3f70b9c4..b1fdfe5c 100644 --- a/src/views/Pipeline.vue +++ b/src/views/Pipeline.vue @@ -647,8 +647,8 @@ export default defineComponent({ this.getPendingJobs(); } }, - async updateProductStoreConfig(JobDetailDismissRequired = false) { - if(JobDetailDismissRequired) { + async updateProductStoreConfig(isCurrentJobUpdateRequired = false) { + if(isCurrentJobUpdateRequired) { this.jobsLoading = true; await this.store.dispatch('job/updateCurrentJob', { job: {} }); this.currentJobStatus = "" diff --git a/src/views/PreOrder.vue b/src/views/PreOrder.vue index cf392728..7a13c4e6 100644 --- a/src/views/PreOrder.vue +++ b/src/views/PreOrder.vue @@ -363,8 +363,8 @@ export default defineComponent({ } }); }, - async fetchInitialData(JobDetailDismissRequired = false) { - if(JobDetailDismissRequired) { + async fetchInitialData(isCurrentJobUpdateRequired = false) { + if(isCurrentJobUpdateRequired) { this.currentJob = ""; await this.store.dispatch('job/updateCurrentJob', { }); this.currentJobStatus = "" diff --git a/src/views/Product.vue b/src/views/Product.vue index e8b356c6..b4082df4 100644 --- a/src/views/Product.vue +++ b/src/views/Product.vue @@ -192,9 +192,9 @@ export default defineComponent({ this.getTemporalExpr(this.getJobStatus(this.jobEnums[enumId]))?.description : translate('Disabled') }, - async fetchJobs(JobDetailDismissRequired = false){ + async fetchJobs(isCurrentJobUpdateRequired = false){ this.isLoading = true; - if(JobDetailDismissRequired) { + if(isCurrentJobUpdateRequired) { this.currentJob = "" await this.store.dispatch('job/updateCurrentJob', { }); this.currentJobStatus = "" diff --git a/src/views/Reports.vue b/src/views/Reports.vue index 33c54381..71a6d243 100644 --- a/src/views/Reports.vue +++ b/src/views/Reports.vue @@ -138,8 +138,8 @@ export default defineComponent({ async getReportsJobs(viewSize = 200, viewIndex = 0) { await this.store.dispatch('job/fetchReportsJobs', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex }); }, - async updateProductStoreConfig(JobDetailDismissRequired = false) { - if(JobDetailDismissRequired) { + async updateProductStoreConfig(isCurrentJobUpdateRequired = false) { + if(isCurrentJobUpdateRequired) { this.currentJob = ""; await this.store.dispatch('job/updateCurrentJob', { }); this.currentJobStatus = "";