diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/components/PanelButtons.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/components/PanelButtons.js index 500af4d8add492867c31b44fbb5a691e75b1aa65..a3a2a70a51af020bb3075e15d18d4757d67cf2f1 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/components/PanelButtons.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/components/PanelButtons.js @@ -68,8 +68,8 @@ export default function PanelButtons(props) { return <div className={"panel-buttons-container" + (showResizeButtons ? "" : " show-buttons")} id="parent-panel-buttons"> {getResizeButtons(showResizeButtons, showSummary, leftPanelSize, setLeftPanelSize)} - {getShowOrHideButton(legendTitle, showLegendbar, setShowLegendbar, legendIcon)} - {getShowOrHideButton(listTabTitle, showListTabs, setShowListTabs, listTabIcon)} + {showLegendbar !== undefined && getShowOrHideButton(legendTitle, showLegendbar, setShowLegendbar, legendIcon)} + {showListTabs !== undefined && getShowOrHideButton(listTabTitle, showListTabs, setShowListTabs, listTabIcon)} </div> } diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/components/TimelineItemPopover.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/components/TimelineItemPopover.js index ce4a3ead47bffc6eab488b3118cffab9a65ad430..0832c0a56de4907a839cee21eb1c5d12429609d2 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/components/TimelineItemPopover.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/components/TimelineItemPopover.js @@ -96,7 +96,7 @@ function getReservationItem(mouseOverItem) { color: mouseOverItem.color }; return <div className={`p-grid timeline-item-popover`} style={reservationStyle}> - <h3 className={`col-12`}>Reservation Overview</h3> + <h3 className={`col-12`}>{"Reservation (" + (mouseOverItem.id) + ") Overview"}</h3> {getFieldsHtml(reservationItemFields, undefined, {color: mouseOverItem.color})} </div>; } diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/helpers/timeline.item.helper.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/helpers/timeline.item.helper.js index 8ef4984c2a48c21a27c571df15d94cb0f5e9519c..dd7b2aa1d9f9ba57d2db73440c7600ec3532f3ec 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/helpers/timeline.item.helper.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/helpers/timeline.item.helper.js @@ -61,9 +61,7 @@ function renderReservationItem({ let itemContentStyle = getItemContentStyle(itemContext); return <div {...getItemProps({style: getItemDivStyle(itemContext, item, 'none', true)})} - onMouseDown={() => { - setSummaryItemCallback({id: item.id, type: item.type}) - }} + onMouseDown={() => setSummaryItemCallback({id: item.id, type: item.type})} onMouseOver={(evt) => { hoverOverItem(evt, item, setPopPositionCallback, setMouseOverItemCallback) }} @@ -221,13 +219,12 @@ export function getReservationItem(reservation, displayDate, timelineCommonUtils const endTime = moment(`${displayDate.format('YYYY-MM-DD')} ${moment(reservation?.end_time).format('HH:mm:ss')}`); const type = specificationsDoc?.activity?.type; const group = moment(reservation.start_time).format(UIConstants.CALENDAR_GROUP_FORMAT); - const id = `Res-${reservation.id}-${group}`; const blockColor = getReservationTypeColorIndex(specificationsDoc?.schedulability); const duration = reservation.duration ? UnitConverter.getSecsToHHmmss(reservation.duration) : "Unknown"; let stations = specificationsDoc?.resources?.stations stations = stations ? (stations.length > 3 ? timelineCommonUtils.getSUStationGroupCount(stations) : stations.toString()) : "-" return { - id: id, + id: reservation.id, start_time: startTime, end_time: endTime, group: group, diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/helpers/week.view.helper.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/helpers/week.view.helper.js index f1075071f380ead363fdb83bcbe6a4007a508754..8c5824669189f60f1b139e794ffe9e75ec8ae7ea 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/helpers/week.view.helper.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/helpers/week.view.helper.js @@ -3,7 +3,6 @@ import UIConstants from "../../../utils/ui.constants"; import UnitConverter from "../../../utils/unit.converter"; import ScheduleService from "../../../services/schedule.service"; import UtilService from "../../../services/util.service"; -import ReservationService from "../../../services/reservation.service"; import TaskService from "../../../services/task.service"; export function createGroups(startTime, amountOfGroups = 6) {