Skip to content

Commit

Permalink
fix: restore dayTimeCahrt operator filtering (#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
shootermv authored Dec 4, 2023
1 parent 402fc1b commit 819ea8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
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

0 comments on commit 819ea8c

Please sign in to comment.