This commit is contained in:
psofia 2024-01-07 16:40:28 +08:00
parent 94d41b3194
commit f00432aab7
2 changed files with 14 additions and 132 deletions

View file

@ -68,7 +68,7 @@ export default function TechnicianEquipmentButtons() {
View All View All
</p> </p>
</Button> </Button>
{/* <Button <Button
style={{ style={{
...styles.flex_column, ...styles.flex_column,
...{ ...{
@ -98,8 +98,8 @@ export default function TechnicianEquipmentButtons() {
> >
Add Item Add Item
</p> </p>
</Button> */} </Button>
{/* <Button <Button
style={{ style={{
...styles.flex_column, ...styles.flex_column,
...{ ...{
@ -129,7 +129,7 @@ export default function TechnicianEquipmentButtons() {
> >
Add SKU Add SKU
</p> </p>
</Button> */} </Button>
<Button <Button
style={{ style={{
...styles.flex_column, ...styles.flex_column,
@ -204,7 +204,7 @@ export default function TechnicianEquipmentButtons() {
Transactions Transactions
</p> </p>
</Button> </Button>
{/* <Button <Button
style={{ style={{
...styles.flex_column, ...styles.flex_column,
...{ ...{
@ -265,9 +265,9 @@ export default function TechnicianEquipmentButtons() {
> >
Miscellaneous Miscellaneous
</p> </p>
</Button> */} </Button>
</div> </div>
{/* <Popup <Popup
open={addSKUmodalOpen} open={addSKUmodalOpen}
onClose={() => SetAddSKUModalOpen(false)} onClose={() => SetAddSKUModalOpen(false)}
modal modal
@ -285,8 +285,8 @@ export default function TechnicianEquipmentButtons() {
}} }}
> >
<AddSKUModal /> <AddSKUModal />
</Popup> */} </Popup>
{/* <Popup <Popup
open={additemmodalOpen} open={additemmodalOpen}
onClose={() => SetAddItemModalOpen(false)} onClose={() => SetAddItemModalOpen(false)}
modal modal
@ -304,7 +304,7 @@ export default function TechnicianEquipmentButtons() {
}} }}
> >
<AddItemModal /> <AddItemModal />
</Popup> */} </Popup>
</> </>
); );
} }

View file

@ -16,22 +16,14 @@ import { useState } from "react";
import Popup from "reactjs-popup"; import Popup from "reactjs-popup";
import Autocomplete from "@mui/material/Autocomplete"; import Autocomplete from "@mui/material/Autocomplete";
import SearchIcon from "@mui/icons-material/Search"; import SearchIcon from "@mui/icons-material/Search";
import AddItemModal from "../../Components/AddItemModal/AddItemModal";
import AddToQueueIcon from "@mui/icons-material/AddToQueue";
import ScienceIcon from "@mui/icons-material/Science";
import ColorizeIcon from "@mui/icons-material/Colorize";
import { Button } from "@mui/material";
import { useNavigate } from "react-router-dom";
export default function EquipmentInstancesListPage() { export default function EquipmentInstancesListPage() {
const [editmodalOpen, SetEditModalOpen] = useState(false); const [editmodalOpen, SetEditModalOpen] = useState(false);
const [selectedItem, SetSelectedItem] = useState(0); const [selectedItem, SetSelectedItem] = useState(0);
const [additemmodalOpen, SetAddItemModalOpen] = useState(false);
const navigate = useNavigate();
const equipment_instances = useQuery({ const equipment_instances = useQuery({
queryKey: ["equipment_instances"], queryKey: ["equipment_instances"],
@ -83,121 +75,11 @@ export default function EquipmentInstancesListPage() {
minWidth: "100%", minWidth: "100%",
}} }}
> >
{/* ADDED/INSERTED BUTTON,POPUP, TWO CATEGORY BUTTONS*/}
<Button
style={{
...styles.flex_column,
...{
alignSelf: "center",
justifyContent: "center",
flexWrap: "wrap",
},
}}
onClick={() => {
SetAddItemModalOpen(true);
}}
>
<AddToQueueIcon
style={{
height: 64,
width: 64,
fill: colors.font_dark,
marginLeft: "1rem",
marginRight: "1rem",
}}
/>
<p
style={{
...styles.text_dark,
...styles.text_M,
}}
>
Add Item
</p>
</Button>
<Popup
open={additemmodalOpen}
onClose={() => SetAddItemModalOpen(false)}
modal
position={"top center"}
contentStyle={{
width: "32rem",
borderRadius: 16,
borderColor: "grey",
borderStyle: "solid",
borderWidth: 1,
padding: 16,
alignContent: "center",
justifyContent: "center",
textAlign: "center",
}}
>
<AddItemModal />
</Popup>
<Button
style={{
...styles.flex_column,
...{
alignSelf: "center",
justifyContent: "center",
flexWrap: "wrap",
},
}}
>
<ScienceIcon
style={{
height: 64,
width: 64,
fill: colors.font_dark,
marginLeft: "1rem",
marginRight: "1rem",
}}
onClick={() => {
navigate("/view/equipment_instances/filter/Glassware");
}}
/>
<p
style={{
...styles.text_dark,
...styles.text_M,
}}
>
Glassware
</p>
</Button>
<Button
style={{
...styles.flex_column,
...{
alignSelf: "center",
justifyContent: "center",
flexWrap: "wrap",
},
}}
>
<ColorizeIcon
style={{
height: 64,
width: 64,
fill: colors.font_dark,
marginLeft: "1rem",
marginRight: "1rem",
}}
onClick={() => {
navigate("/view/equipment_instances/filter/Miscellaneous");
}}
/>
<p
style={{
...styles.text_dark,
...styles.text_M,
}}
>
Miscellaneous
</p>
</Button>
<div <div
style={{ style={{