Skip to content

Commit

Permalink
Merge pull request #88 from tgxn/overview
Browse files Browse the repository at this point in the history
dashboard work
  • Loading branch information
tgxn authored Oct 31, 2023
2 parents a444713 + 22bb789 commit b1da16e
Show file tree
Hide file tree
Showing 9 changed files with 907 additions and 10 deletions.
29 changes: 29 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@reduxjs/toolkit": "^1.9.7",
"@tanstack/react-query": "^5.4.3",
"@tanstack/react-query-devtools": "^5.4.3",
"axios": "^1.6.0",
"babel-loader": "^9.1.3",
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.8.1",
Expand All @@ -39,6 +40,7 @@
"react-dom": "^18.2.0",
"react-intersection-observer": "^9.5.2",
"react-moment": "^1.1.3",
"react-number-format": "^5.3.1",
"react-redux": "^8.1.1",
"react-router-dom": "^6.17.0",
"redux": "^4.2.1",
Expand Down
22 changes: 22 additions & 0 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { Toaster, toast } from "sonner";

import SiteHeader from "./components/SiteHeader";

import Dashboard from "./pages/Dashboard";
import Actions from "./pages/Actions";
import Approvals from "./pages/Approvals";
import Reports from "./pages/Reports";
Expand Down Expand Up @@ -99,6 +100,27 @@ function PageRouter() {
<Routes>
<Route
path="/"
element={
<Box
sx={{
overflow: "auto",
height: "calc(100% - 50px)",
width: "100%",
}}
>
<Container
maxWidth={"lg"}
sx={{
py: 2,
}}
>
<Dashboard />
</Container>
</Box>
}
/>
<Route
path="/reports"
element={
<Box
sx={{
Expand Down
4 changes: 3 additions & 1 deletion src/components/Actions/PMButtons.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from "react";
import { useSelector } from "react-redux";

import Chip from "@mui/joy/Chip";

import { useQueryClient } from "@tanstack/react-query";

import DoneAllIcon from "@mui/icons-material/DoneAll";
Expand Down Expand Up @@ -34,7 +36,7 @@ export const ResolvePMReportButton = ({ report, ...props }) => {
? null
: old.pages.map((page) => {
const newData = page.data.filter((oldReport) => {
return oldReport.pm_report.id !== report.pm_report.id;
return oldReport?.pm_report?.id !== report?.pm_report?.id;
});

return {
Expand Down
Loading

0 comments on commit b1da16e

Please sign in to comment.