Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

order chart directories to 3 main folders #277

Merged
merged 2 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pages/RealtimeMapPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Grid from '@mui/material/Unstable_Grid2' // Grid version 2
import { PageContainer } from './components/PageContainer'
import { INPUT_SIZE } from 'src/resources/sizes'
import { Label } from './components/Label'
import { getColorByHashString } from './dashboard/OperatorHbarChart/utils'
import { getColorByHashString } from './dashboard/AllLineschart/OperatorHbarChart/utils'
import createClusterCustomIcon from './components/utils/customCluster/customCluster'
import { TimeSelector } from './components/TimeSelector'
import { busIcon, busIconPath } from './components/utils/BusIcon'
Expand Down
2 changes: 1 addition & 1 deletion src/pages/SingleLineMapPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import Grid from '@mui/material/Unstable_Grid2' // Grid version 2
import './Map.scss'
import getAgencyList, { Agency } from 'src/api/agencyList'
import { VehicleLocation } from 'src/model/vehicleLocation'
import { getColorByHashString } from './dashboard/OperatorHbarChart/utils'
import { getColorByHashString } from './dashboard/AllLineschart/OperatorHbarChart/utils'
import { DateSelector } from './components/DateSelector'
import { CircularProgress } from '@mui/material'
import { FilterPositionsByStartTimeSelector } from './components/FilterPositionsByStartTimeSelector'
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dashboard/AllLineschart/AllLinesChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Tooltip } from '@mui/material'
import { Skeleton } from 'antd'
import { Fragment } from 'react'
import { TEXTS } from 'src/resources/texts'
import OperatorHbarChart from '../OperatorHbarChart/OperatorHbarChart'
import OperatorHbarChart from './OperatorHbarChart/OperatorHbarChart'
import { GroupByRes, useGroupBy } from 'src/api/groupByService'
import { FC } from 'react'
import { Moment } from 'moment/moment'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import './operatorsHbarChart.scss'
import { getColorByHashString } from './utils'
import { HbarChart } from '../HbarChart/HbarChart'
import { HbarChart } from '../../WorstLinesChart/LineHbarChart/HbarChart/HbarChart'

const colorsByCompannies: { [index: string]: string } = {
'אגד תעבורה': '#2f9250',
Expand Down
8 changes: 6 additions & 2 deletions src/pages/dashboard/ArrivalByTimeChart/DayTimeChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ const convertToGraphCompatibleStruct = (arr: GroupByRes[]) => {
interface DayTimeChartProps {
startDate: Moment
endDate: Moment
operatorId: string
}

const DayTimeChart: FC<DayTimeChartProps> = ({ startDate, endDate }) => {
const DayTimeChart: FC<DayTimeChartProps> = ({ startDate, endDate, operatorId }) => {
const [groupByHour, setGroupByHour] = React.useState<boolean>(false)

const [graphData, loadingGraph] = useGroupBy({
Expand All @@ -46,7 +47,10 @@ const DayTimeChart: FC<DayTimeChartProps> = ({ startDate, endDate }) => {
{loadingGraph ? (
<Skeleton active />
) : (
<ArrivalByTimeChart data={convertToGraphCompatibleStruct(graphData)} operatorId={''} />
<ArrivalByTimeChart
data={convertToGraphCompatibleStruct(graphData)}
operatorId={operatorId}
/>
)}
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dashboard/DashboardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const DashboardPage = () => {
<WorstLinesChart startDate={startDate} endDate={endDate} operatorId={operatorId} />
</Grid>
<Grid xs={12}>
<DayTimeChart startDate={startDate} endDate={endDate} />
<DayTimeChart startDate={startDate} endDate={endDate} operatorId={operatorId} />
</Grid>
</Grid>
</PageContainer>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HbarChart } from '../HbarChart/HbarChart'
import { getColorName } from '../OperatorHbarChart/OperatorHbarChart'
import { HbarChart } from './HbarChart/HbarChart'
import { getColorName } from '../../AllLineschart/OperatorHbarChart/OperatorHbarChart'

function LinesHbarChart({
lines,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dashboard/WorstLinesChart/WorstLinesChart.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Skeleton } from 'antd'
import { GroupByRes, useGroupBy } from 'src/api/groupByService'
import LinesHbarChart from '../LineHbarChart/LinesHbarChart'
import LinesHbarChart from './LineHbarChart/LinesHbarChart'
import { TEXTS } from 'src/resources/texts'
import { FC } from 'react'
import { Moment } from 'moment/moment'
Expand Down
Loading