Added initial transactions list page and edited technician dashboard component names for better readability

This commit is contained in:
Keannu Bernasol 2023-12-14 18:13:55 +08:00
parent be6e1ba229
commit 08fd217ccb
5 changed files with 21 additions and 6 deletions

View file

@ -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: (

View file

@ -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();

View file

@ -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 (
<>

View file

@ -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>
);

View file

@ -0,0 +1,3 @@
export default function TransactionsListPage() {
return <div>{"TransactionsListPage"}</div>;
}