From c01dfff6fef39e1decf30bf8b8679d0937a72485 Mon Sep 17 00:00:00 2001 From: Ramesh Kumar <r.kumar@redkarma.eu> Date: Tue, 3 Nov 2020 13:52:50 +0530 Subject: [PATCH] TMSS-387: Tasks loaded asynchronously to other SUs that are not displayed in the page load. --- SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/view.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/view.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/view.js index d1fbd1ed96b..925f2724226 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/view.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/view.js @@ -92,6 +92,11 @@ export class TimelineView extends Component { group.push({'id': suDraft.id, title: suDraft.name}); } 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 { for (const suBlueprint of this.state.suBlueprints) { if (moment.utc(suBlueprint.start_time).isBetween(startTime, endTime) || moment.utc(suBlueprint.stop_time).isBetween(startTime, endTime)) { - suBlueprintList.push(suBlueprint); let timelineItem = this.getTimelineItem(suBlueprint); if (this.state.stationView) { if (!suBlueprint.tasks) { @@ -184,6 +188,7 @@ export class TimelineView extends Component { group.push({'id': suBlueprint.suDraft.id, title: suBlueprint.suDraft.name}); } } + suBlueprintList.push(suBlueprint); } } } else { -- GitLab