before meeting
parent
1cce5e38c5
commit
ada59ed9e1
Binary file not shown.
|
@ -1,3 +1,4 @@
|
|||
import Avatar from "boring-avatars";
|
||||
import Link from "next/link";
|
||||
import React from "react";
|
||||
|
||||
|
@ -13,6 +14,7 @@ const AppHeader = ({
|
|||
iconHref2,
|
||||
iconEvent2,
|
||||
userIcon,
|
||||
userIconData,
|
||||
}) => {
|
||||
const icons = [
|
||||
{
|
||||
|
@ -95,7 +97,16 @@ const AppHeader = ({
|
|||
<div className=" bg-primary-300 flex justify-between rtl pt-4 px-4 pb-[50px] w-full">
|
||||
<div className="flex">
|
||||
{userIcon && (
|
||||
<div className="w-[50px] h-[50px] rounded-full bg-white"></div>
|
||||
<div className="w-[50px] h-[50px] rounded-full bg-white border-[5px]">
|
||||
<div className=" rounded-full z-10 ">
|
||||
<Avatar
|
||||
size={40}
|
||||
name={userIconData}
|
||||
variant="beam"
|
||||
colors={["#9d9f88", "#83af96", "#b2de93"]}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<div className="mr-2 mt-1">
|
||||
<h2 className="mb-0 text-white font-bold text-base">{title}</h2>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
import AppContext from "@ctx/AppContext";
|
||||
import React, { useContext } from "react";
|
||||
import Avatar from "boring-avatars";
|
||||
import PersianNumber from "plugins/PersianNumber";
|
||||
|
||||
const UsersEmployees = () => {
|
||||
const CTX = useContext(AppContext);
|
||||
|
@ -34,7 +35,13 @@ const UsersEmployees = () => {
|
|||
<h4 className="text-sm font-bold text-primary-300">
|
||||
{e.firstName}{" "}
|
||||
</h4>
|
||||
<p className="mb-0 text-[11px]">صندوق دار</p>
|
||||
<p className="mb-0 text-[11px]">
|
||||
{e.roleNames.length > 0
|
||||
? e.roleNames.length <= 1
|
||||
? e.roleNames[0]
|
||||
: e.roleNames[0] + " ......"
|
||||
: "هیچی پیدا نمیشه براش ...."}
|
||||
</p>
|
||||
</div>
|
||||
<div className="flex">
|
||||
<div
|
||||
|
|
|
@ -19,7 +19,7 @@ const NavBAr = (props) => {
|
|||
};
|
||||
|
||||
return (
|
||||
<div className="fixed w-full z-10 bottom-0 ">
|
||||
<div className="fixed w-full z-[110] bottom-0 ">
|
||||
{/* <div className="w-[100px] text-left overflow-hidden">
|
||||
<Image src={divide} alt="" className=" " />
|
||||
</div> */}
|
||||
|
|
|
@ -0,0 +1,137 @@
|
|||
"use client";
|
||||
|
||||
import AppContext from "@ctx/AppContext";
|
||||
import { DaysOfWeek } from "plugins/DaysOfWeek/page";
|
||||
import PersianNumber from "plugins/PersianNumber";
|
||||
import { getTimeOfDay } from "plugins/TimeOfDay/page";
|
||||
import React, { useContext } from "react";
|
||||
|
||||
const ShiftCard = () => {
|
||||
const CTX = useContext(AppContext);
|
||||
const shiftsData = CTX.state.shiftsData;
|
||||
|
||||
const goToEditUser = (id) => {
|
||||
CTX.setGoToEditShift(true);
|
||||
CTX.setBottomSheetCreateShiftsOpen(true);
|
||||
CTX.setIdEditShift(id);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
{shiftsData.length > 0 ? (
|
||||
<>
|
||||
{shiftsData &&
|
||||
shiftsData.map((e) => (
|
||||
<>
|
||||
<div className="bg-backgroundPrimary-100 rounded-xl rounded-t-3xl mt-5">
|
||||
<div className=" bg-white rounded-3xl border shadow p-2 flex justify-between w-full h-fit pr-5 mt-2 ">
|
||||
<div>
|
||||
<h4 className="text-xl font-bold text-primary-300 mt-1">
|
||||
{e?.title}{" "}
|
||||
</h4>
|
||||
</div>
|
||||
<div
|
||||
className="w-[35px] h-[35px] bg-secondaryLighter-100 rounded-full pt-[3px]"
|
||||
onClick={() => goToEditUser(e.id)}
|
||||
>
|
||||
<svg
|
||||
width="13"
|
||||
height="13"
|
||||
viewBox="0 0 18 18"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mx-auto mt-[8px]"
|
||||
>
|
||||
<g clip-path="url(#clip0_72_994)">
|
||||
<path
|
||||
d="M11.4653 2.36397L10.77 3.05922L4.37926 9.44922C3.94651 9.88272 3.72976 10.0995 3.54376 10.338C3.32409 10.6194 3.13573 10.924 2.98201 11.2462C2.85226 11.5192 2.75551 11.8102 2.56201 12.3907L1.74151 14.8515L1.54051 15.453C1.4935 15.5932 1.48652 15.7437 1.52037 15.8877C1.55422 16.0316 1.62755 16.1633 1.73212 16.2679C1.83669 16.3724 1.96835 16.4458 2.1123 16.4796C2.25626 16.5135 2.4068 16.5065 2.54701 16.4595L3.14851 16.2585L5.60926 15.438C6.19051 15.2445 6.48076 15.1477 6.75376 15.018C7.07626 14.8642 7.38076 14.676 7.66201 14.4562C7.90051 14.2702 8.11726 14.0535 8.55001 13.6207L14.9408 7.22997L15.636 6.53472C16.1891 5.98165 16.4998 5.23152 16.4998 4.44935C16.4998 3.66718 16.1891 2.91705 15.636 2.36397C15.0829 1.8109 14.3328 1.50018 13.5506 1.50018C12.7685 1.50018 12.0183 1.8109 11.4653 2.36397Z"
|
||||
stroke="#DA4215"
|
||||
stroke-width="1.5"
|
||||
/>
|
||||
<path
|
||||
d="M11.4653 2.36397L10.77 3.05922L4.37926 9.44922C3.94651 9.88272 3.72976 10.0995 3.54376 10.338C3.32409 10.6194 3.13573 10.924 2.98201 11.2462C2.85226 11.5192 2.75551 11.8102 2.56201 12.3907L1.74151 14.8515L1.54051 15.453C1.4935 15.5932 1.48652 15.7437 1.52037 15.8877C1.55422 16.0316 1.62755 16.1633 1.73212 16.2679C1.83669 16.3724 1.96835 16.4458 2.1123 16.4796C2.25626 16.5135 2.4068 16.5065 2.54701 16.4595L3.14851 16.2585L5.60926 15.438C6.19051 15.2445 6.48076 15.1477 6.75376 15.018C7.07626 14.8642 7.38076 14.676 7.66201 14.4562C7.90051 14.2702 8.11726 14.0535 8.55001 13.6207L14.9408 7.22997L15.636 6.53472C16.1891 5.98165 16.4998 5.23152 16.4998 4.44935C16.4998 3.66718 16.1891 2.91705 15.636 2.36397C15.0829 1.8109 14.3328 1.50018 13.5506 1.50018C12.7685 1.50018 12.0183 1.8109 11.4653 2.36397Z"
|
||||
stroke="#D03405"
|
||||
stroke-width="1.5"
|
||||
/>
|
||||
<g opacity="0.5">
|
||||
<path
|
||||
d="M10.77 3.05847C10.77 3.05847 10.857 4.53597 12.1605 5.83947C13.464 7.14297 14.9408 7.22922 14.9408 7.22922M3.14852 16.2585L1.74152 14.85"
|
||||
stroke="#DA4215"
|
||||
stroke-width="1.5"
|
||||
/>
|
||||
<path
|
||||
d="M10.77 3.05847C10.77 3.05847 10.857 4.53597 12.1605 5.83947C13.464 7.14297 14.9408 7.22922 14.9408 7.22922M3.14852 16.2585L1.74152 14.85"
|
||||
stroke="#D03405"
|
||||
stroke-width="1.5"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_72_994">
|
||||
<rect width="18" height="18" fill="white" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="py-2 px-3">
|
||||
<div className="flex">
|
||||
<p className="mb-0 border-l-[1px] border-gray-500 pl-2 text-gray-500 text-sm ">
|
||||
شروع :
|
||||
<strong className="font-bold mx-1">
|
||||
<PersianNumber
|
||||
number={
|
||||
e?.startAt?.split(":")[0] +
|
||||
":" +
|
||||
e?.startAt?.split(":")[1]
|
||||
}
|
||||
/>
|
||||
</strong>
|
||||
{getTimeOfDay(e?.startAt?.split(":")[0])}
|
||||
</p>
|
||||
|
||||
<p className="mb-0 pr-2 text-gray-500 text-sm">
|
||||
پایان :
|
||||
<strong className="font-bold mx-1">
|
||||
<strong className="font-bold mx-1">
|
||||
<PersianNumber
|
||||
number={
|
||||
e?.endAt?.split(":")[0] +
|
||||
":" +
|
||||
e?.endAt?.split(":")[1]
|
||||
}
|
||||
/>
|
||||
</strong>
|
||||
</strong>
|
||||
{getTimeOfDay(e?.endAt?.split(":")[0])}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-wrap px-3 pb-4 pt-2">
|
||||
{e?.days.map((e) => (
|
||||
<div className="bg-secondaryLighter-100 rounded-full py-1 px-4 mx-1 mt-2">
|
||||
<p className="mb-0 text-[11px] white text-secondary-200 font-bold ">
|
||||
{" "}
|
||||
{DaysOfWeek(e)}{" "}
|
||||
</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
))}
|
||||
</>
|
||||
) : (
|
||||
<div className="flex justify-center py-5">
|
||||
<div className="bg-white shadow mt-5 w-fit rounded-full p-4">
|
||||
چیزی یافت نشد
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default ShiftCard;
|
|
@ -20,6 +20,7 @@
|
|||
"postcss": "8.4.28",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-duration-picker": "^1.1.1",
|
||||
"react-modern-calendar-datepicker": "^3.1.6",
|
||||
"react-persian-datepicker": "^3.0.2",
|
||||
"react-spring-bottom-sheet": "^3.4.1",
|
||||
|
|
|
@ -184,6 +184,7 @@ const BottomSheetCreateEmployees = (props) => {
|
|||
onSpringStart={(e) => handleBottomSheetCreateEmployeesOpen(e)}
|
||||
open={CTX.state.BottomSheetCreateEmployeesOpen}
|
||||
onDismiss={() => CTX.setBottomSheetCreateEmployeesOpen(false)}
|
||||
blocking={false}
|
||||
>
|
||||
<div className="text-center py-2 bg-primary-300 ">
|
||||
<p className="mb-0 text-white relative top-[-5px]">افزودن کاربر جدید</p>
|
||||
|
@ -254,6 +255,7 @@ const BottomSheetCreateEmployees = (props) => {
|
|||
<DatePickerIran
|
||||
datePickerEvent={(e) => setBirthDate(e)}
|
||||
date={birthDate}
|
||||
zindex="z-[1000]"
|
||||
/>
|
||||
|
||||
<div className="">
|
||||
|
|
|
@ -109,6 +109,7 @@ const BottomSheetCreateRole = (props) => {
|
|||
onSpringStart={(e) => handleBottomSheetCreateRole(e)}
|
||||
open={CTX.state.BottomSheetCreateRoleOpen}
|
||||
onDismiss={() => CTX.setBottomSheetCreateRoleOpen(false)}
|
||||
blocking={false}
|
||||
>
|
||||
<div className="text-center py-2 bg-primary-300 ">
|
||||
<p className="mb-0 text-white relative top-[-5px]">افزودن نقش جدید</p>
|
||||
|
|
|
@ -1,17 +1,144 @@
|
|||
"use client";
|
||||
|
||||
import React, { useContext } from "react";
|
||||
import React, { useContext, useEffect, useRef, useState } from "react";
|
||||
import { BottomSheet } from "react-spring-bottom-sheet";
|
||||
import Input from "plugins/Input/page";
|
||||
import AppContext from "@ctx/AppContext";
|
||||
import SimpleReactValidator from "simple-react-validator";
|
||||
import { toast } from "react-toastify";
|
||||
import Buttonbriz from "plugins/Buttonbriz/page";
|
||||
|
||||
const BottomSheetCreateShifts = (props) => {
|
||||
const CTX = useContext(AppContext);
|
||||
const [title, setTitle] = useState("");
|
||||
const [description, setDescription] = useState("");
|
||||
const [dayOfWeeksCurrent, setDayOfWeeksCurrent] = useState("");
|
||||
const [, forceUpdate] = useState();
|
||||
|
||||
const dayOfWeeksChoose = CTX.state.dayOfWeeksChoose;
|
||||
const startAtTimeShift = CTX.state.startAtTimeShift;
|
||||
const endAtTimeShift = CTX.state.endAtTimeShift;
|
||||
const goToEditShift = CTX.state.goToEditShift;
|
||||
const idEditShift = CTX.state.idEditShift;
|
||||
const shiftData = CTX.state.shiftData;
|
||||
|
||||
const week = [
|
||||
{ key: "شنبه", value: 6 },
|
||||
{ key: "یکشنبه", value: 0 },
|
||||
{ key: "دوشنبه", value: 1 },
|
||||
{ key: "سه شنبه", value: 2 },
|
||||
{ key: "چهار شنبه", value: 3 },
|
||||
{ key: "پنج شنبه", value: 4 },
|
||||
{ key: "جمعه", value: 5 },
|
||||
];
|
||||
|
||||
const validator = useRef(
|
||||
new SimpleReactValidator({
|
||||
messages: {
|
||||
required: "پر کردن این فیلد الزامی میباشد",
|
||||
},
|
||||
element: (message) => (
|
||||
<>
|
||||
<div className="text-right px-1 ">
|
||||
<small className="text-red-600 t-ig-small ">{message}</small>
|
||||
</div>
|
||||
</>
|
||||
),
|
||||
})
|
||||
);
|
||||
|
||||
const clear = () => {
|
||||
setDayOfWeeksCurrent("");
|
||||
setDescription("");
|
||||
setTitle("");
|
||||
// CTX.setEndAtTimeShift(["00", "00"]);
|
||||
// CTX.setStartAtTimeShift(["00", "00"]);
|
||||
CTX.setdayOfWeeksChoose([]);
|
||||
};
|
||||
|
||||
const body = {
|
||||
title,
|
||||
description,
|
||||
endAt: endAtTimeShift[0] + ":" + endAtTimeShift[1] + ":00",
|
||||
startAt: startAtTimeShift[0] + ":" + startAtTimeShift[1] + ":00",
|
||||
dayOfWeeks: dayOfWeeksChoose,
|
||||
};
|
||||
|
||||
const bodyUpdate = {
|
||||
title,
|
||||
description,
|
||||
endAt: endAtTimeShift[0] + ":" + endAtTimeShift[1] + ":00",
|
||||
startAt: startAtTimeShift[0] + ":" + startAtTimeShift[1] + ":00",
|
||||
dayOfWeeks: dayOfWeeksChoose,
|
||||
id: shiftData.id,
|
||||
};
|
||||
|
||||
const handleCreateShift = (update) => {
|
||||
if (validator.current.allValid()) {
|
||||
if (update == "UPDATE") {
|
||||
CTX.UpdateShift(bodyUpdate);
|
||||
} else {
|
||||
CTX.CreateShift(body);
|
||||
}
|
||||
} else {
|
||||
toast.error("پرکردن همه ی فیلد ها واجب است", {
|
||||
position: "bottom-right",
|
||||
autoClose: 2000,
|
||||
hideProgressBar: false,
|
||||
closeOnClick: true,
|
||||
pauseOnHover: true,
|
||||
draggable: true,
|
||||
progress: undefined,
|
||||
});
|
||||
|
||||
validator.current.showMessages();
|
||||
forceUpdate(1);
|
||||
}
|
||||
};
|
||||
|
||||
const deleteRole = (value) => {
|
||||
console.log(value);
|
||||
CTX.setDayOfWeeksChoose(dayOfWeeksChoose.filter((el) => el !== value));
|
||||
};
|
||||
|
||||
console.log(body);
|
||||
|
||||
const handleBottomSheetCreateShift = (e) => {
|
||||
if (e.type == "OPEN") {
|
||||
if (goToEditShift) {
|
||||
CTX.GetShift(idEditShift);
|
||||
}
|
||||
} else if (e.type == "CLOSE") {
|
||||
CTX.setGoToEditShift(false);
|
||||
CTX.setIdEditShift(null);
|
||||
CTX.setShiftData([]);
|
||||
// clear();
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (goToEditShift) {
|
||||
setTitle(shiftData.title);
|
||||
setDescription(shiftData.description);
|
||||
CTX.setStartAtTimeShift([
|
||||
shiftData.startAt.split(":")[0],
|
||||
shiftData.startAt.split(":")[1],
|
||||
]);
|
||||
CTX.setEndAtTimeShift([
|
||||
shiftData.endAt.split(":")[0],
|
||||
shiftData.endAt.split(":")[1],
|
||||
]);
|
||||
|
||||
CTX.setDayOfWeeksChoose(shiftData.days);
|
||||
}
|
||||
}, [shiftData]);
|
||||
|
||||
return (
|
||||
<BottomSheet
|
||||
onSpringStart={(e) => handleBottomSheetCreateShift(e)}
|
||||
open={CTX.state.BottomSheetCreateShiftsOpen}
|
||||
onDismiss={() => CTX.setBottomSheetCreateShiftsOpen(false)}
|
||||
blocking={false}
|
||||
>
|
||||
<div className="text-center py-2 bg-primary-300 ">
|
||||
<p className="mb-0 text-white relative top-[-5px]">
|
||||
|
@ -22,100 +149,162 @@ const BottomSheetCreateShifts = (props) => {
|
|||
<div className="bg-body-100 p-4 ">
|
||||
<div className="">
|
||||
<Input
|
||||
lable="نام شیفت مورد نظر "
|
||||
id="ShiftName-id"
|
||||
name="ShiftName"
|
||||
lable="نام شیفت مورد نظر"
|
||||
id="title-id"
|
||||
name="title"
|
||||
type={"text"}
|
||||
value={title}
|
||||
inputEvent={(e) => {
|
||||
setTitle(e.target.value);
|
||||
validator.current.showMessageFor("title");
|
||||
}}
|
||||
style="text-right"
|
||||
validator={true}
|
||||
validatorData={validator.current.message(
|
||||
"title",
|
||||
title,
|
||||
"required"
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="ساعت شروع شیفت"
|
||||
id="ُStartShift-id"
|
||||
name="StartShift"
|
||||
lable=" ساعت شروع شیفت"
|
||||
id="startAtTimeShift-id"
|
||||
name="startAtTimeShift"
|
||||
type={"text"}
|
||||
value={startAtTimeShift}
|
||||
inputEvent={(e) => {
|
||||
validator.current.showMessageFor("startAt");
|
||||
}}
|
||||
inputFocus={() => {
|
||||
CTX.setOpenTimePicker(true);
|
||||
CTX.setBottomSheetCreateShiftsOpen(false);
|
||||
CTX.setTimePickerOrder("CREATE-SHIFT-START");
|
||||
}}
|
||||
style="text-right"
|
||||
validator={true}
|
||||
validatorData={validator.current.message(
|
||||
"startAtTimeShift",
|
||||
startAtTimeShift,
|
||||
"required"
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="ساعت پایان شیفت"
|
||||
id="EndShift-id"
|
||||
name="ُEndShift"
|
||||
lable=" ساعت پایان شیفت"
|
||||
id="endAtTimeShift-id"
|
||||
name="endAtTimeShift"
|
||||
type={"text"}
|
||||
value={endAtTimeShift}
|
||||
inputEvent={(e) => {
|
||||
validator.current.showMessageFor("startAt");
|
||||
}}
|
||||
inputFocus={() => {
|
||||
CTX.setOpenTimePicker(true);
|
||||
CTX.setBottomSheetCreateShiftsOpen(false);
|
||||
CTX.setTimePickerOrder("CREATE-SHIFT-END");
|
||||
}}
|
||||
style="text-right"
|
||||
validator={true}
|
||||
validatorData={validator.current.message(
|
||||
"endAtTimeShift",
|
||||
endAtTimeShift,
|
||||
"required"
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="انتخاب روزهای این شیفت در هفته"
|
||||
id="DaysShift-id"
|
||||
name="ُDaysShift"
|
||||
lable="انتخاب روز"
|
||||
id="dayOfWeeksCurrent-id"
|
||||
name="dayOfWeeksCurrent"
|
||||
type={"text"}
|
||||
value={dayOfWeeksCurrent}
|
||||
inputEvent={(e) => {
|
||||
setDayOfWeeksCurrent(e.target.value);
|
||||
|
||||
if (!!dayOfWeeksChoose.find((b) => b == e.target.value)) {
|
||||
toast.error("روز تکراری است", {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
} else {
|
||||
CTX.setDayOfWeeksChoose((current) => [
|
||||
...current,
|
||||
parseInt(e.target.value),
|
||||
]);
|
||||
}
|
||||
}}
|
||||
style="text-right"
|
||||
select={true}
|
||||
selectData={[
|
||||
{ key: "شنبه", value: parseInt(6) },
|
||||
{ key: "یکشنبه", value: 0 },
|
||||
{ key: "دوشنبه", value: 1 },
|
||||
{ key: "سه شنبه", value: 2 },
|
||||
{ key: "چهار شنبه", value: 3 },
|
||||
{ key: "پنج شنبه", value: 4 },
|
||||
{ key: "جمعه", value: 5 },
|
||||
]}
|
||||
/>
|
||||
|
||||
<div className="flex flex-wrap mt-2">
|
||||
<div className="bg-gray-300 rounded-full p-1 m-2 ">
|
||||
<div className="flex rtl">
|
||||
<div className="bg-gray-200 w-[30px] h-[30px] rounded-full p-2 ">
|
||||
<svg
|
||||
width="12"
|
||||
height="12"
|
||||
viewBox="0 0 9 9"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mx-auto "
|
||||
>
|
||||
<path
|
||||
d="M5.54023 4.42081L8.33877 1.62148C8.41438 1.54845 8.4747 1.46109 8.51618 1.36451C8.55768 1.26792 8.57951 1.16404 8.58043 1.05892C8.58134 0.953805 8.56131 0.849559 8.52151 0.752266C8.4817 0.654973 8.42292 0.566582 8.34858 0.49225C8.27425 0.417918 8.18586 0.359134 8.08857 0.319329C7.99128 0.279523 7.88703 0.259492 7.78191 0.260406C7.6768 0.261319 7.57291 0.283158 7.47633 0.324649C7.37974 0.366139 7.29238 0.42645 7.21936 0.502063L4.42002 3.3006L1.62148 0.502063C1.54845 0.42645 1.46109 0.366139 1.36451 0.324649C1.26792 0.283158 1.16404 0.261319 1.05892 0.260406C0.953805 0.259492 0.849559 0.279523 0.752266 0.319329C0.654973 0.359134 0.566582 0.417918 0.49225 0.49225C0.417918 0.566582 0.359134 0.654973 0.319329 0.752266C0.279523 0.849559 0.259492 0.953805 0.260406 1.05892C0.261319 1.16404 0.283158 1.26792 0.324649 1.36451C0.366139 1.46109 0.42645 1.54845 0.502063 1.62148L3.3006 4.42002L0.502063 7.21936C0.42645 7.29238 0.366139 7.37974 0.324649 7.47633C0.283158 7.57291 0.261319 7.6768 0.260406 7.78191C0.259492 7.88703 0.279523 7.99128 0.319329 8.08857C0.359134 8.18586 0.417918 8.27425 0.49225 8.34858C0.566582 8.42292 0.654973 8.4817 0.752266 8.52151C0.849559 8.56131 0.953805 8.58134 1.05892 8.58043C1.16404 8.57951 1.26792 8.55768 1.36451 8.51618C1.46109 8.4747 1.54845 8.41438 1.62148 8.33877L4.42002 5.54023L7.21936 8.33877C7.29238 8.41438 7.37974 8.4747 7.47633 8.51618C7.57291 8.55768 7.6768 8.57951 7.78191 8.58043C7.88703 8.58134 7.99128 8.56131 8.08857 8.52151C8.18586 8.4817 8.27425 8.42292 8.34858 8.34858C8.42292 8.27425 8.4817 8.18586 8.52151 8.08857C8.56131 7.99128 8.58134 7.88703 8.58043 7.78191C8.57951 7.6768 8.55768 7.57291 8.51618 7.47633C8.4747 7.37974 8.41438 7.29238 8.33877 7.21936L5.54023 4.42081Z"
|
||||
fill="#666666"
|
||||
/>
|
||||
</svg>
|
||||
<div className="flex flex-wrap mt-3 rtl">
|
||||
{dayOfWeeksChoose &&
|
||||
dayOfWeeksChoose.map((e) => (
|
||||
<div className="flex bg-gray-300 p-1 rounded-full m-1 justify-start">
|
||||
<div
|
||||
className="w-[30px] h-[30px] rounded-full bg-gray-400 "
|
||||
onClick={() => deleteRole(e)}
|
||||
></div>
|
||||
|
||||
<div>
|
||||
<p className="mb-0 px-3 text-sm mt-1">
|
||||
{week?.find((b) => b.value == e).key}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<p className="mb-0 px-4 mt-1">شنبه</p>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="توضیحات شیفت"
|
||||
id="EndShift-id"
|
||||
name="ُEndShift"
|
||||
lable=" توضیحات"
|
||||
id="description-id"
|
||||
name="description"
|
||||
type={"text"}
|
||||
value={description}
|
||||
inputEvent={(e) => {
|
||||
setDescription(e.target.value);
|
||||
validator.current.showMessageFor("description");
|
||||
}}
|
||||
textarea={true}
|
||||
style="text-right"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex rtl mt-10">
|
||||
<div className=" w-full">
|
||||
<button className="btn btn-info w-full rounded-xl mt-2 flex rtl justify-between p-2">
|
||||
<div className="w-[40px] h-[40px] rounded-xl bg-info-200">
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 12 10"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mx-auto mt-2"
|
||||
>
|
||||
<path
|
||||
d="M4.243 9.314L0 5.07L1.414 3.656L4.243 6.484L9.899 0.826996L11.314 2.242L4.243 9.312V9.314Z"
|
||||
fill="#FFFBE6"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
<span className="text-center mt-2">افزودن شیفت</span>
|
||||
<div className="w-[40px] h-[40px] rounded-xl "></div>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* <div className=" mx-7 mt-4">
|
||||
<p className="mb-0 text-info-200 "> بستن </p>
|
||||
</div> */}
|
||||
</div>
|
||||
{goToEditShift ? (
|
||||
<Buttonbriz
|
||||
title="ویرایش شیفت"
|
||||
color="INFO"
|
||||
icon="CHECK"
|
||||
buttonEvent={() => handleCreateShift("UPDATE")}
|
||||
subButton={true}
|
||||
subButtonTitle="حذف شیفت"
|
||||
subButtonEvent={() => CTX.DeleteShift(idEditShift)}
|
||||
/>
|
||||
) : (
|
||||
<Buttonbriz
|
||||
title="ثبت شیفت"
|
||||
color="PRIMARY"
|
||||
icon="CHECK"
|
||||
buttonEvent={() => handleCreateShift()}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</BottomSheet>
|
||||
);
|
||||
|
|
|
@ -97,7 +97,7 @@ const Buttonbriz = ({
|
|||
className={`tr03 ${
|
||||
subButtonAction
|
||||
? "delete"
|
||||
: "w-[140px] mr-[10px] p-[17px] mt-[5px]"
|
||||
: "w-[200px] mr-[10px] p-[17px] mt-[5px]"
|
||||
}`}
|
||||
>
|
||||
<p
|
||||
|
|
|
@ -6,7 +6,7 @@ import Buttonbriz from "plugins/Buttonbriz/page";
|
|||
import { Calendar } from "react-modern-calendar-datepicker";
|
||||
import AppContext from "@ctx/AppContext";
|
||||
|
||||
const DatePickerIran = ({ datePickerEvent, date }) => {
|
||||
const DatePickerIran = ({ datePickerEvent, date, zindex }) => {
|
||||
const CTX = useContext(AppContext);
|
||||
|
||||
const [selectedDay, setSelectedDay] = useState(null);
|
||||
|
@ -22,7 +22,9 @@ const DatePickerIran = ({ datePickerEvent, date }) => {
|
|||
|
||||
return (
|
||||
<div className="">
|
||||
<div className="flex justify-end z-[1000] relative top-[22px] right-3">
|
||||
<div
|
||||
className={`flex justify-end relative top-[22px] right-3 ltr ${zindex}`}
|
||||
>
|
||||
<div className="bg-body-100 px-2">
|
||||
<p className="mb-0 text-sm mr-0 mx-auto">تاریخ تولد</p>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
export const DaysOfWeek = (day) => {
|
||||
if (day == 6) {
|
||||
return "شنبه";
|
||||
} else if (day == 1) {
|
||||
return "دوشنبه";
|
||||
} else if (day == 2) {
|
||||
return "سه شنبه";
|
||||
} else if (day == 3) {
|
||||
return "چهارشنبه";
|
||||
} else if (day == 4) {
|
||||
return "پنج شنبه";
|
||||
} else if (day == 5) {
|
||||
return "جمعه";
|
||||
} else if (day == 0) {
|
||||
return "یکشنبه";
|
||||
}
|
||||
};
|
|
@ -10,6 +10,7 @@ const Input = ({
|
|||
disabled,
|
||||
theme,
|
||||
inputEvent,
|
||||
inputFocus,
|
||||
style,
|
||||
value,
|
||||
readOnly,
|
||||
|
@ -63,6 +64,7 @@ const Input = ({
|
|||
readOnly={readOnly ? true : false}
|
||||
value={value}
|
||||
onChange={inputEvent}
|
||||
onFocus={inputFocus}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const PersianNumber = ({ number, isCost, size, bold }) => {
|
||||
const PersianNumber = ({ number, isCost, size, bold, style }) => {
|
||||
if (number || number === 0) {
|
||||
const persianMap = "۰۱۲۳۴۵۶۷۸۹".split("");
|
||||
const formatNumber = isCost
|
||||
|
@ -8,7 +8,7 @@ const PersianNumber = ({ number, isCost, size, bold }) => {
|
|||
<span
|
||||
className={`text-[${size ? size : ""}px] ${
|
||||
bold ? "font-bold" : ""
|
||||
} text-sm`}
|
||||
} text-sm ${style}`}
|
||||
>
|
||||
{formatNumber}
|
||||
</span>
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
export const getTimeOfDay = (selectedTime) => {
|
||||
if (selectedTime >= 0 && selectedTime < 12) {
|
||||
return "صبح";
|
||||
} else if (selectedTime >= 12 && selectedTime < 15) {
|
||||
return " ظهر";
|
||||
} else if (selectedTime >= 15 && selectedTime < 19) {
|
||||
return "بعد از ظهر";
|
||||
} else {
|
||||
return "شب";
|
||||
}
|
||||
};
|
|
@ -0,0 +1,116 @@
|
|||
"use client";
|
||||
|
||||
import AppContext from "@ctx/AppContext";
|
||||
import Buttonbriz from "plugins/Buttonbriz/page";
|
||||
import PersianNumber from "plugins/PersianNumber";
|
||||
import { useState, useEffect, useRef, useContext } from "react";
|
||||
|
||||
const TimePicker = () => {
|
||||
const CTX = useContext(AppContext);
|
||||
|
||||
const [hureSelect, setHureSelect] = useState(0);
|
||||
const [secondSelect, setSecondSelect] = useState(0);
|
||||
const [time, setTime] = useState(["00", "00"]);
|
||||
const hoursArray = Array.from({ length: 24 }, (_, index) => {
|
||||
const formattedHour = index < 10 ? `0${index}` : `${index}`;
|
||||
return formattedHour;
|
||||
});
|
||||
const secondsArray = Array.from({ length: 60 }, (_, index) => {
|
||||
const formattedSecond = index < 10 ? `0${index}` : `${index}`;
|
||||
return formattedSecond;
|
||||
});
|
||||
|
||||
const handleButtonTimePicker = () => {
|
||||
if (CTX.state.TimePickerOrder === "CREATE-SHIFT-START") {
|
||||
CTX.setBottomSheetCreateShiftsOpen(true);
|
||||
CTX.setStartAtTimeShift(time);
|
||||
CTX.setOpenTimePicker(false);
|
||||
}
|
||||
if (CTX.state.TimePickerOrder === "CREATE-SHIFT-END") {
|
||||
CTX.setBottomSheetCreateShiftsOpen(true);
|
||||
CTX.setEndAtTimeShift(time);
|
||||
CTX.setOpenTimePicker(false);
|
||||
}
|
||||
};
|
||||
|
||||
const handleHureSelect = (e) => {
|
||||
setHureSelect(e);
|
||||
setTime([e, secondSelect]);
|
||||
};
|
||||
|
||||
const handleSecondSelect = (e) => {
|
||||
setSecondSelect(e);
|
||||
setTime([hureSelect, e]);
|
||||
};
|
||||
return (
|
||||
<div className="fixed w-full top-0 z-[120]">
|
||||
<div className="bg-BigPlus h-screen content-center ">
|
||||
<div className="flex justify-center">
|
||||
<div className="mx-5 ">
|
||||
<h2 className="mb-0 text-white text-lg font-bold py-2 text-center ">
|
||||
ساعت
|
||||
</h2>
|
||||
<div className="bg-gray-800 h-[400px] w-[100px] rounded-full overflow-auto">
|
||||
{hoursArray.map((e) => (
|
||||
<div
|
||||
className={` p-2 text-center tr03 ${
|
||||
hureSelect == e ? "bg-primary-300 " : "bg-transparent"
|
||||
}`}
|
||||
onClick={() => handleHureSelect(e)}
|
||||
>
|
||||
<p className="mb-0 font-bold text-white text">
|
||||
<PersianNumber number={e} size={60} />
|
||||
</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="mx-5 ">
|
||||
<h2 className="mb-0 text-white text-lg font-bold py-2 text-center ">
|
||||
دقیقه{" "}
|
||||
</h2>
|
||||
<div className="bg-gray-800 h-[400px] w-[100px] rounded-full overflow-auto">
|
||||
{secondsArray.map((e) => (
|
||||
<div
|
||||
className={` p-2 text-center tr03 ${
|
||||
secondSelect == e ? "bg-primary-300 " : "bg-transparent"
|
||||
}`}
|
||||
onClick={() => handleSecondSelect(e)}
|
||||
>
|
||||
<p className="mb-0 font-bold text-white text">
|
||||
<PersianNumber number={e} size={60} />
|
||||
</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex justify-center mt-10">
|
||||
<p className="mb-0 flex text-[50px] text-white ">
|
||||
<PersianNumber
|
||||
number={time[0]}
|
||||
style="!text-[70px] font-bold mt-[26px] mx-3"
|
||||
/>
|
||||
:
|
||||
<PersianNumber
|
||||
number={time[1]}
|
||||
style="!text-[70px] font-bold mt-[26px] mx-3"
|
||||
/>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="p-3 fixed bottom-0 w-full">
|
||||
<Buttonbriz
|
||||
title="ثبت زمان"
|
||||
color="INFO"
|
||||
icon="CHECK"
|
||||
buttonEvent={() => handleButtonTimePicker()}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default TimePicker;
|
|
@ -38,6 +38,9 @@ dependencies:
|
|||
react-dom:
|
||||
specifier: 18.2.0
|
||||
version: 18.2.0(react@18.2.0)
|
||||
react-duration-picker:
|
||||
specifier: ^1.1.1
|
||||
version: 1.1.1(react@18.2.0)
|
||||
react-modern-calendar-datepicker:
|
||||
specifier: ^3.1.6
|
||||
version: 3.1.6(react-dom@18.2.0)(react@18.2.0)
|
||||
|
@ -1621,6 +1624,15 @@ packages:
|
|||
scheduler: 0.23.0
|
||||
dev: false
|
||||
|
||||
/react-duration-picker@1.1.1(react@18.2.0):
|
||||
resolution: {integrity: sha512-1yzIjfpoSbRgJm88h8RF5VkTA0wa+sBRMmH9dudxzs7A8BC4LFvQiku51atx//JI5Yb4iwAelB9jjuWyxbkcqg==}
|
||||
peerDependencies:
|
||||
react: '>=16.8.0'
|
||||
dependencies:
|
||||
prop-types: 15.8.1
|
||||
react: 18.2.0
|
||||
dev: false
|
||||
|
||||
/react-is@16.13.1:
|
||||
resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==}
|
||||
dev: false
|
||||
|
|
|
@ -1,16 +1,68 @@
|
|||
"use client";
|
||||
import AppHeader from "@comp/AppHeader/page";
|
||||
import Buttonbriz from "plugins/Buttonbriz/page";
|
||||
import Input from "plugins/Input/page";
|
||||
import React from "react";
|
||||
import React, { useContext, useEffect, useRef, useState } from "react";
|
||||
import person from "@img/person.png";
|
||||
import Image from "next/image";
|
||||
import AppContext from "@ctx/AppContext";
|
||||
import Avatar from "boring-avatars";
|
||||
import { toast } from "react-toastify";
|
||||
import SimpleReactValidator from "simple-react-validator";
|
||||
import DatePickerIran from "plugins/DatePickerIran/page";
|
||||
import moment from "jalali-moment";
|
||||
|
||||
const page = () => {
|
||||
const CTX = useContext(AppContext);
|
||||
const profile = CTX.state.profile;
|
||||
|
||||
const [fistName, setFistName] = useState("");
|
||||
const [lastName, setLastName] = useState("");
|
||||
const [phoneNumber, setPhoneNumber] = useState("");
|
||||
const [nationalId, setNationalId] = useState("");
|
||||
const [birthDateTimeStamp, setBirthDateTimeStamp] = useState("");
|
||||
const [, forceUpdate] = useState();
|
||||
|
||||
const validator = useRef(
|
||||
new SimpleReactValidator({
|
||||
messages: {
|
||||
required: "پر کردن این فیلد الزامی میباشد",
|
||||
},
|
||||
element: (message) => (
|
||||
<>
|
||||
<div className="text-right px-1 ">
|
||||
<small className="text-red-600 t-ig-small ">{message}</small>
|
||||
</div>
|
||||
</>
|
||||
),
|
||||
})
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
// if (profile.birthDateTimeStamp < 0) {
|
||||
// return (date = moment
|
||||
// .unix(profile.birthDateTimeStamp)
|
||||
// .locale("fa")
|
||||
// .format("YYYY/MM/DD")
|
||||
// .split("/"));
|
||||
// }
|
||||
|
||||
console.log(profile.birthDateTimeStamp < 0);
|
||||
setFistName(profile.firstName);
|
||||
setLastName(profile.lastName);
|
||||
setPhoneNumber(profile.phoneNumber);
|
||||
setNationalId(profile.nationalId);
|
||||
|
||||
// setBirthDateTimeStamp(
|
||||
// profile.birthDateTimeStamp < 0 ? ["1376", "09", "14"] : ""
|
||||
// );
|
||||
}, [profile]);
|
||||
|
||||
return (
|
||||
<div className="pb-20">
|
||||
<AppHeader
|
||||
title=" امیرحسین خادمی"
|
||||
sub=" رستوران بی بی گل"
|
||||
title={profile?.firstName + " " + profile?.lastName}
|
||||
sub={profile.selectedComplexName}
|
||||
icon2={true}
|
||||
iconName2="ARROW"
|
||||
iconHref2="/home"
|
||||
|
@ -20,15 +72,29 @@ const page = () => {
|
|||
<div className="w-full flex justify-center ml-2">
|
||||
<div className="bg-white shadow w-[100px] h-[100px] rounded-full overflow-hidden">
|
||||
<div className="">
|
||||
<Image
|
||||
src={person}
|
||||
className="w-[100px] h-[100px] object-cover"
|
||||
<Avatar
|
||||
size={100}
|
||||
name={profile?.firstName}
|
||||
variant="beam"
|
||||
colors={["#9d9f88", "#83af96", "#b2de93"]}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="absolute ml-[76px] mt-[59px]">
|
||||
<div className="bg-white w-[40px] h-[40px] rounded-full pt-2">
|
||||
<div
|
||||
className="bg-white w-[40px] h-[40px] rounded-full pt-2"
|
||||
onClick={() => {
|
||||
toast.warning(
|
||||
` ${profile?.firstName} جان
|
||||
فعلا دکوریه بعدا تلاش کن`,
|
||||
{
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
}
|
||||
);
|
||||
}}
|
||||
>
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
|
@ -52,9 +118,21 @@ const page = () => {
|
|||
<div className="">
|
||||
<Input
|
||||
lable="نام "
|
||||
id="firstName-id"
|
||||
name="firstName"
|
||||
id="fistName-id"
|
||||
name="fistName"
|
||||
type={"text"}
|
||||
value={fistName}
|
||||
inputEvent={(e) => {
|
||||
setFistName(e.target.value);
|
||||
validator.current.showMessageFor("fistName");
|
||||
}}
|
||||
style="text-right"
|
||||
validator={true}
|
||||
validatorData={validator.current.message(
|
||||
"fistName",
|
||||
fistName,
|
||||
"required"
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="">
|
||||
|
@ -63,39 +141,68 @@ const page = () => {
|
|||
id="lastName-id"
|
||||
name="lastName"
|
||||
type={"text"}
|
||||
value={lastName}
|
||||
inputEvent={(e) => {
|
||||
setLastName(e.target.value);
|
||||
validator.current.showMessageFor("lastName");
|
||||
}}
|
||||
style="text-right"
|
||||
validator={true}
|
||||
validatorData={validator.current.message(
|
||||
"lastName",
|
||||
lastName,
|
||||
"required"
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="شماره تلفن همراه "
|
||||
lable="شماره تماس "
|
||||
id="phoneNumber-id"
|
||||
name="phoneNumber"
|
||||
type={"text"}
|
||||
value={phoneNumber}
|
||||
inputEvent={(e) => {
|
||||
setPhoneNumber(e.target.value);
|
||||
validator.current.showMessageFor("phoneNumber");
|
||||
}}
|
||||
style="text-right"
|
||||
validator={true}
|
||||
validatorData={validator.current.message(
|
||||
"phoneNumber",
|
||||
phoneNumber,
|
||||
"required"
|
||||
)}
|
||||
readOnly={true}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input lable="َایمیل " id="email-id" name="email" type={"text"} />
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="کد ملی "
|
||||
id="nationalCode-id"
|
||||
name="nationalCode"
|
||||
id="nationalId-id"
|
||||
name="nationalId"
|
||||
type={"text"}
|
||||
value={nationalId}
|
||||
inputEvent={(e) => {
|
||||
setNationalId(e.target.value);
|
||||
validator.current.showMessageFor("nationalId");
|
||||
}}
|
||||
style="text-right"
|
||||
validator={true}
|
||||
validatorData={validator.current.message(
|
||||
"nationalId",
|
||||
nationalId,
|
||||
"required"
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="تاریخ تولد "
|
||||
id="birthDate-id"
|
||||
name="birthDate"
|
||||
type={"text"}
|
||||
/>
|
||||
</div>
|
||||
<DatePickerIran
|
||||
datePickerEvent={(e) => setBirthDateTimeStamp(e)}
|
||||
date={birthDateTimeStamp}
|
||||
zindex="z-[101]"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Buttonbriz title="ثبت تغییرات" color="INFO" icon="CHECK" />
|
||||
|
|
|
@ -15,6 +15,8 @@ const Home = (props) => {
|
|||
const CTX = useContext(AppContext);
|
||||
const router = useRouter();
|
||||
|
||||
const profile = CTX.state.profile;
|
||||
|
||||
useEffect(() => {
|
||||
if (!!localStorage.token) {
|
||||
const datatoken = ParseJwt(getToken());
|
||||
|
@ -32,8 +34,8 @@ const Home = (props) => {
|
|||
return (
|
||||
<div className="pb-20">
|
||||
<AppHeader
|
||||
title="حسین معصومی"
|
||||
sub="مجموعه بیبی گل"
|
||||
title={profile?.firstName + " " + profile?.lastName}
|
||||
sub={profile.selectedComplexName}
|
||||
icon1={true}
|
||||
iconName1="ACOUNT"
|
||||
iconHref1="/acount"
|
||||
|
@ -47,6 +49,7 @@ const Home = (props) => {
|
|||
return undefined;
|
||||
}}
|
||||
userIcon={true}
|
||||
userIconData={profile.firstName}
|
||||
/>
|
||||
|
||||
<div className="bg-body-100 relative top-[-30px] rounded-t-3xl overflow-hidden p-5 rtl">
|
||||
|
|
|
@ -16,6 +16,7 @@ import { toast, ToastContainer } from "react-toastify";
|
|||
import "react-toastify/dist/ReactToastify.css";
|
||||
import Loading from "plugins/Loading/page";
|
||||
import Chapar, { getToken } from "plugins/Chapar";
|
||||
import TimePicker from "plugins/TimePicker/page";
|
||||
|
||||
const inter = Inter({ subsets: ["latin"] });
|
||||
|
||||
|
@ -66,6 +67,21 @@ export default function RootLayout({ children }) {
|
|||
const [goToEditUser, setGoToEditUser] = useState(false);
|
||||
const [idEditUser, setIdEditUser] = useState(null);
|
||||
|
||||
// shift
|
||||
const [dayOfWeeksChoose, setDayOfWeeksChoose] = useState([]);
|
||||
const [startAtTimeShift, setStartAtTimeShift] = useState(["00", "00"]);
|
||||
const [endAtTimeShift, setEndAtTimeShift] = useState(["00", "00"]);
|
||||
const [shiftsData, setShiftsData] = useState([null]);
|
||||
const [shiftData, setShiftData] = useState([null]);
|
||||
const [goToEditShift, setGoToEditShift] = useState(false);
|
||||
const [idEditShift, setIdEditShift] = useState(null);
|
||||
|
||||
// TimePicker
|
||||
const [openTimePicker, setOpenTimePicker] = useState(false);
|
||||
const [TimePickerOrder, setTimePickerOrder] = useState(null);
|
||||
|
||||
const [profile, setProfile] = useState([]);
|
||||
|
||||
const pathname = usePathname();
|
||||
const router = useRouter();
|
||||
const hiddenUrls = ["/login", "/"];
|
||||
|
@ -78,7 +94,6 @@ export default function RootLayout({ children }) {
|
|||
|
||||
setBigPlusRotateIcon(false);
|
||||
};
|
||||
|
||||
const ConfirmPhoneNumber = async (phoneNumber) => {
|
||||
try {
|
||||
const data = await Chapar.get(
|
||||
|
@ -111,6 +126,7 @@ export default function RootLayout({ children }) {
|
|||
if (data.user.signUpStatus == 1) {
|
||||
setStepLogin(2);
|
||||
} else if (data.user.signUpStatus == 2) {
|
||||
setProfile(data.user);
|
||||
toast.success(` ${data.user.firstName} جان خوش اومدی `, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
|
@ -141,6 +157,8 @@ export default function RootLayout({ children }) {
|
|||
setLoading(false);
|
||||
|
||||
if (data.user.signUpStatus == 2 || data.user.signUpStatus == 3) {
|
||||
setProfile(data.user);
|
||||
|
||||
toast.success(` ${data.user.firstName} جان خوش اومدی `, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
|
@ -438,10 +456,162 @@ export default function RootLayout({ children }) {
|
|||
setLoading(false);
|
||||
}
|
||||
};
|
||||
const CreateShift = async (body) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const data = await Chapar.post(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/shift`,
|
||||
JSON.stringify(body),
|
||||
{
|
||||
headers: {
|
||||
Authorization: getToken(),
|
||||
},
|
||||
}
|
||||
);
|
||||
toast.success(`شیفت ساخته شد`, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
setBottomSheetCreateShiftsOpen(false);
|
||||
setLoading(false);
|
||||
GetShifts();
|
||||
} catch ({ error, status }) {
|
||||
toast.error(`${error.response.data.message}`, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
const UpdateShift = async (body) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const data = await Chapar.put(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/shift`,
|
||||
body,
|
||||
|
||||
// useEffect(() => {
|
||||
// GetPermissions();
|
||||
// }, []);
|
||||
{
|
||||
headers: {
|
||||
Authorization: getToken(),
|
||||
},
|
||||
}
|
||||
);
|
||||
toast.success(`شیفت ویرایش شد`, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
|
||||
setBottomSheetCreateShiftsOpen(false);
|
||||
setLoading(false);
|
||||
GetShifts();
|
||||
} catch ({ error, status }) {
|
||||
toast.error(`${error.response.data.message}`, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
const GetShifts = async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const data = await Chapar.get(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/shift?page=0`,
|
||||
|
||||
{
|
||||
headers: {
|
||||
Authorization: getToken(),
|
||||
},
|
||||
}
|
||||
);
|
||||
console.log("GetShifts", data);
|
||||
|
||||
setShiftsData(data);
|
||||
setLoading(false);
|
||||
} catch ({ error, status }) {
|
||||
toast.error(`${error.response.data.message}`, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
const GetShift = async (id) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const data = await Chapar.get(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/shift/${id}`,
|
||||
|
||||
{
|
||||
headers: {
|
||||
Authorization: getToken(),
|
||||
},
|
||||
}
|
||||
);
|
||||
console.log("GetShift", data);
|
||||
|
||||
setShiftData(data);
|
||||
setLoading(false);
|
||||
} catch ({ error, status }) {
|
||||
toast.error(`${error.response.data.message}`, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
const DeleteShift = async (id) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const data = await Chapar.delete(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/shift/${id}`,
|
||||
|
||||
{
|
||||
headers: {
|
||||
Authorization: getToken(),
|
||||
},
|
||||
}
|
||||
);
|
||||
setBottomSheetCreateShiftsOpen(false);
|
||||
|
||||
setLoading(false);
|
||||
GetShifts();
|
||||
} catch ({ error, status }) {
|
||||
toast.error(`${error.response.data.message}`, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
const CheckUser = async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const data = await Chapar.get(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/user/profile`,
|
||||
|
||||
{
|
||||
headers: {
|
||||
Authorization: getToken(),
|
||||
},
|
||||
}
|
||||
);
|
||||
console.log("CheckUser", data);
|
||||
|
||||
setProfile(data);
|
||||
setLoading(false);
|
||||
} catch ({ error, status }) {
|
||||
toast.error(`${error.response.data.message}`, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (profile.length <= 0 && localStorage.token) CheckUser();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<AppContext.Provider
|
||||
|
@ -469,6 +639,16 @@ export default function RootLayout({ children }) {
|
|||
idEditUser,
|
||||
goToEditUser,
|
||||
userData,
|
||||
dayOfWeeksChoose,
|
||||
openTimePicker,
|
||||
endAtTimeShift,
|
||||
startAtTimeShift,
|
||||
TimePickerOrder,
|
||||
shiftsData,
|
||||
idEditShift,
|
||||
goToEditShift,
|
||||
shiftData,
|
||||
profile,
|
||||
},
|
||||
setBottomSheetCreateRoleOpen,
|
||||
setBottomSheetCreateEmployeesOpen,
|
||||
|
@ -506,6 +686,22 @@ export default function RootLayout({ children }) {
|
|||
DeleteUser,
|
||||
GetUser,
|
||||
UpdateUser,
|
||||
setDayOfWeeksChoose,
|
||||
setOpenTimePicker,
|
||||
setEndAtTimeShift,
|
||||
setStartAtTimeShift,
|
||||
setTimePickerOrder,
|
||||
setShiftsData,
|
||||
CreateShift,
|
||||
GetShifts,
|
||||
setIdEditShift,
|
||||
setGoToEditShift,
|
||||
setShiftData,
|
||||
GetShift,
|
||||
UpdateShift,
|
||||
DeleteShift,
|
||||
setProfile,
|
||||
CheckUser,
|
||||
}}
|
||||
>
|
||||
<html lang="en">
|
||||
|
@ -514,8 +710,10 @@ export default function RootLayout({ children }) {
|
|||
{shouldRenderComponent && <NavBAr />}
|
||||
<ToastContainer position="bottom-right" closeOnClick={true} rtl />
|
||||
<Loading />
|
||||
|
||||
{openTimePicker && <TimePicker />}
|
||||
{BigPlusOpen ? (
|
||||
<div className="fixed w-full top-0 z-40">
|
||||
<div className="fixed w-full top-0 z-[120]">
|
||||
<motion.div
|
||||
animate={{ opacity: [0, 0.5, 1] }}
|
||||
transition={{ duration: 0.3 }}
|
||||
|
|
|
@ -1,14 +1,19 @@
|
|||
"use client";
|
||||
|
||||
import AppHeader from "@comp/AppHeader/page";
|
||||
import ShiftCard from "@comp/ShiftComponent/ShiftCard/page";
|
||||
import AppContext from "@ctx/AppContext";
|
||||
import BottomSheetCreateShifts from "plugins/BottomSheet/BottomSheetCreateShifts";
|
||||
import PersianNumber from "plugins/PersianNumber";
|
||||
import React, { useContext } from "react";
|
||||
import React, { useContext, useEffect } from "react";
|
||||
|
||||
const Shifts = (props) => {
|
||||
const CTX = useContext(AppContext);
|
||||
|
||||
useEffect(() => {
|
||||
CTX.GetShifts();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="pb-20">
|
||||
|
@ -48,202 +53,8 @@ const Shifts = (props) => {
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="bg-white rounded-xl mt-5">
|
||||
<div className=" bg-white rounded-t-xl rounded-b-3xl border shadow p-2 flex justify-between w-full h-fit pr-5 mt-2 ">
|
||||
<div>
|
||||
<h4 className="text-xl font-bold text-primary-300 mt-1">
|
||||
شیفت صبح{" "}
|
||||
</h4>
|
||||
</div>
|
||||
<div className="flex mt-1">
|
||||
<div className="mx-2 ">
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 18 18"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mt-1"
|
||||
>
|
||||
<g clip-path="url(#clip0_72_940)">
|
||||
<path
|
||||
d="M11.4653 2.364L10.77 3.05925L4.37926 9.44925C3.94651 9.88275 3.72976 10.0995 3.54376 10.338C3.32409 10.6195 3.13573 10.924 2.98201 11.2463C2.85226 11.5193 2.75551 11.8103 2.56201 12.3908L1.74151 14.8515L1.54051 15.453C1.4935 15.5932 1.48652 15.7438 1.52037 15.8877C1.55422 16.0317 1.62755 16.1633 1.73212 16.2679C1.83669 16.3725 1.96835 16.4458 2.1123 16.4796C2.25626 16.5135 2.4068 16.5065 2.54701 16.4595L3.14851 16.2585L5.60926 15.438C6.19051 15.2445 6.48076 15.1478 6.75376 15.018C7.07626 14.8643 7.38076 14.676 7.66201 14.4563C7.90051 14.2703 8.11726 14.0535 8.55001 13.6208L14.9408 7.23L15.636 6.53475C16.1891 5.98168 16.4998 5.23155 16.4998 4.44938C16.4998 3.66721 16.1891 2.91708 15.636 2.364C15.0829 1.81093 14.3328 1.50021 13.5506 1.50021C12.7685 1.50021 12.0183 1.81093 11.4653 2.364Z"
|
||||
stroke="#2B91EF"
|
||||
stroke-width="1.5"
|
||||
/>
|
||||
<path
|
||||
opacity="0.5"
|
||||
d="M10.77 3.0585C10.77 3.0585 10.857 4.536 12.1605 5.8395C13.464 7.143 14.9408 7.22925 14.9408 7.22925M3.14852 16.2585L1.74152 14.85"
|
||||
stroke="#2B91EF"
|
||||
stroke-width="1.5"
|
||||
/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_72_940">
|
||||
<rect width="18" height="18" fill="white" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
</div>
|
||||
<div>
|
||||
<svg
|
||||
width="33"
|
||||
height="33"
|
||||
viewBox="0 0 27 27"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M14.9783 13.3875L18.9551 9.40951C19.0626 9.30573 19.1483 9.18159 19.2072 9.04434C19.2662 8.90709 19.2972 8.75946 19.2985 8.61009C19.2998 8.46071 19.2714 8.31257 19.2148 8.17431C19.1582 8.03605 19.0747 7.91045 18.9691 7.80482C18.8635 7.69919 18.7378 7.61565 18.5996 7.55909C18.4613 7.50252 18.3132 7.47406 18.1638 7.47535C18.0144 7.47665 17.8668 7.50769 17.7296 7.56665C17.5923 7.62561 17.4682 7.71131 17.3644 7.81876L13.3864 11.7956L9.40951 7.81876C9.30573 7.71131 9.18159 7.62561 9.04434 7.56665C8.90709 7.50769 8.75946 7.47665 8.61009 7.47535C8.46071 7.47406 8.31257 7.50252 8.17431 7.55909C8.03605 7.61565 7.91045 7.69919 7.80482 7.80482C7.69919 7.91045 7.61565 8.03605 7.55909 8.17431C7.50252 8.31257 7.47406 8.46071 7.47535 8.61009C7.47665 8.75946 7.50769 8.90709 7.56665 9.04434C7.62561 9.18159 7.71131 9.30573 7.81876 9.40951L11.7956 13.3864L7.81876 17.3644C7.71131 17.4682 7.62561 17.5923 7.56665 17.7296C7.50769 17.8668 7.47665 18.0144 7.47535 18.1638C7.47406 18.3132 7.50252 18.4613 7.55909 18.5996C7.61565 18.7378 7.69919 18.8635 7.80482 18.9691C7.91045 19.0747 8.03605 19.1582 8.17431 19.2148C8.31257 19.2714 8.46071 19.2998 8.61009 19.2985C8.75946 19.2972 8.90709 19.2662 9.04434 19.2072C9.18159 19.1483 9.30573 19.0626 9.40951 18.9551L13.3864 14.9783L17.3644 18.9551C17.4682 19.0626 17.5923 19.1483 17.7296 19.2072C17.8668 19.2662 18.0144 19.2972 18.1638 19.2985C18.3132 19.2998 18.4613 19.2714 18.5996 19.2148C18.7378 19.1582 18.8635 19.0747 18.9691 18.9691C19.0747 18.8635 19.1582 18.7378 19.2148 18.5996C19.2714 18.4613 19.2998 18.3132 19.2985 18.1638C19.2972 18.0144 19.2662 17.8668 19.2072 17.7296C19.1483 17.5923 19.0626 17.4682 18.9551 17.3644L14.9783 13.3875Z"
|
||||
fill="#FF2C2C"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="py-2 px-3">
|
||||
<div className="flex">
|
||||
<p className="mb-0 border-l-[1px] border-gray-500 pl-2 text-gray-500 ">
|
||||
ساعت شروع :
|
||||
<strong className="font-bold mx-1">
|
||||
<PersianNumber number={8} />
|
||||
</strong>
|
||||
صبح
|
||||
</p>
|
||||
|
||||
<p className="mb-0 pr-2 text-gray-500">
|
||||
ساعت شروع :
|
||||
<strong className="font-bold mx-1">
|
||||
<PersianNumber number={5} />
|
||||
</strong>
|
||||
ظهر
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-wrap p-3">
|
||||
<div className="bg-secondaryLighter-100 rounded-full py-1 px-4 mx-1 mt-2">
|
||||
<p className="mb-0 text-[11px] white text-secondary-200 font-bold ">
|
||||
{" "}
|
||||
21 نفر در این شیفت قرار دارند
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="bg-secondaryLighter-100 rounded-full py-1 px-4 mx-1 mt-2">
|
||||
<p className="mb-0 text-[11px] white text-secondary-200 font-bold ">
|
||||
{" "}
|
||||
40 تسک فهال{" "}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="bg-secondaryLighter-100 rounded-full py-1 px-4 mx-1 mt-2">
|
||||
<p className="mb-0 text-[11px] white text-secondary-200 font-bold ">
|
||||
{" "}
|
||||
21 نفر در این شیفت قرار دارند
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="bg-white rounded-xl mt-5">
|
||||
<div className=" bg-white rounded-t-xl rounded-b-3xl border shadow p-2 flex justify-between w-full h-fit pr-5 mt-2 ">
|
||||
<div>
|
||||
<h4 className="text-xl font-bold text-primary-300 mt-1">
|
||||
شیفت عصر شنبه{" "}
|
||||
</h4>
|
||||
</div>
|
||||
<div className="flex mt-1">
|
||||
<div className="mx-2 ">
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 18 18"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mt-1"
|
||||
>
|
||||
<g clip-path="url(#clip0_72_940)">
|
||||
<path
|
||||
d="M11.4653 2.364L10.77 3.05925L4.37926 9.44925C3.94651 9.88275 3.72976 10.0995 3.54376 10.338C3.32409 10.6195 3.13573 10.924 2.98201 11.2463C2.85226 11.5193 2.75551 11.8103 2.56201 12.3908L1.74151 14.8515L1.54051 15.453C1.4935 15.5932 1.48652 15.7438 1.52037 15.8877C1.55422 16.0317 1.62755 16.1633 1.73212 16.2679C1.83669 16.3725 1.96835 16.4458 2.1123 16.4796C2.25626 16.5135 2.4068 16.5065 2.54701 16.4595L3.14851 16.2585L5.60926 15.438C6.19051 15.2445 6.48076 15.1478 6.75376 15.018C7.07626 14.8643 7.38076 14.676 7.66201 14.4563C7.90051 14.2703 8.11726 14.0535 8.55001 13.6208L14.9408 7.23L15.636 6.53475C16.1891 5.98168 16.4998 5.23155 16.4998 4.44938C16.4998 3.66721 16.1891 2.91708 15.636 2.364C15.0829 1.81093 14.3328 1.50021 13.5506 1.50021C12.7685 1.50021 12.0183 1.81093 11.4653 2.364Z"
|
||||
stroke="#2B91EF"
|
||||
stroke-width="1.5"
|
||||
/>
|
||||
<path
|
||||
opacity="0.5"
|
||||
d="M10.77 3.0585C10.77 3.0585 10.857 4.536 12.1605 5.8395C13.464 7.143 14.9408 7.22925 14.9408 7.22925M3.14852 16.2585L1.74152 14.85"
|
||||
stroke="#2B91EF"
|
||||
stroke-width="1.5"
|
||||
/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_72_940">
|
||||
<rect width="18" height="18" fill="white" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
</div>
|
||||
<div>
|
||||
<svg
|
||||
width="33"
|
||||
height="33"
|
||||
viewBox="0 0 27 27"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M14.9783 13.3875L18.9551 9.40951C19.0626 9.30573 19.1483 9.18159 19.2072 9.04434C19.2662 8.90709 19.2972 8.75946 19.2985 8.61009C19.2998 8.46071 19.2714 8.31257 19.2148 8.17431C19.1582 8.03605 19.0747 7.91045 18.9691 7.80482C18.8635 7.69919 18.7378 7.61565 18.5996 7.55909C18.4613 7.50252 18.3132 7.47406 18.1638 7.47535C18.0144 7.47665 17.8668 7.50769 17.7296 7.56665C17.5923 7.62561 17.4682 7.71131 17.3644 7.81876L13.3864 11.7956L9.40951 7.81876C9.30573 7.71131 9.18159 7.62561 9.04434 7.56665C8.90709 7.50769 8.75946 7.47665 8.61009 7.47535C8.46071 7.47406 8.31257 7.50252 8.17431 7.55909C8.03605 7.61565 7.91045 7.69919 7.80482 7.80482C7.69919 7.91045 7.61565 8.03605 7.55909 8.17431C7.50252 8.31257 7.47406 8.46071 7.47535 8.61009C7.47665 8.75946 7.50769 8.90709 7.56665 9.04434C7.62561 9.18159 7.71131 9.30573 7.81876 9.40951L11.7956 13.3864L7.81876 17.3644C7.71131 17.4682 7.62561 17.5923 7.56665 17.7296C7.50769 17.8668 7.47665 18.0144 7.47535 18.1638C7.47406 18.3132 7.50252 18.4613 7.55909 18.5996C7.61565 18.7378 7.69919 18.8635 7.80482 18.9691C7.91045 19.0747 8.03605 19.1582 8.17431 19.2148C8.31257 19.2714 8.46071 19.2998 8.61009 19.2985C8.75946 19.2972 8.90709 19.2662 9.04434 19.2072C9.18159 19.1483 9.30573 19.0626 9.40951 18.9551L13.3864 14.9783L17.3644 18.9551C17.4682 19.0626 17.5923 19.1483 17.7296 19.2072C17.8668 19.2662 18.0144 19.2972 18.1638 19.2985C18.3132 19.2998 18.4613 19.2714 18.5996 19.2148C18.7378 19.1582 18.8635 19.0747 18.9691 18.9691C19.0747 18.8635 19.1582 18.7378 19.2148 18.5996C19.2714 18.4613 19.2998 18.3132 19.2985 18.1638C19.2972 18.0144 19.2662 17.8668 19.2072 17.7296C19.1483 17.5923 19.0626 17.4682 18.9551 17.3644L14.9783 13.3875Z"
|
||||
fill="#FF2C2C"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="py-2 px-3">
|
||||
<div className="flex">
|
||||
<p className="mb-0 border-l-[1px] border-gray-500 pl-2 text-gray-500 ">
|
||||
ساعت شروع :
|
||||
<strong className="font-bold mx-1">
|
||||
<PersianNumber number={8} />
|
||||
</strong>
|
||||
صبح
|
||||
</p>
|
||||
|
||||
<p className="mb-0 pr-2 text-gray-500">
|
||||
ساعت شروع :
|
||||
<strong className="font-bold mx-1">
|
||||
<PersianNumber number={5} />
|
||||
</strong>
|
||||
ظهر
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-wrap p-3">
|
||||
<div className="bg-secondaryLighter-100 rounded-full py-1 px-4 mx-1 mt-2">
|
||||
<p className="mb-0 text-[11px] white text-secondary-200 font-bold ">
|
||||
{" "}
|
||||
21 نفر در این شیفت قرار دارند
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="bg-secondaryLighter-100 rounded-full py-1 px-4 mx-1 mt-2">
|
||||
<p className="mb-0 text-[11px] white text-secondary-200 font-bold ">
|
||||
{" "}
|
||||
40 تسک فهال{" "}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="bg-secondaryLighter-100 rounded-full py-1 px-4 mx-1 mt-2">
|
||||
<p className="mb-0 text-[11px] white text-secondary-200 font-bold ">
|
||||
{" "}
|
||||
21 نفر در این شیفت قرار دارند
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ShiftCard />
|
||||
</div>
|
||||
</div>
|
||||
<BottomSheetCreateShifts />
|
||||
|
|
|
@ -113,7 +113,7 @@ body {
|
|||
}
|
||||
|
||||
[data-rsbs-backdrop] {
|
||||
z-index: 20 !important;
|
||||
z-index: 100000 !important;
|
||||
background-color: rgba(0, 0, 0, 0.8) !important;
|
||||
}
|
||||
[data-rsbs-overlay] {
|
||||
|
@ -165,7 +165,7 @@ body {
|
|||
.delete {
|
||||
--border-size: 3px;
|
||||
--border-angle: 0turn;
|
||||
width: 140px;
|
||||
width: 180px;
|
||||
height: fit-content;
|
||||
padding: 17px;
|
||||
margin-right: 10px;
|
||||
|
|
Loading…
Reference in New Issue