Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: JobConfiguration component displaying runtime of draft jobs(#85zrjdd3b) #362

Merged
merged 6 commits into from
Feb 2, 2023
5 changes: 4 additions & 1 deletion src/store/modules/job/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,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 @@ -400,6 +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') delete job.runTime;
batchBrokeringJobs.push({
...job,
id: job.jobId,
Expand All @@ -424,6 +426,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