diff --git a/SAS/TMSS/frontend/tmss_webapp/src/components/Timeline/CalendarTimeline.js b/SAS/TMSS/frontend/tmss_webapp/src/components/Timeline/CalendarTimeline.js index 0bf15377272b4a6cfec29a42e94578048ef7b04d..6c6b371c6a6ad5452316735763a5d7c1c3b673dd 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/components/Timeline/CalendarTimeline.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/components/Timeline/CalendarTimeline.js @@ -675,10 +675,10 @@ export class CalendarTimeline extends Component { itemContext.dimensions.height -= 3; if (!this.props.showSunTimings && this.state.viewType === UIConstants.timeline.types.NORMAL) { if (item.type === "RESERVATION") { - itemContext.dimensions.top -= 13; - itemContext.dimensions.height -= 2; + itemContext.dimensions.top -= 20; + itemContext.dimensions.height += 20; } else { - itemContext.dimensions.top -= 15; + itemContext.dimensions.top -= 20; } } else if (this.state.viewType === UIConstants.timeline.types.WEEKVIEW) { itemContext.dimensions.top -= (this.props.rowHeight-10); @@ -689,7 +689,7 @@ export class CalendarTimeline extends Component { } const { left: leftResizeProps, right: rightResizeProps } = getResizeProps(); const backgroundColor = itemContext.selected?item.bgColor:item.bgColor; - let itemContentStyle = {lineHeight: `${Math.floor(itemContext.dimensions.height)}px`, + let itemContentStyle = {lineHeight: `${Math.floor(item.type==="RESERVATION"?itemContext.dimensions.height/2:itemContext.dimensions.height)}px`, fontSize: "14px", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", textAlign: "center"}; @@ -741,7 +741,11 @@ export class CalendarTimeline extends Component { <div style={itemContentStyle}><span>{item.duration}</span></div> <div style={itemContentStyle}><span>{item.band}</span></div> </>} {this.state.viewType===UIConstants.timeline.types.NORMAL && - <div style={itemContentStyle}><span>{item.title}</span></div> } + <div style={itemContentStyle}><span>{item.title}</span> + {item.type === "RESERVATION" && + <div style={itemContentStyle}><span>{item.desc}</span></div> } + </div> } + </div> {itemContext.useResizeHandle ? <div {...rightResizeProps} /> : null} </div> @@ -938,7 +942,6 @@ export class CalendarTimeline extends Component { * @param {Array} items */ async addWeekSunTimes(startTime, endTime, weekGroup, items) { - const noOfDays = endTime.diff(startTime, 'days'); let sunItems = _.cloneDeep(items); for (const weekDay of weekGroup) { if (weekDay.value) { diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/Stations.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/Stations.js index 2cc9aab744b87021b6d2d5ffda604c1859ce1fc3..5cd08079b24b012338a27d79589327207fa7cdff 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/Stations.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/Stations.js @@ -1,5 +1,4 @@ import React, { useState, useEffect } from 'react'; -import _ from 'lodash'; import {MultiSelect} from 'primereact/multiselect'; import { OverlayPanel } from 'primereact/overlaypanel'; import {InputText} from 'primereact/inputtext'; diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/summary.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/summary.js index 53b1672422eac8ec3525cf2742413f98582656c8..fa2465bdbb0ec42928a66dfeeecc5402a691eef4 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/summary.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/summary.js @@ -5,7 +5,7 @@ import _ from 'lodash'; import ViewTable from '../../components/ViewTable'; import { JsonToTable } from "react-json-to-table"; import SchedulingConstraints from './Scheduling.Constraints'; -import Stations from './Stations'; +// import Stations from './Stations'; /** * Component to view summary of the scheduling unit with limited task details 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 f1324c0fca7b94ebc1a8fec6067e16b5f11f5d67..491117c12e330aba951de5669e74b6c25642bcbe 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/view.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/view.js @@ -332,7 +332,8 @@ export class TimelineView extends Component { start_time: start_time, end_time: end_time, name: reservationSpec.activity.type, project: reservation.project_id, group: station, type: 'RESERVATION', - title: `${reservationSpec.activity.type}${reservation.project_id?("-"+ reservation.project_id):""}`, + title: `${reservationSpec.activity.type}${reservation.project_id?("-"+ reservation.project_id):""}`, + desc: reservation.description, duration: reservation.duration?UnitConverter.getSecsToHHmmss(reservation.duration):"Unknown", bgColor: blockColor.bgColor, selectedBgColor: blockColor.bgColor, color: blockColor.color }; diff --git a/SAS/TMSS/frontend/tmss_webapp/src/services/util.service.js b/SAS/TMSS/frontend/tmss_webapp/src/services/util.service.js index 2ece93bd41a7eee0aeb5a9e24e02687152002939..18ca0c98c404aa8a6f3f1772fc2e6201df30f45d 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/services/util.service.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/services/util.service.js @@ -1,4 +1,3 @@ -import moment from 'moment'; const axios = require('axios'); axios.defaults.headers.common['Authorization'] = 'Basic dGVzdDp0ZXN0';