mirror of
https://github.com/lemeow125/Borrowing-TrackerFrontend.git
synced 2024-11-17 06:19:27 +08:00
Added initial transactions list page and edited technician dashboard component names for better readability
This commit is contained in:
parent
be6e1ba229
commit
08fd217ccb
5 changed files with 21 additions and 6 deletions
12
src/App.tsx
12
src/App.tsx
|
@ -17,6 +17,7 @@ import EquipmentLogsPage from "./Pages/EquipmentLogsPage/EquipmentLogsPage";
|
|||
import EquipmentInstanceLogsPage from "./Pages/EquipmentInstanceLogsPage/EquipmentInstanceLogsPage";
|
||||
import EquipmentInstancesFilteredListPage from "./Pages/EquipmentInstancesListPage/EquipmentInstancesFilteredListPage";
|
||||
import RestrictedPage from "./Components/RestrictedPage/RestrictedPage";
|
||||
import TransactionsListPage from "./Pages/TransactionsListPage/TransactionsListPage";
|
||||
|
||||
const queryClient = new QueryClient();
|
||||
const router = createHashRouter([
|
||||
|
@ -84,6 +85,17 @@ const router = createHashRouter([
|
|||
),
|
||||
errorElement: <ErrorPage />,
|
||||
},
|
||||
{
|
||||
path: "/view/transactions",
|
||||
element: (
|
||||
<>
|
||||
<Revalidator />
|
||||
<RestrictedPage allow_only="Technician" />
|
||||
<TransactionsListPage />
|
||||
</>
|
||||
),
|
||||
errorElement: <ErrorPage />,
|
||||
},
|
||||
{
|
||||
path: "/view/equipments/logs",
|
||||
element: (
|
||||
|
|
|
@ -12,7 +12,7 @@ import Popup from "reactjs-popup";
|
|||
import AddItemModal from "../AddItemModal/AddItemModal";
|
||||
import AddSKUModal from "../AddSKUModal/AddSKUModal";
|
||||
import { useState } from "react";
|
||||
export default function TechnicianButtons() {
|
||||
export default function TechnicianEquipmentButtons() {
|
||||
const [addSKUmodalOpen, SetAddSKUModalOpen] = useState(false);
|
||||
const [additemmodalOpen, SetAddItemModalOpen] = useState(false);
|
||||
const navigate = useNavigate();
|
|
@ -4,7 +4,7 @@ import ManageSearchIcon from "@mui/icons-material/ManageSearch";
|
|||
import styles from "../../styles";
|
||||
import { colors } from "../../styles";
|
||||
|
||||
export default function TechnicianLogs() {
|
||||
export default function TechnicianLogButtons() {
|
||||
const navigate = useNavigate();
|
||||
return (
|
||||
<>
|
|
@ -2,8 +2,8 @@ import Header from "../../Components/Header/Header";
|
|||
import styles from "../../styles";
|
||||
import RestrictedComponent from "../../Components/RestrictedComponent/RestrictedComponent";
|
||||
import TechnicianWidgets from "../../Components/DashboardPage/TechnicianWidgets";
|
||||
import TechnicianButtons from "../../Components/DashboardPage/TechnicianButtons";
|
||||
import TechnicianLogs from "../../Components/DashboardPage/TechnicianLogs";
|
||||
import TechnicianEquipmentButtons from "../../Components/DashboardPage/TechnicianEquipmentButtons";
|
||||
import TechnicianLogButtons from "../../Components/DashboardPage/TechnicianLogButtons";
|
||||
export default function Dashboard() {
|
||||
return (
|
||||
<div style={styles.background}>
|
||||
|
@ -12,10 +12,10 @@ export default function Dashboard() {
|
|||
<TechnicianWidgets />
|
||||
</RestrictedComponent>
|
||||
<RestrictedComponent allow_only={"Technician"}>
|
||||
<TechnicianButtons />
|
||||
<TechnicianEquipmentButtons />
|
||||
</RestrictedComponent>
|
||||
<RestrictedComponent allow_only={"Technician"}>
|
||||
<TechnicianLogs />
|
||||
<TechnicianLogButtons />
|
||||
</RestrictedComponent>
|
||||
</div>
|
||||
);
|
||||
|
|
3
src/Pages/TransactionsListPage/TransactionsListPage.tsx
Normal file
3
src/Pages/TransactionsListPage/TransactionsListPage.tsx
Normal file
|
@ -0,0 +1,3 @@
|
|||
export default function TransactionsListPage() {
|
||||
return <div>{"TransactionsListPage"}</div>;
|
||||
}
|
Loading…
Reference in a new issue