Skip to content

Commit

Permalink
removed runTime property instead of setting empty string(#85zrjdd3b)
Browse files Browse the repository at this point in the history
  • Loading branch information
disha1202 committed Feb 2, 2023
1 parent c720818 commit 4b39bc1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/store/modules/job/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ 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') job.runTime = "";
if (job.statusId === 'SERVICE_DRAFT') delete job.runTime;
return {
...job,
'status': job.statusId
Expand Down Expand Up @@ -401,7 +401,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') job.runTime = "";
if (job.statusId === 'SERVICE_DRAFT') delete job.runTime;
batchBrokeringJobs.push({
...job,
id: job.jobId,
Expand All @@ -426,13 +426,13 @@ 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,
frequency: job.tempExprId,
enumId: job.systemJobEnumId,
status: job.statusId,
runTime: ""
}
});

Expand Down

0 comments on commit 4b39bc1

Please sign in to comment.