Update dashboard page

This commit is contained in:
Keannu Bernasol 2023-12-14 18:14:44 +08:00
parent ff819dc0c9
commit ac55dca368

View file

@ -5,61 +5,9 @@ import TechnicianWidgets from "../../Components/DashboardPage/TechnicianWidgets"
import TechnicianEquipmentButtons from "../../Components/DashboardPage/TechnicianEquipmentButtons";
import TechnicianLogButtons from "../../Components/DashboardPage/TechnicianLogButtons";
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 (
<div style={styles.background}>
<Header label={"Dashboard"} />
<Header label={"Dashboard"} />
<RestrictedComponent allow_only={"Technician"}>
<TechnicianWidgets />
</RestrictedComponent>