Skip to content

Commit

Permalink
deleted ReportTimeFilter file and fixed TimeFilter props
Browse files Browse the repository at this point in the history
  • Loading branch information
Tenacs committed Jul 19, 2024
1 parent 968647c commit 258ae81
Show file tree
Hide file tree
Showing 7 changed files with 400 additions and 471 deletions.
11 changes: 8 additions & 3 deletions SEBrowser/Scripts/TSX/Components/CapBankReport/CapBankReport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import * as queryString from 'querystring';
import moment from 'moment';
import { useLocation, useNavigate } from 'react-router-dom';
import { SEBrowser } from '../../global';
import { useSelector } from 'react-redux';
import { SelectTimeZone, SelectDateTimeSetting } from '../SettingsSlice';

const momentDateFormat = "MM/DD/YYYY";
const momentTimeFormat = "HH:mm:ss.SSS";
Expand All @@ -40,8 +42,8 @@ const CapBankReport = () => {
const history = useLocation();
const [CapBankID, setCapBankID] = React.useState<number>(0);
const [time, setTime] = React.useState<SEBrowser.IReportTimeFilter>({
date: '1/1/2000',
time: '12:00:00',
date: '01/01/2000',
time: '12:00:00.000',
windowSize: 1,
timeWindowUnits: 1
});
Expand All @@ -57,6 +59,9 @@ const CapBankReport = () => {
const [HealthFilt, setHealthFilt] = React.useState<number[]>([]);
const [PhaseFilter, setPhaseFilter] = React.useState<number[]>([]);

const timeZone = useSelector(SelectTimeZone);
const dateTimeSetting = useSelector(SelectDateTimeSetting);

React.useEffect(() => {
const query = queryString.parse(history.search.replace("?", ""), "&", "=");

Expand Down Expand Up @@ -115,7 +120,7 @@ const CapBankReport = () => {
CapBankID, TimeFilter: time,
selectedBank, StationId, numBanks, ResFilt, StatFilt,
OpFilt, RestFilt, PISFilt, HealthFilt, PhaseFilter,
stateSetter: setState
timeZone, dateTimeSetting, stateSetter: setState
}

return (
Expand Down
Loading

0 comments on commit 258ae81

Please sign in to comment.