Skip to content
Snippets Groups Projects
Commit c01dfff6 authored by Ramesh Kumar's avatar Ramesh Kumar Committed by Ramesh Kumar
Browse files

TMSS-387: Tasks loaded asynchronously to other SUs that are not displayed in the page load.

parent 694f0b83
No related branches found
No related tags found
1 merge request!266Resolve TMSS-422
...@@ -92,6 +92,11 @@ export class TimelineView extends Component { ...@@ -92,6 +92,11 @@ export class TimelineView extends Component {
group.push({'id': suDraft.id, title: suDraft.name}); group.push({'id': suDraft.id, title: suDraft.name});
} }
suList.push(suBlueprint); suList.push(suBlueprint);
} else if (suBlueprint.start_time) {
ScheduleService.getTaskBlueprintsBySchedulingUnit(suBlueprint, true)
.then(tasks => {
suBlueprint.tasks = tasks;
})
} }
} }
} }
...@@ -171,7 +176,6 @@ export class TimelineView extends Component { ...@@ -171,7 +176,6 @@ export class TimelineView extends Component {
for (const suBlueprint of this.state.suBlueprints) { for (const suBlueprint of this.state.suBlueprints) {
if (moment.utc(suBlueprint.start_time).isBetween(startTime, endTime) if (moment.utc(suBlueprint.start_time).isBetween(startTime, endTime)
|| moment.utc(suBlueprint.stop_time).isBetween(startTime, endTime)) { || moment.utc(suBlueprint.stop_time).isBetween(startTime, endTime)) {
suBlueprintList.push(suBlueprint);
let timelineItem = this.getTimelineItem(suBlueprint); let timelineItem = this.getTimelineItem(suBlueprint);
if (this.state.stationView) { if (this.state.stationView) {
if (!suBlueprint.tasks) { if (!suBlueprint.tasks) {
...@@ -184,6 +188,7 @@ export class TimelineView extends Component { ...@@ -184,6 +188,7 @@ export class TimelineView extends Component {
group.push({'id': suBlueprint.suDraft.id, title: suBlueprint.suDraft.name}); group.push({'id': suBlueprint.suDraft.id, title: suBlueprint.suDraft.name});
} }
} }
suBlueprintList.push(suBlueprint);
} }
} }
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment