mirror of
https://github.com/lemeow125/Borrowing-TrackerFrontend.git
synced 2024-11-17 06:19:27 +08:00
Update dashboard page
This commit is contained in:
parent
ff819dc0c9
commit
ac55dca368
1 changed files with 1 additions and 53 deletions
|
@ -5,61 +5,9 @@ import TechnicianWidgets from "../../Components/DashboardPage/TechnicianWidgets"
|
||||||
import TechnicianEquipmentButtons from "../../Components/DashboardPage/TechnicianEquipmentButtons";
|
import TechnicianEquipmentButtons from "../../Components/DashboardPage/TechnicianEquipmentButtons";
|
||||||
import TechnicianLogButtons from "../../Components/DashboardPage/TechnicianLogButtons";
|
import TechnicianLogButtons from "../../Components/DashboardPage/TechnicianLogButtons";
|
||||||
export default function Dashboard() {
|
export default function Dashboard() {
|
||||||
<<<<<<< HEAD
|
|
||||||
const queries = useQueries({
|
|
||||||
queries: [
|
|
||||||
{
|
|
||||||
queryKey: ["equipments"],
|
|
||||||
queryFn: EquipmentsAPI,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
queryKey: ["equipment_instances"],
|
|
||||||
queryFn: EquipmentInstancesAPI,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
queryKey: ["user"],
|
|
||||||
queryFn: UserAPI,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
|
||||||
const isLoading = queries.some((result) => result.isLoading);
|
|
||||||
|
|
||||||
const [addSKUmodalOpen, SetAddSKUModalOpen] = useState(false);
|
|
||||||
const [additemmodalOpen, SetAddItemModalOpen] = useState(false);
|
|
||||||
|
|
||||||
if (isLoading) {
|
|
||||||
return (
|
|
||||||
<div style={styles.background}>
|
|
||||||
<Header label={"Dashboard"} />
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
...styles.flex_column,
|
|
||||||
...{
|
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "center",
|
|
||||||
paddingTop: "64px",
|
|
||||||
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<CircularProgress style={{ height: "128px", width: "128px" }} />
|
|
||||||
<p
|
|
||||||
style={{
|
|
||||||
...styles.text_dark,
|
|
||||||
...styles.text_L,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Loading
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
=======
|
|
||||||
>>>>>>> be6e1ba229d5ab71d64626e470d43ab9169f1758
|
|
||||||
return (
|
return (
|
||||||
<div style={styles.background}>
|
<div style={styles.background}>
|
||||||
<Header label={"Dashboard"} />
|
<Header label={"Dashboard"} />
|
||||||
<RestrictedComponent allow_only={"Technician"}>
|
<RestrictedComponent allow_only={"Technician"}>
|
||||||
<TechnicianWidgets />
|
<TechnicianWidgets />
|
||||||
</RestrictedComponent>
|
</RestrictedComponent>
|
||||||
|
|
Loading…
Reference in a new issue