Skip to content

Commit

Permalink
Merge branch 'main' into #85zrgqc2a
Browse files Browse the repository at this point in the history
  • Loading branch information
adityasharma7 authored Dec 30, 2022
2 parents 446bebe + f23bcc2 commit 663b653
Show file tree
Hide file tree
Showing 7 changed files with 46,712 additions and 11,791 deletions.
58,434 changes: 46,672 additions & 11,762 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "job-manager",
"version": "1.3.0",
"version": "1.4.0",
"private": true,
"description": "Job Manager App",
"scripts": {
Expand Down Expand Up @@ -30,21 +30,21 @@
"qs": "^6.10.3",
"register-service-worker": "^1.7.1",
"vue": "^3.2.26",
"vue-i18n": "^9.0.0",
"vue-i18n": "~9.1.6",
"vue-router": "^4.0.12",
"vuex": "^4.0.1",
"vuex-persistedstate": "^4.0.0-beta.3"
},
"devDependencies": {
"@capacitor/cli": "^2.4.7",
"@intlify/vue-i18n-loader": "^2.1.0",
"@types/jest": "^24.0.19",
"@types/jest": "^27.5.0",
"@types/luxon": "^2.0.9",
"@typescript-eslint/eslint-plugin": "^2.33.0",
"@typescript-eslint/parser": "^2.33.0",
"@typescript-eslint/eslint-plugin": "~5.26.0",
"@typescript-eslint/parser": "~5.26.0",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-e2e-cypress": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-eslint": "~5.0.8",
"@vue/cli-plugin-pwa": "^4.5.16",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-typescript": "~4.5.0",
Expand All @@ -56,11 +56,11 @@
"cypress": "^8.3.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
"jest": "^27.1.0",
"jest": "^28.1.0",
"papaparse": "^5.3.1",
"ts-jest": "^27.0.4",
"typescript": "~4.1.5",
"ts-jest": "^28.0.8",
"typescript": "~4.7.4",
"vue-cli-plugin-i18n": "^1.0.1",
"vue-jest": "^5.0.0-0"
"@vue/vue3-jest": "^28.0.0"
}
}
13 changes: 13 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Release 1.4.0

## What's Changed
* Added shop selector to menu footer (#2a7ymj3) by @k2maan in https://github.com/hotwax/job-manager/pull/283, @Mayank909 in https://github.com/hotwax/job-manager/pull/135, and @disha1202 in https://github.com/hotwax/job-manager/pull/243
* Fixed jobs not appearing after store change from Menu footer (#2a7ymj3) by @k2maan in https://github.com/hotwax/job-manager/pull/310
* Implemented: Updated UI of settings page(#32j3r6t) by @shashwatbangar in https://github.com/hotwax/job-manager/pull/309
* Fixed: issue of brokering filter not working by updating the enumTypeId for brokering jobs(#85zrgnpuc) by @ymaheshwari1 in https://github.com/hotwax/job-manager/pull/320
* Fixed: Jobs getting scheduled multiple times(#32qywdd) by @shashwatbangar in https://github.com/hotwax/job-manager/pull/315
* Fixed: build issue due to eslint version mismatch in dependencies(#85zrh0bwu) by @ymaheshwari1 in https://github.com/hotwax/job-manager/pull/327


**Full Changelog**: https://github.com/hotwax/job-manager/compare/v1.3.0...v1.4.0

# Release 1.3.0
## What's Changed
* Implemented: Functionality to fetch more jobs on all pages(#2vjxdha) by @shashwatbangar in https://github.com/hotwax/job-manager/pull/274
Expand Down
2 changes: 1 addition & 1 deletion src/components/Image.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default defineComponent({
img.onload = function () {
resolve(true);
}
img.onerror = function (error) {
img.onerror = function () {
reject(false);
}
img.src = src;
Expand Down
5 changes: 3 additions & 2 deletions src/components/JobConfiguration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@

<div class="actions desktop-only">
<div>
<ion-button size="small" fill="outline" color="medium" :disabled="status === 'SERVICE_DRAFT'" @click="skipJob(currentJob)">{{ $t("Skip once") }}</ion-button>
<ion-button size="small" fill="outline" color="danger" :disabled="status === 'SERVICE_DRAFT'" @click="cancelJob(currentJob)">{{ $t("Disable") }}</ion-button>
<ion-button size="small" fill="outline" color="medium" :disabled="currentJob.statusId === 'SERVICE_DRAFT'" @click="skipJob(currentJob)">{{ $t("Skip once") }}</ion-button>
<ion-button size="small" fill="outline" color="danger" :disabled="currentJob.statusId === 'SERVICE_DRAFT'" @click="cancelJob(currentJob)">{{ $t("Disable") }}</ion-button>
</div>
<div>
<ion-button size="small" fill="outline" @click="saveChanges()">{{ $t("Save changes") }}</ion-button>
Expand Down Expand Up @@ -160,6 +160,7 @@ export default defineComponent({
// When updating the job, the job is fetched again with the latest values
// Updated value should be set to instance variable jobStatus
this.jobStatus = this.currentJob.statusId === "SERVICE_DRAFT" ? this.currentJob.statusId : this.currentJob.tempExprId;
this.runTime = this.currentJob?.runTime ? this.currentJob?.runTime : ''
},
props: ["title", "status", "type"],
computed: {
Expand Down
25 changes: 11 additions & 14 deletions src/store/modules/job/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,19 +458,17 @@ const actions: ActionTree<JobState, RootState> = {
try {
resp = await JobService.updateJob(payload)
if (resp.status === 200 && !hasError(resp) && resp.data.successMessage) {
let jobs = await dispatch('fetchJobs', {
const jobs = await dispatch('fetchJobs', {
inputFields: {
'systemJobEnumId': payload.systemJobEnumId,
'systemJobEnumId_op': 'equals'
}
})
if(jobs.status === 200 && !hasError(jobs) && jobs.data?.docs.length) {
jobs = jobs.data?.docs;
const job = jobs.find((job: any) => job?.jobId === payload.jobId);
const fetchJobsResponse = jobs.find((job: any) => job?.jobId === payload.jobId);
if(fetchJobsResponse.status === 200 && !hasError(fetchJobsResponse) && fetchJobsResponse.data?.docs.length) {
// We are using status field everywhere so whenever we fetch job again status field needs to be updated
// TODO Check why status field is used instead of statusId
job && (job.status = job.statusId);
commit(types.JOB_CURRENT_UPDATED, job);
commit(types.JOB_CURRENT_UPDATED, fetchJobsResponse.data.docs[0]);
}
showToast(translate('Service updated successfully'))
} else {
Expand Down Expand Up @@ -534,9 +532,9 @@ const actions: ActionTree<JobState, RootState> = {
},
orderBy: "runTime ASC"
})
if(jobs.status === 200 && !hasError(jobs) && jobs.data?.docs?.length) {
const job = jobs.data?.docs[0];
commit(types.JOB_CURRENT_UPDATED, job);
const fetchJobsResponse = jobs[0];
if(fetchJobsResponse.status === 200 && !hasError(fetchJobsResponse) && fetchJobsResponse.data?.docs?.length) {
commit(types.JOB_CURRENT_UPDATED, fetchJobsResponse.data?.docs[0]);
return job;
}
} else {
Expand Down Expand Up @@ -686,16 +684,15 @@ const actions: ActionTree<JobState, RootState> = {
// Fetch and update current only when there is object in current
// Cancel job can be performed from pipeline page too causing side effects
if (state.current && Object.keys(state.current).length) {
let jobs = await dispatch('fetchJobs', {
const jobs = await dispatch('fetchJobs', {
inputFields: {
'systemJobEnumId': job.systemJobEnumId,
'systemJobEnumId_op': 'equals'
}
})
if (jobs.status === 200 && !hasError(jobs) && jobs.data?.docs.length) {
jobs = jobs.data?.docs;
const currentJob = jobs.find((currentJob: any) => currentJob?.systemJobEnumId === job?.systemJobEnumId);
commit(types.JOB_CURRENT_UPDATED, currentJob);
const fetchJobsResponse = jobs[0];
if (fetchJobsResponse.status === 200 && !hasError(fetchJobsResponse) && fetchJobsResponse.data?.docs.length) {
commit(types.JOB_CURRENT_UPDATED, fetchJobsResponse);
}
}
showToast(translate('Service updated successfully'))
Expand Down
4 changes: 2 additions & 2 deletions src/store/modules/user/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const actions: ActionTree<UserState, RootState> = {
console.error("error", resp.data._ERROR_MESSAGE_);
return Promise.reject(new Error(resp.data._ERROR_MESSAGE_));
}
} catch (err) {
} catch (err: any) {
showToast(translate('Something went wrong'));
console.error("error", err);
return Promise.reject(new Error(err))
Expand Down Expand Up @@ -130,7 +130,7 @@ const actions: ActionTree<UserState, RootState> = {
/**
* update current eComStore information
*/
async setEcomStore({ state, commit, dispatch }, payload) {
async setEcomStore({ commit, dispatch }, payload) {
dispatch('job/clearJobState', null, { root: true });
let productStore = payload.productStore;
if(!productStore) {
Expand Down

0 comments on commit 663b653

Please sign in to comment.