From c8fc42f31b2ea9fad14625d5d5d005dcbeebd587 Mon Sep 17 00:00:00 2001 From: Reinder Kraaij <kraaij@astron.nl> Date: Mon, 20 Nov 2023 11:26:24 +0100 Subject: [PATCH] Cleaning --- .../tmss_webapp/src/components/ViewTable.js | 11 ++++++----- .../tmss_webapp/src/layout/sass/_viewtable.scss | 1 + .../src/routes/SystemEvent/system.event.list.js | 14 +++----------- .../routes/Timeline/helpers/week.view.helper.js | 6 ------ .../tmss_webapp/src/routes/User/UserOverView.js | 3 --- 5 files changed, 10 insertions(+), 25 deletions(-) diff --git a/SAS/TMSS/frontend/tmss_webapp/src/components/ViewTable.js b/SAS/TMSS/frontend/tmss_webapp/src/components/ViewTable.js index 4d1a4d0d428..533d4af8dfe 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/components/ViewTable.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/components/ViewTable.js @@ -422,7 +422,8 @@ function MultiSelectColumnFilter({ // Render a multi-select box return ( <div onClick={e => { e.stopPropagation() }} > - <div className="p-field-radiobutton"> + <div className="flex " > + <div className="p-field-radiobutton" > <RadioButton inputId="filtertype1" name="filtertype" value="Any" onChange={(e) => setSelectTypeOption(e.value)} checked={filtertype === '' || filtertype === 'Any'} tooltip= "Search the row if the Station contains at least one of the selected value" /> @@ -434,7 +435,8 @@ function MultiSelectColumnFilter({ tooltip= "Search the row if the Station contains all of the selected value" /> <label htmlFor="filtertype2">All</label> </div> - <div style={{ position: 'relative', display: 'flex'}} > + </div> + <div style={{ position: 'relative', display: 'flex'}} > <MultiSelect data-testid="multi-select" id="multi-select" optionLabel="value" optionValue="value" filter={true} value={value} options={options} @@ -2361,7 +2363,7 @@ function Table(props) { index={_.findIndex(allColumns, { id: column.id })} isDragDisabled={_.includes(fixedColumns, column.id)? true: false}> {(provided, snapshot) => ( - <th role = {'tablehead'} className={_.includes(fixedColumns, column.id)?'fixed-column-td':''} style={{display: 'flex'}} + <th role = {'tablehead'} className={_.includes(fixedColumns, column.id)?'fixed-column-td':'notfixed-column-td-'+column.id.replaceAll(' ','')} style={{display: 'flex'}} onClick={() => { if(!doServersideFilter) { if(!column.disableSortBy) { @@ -2444,8 +2446,7 @@ function Table(props) { <tr {...row.getRowProps()} data-testid={'tablerow'} className={(row.original['rowColor'])?row.original['rowColor']:''}> {row.cells.map(cell => { if (cell.column.id !== 'actionpath') { - // return <td {...cell.getCellProps()} className={cell.column.id+'_body'}> - return <td key={cell.column.id+'_'+cell.row.id} className={_.includes(fixedColumns, cell.column.id)?'fixed-column-td':''}> + return <td key={cell.column.id+'_'+cell.row.id} className={_.includes(fixedColumns, cell.column.id)?'fixed-column-td':'notfixed-column-td-'+cell.column.id.replaceAll(' ','')}> {(cell.row.original.links || []).includes(cell.column.id) ? <a href={cell.row.original.linksURL[cell.column.id]} target={cell.column.newTab ? "_blank":""} rel="noreferrer" >{cell.render('Cell', cell.getCellProps())}</a> : cell.render('Cell', cell.getCellProps())} </td> } diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_viewtable.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_viewtable.scss index d28530bce0a..a2fe08a1ebf 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_viewtable.scss +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_viewtable.scss @@ -34,6 +34,7 @@ border-bottom: 1px solid lightgray; } + .viewtable td { font-size: 14px; padding: .65rem; diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/SystemEvent/system.event.list.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/SystemEvent/system.event.list.js index 240d1dbb920..8199b3140ca 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/SystemEvent/system.event.list.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/SystemEvent/system.event.list.js @@ -83,8 +83,7 @@ export class SystemEventList extends Component { }], optionalcolumns: [{}], columnclassname: [{ - "System Event Id": "filter-input-50", - "Affected Hardware Template Id": "filter-input-50", + }], isLoading: true, userrole: AuthStore.getState() @@ -551,10 +550,6 @@ export class SystemEventList extends Component { ); } - closeList = () => { - this.props.history.length > 1 ? this.props.history.goBack() : this.props.history.push(`/su/timelineview/week`); - } - // GO to create a new system event page. @@ -610,12 +605,9 @@ export class SystemEventList extends Component { icon: 'pi-plus', title: permissions.create ? 'Add System Event' : "Don't have permission to add new System Event", disabled: permissions.create ? !permissions.create : true, type: 'buttonv2', actOn: 'click', props: { callback: this.movetoEdit } - }, - - { - icon: 'pi-times', title: 'Click to close System Issues list', type: 'buttonv2', - actOn: 'click', props: { callback: this.closeList } } + + ]} /> } {this.state.isLoading ? ( 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 44a0f50b48b..5bdc01d7f24 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 @@ -168,12 +168,6 @@ export function getPageHeaderOptionsMenuItems(permissions) { //TODO factory meth { separator: true }, - { - label: 'System Issues', - icon: "fa fa-bars", - disabled: permissions == null || permissions.weekView == null || !permissions.weekView.listsystemevent, - command: () => window.open('/systemevent/list', '_blank') - }, { label: 'Add System Event', icon: "fa fa-plus", diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/User/UserOverView.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/User/UserOverView.js index c58219c62ab..cc1195a7736 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/User/UserOverView.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/User/UserOverView.js @@ -1,9 +1,6 @@ import { useState, useEffect } from 'react'; import { DataTable } from 'primereact/datatable'; import { Column } from 'primereact/column'; -import 'primereact/resources/themes/saga-blue/theme.css'; -import 'primereact/resources/primereact.min.css'; -import 'primeicons/primeicons.css'; import Auth from '../../authenticate/auth.js'; import PermissionStackUtil from '../../authenticate/permission.stack.handler'; const UserOverView = () => { -- GitLab