Skip to content

Commit

Permalink
Merge pull request #362 from disha1202/#85zrjdd3b
Browse files Browse the repository at this point in the history
Fixed: JobConfiguration component displaying runtime of draft jobs(#85zrjdd3b)
  • Loading branch information
adityasharma7 authored Feb 2, 2023
2 parents ca71264 + 545e6ce commit 9a6a154
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/store/modules/job/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,10 @@ const actions: ActionTree<JobState, RootState> = {
if (resp.status === 200 && !hasError(resp) && resp.data.docs?.length > 0) {
const total = resp.data.count;
let jobs = resp.data.docs.map((job: any) => {
if (job.statusId === 'SERVICE_DRAFT') delete job.runTime;
return {
...job,
'status': job?.statusId
'status': job.statusId
}
})
if(payload.viewIndex && payload.viewIndex > 0){
Expand Down Expand Up @@ -401,6 +402,7 @@ const actions: ActionTree<JobState, RootState> = {
}
batchJobEnumIds.map((batchBrokeringJobEnum: any) => {
cached[batchBrokeringJobEnum] = responseJobs.filter((job: any) => job.systemJobEnumId === batchBrokeringJobEnum).reduce((batchBrokeringJobs: any, job: any) => {
if (job.statusId === 'SERVICE_DRAFT') delete job.runTime;
batchBrokeringJobs.push({
...job,
id: job.jobId,
Expand All @@ -425,6 +427,7 @@ const actions: ActionTree<JobState, RootState> = {
}, cached)

responseJobs.filter((job: any) => job.statusId === 'SERVICE_DRAFT').map((job: any) => {
delete job.runTime;
return cached[job.systemJobEnumId] = cached[job.systemJobEnumId] ? cached[job.systemJobEnumId] : {
...job,
id: job.jobId,
Expand Down

0 comments on commit 9a6a154

Please sign in to comment.