diff --git a/SAS/Scheduler/src/taskdialog.cpp b/SAS/Scheduler/src/taskdialog.cpp index 49b1ef01849dce5aa4a9f523eefb3f96eb4167db..339ef7a54573d003848e4e0ad566d0ba4d3c814c 100644 --- a/SAS/Scheduler/src/taskdialog.cpp +++ b/SAS/Scheduler/src/taskdialog.cpp @@ -1655,6 +1655,8 @@ void TaskDialog::apply(bool close) { close = false; } if (close) { + // SW-933 + clearMultiTasks(); this->close(); } else { @@ -4647,6 +4649,9 @@ void TaskDialog::showMultiEdit(std::vector<Task *> &tasks) { isMultiTasks = true; enableTabs(); + // SW-933 + clearMultiTasks(); + itsDataSlotDialog.clear(); ui.lineEditCreationDate->clear(); 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 f1622ec2175da31c087ce3473c1540e958faf239..a045bc5f47a2b7559902a5ba1f0b9f996bafff9a 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/components/Timeline/CalendarTimeline.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/components/Timeline/CalendarTimeline.js @@ -716,8 +716,8 @@ export class CalendarTimeline extends Component { if (value) { // Set all values only when both range values available in the array else just set the value to reflect in the date selection component if (value[1]!==null) { - startDate = moment.utc(moment(value[0]).format("DD-MMM-YYYY")); - endDate = moment.utc(moment(value[1]).format("DD-MMM-YYYY 23:59:59")); + startDate = moment.utc(moment(value[0]).format("YYYY-MM-DD")); + endDate = moment.utc(moment(value[1]).format("YYYY-MM-DD 23:59:59")); let dayHeaderVisible = this.state.dayHeaderVisible; let weekHeaderVisible = this.state.weekHeaderVisible; let lstDateHeaderUnit = this.state.lstDateHeaderUnit; diff --git a/SAS/TMSS/frontend/tmss_webapp/src/components/ViewTable.js b/SAS/TMSS/frontend/tmss_webapp/src/components/ViewTable.js index b49c55c8f980a3c54909b236a956ef485c68f902..00f02fc49b31ac94ad2bae9182a4cc2a5291df50 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/components/ViewTable.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/components/ViewTable.js @@ -683,7 +683,7 @@ optionaldataheader.forEach(header => { columns.push({ Header: isString ? optionalheader[0][header] : optionalheader[0][header].name, id: isString ? header : optionalheader[0][header].name, - accessor: header, + accessor: isString ? header : optionalheader[0][header].name, filter: filtertype, Filter: filterFn, isVisible: false, diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_timeline.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_timeline.scss index 14a5a4ca2efd94e8dbdc4163a4d7040f01480077..1c5e635be11f8ff590511f5b9407cbc7242a250a 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_timeline.scss +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_timeline.scss @@ -51,7 +51,7 @@ } .timeline-filters button { - width: auto !important; + // width: auto !important; } .timeline-week-span { diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Project/view.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Project/view.js index 1dce9c77522247d114a91f6181ce3f05a00e1861..d2dfd4708c542b56153824199dc5a9ebc02e9f17 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Project/view.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Project/view.js @@ -179,7 +179,7 @@ export class ProjectView extends Component { <div className="p-field p-grid resource-input-grid"> <ResourceDisplayList projectQuota={this.state.projectQuota} unitMap={this.resourceUnitMap} /> </div> - {/* Show Schedule Unit blongest to Project */} + {/* Show Schedule Unit belongs to Project */} <div className="p-fluid"> <div className="p-field p-grid"> <div className="col-lg-3 col-md-3 col-sm-12"> @@ -187,7 +187,7 @@ export class ProjectView extends Component { </div> </div> </div> - <SchedulingUnitList project={this.state.project.name}/> + <SchedulingUnitList project={this.state.project.name} hideProjectColumn/> </div> </React.Fragment> } diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/Scheduling.Constraints.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/Scheduling.Constraints.js index 52ebcb8b12c50be4fabdefe9279f7c493ac546aa..a19914a42ebf219f36ff9f1c38369ff082b01eba 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/Scheduling.Constraints.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/Scheduling.Constraints.js @@ -116,8 +116,12 @@ export default (props) => { list.push('disable-field'); } ref.editors['root.time.at'].container.className = list.join(' '); + Array.prototype.slice.call(ref.editors['root.time.at'].control.getElementsByTagName('input')).forEach(input => input.disabled = true); + Array.prototype.slice.call(ref.editors['root.time.at'].control.getElementsByTagName('button')).forEach(button => button.disabled = true); } else { ref.editors['root.time.at'].container.className = ref.editors['root.time.at'].container.className.replace('disable-field', ''); + Array.prototype.slice.call(ref.editors['root.time.at'].control.getElementsByTagName('input')).forEach(input => input.disabled = false); + Array.prototype.slice.call(ref.editors['root.time.at'].control.getElementsByTagName('button')).forEach(button => button.disabled = false); } if (props.callback) { props.callback(jsonOutput, errors); diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/SchedulingUnitList.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/SchedulingUnitList.js index 9bb43e3f0c7355dbe0c1c0fdf825715090e9ad2a..570ca6388bd7f10954ccb6fe2731e0b424f92435 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/SchedulingUnitList.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/SchedulingUnitList.js @@ -9,37 +9,42 @@ import ScheduleService from '../../services/schedule.service'; class SchedulingUnitList extends Component{ constructor(props){ - super(props) + super(props) + const defaultcolumns = { + type:{ + name:"Type", + filter:"select" + }, + name:"Name", + description:"Description", + project:"Project", + created_at:{ + name:"Created At", + filter: "date" + }, + updated_at:{ + name:"Updated At", + filter: "date" + }, + requirements_template_id:{ + name: "Template", + filter: "select" + }, + start_time:"Start Time", + stop_time:"End time", + duration:"Duration (HH:mm:ss)", + status:"Status" + }; + if (props.hideProjectColumn) { + delete defaultcolumns['project']; + } this.state = { scheduleunit: [], paths: [{ "View": "/schedulingunit/view", }], isLoading: true, - defaultcolumns: [ { - type:{ - name:"Type", - filter:"select" - }, - name:"Name", - description:"Description", - created_at:{ - name:"Created At", - filter: "date" - }, - updated_at:{ - name:"Updated At", - filter: "date" - }, - requirements_template_id:{ - name: "Template", - filter: "select" - }, - start_time:"Start Time", - stop_time:"End time", - duration:"Duration (HH:mm:ss)", - status:"Status" - }], + defaultcolumns: [defaultcolumns], optionalcolumns: [{ actionpath:"actionpath", }], @@ -57,25 +62,30 @@ class SchedulingUnitList extends Component{ //Get SU Draft/Blueprints for the Project ID. This request is coming from view Project page. Otherwise it will show all SU let project = this.props.project; if(project){ - let scheduleunits = await ScheduleService.getSchedulingListByProject(project); - if(scheduleunits){ + let scheduleunits = await ScheduleService.getSchedulingListByProject(project); + if(scheduleunits){ this.setState({ scheduleunit: scheduleunits, isLoading: false }); } - }else{ + }else{ + const schedulingSet = await ScheduleService.getSchedulingSets(); + const projects = await ScheduleService.getProjectList(); const bluePrint = await ScheduleService.getSchedulingUnitBlueprint(); ScheduleService.getSchedulingUnitDraft().then(scheduleunit =>{ const output = []; var scheduleunits = scheduleunit.data.results; for( const scheduleunit of scheduleunits){ + const suSet = schedulingSet.find((suSet) => { return scheduleunit.scheduling_set_id === suSet.id }); + const project = projects.find((project) => { return suSet.project_id === project.name}); const blueprintdata = bluePrint.data.results.filter(i => i.draft_id === scheduleunit.id); blueprintdata.map(blueP => { - blueP.duration = moment.utc((blueP.duration || 0)*1000).format('HH:mm:ss'); + blueP.duration = moment.utc((blueP.duration || 0)*1000).format('HH:mm:ss'); blueP.type="Blueprint"; blueP['actionpath'] ='/schedulingunit/view/blueprint/'+blueP.id; blueP['created_at'] = moment(blueP['created_at'], moment.ISO_8601).format("YYYY-MMM-DD HH:mm:ss"); blueP['updated_at'] = moment(blueP['updated_at'], moment.ISO_8601).format("YYYY-MMM-DD HH:mm:ss"); + blueP.project = project.name; return blueP; }); output.push(...blueprintdata); @@ -84,6 +94,7 @@ class SchedulingUnitList extends Component{ scheduleunit['duration'] = moment.utc((scheduleunit.duration || 0)*1000).format('HH:mm:ss'); scheduleunit['created_at'] = moment(scheduleunit['created_at'], moment.ISO_8601).format("YYYY-MMM-DD HH:mm:ss"); scheduleunit['updated_at'] = moment(scheduleunit['updated_at'], moment.ISO_8601).format("YYYY-MMM-DD HH:mm:ss"); + scheduleunit.project = project.name; output.push(scheduleunit); } this.setState({ 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 02dc71244d569cf6d2c1e87c0744ceb0a70839b6..16524edc0f57b879a3302545d2ba588c2fcc087e 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/view.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/view.js @@ -65,7 +65,7 @@ export class TimelineView extends Component { const projects = responses[0]; const suBlueprints = _.sortBy(responses[1].data.results, 'name'); const suDrafts = responses[2].data.results; - const suSets = responses[3] + const suSets = responses[3]; const group = [], items = []; const currentUTC = moment.utc(responses[4]); const defaultStartTime = currentUTC.clone().add(-24, 'hours'); // Default start time, this should be updated if default view is changed. diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/week.view.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/week.view.js index a8c7b525703656ac2513c18396e96fd234fa06c1..4e11e19eaca14e596b889f35c882306b0352210d 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/week.view.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Timeline/week.view.js @@ -85,7 +85,7 @@ export class WeekTimelineView extends Component { const suBlueprint = _.find(suBlueprints, {'id': suBlueprintId}); suBlueprint['actionpath'] = `/schedulingunit/view/blueprint/${suBlueprintId}`; suBlueprint.suDraft = suDraft; - suBlueprint.project = project; + suBlueprint.project = project.name; suBlueprint.suSet = suSet; suBlueprint.durationInSec = suBlueprint.duration; suBlueprint.duration = UnitConverter.getSecsToHHmmss(suBlueprint.duration); @@ -144,8 +144,8 @@ export class WeekTimelineView extends Component { name: suBlueprint.suDraft.name, band: antennaSet, duration: suBlueprint.durationInSec?`${(suBlueprint.durationInSec/3600).toFixed(2)}Hrs`:"", - start_time: moment.utc(`${displayDate.format('MM-DD-YYYY')} ${suBlueprint.start_time.split('T')[1]}`), - end_time: moment.utc(`${displayDate.format('MM-DD-YYYY')} ${suBlueprint.stop_time.split('T')[1]}`), + start_time: moment.utc(`${displayDate.format('YYYY-MM-DD')} ${suBlueprint.start_time.split('T')[1]}`), + end_time: moment.utc(`${displayDate.format('YYYY-MM-DD')} ${suBlueprint.stop_time.split('T')[1]}`), bgColor: suBlueprint.status? STATUS_COLORS[suBlueprint.status.toUpperCase()]:"#2196f3", selectedBgColor: suBlueprint.status? STATUS_COLORS[suBlueprint.status.toUpperCase()]:"#2196f3"}; return item; @@ -313,7 +313,7 @@ export class WeekTimelineView extends Component { data={this.state.suBlueprintList} defaultcolumns={[{name: "Name", start_time:"Start Time", stop_time:"End Time"}]} - optionalcolumns={[{description: "Description", duration:"Duration (HH:mm:ss)", actionpath: "actionpath"}]} + optionalcolumns={[{project:"Project",description: "Description", duration:"Duration (HH:mm:ss)",actionpath: "actionpath"}]} columnclassname={[{"Name":"filter-input-100", "Start Time":"filter-input-50", "End Time":"filter-input-50", "Duration (HH:mm:ss)" : "filter-input-50",}]} defaultSortColumn= {[{id: "Start Time", desc: false}]} diff --git a/SAS/TMSS/frontend/tmss_webapp/src/services/schedule.service.js b/SAS/TMSS/frontend/tmss_webapp/src/services/schedule.service.js index ae62b39e5f84a8edd5da5d6d640ed35924d3c6b4..0b77e10fc80469dba49272d93eec6e6bc720459e 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/services/schedule.service.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/services/schedule.service.js @@ -331,6 +331,14 @@ const ScheduleService = { } catch (error) { console.error('[project.services.getSchedulingUnitBySet]',error); } + }, + getProjectList: async function() { + try { + const response = await axios.get('/api/project/'); + return response.data.results; + } catch (error) { + console.error('[project.services.getProjectList]',error); + } } }