diff --git a/src/components/JobReorderModal.vue b/src/components/JobReorderModal.vue
new file mode 100644
index 00000000..9af0a492
--- /dev/null
+++ b/src/components/JobReorderModal.vue
@@ -0,0 +1,186 @@
+
+
+
+
+
+
+
+
+ {{ $t('Export product threshold jobs') }}
+
+
+
+
+
+
+ {{ job.jobName }}
+ {{ job.runTime ? getTime(job.runTime) : "-" }}
+ {{ timeTillJob(job.runTime)}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/locales/en.json b/src/locales/en.json
index da9a59e1..7693e870 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -32,6 +32,7 @@
"excluded": "excluded",
"Exclude tags": "Exclude tags",
"Export product thresholds": "Export product thresholds",
+ "Export product threshold jobs": "Export product threshold jobs",
"Failed": "Failed",
"Failed to update some jobs": "Failed to update some jobs",
"Failed to schedule service, hence other jobs are not updated": "Failed to schedule service, hence other jobs are not updated",
@@ -46,6 +47,7 @@
"Include": "Include",
"Include tags": "Include tags",
"Info": "Info",
+ "Jobs sequence updated successfully": "Jobs sequence updated successfully",
"Keep editing": "Keep editing",
"Last run": "Last run",
"Loading": "Loading",
@@ -56,6 +58,7 @@
"Name": "Name",
"No job found.": "No job found.",
"No jobs have run yet": "No jobs have run yet",
+ "No jobs to update": "No jobs to update",
"No previous occurrence": "No previous occurrence",
"No threshold rule found. Invalid job": "No threshold rule found. Invalid job",
"No time zone found": "No time zone found",
@@ -73,6 +76,7 @@
"Ok": "Ok",
"OMS": "OMS",
"Ready to create an app?": "Ready to create an app?",
+ "Reorder export jobs": "Reorder export jobs",
"reset": "reset",
"retry": "retry",
"rule name": "rule name",
diff --git a/src/views/ThresholdUpdates.vue b/src/views/ThresholdUpdates.vue
index 55f556a2..06d923fb 100644
--- a/src/views/ThresholdUpdates.vue
+++ b/src/views/ThresholdUpdates.vue
@@ -256,6 +256,14 @@
+
+
+
+
+
+
+
+
@@ -270,6 +278,8 @@ import {
IonCardHeader,
IonCardSubtitle,
IonCardTitle,
+ IonFab,
+ IonFabButton,
IonHeader,
IonIcon,
IonItem,
@@ -292,14 +302,14 @@ import {
createAnimation
} from "@ionic/vue";
import JobConfiguration from '@/components/JobConfiguration.vue'
-import { copyOutline, closeCircleOutline, checkmarkCircleOutline, optionsOutline, timeOutline, timerOutline } from "ionicons/icons";
-
+import { copyOutline, closeCircleOutline, checkmarkCircleOutline, pencilOutline, optionsOutline, timeOutline, timerOutline } from "ionicons/icons";
import { Plugins } from '@capacitor/core';
import { hasError, showToast } from '@/utils'
import JobHistoryModal from '@/components/JobHistoryModal.vue';
import { DateTime } from 'luxon';
import { ProductService } from '@/services/ProductService';
import { Actions, hasPermission } from '@/authorization'
+import JobReorderModal from '@/components/JobReorderModal.vue';
import emitter from '@/event-bus';
export default defineComponent({
@@ -312,6 +322,8 @@ export default defineComponent({
IonCardHeader,
IonCardSubtitle,
IonCardTitle,
+ IonFab,
+ IonFabButton,
IonHeader,
IonIcon,
IonItem,
@@ -574,6 +586,18 @@ export default defineComponent({
createAnimation()
.addAnimation([gapAnimation, revealAnimation])
.play();
+ },
+ async openReorderModal() {
+ const jobReorderModal = await modalController.create({
+ component: JobReorderModal,
+ componentProps: { jobs: this.pendingJobs.filter((job: any) => job.systemJobEnumId === 'JOB_EXP_PROD_THRSHLD')} // passing export jobs, as we will only reorder export threshold jobs
+ })
+ jobReorderModal.onDidDismiss().then((result: any) => {
+ if (result?.data?.isJobsUpdated) {
+ this.store.dispatch('job/fetchPendingJobs', {viewSize:process.env.VUE_APP_VIEW_SIZE, viewIndex:0, jobEnums: this.jobEnums});
+ }
+ })
+ return jobReorderModal.present();
}
},
ionViewWillEnter() {
@@ -599,6 +623,7 @@ export default defineComponent({
store,
closeCircleOutline,
checkmarkCircleOutline,
+ pencilOutline,
optionsOutline,
timeOutline,
timerOutline,