transferred buttons

This commit is contained in:
psofia 2024-01-06 15:26:03 +08:00
parent 287cdbc99e
commit 5c89fd725a
2 changed files with 138 additions and 6 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,7 +98,7 @@ export default function TechnicianEquipmentButtons() {
> >
Add Item Add Item
</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,7 +265,7 @@ export default function TechnicianEquipmentButtons() {
> >
Miscellaneous Miscellaneous
</p> </p>
</Button> </Button> */}
</div> </div>
<Popup <Popup
open={addSKUmodalOpen} open={addSKUmodalOpen}
@ -286,7 +286,7 @@ 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,10 +16,23 @@ 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"],
queryFn: EquipmentInstancesAPI, queryFn: EquipmentInstancesAPI,
@ -54,6 +67,9 @@ export default function EquipmentInstancesListPage() {
} }
return ( return (
<div style={styles.background}> <div style={styles.background}>
<Header label={"Items List"} /> <Header label={"Items List"} />
<div <div
style={{ style={{
@ -68,6 +84,122 @@ export default function EquipmentInstancesListPage() {
flexWrap: "wrap", flexWrap: "wrap",
}} }}
> >
{/* 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 style={{ alignSelf: "flex-start", paddingLeft: "32px" }}> <div style={{ alignSelf: "flex-start", paddingLeft: "32px" }}>
<div <div
style={{ style={{