redisinsight front ui / add adjust coffee

main
حسین معصومی پور 2024-06-12 18:44:06 +03:30
parent f588d7e75c
commit d00c061772
60 changed files with 5232 additions and 1023 deletions

16
.env
View File

@ -1,9 +1,9 @@
NODE_ENV="development"
# NEXT_PUBLIC_SERVER_URL=http://192.168.1.12:32767
# NEXT_PUBLIC_PUBLIC_URL=http://192.168.1.12:32767
# NEXT_PUBLIC_API_URL=http://192.168.1.12:32767/api
# NEXT_PUBLIC_VERSION=1.0.1.2
NEXT_PUBLIC_SERVER_URL=http://192.168.1.100:32767
NEXT_PUBLIC_PUBLIC_URL=http://192.168.1.100:32767
NEXT_PUBLIC_API_URL=http://192.168.1.100:32767/api
NEXT_PUBLIC_VERSION=1.0.1.2
# SECURE_LOCAL_STORAGE_HASH_KEY=f1da2b2c7a4c446934267fea631102ec389b5b99
# NEXT_PUBLIC_API_URL_IMAGE=https://192.168.88.12:49154/Files/ReportImages
# NEXT_PUBLIC_API_URL_BackUp=https://192.168.88.12:49154/Files/BackUps
@ -14,9 +14,9 @@ NODE_ENV="development"
NEXT_PUBLIC_SERVER_URL=https://api.brizco.io
NEXT_PUBLIC_PUBLIC_URL=https://api.brizco.io
NEXT_PUBLIC_API_URL=https://api.brizco.io/api
NEXT_PUBLIC_VERSION=1.0.1.2
# NEXT_PUBLIC_SERVER_URL=https://api.brizco.io
# NEXT_PUBLIC_PUBLIC_URL=https://api.brizco.io
# NEXT_PUBLIC_API_URL=https://api.brizco.io/api
# NEXT_PUBLIC_VERSION=1.0.1.2
# NEXT_PUBLIC_API_URL_IMAGE=https://api.macsonline.ir/Files/ReportImages
# NEXT_PUBLIC_API_URL_BackUp=https://api.macsonline.ir/Files/BackUps

View File

@ -14,5 +14,5 @@ CMD ["/app/node_modules/.bin/next", "start"]
# docker build -f Dockerfile.x -t registry.vnfco.ir/netinashop/vesmeh:0.32.31 .
# docker push registry.vnfco.ir/brizco/web:1.0.0.1 .
# docker build -f Dockerfile.emergency -t registry.vnfco.ir/brizco/web:1.0.1.2 .
# docker push registry.vnfco.ir/brizco/web:1.0.1.2

View File

@ -125,7 +125,7 @@ const AppHeader = ({
// ;
return (
<div className=" bg-primary-300 flex justify-between rtl pt-4 px-4 pb-[50px] w-full">
<div className="bg-white flex justify-between rtl pt-4 px-4 w-full">
<Link href={"/acount"}>
<div className="flex">
{userIcon && (
@ -141,8 +141,8 @@ const AppHeader = ({
</div>
)}
<div className="mr-2 mt-1">
<h2 className="mb-0 text-white font-bold text-base">{title}</h2>
<p className="mb-0 text-white text-sm">{sub}</p>
<h2 className="mb-0 text-black font-bold text-base">{title}</h2>
<p className="mb-0 text-black text-sm">{sub}</p>
</div>
</div>
</Link>
@ -190,7 +190,7 @@ const AppHeader = ({
</div>
) : (
<div
className="w-fit h-fit bg-white rounded-full mx-1 mt-2 "
className="w-fit h-fit bg-gray-100 rounded-full mx-1 mt-2 "
onClick={iconEvent3}
>
<p className="mb-0 p-2 px-4">{iconName3}</p>

View File

@ -0,0 +1,59 @@
import React from "react";
import Image from "next/image";
import adjust from "@img/adjust.png";
import PersianNumber from "../../../plugins/PersianNumber";
import FormatJalaliDate from "plugins/FormatJalaliDate/page";
import moment from "jalali-moment";
const CoffeeBrewCard = ({ data }) => {
console.log("data", data);
const today = new Date();
console.log(today, data?.logAt);
const formattedDate = FormatJalaliDate(data?.logAt, true);
return (
<div className="bg-gray-50 rounded-lg p-4 mt-3 ">
<div className="flex justify-between">
<div>
<div className="flex">
<p className="mb-0 text-[13px] font-medium w-fit px-2 mt-1 border-l border-gray-400 ">
<small className="!text-[12px] text-gray-400">
<PersianNumber number={formattedDate} style={"!text-[12px]"} />
</small>
</p>
<p className="mb-0 text-[13px] font-medium text-gray-400 w-fit px-2 mt-1 border-l border-gray-400 ">
<PersianNumber
number={moment(data?.logAt).locale("fa").format("HH:mm")}
style={"!text-[12px]"}
/>
</p>
<p className="mb-0 text-[13px] font-medium w-fit px-2 mt-1 ">
<small className="!text-[12px] text-gray-400">
{data.logBy}{" "}
</small>
</p>
</div>
</div>
</div>
<div className=" mt-2 ltr relative">
<div className="absolute top-[-15px]">
<Image src={adjust} className="opacity-50 w-[35px]" />
</div>
<div className=" w-full relative mr-5">
<p className="mb-0 text-gray-500 text-left pl-[55px] ">
BCG : {data.ratio} | OEG : {data.extractionTime} | ET :{" "}
{data.finalYield}
</p>
</div>
</div>
</div>
);
};
export default CoffeeBrewCard;

View File

@ -2,6 +2,7 @@
import AppContext from "@ctx/AppContext";
import HasPermission from "plugins/HasPermission/page";
import NothingFound from "plugins/NothingFound/page";
import React, { useContext } from "react";
const PositionEmployees = () => {
@ -20,7 +21,7 @@ const PositionEmployees = () => {
{positionsData && positionsData.length > 0 ? (
<div className="flex flex-wrap">
{positionsData.map((e) => (
<div className="bg-white shadow-sm rounded-full p-1 ml-2 w-fit flex mt-4">
<div className="bg-white shadow-sm rounded-full p-1 ml-2 w-fit flex m-2">
<div className="mx-3">
<p className="mb-0 mt-[6px] text-[12px] font-medium">
{e.name}
@ -30,7 +31,7 @@ const PositionEmployees = () => {
{HasPermission("ManagePositions", permissions) && (
<>
<div
className="w-[30px] h-[30px] bg-secondaryLighter-100 rounded-full"
className="w-[30px] h-[30px] bg-secondary-950 rounded-full"
onClick={() => goToEditPosition(e.id)}
>
<svg
@ -44,23 +45,23 @@ const PositionEmployees = () => {
<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="black"
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="white"
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"
d="M10.77white 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="white"
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="white"
stroke-width="1.5"
/>
</g>
@ -78,11 +79,7 @@ const PositionEmployees = () => {
))}
</div>
) : (
<div className="flex justify-center py-5">
<div className="bg-white shadow mt-5 w-fit rounded-full p-4">
چیزی یافت نشد
</div>
</div>
<NothingFound />
)}
</>
);

View File

@ -1,6 +1,7 @@
"use client";
import AppContext from "@ctx/AppContext";
import NothingFound from "plugins/NothingFound/page";
import React, { useContext } from "react";
const RolesEmployees = () => {
@ -71,11 +72,7 @@ const RolesEmployees = () => {
))}
</div>
) : (
<div className="flex justify-center py-5">
<div className="bg-white shadow mt-5 w-fit rounded-full p-4">
چیزی یافت نشد
</div>
</div>
<NothingFound />
)}
</>
);

View File

@ -2,6 +2,7 @@
import AppContext from "@ctx/AppContext";
import HasPermission from "plugins/HasPermission/page";
import NothingFound from "plugins/NothingFound/page";
import React, { useContext } from "react";
const SectionEmployees = () => {
@ -20,17 +21,17 @@ const SectionEmployees = () => {
{sectionsData && sectionsData.length > 0 ? (
<div className="flex flex-wrap">
{sectionsData.map((e) => (
<div className="bg-white shadow-sm rounded-full p-1 ml-2 w-fit flex mt-4">
<div className="bg-white shadow-sm rounded-full p-1 ml-2 w-fit flex m-2">
{" "}
<div className="mx-3">
<p className="mb-0 mt-[6px] text-[12px] font-medium">
{e.name}
</p>
</div>
{HasPermission("ManageSections", permissions) && (
<>
<div
className="w-[30px] h-[30px] bg-secondaryLighter-100 rounded-full"
className="w-[30px] h-[30px] bg-secondary-950 rounded-full"
onClick={() => goToEditSection(e.id)}
>
<svg
@ -44,23 +45,23 @@ const SectionEmployees = () => {
<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="black"
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="white"
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"
d="M10.77white 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="white"
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="white"
stroke-width="1.5"
/>
</g>
@ -78,11 +79,7 @@ const SectionEmployees = () => {
))}
</div>
) : (
<div className="flex justify-center py-5">
<div className="bg-white shadow mt-5 w-fit rounded-full p-4">
چیزی یافت نشد
</div>
</div>
<NothingFound />
)}
</>
);

View File

@ -3,6 +3,7 @@
import AppContext from "@ctx/AppContext";
import { DaysOfWeek } from "plugins/DaysOfWeek/page";
import HasPermission from "plugins/HasPermission/page";
import NothingFound from "plugins/NothingFound/page";
import PersianNumber from "plugins/PersianNumber";
import { getTimeOfDay } from "plugins/TimeOfDay/page";
import React, { useContext } from "react";
@ -25,18 +26,61 @@ const ShiftsEmployees = () => {
{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">
<div className=" m-2">
<div className=" bg-white shadow-sm rounded-3xl p-2 flex justify-between w-full h-fit pr-5 ">
<div className="flex">
<h4 className="text-sm font-bold text-secondary-950 mt-1">
{e?.title}{" "}
</h4>
<div className="w-[2px] h-5 mx-2 bg-primary-200 opacity-75 mt-1 "></div>
<div className="flex mt-1">
<p className="mb-0 text-sm text-secondary-600 ">
<PersianNumber
number={
e?.startAt?.split(":")[0] +
":" +
e?.startAt?.split(":")[1]
}
/>
</p>
<div>
<svg
width="11"
height="11"
viewBox="0 0 136 90"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="mt-[6px] mx-2 opacity-50"
>
<path
d="M0.970444 44.6958C0.96311 43.7695 1.14087 42.851 1.49329 41.9942C1.8457 41.1375 2.3657 40.3598 3.02273 39.7067L40.5062 1.98295C41.8387 0.733253 43.6044 0.0495736 45.4311 0.075965C47.2578 0.102356 49.003 0.83676 50.2989 2.12443C51.5948 3.4121 52.3404 5.15255 52.3784 6.97904C52.4165 8.80553 51.7441 10.5755 50.503 11.9161L17.9861 44.6414L50.7114 77.1583C51.9611 78.4909 52.6448 80.2566 52.6184 82.0833C52.592 83.91 51.8576 85.6551 50.5699 86.9511C49.2823 88.247 47.5418 88.9925 45.7153 89.0306C43.8889 89.0687 42.1189 88.3963 40.7783 87.1551L3.05457 49.6717C2.39338 49.0228 1.86842 48.2484 1.51054 47.394C1.15266 46.5395 0.96903 45.6222 0.970444 44.6958Z"
fill="#080808"
/>
<path
d="M18.4664 44.6391C18.4848 42.7766 19.2297 40.9949 20.5425 39.6737C21.8553 38.3525 23.6322 37.5962 25.4945 37.5659L128.904 37.2354C130.774 37.2294 132.57 37.9666 133.897 39.2846C135.223 40.6026 135.972 42.3936 135.978 44.2636C135.984 46.1335 135.246 47.9293 133.928 49.2557C132.61 50.5822 130.819 51.3308 128.949 51.3368L25.5396 51.6672C23.6771 51.6488 21.8954 50.9038 20.5742 49.591C19.253 48.2782 18.4967 46.5014 18.4664 44.6391Z"
fill="#080808"
/>
</svg>
</div>
<p className="mb-0 text-gray-500 text-sm">
<PersianNumber
number={
e?.endAt?.split(":")[0] +
":" +
e?.endAt?.split(":")[1]
}
/>
</p>
</div>
</div>
{HasPermission("ManageShifts", permissions) && (
<>
<div
className="w-[35px] h-[35px] bg-secondaryLighter-100 rounded-full pt-[3px]"
className="w-[30px] h-[30px] bg-secondary-950 rounded-full"
onClick={() => goToEditUser(e.id)}
>
<svg
@ -50,23 +94,23 @@ const ShiftsEmployees = () => {
<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="black"
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="white"
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"
d="M10.77white 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="white"
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="white"
stroke-width="1.5"
/>
</g>
@ -81,61 +125,12 @@ const ShiftsEmployees = () => {
</>
)}
</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>
<NothingFound />
)}
</>
);

View File

@ -5,6 +5,7 @@ import React, { useContext } from "react";
import Avatar from "boring-avatars";
import PersianNumber from "plugins/PersianNumber";
import HasPermission from "plugins/HasPermission/page";
import NothingFound from "plugins/NothingFound/page";
const UsersEmployees = () => {
const CTX = useContext(AppContext);
@ -22,22 +23,24 @@ const UsersEmployees = () => {
{usersData.length > 0 ? (
<>
{usersData.map((e) => (
<div className="mt-5">
<div className="flex mt-5 ">
<div className=" rounded-full sahdow-sm z-10 ">
<div className="m-2 bg-white shadow-sm rounded-full p-2 ">
<div className="flex ">
<div className=" rounded-full sahdow-sm ">
<Avatar
size={70}
size={30}
name={e.firstName}
variant="beam"
colors={["#9d9f88", "#83af96", "#b2de93"]}
/>
</div>
<div className="bg-white rounded-l-full p-2 flex justify-between w-full h-fit pr-5 mt-2 relative left-[12px]">
<div>
<h4 className="text-sm font-bold text-primary-300">
<div className=" flex justify-between w-full mr-2 ">
<div className="flex mt-1">
<h4 className="text-sm font-bold text-secondary-950">
{e.firstName} {e.lastName}
</h4>
<p className="mb-0 text-[11px]">
<div className="w-[2px] h-5 mx-2 bg-primary-200 opacity-75 "></div>
<p className="mb-0 text-sm text-secondary-600 ">
{e.roleNames.length > 0
? e.roleNames.length <= 1
? e.roleNames[0]
@ -49,7 +52,7 @@ const UsersEmployees = () => {
{HasPermission("ManageUsers", permissions) && (
<>
<div
className="w-[35px] h-[35px] bg-secondaryLighter-100 rounded-full pt-[3px]"
className="w-[30px] h-[30px] bg-secondary-950 rounded-full"
onClick={() => goToEditUser(e.userId)}
>
<svg
@ -63,23 +66,23 @@ const UsersEmployees = () => {
<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="black"
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="white"
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"
d="M10.77white 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="white"
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="white"
stroke-width="1.5"
/>
</g>
@ -100,11 +103,7 @@ const UsersEmployees = () => {
))}
</>
) : (
<div className="flex justify-center py-5">
<div className="bg-white shadow mt-5 w-fit rounded-full p-4">
چیزی یافت نشد
</div>
</div>
<NothingFound />
)}
</>
);

View File

@ -2,6 +2,7 @@
import AppContext from "@ctx/AppContext";
import HasPermission from "plugins/HasPermission/page";
import NothingFound from "plugins/NothingFound/page";
import React, { useContext } from "react";
const RoutineEmployees = () => {
@ -18,9 +19,9 @@ const RoutineEmployees = () => {
return (
<>
{routinesData && routinesData.length > 0 ? (
<div className="flex flex-wrap">
<div className="flex flex-wrap ">
{routinesData.map((e) => (
<div className="bg-white shadow-sm rounded-full p-1 ml-2 w-fit flex mt-4">
<div className="bg-white shadow-sm rounded-full p-1 ml-2 w-fit flex m-2">
<div className="mx-3">
<p className="mb-0 mt-[6px] text-[12px] font-medium">
{e.name}
@ -29,7 +30,7 @@ const RoutineEmployees = () => {
{HasPermission("ManageRoutines", permissions) && (
<>
<div
className="w-[30px] h-[30px] bg-secondaryLighter-100 rounded-full"
className="w-[30px] h-[30px] bg-secondary-950 rounded-full"
onClick={() => goToEditRoutine(e.id)}
>
<svg
@ -43,23 +44,23 @@ const RoutineEmployees = () => {
<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="black"
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="white"
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"
d="M10.77white 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="white"
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="white"
stroke-width="1.5"
/>
</g>
@ -77,11 +78,7 @@ const RoutineEmployees = () => {
))}
</div>
) : (
<div className="flex justify-center py-5">
<div className="bg-white shadow mt-5 w-fit rounded-full p-4">
چیزی یافت نشد
</div>
</div>
<NothingFound />
)}
</>
);

View File

@ -33,20 +33,21 @@ const LoginStep = (props) => {
};
return (
<div className="px-5 mt-6">
<p className="mb-0 text-textMain-100 mt-1 text-right text-sm">
<div className="px-5 mt-20">
{/* <p className="mb-0 text-textMain-100 mt-1 text-right text-sm">
{" "}
برای ورود یا ثبت نام به اپلیکیشن مدیریت وظایف رستوران باید شماره تلفن
همراه خود را وارد کنید
</p>
برای ورود یا ثبت نام باید شماره تلفن همراه خود را وارد کنید
</p> */}
<div className="mt-3">
<Input
lable="شماره تلفن خود را وارد کنید"
lable=".شماره تلفن خود را وارد کنید"
theme={1}
id="phoneNumber-id"
name="phoneNumber"
type={"number"}
inputEvent={(e) => CTX.setPhoneNumber(e.target.value)}
mt={5}
/>
</div>
@ -67,14 +68,14 @@ const LoginStep = (props) => {
type="checkbox"
checked={roleCheckBox ? true : false}
defaultValue={roleCheckBox}
className="w-[40px] h-[40px] !rounded-xl mx-2 custom-checkbox mt-1"
className="w-[35px] h-[10px] !rounded-xl mx-2 custom-checkbox mt-1 "
name="hasSchengenRelative"
onClick={(e) => setRoleCheckBox(e.target.checked)}
/>
</div>
<p className={`mb-0 text-textMain-100 mt-1 text-right text-sm `}>
با تایید شماره تلفن همراه با همه شرایط حریم خصوص اپلیکیشن مدیریت توک
موافقت می کنم
با تایید شماره تلفن با همه شرایط حریم خصوص اپلیکیشن بریز موافقت می کنم
.
</p>
</div>
</div>

View File

@ -82,6 +82,8 @@ const SignUp = (props) => {
<div className="mt-8">
<Input
lable="نام"
mt={5}
theme={1}
id="firstName-id"
name="firstName"
type={"text"}
@ -102,6 +104,8 @@ const SignUp = (props) => {
<div className="mt-8">
<Input
lable="نام خانوادگی"
mt={5}
theme={1}
id="lastName-id"
name="lastName"
type={"text"}
@ -123,6 +127,8 @@ const SignUp = (props) => {
<div className="mt-8">
<Input
lable="نام مجموعه"
mt={5}
theme={1}
id="complexName-id"
name="complexName"
type={"text"}
@ -143,6 +149,8 @@ const SignUp = (props) => {
<div className="mt-3">
<Input
lable="شماره تماس مدیریت مجموعه"
mt={5}
theme={1}
id="supportPhoneNumber-id"
name="supportPhoneNumber"
type={"number"}
@ -155,6 +163,8 @@ const SignUp = (props) => {
<div className="mt-3">
<Input
lable="ادرس مجموعه "
mt={5}
theme={1}
id="complexAddress-id"
name="complexAddress"
type={"text"}

View File

@ -26,7 +26,7 @@ const VerifyCodeStep = () => {
<div className="px-5 mt-6">
<p className="mb-0 text-textMain-100 mt-1 text-right text-sm">
{" "}
پیامک حاوی کد تایید برای شماره
کد تایید برای شماره
<strong className="mx-1">
<PersianNumber number={phoneNumber} />
</strong>
@ -41,6 +41,8 @@ const VerifyCodeStep = () => {
type={"number"}
style="text-center"
inputEvent={(e) => CTX.setVerifyCode(e.target.value)}
mt={5}
theme={1}
/>
</div>

View File

@ -31,15 +31,15 @@ const NavBAr = (props) => {
return (
<div className=" bg-body-100 h-10 z-90 w-full fixed bottom-0">
<div
className={`fixed px-3 w-full z-[110] tr03 ${
profileFill ? "bottom-3" : "bottom-[-300px]"
className={`fixed w-full z-[110] tr03 ${
profileFill ? "bottom-0" : "bottom-[-300px]"
} `}
>
{/* <div className="w-[100px] text-left overflow-hidden">
<Image src={divide} alt="" className=" " />
</div> */}
<div className="bg-white shadow px-4 py-3 flex rounded-[30px] ">
<div className="bg-gray-100 rounded-t-3xl shadow py-3 flex ">
{HasPermission("ViewDashboard", permissions) && (
<Link href={"/home"} className="w-full !no-underline">
<>
@ -141,29 +141,6 @@ const NavBAr = (props) => {
</Link>
)}
{/* <div
className="flex justify-center "
onClick={() => {
openBigPlus();
}}
>
<div className="bg-primary-200 w-[60px] h-[60px] rounded-full absolute top-[-25px] ">
<svg
width="25"
height="25"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="mx-auto mt-4"
>
<path
d="M14 6H10V2C10 1.46957 9.78929 0.960859 9.41421 0.585786C9.03914 0.210714 8.53043 0 8 0C7.46957 0 6.96086 0.210714 6.58579 0.585786C6.21071 0.960859 6 1.46957 6 2L6.071 6H2C1.46957 6 0.960859 6.21071 0.585786 6.58579C0.210714 6.96086 0 7.46957 0 8C0 8.53043 0.210714 9.03914 0.585786 9.41421C0.960859 9.78929 1.46957 10 2 10L6.071 9.929L6 14C6 14.5304 6.21071 15.0391 6.58579 15.4142C6.96086 15.7893 7.46957 16 8 16C8.53043 16 9.03914 15.7893 9.41421 15.4142C9.78929 15.0391 10 14.5304 10 14V9.929L14 10C14.5304 10 15.0391 9.78929 15.4142 9.41421C15.7893 9.03914 16 8.53043 16 8C16 7.46957 15.7893 6.96086 15.4142 6.58579C15.0391 6.21071 14.5304 6 14 6Z"
fill="white"
/>
</svg>
</div>
</div> */}
{HasPermission("ViewComplexSettings", permissions) && (
<Link href={"/employees"} className="w-full !no-underline ">
<>

View File

@ -52,20 +52,20 @@ const ActivityCard = ({ data }) => {
return (
<div
className={` p-2 overflow-hidden ${
className={` p-2 overflow-hidden border-b border-gray-200 ${
conditionTask == 3 ||
conditionTask == 4 ||
data?.status == 4 ||
data?.status == 2 ||
data?.status == 3
? "fuck-click "
: "border-b border-gray-200"
: ""
}`}
>
<div className="flex">
<div className="flex">
<div className="bg-secondary-50 flex rounded-full w-fit ">
<div className="relative pr-2 text-[11px] rounded-full text-secondary-200">
<div className="flex w-fit ">
<div className="relative pr-2 text-[11px] text-primary-500">
{data?.scheduleType == 0
? "روزانه"
: data?.scheduleType == 1
@ -74,24 +74,26 @@ const ActivityCard = ({ data }) => {
? "مخصوص"
: ""}
</div>
<p className="mb-0 px-1 text-[10px] mt-1 text-secondary-200 opacity-60">
-
</p>
<div className=" w-fit relative pl-2 text-[11px] rounded-full text-secondary-200">
<div className="w-[2px] h-3 mx-1 bg-primary-200 opacity-75 mt-[2px]"></div>
<div className=" w-fit relative text-[11px] text-secondary-800">
{data?.shiftTitle}
</div>
</div>
<div className=" w-fit relative text-[11px] rounded-full bg-gray-300 text-black px-2 h-fit">
{data?.userFullName}
</div>
{data?.doneAt !== "0001-01-01T00:00:00" && (
<div className=" w-fit relative text-[11px] rounded-full bg-primary-100 text-primary-300 px-2 h-fit mr-1 mt-[-1px]">
<PersianNumber
number={moment(data?.doneAt).locale("fa").format("HH:mm")}
style={"!text-[11px]"}
/>{" "}
<div className="w-[2px] h-3 mx-1 bg-primary-200 opacity-75 mt-[2px]"></div>
<div className=" w-fit relative text-[11px] text-secondary-800 h-fit">
{data?.userFullName}
</div>
</div>{" "}
{data?.doneAt !== "0001-01-01T00:00:00" && (
<>
<div className="w-[2px] h-3 mx-1 bg-primary-200 opacity-75 mt-[2px]"></div>
<div className=" w-fit relative text-[11px] text-primary-600 h-fit ">
<PersianNumber
number={moment(data?.doneAt).locale("fa").format("HH:mm")}
style={"!text-[11px]"}
/>{" "}
</div>
</>
)}
</div>
</div>
@ -150,10 +152,10 @@ const ActivityCard = ({ data }) => {
</div>
<div className="w-full">
<h3
className={`text-sm font-medium tr03 ${
className={`text-sm font-medium tr03 mt-1 ${
conditionTask == 2 || conditionTask == 4 || data?.status == 4
? "text-red-600"
: "text-primary-300"
: "text-secondary-950"
} `}
>
{data?.title}{" "}
@ -170,14 +172,6 @@ const ActivityCard = ({ data }) => {
</div>
</div>
<div
className={`flex mx-2 tr03 ${
conditionTask == 1 || conditionTask == 2
? "relative top-[300px] h-0"
: " relative top-0 h-fit "
}`}
></div>
<div
className={`flex justify-between rtl mt-3 tr03 ${
conditionTask == 1
@ -186,7 +180,7 @@ const ActivityCard = ({ data }) => {
}`}
>
<div
className="w-[35px] h-[35px] rounded-full bg-sky-600 pt-4"
className="w-[35px] h-[35px] rounded-full bg-secondary-950 pt-4"
onClick={() => setConditionTask(0)}
>
<svg
@ -209,7 +203,7 @@ const ActivityCard = ({ data }) => {
<div className="flex ">
{" "}
<div
className="w-[35px] h-[35px] rounded-full bg-primary-200 pt-1 mx-2"
className="w-[35px] h-[35px] rounded-full bg-primary-400 pt-1 mx-2"
onClick={() => handleDone()}
>
<svg

View File

@ -74,7 +74,7 @@ const ActivityCardCloseShift = ({ data }) => {
return (
<div
className={`border-b border-gray-200 p-2 overflow-hidden tr03 mt-3 ${
className={` p-2 overflow-hidden border-b border-gray-200 ${
conditionTask == 3 ||
conditionTask == 4 ||
data?.status == 4 ||
@ -92,8 +92,8 @@ const ActivityCardCloseShift = ({ data }) => {
>
<div className="flex">
<div className="flex">
<div className="bg-secondary-50 flex rounded-full w-fit ">
<div className="relative pr-2 text-[11px] rounded-full text-secondary-200">
<div className=" flex w-fit ">
<div className="relative pr-2 text-[11px] text-primary-500">
{data?.scheduleType == 0
? "روزانه"
: data?.scheduleType == 1
@ -102,24 +102,26 @@ const ActivityCardCloseShift = ({ data }) => {
? "مخصوص"
: ""}
</div>
<p className="mb-0 px-1 text-[10px] mt-1 text-secondary-200 opacity-60">
-
</p>
<div className=" w-fit relative pl-2 text-[11px] rounded-full text-secondary-200">
<div className="w-[2px] h-3 mx-1 bg-primary-200 opacity-75 mt-[2px]"></div>
<div className=" w-fit relative text-[11px] text-secondary-800">
{data?.shiftTitle}
</div>
</div>
<div className=" w-fit relative text-[11px] rounded-full bg-gray-300 text-black px-2 h-fit">
{data?.userFullName}
</div>
{data?.doneAt !== "0001-01-01T00:00:00" && (
<div className=" w-fit relative text-[11px] rounded-full bg-primary-100 text-primary-300 px-2 h-fit mr-1 mt-[-1px]">
<PersianNumber
number={moment(data?.doneAt).locale("fa").format("HH:mm")}
style={"!text-[11px]"}
/>{" "}
<div className="w-[2px] h-3 mx-1 bg-primary-200 opacity-75 mt-[2px]"></div>
<div className=" w-fit relative text-[11px] text-secondary-800 h-fit">
{data?.userFullName}
</div>
</div>{" "}
{data?.doneAt !== "0001-01-01T00:00:00" && (
<>
<div className="w-[2px] h-3 mx-1 bg-primary-200 opacity-75 mt-[2px]"></div>
<div className=" w-fit relative text-[11px] text-primary-600 h-fit ">
<PersianNumber
number={moment(data?.doneAt).locale("fa").format("HH:mm")}
style={"!text-[11px]"}
/>{" "}
</div>
</>
)}
</div>
</div>
@ -181,7 +183,7 @@ const ActivityCardCloseShift = ({ data }) => {
className={`text-sm font-medium tr03 ${
conditionTask == 2 || conditionTask == 4 || data?.status == 4
? "text-red-600"
: "text-primary-300"
: "text-secondary-950"
} `}
>
{data?.title}{" "}
@ -229,7 +231,7 @@ const ActivityCardCloseShift = ({ data }) => {
<div className="flex ">
{" "}
<div
className="w-[35px] h-[35px] rounded-full bg-primary-200 pt-1 mx-2"
className="w-[35px] h-[35px] rounded-full bg-primary-400 pt-1 mx-2"
onClick={() => handleDone(data?.id)}
>
<svg

View File

@ -35,8 +35,8 @@ const TasksCard = ({ tasksData, permissions }) => {
<PersianNumber number={index + 1} />
</div> */}
<div className="bg-secondary-50 flex rounded-full ">
<div className="w-fit relative pr-2 text-[11px] rounded-full text-secondary-200">
<div className="flex">
<div className="relative pr-2 text-[11px] text-primary-500">
{e?.scheduleType == 0
? "روزانه"
: e?.scheduleType == 1
@ -45,33 +45,37 @@ const TasksCard = ({ tasksData, permissions }) => {
? "مخصوص"
: ""}
</div>
<p className="mb-0 px-1 text-[10px] mt-1 text-secondary-200 opacity-60">
-
</p>
<div className=" w-fit relative pl-2 text-[12px] rounded-full text-secondary-200">
<div className="w-[2px] h-3 mx-1 bg-primary-200 opacity-75 mt-[2px]"></div>
<div className=" w-fit relative text-[11px] text-secondary-800 h-fit">
{e?.shifts[0]}
</div>
{e?.days?.length > 0 && (
<>
{e?.days.map((s) => (
<>
<div className="w-[2px] h-3 mx-1 bg-primary-200 opacity-75 mt-[2px]"></div>
<div className=" w-fit relative text-[11px] text-primary-600 h-fit ">
{" "}
{s}
</div>
</>
))}
</>
)}
</div>
{e?.days?.length > 0 && (
<>
{e?.days.map((s) => (
<div className=" w-fit relative px-2 text-[12px] mr-1 rounded-full bg-primary-100 text-green-700 text-center ">
{" "}
{s}
</div>
))}
</>
)}
<div className="w-[2px] h-3 mx-1 bg-primary-200 opacity-75 mt-[2px]"></div>
<div className=" w-fit relative px-2 text-[12px] mr-1 rounded-full bg-gray-300 text-gray-600 text-center ">
<div className=" w-fit relative text-[11px] text-secondary-950 h-fit ">
{" "}
{e?.positions[0]}
</div>
</div>
<div className=" relative m-1 text-white">
<div className="text-right max-h-[40px] overflow-hidden">
<h4 className="mb-0 text-primary-300 font-medium text-[13px] ">
<h4 className="mb-0 text-secondary-950 font-medium text-sm">
{e?.title}{" "}
</h4>
</div>

View File

@ -34,13 +34,15 @@ const BottomFilterActivities = (props) => {
onDismiss={() => CTX.setBottomFilterActivitiesOpen(false)}
blocking={false}
>
<div className="text-center py-2 bg-primary-300 ">
<p className="mb-0 text-white relative top-[-5px]">فیلتر اکتیویتی</p>
<div className="text-center py-2 bg-secondary-950 ">
<p className="mb-0 text-primary-300 relative top-[-5px]">
فیلتر اکتیویتی
</p>
</div>
<div className="bg-body-100 p-3 ">
<div
className={`rounded-xl border-[1px] border-gray-200 p-5 m-2 tr03 ${
className={`rounded-xl border-[1px] border-gray-200 p-3 m-2 tr03 ${
typeFilter == 3 ? " bg-primary-100" : "bg-gray-100 "
}`}
onClick={() => handleFilterActivity(3)}
@ -60,7 +62,7 @@ const BottomFilterActivities = (props) => {
</div>
<div
className={`rounded-xl border-[1px] border-gray-200 p-5 m-2 tr03 ${
className={`rounded-xl border-[1px] border-gray-200 p-3 m-2 tr03 ${
typeFilter == 0 ? " bg-primary-100" : "bg-gray-100 "
}`}
onClick={() => handleFilterActivity(0)}
@ -77,7 +79,7 @@ const BottomFilterActivities = (props) => {
</div>
<div
className={`rounded-xl border-[1px] border-gray-200 p-5 m-2 tr03 ${
className={`rounded-xl border-[1px] border-gray-200 p-3 m-2 tr03 ${
typeFilter == 1 ? " bg-primary-100" : "bg-gray-100 "
}`}
onClick={() => handleFilterActivity(1)}
@ -97,7 +99,7 @@ const BottomFilterActivities = (props) => {
</div>
<div
className={`rounded-xl border-[1px] border-gray-200 p-5 m-2 tr03 ${
className={`rounded-xl border-[1px] border-gray-200 p-3 m-2 tr03 ${
typeFilter == 2 ? " bg-primary-100" : "bg-gray-100 "
}`}
onClick={() => handleFilterActivity(2)}

View File

@ -41,8 +41,8 @@ const BottomSheetAddUserToPositionShiftPlan = ({
onDismiss={() => CTX.setBottomSheetAddUserToPositionShiftPlanOpen(false)}
blocking={false}
>
<div className="text-center py-2 bg-primary-300 ">
<p className="mb-0 text-white relative top-[-5px]">
<div className="text-center py-2 bg-secondary-950 ">
<p className="mb-0 text-primary-300 relative top-[-5px]">
افزودن یوزر به پوزیشن {positionName}
</p>
</div>
@ -78,12 +78,12 @@ const BottomSheetAddUserToPositionShiftPlan = ({
CTX.setBottomSheetAddUserToPositionShiftPlanOpen(false);
}}
>
<div className="flex rtl justify-between p-3">
<p className="mb-0 m-1">
<div className="flex rtl justify-between p-1">
<p className="mb-0 m-1 text-sm">
{e?.firstName} {e?.lastName}
</p>
<p className="mb-0 bg-primary-100 text-primary-300 rounded-full p-2 text-sm">
<p className="mb-0 text-secondary-700 pl-4 rounded-full text-sm">
{e?.roleNames[0]}
</p>
</div>

View File

@ -26,14 +26,16 @@ const BottomSheetChangeRole = (props) => {
onDismiss={() => CTX.setBottomSheetChangeRoleOpen(false)}
blocking={false}
>
<div className="text-center py-2 bg-primary-300 ">
<p className="mb-0 text-white relative top-[-5px]">انتخاب نقش جدید </p>
<div className="text-center py-2 bg-secondary-950 ">
<p className="mb-0 text-primary-300 relative top-[-5px]">
انتخاب نقش جدید{" "}
</p>
</div>
<div className="bg-body-100 p-3 ">
{roles?.map((e, index) => (
<div
className={`rounded-xl border-[1px] border-gray-200 p-5 m-2 tr03 ${
className={`rounded-xl border-[1px] border-gray-200 p-3 m-2 tr03 ${
roleSelect == index ? " bg-primary-100" : "bg-gray-100 "
}`}
onClick={() => {

View File

@ -197,8 +197,10 @@ const BottomSheetCreateEmployees = (props) => {
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>
<div className="text-center py-2 bg-secondary-950 ">
<p className="mb-0 text-primary-300 relative top-[-5px]">
افزودن کاربر جدید
</p>
</div>
<div className="bg-body-100 p-4 ">

View File

@ -121,8 +121,8 @@ const BottomSheetCreatePosition = (props) => {
onDismiss={() => CTX.setBottomSheetCreatePositionOpen(false)}
blocking={false}
>
<div className="text-center py-2 bg-primary-300 ">
<p className="mb-0 text-white relative top-[-5px]">
<div className="text-center py-2 bg-secondary-950 ">
<p className="mb-0 text-primary-300 relative top-[-5px]">
افزودن پوزیشن جدید{" "}
</p>
</div>

View File

@ -100,8 +100,8 @@ const BottomSheetCreateRoutine = (props) => {
onDismiss={() => CTX.setBottomSheetCreateRoutineOpen(false)}
blocking={false}
>
<div className="text-center py-2 bg-primary-300 ">
<p className="mb-0 text-white relative top-[-5px]">
<div className="text-center py-2 bg-secondary-950 ">
<p className="mb-0 text-primary-300 relative top-[-5px]">
افزودن روتین جدید{" "}
</p>
</div>

View File

@ -100,8 +100,10 @@ const BottomSheetCreateSection = (props) => {
onDismiss={() => CTX.setBottomSheetCreateSectionOpen(false)}
blocking={false}
>
<div className="text-center py-2 bg-primary-300 ">
<p className="mb-0 text-white relative top-[-5px]">افزودن سکشن جدید </p>
<div className="text-center py-2 bg-secondary-950 ">
<p className="mb-0 text-primary-300 relative top-[-5px]">
افزودن سکشن جدید{" "}
</p>
</div>
<div className="bg-body-100 p-4 ">

View File

@ -151,8 +151,8 @@ const BottomSheetCreateShifts = (props) => {
onDismiss={() => CTX.setBottomSheetCreateShiftsOpen(false)}
blocking={false}
>
<div className="text-center py-2 bg-primary-300 ">
<p className="mb-0 text-white relative top-[-5px]">
<div className="text-center py-2 bg-secondary-950 ">
<p className="mb-0 text-primary-300 relative top-[-5px]">
افزودن شیفت کاری جدید
</p>
</div>

View File

@ -27,13 +27,13 @@ const Buttonbriz = ({
width="25"
height="24"
viewBox="0 0 25 24"
fill="none"
fill="#b9b9b9"
xmlns="http://www.w3.org/2000/svg"
className="mx-auto mt-2"
>
<path
d="M16.7969 14.9715L16.1395 14.3695L16.7969 14.9727V14.9715ZM20.9608 21.6297L20.3022 21.0265L20.9596 21.6297H20.9608ZM19.3585 22.458L19.4479 23.3272L19.3585 22.4568V22.458ZM2.5337 6.07917C2.52727 5.96441 2.4975 5.852 2.44608 5.74836C2.39466 5.64472 2.3226 5.55187 2.23401 5.47511C2.14543 5.39836 2.04205 5.3392 1.92979 5.30102C1.81752 5.26284 1.69857 5.24638 1.57972 5.25258C1.46086 5.25879 1.34444 5.28753 1.2371 5.33718C1.12975 5.38683 1.03359 5.4564 0.954089 5.54193C0.874592 5.62746 0.813322 5.72727 0.773777 5.83567C0.734232 5.94406 0.717186 6.05891 0.723612 6.17367L2.5337 6.07917ZM3.70095 1.60733C3.54225 1.77666 3.4584 1.99918 3.46731 2.22739C3.47622 2.45559 3.57718 2.67138 3.74863 2.8287C3.92008 2.98601 4.14843 3.07238 4.38493 3.06935C4.62143 3.06632 4.84733 2.97414 5.0144 2.8125L3.70095 1.60733ZM10.8857 21.114C10.9865 21.1767 11.0991 21.2195 11.2171 21.2398C11.3351 21.2602 11.4562 21.2578 11.5732 21.2327C11.6902 21.2076 11.8009 21.1603 11.8989 21.0936C11.9969 21.0269 12.0802 20.942 12.144 20.844C12.2077 20.746 12.2508 20.6368 12.2705 20.5226C12.2902 20.4084 12.2863 20.2916 12.259 20.1789C12.2316 20.0662 12.1814 19.9599 12.1112 19.866C12.041 19.7722 11.9522 19.6928 11.8499 19.6323L10.8857 21.114ZM16.2616 21.401C16.0262 21.3535 15.7809 21.3982 15.5797 21.5254C15.3784 21.6525 15.2378 21.8516 15.1886 22.0788C15.1394 22.3061 15.1857 22.5429 15.3174 22.7372C15.449 22.9315 15.6552 23.0673 15.8906 23.1148L16.2616 21.401ZM16.9044 16.1347L17.4542 15.5747L16.1395 14.3695L15.5897 14.9295L16.9044 16.1347ZM19.2655 15.339L21.5734 16.6223L22.4772 15.1057L20.1693 13.8223L19.2655 15.339ZM22.0193 19.2823L20.3022 21.0265L21.6169 22.2328L23.3327 20.4875L22.0193 19.2823ZM8.10049 16.6188C3.41699 11.8577 2.63157 7.84083 2.5337 6.07917L0.723612 6.17367C0.844446 8.332 1.79178 12.7467 6.78703 17.824L8.10049 16.6188ZM9.76315 8.87567L10.1087 8.52333L8.79528 7.31817L8.44849 7.6705L9.76315 8.87567ZM10.3818 4.13667L8.85811 2.0565L7.3779 3.06683L8.9004 5.147L10.3818 4.13667ZM9.10461 8.2725C8.88714 8.07015 8.66761 7.86986 8.44607 7.67167L8.44365 7.674L8.44003 7.6775C8.41858 7.69893 8.39841 7.72152 8.37961 7.74517C8.26117 7.89654 8.16744 8.06455 8.10169 8.24333C7.98328 8.56417 7.92045 8.98883 8.0002 9.5185C8.15728 10.5592 8.86415 11.958 10.7093 13.8352L12.0239 12.6288C10.2984 10.8753 9.87311 9.79617 9.79336 9.26417C9.7547 9.0075 9.79336 8.87333 9.80907 8.83017L9.81874 8.808C9.80885 8.82336 9.79753 8.83781 9.7849 8.85117C9.77782 8.85909 9.77057 8.86803 9.76315 8.87567L9.10461 8.2725ZM10.7093 13.834C12.5496 15.7053 13.9392 16.4403 14.9989 16.6072C15.5438 16.6923 15.9849 16.6235 16.3184 16.4963C16.5031 16.4263 16.6749 16.3278 16.8271 16.2047L16.8706 16.165L16.8875 16.1487C16.8903 16.1464 16.8932 16.144 16.8959 16.1417L16.8996 16.1382L16.9008 16.1358C16.9008 16.1358 16.9032 16.1347 16.2459 15.5315C15.5885 14.9295 15.5897 14.9283 15.5897 14.9272L15.5922 14.926L15.5946 14.9225L15.6018 14.9167C15.6201 14.8996 15.639 14.8833 15.6586 14.8677C15.6695 14.8607 15.6683 14.863 15.6526 14.8688C15.6284 14.8782 15.5197 14.9155 15.2901 14.8793C14.8043 14.8023 13.7555 14.3893 12.0239 12.6288L10.7093 13.834ZM8.85811 2.0565C7.63286 0.383499 5.18236 0.0999991 3.70095 1.60733L5.0144 2.8125C5.64636 2.17083 6.75924 2.221 7.3779 3.06683L8.85811 2.0565ZM20.3022 21.0265C19.9651 21.3695 19.6135 21.5538 19.2703 21.5865L19.4479 23.3272C20.3506 23.242 21.0816 22.7777 21.6169 22.2328L20.3022 21.0277V21.0265ZM10.1087 8.52333C11.2784 7.3345 11.3606 5.47483 10.3818 4.13667L8.90161 5.147C9.41153 5.8435 9.33299 6.77217 8.79528 7.31817L10.1087 8.52333ZM21.5734 16.6223C22.5654 17.1742 22.76 18.5298 22.0193 19.2823L23.3327 20.4875C24.9096 18.8845 24.4492 16.2023 22.4772 15.1057L21.5734 16.6223ZM17.4542 15.5747C17.9194 15.101 18.6456 14.9948 19.2655 15.339L20.1693 13.8223C18.8414 13.085 17.1968 13.2962 16.1395 14.3695L17.4542 15.5747ZM11.8499 19.6323C10.6622 18.9113 9.39703 17.936 8.10049 16.6188L6.78703 17.824C8.18144 19.2415 9.56257 20.3113 10.8857 21.114L11.8499 19.6323ZM19.2691 21.5865C18.2626 21.6718 17.2486 21.6093 16.2616 21.401L15.8906 23.1148C17.0584 23.3591 18.2579 23.4307 19.4479 23.3272L19.2703 21.5865H19.2691Z"
fill="white"
fill="#b9b9b9"
/>
</svg>
),
@ -45,13 +45,13 @@ const Buttonbriz = ({
width="20"
height="20"
viewBox="0 0 12 10"
fill="none"
fill="#b9b9b9"
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"
fill="#b9b9b9"
/>
</svg>
),
@ -66,9 +66,9 @@ const Buttonbriz = ({
color === "PRIMARY"
? "btn-primary"
: color === "SECONDARY"
? "btn-secondary"
? "btn-primary"
: color === "INFO"
? "btn-info"
? "btn-primary"
: ""
} `}
onClick={buttonEvent}
@ -76,11 +76,11 @@ const Buttonbriz = ({
<div
className={`w-[40px] h-[40px] rounded-xl ${
color === "PRIMARY"
? "bg-primary-300"
? "bg-secondary-950"
: color === "SECONDARY"
? "bg-secondary-200"
? "bg-secondary-950"
: color === "INFO"
? "bg-info-200"
? "bg-secondary-950"
: ""
}`}
>

View File

@ -1,42 +1,44 @@
import axios from "axios";
export const getToken = () => {
return "Bearer " + localStorage.token;
return localStorage.getItem("token");
};
const Chapar = axios.create({
baseURL: process.env.NEXT_PUBLIC_API_URL,
timeout: 10000,
headers: {
common: {
"Content-type": "application/json",
"Access-Control-Allow-Origin": "*",
...(typeof window !== "undefined" &&
localStorage.token && {
Authorization: getToken(),
}),
},
"Content-type": "application/json",
"Access-Control-Allow-Origin": "*",
},
});
Chapar.interceptors.response.use(
function (response) {
// Any status code that lie within the range of 2xx cause this function to trigger
// Do something with response data
// Request interceptor to conditionally add token to headers
Chapar.interceptors.request.use(
(config) => {
const token = getToken();
if (token && !config.isPublic) {
config.headers.Authorization = "Bearer" + " " + token;
}
return config;
},
(error) => {
return Promise.reject(error);
}
);
// Response interceptor to handle responses
Chapar.interceptors.response.use(
(response) => {
return response.data;
},
function (error, status) {
// Any status codes that falls outside the range of 2xx cause this function to trigger
// Do something with response error
// ;
if (error.response.status === 401) {
(error) => {
const status = error?.response?.status;
if (status === 401) {
localStorage.removeItem("token");
window.location.href = "/login";
}
return Promise.reject({ error, status: error?.response?.status });
return Promise.reject({ error, status });
}
);

View File

@ -0,0 +1,29 @@
import moment from "jalali-moment";
import React from "react";
const FormatJalaliDate = (date, noYear) => {
const jalaliDateDay = moment(date).locale("fa").format("jD");
const jalaliDateYear = moment(date).locale("fa").format("jYYYY");
// Extract day name
const dayName = moment(date).locale("fa").format("dddd");
let result = null;
// Map English day names to Persian
// Get the Persian day name
// Extract month name
const monthName = moment(date).locale("fa").format("jMMMM");
if (noYear) {
result = `${dayName} ${jalaliDateDay} ${monthName}`;
} else {
result = `${dayName} ${jalaliDateDay} ${monthName} ${jalaliDateYear}`;
}
return result;
};
export default FormatJalaliDate;

View File

@ -15,8 +15,8 @@ const Loading = ({ rateId }) => {
loading ? "bottom-5 " : "bottom-[-100px] "
} `}
>
<div className="bg-primary-300 w-fit rounded-full px-1 py-2 flex rtl m-3 ">
<p className="mb-0 text-white mx-2 blacj ">لطفا صبر کنید</p>
<div className="bg-secondary-950 w-fit rounded-full px-1 py-2 flex rtl m-3 ">
<p className="mb-0 text-primary-300 mx-2 blacj ">لطفا صبر کنید</p>
<div className="w-[30px] ml-3">
<Image src={gif} alt="" className="" />
</div>

View File

@ -0,0 +1,13 @@
import React from "react";
const NothingFound = () => {
return (
<div className="flex justify-center py-5">
<div className="bg-gray-100 mt-5 w-fit rounded-full p-2">
<p className="mb-0 text-sm ">چیزی یافت نشد.</p>
</div>
</div>
);
};
export default NothingFound;

View File

@ -1 +0,0 @@
self.fallback=async e=>{let{destination:a,url:n}=e,o={document:"/offline",image:!1,audio:!1,video:!1,font:!1}[a];return o?caches.match(o,{ignoreSearch:!0}):Response.error()};

View File

@ -0,0 +1,102 @@
/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./node_modules/@ducanh2912/next-pwa/dist/fallback.js":
/*!************************************************************!*\
!*** ./node_modules/@ducanh2912/next-pwa/dist/fallback.js ***!
\************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
eval(__webpack_require__.ts("__webpack_require__.r(__webpack_exports__);\nself.fallback = async (_)=>{\n let { destination: e, url: A } = _, s = {\n document: \"/offline\",\n image: false,\n audio: false,\n video: false,\n font: false\n }[e];\n return s ? caches.match(s, {\n ignoreSearch: !0\n }) : \"\" === e && false && 0 ? 0 : Response.error();\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvQGR1Y2FuaDI5MTIvbmV4dC1wd2EvZGlzdC9mYWxsYmFjay5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7QUFDQSxVQUFVLHlCQUF5QjtBQUNuQyxrQkFBa0IsVUFBcUM7QUFDdkQsZUFBZSxLQUFrQztBQUNqRCxlQUFlLEtBQWtDO0FBQ2pELGVBQWUsS0FBa0M7QUFDakQsY0FBYyxLQUFpQztBQUMvQyxLQUFLO0FBQ0w7QUFDQTtBQUNBLEtBQUssZ0JBQWdCLEtBQWlDLElBQUksQ0FBd0MsR0FBRyxDQUUvRjtBQUNOIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vX05fRS8uL25vZGVfbW9kdWxlcy9AZHVjYW5oMjkxMi9uZXh0LXB3YS9kaXN0L2ZhbGxiYWNrLmpzP2NlNGIiXSwic291cmNlc0NvbnRlbnQiOlsic2VsZi5mYWxsYmFjayA9IGFzeW5jIChfKT0+e1xuICAgIGxldCB7IGRlc3RpbmF0aW9uOiBlLCB1cmw6IEEgfSA9IF8sIHMgPSB7XG4gICAgICAgIGRvY3VtZW50OiBwcm9jZXNzLmVudi5fX1BXQV9GQUxMQkFDS19ET0NVTUVOVF9fLFxuICAgICAgICBpbWFnZTogcHJvY2Vzcy5lbnYuX19QV0FfRkFMTEJBQ0tfSU1BR0VfXyxcbiAgICAgICAgYXVkaW86IHByb2Nlc3MuZW52Ll9fUFdBX0ZBTExCQUNLX0FVRElPX18sXG4gICAgICAgIHZpZGVvOiBwcm9jZXNzLmVudi5fX1BXQV9GQUxMQkFDS19WSURFT19fLFxuICAgICAgICBmb250OiBwcm9jZXNzLmVudi5fX1BXQV9GQUxMQkFDS19GT05UX19cbiAgICB9W2VdO1xuICAgIHJldHVybiBzID8gY2FjaGVzLm1hdGNoKHMsIHtcbiAgICAgICAgaWdub3JlU2VhcmNoOiAhMFxuICAgIH0pIDogXCJcIiA9PT0gZSAmJiBwcm9jZXNzLmVudi5fX1BXQV9GQUxMQkFDS19EQVRBX18gJiYgQS5tYXRjaCgvXFwvX25leHRcXC9kYXRhXFwvLitcXC8uK1xcLmpzb24kL2kpID8gY2FjaGVzLm1hdGNoKHByb2Nlc3MuZW52Ll9fUFdBX0ZBTExCQUNLX0RBVEFfXywge1xuICAgICAgICBpZ25vcmVTZWFyY2g6ICEwXG4gICAgfSkgOiBSZXNwb25zZS5lcnJvcigpO1xufTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/@ducanh2912/next-pwa/dist/fallback.js\n"));
/***/ })
/******/ });
/************************************************************************/
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/make namespace object */
/******/ !function() {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/trusted types policy */
/******/ !function() {
/******/ var policy;
/******/ __webpack_require__.tt = function() {
/******/ // Create Trusted Type policy if Trusted Types are available and the policy doesn't exist yet.
/******/ if (policy === undefined) {
/******/ policy = {
/******/ createScript: function(script) { return script; }
/******/ };
/******/ if (typeof trustedTypes !== "undefined" && trustedTypes.createPolicy) {
/******/ policy = trustedTypes.createPolicy("nextjs#bundler", policy);
/******/ }
/******/ }
/******/ return policy;
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/trusted types script */
/******/ !function() {
/******/ __webpack_require__.ts = function(script) { return __webpack_require__.tt().createScript(script); };
/******/ }();
/******/
/******/ /* webpack/runtime/react refresh */
/******/ !function() {
/******/ if (__webpack_require__.i) {
/******/ __webpack_require__.i.push(function(options) {
/******/ var originalFactory = options.factory;
/******/ options.factory = function(moduleObject, moduleExports, webpackRequire) {
/******/ var hasRefresh = typeof self !== "undefined" && !!self.$RefreshInterceptModuleExecution$;
/******/ var cleanup = hasRefresh ? self.$RefreshInterceptModuleExecution$(moduleObject.id) : function() {};
/******/ try {
/******/ originalFactory.call(this, moduleObject, moduleExports, webpackRequire);
/******/ } finally {
/******/ cleanup();
/******/ }
/******/ }
/******/ })
/******/ }
/******/ }();
/******/
/******/ /* webpack/runtime/compat */
/******/
/******/
/******/ // noop fns to prevent runtime errors during initialization
/******/ if (typeof self !== "undefined") {
/******/ self.$RefreshReg$ = function () {};
/******/ self.$RefreshSig$ = function () {
/******/ return function (type) {
/******/ return type;
/******/ };
/******/ };
/******/ }
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module can't be inlined because the eval-source-map devtool is used.
/******/ var __webpack_exports__ = {};
/******/ __webpack_modules__["./node_modules/@ducanh2912/next-pwa/dist/fallback.js"](0, __webpack_exports__, __webpack_require__);
/******/
/******/ })()
;

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

File diff suppressed because one or more lines are too long

1
public/sw.js.map 100644

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
self.onmessage=async e=>{switch(e.data.type){case"__START_URL_CACHE__":{let t=e.data.url,a=await fetch(t);if(!a.redirected)return(await caches.open("start-url")).put(t,a);return Promise.resolve()}case"__FRONTEND_NAV_CACHE__":{let t=e.data.url,a=await caches.open("pages");if(await a.match(t,{ignoreSearch:!0}))return;let s=await fetch(t);if(!s.ok)return;if(a.put(t,s.clone()),e.data.shouldCacheAggressively&&s.headers.get("Content-Type")?.includes("text/html"))try{let e=await s.text(),t=[],a=await caches.open("static-style-assets"),r=await caches.open("next-static-js-assets"),c=await caches.open("static-js-assets");for(let[s,r]of e.matchAll(/<link.*?href=['"](.*?)['"].*?>/g))/rel=['"]stylesheet['"]/.test(s)&&t.push(a.match(r).then(e=>e?Promise.resolve():a.add(r)));for(let[,a]of e.matchAll(/<script.*?src=['"](.*?)['"].*?>/g)){let e=/\/_next\/static.+\.js$/i.test(a)?r:c;t.push(e.match(a).then(t=>t?Promise.resolve():e.add(a)))}return await Promise.all(t)}catch{}return Promise.resolve()}default:return Promise.resolve()}};

View File

@ -0,0 +1,102 @@
/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./node_modules/@ducanh2912/next-pwa/dist/sw-entry-worker.js":
/*!*******************************************************************!*\
!*** ./node_modules/@ducanh2912/next-pwa/dist/sw-entry-worker.js ***!
\*******************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
eval(__webpack_require__.ts("__webpack_require__.r(__webpack_exports__);\nself.onmessage = async (e)=>{\n switch(e.data.type){\n case \"__START_URL_CACHE__\":\n {\n let t = e.data.url, a = await fetch(t);\n if (!a.redirected) return (await caches.open(\"start-url\")).put(t, a);\n return Promise.resolve();\n }\n case \"__FRONTEND_NAV_CACHE__\":\n {\n let t = e.data.url, a = await caches.open(\"pages\");\n if (await a.match(t, {\n ignoreSearch: !0\n })) return;\n let s = await fetch(t);\n if (!s.ok) return;\n if (a.put(t, s.clone()), e.data.shouldCacheAggressively && s.headers.get(\"Content-Type\")?.includes(\"text/html\")) try {\n let e = await s.text(), t = [], a = await caches.open(\"static-style-assets\"), r = await caches.open(\"next-static-js-assets\"), c = await caches.open(\"static-js-assets\");\n for (let [s, r] of e.matchAll(/<link.*?href=['\"](.*?)['\"].*?>/g))/rel=['\"]stylesheet['\"]/.test(s) && t.push(a.match(r).then((e)=>e ? Promise.resolve() : a.add(r)));\n for (let [, a] of e.matchAll(/<script.*?src=['\"](.*?)['\"].*?>/g)){\n let e = /\\/_next\\/static.+\\.js$/i.test(a) ? r : c;\n t.push(e.match(a).then((t)=>t ? Promise.resolve() : e.add(a)));\n }\n return await Promise.all(t);\n } catch {}\n return Promise.resolve();\n }\n default:\n return Promise.resolve();\n }\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvQGR1Y2FuaDI5MTIvbmV4dC1wd2EvZGlzdC9zdy1lbnRyeS13b3JrZXIuanMiLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsaUJBQWlCO0FBQ2pCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esa0JBQWtCO0FBQ2xCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovL19OX0UvLi9ub2RlX21vZHVsZXMvQGR1Y2FuaDI5MTIvbmV4dC1wd2EvZGlzdC9zdy1lbnRyeS13b3JrZXIuanM/NmM4NCJdLCJzb3VyY2VzQ29udGVudCI6WyJzZWxmLm9ubWVzc2FnZSA9IGFzeW5jIChlKT0+e1xuICAgIHN3aXRjaChlLmRhdGEudHlwZSl7XG4gICAgICAgIGNhc2UgXCJfX1NUQVJUX1VSTF9DQUNIRV9fXCI6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgbGV0IHQgPSBlLmRhdGEudXJsLCBhID0gYXdhaXQgZmV0Y2godCk7XG4gICAgICAgICAgICAgICAgaWYgKCFhLnJlZGlyZWN0ZWQpIHJldHVybiAoYXdhaXQgY2FjaGVzLm9wZW4oXCJzdGFydC11cmxcIikpLnB1dCh0LCBhKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gUHJvbWlzZS5yZXNvbHZlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIGNhc2UgXCJfX0ZST05URU5EX05BVl9DQUNIRV9fXCI6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgbGV0IHQgPSBlLmRhdGEudXJsLCBhID0gYXdhaXQgY2FjaGVzLm9wZW4oXCJwYWdlc1wiKTtcbiAgICAgICAgICAgICAgICBpZiAoYXdhaXQgYS5tYXRjaCh0LCB7XG4gICAgICAgICAgICAgICAgICAgIGlnbm9yZVNlYXJjaDogITBcbiAgICAgICAgICAgICAgICB9KSkgcmV0dXJuO1xuICAgICAgICAgICAgICAgIGxldCBzID0gYXdhaXQgZmV0Y2godCk7XG4gICAgICAgICAgICAgICAgaWYgKCFzLm9rKSByZXR1cm47XG4gICAgICAgICAgICAgICAgaWYgKGEucHV0KHQsIHMuY2xvbmUoKSksIGUuZGF0YS5zaG91bGRDYWNoZUFnZ3Jlc3NpdmVseSAmJiBzLmhlYWRlcnMuZ2V0KFwiQ29udGVudC1UeXBlXCIpPy5pbmNsdWRlcyhcInRleHQvaHRtbFwiKSkgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGUgPSBhd2FpdCBzLnRleHQoKSwgdCA9IFtdLCBhID0gYXdhaXQgY2FjaGVzLm9wZW4oXCJzdGF0aWMtc3R5bGUtYXNzZXRzXCIpLCByID0gYXdhaXQgY2FjaGVzLm9wZW4oXCJuZXh0LXN0YXRpYy1qcy1hc3NldHNcIiksIGMgPSBhd2FpdCBjYWNoZXMub3BlbihcInN0YXRpYy1qcy1hc3NldHNcIik7XG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IFtzLCByXSBvZiBlLm1hdGNoQWxsKC88bGluay4qP2hyZWY9WydcIl0oLio/KVsnXCJdLio/Pi9nKSkvcmVsPVsnXCJdc3R5bGVzaGVldFsnXCJdLy50ZXN0KHMpICYmIHQucHVzaChhLm1hdGNoKHIpLnRoZW4oKGUpPT5lID8gUHJvbWlzZS5yZXNvbHZlKCkgOiBhLmFkZChyKSkpO1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBbLCBhXSBvZiBlLm1hdGNoQWxsKC88c2NyaXB0Lio/c3JjPVsnXCJdKC4qPylbJ1wiXS4qPz4vZykpe1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGUgPSAvXFwvX25leHRcXC9zdGF0aWMuK1xcLmpzJC9pLnRlc3QoYSkgPyByIDogYztcbiAgICAgICAgICAgICAgICAgICAgICAgIHQucHVzaChlLm1hdGNoKGEpLnRoZW4oKHQpPT50ID8gUHJvbWlzZS5yZXNvbHZlKCkgOiBlLmFkZChhKSkpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBhd2FpdCBQcm9taXNlLmFsbCh0KTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoICB7fVxuICAgICAgICAgICAgICAgIHJldHVybiBQcm9taXNlLnJlc29sdmUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIHJldHVybiBQcm9taXNlLnJlc29sdmUoKTtcbiAgICB9XG59OyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/@ducanh2912/next-pwa/dist/sw-entry-worker.js\n"));
/***/ })
/******/ });
/************************************************************************/
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/make namespace object */
/******/ !function() {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/trusted types policy */
/******/ !function() {
/******/ var policy;
/******/ __webpack_require__.tt = function() {
/******/ // Create Trusted Type policy if Trusted Types are available and the policy doesn't exist yet.
/******/ if (policy === undefined) {
/******/ policy = {
/******/ createScript: function(script) { return script; }
/******/ };
/******/ if (typeof trustedTypes !== "undefined" && trustedTypes.createPolicy) {
/******/ policy = trustedTypes.createPolicy("nextjs#bundler", policy);
/******/ }
/******/ }
/******/ return policy;
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/trusted types script */
/******/ !function() {
/******/ __webpack_require__.ts = function(script) { return __webpack_require__.tt().createScript(script); };
/******/ }();
/******/
/******/ /* webpack/runtime/react refresh */
/******/ !function() {
/******/ if (__webpack_require__.i) {
/******/ __webpack_require__.i.push(function(options) {
/******/ var originalFactory = options.factory;
/******/ options.factory = function(moduleObject, moduleExports, webpackRequire) {
/******/ var hasRefresh = typeof self !== "undefined" && !!self.$RefreshInterceptModuleExecution$;
/******/ var cleanup = hasRefresh ? self.$RefreshInterceptModuleExecution$(moduleObject.id) : function() {};
/******/ try {
/******/ originalFactory.call(this, moduleObject, moduleExports, webpackRequire);
/******/ } finally {
/******/ cleanup();
/******/ }
/******/ }
/******/ })
/******/ }
/******/ }();
/******/
/******/ /* webpack/runtime/compat */
/******/
/******/
/******/ // noop fns to prevent runtime errors during initialization
/******/ if (typeof self !== "undefined") {
/******/ self.$RefreshReg$ = function () {};
/******/ self.$RefreshSig$ = function () {
/******/ return function (type) {
/******/ return type;
/******/ };
/******/ };
/******/ }
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module can't be inlined because the eval-source-map devtool is used.
/******/ var __webpack_exports__ = {};
/******/ __webpack_modules__["./node_modules/@ducanh2912/next-pwa/dist/sw-entry-worker.js"](0, __webpack_exports__, __webpack_require__);
/******/
/******/ })()
;

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -70,7 +70,7 @@ const page = () => {
logOut={true}
/>
<div className="bg-body-100 relative top-[-30px] rounded-t-3xl overflow-hidden p-4 rtl">
<div className="bg-white overflow-hidden p-5 rtl">
<div className="w-full flex justify-center ml-2">
<div className="bg-white shadow w-[100px] h-[100px] rounded-full overflow-hidden">
<div className="">

View File

@ -0,0 +1,189 @@
"use client";
import AppHeader from "@comp/AppHeader/page";
import { useRouter } from "next/navigation";
import React, { useContext, useEffect, useState } from "react";
import SimpleReactValidator from "simple-react-validator";
import Input from "plugins/Input/page";
import { useRef } from "react";
import Buttonbriz from "plugins/Buttonbriz/page";
import CoffeeBrewCard from "@comp/CoffeeBrew/CoffeeBrewCard/page";
import AppContext from "@ctx/AppContext";
import Chapar from "plugins/Chapar";
import { toast } from "react-toastify";
const page = () => {
const router = useRouter();
const CTX = useContext(AppContext);
const coffeeBrewData = CTX.state.coffeeBrewData;
const [ratio, setRatio] = useState(null);
const [extractionTime, setExtractionTime] = useState(null);
const [finalYield, setFinalYield] = useState(null);
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 = () => {
setRatio(""), setExtractionTime(""), setFinalYield("");
};
const body = {
ratio,
extractionTime,
finalYield,
};
const CreateBrew = async () => {
CTX.setLoading(true);
try {
const data = await Chapar.post(
`${process.env.NEXT_PUBLIC_API_URL}/brew/CoffeeBrew`,
JSON.stringify(body)
);
toast.success(`ادجاست ساخته شد`, {
position: "bottom-right",
closeOnClick: true,
});
clear();
CTX.setLoading(false);
CTX.GetCoffeeBrewData();
} catch ({ error, status }) {
toast.error(`${error?.response?.data?.message}`, {
position: "bottom-right",
closeOnClick: true,
});
CTX.setLoading(false);
}
};
useEffect(() => {
CTX.GetCoffeeBrewData();
}, []);
return (
<>
{" "}
<div className="pb-20">
<AppHeader
title="ادجاست قهوه"
sub="مکانیزم ادجاست قهوه"
// icon1={true}
// iconName1="PLUS"
// iconHref1="#"
// iconEvent1={() => {
// CTX.setBottomSheetCreateShiftsOpen(true);
// }}
icon2={true}
iconName2="ARROW"
iconHref2="#"
iconEvent2={() => {
return router.back();
}}
/>
<div className="bg-white overflow-hidden p-5 rtl">
<div className="">
<Input
lable=" BCG | گرماژ قهوه "
id="ratio-id"
theme={1}
name="ratio"
type={"number"}
value={ratio}
inputEvent={(e) => {
setRatio(e.target.value);
validator.current.showMessageFor("ratio");
}}
style="text-right"
validator={true}
validatorData={validator.current.message(
"ratio",
ratio,
"required"
)}
mt={"5"}
/>
</div>
<div className="">
<Input
lable=" OEG | زمان عصاره گیری"
id="extractionTime-id"
theme={1}
name="extractionTime"
type={"number"}
value={extractionTime}
inputEvent={(e) => {
setExtractionTime(e.target.value);
validator.current.showMessageFor("extractionTime");
}}
style="text-right"
validator={true}
validatorData={validator.current.message(
"extractionTime",
extractionTime,
"required"
)}
mt={"5"}
/>
</div>
<div className="">
<Input
lable="ET | گرماژ عصاره خروجی"
id="finalYield-id"
theme={1}
name="finalYield"
type={"number"}
value={finalYield}
inputEvent={(e) => {
setFinalYield(e.target.value);
validator.current.showMessageFor("finalYield");
}}
style="text-right"
validator={true}
validatorData={validator.current.message(
"finalYield",
finalYield,
"required"
)}
mt={"5"}
/>
</div>
<div>
{" "}
<Buttonbriz
title="ثبت"
color="PRIMARY"
icon="CHECK"
buttonEvent={() => CreateBrew()}
/>
</div>
<h3 className="text-right px-3 pb-1 font-medium mt-7 text-sm">
تاریخچه ادجاست ها
</h3>
<div className="w-[60px] h-[2px] bg-gray-300 mx-3 mb-3"></div>
{coffeeBrewData?.pastRecipes?.map((e) => (
<CoffeeBrewCard data={e} />
))}
</div>
</div>
</>
);
};
export default page;

View File

@ -87,29 +87,27 @@ const Employees = (props) => {
}}
/>
<div className="bg-body-100 relative top-[-30px] rounded-t-3xl overflow-hidden p-3 rtl">
<div>
<div className="bg-white overflow-hidden p-5 rtl">
{" "}
<div
className={` ${
activeSection == 0
? "bg-secondary-50 rounded-b-2xl"
: "border-b border-gray-200 p-2"
}`}
>
<div
className="flex justify-between mt-7 bg-white rounded-2xl"
className="flex justify-between rounded-2xl"
onClick={() => handleGetApi(0)}
>
<div className="flex p-2">
<div className="bg-gray-100 rounded-xl p-3 w-fit">
<p className="mb-0 text-center pt-3">
<PersianNumber number={1} style="text-[30px] " />
<div className="bg-secondary-50 rounded-lg w-[30px] h-[30px]">
<p className="mb-0 text-center pt-1 ">
<PersianNumber number={1} style="!text-[20px] " />
</p>
</div>
<div className="m-2">
<h4 className="text-base font-bold">
مدیریت روتین های مجموعه
</h4>
<p className="mb-0 text-[10px] opacity-90 ">
شما
<strong className="mx-1 text-primary-300">
{/* <PersianNumber number={routinesData?.length} /> */}
</strong>
روتین فعال دارید
</p>
<div className="pt-1 pr-2 ">
<h4 className="text-sm font-bold">مدیریت روتین های مجموعه</h4>
</div>
</div>
{HasPermission("ManageRoutines", permissions) && (
@ -117,12 +115,12 @@ const Employees = (props) => {
{" "}
{activeSection == 0 ? (
<div
className="w-[40px] h-[40px] bg-gray-100 shadow-sm rounded-xl m-[15px] "
className="w-[30px] h-[30px] bg-secondary-50 shadow-sm rounded-lg mt-2 ml-3 "
onClick={() => CTX.setBottomSheetCreateRoutineOpen(true)}
>
<svg
width="22"
height="22"
width="15"
height="15"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
@ -146,64 +144,25 @@ const Employees = (props) => {
{activeSection == 0 && <RoutineEmployees />}
</div>
{/* <div className="flex justify-between mt-3">
<div>
<h4 className="text-base font-bold">مدیریت نقش های مجموعه</h4>
<p className="mb-0 text-[10px] opacity-90 ">
شما
<strong className="mx-1 text-primary-300">
<PersianNumber number={rolesData?.length} />
</strong>
نقش فعال دارید
</p>
</div>
<div
className={` ${
activeSection == 1
? "bg-secondary-50 rounded-b-2xl"
: "border-b border-gray-200 p-2"
}`}
>
<div
className="w-[40px] h-[40px] bg-white shadow-sm rounded-xl "
onClick={() => CTX.setBottomSheetCreateRoleOpen(true)}
>
<svg
width="22"
height="22"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="mx-auto mt-2 opacity-70"
>
<path
d="M8 1V15M1 8H15"
stroke="#2B2B2B"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
</div>
</div>
<RolesEmployees /> */}
<div>
<div
className="flex justify-between mt-7 bg-white rounded-2xl"
className="flex justify-between rounded-2xl"
onClick={() => handleGetApi(1)}
>
<div className="flex p-2">
<div className="bg-gray-100 rounded-xl p-3 w-fit">
<p className="mb-0 text-center pt-3">
<PersianNumber number={2} style="text-[30px] " />
<div className="bg-secondary-50 rounded-lg w-[30px] h-[30px]">
<p className="mb-0 text-center pt-1 ">
<PersianNumber number={2} style="!text-[20px] " />
</p>
</div>
<div className="m-2">
<h4 className="text-base font-bold">مدیریت سکشن ها مجموعه</h4>
<p className="mb-0 text-[10px] opacity-90 ">
شما
<strong className="mx-1 text-primary-300">
{/* <PersianNumber number={sectionsData?.length} /> */}
</strong>
سکشن فعال دارید
</p>
<div className="pt-1 pr-2 ">
<h4 className="text-sm font-bold">مدیریت سکشن های مجموعه</h4>
</div>
</div>
@ -211,12 +170,12 @@ const Employees = (props) => {
<>
{activeSection == 1 ? (
<div
className="w-[40px] h-[40px] bg-gray-100 shadow-sm rounded-xl m-[15px] "
className="w-[30px] h-[30px] bg-secondary-50 shadow-sm rounded-lg mt-2 ml-3 "
onClick={() => CTX.setBottomSheetCreateSectionOpen(true)}
>
<svg
width="22"
height="22"
width="15"
height="15"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
@ -239,29 +198,22 @@ const Employees = (props) => {
</div>
{activeSection == 1 && <SectionEmployees />}
</div>
<div>
<div
className="flex justify-between mt-7 bg-white rounded-2xl"
onClick={() => handleGetApi(2)}
>
<div
className={` ${
activeSection == 2
? "bg-secondary-50 rounded-b-2xl"
: "border-b border-gray-200 p-2"
}`}
>
<div className="flex justify-between" onClick={() => handleGetApi(2)}>
<div className="flex p-2">
<div className="bg-gray-100 rounded-xl p-3 w-fit">
<p className="mb-0 text-center pt-3">
<PersianNumber number={3} style="text-[30px] " />
<div className="bg-secondary-50 rounded-lg w-[30px] h-[30px]">
<p className="mb-0 text-center pt-1 ">
<PersianNumber number={3} style="!text-[20px] " />
</p>
</div>
<div className="m-2">
<h4 className="text-base font-bold">
مدیریت پوزیشن های مجموعه
</h4>
<p className="mb-0 text-[10px] opacity-90 ">
شما
<strong className="mx-1 text-primary-300">
{/* <PersianNumber number={positionsData?.length} /> */}
</strong>
پوزیشن فعال دارید
</p>
<div className="pt-1 pr-2 ">
<h4 className="text-sm font-bold">مدیریت پوزیشن های مجموعه</h4>
</div>
</div>
@ -269,12 +221,12 @@ const Employees = (props) => {
<>
{activeSection == 2 ? (
<div
className="w-[40px] h-[40px] bg-gray-100 shadow-sm rounded-xl m-[15px] "
className="w-[30px] h-[30px] bg-secondary-50 shadow-sm rounded-lg mt-2 ml-3 "
onClick={() => CTX.setBottomSheetCreatePositionOpen(true)}
>
<svg
width="22"
height="22"
width="15"
height="15"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
@ -297,27 +249,25 @@ const Employees = (props) => {
</div>
{activeSection == 2 && <PositionEmployees />}
</div>
<div>
<div
className={` ${
activeSection == 3
? "bg-secondary-50 rounded-b-2xl pb-3"
: "border-b border-gray-200 p-2"
}`}
>
<div
className="flex justify-between mt-7 bg-white rounded-2xl"
className="flex justify-between "
onClick={() => handleGetApi(3)}
>
<div className="flex p-2">
<div className="bg-gray-100 rounded-xl p-3 w-fit">
<p className="mb-0 text-center pt-3">
<PersianNumber number={4} style="text-[30px] " />
<div className="bg-secondary-50 rounded-lg w-[30px] h-[30px]">
<p className="mb-0 text-center pt-1 ">
<PersianNumber number={4} style="!text-[20px] " />
</p>
</div>
<div className="m-2">
<h4 className="text-base font-bold">مدیریت کارکنان مجموعه</h4>
<p className="mb-0 text-[10px] opacity-90 ">
شما
<strong className="mx-1 text-primary-300">
{/* <PersianNumber number={usersData?.length} /> */}
</strong>
کارمند فعال دارید
</p>
<div className="pt-1 pr-2 ">
<h4 className="text-sm font-bold">مدیریت کارکنان مجموعه</h4>
</div>
</div>
@ -325,12 +275,12 @@ const Employees = (props) => {
<>
{activeSection == 3 ? (
<div
className="w-[40px] h-[40px] bg-gray-100 shadow-sm rounded-xl m-[15px] "
className="w-[30px] h-[30px] bg-secondary-50 shadow-sm rounded-lg mt-2 ml-3 "
onClick={() => CTX.setBottomSheetCreateEmployeesOpen(true)}
>
<svg
width="22"
height="22"
width="15"
height="15"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
@ -353,27 +303,25 @@ const Employees = (props) => {
</div>
{activeSection == 3 && <UsersEmployees />}
</div>
<div>
<div
className={` ${
activeSection == 4
? "bg-secondary-50 rounded-b-2xl pb-3"
: "border-b border-gray-200 p-2"
}`}
>
<div
className="flex justify-between mt-7 bg-white rounded-2xl"
className="flex justify-between "
onClick={() => handleGetApi(4)}
>
<div className="flex p-2">
<div className="bg-gray-100 rounded-xl p-3 w-fit">
<p className="mb-0 text-center pt-3">
<div className="bg-secondary-50 rounded-lg w-[30px] h-[30px]">
<p className="mb-0 text-center pt-1 ">
<PersianNumber number={5} style="text-[30px] " />
</p>
</div>
<div className="m-2">
<h4 className="text-base font-bold">مدیریت شیفت های مجموعه</h4>
<p className="mb-0 text-[10px] opacity-90 ">
شما
<strong className="mx-1 text-primary-300">
{/* <PersianNumber number={shiftsData?.length} /> */}
</strong>
شیفت فعال دارید
</p>
<div className="pt-1 pr-2 ">
<h4 className="text-sm font-bold">مدیریت شیفت های مجموعه</h4>
</div>
</div>
@ -381,12 +329,12 @@ const Employees = (props) => {
<>
{activeSection == 4 ? (
<div
className="w-[40px] h-[40px] bg-gray-100 shadow-sm rounded-xl m-[15px] "
className="w-[30px] h-[30px] bg-secondary-50 shadow-sm rounded-lg mt-2 ml-3 "
onClick={() => CTX.setBottomSheetCreateShiftsOpen(true)}
>
<svg
width="22"
height="22"
width="15"
height="15"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"

View File

@ -16,6 +16,9 @@ import BottomSheetChangeRole from "plugins/BottomSheet/BottomSheetChangeRole";
import HasPermission from "plugins/HasPermission/page";
import Avatar from "boring-avatars";
import moment from "jalali-moment";
import CoffeeBrewCard from "@comp/CoffeeBrew/CoffeeBrewCard/page";
import FormatJalaliDate from "plugins/FormatJalaliDate/page";
import { useState } from "react";
ChartJS.register(ArcElement, Tooltip, Legend);
@ -23,26 +26,23 @@ const Home = (props) => {
const CTX = useContext(AppContext);
const router = useRouter();
const homePageData = CTX.state.homePageData;
const latesCoffeeBrewData = CTX.state.latesCoffeeBrewData;
const profile = CTX.state.profile;
const [activeShiftPlanHome, setActiveShiftPlanHome] = useState(-1);
useEffect(() => {
CTX.GetHomePageData();
CTX.GetLatesCoffeeBrewData();
}, []);
const dataChart = useMemo(() => {
const dataChart = (totalActivitiesCount, doneActivitiesCount) => {
const data = {
datasets: [
{
label: ["", " "],
data: [
homePageData?.totalActivitiesToday,
homePageData?.doneActivitiesToday,
],
backgroundColor: [
"rgba(203, 203, 203, 0.38)",
"rgba(222, 193, 72, 1)",
],
data: [totalActivitiesCount, doneActivitiesCount],
backgroundColor: ["rgba(203, 203, 203, 0.28)", "#9bd19d"],
borderColor: ["transparent"],
cutout: 35,
},
@ -50,14 +50,11 @@ const Home = (props) => {
};
return data;
}, [homePageData]);
};
const percentage = useMemo(() => {
return (
(homePageData?.doneActivitiesToday / homePageData?.totalActivitiesToday) *
100
);
}, [homePageData?.doneActivitiesToday, homePageData?.totalActivitiesToday]);
const percentage = (totalActivitiesCount, doneActivitiesCount) => {
return (doneActivitiesCount / totalActivitiesCount) * 100;
};
const handleGoToReport = () => {
CTX.setReportDetail({
@ -68,25 +65,8 @@ const Home = (props) => {
CTX.setBottomSheetReportOpen(true);
};
const formatJalaliDate = (date) => {
const jalaliDateDay = moment(date).locale("fa").format("jD");
const jalaliDateYear = moment(date).locale("fa").format("jYYYY");
// Extract day name
const dayName = moment(date).locale("fa").format("dddd");
// Map English day names to Persian
// Get the Persian day name
// Extract month name
const monthName = moment(date).locale("fa").format("jMMMM");
return `${dayName} ${jalaliDateDay} ${monthName} ${jalaliDateYear}`;
};
const today = new Date();
const formattedDate = formatJalaliDate(today);
const formattedDate = FormatJalaliDate(today);
return (
<div className="pb-20">
@ -104,394 +84,409 @@ const Home = (props) => {
}
/>
<div className="bg-body-100 relative top-[-30px] rounded-t-3xl overflow-hidden p-5 rtl">
<div className="p-3 text-right flex">
<div className="relative mt-1 ml-1 ">
<div className="blink_me w-3 h-3 rounded-full bg-green-600 "></div>
</div>
<div className="bg-white overflow-hidden p-5 rtl">
<div className="px-3 text-right flex">
<div>
<h3 className=" text-sm font-bold">
<h3 className=" text-[14px] font-medium">
<PersianNumber number={formattedDate} />
</h3>
<p className="mb-0 text-sm text-gray-600">
<p className="mb-0 text-[12px] text-gray-500">
{homePageData?.currentShift}-{homePageData?.currentPosition}
</p>
</div>
</div>
{homePageData?.totalStaffToday > 0 && (
<div>
<div className="bg-white pt-4 pb-5 px-5 rounded-full shadow">
<div className="flex justify-between">
<div className="flex mt-[-3px]">
{homePageData?.todayStaffNames
?.slice(0, 4)
.map((e, index) => (
<div
className={`w-[50px] h-[50px] rounded-full bg-white border-[5px] absolute ${
index == 0
? "avatarHomePage-0"
: index === 1
? "avatarHomePage-1"
: index === 2
? "avatarHomePage-2"
: index === 3
? "avatarHomePage-3"
: "avatarHomePage-0"
}`}
>
<div className=" rounded-full z-10 ">
<Avatar
size={40}
name={e}
variant="beam"
colors={["#9d9f88", "#83af96", "#b2de93"]}
/>
</div>
</div>
))}
</div>
<div className="mt-3 ml-[20px]">
<h2 className="font-bold text-gray-600">
<div className="">
<div className="flex justify-between mt-4">
<div className=" w-full">
<div className=" p-3 rounded-2xl">
<div>
<p className="mb-0 text-[12px] mt-3 font-medium text-center">
<PersianNumber
number={homePageData?.totalStaffToday}
style={"!text-[25px] font-bold ml-1"}
number={homePageData?.totalActivitiesToday}
style={"!text-[25px] font-bold ml-2 "}
/>
کارمند در مجموعه
</h2>
</div>
</div>
</div>
</div>
)}
<div className="mt-5">
<div className="grid xs:grid-cols-2 gap-4 rtl">
<div>
<div className="bg-dahs-chart rounded-2xl p-2 h-[195px]">
{homePageData?.totalActivitiesToday > 0 ? (
<>
<div className="flex justify-center ">
<div className="absolute mt-[40px]">
<h2 className="text-lg text-white">
<PersianNumber number={Math.floor(percentage)} />
<small className="text-white text-[11px] ml-1">
%
</small>
</h2>
</div>
</div>
<div className="flex justify-center">
<div className="w-[100px]">
<Doughnut data={dataChart} />
</div>
</div>
<div className="mt-3">
<p className="mb-0 text-gray-200 text-[12px] text-center">
مجموعه شما امروز
<PersianNumber
number={homePageData?.unDoneActivitiesToday}
style="!text-[10px] mx-[3px]"
/>
فعالیت فعال دارد
</p>
</div>
</>
) : (
<div className="mt-20">
<p className="mb-0 text-gray-200 text-[12px] text-center">
شما شیفت بازی ندارید
</p>
</div>
)}
</div>
<Link href={"/shifts/complete-shift"}>
<div className="bg-[#d4818138] p-4 rounded-2xl mt-4">
<p className="mb-0 text-center text-[#c20000] text-sm font-medium">
بستن شیفت
کل فعالیت های امروز{" "}
</p>
</div>
</Link>
</div>
</div>
<div className="">
<div className="bg-[#d19751] p-3 rounded-2xl">
<div className="flex justify-end ml-2">
<svg
width="30"
height="36"
viewBox="0 0 250 226"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="opacity-50"
>
<path
d="M246.5 100.625L196.375 13.1249C194.231 9.27721 191.093 6.0758 187.289 3.85501C183.485 1.63421 179.155 0.475501 174.75 0.499889H75C70.5953 0.475501 66.2649 1.63421 62.461 3.85501C58.657 6.0758 55.5191 9.27721 53.375 13.1249L34.25 46.4999L24.25 63.8749L3.25002 100.625C1.129 104.405 0.010209 108.665 2.51422e-05 113C-0.00611845 117.337 1.11374 121.601 3.25002 125.375L24.25 162.125L34.25 179.5L53.375 212.875C55.5191 216.723 58.657 219.924 62.461 222.145C66.2649 224.366 70.5953 225.524 75 225.5H174.75C179.155 225.524 183.485 224.366 187.289 222.145C191.093 219.924 194.231 216.723 196.375 212.875L246.5 125.375C248.636 121.601 249.756 117.337 249.75 113C249.784 108.66 248.663 104.388 246.5 100.625ZM191.7 175.3L191.775 175.25L191.725 175.337L191.7 175.3ZM228.5 113L191.813 175.175C190.338 175.3 188.888 175.5 187.375 175.5C171.025 175.49 155.331 169.065 143.668 157.607C132.004 146.149 125.301 130.572 125 114.225V112.75C124.921 96.2213 118.303 80.396 106.592 68.7318C94.8805 57.0676 79.0288 50.5129 62.5 50.4999C61.2027 50.5568 59.9092 50.682 58.625 50.8749L73.625 25.4999H176.875L228.625 113H228.5Z"
fill="#EBEBEB"
/>
</svg>
</div>
<div className="flex justify-start">
<div className="absolute mt-[-35px] ml-3">
<h2 className="mb-0 text-4xl">
<PersianNumber
number={homePageData?.totalShiftToday}
style={
"!text-[25px] text-white font-bold text-gray-200"
}
/>
</h2>
</div>
</div>
<div className="w-[2px] h-9 bg-primary-200 opacity-75 mt-4"></div>
<div className=" w-full">
<div className=" p-3 rounded-2xl">
<div>
<p className="mb-0 text-white text-[12px] mt-3 font-medium">
<p className="mb-0 text-black text-[12px] mt-3 font-medium text-center">
<PersianNumber
number={homePageData?.totalShiftToday}
style={"!text-[25px] font-bold ml-2"}
/>
کل شیفت های امروز{" "}
</p>
</div>
</div>
<div className="bg-[#279e96] p-3 rounded-2xl mt-3">
<div className="flex justify-end ml-2">
</div>
</div>
<div className="col-span-2 mt-5">
<Link href={"/coffee-brew"}>
<CoffeeBrewCard data={latesCoffeeBrewData} />
</Link>
</div>
<div className="col-span-2">
{homePageData?.shiftPlans?.map((e, index) => (
<>
<div
className="flex justify-between mt-5 bg-gray-50 p-2 rounded-xl"
onClick={() => setActiveShiftPlanHome(index)}
>
<div className="flex">
{homePageData?.currentShiftId == e.id && (
<div className="relative mt-1 ml-1 ">
<div className="blink_me w-3 h-3 rounded-full bg-green-600 "></div>
</div>
)}
<p className="mb-0 text-sm">{e.shiftTitle} </p>
</div>
<div className="bg-gray-100 w-[30px] h-[30px] rounded-xl">
<svg
width="13"
height="13"
viewBox="0 0 151 89"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="opacity-80 mt-2 mx-auto"
>
<path
d="M13.0444 13.1674L75.3606 75.8506L138.044 13.5345"
stroke="#424242"
stroke-opacity="0.81"
stroke-width="25"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
</div>
</div>
{activeShiftPlanHome == index && (
<>
<div className="flex justify-between">
<div className="w-full">
<div className=" p-1 rounded-2xl">
<div>
<p className="mb-0 text-black text-[12px] mt-3 font-medium text-center">
<PersianNumber
number={e.totalActivitiesCount}
style={"!text-[22px] font-bold ml-2"}
/>
کل اکتیویتی های{" "}
</p>
</div>
</div>
<div className="w-[180px] mx-auto h-[1px] bg-primary-200 opacity-75 mt-4"></div>
<div className=" p-1 rounded-2xl">
<div>
<p className="mb-0 text-black text-[12px] mt-3 font-medium text-center">
<PersianNumber
number={e.doneActivitiesCount}
style={"!text-[22px] font-bold ml-2"}
/>
اکتیویتی انجام شده{" "}
</p>
</div>
</div>
<div className="w-[180px] mx-auto h-[1px] bg-primary-200 opacity-75 mt-4"></div>
<div className=" p-1 pb-5 rounded-2xl">
<div>
<p className="mb-0 text-black text-[12px] mt-3 font-medium text-center">
<PersianNumber
number={e.undoneActivitiesCount}
style={"!text-[22px] font-bold ml-2"}
/>
اکتیویتی انجام نشده{" "}
</p>
</div>
</div>
</div>
<div className="w-[1px] bg-primary-300 opacity-75 mt-4"></div>
<div className=" w-full rounded-2xl p-2">
{e?.totalActivitiesCount > 0 ? (
<>
<div className="flex justify-center ">
<div className="absolute mt-[40px]">
<h2 className="text-lg text-black">
<PersianNumber
number={Math.floor(
percentage(
e.totalActivitiesCount,
e.doneActivitiesCount
)
)}
/>
<small className="text-black text-[11px] ml-1">
%
</small>
</h2>
</div>
</div>
<div className="flex justify-center">
<div className="w-[100px]">
<Doughnut
data={dataChart(
e.totalActivitiesCount,
e.doneActivitiesCount
)}
/>
</div>
</div>
<div className="mt-3">
<p className="mb-0 text-black text-[12px] text-center">
درصد پیشرفت شیفت
</p>
</div>
</>
) : (
<div className="mt-20">
<p className="mb-0 text-gray-200 text-[12px] text-center">
شما شیفت بازی ندارید
</p>
</div>
)}
</div>
</div>
{/* line */}
<div className="w-full mx-auto h-[1px] bg-primary-200 opacity-75 "></div>
{/* user */}
<div className="flex p-2 rounded-2xl flex-wrap">
{e.users.map((user) => (
<div className="flex bg-gray-50 p-1 rounded-full m-1 justify-start mb-2 w-fit ">
<div className="w-[30px] h-[30px] rounded-full bg-gray-400 ">
<Avatar
size={30}
name={user.userFullName}
variant="beam"
colors={["#9d9f88", "#83af96", "#b2de93"]}
/>
</div>
<div>
<p className="mb-0 px-3 text-sm mt-1">
{user.userFullName}{" "}
</p>
</div>
</div>
))}
<div className="flex bg-primary-400 p-1 rounded-full m-1 justify-start mb-2 w-fit ">
<div className="px-4 h-[30px] rounded-full bg-primary-200 ">
<p className="mb-0 text-center mt-[2px] text-sm">
سوپروایزر
</p>
</div>
<div>
<p className="mb-0 px-3 text-sm mt-1 text-white">
{e.supervisorFullName}
</p>
</div>
</div>
</div>
</>
)}
</>
))}
<h3 className="text-right p-3 font-medium mt-4 text-sm">
گزارش های مجموعه
</h3>
<div className="rtl mt-2">
<div className="flex ">
<div className="w-[50px] h-[50px] rounded-2xl bg-white shadow">
<svg
width="30"
height="36"
width="25"
height="25"
viewBox="0 0 251 226"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="opacity-50"
className="mx-auto mt-3"
s
>
<path
d="M246.65 100.5L196.612 13.0002C194.463 9.19349 191.338 6.02857 187.559 3.83143C183.78 1.63429 179.483 0.48438 175.112 0.50016H75.062C70.6812 0.545125 66.3859 1.71914 62.5912 3.9088C58.7966 6.09846 55.6307 9.22974 53.3995 13.0002L3.36204 100.5C1.16661 104.3 0.0107422 108.611 0.0107422 113C0.0107422 117.389 1.16661 121.7 3.36204 125.5L53.3995 213C55.6307 216.771 58.7966 219.902 62.5912 222.092C66.3859 224.281 70.6812 225.455 75.062 225.5H175.137C179.507 225.515 183.801 224.365 187.578 222.167C191.355 219.97 194.478 216.806 196.625 213L246.662 125.5C248.857 121.7 250.013 117.389 250.013 113C250.013 108.611 248.845 104.3 246.65 100.5ZM175 200.5H74.9995L24.9995 113L74.9995 25.5002H175L225 113L175 200.5Z"
fill="#EBEBEB"
fill="#ABABAB"
/>
<path
d="M112 63.5C112 56.5964 117.596 51 124.5 51V51C131.404 51 137 56.5964 137 63.5V126C137 132.904 131.404 138.5 124.5 138.5V138.5C117.596 138.5 112 132.904 112 126V63.5Z"
fill="#ABABAB"
/>
<path
d="M124.5 173C131.404 173 137 167.404 137 160.5C137 153.596 131.404 148 124.5 148C117.596 148 112 153.596 112 160.5C112 167.404 117.596 173 124.5 173Z"
fill="#ABABAB"
/>
</svg>
</div>
<div className="flex justify-start">
<div className="absolute mt-[-35px] ml-3">
<h2 className="mb-0 text-4xl">
<PersianNumber
number={homePageData?.totalActivitiesToday}
style={"!text-[25px] font-bold text-gray-200"}
/>
</h2>
</div>
</div>
<div>
<p className="mb-0 text-gray-100 text-[12px] mt-3">
کل فعالیت های امروز{" "}
<div className="mx-2 mt-1" onClick={() => handleGoToReport()}>
<h3 className="text-sm font-bold "> فعالیت ها </h3>
<p className="mb-0 text-right text-sm text-gray-500">
خروجی اکسل
</p>
</div>
</div>{" "}
<Link href={"/tasks/add-task?new=true"}>
<div className="bg-[#75a29f46] p-4 rounded-2xl mt-4">
<p className="mb-0 text-center text-[#006e67] text-sm font-medium">
افزودن تسک{" "}
</div>
</div>
<div className="rtl mt-2">
<div className="flex ">
<div className="w-[50px] h-[50px] rounded-2xl bg-white shadow">
<svg
width="25"
height="25"
viewBox="0 0 251 226"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="mx-auto mt-3"
s
>
<path
d="M246.65 100.5L196.612 13.0002C194.463 9.19349 191.338 6.02857 187.559 3.83143C183.78 1.63429 179.483 0.48438 175.112 0.50016H75.062C70.6812 0.545125 66.3859 1.71914 62.5912 3.9088C58.7966 6.09846 55.6307 9.22974 53.3995 13.0002L3.36204 100.5C1.16661 104.3 0.0107422 108.611 0.0107422 113C0.0107422 117.389 1.16661 121.7 3.36204 125.5L53.3995 213C55.6307 216.771 58.7966 219.902 62.5912 222.092C66.3859 224.281 70.6812 225.455 75.062 225.5H175.137C179.507 225.515 183.801 224.365 187.578 222.167C191.355 219.97 194.478 216.806 196.625 213L246.662 125.5C248.857 121.7 250.013 117.389 250.013 113C250.013 108.611 248.845 104.3 246.65 100.5ZM175 200.5H74.9995L24.9995 113L74.9995 25.5002H175L225 113L175 200.5Z"
fill="#ABABAB"
/>
<path
d="M112 63.5C112 56.5964 117.596 51 124.5 51V51C131.404 51 137 56.5964 137 63.5V126C137 132.904 131.404 138.5 124.5 138.5V138.5C117.596 138.5 112 132.904 112 126V63.5Z"
fill="#ABABAB"
/>
<path
d="M124.5 173C131.404 173 137 167.404 137 160.5C137 153.596 131.404 148 124.5 148C117.596 148 112 153.596 112 160.5C112 167.404 117.596 173 124.5 173Z"
fill="#ABABAB"
/>
</svg>
</div>
<div
className="mx-2 mt-1"
onClick={() => CTX.setBottomSheetReportManageShiftOpen(true)}
>
<h3 className="text-sm font-bold "> شیفت های هفته</h3>
<p className="mb-0 text-right text-sm text-gray-500">
خروجی متن
</p>
</div>
</Link>
</div>
</div>
<div className="col-span-2">
<Link href={"/shifts/manage-shift"}>
<div className="bg-[#e29d494b] p-4 rounded-2xl ">
<p className="mb-0 text-center text-[#66451d] text-sm font-medium">
شیفت بندی هفته{" "}
<div className="rtl mt-4">
<div className="flex ">
<div className="w-[50px] h-[50px] rounded-2xl bg-white shadow">
<svg
width="25"
height="25"
viewBox="0 0 251 226"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="mx-auto mt-3 opacity-50"
s
>
<path
d="M246.65 100.5L196.612 13.0002C194.463 9.19349 191.338 6.02857 187.559 3.83143C183.78 1.63429 179.483 0.48438 175.112 0.50016H75.062C70.6812 0.545125 66.3859 1.71914 62.5912 3.9088C58.7966 6.09846 55.6307 9.22974 53.3995 13.0002L3.36204 100.5C1.16661 104.3 0.0107422 108.611 0.0107422 113C0.0107422 117.389 1.16661 121.7 3.36204 125.5L53.3995 213C55.6307 216.771 58.7966 219.902 62.5912 222.092C66.3859 224.281 70.6812 225.455 75.062 225.5H175.137C179.507 225.515 183.801 224.365 187.578 222.167C191.355 219.97 194.478 216.806 196.625 213L246.662 125.5C248.857 121.7 250.013 117.389 250.013 113C250.013 108.611 248.845 104.3 246.65 100.5ZM175 200.5H74.9995L24.9995 113L74.9995 25.5002H175L225 113L175 200.5Z"
fill="#ABABAB"
/>
<path
d="M112 63.5C112 56.5964 117.596 51 124.5 51V51C131.404 51 137 56.5964 137 63.5V126C137 132.904 131.404 138.5 124.5 138.5V138.5C117.596 138.5 112 132.904 112 126V63.5Z"
fill="#ABABAB"
/>
<path
d="M124.5 173C131.404 173 137 167.404 137 160.5C137 153.596 131.404 148 124.5 148C117.596 148 112 153.596 112 160.5C112 167.404 117.596 173 124.5 173Z"
fill="#ABABAB"
/>
</svg>
</div>
<div className="mx-2 mt-1 opacity-50">
<h3 className="text-sm font-bold "> شیفت های تمام شده </h3>
<p className="mb-0 text-right text-sm text-gray-500">
خروجی اکسل
</p>
</div>
</Link>
</div>
</div>
<h3 className="text-right p-3 font-medium mt-4">گزارش های مجموعه</h3>
<div className="rtl mt-2">
<div className="flex ">
<div className="w-[50px] h-[50px] rounded-2xl bg-white shadow">
<svg
width="25"
height="25"
viewBox="0 0 251 226"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="mx-auto mt-3"
s
>
<path
d="M246.65 100.5L196.612 13.0002C194.463 9.19349 191.338 6.02857 187.559 3.83143C183.78 1.63429 179.483 0.48438 175.112 0.50016H75.062C70.6812 0.545125 66.3859 1.71914 62.5912 3.9088C58.7966 6.09846 55.6307 9.22974 53.3995 13.0002L3.36204 100.5C1.16661 104.3 0.0107422 108.611 0.0107422 113C0.0107422 117.389 1.16661 121.7 3.36204 125.5L53.3995 213C55.6307 216.771 58.7966 219.902 62.5912 222.092C66.3859 224.281 70.6812 225.455 75.062 225.5H175.137C179.507 225.515 183.801 224.365 187.578 222.167C191.355 219.97 194.478 216.806 196.625 213L246.662 125.5C248.857 121.7 250.013 117.389 250.013 113C250.013 108.611 248.845 104.3 246.65 100.5ZM175 200.5H74.9995L24.9995 113L74.9995 25.5002H175L225 113L175 200.5Z"
fill="#ABABAB"
/>
<path
d="M112 63.5C112 56.5964 117.596 51 124.5 51V51C131.404 51 137 56.5964 137 63.5V126C137 132.904 131.404 138.5 124.5 138.5V138.5C117.596 138.5 112 132.904 112 126V63.5Z"
fill="#ABABAB"
/>
<path
d="M124.5 173C131.404 173 137 167.404 137 160.5C137 153.596 131.404 148 124.5 148C117.596 148 112 153.596 112 160.5C112 167.404 117.596 173 124.5 173Z"
fill="#ABABAB"
/>
</svg>
</div>
<div className="mx-2 mt-1" onClick={() => handleGoToReport()}>
<h3 className="text-sm font-bold "> فعالیت ها </h3>
<p className="mb-0 text-right text-sm text-gray-500">
خروجی اکسل
</p>
</div>
</div>
</div>
<div className="rtl mt-2">
<div className="flex ">
<div className="w-[50px] h-[50px] rounded-2xl bg-white shadow">
<svg
width="25"
height="25"
viewBox="0 0 251 226"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="mx-auto mt-3"
s
>
<path
d="M246.65 100.5L196.612 13.0002C194.463 9.19349 191.338 6.02857 187.559 3.83143C183.78 1.63429 179.483 0.48438 175.112 0.50016H75.062C70.6812 0.545125 66.3859 1.71914 62.5912 3.9088C58.7966 6.09846 55.6307 9.22974 53.3995 13.0002L3.36204 100.5C1.16661 104.3 0.0107422 108.611 0.0107422 113C0.0107422 117.389 1.16661 121.7 3.36204 125.5L53.3995 213C55.6307 216.771 58.7966 219.902 62.5912 222.092C66.3859 224.281 70.6812 225.455 75.062 225.5H175.137C179.507 225.515 183.801 224.365 187.578 222.167C191.355 219.97 194.478 216.806 196.625 213L246.662 125.5C248.857 121.7 250.013 117.389 250.013 113C250.013 108.611 248.845 104.3 246.65 100.5ZM175 200.5H74.9995L24.9995 113L74.9995 25.5002H175L225 113L175 200.5Z"
fill="#ABABAB"
/>
<path
d="M112 63.5C112 56.5964 117.596 51 124.5 51V51C131.404 51 137 56.5964 137 63.5V126C137 132.904 131.404 138.5 124.5 138.5V138.5C117.596 138.5 112 132.904 112 126V63.5Z"
fill="#ABABAB"
/>
<path
d="M124.5 173C131.404 173 137 167.404 137 160.5C137 153.596 131.404 148 124.5 148C117.596 148 112 153.596 112 160.5C112 167.404 117.596 173 124.5 173Z"
fill="#ABABAB"
/>
</svg>
</div>
<div
className="mx-2 mt-1"
onClick={() => CTX.setBottomSheetReportManageShiftOpen(true)}
>
<h3 className="text-sm font-bold ">
{" "}
شیفت های هفته <small className="text-red-500">(new)</small>
</h3>
<p className="mb-0 text-right text-sm text-gray-500">
خروجی متن
</p>
<div className="rtl mt-4">
<div className="flex ">
<div className="w-[50px] h-[50px] rounded-2xl bg-white shadow">
<svg
width="25"
height="25"
viewBox="0 0 251 226"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="mx-auto mt-3 opacity-50"
s
>
<path
d="M246.65 100.5L196.612 13.0002C194.463 9.19349 191.338 6.02857 187.559 3.83143C183.78 1.63429 179.483 0.48438 175.112 0.50016H75.062C70.6812 0.545125 66.3859 1.71914 62.5912 3.9088C58.7966 6.09846 55.6307 9.22974 53.3995 13.0002L3.36204 100.5C1.16661 104.3 0.0107422 108.611 0.0107422 113C0.0107422 117.389 1.16661 121.7 3.36204 125.5L53.3995 213C55.6307 216.771 58.7966 219.902 62.5912 222.092C66.3859 224.281 70.6812 225.455 75.062 225.5H175.137C179.507 225.515 183.801 224.365 187.578 222.167C191.355 219.97 194.478 216.806 196.625 213L246.662 125.5C248.857 121.7 250.013 117.389 250.013 113C250.013 108.611 248.845 104.3 246.65 100.5ZM175 200.5H74.9995L24.9995 113L74.9995 25.5002H175L225 113L175 200.5Z"
fill="#ABABAB"
/>
<path
d="M112 63.5C112 56.5964 117.596 51 124.5 51V51C131.404 51 137 56.5964 137 63.5V126C137 132.904 131.404 138.5 124.5 138.5V138.5C117.596 138.5 112 132.904 112 126V63.5Z"
fill="#ABABAB"
/>
<path
d="M124.5 173C131.404 173 137 167.404 137 160.5C137 153.596 131.404 148 124.5 148C117.596 148 112 153.596 112 160.5C112 167.404 117.596 173 124.5 173Z"
fill="#ABABAB"
/>
</svg>
</div>
<div className="mx-2 mt-1 opacity-50">
<h3 className="text-sm font-bold "> شیفت های مجموعه </h3>
<p className="mb-0 text-right text-sm text-gray-500">
خروجی اکسل
</p>
</div>
</div>
</div>
</div>
<div className="rtl mt-4">
<div className="flex ">
<div className="w-[50px] h-[50px] rounded-2xl bg-white shadow">
<svg
width="25"
height="25"
viewBox="0 0 251 226"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="mx-auto mt-3 opacity-50"
s
>
<path
d="M246.65 100.5L196.612 13.0002C194.463 9.19349 191.338 6.02857 187.559 3.83143C183.78 1.63429 179.483 0.48438 175.112 0.50016H75.062C70.6812 0.545125 66.3859 1.71914 62.5912 3.9088C58.7966 6.09846 55.6307 9.22974 53.3995 13.0002L3.36204 100.5C1.16661 104.3 0.0107422 108.611 0.0107422 113C0.0107422 117.389 1.16661 121.7 3.36204 125.5L53.3995 213C55.6307 216.771 58.7966 219.902 62.5912 222.092C66.3859 224.281 70.6812 225.455 75.062 225.5H175.137C179.507 225.515 183.801 224.365 187.578 222.167C191.355 219.97 194.478 216.806 196.625 213L246.662 125.5C248.857 121.7 250.013 117.389 250.013 113C250.013 108.611 248.845 104.3 246.65 100.5ZM175 200.5H74.9995L24.9995 113L74.9995 25.5002H175L225 113L175 200.5Z"
fill="#ABABAB"
/>
<path
d="M112 63.5C112 56.5964 117.596 51 124.5 51V51C131.404 51 137 56.5964 137 63.5V126C137 132.904 131.404 138.5 124.5 138.5V138.5C117.596 138.5 112 132.904 112 126V63.5Z"
fill="#ABABAB"
/>
<path
d="M124.5 173C131.404 173 137 167.404 137 160.5C137 153.596 131.404 148 124.5 148C117.596 148 112 153.596 112 160.5C112 167.404 117.596 173 124.5 173Z"
fill="#ABABAB"
/>
</svg>
</div>
<div className="mx-2 mt-1 opacity-50">
<h3 className="text-sm font-bold "> شیفت های تمام شده </h3>
<p className="mb-0 text-right text-sm text-gray-500">
خروجی اکسل
</p>
</div>
</div>
</div>
<div className="rtl mt-4">
<div className="flex ">
<div className="w-[50px] h-[50px] rounded-2xl bg-white shadow">
<svg
width="25"
height="25"
viewBox="0 0 251 226"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="mx-auto mt-3 opacity-50"
s
>
<path
d="M246.65 100.5L196.612 13.0002C194.463 9.19349 191.338 6.02857 187.559 3.83143C183.78 1.63429 179.483 0.48438 175.112 0.50016H75.062C70.6812 0.545125 66.3859 1.71914 62.5912 3.9088C58.7966 6.09846 55.6307 9.22974 53.3995 13.0002L3.36204 100.5C1.16661 104.3 0.0107422 108.611 0.0107422 113C0.0107422 117.389 1.16661 121.7 3.36204 125.5L53.3995 213C55.6307 216.771 58.7966 219.902 62.5912 222.092C66.3859 224.281 70.6812 225.455 75.062 225.5H175.137C179.507 225.515 183.801 224.365 187.578 222.167C191.355 219.97 194.478 216.806 196.625 213L246.662 125.5C248.857 121.7 250.013 117.389 250.013 113C250.013 108.611 248.845 104.3 246.65 100.5ZM175 200.5H74.9995L24.9995 113L74.9995 25.5002H175L225 113L175 200.5Z"
fill="#ABABAB"
/>
<path
d="M112 63.5C112 56.5964 117.596 51 124.5 51V51C131.404 51 137 56.5964 137 63.5V126C137 132.904 131.404 138.5 124.5 138.5V138.5C117.596 138.5 112 132.904 112 126V63.5Z"
fill="#ABABAB"
/>
<path
d="M124.5 173C131.404 173 137 167.404 137 160.5C137 153.596 131.404 148 124.5 148C117.596 148 112 153.596 112 160.5C112 167.404 117.596 173 124.5 173Z"
fill="#ABABAB"
/>
</svg>
</div>
<div className="mx-2 mt-1 opacity-50">
<h3 className="text-sm font-bold ">
{" "}
شیفت های مجموعه{" "}
<small className="text-red-500">(به زودی)</small>
</h3>
<p className="mb-0 text-right text-sm text-gray-500">
خروجی اکسل
</p>
</div>
</div>
</div>
<div className="rtl mt-4">
<div className="flex ">
<div className="w-[50px] h-[50px] rounded-2xl bg-white shadow">
<svg
width="25"
height="25"
viewBox="0 0 251 226"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="mx-auto mt-3 opacity-50"
s
>
<path
d="M246.65 100.5L196.612 13.0002C194.463 9.19349 191.338 6.02857 187.559 3.83143C183.78 1.63429 179.483 0.48438 175.112 0.50016H75.062C70.6812 0.545125 66.3859 1.71914 62.5912 3.9088C58.7966 6.09846 55.6307 9.22974 53.3995 13.0002L3.36204 100.5C1.16661 104.3 0.0107422 108.611 0.0107422 113C0.0107422 117.389 1.16661 121.7 3.36204 125.5L53.3995 213C55.6307 216.771 58.7966 219.902 62.5912 222.092C66.3859 224.281 70.6812 225.455 75.062 225.5H175.137C179.507 225.515 183.801 224.365 187.578 222.167C191.355 219.97 194.478 216.806 196.625 213L246.662 125.5C248.857 121.7 250.013 117.389 250.013 113C250.013 108.611 248.845 104.3 246.65 100.5ZM175 200.5H74.9995L24.9995 113L74.9995 25.5002H175L225 113L175 200.5Z"
fill="#ABABAB"
/>
<path
d="M112 63.5C112 56.5964 117.596 51 124.5 51V51C131.404 51 137 56.5964 137 63.5V126C137 132.904 131.404 138.5 124.5 138.5V138.5C117.596 138.5 112 132.904 112 126V63.5Z"
fill="#ABABAB"
/>
<path
d="M124.5 173C131.404 173 137 167.404 137 160.5C137 153.596 131.404 148 124.5 148C117.596 148 112 153.596 112 160.5C112 167.404 117.596 173 124.5 173Z"
fill="#ABABAB"
/>
</svg>
</div>
<div className="mx-2 mt-1 opacity-50">
<h3 className="text-sm font-bold ">
{" "}
کاست تمام شده آیتم ها{" "}
<small className="text-red-500">(به زودی)</small>
</h3>
<p className="mb-0 text-right text-sm text-gray-500">
خروجی اکسل
</p>
<div className="rtl mt-4">
<div className="flex ">
<div className="w-[50px] h-[50px] rounded-2xl bg-white shadow">
<svg
width="25"
height="25"
viewBox="0 0 251 226"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="mx-auto mt-3 opacity-50"
s
>
<path
d="M246.65 100.5L196.612 13.0002C194.463 9.19349 191.338 6.02857 187.559 3.83143C183.78 1.63429 179.483 0.48438 175.112 0.50016H75.062C70.6812 0.545125 66.3859 1.71914 62.5912 3.9088C58.7966 6.09846 55.6307 9.22974 53.3995 13.0002L3.36204 100.5C1.16661 104.3 0.0107422 108.611 0.0107422 113C0.0107422 117.389 1.16661 121.7 3.36204 125.5L53.3995 213C55.6307 216.771 58.7966 219.902 62.5912 222.092C66.3859 224.281 70.6812 225.455 75.062 225.5H175.137C179.507 225.515 183.801 224.365 187.578 222.167C191.355 219.97 194.478 216.806 196.625 213L246.662 125.5C248.857 121.7 250.013 117.389 250.013 113C250.013 108.611 248.845 104.3 246.65 100.5ZM175 200.5H74.9995L24.9995 113L74.9995 25.5002H175L225 113L175 200.5Z"
fill="#ABABAB"
/>
<path
d="M112 63.5C112 56.5964 117.596 51 124.5 51V51C131.404 51 137 56.5964 137 63.5V126C137 132.904 131.404 138.5 124.5 138.5V138.5C117.596 138.5 112 132.904 112 126V63.5Z"
fill="#ABABAB"
/>
<path
d="M124.5 173C131.404 173 137 167.404 137 160.5C137 153.596 131.404 148 124.5 148C117.596 148 112 153.596 112 160.5C112 167.404 117.596 173 124.5 173Z"
fill="#ABABAB"
/>
</svg>
</div>
<div className="mx-2 mt-1 opacity-50">
<h3 className="text-sm font-bold ">
{" "}
کاست تمام شده آیتم ها{" "}
</h3>
<p className="mb-0 text-right text-sm text-gray-500">
خروجی اکسل
</p>
</div>
</div>
</div>
</div>

View File

@ -163,6 +163,8 @@ export default function RootLayout({ children }) {
//home page
const [homePageData, setHomePageData] = useState([]);
const [coffeeBrewData, setCoffeeBrewData] = useState([]);
const [latesCoffeeBrewData, setLatesCoffeeBrewData] = useState([]);
const pathname = usePathname();
const router = useRouter();
@ -1502,6 +1504,42 @@ export default function RootLayout({ children }) {
}
};
const GetCoffeeBrewData = async () => {
setLoading(true);
try {
const data = await Chapar.get(
`${process.env.NEXT_PUBLIC_API_URL}/brew/CoffeeBrew`
);
setCoffeeBrewData(data);
setLoading(false);
} catch ({ error, status }) {
toast.error(`${error?.response?.data?.message}`, {
position: "bottom-right",
closeOnClick: true,
});
setLoading(false);
}
};
const GetLatesCoffeeBrewData = async () => {
setLoading(true);
try {
const data = await Chapar.get(
`${process.env.NEXT_PUBLIC_API_URL}/brew/CoffeeBrew/latest`
);
setLatesCoffeeBrewData(data);
setLoading(false);
} catch ({ error, status }) {
toast.error(`${error?.response?.data?.message}`, {
position: "bottom-right",
closeOnClick: true,
});
setLoading(false);
}
};
useEffect(() => {
console.log(`
bbbbbbbb
@ -1612,6 +1650,8 @@ export default function RootLayout({ children }) {
homePageData,
typeTask,
BottomSheetReportManageShiftOpen,
coffeeBrewData,
latesCoffeeBrewData,
},
setBottomSheetCreateRoleOpen,
setBottomSheetCreateEmployeesOpen,
@ -1738,6 +1778,10 @@ export default function RootLayout({ children }) {
GetHomePageData,
setTypeTask,
setBottomSheetReportManageShiftOpen,
setCoffeeBrewData,
GetCoffeeBrewData,
GetLatesCoffeeBrewData,
setLatesCoffeeBrewData,
}}
>
<html lang="en">

View File

@ -1,7 +1,7 @@
"use client";
import React, { useContext, useEffect, useState } from "react";
import task from "@img/logo-t.png";
import task from "@img/logo2.png";
import Image from "next/image";
import LoginStep from "@comp/LoginComponents/LoginStep";
import AppContext from "@ctx/AppContext";
@ -24,26 +24,14 @@ const Login = (props) => {
}, []);
return (
<div className="pb-5">
<div className=" rounded-b-3xl p-4 bg-backgroundPrimary-100 ">
<div className="w-[200px] mx-auto py-10">
<Image src={task} className="w-[200px]" />
<div className="pb-5 ">
<div className="flex rtl">
<div className="w-[200px] mx-auto pt-10 ">
<Image src={task} className="w-[100px] mx-auto rounded-2xl" />
</div>
<div className="text-center w-full mt-4 ">
<h2 className=" text-textMain-100 text-xl font-bold">
بهترین انتخاب برای رستوران ها
</h2>
<p className="mb-0 text-textMain-100 mt-1 ">
{" "}
برای ورود یا ثبت نام به اپلیکیشن مدیریت وظایف رستوران باید شماره
تلفن همراه خود را وارد کنید
</p>
</div>
<div className="flex justify-center mt-10 mb-5">
<div className="w-[10px] h-[10px] bg-gray-900 mx-1 rounded-full"></div>
<div className="w-[10px] h-[10px] bg-gray-400 mx-1 rounded-full"></div>
<div className="w-[10px] h-[10px] bg-gray-400 mx-1 rounded-full"></div>
<div className=" w-full text-right mt-7">
<h2 className=" text-balck text-[50px] font-bold">بریز</h2>
<p className="mb-0">"مدیرت هارمونیک روتین ها "</p>
</div>
</div>

View File

@ -209,23 +209,23 @@ const CompleteShift = () => {
}}
/>
<div className="bg-body-100 relative top-[-30px] rounded-t-3xl overflow-hidden p-4 rtl">
<div className="flex overflow-auto whitespace-nowrap mb-7">
<div className="bg-white overflow-hidden px-5 rtl">
<div className="flex overflow-auto whitespace-nowrap mb-7 mt-4">
<div
className={`mx-1 rtl py-1 px-2 rounded-full font-medium inline-block tr03 ${
className={` shadow-sm relative block max-w-max ml-2 rounded-full mt-2 px-4 py-1 tr03 border-2 ${
selectDayForShift == 0
? "bg-primary-200 text-white"
: " opacity-60 font-normal"
? " bg-primary-200 border-secondary-300"
: "opacity-50 border-secondary-400"
}`}
onClick={() => handleDayCloseShift(0)}
>
<PersianNumber number={getYesterdayPersianDate()} />
</div>
<div
className={`mx-1 rtl py-1 px-2 rounded-full font-medium inline-block tr03 ${
className={` shadow-sm relative block max-w-max ml-2 rounded-full mt-2 px-4 py-1 tr03 border-2 ${
selectDayForShift == 1
? "bg-primary-200 text-white"
: " opacity-60 font-normal"
? " bg-primary-200 border-secondary-300"
: "opacity-50 border-secondary-400"
}`}
onClick={() => handleDayCloseShift(1)}
>
@ -236,10 +236,10 @@ const CompleteShift = () => {
</div>
<div
className={`mx-1 rtl py-1 px-2 rounded-full font-medium inline-block tr03 ${
className={` shadow-sm relative block max-w-max ml-2 rounded-full mt-2 px-4 py-1 tr03 border-2 ${
selectDayForShift == 2
? "bg-primary-200 text-white"
: " opacity-60 font-normal"
? " bg-primary-200 border-secondary-300"
: "opacity-50 border-secondary-400"
}`}
onClick={() => handleDayCloseShift(2)}
>
@ -250,7 +250,7 @@ const CompleteShift = () => {
{siftsData?.map((e, index) => (
<div className="mt-3">
<div
className={`bg-gray-200 p-2 rounded-full flex justify-between ${
className={`bg-gray-50 p-2 rounded-xl flex justify-between ${
activeShifPlan == index ? "bg-gray-300 " : "bg-gray-200 "
} `}
>

View File

@ -325,20 +325,20 @@ const Calendar = () => {
}}
/>
<div className="bg-body-100 relative top-[-30px] rounded-t-3xl overflow-hidden px-4 rtl ">
<div className="bg-white overflow-hidden px-5 rtl">
<div className="font-medium text-right mt-5">
<p className="mb-0 text-sm">روتین را انتخاب کنید</p>
<p className="mb-0 text-sm">روتین را انتخاب کنید:</p>
</div>
<div
className="flex overflow-auto whitespace-nowrap mb-5"
className="flex overflow-auto whitespace-nowrap "
id="swich-shifts"
>
{routinesData?.map((e, index) => (
<div
className={` shadow-sm relative block max-w-max mx-2 rounded-full mt-2 px-4 py-2 tr03 ${
className={` shadow-sm relative block max-w-max ml-2 rounded-full mt-2 px-4 py-1 tr03 border-2 ${
selectRoutine == index
? "bg-secondary-100 text-white"
: "bg-white opacity-60"
? " bg-primary-200 border-secondary-300"
: "opacity-50 border-secondary-400"
}`}
onClick={() => {
if (shiftPlanSteps >= 1) {
@ -363,10 +363,10 @@ const Calendar = () => {
</div>
{shiftPlanSteps >= 1 && (
<div className="bg-body-100 relative top-[-40px] rounded-t-3xl overflow-hidden px-4 rtl ">
<div className=" overflow-hidden px-5 rtl mt-5 ">
<>
<div className="font-medium text-right mt-5 pb-2">
<p className="mb-0 text-sm">تاریخ را انتخاب کنید</p>
<div className="font-medium text-right ">
<p className="mb-0 text-sm">تاریخ را انتخاب کنید:</p>
</div>
<Swiper
spaceBetween={10}
@ -377,10 +377,10 @@ const Calendar = () => {
{daysUntilWeek?.map((e, index) => (
<SwiperSlide>
<div
className={`h-[75px] tr03 ${
className={`h-[85px] tr03 border-2 rounded-xl mt-4 ${
selectDay == index
? "bg-white rounded-xl"
: " opacity-70"
? " bg-primary-200 border-secondary-300"
: "opacity-70 border-secondary-400"
}`}
key={index}
onClick={() => {
@ -414,9 +414,7 @@ const Calendar = () => {
<div
className={`w-fit mx-auto sahdow px-1 rounded-full ${
selectDay == index
? "bg-secondary-100 text-gray-100"
: !!holidays.y1402?.find((b) => b.date == e.checkDay)
? "bg-transparent text-red-500"
? " text-secondary-800"
: " text-gray-600"
}`}
>
@ -426,13 +424,9 @@ const Calendar = () => {
</p>
</div>
<div
className={`mt-5 relative w-8/12 mx-auto ${
selectDay == index ? " hidden" : "block"
}`}
>
<div className={`mt-5 relative w-8/12 mx-auto `}>
<div className="absolute w-full mt-[-10px]">
<div className="bg-gray-300 p-1 rounded-full "></div>
<div className="bg-secondary-400 p-1 rounded-full "></div>
</div>
<div
@ -453,7 +447,7 @@ const Calendar = () => {
} mt-[-10px]`}
>
<div
className={`bg-green-500 ${
className={`bg-primary-400 ${
e.totalShiftPercent !== 0 ? "p-1" : ""
} rounded-full `}
></div>
@ -469,10 +463,10 @@ const Calendar = () => {
{shiftPlanSteps > 1 && (
<>
<div className="bg-body-100 relative top-[-40px] rounded-t-3xl overflow-hidden px-4 rtl">
<div className=" overflow-hidden px-5 mt-5 rtl">
<>
<div className="font-medium text-right mt-5">
<p className="mb-0 text-sm">شیفت را انتخاب کنید</p>
<div className="font-medium text-right ">
<p className="mb-0 text-sm">شیفت را انتخاب کنید:</p>
</div>
{shiftsCurrentDaysData.length > 0 ? (
<div
@ -481,14 +475,14 @@ const Calendar = () => {
>
{shiftsCurrentDaysData?.map((e, index) => (
<div
className={` shadow-sm relative block max-w-fit mx-2 rounded-full mt-2 px-4 py-2 tr03 ${
className={` shadow-sm relative block max-w-max ml-2 rounded-full mt-2 px-4 py-1 tr03 border-2 ${
selectShift == index
? "!bg-secondary-100 text-white w-full"
: " "
}${
? " bg-primary-200 border-secondary-300"
: " border-secondary-400"
} ${
e.hasCurrentShiftPlan
? "bg-green-500 text-white"
: "bg-white"
? "!bg-primary-600 text-white !border-secondary-50"
: ""
}`}
onClick={() => {
handleSelectShift(index);
@ -513,16 +507,16 @@ const Calendar = () => {
)}
{shiftPlanSteps >= 3 && (
<div className="bg-white relative top-[15px] rounded-t-3xl p-4 rtl pt-3 sm:h-auto pb-20">
<div className="mx-3 flex justify-center mb-5">
<div className=" bg-gray-100 rounded-xl w-fit mr-0 p-3">
<div className=" p-4 rtl sm:h-auto pb-20">
<div className=" flex justify-start mb-5">
<div className=" rounded-xl w-fit mr-0 px-3">
<p className="mb-0 text-right text-sm rtl opacity-80">
ویرایش برای{" "}
<small className=" text-sm font-bold">
{shiftsCurrentDaysData[selectShift]?.title}
</small>{" "}
تاریخ{" "}
<small className=" text-sm font-bold text-primary-300 bg-white px-2 rounded-full">
<small className=" text-sm font-bold text-primary-500 bg-white px-2 rounded-full">
<PersianNumber
number={daysUntilWeek && daysUntilWeek[selectDay]?.checkDay}
/>
@ -531,27 +525,44 @@ const Calendar = () => {
</p>
</div>
</div>
<div className=" text-right mt-3 mb-5">
<p className="mb-0 font-medium m">پرسنل را انتخاب کنید</p>
<div className="font-medium text-right pb-4">
<p className="mb-0 text-sm">پرسنل را انتخاب کنید:</p>
</div>
{positionsData.map((e) => (
<div className="">
<div className="flex justify-between bg-gray-200 rounded-2xl">
<div className="flex justify-between border-b border-gray-200 p-2 ">
<div className="flex p-2">
<div className="m-2">
<h4 className="text-base font-bold mt-[2px]">{e.name} </h4>
<div className="">
<h4 className="text-sm font-bold mt-[2px]">{e.name} </h4>
</div>
</div>
<div
className=" bg-gray-600 shadow-sm rounded-xl m-[15px] p-1 relative "
className="w-[30px] h-[30px] bg-secondary-50 shadow-sm rounded-lg ml-3 "
onClick={() => {
setPositionSelectIdBottomSheet(e.id);
setPositionSelectNameBottomSheet(e.name);
CTX.setBottomSheetAddUserToPositionShiftPlanOpen(true);
}}
>
<p className="mb-0 text-sm text-white px-2 mt-1">کاربران +</p>
<svg
width="15"
height="15"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="mx-auto mt-2 opacity-70"
>
<path
d="M8 1V15M1 8H15"
stroke="#2B2B2B"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
</div>
</div>
@ -602,11 +613,10 @@ const Calendar = () => {
))}
<div className="mt-8">
<div className=" text-right mt-3">
<p className="mb-0 font-medium">
<p className="mb-0 font-medium font-sm">
سوپروایزر را انتخاب کنید
<small className="text-red-500 mx-1">(ضروری)</small>
</p>
<p className="mb-0 text-right text-[12px] text-primary-300">
<p className="mb-0 text-right text-[11px] text-secondary-700">
شیفت توسط سوپروایزر بسته میشود لطفا برای هر شیفت آن را مشخص کنید
</p>
</div>
@ -626,6 +636,7 @@ const Calendar = () => {
selectData={superData}
defaultValue={"انتخاب کنید"}
theme={1}
mt={5}
/>
</div>
</div>

View File

@ -2,11 +2,14 @@
import AppHeader from "@comp/AppHeader/page";
import AppContext from "@ctx/AppContext";
import Avatar from "boring-avatars";
import moment from "jalali-moment";
import Image from "next/image";
import Link from "next/link";
import { useRouter } from "next/navigation";
import FormatJalaliDate from "plugins/FormatJalaliDate/page";
import HasPermission from "plugins/HasPermission/page";
import NothingFound from "plugins/NothingFound/page";
import PersianNumber from "plugins/PersianNumber";
import React, { useContext, useEffect, useState } from "react";
@ -128,12 +131,12 @@ const Shifts = (props) => {
}}
/>
<div className="bg-body-100 relative top-[-30px] rounded-t-3xl overflow-hidden p-4 rtl mt-2">
<div className="bg-white overflow-hidden p-5 rtl">
{HasPermission("ManageShiftPlans", permissions) && (
<>
<Link href={"/shifts/manage-shift"}>
<div className="bg-[#e29d494b] p-4 rounded-2xl ">
<p className="mb-0 text-center text-[#66451d] text-sm font-medium">
<div className="bg-secondary-950 p-4 rounded-2xl ">
<p className="mb-0 text-center text-white text-sm font-medium">
شیفت بندی هفته{" "}
</p>
</div>
@ -141,19 +144,19 @@ const Shifts = (props) => {
</>
)}
<div
className="flex justify-start whitespace-nowrap overflow-auto pb-4"
className="flex justify-start whitespace-nowrap overflow-auto pb-4 mt-1"
id="swich-shifts"
>
<div
className={`border-2 px-2 py-1 w-fit rounded-full flex mt-2 tr03 mr-1 ${
shifilterShifPlaneSelect == 1
? " bg-primary-100"
: "opacity-50 border-gray-300"
? " bg-primary-200 border-secondary-300"
: "opacity-50 border-secondary-400"
}`}
onClick={() => handleFilterGetShifPlane(12, 1)}
>
<div className="mr-1">
<p className="mb-0 text-[12px] text-primary-300 font-medium">
<p className="mb-0 text-[12px] text-secondary-900 font-medium">
شیفت های هفته{" "}
</p>
</div>
@ -162,13 +165,13 @@ const Shifts = (props) => {
<div
className={`border-2 px-2 py-1 w-fit rounded-full flex mt-2 tr03 mr-1 ${
shifilterShifPlaneSelect == 6
? " bg-primary-100"
: "opacity-50 border-gray-300"
? " bg-primary-200 border-secondary-300"
: "opacity-50 border-secondary-400"
}`}
onClick={() => handleFilterGetShifPlane(22, 6)}
>
<div className="mr-1">
<p className="mb-0 text-[12px] text-primary-300 font-medium">
<p className="mb-0 text-[12px] text-secondary-900 font-medium">
شیفت های ماه{" "}
</p>
</div>
@ -177,13 +180,13 @@ const Shifts = (props) => {
<div
className={`border-2 px-2 py-1 w-fit rounded-full flex mt-2 tr03 mr-1 ${
shifilterShifPlaneSelect == 2
? " bg-primary-100"
: "opacity-50 border-gray-300"
? " bg-primary-200 border-secondary-300"
: "opacity-50 border-secondary-400"
}`}
onClick={() => handleFilterGetShifPlane(11, 2)}
>
<div className="mr-1">
<p className="mb-0 text-[12px] text-primary-300 font-medium">
<p className="mb-0 text-[12px] text-secondary-900 font-medium">
شیفت های هفته بعد{" "}
</p>
</div>
@ -192,13 +195,13 @@ const Shifts = (props) => {
<div
className={`border-2 px-2 py-1 w-fit rounded-full flex mt-2 tr03 mr-1 ${
shifilterShifPlaneSelect == 3
? " bg-primary-100"
: "opacity-50 border-gray-300"
? " bg-primary-200 border-secondary-300"
: "opacity-50 border-secondary-400"
}`}
onClick={() => handleFilterGetShifPlane(10, 3)}
>
<div className="mr-1">
<p className="mb-0 text-[12px] text-primary-300 font-medium">
<p className="mb-0 text-[12px] text-secondary-900 font-medium">
شیفت های هفته قبل{" "}
</p>
</div>
@ -207,13 +210,13 @@ const Shifts = (props) => {
<div
className={`border-2 px-2 py-1 w-fit rounded-full flex mt-2 tr03 mr-1 ${
shifilterShifPlaneSelect == 4
? " bg-primary-100"
: "opacity-50 border-gray-300"
? " bg-primary-200 border-secondary-300"
: "opacity-50 border-secondary-400"
}`}
onClick={() => handleFilterGetShifPlane(20, 4)}
>
<div className="mr-1">
<p className="mb-0 text-[12px] text-primary-300 font-medium">
<p className="mb-0 text-[12px] text-secondary-900 font-medium">
شیفت های ماه قبل{" "}
</p>
</div>
@ -222,47 +225,52 @@ const Shifts = (props) => {
<div
className={`border-2 px-2 py-1 w-fit rounded-full flex mt-2 tr03 mr-1 ${
shifilterShifPlaneSelect == 5
? " bg-primary-100"
: "opacity-50 border-gray-300"
? " bg-primary-200 border-secondary-300"
: "opacity-50 border-secondary-400"
}`}
onClick={() => handleFilterGetShifPlane(21, 5)}
>
<div className="mr-1">
<p className="mb-0 text-[12px] text-primary-300 font-medium">
<p className="mb-0 text-[12px] text-secondary-900 font-medium">
شیفت های ماه بعد{" "}
</p>
</div>
</div>
</div>
{shiftplans.length <= 0 ? (
<div className="flex justify-center py-5">
<div className="bg-white shadow mt-5 w-fit rounded-full text-sm p-4">
چیزی یافت نشد
</div>
</div>
<NothingFound />
) : (
<>
{shiftplans?.map((e, index) => (
<>
<div
className={` p-5 border-b border-gray-200 tr03 ${
className={` px-3 py-5 tr03 ${
shiftPlansSelect == index
? "h-fit bg-white rounded-2xl "
: "h-[65px]"
? "h-fit bg-secondary-50 rounded-b-2xl "
: "border-b border-gray-200"
}`}
>
<div
className={`flex justify-between ${
shiftPlansSelect == index
? "border-b-[1px] border-gray-200 pb-3"
: ""
shiftPlansSelect == index ? "" : ""
}`}
onClick={() => setShiftPlansSelect(index)}
>
<div className="flex">
<PersianNumber
number={moment(e.planFor).format("jYYYY/jM/jD")}
number={FormatJalaliDate(e.planFor, true)}
/>
<div className="w-[2px] h-5 mx-2 bg-primary-200 opacity-75 "></div>
<div className=" h-fit">
<p className="mb-0 text-sm text-secondary-600 ">
<PersianNumber
number={e.data.length}
style={"ml-1"}
/>
شیفت
</p>
</div>
<p className="mb-0 mt-[-3px] mx-1">
{checkDateStatus(e.planFor).today ? (
@ -275,21 +283,33 @@ const Shifts = (props) => {
</p>
</div>
<div className="bg-gray-400 fit rounded-xl p-1 px-2 h-fit">
<p className="mb-0 text-sm text-white">
<PersianNumber
number={e.data.length}
style={"ml-1"}
/>
شیفت
</p>
<div>
<div className="">
<svg
width="12"
height="12"
viewBox="0 0 151 89"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="opacity-60 mt-1 mx-auto"
>
<path
d="M13.0444 13.1674L75.3606 75.8506L138.044 13.5345"
stroke="#424242"
stroke-opacity="0.81"
stroke-width="25"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
</div>
</div>
</div>
{shiftPlansSelect == index && (
<>
{e.data.map((e) => (
<div className="">
<div>
<div className="flex justify-between">
<div className="ml-2 rounded-xl mt-3 p-2">
<p className="text-sm mb-0 text-gray-700 font-medium">
@ -301,22 +321,36 @@ const Shifts = (props) => {
<div className="flex flex-wrap">
{e.users.map((i) => (
<div className="flex bg-primary-100 p-1 rounded-full w-fit m-1">
<p className="mb-0 text-[12px] font-medium">
{i.positionName} :{" "}
</p>{" "}
<p className="mb-0 text-[12px] mr-1">
{i.userFullName}
</p>
<div className="flex bg-gray-50 p-1 rounded-full m-1 justify-start mb-2 w-fit ">
<div className="w-[25px] h-[25px] rounded-full bg-gray-400 ">
<Avatar
size={25}
name={i.positionName}
variant="beam"
colors={["#9d9f88", "#83af96", "#b2de93"]}
/>
</div>
<div>
<p className="mb-0 px-3 text-sm mt-1">
{i.userFullName}{" "}
</p>
</div>
</div>
))}
<div className="flex bg-red-500 p-1 rounded-full w-fit m-1">
<p className="mb-0 text-[12px] font-medium text-white ">
سوپروایزر :{" "}
</p>{" "}
<p className="mb-0 text-[12px] mr-1 text-white ">
{e.supervisorFullName}
</p>
<div className="flex bg-primary-400 p-1 rounded-full m-1 justify-start mb-2 w-fit ">
<div className="px-4 h-[30px] rounded-full bg-primary-200 ">
<p className="mb-0 text-center mt-[2px] text-sm">
سوپروایزر
</p>
</div>
<div>
<p className="mb-0 px-3 text-sm mt-1 text-white">
{e.supervisorFullName}
</p>
</div>
</div>
</div>
</div>
@ -325,7 +359,7 @@ const Shifts = (props) => {
{checkDateStatus(e.planFor).yesterday && (
<Link href={"/shifts/complete-shift?day=yesterday"}>
<div className="mt-6">
<button className="btn btn-info w-full font-normal rounded-2xl text-sm p-3">
<button className="btn bg-secondary-950 text-primary-300 w-full font-bold rounded-2xl text-sm p-3">
بستن و تایید شیفت
</button>
</div>
@ -335,7 +369,7 @@ const Shifts = (props) => {
{checkDateStatus(e.planFor).today && (
<Link href={"/shifts/complete-shift"}>
<div className="mt-6">
<button className="btn btn-info w-full font-normal rounded-2xl text-sm p-3">
<button className="btn bg-secondary-950 text-primary-300 w-full font-bold rounded-2xl text-sm p-3">
بستن و تایید شیفت
</button>
</div>
@ -345,7 +379,7 @@ const Shifts = (props) => {
{checkDateStatus(e.planFor).tomorrow && (
<Link href={"/shifts/complete-shift?day=tomorrow"}>
<div className="mt-6">
<button className="btn btn-info w-full font-normal rounded-2xl text-sm p-3">
<button className="btn bg-secondary-950 text-primary-300 w-full font-bold rounded-2xl text-sm p-3">
بستن و تایید شیفت
</button>
</div>

View File

@ -376,11 +376,13 @@ const AddTask = () => {
}}
/>
<div className="bg-body-100 relative top-[-30px] rounded-t-3xl overflow-hidden p-4 rtl">
<div className="bg-white overflow-hidden p-5 rtl">
<div>
<div className="">
<Input
lable="عنوان فعالیت"
theme={1}
mt={6}
id="title-id"
name="title"
type={"text"}
@ -402,6 +404,8 @@ const AddTask = () => {
<div className="">
<Input
lable=" توضیحات"
theme={1}
mt={6}
id="description-id"
name="description"
type={"text"}
@ -418,6 +422,8 @@ const AddTask = () => {
<div className="">
<Input
lable="روتین فعالیت"
theme={1}
mt={6}
id="routines-id"
name="routines"
type={"text"}
@ -473,6 +479,8 @@ const AddTask = () => {
<div className="">
<Input
lable="پوزیشن فعالیت"
theme={1}
mt={6}
id="positions-id"
name="positions"
value={setPositionsForTaskCurrent}
@ -539,6 +547,8 @@ const AddTask = () => {
<div className="">
<Input
lable="شیفت فعالیت"
theme={1}
mt={6}
id="shifts-id"
name="shifts"
type={"text"}
@ -595,6 +605,8 @@ const AddTask = () => {
<Input
lable="تکرار پذیری فعالیت"
id="scheduleType-id"
theme={1}
mt={6}
name="scheduleType"
type={"text"}
value={scheduleType}
@ -656,6 +668,8 @@ const AddTask = () => {
<div className="">
<Input
lable="انتخاب روزهای این فعالیت در هفته"
theme={1}
mt={6}
id="shiftsDaysChoose-id"
name="shiftsDaysChoose"
type={"text"}

View File

@ -16,6 +16,7 @@ import InfiniteScroll from "react-infinite-scroll-component";
import Loading from "plugins/Loading/page";
import { useLongPress } from "@uidotdev/usehooks";
import BottomFilterActivities from "plugins/BottomSheet/BottomFilterActivities";
import NothingFound from "plugins/NothingFound/page";
const page = () => {
const CTX = useContext(AppContext);
@ -74,18 +75,19 @@ const page = () => {
}}
/>
<div className="bg-body-100 relative top-[-30px] rounded-t-3xl overflow-hidden p-4 rtl ">
<div className="bg-white overflow-hidden p-5 rtl">
{" "}
{!!HasPermission("ManageTasks", permissions) && (
<div className="flex bg-[#e066150e] rounded-full rtl ">
<div className="flex bg-gray-100 rounded-full rtl ">
<div
className={` p-2 w-full rounded-3xl tr03 ${
CTX.state.typeTask == 0 ? "bg-secondary-100" : ""
CTX.state.typeTask == 0 ? "bg-secondary-950" : ""
} `}
onClick={() => CTX.setTypeTask(0)}
>
<p
className={`mb-0 text-center text-sm ${
CTX.state.typeTask == 0 ? "text-white " : "opacity-70"
CTX.state.typeTask == 0 ? "text-white" : " text-secondary-900"
}`}
>
تسک های روزانه
@ -93,13 +95,13 @@ const page = () => {
</div>
<div
className={` p-2 w-full rounded-3xl tr03 ${
CTX.state.typeTask == 1 ? "bg-secondary-100" : ""
CTX.state.typeTask == 1 ? "bg-secondary-950" : ""
} `}
onClick={() => CTX.setTypeTask(1)}
>
<p
className={`mb-0 text-center text-sm ${
CTX.state.typeTask == 1 ? "text-white " : "opacity-70"
CTX.state.typeTask == 1 ? "text-white" : " text-secondary-900"
}`}
>
اکتیویتی های روزانه
@ -107,10 +109,9 @@ const page = () => {
</div>
</div>
)}
<div className="flex justify-start">
<div
className="border-2 border-gray-300 px-2 py-1 w-fit rounded-full flex mt-2"
className="border-2 border-secondary-300 px-2 py-1 w-fit rounded-full flex mt-2"
onClick={() => CTX.setBottomFilterActivitiesOpen(true)}
>
<div>
@ -123,18 +124,18 @@ const page = () => {
>
<path
d="M62.5 25.5004C59.1848 25.5004 56.0054 26.8173 53.6612 29.1615C51.317 31.5057 50 34.6852 50 38.0004C50 41.3156 51.317 44.495 53.6612 46.8392C56.0054 49.1834 59.1848 50.5004 62.5 50.5004C65.8152 50.5004 68.9946 49.1834 71.3388 46.8392C73.683 44.495 75 41.3156 75 38.0004C75 34.6852 73.683 31.5057 71.3388 29.1615C68.9946 26.8173 65.8152 25.5004 62.5 25.5004ZM27.125 25.5004C29.7075 18.1812 34.4967 11.8433 40.8325 7.36023C47.1683 2.87717 54.7386 0.469727 62.5 0.469727C70.2614 0.469727 77.8317 2.87717 84.1675 7.36023C90.5033 11.8433 95.2925 18.1812 97.875 25.5004H187.5C190.815 25.5004 193.995 26.8173 196.339 29.1615C198.683 31.5057 200 34.6852 200 38.0004C200 41.3156 198.683 44.495 196.339 46.8392C193.995 49.1834 190.815 50.5004 187.5 50.5004H97.875C95.2925 57.8195 90.5033 64.1574 84.1675 68.6405C77.8317 73.1235 70.2614 75.531 62.5 75.531C54.7386 75.531 47.1683 73.1235 40.8325 68.6405C34.4967 64.1574 29.7075 57.8195 27.125 50.5004H12.5C9.18479 50.5004 6.00537 49.1834 3.66117 46.8392C1.31696 44.495 0 41.3156 0 38.0004C0 34.6852 1.31696 31.5057 3.66117 29.1615C6.00537 26.8173 9.18479 25.5004 12.5 25.5004H27.125ZM137.5 100.5C134.185 100.5 131.005 101.817 128.661 104.162C126.317 106.506 125 109.685 125 113C125 116.316 126.317 119.495 128.661 121.839C131.005 124.183 134.185 125.5 137.5 125.5C140.815 125.5 143.995 124.183 146.339 121.839C148.683 119.495 150 116.316 150 113C150 109.685 148.683 106.506 146.339 104.162C143.995 101.817 140.815 100.5 137.5 100.5ZM102.125 100.5C104.708 93.1812 109.497 86.8433 115.832 82.3602C122.168 77.8772 129.739 75.4697 137.5 75.4697C145.261 75.4697 152.832 77.8772 159.168 82.3602C165.503 86.8433 170.292 93.1812 172.875 100.5H187.5C190.815 100.5 193.995 101.817 196.339 104.162C198.683 106.506 200 109.685 200 113C200 116.316 198.683 119.495 196.339 121.839C193.995 124.183 190.815 125.5 187.5 125.5H172.875C170.292 132.82 165.503 139.157 159.168 143.64C152.832 148.124 145.261 150.531 137.5 150.531C129.739 150.531 122.168 148.124 115.832 143.64C109.497 139.157 104.708 132.82 102.125 125.5H12.5C9.18479 125.5 6.00537 124.183 3.66117 121.839C1.31696 119.495 0 116.316 0 113C0 109.685 1.31696 106.506 3.66117 104.162C6.00537 101.817 9.18479 100.5 12.5 100.5H102.125ZM62.5 175.5C59.1848 175.5 56.0054 176.817 53.6612 179.162C51.317 181.506 50 184.685 50 188C50 191.316 51.317 194.495 53.6612 196.839C56.0054 199.183 59.1848 200.5 62.5 200.5C65.8152 200.5 68.9946 199.183 71.3388 196.839C73.683 194.495 75 191.316 75 188C75 184.685 73.683 181.506 71.3388 179.162C68.9946 176.817 65.8152 175.5 62.5 175.5ZM27.125 175.5C29.7075 168.181 34.4967 161.843 40.8325 157.36C47.1683 152.877 54.7386 150.47 62.5 150.47C70.2614 150.47 77.8317 152.877 84.1675 157.36C90.5033 161.843 95.2925 168.181 97.875 175.5H187.5C190.815 175.5 193.995 176.817 196.339 179.162C198.683 181.506 200 184.685 200 188C200 191.316 198.683 194.495 196.339 196.839C193.995 199.183 190.815 200.5 187.5 200.5H97.875C95.2925 207.82 90.5033 214.157 84.1675 218.64C77.8317 223.124 70.2614 225.531 62.5 225.531C54.7386 225.531 47.1683 223.124 40.8325 218.64C34.4967 214.157 29.7075 207.82 27.125 200.5H12.5C9.18479 200.5 6.00537 199.183 3.66117 196.839C1.31696 194.495 0 191.316 0 188C0 184.685 1.31696 181.506 3.66117 179.162C6.00537 176.817 9.18479 175.5 12.5 175.5H27.125Z"
fill="#005E2B"
fill="#363636"
/>
</svg>
</div>
<div className="mr-1">
<p className="mb-0 text-[12px] text-primary-300 font-medium">
<p className="mb-0 text-[12px] text-secondary-950 font-medium">
فیلــتر
</p>
</div>
</div>
<div className="border-2 border-gray-300 px-2 py-1 w-fit rounded-full flex mt-2 mr-2 opacity-50">
<div className="border-2 border-secondary-300 px-2 py-1 w-fit rounded-full flex mt-2 mr-2 opacity-30">
<div>
<svg
width="15"
@ -145,19 +146,18 @@ const page = () => {
>
<path
d="M0.400391 113.7C0.400391 93.3004 5.50039 74.4004 15.6004 57.1004C25.7004 39.8004 39.4004 26.1004 56.7004 16.0004C74.0004 5.90039 92.8004 0.900391 113.1 0.900391C128.3 0.900391 142.9 3.90039 156.8 9.80039C170.7 15.7004 182.6 23.8004 192.7 33.8004C202.8 43.8004 210.8 55.8004 216.7 69.8004C222.6 83.8004 225.6 98.3004 225.6 113.7C225.6 128.9 222.6 143.5 216.7 157.4C210.8 171.3 202.7 183.3 192.7 193.3C182.7 203.3 170.7 211.3 156.8 217.2C142.9 223.1 128.4 226.1 113.1 226.1C97.8004 226.1 83.1004 223.1 69.2004 217.2C55.3004 211.3 43.3004 203.2 33.2004 193.2C23.1004 183.2 15.2004 171.2 9.20039 157.4C3.20039 143.6 0.400391 129 0.400391 113.7ZM25.2004 113.7C25.2004 137.4 33.8004 158 51.1004 175.5C68.4004 192.8 89.0004 201.4 113.1 201.4C128.9 201.4 143.6 197.5 157 189.6C170.4 181.7 181.2 171.1 189.1 157.6C197 144.1 201 129.5 201 113.7C201 97.9004 197 83.2004 189.1 69.7004C181.2 56.2004 170.5 45.5004 157 37.6004C143.5 29.7004 128.9 25.8004 113.1 25.8004C97.3004 25.8004 82.6004 29.7004 69.2004 37.6004C55.8004 45.5004 45.0004 56.2004 37.0004 69.7004C29.0004 83.2004 25.2004 97.9004 25.2004 113.7ZM104.4 113.7V47.1004C104.4 44.8004 105.2 42.8004 106.8 41.2004C108.4 39.6004 110.4 38.8004 112.7 38.8004C115 38.8004 117 39.6004 118.6 41.2004C120.2 42.8004 121 44.8004 121 47.1004V105.3H158.8C161.1 105.3 163.1 106.1 164.7 107.7C166.3 109.3 167.1 111.3 167.1 113.6C167.1 115.8 166.3 117.8 164.7 119.5C163.1 121.2 161.1 122 158.8 122H114.4C114.1 122.1 113.5 122.1 112.6 122.1C111.501 122.12 110.409 121.915 109.392 121.498C108.375 121.08 107.454 120.459 106.686 119.672C105.918 118.885 105.319 117.949 104.926 116.922C104.533 115.896 104.354 114.799 104.4 113.7Z"
fill="#005D2B"
fill="#363636"
/>
</svg>
</div>
<div className="mr-1">
<p className="mb-0 text-[12px] text-primary-300 font-medium">
<p className="mb-0 text-[12px] text-secondary-950 font-medium">
روز خاص
<small className="text-red-500">(به زودی)</small>
</p>
</div>
</div>
<div className="border-2 border-gray-300 px-2 py-1 w-fit rounded-full flex mt-2 mr-2 opacity-50">
<div className="border-2 border-secondary-300 px-2 py-1 w-fit rounded-full flex mt-2 mr-2 opacity-30">
<div>
<svg
width="15"
@ -168,47 +168,17 @@ const page = () => {
>
<path
d="M26.4372 175.5C16.4372 175.5 9.04137 171.179 4.2497 162.538C-0.541964 153.896 -0.229467 145.404 5.1872 137.063L36.7497 88L5.1872 38.9375C-0.229467 30.6042 -0.541964 22.1125 4.2497 13.4625C9.04137 4.81251 16.4372 0.491679 26.4372 0.500012H130.5C134.666 0.500012 138.575 1.43751 142.225 3.31251C145.875 5.18751 148.841 7.79168 151.125 11.125L195.187 73.625C198.312 78 199.875 82.7917 199.875 88C199.875 93.2083 198.312 98 195.187 102.375L151.125 164.875C148.833 168.208 145.866 170.813 142.225 172.688C138.583 174.563 134.675 175.5 130.5 175.5H26.4372Z"
fill="#005D2B"
fill="#363636"
/>
</svg>
</div>
<div className="mr-1">
<p className="mb-0 text-[12px] text-primary-300 font-medium">
اولویت <small className="text-red-500">(به زودی)</small>
<p className="mb-0 text-[12px] text-secondary-950 font-medium">
اولویت
</p>
</div>
</div>
</div>
{/* <div className="flex justify-between ">
<div>
<h4 className="text-base font-bold ">تسک های هفتگی مجموعه</h4>
<p className="mb-0 text-sm">
امروز
<strong className="mx-1 text-primary-300">
<PersianNumber number={tasksData?.length} />
</strong>
تسک فعال دارید
</p>
</div>
<div className="w-[40px] h-[40px] bg-white shadow-sm rounded-xl">
<svg
width="23"
height="27"
viewBox="0 0 16 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="mx-auto mt-[6px]"
>
<path
d="M5 3.00001C4.73478 3.00001 4.48043 3.10537 4.29289 3.2929C4.10536 3.48044 4 3.73479 4 4.00001C4 4.26523 4.10536 4.51958 4.29289 4.70712C4.48043 4.89465 4.73478 5.00001 5 5.00001C5.26522 5.00001 5.51957 4.89465 5.70711 4.70712C5.89464 4.51958 6 4.26523 6 4.00001C6 3.73479 5.89464 3.48044 5.70711 3.2929C5.51957 3.10537 5.26522 3.00001 5 3.00001ZM2.17 3.00001C2.3766 2.41448 2.75974 1.90744 3.2666 1.5488C3.77346 1.19015 4.37909 0.997559 5 0.997559C5.62091 0.997559 6.22654 1.19015 6.7334 1.5488C7.24026 1.90744 7.6234 2.41448 7.83 3.00001H15C15.2652 3.00001 15.5196 3.10537 15.7071 3.2929C15.8946 3.48044 16 3.73479 16 4.00001C16 4.26523 15.8946 4.51958 15.7071 4.70712C15.5196 4.89465 15.2652 5.00001 15 5.00001H7.83C7.6234 5.58554 7.24026 6.09258 6.7334 6.45122C6.22654 6.80986 5.62091 7.00246 5 7.00246C4.37909 7.00246 3.77346 6.80986 3.2666 6.45122C2.75974 6.09258 2.3766 5.58554 2.17 5.00001H1C0.734784 5.00001 0.48043 4.89465 0.292893 4.70712C0.105357 4.51958 0 4.26523 0 4.00001C0 3.73479 0.105357 3.48044 0.292893 3.2929C0.48043 3.10537 0.734784 3.00001 1 3.00001H2.17ZM11 9.00001C10.7348 9.00001 10.4804 9.10537 10.2929 9.2929C10.1054 9.48044 10 9.73479 10 10C10 10.2652 10.1054 10.5196 10.2929 10.7071C10.4804 10.8947 10.7348 11 11 11C11.2652 11 11.5196 10.8947 11.7071 10.7071C11.8946 10.5196 12 10.2652 12 10C12 9.73479 11.8946 9.48044 11.7071 9.2929C11.5196 9.10537 11.2652 9.00001 11 9.00001ZM8.17 9.00001C8.3766 8.41448 8.75974 7.90744 9.2666 7.5488C9.77346 7.19015 10.3791 6.99756 11 6.99756C11.6209 6.99756 12.2265 7.19015 12.7334 7.5488C13.2403 7.90744 13.6234 8.41448 13.83 9.00001H15C15.2652 9.00001 15.5196 9.10537 15.7071 9.2929C15.8946 9.48044 16 9.73479 16 10C16 10.2652 15.8946 10.5196 15.7071 10.7071C15.5196 10.8947 15.2652 11 15 11H13.83C13.6234 11.5855 13.2403 12.0926 12.7334 12.4512C12.2265 12.8099 11.6209 13.0025 11 13.0025C10.3791 13.0025 9.77346 12.8099 9.2666 12.4512C8.75974 12.0926 8.3766 11.5855 8.17 11H1C0.734784 11 0.48043 10.8947 0.292893 10.7071C0.105357 10.5196 0 10.2652 0 10C0 9.73479 0.105357 9.48044 0.292893 9.2929C0.48043 9.10537 0.734784 9.00001 1 9.00001H8.17ZM5 15C4.73478 15 4.48043 15.1054 4.29289 15.2929C4.10536 15.4804 4 15.7348 4 16C4 16.2652 4.10536 16.5196 4.29289 16.7071C4.48043 16.8947 4.73478 17 5 17C5.26522 17 5.51957 16.8947 5.70711 16.7071C5.89464 16.5196 6 16.2652 6 16C6 15.7348 5.89464 15.4804 5.70711 15.2929C5.51957 15.1054 5.26522 15 5 15ZM2.17 15C2.3766 14.4145 2.75974 13.9074 3.2666 13.5488C3.77346 13.1902 4.37909 12.9976 5 12.9976C5.62091 12.9976 6.22654 13.1902 6.7334 13.5488C7.24026 13.9074 7.6234 14.4145 7.83 15H15C15.2652 15 15.5196 15.1054 15.7071 15.2929C15.8946 15.4804 16 15.7348 16 16C16 16.2652 15.8946 16.5196 15.7071 16.7071C15.5196 16.8947 15.2652 17 15 17H7.83C7.6234 17.5855 7.24026 18.0926 6.7334 18.4512C6.22654 18.8099 5.62091 19.0025 5 19.0025C4.37909 19.0025 3.77346 18.8099 3.2666 18.4512C2.75974 18.0926 2.3766 17.5855 2.17 17H1C0.734784 17 0.48043 16.8947 0.292893 16.7071C0.105357 16.5196 0 16.2652 0 16C0 15.7348 0.105357 15.4804 0.292893 15.2929C0.48043 15.1054 0.734784 15 1 15H2.17Z"
fill="#666666"
/>
</svg>
</div>
</div> */}
{typeTask == 0 ? (
<>
{tasksData.length != 0 ? (
@ -224,11 +194,7 @@ const page = () => {
/>
</InfiniteScroll>
) : (
<div className="flex justify-center py-5">
<div className="bg-white shadow mt-5 w-fit rounded-full text-sm p-4">
چیزی یافت نشد
</div>
</div>
<NothingFound />
)}
</>
) : (
@ -244,11 +210,7 @@ const page = () => {
))}
</InfiniteScroll>
) : (
<div className="flex justify-center py-5">
<div className="bg-white shadow mt-5 w-fit rounded-full text-sm p-4">
چیزی یافت نشد
</div>
</div>
<NothingFound />
)}
</div>
)}

View File

@ -14,10 +14,10 @@
}
.btn-primary {
@apply bg-primary-200 text-white;
@apply bg-secondary-950 text-primary-300;
}
.btn-primary:hover {
@apply bg-primary-300;
@apply bg-secondary-900;
}
.btn-secondary {
@ -55,16 +55,16 @@ input[type="checkbox"] {
border-radius: 30px; /* Use a percentage for a circular shape */
/* Add custom styling */
border: 2px solid hsl(14, 82%, 47%);
border: 2px solid #363636;
background-color: #fff;
}
input[type="checkbox"]:checked {
background-color: #da4215;
background-color: #9bd19d;
}
body {
font-family: KalamehWeb !important;
background: #eeeeee;
background: white;
--toastify-font-family: KalamehWeb !important;
--Chart-defaults-font-family: KalamehWeb !important;
}
@ -122,12 +122,13 @@ body {
overflow: hidden;
}
[data-rsbs-header] {
background-color: #356859;
background-color: #363636;
padding-top: 30px !important;
}
[data-rsbs-header]::before {
top: 20px !important;
top: 25px !important;
background: #b9b9b9 !important;
}
.DatePicker {

View File

@ -13,15 +13,45 @@ module.exports = {
100: "#FFFBE6",
},
primary: {
100: "#B9E4C9",
200: "#37966F",
300: "#356859",
50: "#f3faf3",
100: "#e4f4e5",
200: "#cbe7cc",
300: "#9bd19d",
400: "#70b873",
500: "#4c9b4f",
600: "#3a7f3e",
700: "#316433",
800: "#2a512c",
900: "#244326",
950: "#102312",
},
secondary: {
50: "#fd562317",
100: "#FD5523",
200: "#DA4215",
50: "#f7f7f7",
100: "#ededed",
200: "#dbdbdb",
300: "#c8c8c8",
400: "#adadad",
500: "#999999",
600: "#888888",
700: "#7b7b7b",
800: "#676767",
900: "#545454",
950: "#363636",
},
danger: {
50: "#fef2f2",
100: "#fee2e2",
200: "#ffc9c9",
300: "#fda4a4",
400: "#fa6f6f",
500: "#f14242",
600: "#de2424",
700: "#bb1a1a",
800: "#9b1919",
900: "#801c1c",
950: "#460909",
},
secondaryDark: {
100: "#D03405",