diff --git a/SAS/TMSS/frontend/tmss_webapp/src/components/ViewTable/ViewTableExt.js b/SAS/TMSS/frontend/tmss_webapp/src/components/ViewTable/ViewTableExt.js index 2984015196c2312d94baa276f7babef8a60dfc6c..63ecd523359849d51e38f7cc751f993fc3f7fff5 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/components/ViewTable/ViewTableExt.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/components/ViewTable/ViewTableExt.js @@ -11,7 +11,7 @@ import UIConstants from "../../utils/ui.constants"; export const ViewTableExt = forwardRef((props, ref) => { - const { rowColoring,loading, data, defaultcolumns, optionalcolumns, columnclassname, columnOrders, defaultSortColumn, showaction, keyaccessor, tablename, allowRowSelection, onRowSelection, toggleBySorting, lsKeySortColumn, descendingColumn, pageUpdated, storeFilter, showFilterOption, showActionInNewTab = false, viewInNewWindow = false, actionCallback, lazy, totalRecords, callBackFunction, children } = props + const { rowColoring,loading, data, defaultcolumns, optionalcolumns, columnclassname, columnOrders, showaction, keyaccessor, tablename, allowRowSelection, onRowSelection, lsKeySortColumn, descendingColumn, showFilterOption, showActionInNewTab = false, viewInNewWindow = false, actionCallback, lazy, totalRecords, callBackFunction, children } = props const multiSelectRef = useRef(null); const [selectedRows, setSelectedRows] = useState(); @@ -31,7 +31,7 @@ export const ViewTableExt = forwardRef((props, ref) => { const tablePrefix = "v2ViewtableExt-" + lsKeySortColumn + "-" const [tableProps, setTableProps] = useState({ rows: 15, first: 0 }) - if (isDebugLoggingEnabled) console.log("ViewTableExt props", props) + if (isDebugLoggingEnabled) console.log("ViewTableExt props", props,columnOrders) useImperativeHandle(ref, () => ({ saveState: saveState })); diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Project/list.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Project/list.js index 8eb89107ba9809c6c02e3a1b52a3df74cf6ffc66..274d1c846b0e778fe811923d51e2d4adfa8b8c2a 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Project/list.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Project/list.js @@ -20,7 +20,7 @@ import { ViewTableExt } from '../../components/ViewTable/ViewTableExt'; export function ProjectList(props) { const lsTableName = 'project_list'; const lsKeySortColumn = "projectSortData"; - const [defaultSortColumn, setDefaultSortColumn] = useState([{ id: "Name / Project Code", desc: false }]); + const defaultSortColumn =[{ id: "Name / Project Code", desc: false }]; const [statusChangeResponse, setStatusChangeResponse] = useState(); const [changedStatus, setChangedStatus] = useState(); const [dialog, setDialog] = useState(); diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Report/cycle/report.business.test.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Report/cycle/report.business.test.js index 1eaae5ecfdcb0505360775f97664138764117441..827aca5a3dfbaab8bb9e86e3bbb467cb1cb53cdc 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Report/cycle/report.business.test.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Report/cycle/report.business.test.js @@ -1,7 +1,7 @@ import { removeCSSErrors } from "../../../utils/test.helper"; import ReportBusiness from "./report.business" import testCycle from './testdata/test.cycle.json' - +removeCSSErrors(); describe('generateVisualData', () => { it('should give no errors when there is no data at all', () => { diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Reservation/reservation.list.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Reservation/reservation.list.js index b4f6d632fa03048ddb33e0f40b3a84645a547a4e..244cdc48b7569dd6c49188198965e7d54494df4d 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Reservation/reservation.list.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Reservation/reservation.list.js @@ -235,7 +235,6 @@ export function ReservationList(props) { setPageUpdated(true); setLoadingStatus(true); setTableState(tablestate) - console.log("state",tablestate); let { filterQry, newOrderBy } = prepareQuery(tablestate); filterQry = getCycleFilter(tablestate, filterQry); @@ -371,7 +370,7 @@ export function ReservationList(props) { return render(); function getCycleFilter(tablestate, filterQry) { - if (tablestate.filters.cycle.value) { + if (tablestate.filters?.cycle?.value) { for (const cycle of cycleList) { if (cycle.name == tablestate.filters.cycle.value) { filterQry = AddDateRangeQuery(filterQry, { key: "start_time", value: [cycle.start_tick, cycle.stop_tick] }); 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 a7894301e861c10b67c9298d1beaba6129e0203d..4fe0883ed74a2abca435049a066fb4162a6abdec 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/SchedulingUnitList.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/SchedulingUnitList.js @@ -45,7 +45,7 @@ export function SchedulingUnitList(props) { let defaultSortColumn = [{ id: "Name", desc: false }]; const COMMA_SEPARATE_TOOLTIP = 'Enter Id and press ‘Enter’ key to search. For multiple values enter comma separated values. For range, provide input like 1..6'; - const [optionalColumns, setOptionalColumns] = useState({ + const optionalColumns ={ draft: { name: "Linked Blueprint Id", tooltip: COMMA_SEPARATE_TOOLTIP }, //priority_queue: {name: "Priority Queue", filter: "select"}, rank: { name: "Rank", filter: "rangeinput" }, @@ -62,7 +62,7 @@ export function SchedulingUnitList(props) { }, output_pinned: { name: "Pin Data", filter: "switch" }, enable_qa_workflow: { name: "Enable QA Workflow", filter: "switch" } - }) + } diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/create.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/create.js index 8e488bb0c6d9b9ef8911b91c6fbbb35afdac9118..d1828cf4a405646bcfcd4d784f2efd1272beb189 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/create.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/create.js @@ -78,7 +78,7 @@ export class SchedulingUnitCreate extends Component { description: "", project: (props.match ? props.match.params.project : null) || null, rank: 0.0001, - enable_qa_workflow: (props.match?.params.project?.enable_qa_workflow : null) ?? true + enable_qa_workflow: (props.match ? props.match?.params.project?.enable_qa_workflow : null) ?? true }, projectDisabled: props.match ? props.match.params.project diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/excelview.schedulingset.test.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/excelview.schedulingset.test.js index cc88acc25a24baea926b6f49acabffc8bab2495e..cd50fe9bb5e5f89357e61778c5e310862a346689 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/excelview.schedulingset.test.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/excelview.schedulingset.test.js @@ -15,7 +15,7 @@ import { clickItem, removeAllWarnings, removeCSSErrors, renderPage, setMultiSe import { setSchedulingUnitStrategy } from "./schedulingunit.test.helper"; let projectListSpy, observStrategiesSpy, taskTemplatesSpy, userPermissionSpy, rolesSpy, suConstraintTemplateSpy, - templatePurposesSpy, templateStatesSpy,taskFilterDefSpy,utilSpy; + templatePurposesSpy, templateStatesSpy; let utcSpy; 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 a5dfe4e012f097714861c75d44ef8e6cc7d5d2d7..7894167f4b545f146aa2b138f77bda554589bcd5 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 @@ -17,7 +17,6 @@ import {SystemEventColumns} from './Business/system.event.columns'; import { prepareQuery } from '../../components/ViewTable/ViewTableExtBusiness'; export function SystemEventList (props) { - const SYSTEM_EVENT_LIST_TABLE_NAME = 'system_event_list'; let lsKeySortColumn = 'systemeventSortData'; const paths = [{ @@ -41,7 +40,7 @@ export function SystemEventList (props) { const [totalPage,setTotalPage] = useState(0); const [pageUpdated,setPageUpdated] = useState(true); const [seAffectedHardwareTemplateList,setSeAffectedHardwareTemplateList] = useState([]); - const [seAffectedHardwareTemplateNameList,setSeAffectedHardwareTemplateNameList] = useState([]); + const seAffectedHardwareTemplateNameList = []; const [seIssueTypeList,setSeIssueTypeList] = useState([]); const [seIssueSubTypeList, setSeIssueSubTypeList] = useState([]); const [seSeverityList,setSeSeverityList] = useState([]); @@ -238,7 +237,7 @@ export function SystemEventList (props) { * @param {Table State} Table props state * @returns */ - const fetchTableData = async (tablestate) => { + const fetchTableData = async (tablestate=tableState) => { setTableState(tablestate) setPageUpdated(true); setLoadingStatus(true); diff --git a/SAS/TMSS/frontend/tmss_webapp/src/tests/reservation.list.test.js b/SAS/TMSS/frontend/tmss_webapp/src/tests/reservation.list.test.js index 0608126fcf8ae405befa21d2736e5e9c2aac17e1..92ecfbbe932e6a40afce598e062ee03e59426ec1 100644 --- a/SAS/TMSS/frontend/tmss_webapp/src/tests/reservation.list.test.js +++ b/SAS/TMSS/frontend/tmss_webapp/src/tests/reservation.list.test.js @@ -2,7 +2,7 @@ import axios from "axios"; import MockAdapter from 'axios-mock-adapter'; -import { render, waitFor } from '@testing-library/react'; +import { render } from '@testing-library/react'; import { act } from "react" import reservationList from '../__mocks__/reservation.list.json' import reservationListLimited from '../__mocks__/reservation.list.limit.json'