Skip to content

Commit

Permalink
frontend: get all tickets to account on dashboard chart - fix #277
Browse files Browse the repository at this point in the history
  • Loading branch information
allgood committed Jan 15, 2025
1 parent 9aadd65 commit c06eeaf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions frontend/src/hooks/useTickets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const useTickets = ({
showAll,
queueIds,
withUnreadMessages,
all,
}) => {
const [loading, setLoading] = useState(true);
const [hasMore, setHasMore] = useState(false);
Expand All @@ -40,6 +41,7 @@ const useTickets = ({
showAll,
queueIds,
withUnreadMessages,
all,
},
});
setTickets(data.tickets);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Dashboard/Chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Chart = () => {
const theme = useTheme();

const date = useRef(new Date().toISOString());
const { tickets } = useTickets({ date: date.current });
const { tickets } = useTickets({ date: date.current, all: true });

const [chartData, setChartData] = useState([
{ time: "01:00", amount: 0 },
Expand Down

0 comments on commit c06eeaf

Please sign in to comment.