web/src/app/shifts/page.jsx

82 lines
2.3 KiB
React
Raw Normal View History

2023-10-19 11:44:56 +03:30
"use client";
import AppHeader from "@comp/AppHeader/page";
2023-10-26 00:26:44 +03:30
import ShiftCard from "@comp/ShiftComponent/ShiftCard/page";
2023-10-19 11:44:56 +03:30
import AppContext from "@ctx/AppContext";
2023-11-14 16:22:32 +03:30
import Image from "next/image";
2023-11-05 17:48:39 +03:30
import Link from "next/link";
2023-11-14 16:22:32 +03:30
import { useRouter } from "next/navigation";
2023-10-19 11:44:56 +03:30
import BottomSheetCreateShifts from "plugins/BottomSheet/BottomSheetCreateShifts";
import PersianNumber from "plugins/PersianNumber";
2023-10-26 00:26:44 +03:30
import React, { useContext, useEffect } from "react";
2023-10-19 11:44:56 +03:30
const Shifts = (props) => {
const CTX = useContext(AppContext);
2023-11-14 16:22:32 +03:30
const router = useRouter();
2023-10-19 11:44:56 +03:30
2023-10-26 00:26:44 +03:30
useEffect(() => {
CTX.GetShifts();
}, []);
2023-10-19 11:44:56 +03:30
return (
<>
<div className="pb-20">
<AppHeader
title="شیفتــــ های مجموعه"
sub="شما 12 نفر شیفت متفاوت دارید"
icon1={true}
iconName1="PLUS"
iconHref1="#"
2023-11-14 16:22:32 +03:30
iconEvent1={() => {
CTX.setBottomSheetCreateShiftsOpen(true);
}}
2023-10-19 11:44:56 +03:30
icon2={true}
iconName2="ARROW"
iconHref2="/home"
iconEvent2={() => {
return undefined;
}}
/>
2023-11-14 16:22:32 +03:30
<div className="bg-primary-300 flex whitespace-nowrap rtl p-3">
<Link
href={"/shifts/manage-shift"}
className=" bg-white rounded-3xl p-5 inline-block w-fit relative top-[-32px] mx-2"
>
<div>
<h2> شیفت هفته </h2>
<div className="flex justify-end">
<div className="w-10 h-5 rounded-full bg-secondary-200 opacity-30"></div>
2023-10-19 11:44:56 +03:30
</div>
</div>
2023-11-14 16:22:32 +03:30
</Link>
<Link
href={"/shifts/manage-shift"}
className=" bg-white rounded-3xl p-5 inline-block w-fit relative top-[-32px]"
>
<div>
<h2>
{" "}
شیفت بعدی
<strong> هفته بعد </strong>
</h2>
<div className="flex justify-end">
<div className="w-5 h-5 rounded-full bg-secondary-100 opacity-30"></div>
</div>{" "}
</div>
</Link>
</div>
<div className="bg-body-100 relative top-[-30px] rounded-t-3xl overflow-hidden p-4 rtl mt-2">
2023-10-26 00:26:44 +03:30
<ShiftCard />
2023-10-19 11:44:56 +03:30
</div>
</div>
<BottomSheetCreateShifts />
</>
);
};
export default Shifts;