From 6f3d20198b582b0224b1e903340f5bd1e0c013c4 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Thu, 6 Oct 2022 12:11:35 +0530
Subject: [PATCH 01/50] Implement filters on pipeline page (#2uw73h5)
---
src/components/Filters.vue | 256 ++++++++++++++++++++++++
src/store/modules/job/JobState.ts | 4 +
src/store/modules/job/actions.ts | 31 ++-
src/store/modules/job/getters.ts | 3 +
src/store/modules/job/index.ts | 4 +
src/store/modules/job/mutation-types.ts | 3 +-
src/store/modules/job/mutations.ts | 4 +
src/views/Pipeline.vue | 39 ++--
8 files changed, 323 insertions(+), 21 deletions(-)
create mode 100644 src/components/Filters.vue
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
new file mode 100644
index 00000000..8261ae9f
--- /dev/null
+++ b/src/components/Filters.vue
@@ -0,0 +1,256 @@
+
+
+
+
+ {{ $t("Filters") }}
+
+
+
+
+
+
+
+
+
+ {{ $t("Status") }}
+
+
+
+
+
+ {{ $t(filter.name) }}
+
+
+
+
+
+
+
+ {{ $t("Category") }}
+
+
+
+
+
+ {{ $t(filter.name) }}
+
+
+
+
+
+
+
+ {{ $t("Pinned") }}
+
+
+
+
+ {{ getEnumName(job) }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/store/modules/job/JobState.ts b/src/store/modules/job/JobState.ts
index 3eeacaa7..5dea5e27 100644
--- a/src/store/modules/job/JobState.ts
+++ b/src/store/modules/job/JobState.ts
@@ -19,4 +19,8 @@ export default interface JobState {
current: any;
temporalExp: any;
enumIds: any;
+ pipelineFilters: {
+ status: any,
+ category: any,
+ }
}
\ No newline at end of file
diff --git a/src/store/modules/job/actions.ts b/src/store/modules/job/actions.ts
index e4293d29..2af33826 100644
--- a/src/store/modules/job/actions.ts
+++ b/src/store/modules/job/actions.ts
@@ -42,7 +42,6 @@ const actions: ActionTree = {
async fetchJobHistory({ commit, dispatch, state }, payload){
const params = {
"inputFields": {
- "statusId": ["SERVICE_CANCELLED", "SERVICE_CRASHED", "SERVICE_FAILED", "SERVICE_FINISHED"],
"statusId_op": "in",
"systemJobEnumId_op": "not-empty",
"shopId_fld0_value": store.state.user.currentShopifyConfig?.shopId,
@@ -51,13 +50,19 @@ const actions: ActionTree = {
"shopId_fld1_grp": "2",
"shopId_fld1_op": "empty"
} as any,
- "fieldList": [ "systemJobEnumId", "runTime", "tempExprId", "parentJobId", "serviceName", "jobId", "jobName", "statusId", "cancelDateTime", "finishDateTime", "startDateTime" ],
+ "fieldList": [ "systemJobEnumId", "runTime", "tempExprId", "parentJobId", "serviceName", "jobId", "jobName", "statusId", "cancelDateTime", "finishDateTime", "startDateTime" , "enumTypeId" ],
"noConditionFind": "Y",
"viewSize": payload.viewSize,
"viewIndex": payload.viewIndex,
"orderBy": "runTime DESC"
}
+ if(payload.statusId && (payload.statusId.length >= 3 || payload.statusId.length == 0)) {
+ params.inputFields["statusId"] = ["SERVICE_CANCELLED", "SERVICE_CRASHED", "SERVICE_FAILED", "SERVICE_FINISHED"];
+ } else {
+ params.inputFields["statusId"] = payload.statusId;
+ }
+
if(payload.systemJobEnumId && payload.systemJobEnumId.length > 0) {
params.inputFields["systemJobEnumId"] = payload.systemJobEnumId
params.inputFields["systemJobEnumId_op"] = "in"
@@ -69,6 +74,11 @@ const actions: ActionTree = {
params.inputFields["productStoreId_op"] = "empty"
}
+ if(payload.enumTypeId && payload.enumTypeId.length > 0) {
+ params.inputFields["enumTypeId"] = payload.enumTypeId;
+ params.inputFields["enumTypeId_op"] = "in"
+ }
+
if (payload.queryString) {
params.inputFields["enumName_value"] = "%"+ payload.queryString + "%"
params.inputFields["enumName_op"] = "like"
@@ -126,7 +136,7 @@ const actions: ActionTree = {
"shopId_fld1_grp": "2",
"shopId_fld1_op": "empty"
} as any,
- "fieldList": [ "systemJobEnumId", "runTime", "tempExprId", "parentJobId", "serviceName", "jobId", "jobName", "statusId" ],
+ "fieldList": [ "systemJobEnumId", "runTime", "tempExprId", "parentJobId", "serviceName", "jobId", "jobName", "statusId", "enumTypeId" ],
"noConditionFind": "Y",
"viewSize": payload.viewSize,
"viewIndex": payload.viewIndex,
@@ -144,6 +154,11 @@ const actions: ActionTree = {
params.inputFields["productStoreId_op"] = "empty"
}
+ if(payload.enumTypeId && payload.enumTypeId.length > 0) {
+ params.inputFields["enumTypeId"] = payload.enumTypeId;
+ params.inputFields["enumTypeId_op"] = "in"
+ }
+
if (payload.queryString) {
params.inputFields["enumName_value"] = "%"+ payload.queryString + "%"
params.inputFields["jobName_op"] = "like"
@@ -199,7 +214,7 @@ const actions: ActionTree = {
"shopId_fld1_grp": "2",
"shopId_fld1_op": "empty",
} as any,
- "fieldList": [ "systemJobEnumId", "runTime", "tempExprId", "parentJobId", "serviceName", "jobId", "jobName", "currentRetryCount", "statusId", "productStoreId", "runtimeDataId", "shopId", "description" ],
+ "fieldList": [ "systemJobEnumId", "runTime", "tempExprId", "parentJobId", "serviceName", "jobId", "jobName", "currentRetryCount", "statusId", "productStoreId", "runtimeDataId", "shopId", "description", "enumTypeId" ],
"noConditionFind": "Y",
"viewSize": payload.viewSize,
"viewIndex": payload.viewIndex,
@@ -217,6 +232,11 @@ const actions: ActionTree = {
params.inputFields["productStoreId_op"] = "empty"
}
+ if(payload.enumTypeId && payload.enumTypeId.length > 0) {
+ params.inputFields["enumTypeId"] = payload.enumTypeId;
+ params.inputFields["enumTypeId_op"] = "in"
+ }
+
if (payload.queryString) {
params.inputFields["enumName_value"] = "%"+ payload.queryString + "%"
params.inputFields["enumName_op"] = "like"
@@ -751,6 +771,9 @@ const actions: ActionTree = {
} catch (err) {
console.error(err);
}
+ },
+ setPipelineFilters({ commit }, filters) {
+ commit(types.JOB_PIPELINE_FILTERS_UPDATED, { filters });
}
}
export default actions;
\ No newline at end of file
diff --git a/src/store/modules/job/getters.ts b/src/store/modules/job/getters.ts
index d27fa45f..56ee3a15 100644
--- a/src/store/modules/job/getters.ts
+++ b/src/store/modules/job/getters.ts
@@ -57,6 +57,9 @@ const getters: GetterTree = {
isMiscellaneousJobsScrollable: (state) => {
return state.miscellaneous.list?.length > 0 && state.miscellaneous.list?.length < state.miscellaneous.total
},
+ getPipelineFilters: (state) => {
+ return state.pipelineFilters;
+ },
}
export default getters;
\ No newline at end of file
diff --git a/src/store/modules/job/index.ts b/src/store/modules/job/index.ts
index 83fba826..bc41db79 100644
--- a/src/store/modules/job/index.ts
+++ b/src/store/modules/job/index.ts
@@ -28,6 +28,10 @@ const jobModule: Module = {
temporalExp: [],
enumIds: {},
current: {},
+ pipelineFilters: {
+ status: [],
+ category: [],
+ },
},
getters,
actions,
diff --git a/src/store/modules/job/mutation-types.ts b/src/store/modules/job/mutation-types.ts
index 3311ab80..573f5303 100644
--- a/src/store/modules/job/mutation-types.ts
+++ b/src/store/modules/job/mutation-types.ts
@@ -7,4 +7,5 @@ export const JOB_DESCRIPTION_UPDATED = SN_JOB + '/DESCRIPTION_UPDATED'
export const JOB_HISTORY_UPDATED = SN_JOB + '/HISTORY_UPDATED'
export const JOB_RUNNING_UPDATED = SN_JOB + '/RUNNING_UPDATED'
export const JOB_CURRENT_UPDATED = SN_JOB + '/CURRENT_UPDATED'
-export const JOB_MISCELLANEOUS_UPDATED = SN_JOB + '/MISCELLANEOUS_UPDATED'
\ No newline at end of file
+export const JOB_MISCELLANEOUS_UPDATED = SN_JOB + '/MISCELLANEOUS_UPDATED'
+export const JOB_PIPELINE_FILTERS_UPDATED = SN_JOB + '/PIPELINE_FILTERS_UPDATED'
\ No newline at end of file
diff --git a/src/store/modules/job/mutations.ts b/src/store/modules/job/mutations.ts
index 7d5dcad2..3b76616b 100644
--- a/src/store/modules/job/mutations.ts
+++ b/src/store/modules/job/mutations.ts
@@ -44,6 +44,10 @@ const mutations: MutationTree = {
[types.JOB_MISCELLANEOUS_UPDATED] (state, payload){
state.miscellaneous.list = payload.jobs;
state.miscellaneous.total = payload.total;
+ },
+ [types.JOB_PIPELINE_FILTERS_UPDATED] (state, payload){
+ state.pipelineFilters.category = payload.filters.category;
+ state.pipelineFilters.status = payload.filters.status;
}
}
export default mutations;
\ No newline at end of file
diff --git a/src/views/Pipeline.vue b/src/views/Pipeline.vue
index 5b209ce4..dcbe9256 100644
--- a/src/views/Pipeline.vue
+++ b/src/views/Pipeline.vue
@@ -1,15 +1,22 @@
+
+
{{ $t("Pipeline") }}
+
+
+
+
+
-
+
{{ $t("Pending") }}
@@ -23,7 +30,7 @@
-
+
@@ -284,15 +291,17 @@ import {
IonSpinner,
isPlatform,
modalController,
- popoverController
+ popoverController,
+ IonButtons
} from "@ionic/vue";
import JobConfiguration from '@/components/JobConfiguration.vue'
-import { closeCircleOutline, codeWorkingOutline, copyOutline, ellipsisVerticalOutline, pinOutline, refreshOutline, timeOutline, timerOutline } from "ionicons/icons";
+import { closeCircleOutline, codeWorkingOutline, copyOutline, ellipsisVerticalOutline, filterOutline, pinOutline, refreshOutline, timeOutline, timerOutline } from "ionicons/icons";
import emitter from '@/event-bus';
import JobHistoryModal from '@/components/JobHistoryModal.vue';
import { Plugins } from '@capacitor/core';
import { showToast } from '@/utils'
import JobActionsPopover from '@/components/JobActionsPopover.vue'
+import Filters from '@/components/Filters.vue';
export default defineComponent({
name: "Pipeline",
@@ -323,8 +332,10 @@ export default defineComponent({
IonSegment,
IonSegmentButton,
IonSpinner,
- JobConfiguration
- },
+ IonButtons,
+ JobConfiguration,
+ Filters
+},
data() {
return {
selectedPinnedJobs:[],
@@ -359,6 +370,7 @@ export default defineComponent({
isHistoryJobsScrollable: 'job/isHistoryJobsScrollable',
getPinnedJobs: 'user/getPinnedJobs',
currentJob: 'job/getCurrentJob',
+ getPipelineFilters: 'job/getPipelineFilters',
})
},
methods : {
@@ -459,12 +471,6 @@ export default defineComponent({
}
},
- segmentChanged (e: CustomEvent) {
- this.segmentSelected = e.detail.value
- this.segmentSelected === 'pending' ? this.getPendingJobs():
- this.segmentSelected === 'running' ? this.getRunningJobs():
- this.getJobHistory();
- },
async skipJob (job: any) {
const alert = await alertController
.create({
@@ -487,13 +493,13 @@ export default defineComponent({
return alert.present();
},
async getPendingJobs(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
- await this.store.dispatch('job/fetchPendingJobs', {eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, systemJobEnumId: this.selectedPinnedJobs});
+ await this.store.dispatch('job/fetchPendingJobs', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, systemJobEnumId: this.selectedPinnedJobs, enumTypeId: this.getPipelineFilters.category, statusId: this.getPipelineFilters.status });
},
async getRunningJobs(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
- await this.store.dispatch('job/fetchRunningJobs', {eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, systemJobEnumId: this.selectedPinnedJobs});
+ await this.store.dispatch('job/fetchRunningJobs', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, systemJobEnumId: this.selectedPinnedJobs, enumTypeId: this.getPipelineFilters.category, statusId: this.getPipelineFilters.status });
},
async getJobHistory(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
- await this.store.dispatch('job/fetchJobHistory', {eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, systemJobEnumId: this.selectedPinnedJobs});
+ await this.store.dispatch('job/fetchJobHistory', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, systemJobEnumId: this.selectedPinnedJobs, enumTypeId: this.getPipelineFilters.category, statusId: this.getPipelineFilters.status});
},
async openJobActions(job: any, ev: Event) {
const popover = await popoverController.create({
@@ -594,7 +600,8 @@ export default defineComponent({
timeOutline,
timerOutline,
segmentSelected,
- router
+ router,
+ filterOutline
};
}
});
From c3818b8f2d20d0482612c6d1e12bfac8185d253d Mon Sep 17 00:00:00 2001
From: k2maan
Date: Thu, 6 Oct 2022 18:53:30 +0530
Subject: [PATCH 02/50] Fixed indentation
---
src/components/Filters.vue | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index 8261ae9f..aa8b46e6 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -100,14 +100,12 @@ export default defineComponent({
statusId: "SERVICE_CANCELLED",
iosIcon: banOutline,
mdIcon: banOutline,
-
},
{
name: "Failed",
statusId: "SERVICE_FAILED",
iosIcon: closeOutline,
mdIcon: closeOutline,
-
},
];
const categoryFilters = [
From 61d81f174d3c487fef7207d95ac3730bd9c8bdba Mon Sep 17 00:00:00 2001
From: k2maan
Date: Fri, 7 Oct 2022 13:11:37 +0530
Subject: [PATCH 03/50] added improvements and keys in en.json
---
src/components/Filters.vue | 71 ++++++++++++++------------------
src/locales/en.json | 10 ++++-
src/store/modules/job/actions.ts | 7 ++--
3 files changed, 42 insertions(+), 46 deletions(-)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index aa8b46e6..b4ede90b 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -56,34 +56,34 @@
-
-
+
\ No newline at end of file
diff --git a/src/locales/en.json b/src/locales/en.json
index c2e51c95..569c50e8 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -23,12 +23,14 @@
"Before importing historical orders in bulk, make sure all products are set up or else order import will not run correctly.": "Before importing historical orders in bulk, make sure all products are set up or else order import will not run correctly.",
"Blank": "Blank",
"BOPIS corrections": "BOPIS corrections",
+ "Brokering": "Brokering",
"Brokering queue": "Brokering queue",
"By default only open and unshipped orders will be imported.": "By default only open and unshipped orders will be imported.",
"Cancel": "Cancel",
- "Canceled": "Canceled",
+ "Cancelled": "Cancelled",
"Cancel job": "Cancel job",
"Canceling this job will cancel this occurrence and all following occurrences. This job will have to be re-enabled manually to run it again.": "Canceling this job will cancel this occurrence and all following occurrences. This job will have to be re-enabled manually to run it again.",
+ "Category": "Category",
"Change": "Change",
"Change time zone": "Change time zone",
"Configuration missing": "Configuration missing",
@@ -56,8 +58,12 @@
"Every 5 minutes": "Every 5 minutes",
"Every 15 minutes": "Every 15 minutes",
"Every 30 minutes": "Every 30 minutes",
+ "Failed": "Failed",
+ "Finished": "Finished",
+ "Filters": "Filters",
"File upload status": "File upload status",
"Fulfilled": "Fulfilled",
+ "Fulfillment": "Fulfillment",
"Fulfillment status": "Fulfillment status",
"Hard sync": "Hard sync",
"History": "History",
@@ -105,6 +111,7 @@
"Pre-order parking": "Pre-order parking",
"Pre-orders": "Pre-orders",
"Pin job": "Pin job",
+ "Pinned": "Pinned",
"Pinned jobs": "Pinned jobs",
"Pipeline": "Pipeline",
"Process Uploads": "Process Uploads",
@@ -160,6 +167,7 @@
"Skip once": "Skip once",
"Skipping will run this job at the next occurrence based on the temporal expression.": "Skipping will run this job at the next occurrence based on the temporal expression.",
"Start with Ionic": "Start with Ionic",
+ "Status": "Status",
"Store": "Store",
"store name": "store name",
"Sync": "Sync",
diff --git a/src/store/modules/job/actions.ts b/src/store/modules/job/actions.ts
index 2af33826..ec5c76c5 100644
--- a/src/store/modules/job/actions.ts
+++ b/src/store/modules/job/actions.ts
@@ -42,6 +42,7 @@ const actions: ActionTree = {
async fetchJobHistory({ commit, dispatch, state }, payload){
const params = {
"inputFields": {
+ "statusId": ["SERVICE_CANCELLED", "SERVICE_CRASHED", "SERVICE_FAILED", "SERVICE_FINISHED"],
"statusId_op": "in",
"systemJobEnumId_op": "not-empty",
"shopId_fld0_value": store.state.user.currentShopifyConfig?.shopId,
@@ -57,11 +58,9 @@ const actions: ActionTree = {
"orderBy": "runTime DESC"
}
- if(payload.statusId && (payload.statusId.length >= 3 || payload.statusId.length == 0)) {
- params.inputFields["statusId"] = ["SERVICE_CANCELLED", "SERVICE_CRASHED", "SERVICE_FAILED", "SERVICE_FINISHED"];
- } else {
+ if(payload.statusId.length > 0) {
params.inputFields["statusId"] = payload.statusId;
- }
+ }
if(payload.systemJobEnumId && payload.systemJobEnumId.length > 0) {
params.inputFields["systemJobEnumId"] = payload.systemJobEnumId
From f16207646e92d30dd4dc75717ccb1cd521b064ad Mon Sep 17 00:00:00 2001
From: k2maan
Date: Mon, 10 Oct 2022 10:05:13 +0530
Subject: [PATCH 04/50] Refactored code for applying filters by sticking it to
single function
---
src/components/Filters.vue | 49 +++++++++++++++++++++-----------------
1 file changed, 27 insertions(+), 22 deletions(-)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index b4ede90b..3d60f7a2 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -192,35 +192,40 @@ export default defineComponent({
this.segmentSelected === 'running' ? this.getFilteredRunningJobs() :
this.getFilteredJobHistory();
},
- applyStatusFilters(filter: any) {
- const index = (this as any).selectedStatusFilters.indexOf(filter.statusId);
- if (index != -1) {
- (this as any).selectedStatusFilters.splice(index, 1)
+ handleFilterApply(filter: any) {
+ if(filter.statusId) {
+ const index = (this as any).selectedStatusFilters.indexOf(filter.statusId);
+ if (index != -1) {
+ (this as any).selectedStatusFilters.splice(index, 1)
+ } else {
+ (this as any).selectedStatusFilters.push(filter.statusId)
+ }
+ } else if(filter.enumTypeId) {
+ const index = (this as any).selectedCategoryFilters.indexOf(filter.enumTypeId);
+ if (index != -1) {
+ (this as any).selectedCategoryFilters.splice(index, 1)
+ } else {
+ (this as any).selectedCategoryFilters.push(filter.enumTypeId)
+ }
} else {
- (this as any).selectedStatusFilters.push(filter.statusId)
+ const index = (this as any).selectedPinnedJobs.indexOf(filter);
+ if (index != -1) {
+ (this as any).selectedPinnedJobs.splice(index, 1)
+ } else {
+ (this as any).selectedPinnedJobs.push(filter)
+ }
}
this.store.dispatch('job/setPipelineFilters', { status: this.selectedStatusFilters, category: this.selectedCategoryFilters});
this.handleSegmentChange();
},
+ applyStatusFilters(filter: any) {
+ this.handleFilterApply(filter);
+ },
applyCategoryFilters(filter: any) {
- const index = (this as any).selectedCategoryFilters.indexOf(filter.enumTypeId);
- if (index != -1) {
- (this as any).selectedCategoryFilters.splice(index, 1)
- } else {
- (this as any).selectedCategoryFilters.push(filter.enumTypeId)
- }
- this.store.dispatch('job/setPipelineFilters', { status: this.selectedStatusFilters, category: this.selectedCategoryFilters});
- this.handleSegmentChange();
+ this.handleFilterApply(filter);
},
- applyPinnedJobFilters(jobEnumId: any) {
- const index = (this as any).selectedPinnedJobs.indexOf(jobEnumId);
- if (index != -1) {
- (this as any).selectedPinnedJobs.splice(index, 1)
- } else {
- (this as any).selectedPinnedJobs.push(jobEnumId)
- }
- this.store.dispatch('job/setPipelineFilters', { status: this.selectedStatusFilters, category: this.selectedCategoryFilters});
- this.handleSegmentChange();
+ applyPinnedJobFilters(filter: any) {
+ this.handleFilterApply(filter);
},
async getFilteredPendingJobs(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
await this.store.dispatch('job/fetchPendingJobs', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.selectedCategoryFilters, systemJobEnumId: this.selectedPinnedJobs, statusId: this.selectedStatusFilters });
From 36c70f1ddb811c557346ed0c083cb1ac9b92bf6c Mon Sep 17 00:00:00 2001
From: k2maan
Date: Mon, 10 Oct 2022 14:29:39 +0530
Subject: [PATCH 05/50] Refactored code to handle filter selection based on the
type passed
---
src/components/Filters.vue | 57 +++++++++++++++-----------------------
1 file changed, 22 insertions(+), 35 deletions(-)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index 3d60f7a2..0f5c4964 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -16,7 +16,7 @@
-
+
{{ $t(filter.name) }}
@@ -30,7 +30,7 @@
-
+
{{ $t(filter.name) }}
@@ -44,7 +44,7 @@
-
+
{{ getEnumName(job) }}
@@ -192,41 +192,28 @@ export default defineComponent({
this.segmentSelected === 'running' ? this.getFilteredRunningJobs() :
this.getFilteredJobHistory();
},
- handleFilterApply(filter: any) {
- if(filter.statusId) {
- const index = (this as any).selectedStatusFilters.indexOf(filter.statusId);
- if (index != -1) {
- (this as any).selectedStatusFilters.splice(index, 1)
- } else {
- (this as any).selectedStatusFilters.push(filter.statusId)
- }
- } else if(filter.enumTypeId) {
- const index = (this as any).selectedCategoryFilters.indexOf(filter.enumTypeId);
- if (index != -1) {
- (this as any).selectedCategoryFilters.splice(index, 1)
- } else {
- (this as any).selectedCategoryFilters.push(filter.enumTypeId)
- }
- } else {
- const index = (this as any).selectedPinnedJobs.indexOf(filter);
- if (index != -1) {
- (this as any).selectedPinnedJobs.splice(index, 1)
- } else {
- (this as any).selectedPinnedJobs.push(filter)
- }
+ handleFilterChange(filterArray: any, filterProperty: any) {
+ // check if the filter is being applied,
+ // if not - apply, if already there - remove.
+ filterArray.includes(filterProperty)
+ ? filterArray.splice(filterArray.indexOf(filterProperty), 1)
+ : filterArray.push(filterProperty);
+ },
+ handleFilterApply(filter: any, type: any) {
+ switch (type) {
+ case 'statusFilter':
+ this.handleFilterChange(this.selectedStatusFilters, filter.statusId);
+ break;
+ case 'categoryFilter':
+ this.handleFilterChange(this.selectedCategoryFilters, filter.enumTypeId);
+ break;
+ case 'pinnedFilter':
+ this.handleFilterChange(this.selectedPinnedJobs, filter);
+ break;
}
- this.store.dispatch('job/setPipelineFilters', { status: this.selectedStatusFilters, category: this.selectedCategoryFilters});
+ this.store.dispatch('job/setPipelineFilters', { status: this.selectedStatusFilters, category: this.selectedCategoryFilters });
this.handleSegmentChange();
},
- applyStatusFilters(filter: any) {
- this.handleFilterApply(filter);
- },
- applyCategoryFilters(filter: any) {
- this.handleFilterApply(filter);
- },
- applyPinnedJobFilters(filter: any) {
- this.handleFilterApply(filter);
- },
async getFilteredPendingJobs(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
await this.store.dispatch('job/fetchPendingJobs', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.selectedCategoryFilters, systemJobEnumId: this.selectedPinnedJobs, statusId: this.selectedStatusFilters });
},
From f54c089f092506b595fabfcad20f27e40c2bb782 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Mon, 10 Oct 2022 18:07:52 +0530
Subject: [PATCH 06/50] Added type variable to handle type change
---
src/components/Filters.vue | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index 0f5c4964..b5007c5a 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -172,6 +172,7 @@ export default defineComponent({
},
data() {
return {
+ type: '',
selectedFilters: {} as any,
selectedStatusFilters: [] as Array,
selectedCategoryFilters: [] as Array,
From 417522a86a0c601471544c4ee4bd74da48ae0e61 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Mon, 17 Oct 2022 11:02:07 +0530
Subject: [PATCH 07/50] Moved logic for managing filter arrays in actions from
Filters page. (#2uw73h5)
---
src/components/Filters.vue | 17 +++--------------
src/store/modules/job/actions.ts | 13 +++++++++++--
src/store/modules/job/mutations.ts | 4 ++--
3 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index b5007c5a..d6fc3776 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -173,15 +173,12 @@ export default defineComponent({
data() {
return {
type: '',
- selectedFilters: {} as any,
selectedStatusFilters: [] as Array,
selectedCategoryFilters: [] as Array,
}
},
computed: {
...mapGetters({
- getPipelineFilters: 'job/getPipelineFilters',
- getEnumDescription: 'job/getEnumDescription',
getEnumName: 'job/getEnumName',
getCurrentEComStore: 'user/getCurrentEComStore',
getPinnedJobs: 'user/getPinnedJobs',
@@ -201,18 +198,10 @@ export default defineComponent({
: filterArray.push(filterProperty);
},
handleFilterApply(filter: any, type: any) {
- switch (type) {
- case 'statusFilter':
- this.handleFilterChange(this.selectedStatusFilters, filter.statusId);
- break;
- case 'categoryFilter':
- this.handleFilterChange(this.selectedCategoryFilters, filter.enumTypeId);
- break;
- case 'pinnedFilter':
- this.handleFilterChange(this.selectedPinnedJobs, filter);
- break;
+ if(type === 'pinnedFilter') {
+ this.handleFilterChange(this.selectedPinnedJobs, filter);
}
- this.store.dispatch('job/setPipelineFilters', { status: this.selectedStatusFilters, category: this.selectedCategoryFilters });
+ this.store.dispatch('job/setPipelineFilters', { status: this.selectedStatusFilters, category: this.selectedCategoryFilters, type, filter });
this.handleSegmentChange();
},
async getFilteredPendingJobs(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
diff --git a/src/store/modules/job/actions.ts b/src/store/modules/job/actions.ts
index ec5c76c5..68e4976c 100644
--- a/src/store/modules/job/actions.ts
+++ b/src/store/modules/job/actions.ts
@@ -771,8 +771,17 @@ const actions: ActionTree = {
console.error(err);
}
},
- setPipelineFilters({ commit }, filters) {
- commit(types.JOB_PIPELINE_FILTERS_UPDATED, { filters });
+ setPipelineFilters({ commit }, payload) {
+ if(payload.type == 'statusFilter') {
+ payload.status.includes(payload.filter.statusId)
+ ? payload.status.splice(payload.status.indexOf(payload.filter.statusId), 1)
+ : payload.status.push(payload.filter.statusId);
+ } else if(payload.type === 'statusFIlter') {
+ payload.category.includes(payload.filter.enumTypeId)
+ ? payload.category.splice(payload.category.indexOf(payload.filter.enumTypeId), 1)
+ : payload.category.push(payload.filter.enumTypeId);
+ }
+ commit(types.JOB_PIPELINE_FILTERS_UPDATED, payload);
}
}
export default actions;
\ No newline at end of file
diff --git a/src/store/modules/job/mutations.ts b/src/store/modules/job/mutations.ts
index 3b76616b..308bb807 100644
--- a/src/store/modules/job/mutations.ts
+++ b/src/store/modules/job/mutations.ts
@@ -46,8 +46,8 @@ const mutations: MutationTree = {
state.miscellaneous.total = payload.total;
},
[types.JOB_PIPELINE_FILTERS_UPDATED] (state, payload){
- state.pipelineFilters.category = payload.filters.category;
- state.pipelineFilters.status = payload.filters.status;
+ state.pipelineFilters.category = payload.category;
+ state.pipelineFilters.status = payload.status;
}
}
export default mutations;
\ No newline at end of file
From 8f21f483a51f7c715c184dd77c47daa94ea81548 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Mon, 17 Oct 2022 11:09:10 +0530
Subject: [PATCH 08/50] Added type for function param in handleFilterChange
function. (#2uw73h5)
---
src/components/Filters.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index d6fc3776..645bb233 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -190,7 +190,7 @@ export default defineComponent({
this.segmentSelected === 'running' ? this.getFilteredRunningJobs() :
this.getFilteredJobHistory();
},
- handleFilterChange(filterArray: any, filterProperty: any) {
+ handleFilterChange(filterArray: Array, filterProperty: any) {
// check if the filter is being applied,
// if not - apply, if already there - remove.
filterArray.includes(filterProperty)
From f6935174906c1cab633beae32984ab28f5cbed30 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Mon, 17 Oct 2022 11:17:19 +0530
Subject: [PATCH 09/50] Fixed wrong filter type check in action. (#2uw73h5)
---
src/store/modules/job/actions.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/store/modules/job/actions.ts b/src/store/modules/job/actions.ts
index 68e4976c..19b16dec 100644
--- a/src/store/modules/job/actions.ts
+++ b/src/store/modules/job/actions.ts
@@ -776,7 +776,7 @@ const actions: ActionTree = {
payload.status.includes(payload.filter.statusId)
? payload.status.splice(payload.status.indexOf(payload.filter.statusId), 1)
: payload.status.push(payload.filter.statusId);
- } else if(payload.type === 'statusFIlter') {
+ } else if(payload.type === 'categoryFilter') {
payload.category.includes(payload.filter.enumTypeId)
? payload.category.splice(payload.category.indexOf(payload.filter.enumTypeId), 1)
: payload.category.push(payload.filter.enumTypeId);
From 30899f3e15b1917a68e09ef21bae1eec4a642cad Mon Sep 17 00:00:00 2001
From: k2maan
Date: Wed, 19 Oct 2022 11:12:22 +0530
Subject: [PATCH 10/50] Removed type and added filter type as a string
directly, improved HTML by adding section tag around category filters
(#2uw73h5)
---
src/components/Filters.vue | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index 645bb233..f529dcf3 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -23,18 +23,20 @@
-
-
-
- {{ $t("Category") }}
-
-
-
-
-
- {{ $t(filter.name) }}
-
-
+
+
+
+
+ {{ $t("Category") }}
+
+
+
+
+
+ {{ $t(filter.name) }}
+
+
+
@@ -44,7 +46,7 @@
-
+
{{ getEnumName(job) }}
@@ -172,7 +174,6 @@ export default defineComponent({
},
data() {
return {
- type: '',
selectedStatusFilters: [] as Array,
selectedCategoryFilters: [] as Array,
}
From 0919882fee20d642b49ca6f312d493e4ad8b9f0d Mon Sep 17 00:00:00 2001
From: k2maan
Date: Wed, 19 Oct 2022 11:27:44 +0530
Subject: [PATCH 11/50] Removed type and added filter type as a string directly
(#2uw73h5)
---
src/components/Filters.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index f529dcf3..cd945c03 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -16,7 +16,7 @@
-
+
{{ $t(filter.name) }}
@@ -31,7 +31,7 @@
-
+
{{ $t(filter.name) }}
From e2e76ba78d4c99bb05193fdb80e7bd0507a831de Mon Sep 17 00:00:00 2001
From: k2maan
Date: Wed, 19 Oct 2022 11:50:54 +0530
Subject: [PATCH 12/50] Improved indentation (#2uw73h5)
---
src/components/Filters.vue | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index cd945c03..2bc46db9 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -25,17 +25,18 @@
-
-
- {{ $t("Category") }}
-
-
-
-
-
- {{ $t(filter.name) }}
-
-
+
+
+ {{ $t("Category") }}
+
+
+
+
+
+ {{ $t(filter.name) }}
+
+
From 732a3a40911d9aaf1aaf1d2e254b7fe538128e52 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Wed, 19 Oct 2022 11:52:03 +0530
Subject: [PATCH 13/50] Added proper type in function param (#2uw73h5)
---
src/components/Filters.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index 2bc46db9..0b2310ea 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -199,7 +199,7 @@ export default defineComponent({
? filterArray.splice(filterArray.indexOf(filterProperty), 1)
: filterArray.push(filterProperty);
},
- handleFilterApply(filter: any, type: any) {
+ handleFilterApply(filter: any, type: string) {
if(type === 'pinnedFilter') {
this.handleFilterChange(this.selectedPinnedJobs, filter);
}
From 4a5e56e960790264eaa5d702cb03f370b448b8e9 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Wed, 19 Oct 2022 12:28:58 +0530
Subject: [PATCH 14/50] Improved indentation (#2uw73h5)
---
src/components/Filters.vue | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index 0b2310ea..ef2535a9 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -24,19 +24,19 @@
-
-
-
- {{ $t("Category") }}
-
-
-
-
-
- {{ $t(filter.name) }}
-
-
+
+
+
+ {{ $t("Category") }}
+
+
+
+
+
+ {{ $t(filter.name) }}
+
+
From fb684a0510889d002a79f2ea62ba6bf733cd715d Mon Sep 17 00:00:00 2001
From: k2maan
Date: Wed, 19 Oct 2022 13:07:43 +0530
Subject: [PATCH 15/50] Refactored code by changing method names and adding
necessary and removing unnecessary code in Filter and Pipeline
pages(#2uw73h5)
---
src/components/Filters.vue | 20 +++++---------------
src/views/Pipeline.vue | 9 +++++++--
2 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index ef2535a9..e965c663 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -187,12 +187,7 @@ export default defineComponent({
})
},
methods: {
- handleSegmentChange() {
- this.segmentSelected === 'pending' ? this.getFilteredPendingJobs() :
- this.segmentSelected === 'running' ? this.getFilteredRunningJobs() :
- this.getFilteredJobHistory();
- },
- handleFilterChange(filterArray: Array, filterProperty: any) {
+ updatePinnedJobs(filterArray: Array, filterProperty: any) {
// check if the filter is being applied,
// if not - apply, if already there - remove.
filterArray.includes(filterProperty)
@@ -201,10 +196,12 @@ export default defineComponent({
},
handleFilterApply(filter: any, type: string) {
if(type === 'pinnedFilter') {
- this.handleFilterChange(this.selectedPinnedJobs, filter);
+ this.updatePinnedJobs(this.selectedPinnedJobs, filter);
}
this.store.dispatch('job/setPipelineFilters', { status: this.selectedStatusFilters, category: this.selectedCategoryFilters, type, filter });
- this.handleSegmentChange();
+ this.segmentSelected === 'pending' ? this.getFilteredPendingJobs() :
+ this.segmentSelected === 'running' ? this.getFilteredRunningJobs() :
+ this.getFilteredJobHistory();
},
async getFilteredPendingJobs(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
await this.store.dispatch('job/fetchPendingJobs', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.selectedCategoryFilters, systemJobEnumId: this.selectedPinnedJobs, statusId: this.selectedStatusFilters });
@@ -216,12 +213,5 @@ export default defineComponent({
await this.store.dispatch('job/fetchJobHistory', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.selectedCategoryFilters, systemJobEnumId: this.selectedPinnedJobs, statusId: this.selectedStatusFilters });
},
},
- watch: {
- segmentSelected(val) {
- if (val) {
- this.handleSegmentChange();
- }
- }
- }
});
\ No newline at end of file
diff --git a/src/views/Pipeline.vue b/src/views/Pipeline.vue
index dcbe9256..4a44d29d 100644
--- a/src/views/Pipeline.vue
+++ b/src/views/Pipeline.vue
@@ -16,7 +16,7 @@
-
+
{{ $t("Pending") }}
@@ -470,7 +470,12 @@ export default defineComponent({
});
}
},
-
+ segmentChanged (e: CustomEvent) {
+ this.segmentSelected = e.detail.value
+ this.segmentSelected === 'pending' ? this.getPendingJobs():
+ this.segmentSelected === 'running' ? this.getRunningJobs():
+ this.getJobHistory();
+ },
async skipJob (job: any) {
const alert = await alertController
.create({
From 1fea6290822b26ed36ea04b39c5da2afde67b3ee Mon Sep 17 00:00:00 2001
From: k2maan
Date: Thu, 27 Oct 2022 11:05:04 +0530
Subject: [PATCH 16/50] Refactored getter names and filter update mutation
(#2uw73h5)
---
src/components/Filters.vue | 16 ++++++++--------
src/store/modules/job/actions.ts | 2 +-
src/store/modules/job/mutations.ts | 3 +--
src/views/Pipeline.vue | 8 ++++----
4 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index e965c663..4fd7b1a2 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -39,7 +39,7 @@
-
+
@@ -47,7 +47,7 @@
-
+
{{ getEnumName(job) }}
@@ -75,7 +75,7 @@ import { albumsOutline, banOutline, calendarNumberOutline, checkmarkDoneOutline,
import { mapGetters, useStore } from 'vuex'
export default defineComponent({
- name: "Menu",
+ name: "Filters",
components: {
IonCheckbox,
IonContent,
@@ -182,8 +182,8 @@ export default defineComponent({
computed: {
...mapGetters({
getEnumName: 'job/getEnumName',
- getCurrentEComStore: 'user/getCurrentEComStore',
- getPinnedJobs: 'user/getPinnedJobs',
+ currentEComStore: 'user/getCurrentEComStore',
+ pinnedJobs: 'user/getPinnedJobs',
})
},
methods: {
@@ -204,13 +204,13 @@ export default defineComponent({
this.getFilteredJobHistory();
},
async getFilteredPendingJobs(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
- await this.store.dispatch('job/fetchPendingJobs', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.selectedCategoryFilters, systemJobEnumId: this.selectedPinnedJobs, statusId: this.selectedStatusFilters });
+ await this.store.dispatch('job/fetchPendingJobs', { eComStoreId: this.currentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.selectedCategoryFilters, systemJobEnumId: this.selectedPinnedJobs, statusId: this.selectedStatusFilters });
},
async getFilteredRunningJobs(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
- await this.store.dispatch('job/fetchRunningJobs', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.selectedCategoryFilters, systemJobEnumId: this.selectedPinnedJobs, statusId: this.selectedStatusFilters });
+ await this.store.dispatch('job/fetchRunningJobs', { eComStoreId: this.currentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.selectedCategoryFilters, systemJobEnumId: this.selectedPinnedJobs, statusId: this.selectedStatusFilters });
},
async getFilteredJobHistory(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
- await this.store.dispatch('job/fetchJobHistory', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.selectedCategoryFilters, systemJobEnumId: this.selectedPinnedJobs, statusId: this.selectedStatusFilters });
+ await this.store.dispatch('job/fetchJobHistory', { eComStoreId: this.currentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.selectedCategoryFilters, systemJobEnumId: this.selectedPinnedJobs, statusId: this.selectedStatusFilters });
},
},
});
diff --git a/src/store/modules/job/actions.ts b/src/store/modules/job/actions.ts
index 19b16dec..48d68d18 100644
--- a/src/store/modules/job/actions.ts
+++ b/src/store/modules/job/actions.ts
@@ -781,7 +781,7 @@ const actions: ActionTree = {
? payload.category.splice(payload.category.indexOf(payload.filter.enumTypeId), 1)
: payload.category.push(payload.filter.enumTypeId);
}
- commit(types.JOB_PIPELINE_FILTERS_UPDATED, payload);
+ commit(types.JOB_PIPELINE_FILTERS_UPDATED, payload);
}
}
export default actions;
\ No newline at end of file
diff --git a/src/store/modules/job/mutations.ts b/src/store/modules/job/mutations.ts
index 308bb807..15181446 100644
--- a/src/store/modules/job/mutations.ts
+++ b/src/store/modules/job/mutations.ts
@@ -46,8 +46,7 @@ const mutations: MutationTree = {
state.miscellaneous.total = payload.total;
},
[types.JOB_PIPELINE_FILTERS_UPDATED] (state, payload){
- state.pipelineFilters.category = payload.category;
- state.pipelineFilters.status = payload.status;
+ state.pipelineFilters = payload;
}
}
export default mutations;
\ No newline at end of file
diff --git a/src/views/Pipeline.vue b/src/views/Pipeline.vue
index 4a44d29d..015d6c3b 100644
--- a/src/views/Pipeline.vue
+++ b/src/views/Pipeline.vue
@@ -370,7 +370,7 @@ export default defineComponent({
isHistoryJobsScrollable: 'job/isHistoryJobsScrollable',
getPinnedJobs: 'user/getPinnedJobs',
currentJob: 'job/getCurrentJob',
- getPipelineFilters: 'job/getPipelineFilters',
+ pipelineFilters: 'job/getPipelineFilters',
})
},
methods : {
@@ -498,13 +498,13 @@ export default defineComponent({
return alert.present();
},
async getPendingJobs(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
- await this.store.dispatch('job/fetchPendingJobs', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, systemJobEnumId: this.selectedPinnedJobs, enumTypeId: this.getPipelineFilters.category, statusId: this.getPipelineFilters.status });
+ await this.store.dispatch('job/fetchPendingJobs', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, systemJobEnumId: this.selectedPinnedJobs, enumTypeId: this.pipelineFilters.category, statusId: this.pipelineFilters.status });
},
async getRunningJobs(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
- await this.store.dispatch('job/fetchRunningJobs', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, systemJobEnumId: this.selectedPinnedJobs, enumTypeId: this.getPipelineFilters.category, statusId: this.getPipelineFilters.status });
+ await this.store.dispatch('job/fetchRunningJobs', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, systemJobEnumId: this.selectedPinnedJobs, enumTypeId: this.pipelineFilters.category, statusId: this.pipelineFilters.status });
},
async getJobHistory(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
- await this.store.dispatch('job/fetchJobHistory', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, systemJobEnumId: this.selectedPinnedJobs, enumTypeId: this.getPipelineFilters.category, statusId: this.getPipelineFilters.status});
+ await this.store.dispatch('job/fetchJobHistory', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, systemJobEnumId: this.selectedPinnedJobs, enumTypeId: this.pipelineFilters.category, statusId: this.pipelineFilters.status});
},
async openJobActions(job: any, ev: Event) {
const popover = await popoverController.create({
From e419f6fea96ec53a0ea28e2abd47350d3f55a244 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Thu, 27 Oct 2022 12:51:24 +0530
Subject: [PATCH 17/50] Implemeted job refresh on changing page after applying
filters (#2uw73h5)
---
src/components/Filters.vue | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index 4fd7b1a2..8fce6124 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -186,6 +186,9 @@ export default defineComponent({
pinnedJobs: 'user/getPinnedJobs',
})
},
+ unmounted() {
+ Object.assign(this.store.state.job.pipelineFilters, { status: [], category: [] })
+ },
methods: {
updatePinnedJobs(filterArray: Array, filterProperty: any) {
// check if the filter is being applied,
From 3554f3bbe9b4b40d75b694bda9c5e02a09398561 Mon Sep 17 00:00:00 2001
From: franciscoemanuel
Date: Fri, 28 Oct 2022 22:59:01 -0300
Subject: [PATCH 18/50] Adds show-default-buttons on BatchModal datepicker
---
src/components/BatchModal.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/BatchModal.vue b/src/components/BatchModal.vue
index e5e98aa1..98409451 100644
--- a/src/components/BatchModal.vue
+++ b/src/components/BatchModal.vue
@@ -37,7 +37,7 @@
{{ $t("Schedule") }}
-
+
From 11eabf081b262cce991e6f772354bcb1b0f4cbde Mon Sep 17 00:00:00 2001
From: franciscoemanuel
Date: Fri, 28 Oct 2022 22:59:16 -0300
Subject: [PATCH 19/50] Adds show-default-buttons on InitialJobConfiguration
datepickers
---
src/components/InitialJobConfiguration.vue | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/components/InitialJobConfiguration.vue b/src/components/InitialJobConfiguration.vue
index f6954aa1..045402b0 100644
--- a/src/components/InitialJobConfiguration.vue
+++ b/src/components/InitialJobConfiguration.vue
@@ -20,6 +20,7 @@
isOpen = false">
isOpen = true" slot="end">{{ currentJob?.runTime ? getTime(currentJob.runTime) : $t('Select run time') }}
isOpen = false">
-
Date: Fri, 28 Oct 2022 22:59:25 -0300
Subject: [PATCH 20/50] Adds show-default-buttons on JobConfiguration
datepicker
---
src/components/JobConfiguration.vue | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/components/JobConfiguration.vue b/src/components/JobConfiguration.vue
index 11536370..9541f3b3 100644
--- a/src/components/JobConfiguration.vue
+++ b/src/components/JobConfiguration.vue
@@ -24,7 +24,8 @@
isOpen = false">
-
Date: Fri, 28 Oct 2022 22:59:32 -0300
Subject: [PATCH 21/50] Adds show-default-buttons on BulkEditor datepickers
---
src/views/BulkEditor.vue | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/views/BulkEditor.vue b/src/views/BulkEditor.vue
index c39b5f69..a09cf2d7 100644
--- a/src/views/BulkEditor.vue
+++ b/src/views/BulkEditor.vue
@@ -70,7 +70,8 @@
isOpenGlobal = true" slot="end">{{ $t('Select run time') }}
isOpenGlobal = false">
-
@@ -118,7 +119,8 @@
isOpen = true" slot="end">{{ $t('Select run time') }}
isOpen = false">
-
From bc886db2a14ccdbe4cd42920c1a7a0b5b6975332 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Tue, 1 Nov 2022 15:56:19 +0530
Subject: [PATCH 22/50] Refactored job refresh on changing page after applying
filters; added action to handle the same instead of object.assign method
(#2uw73h5)
---
src/components/Filters.vue | 2 +-
src/store/modules/job/actions.ts | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index 8fce6124..54f01012 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -187,7 +187,7 @@ export default defineComponent({
})
},
unmounted() {
- Object.assign(this.store.state.job.pipelineFilters, { status: [], category: [] })
+ this.store.dispatch('job/clearPipelineFilters', { status: [], category: [] });
},
methods: {
updatePinnedJobs(filterArray: Array, filterProperty: any) {
diff --git a/src/store/modules/job/actions.ts b/src/store/modules/job/actions.ts
index 48d68d18..449672ca 100644
--- a/src/store/modules/job/actions.ts
+++ b/src/store/modules/job/actions.ts
@@ -782,6 +782,9 @@ const actions: ActionTree = {
: payload.category.push(payload.filter.enumTypeId);
}
commit(types.JOB_PIPELINE_FILTERS_UPDATED, payload);
+ },
+ clearPipelineFilters({ commit }, payload) {
+ commit(types.JOB_PIPELINE_FILTERS_UPDATED, payload);
}
}
export default actions;
\ No newline at end of file
From 666ad51cc7fea506b79a11787fe043e4b34725d1 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Tue, 1 Nov 2022 18:55:02 +0530
Subject: [PATCH 23/50] Refactored: removed extra API call when setting the
same timezone again from the settings page. (#2yma7df)
---
src/store/modules/user/actions.ts | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts
index aaf565a6..d425d894 100644
--- a/src/store/modules/user/actions.ts
+++ b/src/store/modules/user/actions.ts
@@ -143,13 +143,16 @@ const actions: ActionTree = {
* Update user timeZone
*/
async setUserTimeZone ( { state, commit }, payload) {
- const resp = await UserService.setUserTimeZone(payload)
- if (resp.status === 200 && !hasError(resp)) {
- const current: any = state.current;
- current.userTimeZone = payload.tzId;
- commit(types.USER_INFO_UPDATED, current);
- Settings.defaultZone = current.userTimeZone;
- showToast(translate("Time zone updated successfully"));
+ const current: any = state.current;
+ // if set the same timezone again, no API call should happen
+ if(current.userTimeZone !== payload.tzId) {
+ const resp = await UserService.setUserTimeZone(payload)
+ if (resp.status === 200 && !hasError(resp)) {
+ current.userTimeZone = payload.tzId;
+ commit(types.USER_INFO_UPDATED, current);
+ Settings.defaultZone = current.userTimeZone;
+ showToast(translate("Time zone updated successfully"));
+ }
}
},
From 0edfba96ed8ada07b613c80f811e9b05defd27c2 Mon Sep 17 00:00:00 2001
From: Aditya Sharma
Date: Wed, 2 Nov 2022 12:52:00 +0530
Subject: [PATCH 24/50] Fixed: runTime being set to current time while
setting/updating time (#266)
---
src/components/InitialJobConfiguration.vue | 1 +
src/components/JobConfiguration.vue | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/components/InitialJobConfiguration.vue b/src/components/InitialJobConfiguration.vue
index 2bfbcbdd..41fb2d15 100644
--- a/src/components/InitialJobConfiguration.vue
+++ b/src/components/InitialJobConfiguration.vue
@@ -187,6 +187,7 @@ export default defineComponent({
job['sinceId'] = this.lastShopifyOrderId
job['jobStatus'] = job.tempExprId
+ job.runTime = this.runTime;
// if job runTime is not a valid date then making runTime as empty
if (job?.runTime && !isFutureDate(job?.runTime)) {
diff --git a/src/components/JobConfiguration.vue b/src/components/JobConfiguration.vue
index 8cef84cd..19a69285 100644
--- a/src/components/JobConfiguration.vue
+++ b/src/components/JobConfiguration.vue
@@ -300,6 +300,7 @@ export default defineComponent({
async updateJob() {
const job = this.currentJob;
job['jobStatus'] = this.jobStatus !== 'SERVICE_DRAFT' ? this.jobStatus : 'HOURLY';
+ job.runTime = this.runTime;
if (job?.statusId === 'SERVICE_DRAFT') {
this.store.dispatch('job/scheduleService', job).then((job: any) => {
From a57452ce1f4b041de1f38d9ca14809916a3aa43c Mon Sep 17 00:00:00 2001
From: k2maan
Date: Fri, 4 Nov 2022 10:55:33 +0530
Subject: [PATCH 25/50] Refactored by changing function name to applyFilter
(#2uw73h5)
---
src/components/Filters.vue | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index 54f01012..4d026e06 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -16,7 +16,7 @@
-
+
{{ $t(filter.name) }}
@@ -32,7 +32,7 @@
+ @click="applyFilter(filter, 'categoryFilter')">
{{ $t(filter.name) }}
@@ -47,7 +47,7 @@
-
+
{{ getEnumName(job) }}
@@ -197,7 +197,7 @@ export default defineComponent({
? filterArray.splice(filterArray.indexOf(filterProperty), 1)
: filterArray.push(filterProperty);
},
- handleFilterApply(filter: any, type: string) {
+ applyFilter(filter: any, type: string) {
if(type === 'pinnedFilter') {
this.updatePinnedJobs(this.selectedPinnedJobs, filter);
}
From 6edc7bb35caff43a01e59d30215293a3cff5c361 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Fri, 4 Nov 2022 12:35:14 +0530
Subject: [PATCH 26/50] Fixed pinnedJobs.length error (#2uw73h5)
---
src/components/Filters.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index 4d026e06..355c35fa 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -39,7 +39,7 @@
-
+
From 3776312eb65b8f33b9fd2b0484e8df8f9e3f1037 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Fri, 4 Nov 2022 17:23:00 +0530
Subject: [PATCH 27/50] Refactored code by adding key-value based mutation of
filters and reducing the codebase (#2uw73h5)
---
src/components/Filters.vue | 28 +++++++++++--------------
src/store/modules/job/actions.ts | 21 +++++++++----------
src/store/modules/job/mutation-types.ts | 3 ++-
src/store/modules/job/mutations.ts | 3 +++
4 files changed, 27 insertions(+), 28 deletions(-)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index 355c35fa..8d759520 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -16,10 +16,10 @@
-
+
{{ $t(filter.name) }}
-
+
@@ -32,10 +32,10 @@
+ @click="applyFilter(filter.enumTypeId, 'category')">
{{ $t(filter.name) }}
-
+
@@ -173,17 +173,12 @@ export default defineComponent({
ticketOutline
};
},
- data() {
- return {
- selectedStatusFilters: [] as Array,
- selectedCategoryFilters: [] as Array,
- }
- },
computed: {
...mapGetters({
getEnumName: 'job/getEnumName',
currentEComStore: 'user/getCurrentEComStore',
pinnedJobs: 'user/getPinnedJobs',
+ pipelineFilters: 'job/getPipelineFilters'
})
},
unmounted() {
@@ -197,23 +192,24 @@ export default defineComponent({
? filterArray.splice(filterArray.indexOf(filterProperty), 1)
: filterArray.push(filterProperty);
},
- applyFilter(filter: any, type: string) {
+ applyFilter(value: any, type: string) {
if(type === 'pinnedFilter') {
- this.updatePinnedJobs(this.selectedPinnedJobs, filter);
+ this.updatePinnedJobs(this.selectedPinnedJobs, value);
+ } else {
+ this.store.dispatch('job/setPipelineFilters', { type, value });
}
- this.store.dispatch('job/setPipelineFilters', { status: this.selectedStatusFilters, category: this.selectedCategoryFilters, type, filter });
this.segmentSelected === 'pending' ? this.getFilteredPendingJobs() :
this.segmentSelected === 'running' ? this.getFilteredRunningJobs() :
this.getFilteredJobHistory();
},
async getFilteredPendingJobs(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
- await this.store.dispatch('job/fetchPendingJobs', { eComStoreId: this.currentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.selectedCategoryFilters, systemJobEnumId: this.selectedPinnedJobs, statusId: this.selectedStatusFilters });
+ await this.store.dispatch('job/fetchPendingJobs', { eComStoreId: this.currentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.pipelineFilters.category, systemJobEnumId: this.selectedPinnedJobs, statusId: this.pipelineFilters.status });
},
async getFilteredRunningJobs(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
- await this.store.dispatch('job/fetchRunningJobs', { eComStoreId: this.currentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.selectedCategoryFilters, systemJobEnumId: this.selectedPinnedJobs, statusId: this.selectedStatusFilters });
+ await this.store.dispatch('job/fetchRunningJobs', { eComStoreId: this.currentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.pipelineFilters.category, systemJobEnumId: this.selectedPinnedJobs, statusId: this.pipelineFilters.status });
},
async getFilteredJobHistory(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
- await this.store.dispatch('job/fetchJobHistory', { eComStoreId: this.currentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.selectedCategoryFilters, systemJobEnumId: this.selectedPinnedJobs, statusId: this.selectedStatusFilters });
+ await this.store.dispatch('job/fetchJobHistory', { eComStoreId: this.currentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.pipelineFilters.category, systemJobEnumId: this.selectedPinnedJobs, statusId: this.pipelineFilters.status });
},
},
});
diff --git a/src/store/modules/job/actions.ts b/src/store/modules/job/actions.ts
index fba1e999..fd275095 100644
--- a/src/store/modules/job/actions.ts
+++ b/src/store/modules/job/actions.ts
@@ -754,20 +754,19 @@ const actions: ActionTree = {
console.error(err);
}
},
- setPipelineFilters({ commit }, payload) {
- if(payload.type == 'statusFilter') {
- payload.status.includes(payload.filter.statusId)
- ? payload.status.splice(payload.status.indexOf(payload.filter.statusId), 1)
- : payload.status.push(payload.filter.statusId);
- } else if(payload.type === 'categoryFilter') {
- payload.category.includes(payload.filter.enumTypeId)
- ? payload.category.splice(payload.category.indexOf(payload.filter.enumTypeId), 1)
- : payload.category.push(payload.filter.enumTypeId);
- }
+ setPipelineFilters({ commit, state }, payload) {
+ const filter = (state.pipelineFilters as any)[payload.type]
+ filter.includes(payload.value)
+ ? filter.splice(filter.indexOf(payload.value), 1)
+ : filter.push(payload.value);
+
+ // we need to send the updated filters to the mutation
+ // hence, we update the payload.value as filters
+ payload.value = filter
commit(types.JOB_PIPELINE_FILTERS_UPDATED, payload);
},
clearPipelineFilters({ commit }, payload) {
- commit(types.JOB_PIPELINE_FILTERS_UPDATED, payload);
+ commit(types.JOB_PIPELINE_FILTERS_CLEARED, payload);
}
}
export default actions;
diff --git a/src/store/modules/job/mutation-types.ts b/src/store/modules/job/mutation-types.ts
index 573f5303..33f32967 100644
--- a/src/store/modules/job/mutation-types.ts
+++ b/src/store/modules/job/mutation-types.ts
@@ -8,4 +8,5 @@ export const JOB_HISTORY_UPDATED = SN_JOB + '/HISTORY_UPDATED'
export const JOB_RUNNING_UPDATED = SN_JOB + '/RUNNING_UPDATED'
export const JOB_CURRENT_UPDATED = SN_JOB + '/CURRENT_UPDATED'
export const JOB_MISCELLANEOUS_UPDATED = SN_JOB + '/MISCELLANEOUS_UPDATED'
-export const JOB_PIPELINE_FILTERS_UPDATED = SN_JOB + '/PIPELINE_FILTERS_UPDATED'
\ No newline at end of file
+export const JOB_PIPELINE_FILTERS_UPDATED = SN_JOB + '/PIPELINE_FILTERS_UPDATED'
+export const JOB_PIPELINE_FILTERS_CLEARED = SN_JOB + '/PIPELINE_FILTERS_CLEARED'
\ No newline at end of file
diff --git a/src/store/modules/job/mutations.ts b/src/store/modules/job/mutations.ts
index 15181446..5705950e 100644
--- a/src/store/modules/job/mutations.ts
+++ b/src/store/modules/job/mutations.ts
@@ -46,6 +46,9 @@ const mutations: MutationTree = {
state.miscellaneous.total = payload.total;
},
[types.JOB_PIPELINE_FILTERS_UPDATED] (state, payload){
+ (state.pipelineFilters as any)[payload.type] = payload.value;
+ },
+ [types.JOB_PIPELINE_FILTERS_CLEARED] (state, payload){
state.pipelineFilters = payload;
}
}
From 60650faacad9694519acdd13a41c328ace66ac76 Mon Sep 17 00:00:00 2001
From: Aditya Sharma
Date: Fri, 4 Nov 2022 17:45:03 +0530
Subject: [PATCH 28/50] Added release notes and commented bulk editor path as
incomplete
---
release-notes.md | 23 +++++++++++++++++++++++
src/components/Menu.vue | 4 ++--
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/release-notes.md b/release-notes.md
index 83a1362c..bab3bf09 100644
--- a/release-notes.md
+++ b/release-notes.md
@@ -1,3 +1,26 @@
+# Release 1.1.0
+## What's Changed
+* Updated logic to fetch shopify config using fallback api for backward compatibility(#2r65b1c) by @disha1202 in https://github.com/hotwax/job-manager/pull/234
+* Fixed: shop should be honored while fetching jobs (#2te9p7v) by @adityasharma7 in https://github.com/hotwax/job-manager/pull/236
+* Improved: shop grp to be initially from 1 sequence and simlified query (#2te9p7v) by @adityasharma7 in https://github.com/hotwax/job-manager/pull/237
+* Improved: Code to display message on miscellaneous page when no jobs found(#364ttxy) by @shashwatbangar in https://github.com/hotwax/job-manager/pull/235
+* Improved: Add a message on miscellaneous page when no jobs found(#2t2wdhn) by @shashwatbangar in https://github.com/hotwax/job-manager/pull/239
+* Fixed: error in console due to empty shopify configuration on logout(#2tky1f3) by @disha1202 in https://github.com/hotwax/job-manager/pull/238
+* Implemented static UI for bulk editors page(#2vjxd96) by @disha1202 in https://github.com/hotwax/job-manager/pull/244
+* Refactored: setEcomStore and setShopifyConfig actions to accept ID. (#2tzh44d) by @k2maan in https://github.com/hotwax/job-manager/pull/241
+* Implemented: Validation to set only future date and time on setting runtime. (#2tzb5w4) by @k2maan in https://github.com/hotwax/job-manager/pull/240
+* Upgraded version of ionic to 6.1.15(#2uaz29u) by @disha1202 in https://github.com/hotwax/job-manager/pull/248
+* Fixed: used console.error instead of console.log by @divyanshugour in https://github.com/hotwax/job-manager/pull/252
+* Implemented: Validation to set only future date and time on setting job runtime. (#2tzb5w4) by @k2maan in https://github.com/hotwax/job-manager/pull/255
+* Fixed: runTime being set to current time while setting/updating time (#266) by @adityasharma7 in https://github.com/hotwax/job-manager/pull/267
+* Refactored: removed extra API call when setting the same timezone again from the settings page. (#2yma7df) by @k2maan in https://github.com/hotwax/job-manager/pull/265
+
+## New Contributors
+* @k2maan made their first contribution in https://github.com/hotwax/job-manager/pull/241
+* @divyanshugour made their first contribution in https://github.com/hotwax/job-manager/pull/252
+
+**Full Changelog**: https://github.com/hotwax/job-manager/compare/v1.0.11...v1.1.0
+
# Release 1.0.11
## What's Changed
diff --git a/src/components/Menu.vue b/src/components/Menu.vue
index 775f7e11..c251b43e 100644
--- a/src/components/Menu.vue
+++ b/src/components/Menu.vue
@@ -155,7 +155,7 @@ export default defineComponent({
mdIcon: libraryOutline,
dependsOnBaseURL: false
},
- {
+ /* {
title: "Bulk editor"
},
{
@@ -164,7 +164,7 @@ export default defineComponent({
iosIcon: terminalOutline,
mdIcon: terminalOutline,
dependsOnBaseURL: false
- },
+ }, */
{
title: "Settings",
url: "/settings",
From d3fd0a2f541248088b955caa8ad5a04005fe2aae Mon Sep 17 00:00:00 2001
From: k2maan
Date: Fri, 4 Nov 2022 18:11:12 +0530
Subject: [PATCH 29/50] Refactored ion-modal by removing scrolling through
increasing size
---
src/components/BatchModal.vue | 9 ++++++++-
src/components/InitialJobConfiguration.vue | 6 ++++++
src/components/JobConfiguration.vue | 5 +++++
src/views/BulkEditor.vue | 6 ++++++
4 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/src/components/BatchModal.vue b/src/components/BatchModal.vue
index 98409451..1311cd65 100644
--- a/src/components/BatchModal.vue
+++ b/src/components/BatchModal.vue
@@ -182,4 +182,11 @@ export default defineComponent({
};
},
});
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/src/components/InitialJobConfiguration.vue b/src/components/InitialJobConfiguration.vue
index 045402b0..90e32c53 100644
--- a/src/components/InitialJobConfiguration.vue
+++ b/src/components/InitialJobConfiguration.vue
@@ -262,5 +262,11 @@ ion-item:nth-child(2) > ion-label:nth-child(3) {
.mobile-only {
display: none;
}
+
+ ion-modal {
+ --width: 290px;
+ --height: 440px;
+ --border-radius: 8px;
+ }
}
\ No newline at end of file
diff --git a/src/components/JobConfiguration.vue b/src/components/JobConfiguration.vue
index 9541f3b3..8ddf202c 100644
--- a/src/components/JobConfiguration.vue
+++ b/src/components/JobConfiguration.vue
@@ -443,4 +443,9 @@ ion-label:nth-child(3) {
cursor: pointer;
}
+ ion-modal {
+ --width: 290px;
+ --height: 440px;
+ --border-radius: 8px;
+ }
\ No newline at end of file
diff --git a/src/views/BulkEditor.vue b/src/views/BulkEditor.vue
index a09cf2d7..978e3f10 100644
--- a/src/views/BulkEditor.vue
+++ b/src/views/BulkEditor.vue
@@ -240,4 +240,10 @@ export default defineComponent({
ion-button {
margin: var(--spacer-base) var(--spacer-xs);
}
+
+ ion-modal {
+ --width: 290px;
+ --height: 440px;
+ --border-radius: 8px;
+ }
From 9ebda7fe37ae5e9ca1d0b3bd6074411da8933117 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Fri, 4 Nov 2022 18:29:55 +0530
Subject: [PATCH 30/50] Refactored by removing styling from batch model and
fixing indentations
---
src/components/BatchModal.vue | 9 +--------
src/components/JobConfiguration.vue | 10 +++++-----
2 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/src/components/BatchModal.vue b/src/components/BatchModal.vue
index 1311cd65..98409451 100644
--- a/src/components/BatchModal.vue
+++ b/src/components/BatchModal.vue
@@ -182,11 +182,4 @@ export default defineComponent({
};
},
});
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/components/JobConfiguration.vue b/src/components/JobConfiguration.vue
index 8ddf202c..143151c9 100644
--- a/src/components/JobConfiguration.vue
+++ b/src/components/JobConfiguration.vue
@@ -443,9 +443,9 @@ ion-label:nth-child(3) {
cursor: pointer;
}
- ion-modal {
- --width: 290px;
- --height: 440px;
- --border-radius: 8px;
- }
+ion-modal {
+ --width: 290px;
+ --height: 440px;
+ --border-radius: 8px;
+}
\ No newline at end of file
From 04bf96fe4880404e7339c17c5081425a27191309 Mon Sep 17 00:00:00 2001
From: Aditya Sharma
Date: Mon, 7 Nov 2022 13:12:13 +0530
Subject: [PATCH 31/50] Added script to auto deploy on release creation
---
.firebaserc | 3 ++
.../workflows/firebase-hosting-release.yml | 32 +++++++++++++++++++
firebase.json | 13 ++++++++
3 files changed, 48 insertions(+)
create mode 100644 .github/workflows/firebase-hosting-release.yml
diff --git a/.firebaserc b/.firebaserc
index d050b813..cc7aba5d 100644
--- a/.firebaserc
+++ b/.firebaserc
@@ -15,6 +15,9 @@
"hosting": {
"job-manager-dev": [
"job-manager-dev"
+ ],
+ "job-manager-uat": [
+ "job-manager-uat"
]
}
}
diff --git a/.github/workflows/firebase-hosting-release.yml b/.github/workflows/firebase-hosting-release.yml
new file mode 100644
index 00000000..aa28a7c5
--- /dev/null
+++ b/.github/workflows/firebase-hosting-release.yml
@@ -0,0 +1,32 @@
+# This file was auto-generated by the Firebase CLI
+# https://github.com/firebase/firebase-tools
+
+name: Deploy to Firebase Hosting on merge
+'on':
+ push:
+ tags:
+ - '*' # Push events to every tag not containing / Refer https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#patterns-to-match-branches-and-tags
+jobs:
+ build_and_deploy:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Checkout to latest release tag
+ run: |
+ git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
+ - name: Install Dependencies
+ run: npm install
+ - name: Generate .env file
+ run: cp .env.example .env
+ - name: Build
+ run: npm run build
+ - name: Install Firebase
+ run: npm install -g firebase-tools
+ - name: Set Firebase project
+ run: firebase use default --token "$HOTWAX_PUBLIC_SECRET"
+ env:
+ HOTWAX_PUBLIC_SECRET: ${{ secrets.HOTWAX_PUBLIC_SECRET }}
+ - name: Deploy
+ run: firebase deploy --token "$HOTWAX_PUBLIC_SECRET" -m "Deploying via GitHub actions" --only hosting:job-manager-uat
+ env:
+ HOTWAX_PUBLIC_SECRET: ${{ secrets.HOTWAX_PUBLIC_SECRET }}
diff --git a/firebase.json b/firebase.json
index d49b9ad4..6a4d8236 100644
--- a/firebase.json
+++ b/firebase.json
@@ -26,6 +26,19 @@
"source": "**",
"destination": "/index.html"
}]
+ },
+ {
+ "target": "job-manager-uat",
+ "public": "dist",
+ "ignore": [
+ "firebase.json",
+ "**/.*",
+ "**/node_modules/**"
+ ],
+ "rewrites": [ {
+ "source": "**",
+ "destination": "/index.html"
+ }]
}
]
}
From cbc65c1d4252306ad84b95a247c6131fdafcab24 Mon Sep 17 00:00:00 2001
From: Aditya Sharma
Date: Mon, 7 Nov 2022 13:14:54 +0530
Subject: [PATCH 32/50] Update firebase-hosting-release.yml
---
.github/workflows/firebase-hosting-release.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/firebase-hosting-release.yml b/.github/workflows/firebase-hosting-release.yml
index aa28a7c5..3919af21 100644
--- a/.github/workflows/firebase-hosting-release.yml
+++ b/.github/workflows/firebase-hosting-release.yml
@@ -1,7 +1,7 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
-name: Deploy to Firebase Hosting on merge
+name: Deploy to Firebase Hosting on release
'on':
push:
tags:
From 3e15f95f99d3eddbdc2439c710401081208271a1 Mon Sep 17 00:00:00 2001
From: shashwatbangar
Date: Tue, 8 Nov 2022 11:01:41 +0530
Subject: [PATCH 33/50] Fixed: Indentations in Filters view & fixed how we
clear filter in mutations(#2uw73h5)
---
src/components/Filters.vue | 15 ++++-----------
src/store/modules/job/mutations.ts | 3 ++-
2 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index 8d759520..ec0fb8ea 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -11,9 +11,7 @@
-
- {{ $t("Status") }}
-
+ {{ $t("Status") }}
@@ -26,13 +24,10 @@
-
- {{ $t("Category") }}
-
+ {{ $t("Category") }}
-
+
{{ $t(filter.name) }}
@@ -42,9 +37,7 @@
-
- {{ $t("Pinned") }}
-
+ {{ $t("Pinned") }}
diff --git a/src/store/modules/job/mutations.ts b/src/store/modules/job/mutations.ts
index 5705950e..4eb983b0 100644
--- a/src/store/modules/job/mutations.ts
+++ b/src/store/modules/job/mutations.ts
@@ -49,7 +49,8 @@ const mutations: MutationTree = {
(state.pipelineFilters as any)[payload.type] = payload.value;
},
[types.JOB_PIPELINE_FILTERS_CLEARED] (state, payload){
- state.pipelineFilters = payload;
+ state.pipelineFilters.status = payload.status;
+ state.pipelineFilters.category = payload.category;
}
}
export default mutations;
\ No newline at end of file
From d3af4b264c742243356bbe4f7c2e92fa606fa688 Mon Sep 17 00:00:00 2001
From: shashwatbangar
Date: Tue, 8 Nov 2022 11:07:19 +0530
Subject: [PATCH 34/50] Fixed: Rearranged constants alphabetically(#2uw73h5)
---
src/locales/en.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/locales/en.json b/src/locales/en.json
index 6460bed9..5d3d5336 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -64,8 +64,8 @@
"Every 15 minutes": "Every 15 minutes",
"Every 30 minutes": "Every 30 minutes",
"Failed": "Failed",
- "Finished": "Finished",
"Filters": "Filters",
+ "Finished": "Finished",
"File upload status": "File upload status",
"Fulfilled": "Fulfilled",
"Fulfillment": "Fulfillment",
From f013b1fac50ba9d6ca880454c0235b1067926549 Mon Sep 17 00:00:00 2001
From: Disha Talreja
Date: Tue, 8 Nov 2022 13:45:33 +0530
Subject: [PATCH 35/50] Upgraded ionic to 6.2(#2w9wz26)
---
package-lock.json | 32 ++++++++++++++++----------------
package.json | 6 +++---
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 05489296..116416cc 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1768,30 +1768,30 @@
}
},
"@ionic/core": {
- "version": "6.1.15",
- "resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.1.15.tgz",
- "integrity": "sha512-NvBlHR7O4kfp9KYz6oLsghFzGZImA7hM4qS4tFRUI62R+Q5iCJEY4OmXE5bif5K+SQkMhQY+x1l2Nq20waLzLg==",
+ "version": "6.2.9",
+ "resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.2.9.tgz",
+ "integrity": "sha512-d2KBXYUKBND2AD8aMgash3O/t04IDc/DHHMshcOydfNJ5qqAxwJYzZR7hs96UknCcIlhHk1pb5C29epkv7gOcQ==",
"requires": {
- "@stencil/core": "^2.16.0",
- "ionicons": "^6.0.2",
+ "@stencil/core": "^2.18.0",
+ "ionicons": "^6.0.3",
"tslib": "^2.1.0"
}
},
"@ionic/vue": {
- "version": "6.1.15",
- "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-6.1.15.tgz",
- "integrity": "sha512-rw4QuojW0MQc9qajMmaQ/nsTRrLkkpII27omJHB2ZobcdS9tsSdKMHnNQJGKnucwwyFU5gAuqOYkoxUcQROp0Q==",
+ "version": "6.2.9",
+ "resolved": "https://registry.npmjs.org/@ionic/vue/-/vue-6.2.9.tgz",
+ "integrity": "sha512-B0/T5MvVVQU+j+N4AoY/TLpOgPH9Fx/lWLK+BnOpkWHawmTNrw//iWgl1ypg7gOeRHAQIbKgmcyDpPhY7neo/w==",
"requires": {
- "@ionic/core": "^6.1.15",
+ "@ionic/core": "^6.2.9",
"ionicons": "^6.0.2"
}
},
"@ionic/vue-router": {
- "version": "6.1.15",
- "resolved": "https://registry.npmjs.org/@ionic/vue-router/-/vue-router-6.1.15.tgz",
- "integrity": "sha512-TgmRyRu4ITEl+UkrR8vnMBVJclZYwpA49Y0L5u6KHt5PbBU9/IQ5RQeDTMkBt/1UA3AoIDu9EiWDaIvDWZYQ3A==",
+ "version": "6.2.9",
+ "resolved": "https://registry.npmjs.org/@ionic/vue-router/-/vue-router-6.2.9.tgz",
+ "integrity": "sha512-u9y8fJ9kHQrGVvDoit6tDbKJLa4jpvvYBZIgULmx9d3pN8D5TH3oPDOU0OGJR8noXbh/9WR0O34Tl68TGSqsRQ==",
"requires": {
- "@ionic/vue": "^6.1.15"
+ "@ionic/vue": "^6.2.9"
}
},
"@istanbuljs/load-nyc-config": {
@@ -3071,9 +3071,9 @@
"dev": true
},
"@stencil/core": {
- "version": "2.18.1",
- "resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.18.1.tgz",
- "integrity": "sha512-/fXkh1lwZ+X9JQCw50mPjhBogzEHOBvVC5pLoDLZqodVYK0DGWILM2YLV4dcIUBNEK8/HMDpO/Rq81/rS3mNOw=="
+ "version": "2.19.2",
+ "resolved": "https://registry.npmjs.org/@stencil/core/-/core-2.19.2.tgz",
+ "integrity": "sha512-TK3sHqyQAACwcac4fWntypFtN9c/y+y9ioZojeCnNDY3dxF33Ax70lL9ZLDyQnWWR+aTh1WFoqB5sYOnZIUKMA=="
},
"@tootallnate/once": {
"version": "1.1.2",
diff --git a/package.json b/package.json
index e046f6f2..8180e2bd 100644
--- a/package.json
+++ b/package.json
@@ -15,9 +15,9 @@
"@capacitor/android": "^2.4.7",
"@capacitor/core": "^2.4.7",
"@capacitor/ios": "^2.4.7",
- "@ionic/core": "6.1.15",
- "@ionic/vue": "6.1.15",
- "@ionic/vue-router": "6.1.15",
+ "@ionic/core": "6.2.9",
+ "@ionic/vue": "6.2.9",
+ "@ionic/vue-router": "6.2.9",
"@types/file-saver": "^2.0.4",
"@types/papaparse": "^5.3.1",
"axios": "^0.21.1",
From 7334d59154e277bf9c126caad20394df5349a3ff Mon Sep 17 00:00:00 2001
From: k2maan
Date: Tue, 8 Nov 2022 16:25:07 +0530
Subject: [PATCH 36/50] Implemented pinned job filters through state management
and refactored setPipelineFilters action and mutation (#2uw73h5)
---
src/components/Filters.vue | 30 ++++++++++--------------------
src/store/modules/job/JobState.ts | 1 +
src/store/modules/job/actions.ts | 20 +++++++++-----------
src/store/modules/job/index.ts | 1 +
src/store/modules/job/mutations.ts | 9 ++++++---
src/views/Pipeline.vue | 18 +++++++++---------
6 files changed, 36 insertions(+), 43 deletions(-)
diff --git a/src/components/Filters.vue b/src/components/Filters.vue
index ec0fb8ea..33d3ad3d 100644
--- a/src/components/Filters.vue
+++ b/src/components/Filters.vue
@@ -34,15 +34,15 @@
-
+
{{ $t("Pinned") }}
-
+
{{ getEnumName(job) }}
-
+
@@ -81,7 +81,7 @@ export default defineComponent({
IonTitle,
IonToolbar
},
- props: ["segmentSelected", "queryString", "selectedPinnedJobs"],
+ props: ["segmentSelected", "queryString"],
setup() {
const store = useStore();
const statusFilters = [
@@ -175,34 +175,24 @@ export default defineComponent({
})
},
unmounted() {
- this.store.dispatch('job/clearPipelineFilters', { status: [], category: [] });
+ this.store.dispatch('job/clearPipelineFilters');
},
methods: {
- updatePinnedJobs(filterArray: Array, filterProperty: any) {
- // check if the filter is being applied,
- // if not - apply, if already there - remove.
- filterArray.includes(filterProperty)
- ? filterArray.splice(filterArray.indexOf(filterProperty), 1)
- : filterArray.push(filterProperty);
- },
applyFilter(value: any, type: string) {
- if(type === 'pinnedFilter') {
- this.updatePinnedJobs(this.selectedPinnedJobs, value);
- } else {
- this.store.dispatch('job/setPipelineFilters', { type, value });
- }
+ this.store.dispatch('job/setPipelineFilters', { type, value });
+
this.segmentSelected === 'pending' ? this.getFilteredPendingJobs() :
this.segmentSelected === 'running' ? this.getFilteredRunningJobs() :
this.getFilteredJobHistory();
},
async getFilteredPendingJobs(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
- await this.store.dispatch('job/fetchPendingJobs', { eComStoreId: this.currentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.pipelineFilters.category, systemJobEnumId: this.selectedPinnedJobs, statusId: this.pipelineFilters.status });
+ await this.store.dispatch('job/fetchPendingJobs', { eComStoreId: this.currentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.pipelineFilters.category, systemJobEnumId: this.pipelineFilters.enum, statusId: this.pipelineFilters.status });
},
async getFilteredRunningJobs(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
- await this.store.dispatch('job/fetchRunningJobs', { eComStoreId: this.currentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.pipelineFilters.category, systemJobEnumId: this.selectedPinnedJobs, statusId: this.pipelineFilters.status });
+ await this.store.dispatch('job/fetchRunningJobs', { eComStoreId: this.currentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.pipelineFilters.category, systemJobEnumId: this.pipelineFilters.enum, statusId: this.pipelineFilters.status });
},
async getFilteredJobHistory(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
- await this.store.dispatch('job/fetchJobHistory', { eComStoreId: this.currentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.pipelineFilters.category, systemJobEnumId: this.selectedPinnedJobs, statusId: this.pipelineFilters.status });
+ await this.store.dispatch('job/fetchJobHistory', { eComStoreId: this.currentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, enumTypeId: this.pipelineFilters.category, systemJobEnumId: this.pipelineFilters.enum, statusId: this.pipelineFilters.status });
},
},
});
diff --git a/src/store/modules/job/JobState.ts b/src/store/modules/job/JobState.ts
index 5dea5e27..412920d9 100644
--- a/src/store/modules/job/JobState.ts
+++ b/src/store/modules/job/JobState.ts
@@ -22,5 +22,6 @@ export default interface JobState {
pipelineFilters: {
status: any,
category: any,
+ enum: any
}
}
\ No newline at end of file
diff --git a/src/store/modules/job/actions.ts b/src/store/modules/job/actions.ts
index fd275095..ba5bc533 100644
--- a/src/store/modules/job/actions.ts
+++ b/src/store/modules/job/actions.ts
@@ -755,18 +755,16 @@ const actions: ActionTree = {
}
},
setPipelineFilters({ commit, state }, payload) {
- const filter = (state.pipelineFilters as any)[payload.type]
- filter.includes(payload.value)
- ? filter.splice(filter.indexOf(payload.value), 1)
- : filter.push(payload.value);
-
- // we need to send the updated filters to the mutation
- // hence, we update the payload.value as filters
- payload.value = filter
- commit(types.JOB_PIPELINE_FILTERS_UPDATED, payload);
+ const pipelineFilters = JSON.parse(JSON.stringify(state.pipelineFilters));
+ const pipelineFilter = (pipelineFilters as any)[payload.type]
+ pipelineFilter.includes(payload.value)
+ ? pipelineFilter.splice(pipelineFilter.indexOf(payload.value), 1)
+ : pipelineFilter.push(payload.value);
+
+ commit(types.JOB_PIPELINE_FILTERS_UPDATED, { pipelineFilters });
},
- clearPipelineFilters({ commit }, payload) {
- commit(types.JOB_PIPELINE_FILTERS_CLEARED, payload);
+ clearPipelineFilters({ commit }) {
+ commit(types.JOB_PIPELINE_FILTERS_CLEARED);
}
}
export default actions;
diff --git a/src/store/modules/job/index.ts b/src/store/modules/job/index.ts
index bc41db79..646642f0 100644
--- a/src/store/modules/job/index.ts
+++ b/src/store/modules/job/index.ts
@@ -31,6 +31,7 @@ const jobModule: Module = {
pipelineFilters: {
status: [],
category: [],
+ enum: [],
},
},
getters,
diff --git a/src/store/modules/job/mutations.ts b/src/store/modules/job/mutations.ts
index 4eb983b0..38c2ca5c 100644
--- a/src/store/modules/job/mutations.ts
+++ b/src/store/modules/job/mutations.ts
@@ -46,11 +46,14 @@ const mutations: MutationTree = {
state.miscellaneous.total = payload.total;
},
[types.JOB_PIPELINE_FILTERS_UPDATED] (state, payload){
- (state.pipelineFilters as any)[payload.type] = payload.value;
+ state.pipelineFilters = payload.pipelineFilters;
},
[types.JOB_PIPELINE_FILTERS_CLEARED] (state, payload){
- state.pipelineFilters.status = payload.status;
- state.pipelineFilters.category = payload.category;
+ state.pipelineFilters = {
+ status: [],
+ category: [],
+ enum: []
+ }
}
}
export default mutations;
\ No newline at end of file
diff --git a/src/views/Pipeline.vue b/src/views/Pipeline.vue
index 015d6c3b..cc8fdf57 100644
--- a/src/views/Pipeline.vue
+++ b/src/views/Pipeline.vue
@@ -1,6 +1,6 @@
-
+
@@ -375,14 +375,14 @@ export default defineComponent({
},
methods : {
isPinnedJobSelected(jobEnumId: any) {
- return (this as any).selectedPinnedJobs.some((jobId: any) => jobId === jobEnumId );
+ return (this as any).pipelineFilters.enum.some((jobId: any) => jobId === jobEnumId );
},
updateSelectedPinnedJob(jobEnumId: any) {
- const index = (this as any).selectedPinnedJobs.indexOf(jobEnumId);
- if ((this as any).selectedPinnedJobs.includes(jobEnumId) || !this.getPinnedJobs.includes(jobEnumId)) {
- if (index != -1) (this as any).selectedPinnedJobs.splice(index, 1)
+ const index = (this as any).pipelineFilters.enum.indexOf(jobEnumId);
+ if ((this as any).pipelineFilters.enum.includes(jobEnumId) || !this.getPinnedJobs.includes(jobEnumId)) {
+ if (index != -1) (this as any).pipelineFilters.enum.splice(index, 1)
} else {
- (this as any).selectedPinnedJobs.push(jobEnumId)
+ (this as any).pipelineFilters.enum.push(jobEnumId)
}
this.segmentSelected === 'pending' ? this.getPendingJobs():
@@ -498,13 +498,13 @@ export default defineComponent({
return alert.present();
},
async getPendingJobs(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
- await this.store.dispatch('job/fetchPendingJobs', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, systemJobEnumId: this.selectedPinnedJobs, enumTypeId: this.pipelineFilters.category, statusId: this.pipelineFilters.status });
+ await this.store.dispatch('job/fetchPendingJobs', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, systemJobEnumId: this.pipelineFilters.enum, enumTypeId: this.pipelineFilters.category, statusId: this.pipelineFilters.status });
},
async getRunningJobs(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
- await this.store.dispatch('job/fetchRunningJobs', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, systemJobEnumId: this.selectedPinnedJobs, enumTypeId: this.pipelineFilters.category, statusId: this.pipelineFilters.status });
+ await this.store.dispatch('job/fetchRunningJobs', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, systemJobEnumId: this.pipelineFilters.enum, enumTypeId: this.pipelineFilters.category, statusId: this.pipelineFilters.status });
},
async getJobHistory(viewSize = process.env.VUE_APP_VIEW_SIZE, viewIndex = '0') {
- await this.store.dispatch('job/fetchJobHistory', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, systemJobEnumId: this.selectedPinnedJobs, enumTypeId: this.pipelineFilters.category, statusId: this.pipelineFilters.status});
+ await this.store.dispatch('job/fetchJobHistory', { eComStoreId: this.getCurrentEComStore.productStoreId, viewSize, viewIndex, queryString: this.queryString, systemJobEnumId: this.pipelineFilters.enum, enumTypeId: this.pipelineFilters.category, statusId: this.pipelineFilters.status});
},
async openJobActions(job: any, ev: Event) {
const popover = await popoverController.create({
From fc5e566554b0166e1aade83b879fa47db44af7fd Mon Sep 17 00:00:00 2001
From: k2maan
Date: Tue, 8 Nov 2022 17:43:53 +0530
Subject: [PATCH 37/50] Refactored by removing show-default-buttons from
BatchModal
---
src/components/BatchModal.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/BatchModal.vue b/src/components/BatchModal.vue
index 98409451..e5e98aa1 100644
--- a/src/components/BatchModal.vue
+++ b/src/components/BatchModal.vue
@@ -37,7 +37,7 @@
{{ $t("Schedule") }}
-
+
From cc3770b766f44b1036c0d181d5a67bed127dc229 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Wed, 9 Nov 2022 11:18:59 +0530
Subject: [PATCH 38/50] Fixed show-default-buttons error and removed unused
payload declaration (#2zb6ver)
---
src/components/InitialJobConfiguration.vue | 1 -
src/components/JobConfiguration.vue | 1 -
src/store/modules/job/mutations.ts | 2 +-
3 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/components/InitialJobConfiguration.vue b/src/components/InitialJobConfiguration.vue
index 1efacd2d..5487321a 100644
--- a/src/components/InitialJobConfiguration.vue
+++ b/src/components/InitialJobConfiguration.vue
@@ -24,7 +24,6 @@
hour-cycle="h23"
:value="runTime ? getDateTime(runTime) : ''"
@ionChange="updateRunTime($event, currentJob)"
- :show-default-buttons="true"
/>
diff --git a/src/components/JobConfiguration.vue b/src/components/JobConfiguration.vue
index 49fafadf..51405fe9 100644
--- a/src/components/JobConfiguration.vue
+++ b/src/components/JobConfiguration.vue
@@ -29,7 +29,6 @@
hour-cycle="h23"
:value="runTime ? getDateTime(runTime) : ''"
@ionChange="updateRunTime($event, currentJob)"
- :show-default-buttons="true"
/>
diff --git a/src/store/modules/job/mutations.ts b/src/store/modules/job/mutations.ts
index 38c2ca5c..57bd6d47 100644
--- a/src/store/modules/job/mutations.ts
+++ b/src/store/modules/job/mutations.ts
@@ -48,7 +48,7 @@ const mutations: MutationTree = {
[types.JOB_PIPELINE_FILTERS_UPDATED] (state, payload){
state.pipelineFilters = payload.pipelineFilters;
},
- [types.JOB_PIPELINE_FILTERS_CLEARED] (state, payload){
+ [types.JOB_PIPELINE_FILTERS_CLEARED] (state){
state.pipelineFilters = {
status: [],
category: [],
From f6a984a40bebc2cf1d118f4c40b9986025886ad4 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Wed, 9 Nov 2022 13:13:43 +0530
Subject: [PATCH 39/50] Fixed build 'show-default-buttons = true' error in
InititalJobConfiguration and JobConfiguration (#2zb7dhk)
---
src/components/InitialJobConfiguration.vue | 1 -
src/components/JobConfiguration.vue | 1 -
2 files changed, 2 deletions(-)
diff --git a/src/components/InitialJobConfiguration.vue b/src/components/InitialJobConfiguration.vue
index 1efacd2d..5487321a 100644
--- a/src/components/InitialJobConfiguration.vue
+++ b/src/components/InitialJobConfiguration.vue
@@ -24,7 +24,6 @@
hour-cycle="h23"
:value="runTime ? getDateTime(runTime) : ''"
@ionChange="updateRunTime($event, currentJob)"
- :show-default-buttons="true"
/>
diff --git a/src/components/JobConfiguration.vue b/src/components/JobConfiguration.vue
index 49fafadf..51405fe9 100644
--- a/src/components/JobConfiguration.vue
+++ b/src/components/JobConfiguration.vue
@@ -29,7 +29,6 @@
hour-cycle="h23"
:value="runTime ? getDateTime(runTime) : ''"
@ionChange="updateRunTime($event, currentJob)"
- :show-default-buttons="true"
/>
From 0a7d616a0848ba451cb395d3b209b993c7261f58 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Wed, 9 Nov 2022 16:20:44 +0530
Subject: [PATCH 40/50] Implemented filter button color update based on the
type of filters applied and the segment selected (#2zb6ver)
---
src/store/modules/job/getters.ts | 6 ++++++
src/views/Pipeline.vue | 14 ++++++++++++--
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/src/store/modules/job/getters.ts b/src/store/modules/job/getters.ts
index 56ee3a15..cf8ad637 100644
--- a/src/store/modules/job/getters.ts
+++ b/src/store/modules/job/getters.ts
@@ -60,6 +60,12 @@ const getters: GetterTree = {
getPipelineFilters: (state) => {
return state.pipelineFilters;
},
+ // isHistoryFilterApplied (state) {
+ // return state.pipelineFilters.status?.length > 0 || state.pipelineFilters.category?.length || state.pipelineFilters.enum?.length
+ // },
+ // isFilterApplied (state) {
+ // return state.pipelineFilters.status?.length > 0 || state.pipelineFilters.category?.length || state.pipelineFilters.enum?.length
+ // }
}
export default getters;
\ No newline at end of file
diff --git a/src/views/Pipeline.vue b/src/views/Pipeline.vue
index cc8fdf57..6d325651 100644
--- a/src/views/Pipeline.vue
+++ b/src/views/Pipeline.vue
@@ -8,7 +8,7 @@
{{ $t("Pipeline") }}
-
+
@@ -338,7 +338,6 @@ export default defineComponent({
},
data() {
return {
- selectedPinnedJobs:[],
jobFrequencyType: JSON.parse(process.env?.VUE_APP_JOB_FREQUENCY_TYPE as string) as any,
jobEnums: {
...JSON.parse(process.env?.VUE_APP_ODR_JOB_ENUMS as string) as any,
@@ -475,6 +474,7 @@ export default defineComponent({
this.segmentSelected === 'pending' ? this.getPendingJobs():
this.segmentSelected === 'running' ? this.getRunningJobs():
this.getJobHistory();
+ this.updateFilterIcon();
},
async skipJob (job: any) {
const alert = await alertController
@@ -571,6 +571,16 @@ export default defineComponent({
}
this.getPendingJobs();
}
+ },
+ updateFilterIcon() {
+ const isFilterApplied = this.pipelineFilters.status?.length > 0 || this.pipelineFilters.category?.length > 0 || this.pipelineFilters.enum?.length > 0
+ const isCategoryOrEnumFilterApplied = this.pipelineFilters.category?.length > 0 || this.pipelineFilters.enum?.length > 0
+
+ if((isFilterApplied && this.segmentSelected === 'history') || (isCategoryOrEnumFilterApplied && this.segmentSelected !== 'history')) {
+ return true;
+ } else {
+ return false;
+ }
}
},
async created() {
From b7979a8443b85632d8a3017c201c66e48711dd09 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Wed, 9 Nov 2022 16:20:44 +0530
Subject: [PATCH 41/50] Implemented filter icon color update based on the type
of filters applied and the segment selected (#2zb6ver)
---
src/store/modules/job/getters.ts | 6 ++++++
src/views/Pipeline.vue | 14 ++++++++++++--
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/src/store/modules/job/getters.ts b/src/store/modules/job/getters.ts
index 56ee3a15..cf8ad637 100644
--- a/src/store/modules/job/getters.ts
+++ b/src/store/modules/job/getters.ts
@@ -60,6 +60,12 @@ const getters: GetterTree = {
getPipelineFilters: (state) => {
return state.pipelineFilters;
},
+ // isHistoryFilterApplied (state) {
+ // return state.pipelineFilters.status?.length > 0 || state.pipelineFilters.category?.length || state.pipelineFilters.enum?.length
+ // },
+ // isFilterApplied (state) {
+ // return state.pipelineFilters.status?.length > 0 || state.pipelineFilters.category?.length || state.pipelineFilters.enum?.length
+ // }
}
export default getters;
\ No newline at end of file
diff --git a/src/views/Pipeline.vue b/src/views/Pipeline.vue
index cc8fdf57..6d325651 100644
--- a/src/views/Pipeline.vue
+++ b/src/views/Pipeline.vue
@@ -8,7 +8,7 @@
{{ $t("Pipeline") }}
-
+
@@ -338,7 +338,6 @@ export default defineComponent({
},
data() {
return {
- selectedPinnedJobs:[],
jobFrequencyType: JSON.parse(process.env?.VUE_APP_JOB_FREQUENCY_TYPE as string) as any,
jobEnums: {
...JSON.parse(process.env?.VUE_APP_ODR_JOB_ENUMS as string) as any,
@@ -475,6 +474,7 @@ export default defineComponent({
this.segmentSelected === 'pending' ? this.getPendingJobs():
this.segmentSelected === 'running' ? this.getRunningJobs():
this.getJobHistory();
+ this.updateFilterIcon();
},
async skipJob (job: any) {
const alert = await alertController
@@ -571,6 +571,16 @@ export default defineComponent({
}
this.getPendingJobs();
}
+ },
+ updateFilterIcon() {
+ const isFilterApplied = this.pipelineFilters.status?.length > 0 || this.pipelineFilters.category?.length > 0 || this.pipelineFilters.enum?.length > 0
+ const isCategoryOrEnumFilterApplied = this.pipelineFilters.category?.length > 0 || this.pipelineFilters.enum?.length > 0
+
+ if((isFilterApplied && this.segmentSelected === 'history') || (isCategoryOrEnumFilterApplied && this.segmentSelected !== 'history')) {
+ return true;
+ } else {
+ return false;
+ }
}
},
async created() {
From 99d8a701c1d7080fe91e6714f534237c7f40426a Mon Sep 17 00:00:00 2001
From: k2maan
Date: Wed, 9 Nov 2022 16:28:19 +0530
Subject: [PATCH 42/50] Removed commented code (#2zb6ver)
---
src/store/modules/job/getters.ts | 6 ------
1 file changed, 6 deletions(-)
diff --git a/src/store/modules/job/getters.ts b/src/store/modules/job/getters.ts
index cf8ad637..56ee3a15 100644
--- a/src/store/modules/job/getters.ts
+++ b/src/store/modules/job/getters.ts
@@ -60,12 +60,6 @@ const getters: GetterTree = {
getPipelineFilters: (state) => {
return state.pipelineFilters;
},
- // isHistoryFilterApplied (state) {
- // return state.pipelineFilters.status?.length > 0 || state.pipelineFilters.category?.length || state.pipelineFilters.enum?.length
- // },
- // isFilterApplied (state) {
- // return state.pipelineFilters.status?.length > 0 || state.pipelineFilters.category?.length || state.pipelineFilters.enum?.length
- // }
}
export default getters;
\ No newline at end of file
From 5348ee3c543e3f942d23f0e5dc1bf4b88458fa5b Mon Sep 17 00:00:00 2001
From: k2maan
Date: Wed, 9 Nov 2022 16:29:19 +0530
Subject: [PATCH 43/50] Removed commented code (#2zb6ver)
---
src/store/modules/job/getters.ts | 6 ------
1 file changed, 6 deletions(-)
diff --git a/src/store/modules/job/getters.ts b/src/store/modules/job/getters.ts
index cf8ad637..56ee3a15 100644
--- a/src/store/modules/job/getters.ts
+++ b/src/store/modules/job/getters.ts
@@ -60,12 +60,6 @@ const getters: GetterTree = {
getPipelineFilters: (state) => {
return state.pipelineFilters;
},
- // isHistoryFilterApplied (state) {
- // return state.pipelineFilters.status?.length > 0 || state.pipelineFilters.category?.length || state.pipelineFilters.enum?.length
- // },
- // isFilterApplied (state) {
- // return state.pipelineFilters.status?.length > 0 || state.pipelineFilters.category?.length || state.pipelineFilters.enum?.length
- // }
}
export default getters;
\ No newline at end of file
From 50a6c5da69205a77ff8bb83ddcb811f3cabddd14 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Wed, 9 Nov 2022 16:56:58 +0530
Subject: [PATCH 44/50] Refactored by adding filters and removing function call
(#2zb6ver)
---
src/store/modules/job/getters.ts | 6 ++++++
src/views/Pipeline.vue | 15 +++------------
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/src/store/modules/job/getters.ts b/src/store/modules/job/getters.ts
index 56ee3a15..84f1c498 100644
--- a/src/store/modules/job/getters.ts
+++ b/src/store/modules/job/getters.ts
@@ -60,6 +60,12 @@ const getters: GetterTree = {
getPipelineFilters: (state) => {
return state.pipelineFilters;
},
+ isFilterApplied: (state) => {
+ return state.pipelineFilters.status?.length > 0 || state.pipelineFilters.category?.length > 0 || state.pipelineFilters.enum?.length > 0
+ },
+ isCategoryOrEnumFilterApplied: (state) => {
+ return state.pipelineFilters.category?.length > 0 || state.pipelineFilters.enum?.length > 0
+ }
}
export default getters;
\ No newline at end of file
diff --git a/src/views/Pipeline.vue b/src/views/Pipeline.vue
index 6d325651..97a3375d 100644
--- a/src/views/Pipeline.vue
+++ b/src/views/Pipeline.vue
@@ -8,7 +8,7 @@
{{ $t("Pipeline") }}
-
+
@@ -370,6 +370,8 @@ export default defineComponent({
getPinnedJobs: 'user/getPinnedJobs',
currentJob: 'job/getCurrentJob',
pipelineFilters: 'job/getPipelineFilters',
+ isFilterApplied: 'job/isFilterApplied',
+ isCategoryOrEnumFilterApplied: 'job/isCategoryOrEnumFilterApplied',
})
},
methods : {
@@ -474,7 +476,6 @@ export default defineComponent({
this.segmentSelected === 'pending' ? this.getPendingJobs():
this.segmentSelected === 'running' ? this.getRunningJobs():
this.getJobHistory();
- this.updateFilterIcon();
},
async skipJob (job: any) {
const alert = await alertController
@@ -572,16 +573,6 @@ export default defineComponent({
this.getPendingJobs();
}
},
- updateFilterIcon() {
- const isFilterApplied = this.pipelineFilters.status?.length > 0 || this.pipelineFilters.category?.length > 0 || this.pipelineFilters.enum?.length > 0
- const isCategoryOrEnumFilterApplied = this.pipelineFilters.category?.length > 0 || this.pipelineFilters.enum?.length > 0
-
- if((isFilterApplied && this.segmentSelected === 'history') || (isCategoryOrEnumFilterApplied && this.segmentSelected !== 'history')) {
- return true;
- } else {
- return false;
- }
- }
},
async created() {
this.getPendingJobs();
From 62e0ed6b6adb9db3e86c2149b5e814d1fa269b24 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Wed, 9 Nov 2022 18:41:46 +0530
Subject: [PATCH 45/50] Refactored isFilterApplied getter by using functional
way to check if any of the filter is applied (#2zb6ver)
---
src/store/modules/job/getters.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/store/modules/job/getters.ts b/src/store/modules/job/getters.ts
index 84f1c498..b0d275ea 100644
--- a/src/store/modules/job/getters.ts
+++ b/src/store/modules/job/getters.ts
@@ -61,7 +61,7 @@ const getters: GetterTree = {
return state.pipelineFilters;
},
isFilterApplied: (state) => {
- return state.pipelineFilters.status?.length > 0 || state.pipelineFilters.category?.length > 0 || state.pipelineFilters.enum?.length > 0
+ return Object.values(state.pipelineFilters as any).some((filters: any) => filters?.length > 0)
},
isCategoryOrEnumFilterApplied: (state) => {
return state.pipelineFilters.category?.length > 0 || state.pipelineFilters.enum?.length > 0
From 8bc73191fe7e9523e21973adcc6403d23465dc1d Mon Sep 17 00:00:00 2001
From: k2maan
Date: Thu, 10 Nov 2022 11:07:33 +0530
Subject: [PATCH 46/50] Refactored filter Icon Update by using a computed
property in the component itself instead of getters (#2zb6ver)
---
src/store/modules/job/getters.ts | 6 ------
src/views/Pipeline.vue | 11 +++++++++--
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/store/modules/job/getters.ts b/src/store/modules/job/getters.ts
index b0d275ea..56ee3a15 100644
--- a/src/store/modules/job/getters.ts
+++ b/src/store/modules/job/getters.ts
@@ -60,12 +60,6 @@ const getters: GetterTree = {
getPipelineFilters: (state) => {
return state.pipelineFilters;
},
- isFilterApplied: (state) => {
- return Object.values(state.pipelineFilters as any).some((filters: any) => filters?.length > 0)
- },
- isCategoryOrEnumFilterApplied: (state) => {
- return state.pipelineFilters.category?.length > 0 || state.pipelineFilters.enum?.length > 0
- }
}
export default getters;
\ No newline at end of file
diff --git a/src/views/Pipeline.vue b/src/views/Pipeline.vue
index 97a3375d..286926e4 100644
--- a/src/views/Pipeline.vue
+++ b/src/views/Pipeline.vue
@@ -8,7 +8,7 @@
{{ $t("Pipeline") }}
-
+
@@ -372,7 +372,14 @@ export default defineComponent({
pipelineFilters: 'job/getPipelineFilters',
isFilterApplied: 'job/isFilterApplied',
isCategoryOrEnumFilterApplied: 'job/isCategoryOrEnumFilterApplied',
- })
+ }),
+ updateFilterIcon: function() {
+ const pipelineFilters = JSON.parse(JSON.stringify(this.pipelineFilters));
+ if(this.segmentSelected !== 'history') {
+ delete pipelineFilters.status;
+ }
+ return Object.values(pipelineFilters as any).some((filters: any) => filters?.length > 0) ? 'secondary' : '';
+ },
},
methods : {
isPinnedJobSelected(jobEnumId: any) {
From 5d9df6591f4b8cd13efd6ab56cf8ea462df1aef6 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Thu, 10 Nov 2022 11:09:21 +0530
Subject: [PATCH 47/50] Refactored by code by removing getters (#2zb6ver)
---
src/views/Pipeline.vue | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/views/Pipeline.vue b/src/views/Pipeline.vue
index 286926e4..63a4417a 100644
--- a/src/views/Pipeline.vue
+++ b/src/views/Pipeline.vue
@@ -370,8 +370,6 @@ export default defineComponent({
getPinnedJobs: 'user/getPinnedJobs',
currentJob: 'job/getCurrentJob',
pipelineFilters: 'job/getPipelineFilters',
- isFilterApplied: 'job/isFilterApplied',
- isCategoryOrEnumFilterApplied: 'job/isCategoryOrEnumFilterApplied',
}),
updateFilterIcon: function() {
const pipelineFilters = JSON.parse(JSON.stringify(this.pipelineFilters));
From 1989edc1e842c4df07008833926062a702f99ce6 Mon Sep 17 00:00:00 2001
From: k2maan
Date: Thu, 10 Nov 2022 13:00:00 +0530
Subject: [PATCH 48/50] Refactored by code by changing computed property name
(#2zb6ver)
---
src/views/Pipeline.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/views/Pipeline.vue b/src/views/Pipeline.vue
index 63a4417a..f035371a 100644
--- a/src/views/Pipeline.vue
+++ b/src/views/Pipeline.vue
@@ -8,7 +8,7 @@
{{ $t("Pipeline") }}
-
+
@@ -371,7 +371,7 @@ export default defineComponent({
currentJob: 'job/getCurrentJob',
pipelineFilters: 'job/getPipelineFilters',
}),
- updateFilterIcon: function() {
+ filterIconColor: function() {
const pipelineFilters = JSON.parse(JSON.stringify(this.pipelineFilters));
if(this.segmentSelected !== 'history') {
delete pipelineFilters.status;
From 8541e11208c471b1e2db0cab951007e3b369f1ef Mon Sep 17 00:00:00 2001
From: k2maan
Date: Thu, 10 Nov 2022 13:03:11 +0530
Subject: [PATCH 49/50] Refactored by code by changing variable name and
removing type of any (#2zb6ver)
---
src/views/Pipeline.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/views/Pipeline.vue b/src/views/Pipeline.vue
index f035371a..872250b4 100644
--- a/src/views/Pipeline.vue
+++ b/src/views/Pipeline.vue
@@ -376,7 +376,7 @@ export default defineComponent({
if(this.segmentSelected !== 'history') {
delete pipelineFilters.status;
}
- return Object.values(pipelineFilters as any).some((filters: any) => filters?.length > 0) ? 'secondary' : '';
+ return Object.values(pipelineFilters).some((filter: any) => filter.length > 0) ? 'secondary' : '';
},
},
methods : {
From 5d810992d50109baa709b93c9b01f516c9a3bcc1 Mon Sep 17 00:00:00 2001
From: Aditya Sharma
Date: Thu, 10 Nov 2022 14:42:52 +0530
Subject: [PATCH 50/50] Prepared for release 1.2.0
---
release-notes.md | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/release-notes.md b/release-notes.md
index bab3bf09..1bc0fa04 100644
--- a/release-notes.md
+++ b/release-notes.md
@@ -1,3 +1,15 @@
+# Release 1.2.0
+## What's Changed
+* Implemented: filters on pipeline page (#2uw73h5) by @k2maan in https://github.com/hotwax/job-manager/pull/246 and @shashwatbangar in https://github.com/hotwax/job-manager/pull/272
+* Feature: Add confirmation buttons to date pickers by @franciscoemanuel in https://github.com/hotwax/job-manager/pull/256 and @k2maan in https://github.com/hotwax/job-manager/pull/269
+* Fixed build fail by removing 'show-default-buttons = true' error in InititalJobConfiguration and JobConfiguration (#2zb7dhk) by @k2maan in https://github.com/hotwax/job-manager/pull/277
+* Upgraded Ionic to 6.2(#2w9wz26) by @disha1202 in https://github.com/hotwax/job-manager/pull/273
+* Implemented filter icon color update based on the type of filters applied and the segment selected (#2zb6ver) by @k2maan in https://github.com/hotwax/job-manager/pull/278
+
+## New Contributors
+* @franciscoemanuel made their first contribution in https://github.com/hotwax/job-manager/pull/256
+
+**Full Changelog**: https://github.com/hotwax/job-manager/compare/v1.1.0...v1.2.0
# Release 1.1.0
## What's Changed
* Updated logic to fetch shopify config using fallback api for backward compatibility(#2r65b1c) by @disha1202 in https://github.com/hotwax/job-manager/pull/234