initioal
|
@ -0,0 +1,16 @@
|
|||
NODE_ENV="development"
|
||||
|
||||
NEXT_PUBLIC_SERVER_URL=http://192.168.88.12:32769
|
||||
NEXT_PUBLIC_PUBLIC_URL=http://192.168.88.12:32769
|
||||
NEXT_PUBLIC_API_URL=http://192.168.88.12:32769/api
|
||||
# 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
|
||||
|
||||
|
||||
|
||||
# NEXT_PUBLIC_SERVER_URL=https://api.macsonline.ir
|
||||
# NEXT_PUBLIC_PUBLIC_URL=https://api.macsonline.ir
|
||||
# NEXT_PUBLIC_API_URL=https://api.macsonline.ir/api/v1
|
||||
# NEXT_PUBLIC_API_URL_IMAGE=https://api.macsonline.ir/Files/ReportImages
|
||||
# NEXT_PUBLIC_API_URL_BackUp=https://api.macsonline.ir/Files/BackUps
|
|
@ -0,0 +1,6 @@
|
|||
NODE_ENV="production"
|
||||
NEXT_PUBLIC_SERVER_URL=https://api.macsonline.ir
|
||||
NEXT_PUBLIC_PUBLIC_URL=https://api.macsonline.ir
|
||||
NEXT_PUBLIC_API_URL=https://api.macsonline.ir/api/v1
|
||||
NEXT_PUBLIC_API_URL_IMAGE=https://api.macsonline.ir/Files/ReportImages
|
||||
NEXT_PUBLIC_API_URL_BackUp=https://api.macsonline.ir/Files/BackUps
|
|
@ -0,0 +1,35 @@
|
|||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env*.local
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Next.js: debug server-side",
|
||||
"type": "node-terminal",
|
||||
"request": "launch",
|
||||
"command": "npm run dev"
|
||||
},
|
||||
{
|
||||
"name": "Next.js: debug client-side",
|
||||
"type": "chrome",
|
||||
"request": "launch",
|
||||
"url": "http://localhost:3000"
|
||||
},
|
||||
{
|
||||
"name": "Next.js: debug full stack",
|
||||
"type": "node-terminal",
|
||||
"request": "launch",
|
||||
"command": "npm run dev",
|
||||
"serverReadyAction": {
|
||||
"pattern": "- Local:.+(https?://.+)",
|
||||
"uriFormat": "%s",
|
||||
"action": "debugWithChrome"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
import { createContext } from 'react'
|
||||
|
||||
const AppContext = createContext({
|
||||
state: {},
|
||||
})
|
||||
export default AppContext
|
|
@ -0,0 +1,34 @@
|
|||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
|
||||
|
||||
## Getting Started
|
||||
|
||||
First, run the development server:
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
# or
|
||||
yarn dev
|
||||
# or
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
||||
|
||||
You can start editing the page by modifying `app/page.js`. The page auto-updates as you edit the file.
|
||||
|
||||
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
|
||||
|
||||
## Learn More
|
||||
|
||||
To learn more about Next.js, take a look at the following resources:
|
||||
|
||||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
||||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
||||
|
||||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
|
||||
|
||||
## Deploy on Vercel
|
||||
|
||||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
||||
|
||||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
|
|
@ -0,0 +1,7 @@
|
|||
state conditionTask = {
|
||||
0 : حالت عادی تسک
|
||||
1 : تسک آماده تغیر است میچرخد و انتخاب میکند که تسک انجام شده است یا خیر
|
||||
2 : تسک انجام نشده و اینپوت جزییات میاد
|
||||
3 : تسک انجام شده و سبز میشود
|
||||
4 : تسک انجام نشده است و قرمز میشود
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
import Link from "next/link";
|
||||
import React from "react";
|
||||
|
||||
const AppHeader = ({
|
||||
title,
|
||||
sub,
|
||||
icon1,
|
||||
iconName1,
|
||||
iconHref1,
|
||||
iconEvent1,
|
||||
icon2,
|
||||
iconName2,
|
||||
iconHref2,
|
||||
iconEvent2,
|
||||
userIcon,
|
||||
}) => {
|
||||
const icons = [
|
||||
{
|
||||
iconName: "ACOUNT",
|
||||
icon: (
|
||||
<svg
|
||||
width="30"
|
||||
height="30"
|
||||
viewBox="0 0 300 300"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mx-auto pt-[2px] ml-[6px]"
|
||||
>
|
||||
<path
|
||||
d="M150 46.875C137.561 46.8085 125.362 50.3045 114.846 56.9497C104.33 63.5948 95.9362 73.1115 90.6563 84.375H90L88.6031 89.2781C87.978 90.9421 87.4213 92.631 86.9344 94.3406C86.8781 94.5281 86.7937 94.6968 86.7375 94.8843L52.5 67.5L41.25 82.5093L66.5625 103.125H37.5V121.875H84.9937C85.3875 124.866 86.0063 127.781 86.9063 130.575C87.3938 132.328 87.975 134.034 88.6031 135.722L90 140.625H90.6563C95.6277 151.292 103.405 160.408 113.156 166.997C79.7812 181.369 56.25 214.612 56.25 253.125H75C75 211.875 108.75 178.125 150 178.125C191.25 178.125 225 211.875 225 253.125H243.75C243.75 214.622 220.219 181.359 186.844 166.969C196.59 160.386 204.366 151.281 209.344 140.625H210L210.281 138.666C213.713 130.669 215.625 121.837 215.625 112.5C215.625 75.9375 186.563 46.875 150 46.875ZM150 65.625C157.287 65.5852 164.48 67.2619 170.999 70.5193C177.517 73.7768 183.176 78.5235 187.519 84.375H112.481C116.824 78.5235 122.483 73.7768 129.001 70.5193C135.52 67.2619 142.713 65.5852 150 65.625ZM104.063 103.125H195.937C196.031 103.416 196.031 103.781 196.106 104.1C196.575 106.819 196.875 109.622 196.875 112.5C196.875 115.378 196.584 118.181 196.106 120.9C196.031 121.209 196.041 121.584 195.937 121.875H104.063C103.969 121.584 103.969 121.219 103.894 120.9C103.398 118.127 103.141 115.317 103.125 112.5C103.125 109.622 103.416 106.819 103.894 104.1C103.969 103.791 103.959 103.416 104.063 103.125ZM112.481 140.625H187.519C183.176 146.476 177.517 151.223 170.999 154.481C164.48 157.738 157.287 159.415 150 159.375C142.713 159.415 135.52 157.738 129.001 154.481C122.483 151.223 116.824 146.476 112.481 140.625Z"
|
||||
fill="#DA4215"
|
||||
/>
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
{
|
||||
iconName: "NINJA",
|
||||
icon: (
|
||||
<svg
|
||||
width="27"
|
||||
height="27"
|
||||
viewBox="0 0 300 300"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mx-auto pt-[2px] ml-2"
|
||||
>
|
||||
<path
|
||||
d="M268.916 9.90332C256.476 36.5699 232.473 17.9383 213.316 17.2885C159.138 16.8197 157.503 45.0338 130.526 62.4156C125.141 56.5445 116.596 52.818 103.14 53.558C93.8072 54.0713 85.3609 57.2729 79.1318 62.8715C71.9014 69.1633 66.6309 77.8416 66.2752 86.2152C78.5975 83.1004 90.4768 83.6459 93.1527 89.4145C99.8957 103.953 80.6313 98.7666 66.935 103.124C66.2037 103.356 65.4865 103.598 64.7764 103.841C63.1609 108.372 61.2467 112.707 61.2467 115.843C61.2467 125.771 69.2658 119.452 72.7592 128.077C73.2572 129.307 74.9729 133.131 79.9299 137.94C80.7309 138.718 106.883 117.365 107.754 118.077C99.0619 136.592 85.0275 143.12 83.6564 143.843C71.2129 150.407 56.2779 155.808 51.025 166.185L50.7191 166.087C50.7191 166.087 34.559 204.422 31.085 223.455C31.4219 233.267 46.1271 230.805 46.1271 230.805L69.2875 223.9L72.0332 233.826L142.042 145.568C126.736 136.386 131.469 122.958 129.194 111.128C137.273 97.9586 142.026 91.1693 137.747 77.9166C141.92 73.6287 147.249 69.2535 153.339 68.0852C165.8 65.6945 188.505 77.5762 200.798 77.7355C217.076 77.9477 225.827 69.359 232.645 59.0412C226.396 61.0932 224.025 61.092 227.546 50.2141C219.239 53.2463 213.885 63.4562 198.836 61.0691C184.85 58.8502 163.635 54.6115 151.923 58.518C171.801 48.3092 187.4 37.8619 208.628 35.3951C233.503 37.1682 255.831 54.6818 268.915 25.416L268.916 9.90332ZM199.318 90.1053L176.465 118.854L186.156 125.717L209.012 96.9672L199.318 90.1053ZM78.9027 91.0762C75.7955 91.0762 72.6877 91.7764 72.6877 93.1762C73.9551 94.9006 78.4229 96.3033 80.5738 96.352C84.0062 96.352 85.1178 95.9746 85.1178 93.1762C85.1178 91.7764 82.01 91.0762 78.9027 91.0762ZM161.44 118.707L154.584 127.011L183.34 146.982L190.196 138.678L161.44 118.707ZM158.849 139.791L58.9305 265.752C58.9305 265.752 52.9264 270.689 58.9012 275.58C65.0359 280.602 69.8125 273.439 69.8125 273.439L169.729 147.477L158.849 139.791ZM169.942 164.35C169.942 164.35 157.82 180.079 151.649 187.858C126.953 218.982 77.9857 279.673 76.6826 280.527L76.7225 290.097H140.766L149.769 222.559L175.938 228.229C175.938 228.229 186.435 229.351 186.007 220.13C183.297 207.375 174.742 176.264 169.942 164.35ZM156.633 192.987L161.757 205.649L153.265 203.464L156.633 192.987Z"
|
||||
fill="#004E1F"
|
||||
/>
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
|
||||
{
|
||||
iconName: "ARROW",
|
||||
icon: (
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 11 18"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mx-auto mt-[7px]"
|
||||
>
|
||||
<path d="M10 1L2 9L10 17" stroke="#555555" stroke-width="2" />
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
|
||||
{
|
||||
iconName: "PLUS",
|
||||
icon: (
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 16 16"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mx-auto mt-[6px] opacity-70"
|
||||
>
|
||||
<path
|
||||
d="M8 1V15M1 8H15"
|
||||
stroke="#2B2B2B"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<div className=" bg-primary-300 flex justify-between rtl pt-4 px-4 pb-[50px] w-full">
|
||||
<div className="flex">
|
||||
{userIcon && (
|
||||
<div className="w-[50px] h-[50px] rounded-full bg-white"></div>
|
||||
)}
|
||||
<div className="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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex mt-2">
|
||||
{icon1 ? (
|
||||
<Link href={iconHref1}>
|
||||
<div
|
||||
className="w-[40px] h-[40px] bg-white rounded-full mx-1 pt-[3px]"
|
||||
onClick={iconEvent1}
|
||||
>
|
||||
{icons.find((e) => e.iconName == iconName1)?.icon}
|
||||
</div>
|
||||
</Link>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
|
||||
{icon2 ? (
|
||||
<Link href={iconHref2}>
|
||||
<div
|
||||
className="w-[40px] h-[40px] bg-white rounded-full mx-1 pt-[3px]"
|
||||
onClick={iconEvent2}
|
||||
>
|
||||
{icons.find((e) => e.iconName == iconName2)?.icon}
|
||||
</div>
|
||||
</Link>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default AppHeader;
|
|
@ -0,0 +1,75 @@
|
|||
"use client";
|
||||
|
||||
import AppContext from "@ctx/AppContext";
|
||||
import React, { useContext } from "react";
|
||||
|
||||
const RolesEmployees = () => {
|
||||
const CTX = useContext(AppContext);
|
||||
const rolesData = CTX.state.rolesData;
|
||||
|
||||
return (
|
||||
<>
|
||||
{rolesData && rolesData.length > 0 ? (
|
||||
<div className="flex flex-wrap">
|
||||
{rolesData.map((e) => (
|
||||
<div className="bg-white shadow-sm rounded-full p-1 ml-2 w-fit flex mt-4">
|
||||
<div className="mx-3">
|
||||
<p className="mb-0 mt-[6px] text-[12px] font-medium">
|
||||
{e.persianName}
|
||||
</p>
|
||||
</div>
|
||||
<div className="w-[30px] h-[30px] bg-secondaryLighter-100 rounded-full">
|
||||
<svg
|
||||
width="13"
|
||||
height="13"
|
||||
viewBox="0 0 18 18"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mx-auto mt-[8px]"
|
||||
>
|
||||
<g clip-path="url(#clip0_72_994)">
|
||||
<path
|
||||
d="M11.4653 2.36397L10.77 3.05922L4.37926 9.44922C3.94651 9.88272 3.72976 10.0995 3.54376 10.338C3.32409 10.6194 3.13573 10.924 2.98201 11.2462C2.85226 11.5192 2.75551 11.8102 2.56201 12.3907L1.74151 14.8515L1.54051 15.453C1.4935 15.5932 1.48652 15.7437 1.52037 15.8877C1.55422 16.0316 1.62755 16.1633 1.73212 16.2679C1.83669 16.3724 1.96835 16.4458 2.1123 16.4796C2.25626 16.5135 2.4068 16.5065 2.54701 16.4595L3.14851 16.2585L5.60926 15.438C6.19051 15.2445 6.48076 15.1477 6.75376 15.018C7.07626 14.8642 7.38076 14.676 7.66201 14.4562C7.90051 14.2702 8.11726 14.0535 8.55001 13.6207L14.9408 7.22997L15.636 6.53472C16.1891 5.98165 16.4998 5.23152 16.4998 4.44935C16.4998 3.66718 16.1891 2.91705 15.636 2.36397C15.0829 1.8109 14.3328 1.50018 13.5506 1.50018C12.7685 1.50018 12.0183 1.8109 11.4653 2.36397Z"
|
||||
stroke="#DA4215"
|
||||
stroke-width="1.5"
|
||||
/>
|
||||
<path
|
||||
d="M11.4653 2.36397L10.77 3.05922L4.37926 9.44922C3.94651 9.88272 3.72976 10.0995 3.54376 10.338C3.32409 10.6194 3.13573 10.924 2.98201 11.2462C2.85226 11.5192 2.75551 11.8102 2.56201 12.3907L1.74151 14.8515L1.54051 15.453C1.4935 15.5932 1.48652 15.7437 1.52037 15.8877C1.55422 16.0316 1.62755 16.1633 1.73212 16.2679C1.83669 16.3724 1.96835 16.4458 2.1123 16.4796C2.25626 16.5135 2.4068 16.5065 2.54701 16.4595L3.14851 16.2585L5.60926 15.438C6.19051 15.2445 6.48076 15.1477 6.75376 15.018C7.07626 14.8642 7.38076 14.676 7.66201 14.4562C7.90051 14.2702 8.11726 14.0535 8.55001 13.6207L14.9408 7.22997L15.636 6.53472C16.1891 5.98165 16.4998 5.23152 16.4998 4.44935C16.4998 3.66718 16.1891 2.91705 15.636 2.36397C15.0829 1.8109 14.3328 1.50018 13.5506 1.50018C12.7685 1.50018 12.0183 1.8109 11.4653 2.36397Z"
|
||||
stroke="#D03405"
|
||||
stroke-width="1.5"
|
||||
/>
|
||||
<g opacity="0.5">
|
||||
<path
|
||||
d="M10.77 3.05847C10.77 3.05847 10.857 4.53597 12.1605 5.83947C13.464 7.14297 14.9408 7.22922 14.9408 7.22922M3.14852 16.2585L1.74152 14.85"
|
||||
stroke="#DA4215"
|
||||
stroke-width="1.5"
|
||||
/>
|
||||
<path
|
||||
d="M10.77 3.05847C10.77 3.05847 10.857 4.53597 12.1605 5.83947C13.464 7.14297 14.9408 7.22922 14.9408 7.22922M3.14852 16.2585L1.74152 14.85"
|
||||
stroke="#D03405"
|
||||
stroke-width="1.5"
|
||||
/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_72_994">
|
||||
<rect width="18" height="18" fill="white" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex justify-center py-5">
|
||||
<div className="bg-white shadow mt-5 w-fit rounded-full p-4">
|
||||
چیزی یافت نشد
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default RolesEmployees;
|
|
@ -0,0 +1,81 @@
|
|||
import React from "react";
|
||||
|
||||
const UsersEmployees = () => {
|
||||
const data = [];
|
||||
return (
|
||||
<>
|
||||
{data.length > 0 ? (
|
||||
<>
|
||||
{data.map((e) => (
|
||||
<div className="mt-5">
|
||||
<div className="flex mt-5 ">
|
||||
<div className="w-[90px] h-[70px] bg-green-200 rounded-full sahdow-sm z-20 "></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">
|
||||
نگین اسلامیپور{" "}
|
||||
</h4>
|
||||
<p className="mb-0 text-[11px]">صندوق دار</p>
|
||||
</div>
|
||||
<div className="flex mt-1">
|
||||
<div className="mx-2 ">
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 18 18"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mt-1"
|
||||
>
|
||||
<g clip-path="url(#clip0_72_940)">
|
||||
<path
|
||||
d="M11.4653 2.364L10.77 3.05925L4.37926 9.44925C3.94651 9.88275 3.72976 10.0995 3.54376 10.338C3.32409 10.6195 3.13573 10.924 2.98201 11.2463C2.85226 11.5193 2.75551 11.8103 2.56201 12.3908L1.74151 14.8515L1.54051 15.453C1.4935 15.5932 1.48652 15.7438 1.52037 15.8877C1.55422 16.0317 1.62755 16.1633 1.73212 16.2679C1.83669 16.3725 1.96835 16.4458 2.1123 16.4796C2.25626 16.5135 2.4068 16.5065 2.54701 16.4595L3.14851 16.2585L5.60926 15.438C6.19051 15.2445 6.48076 15.1478 6.75376 15.018C7.07626 14.8643 7.38076 14.676 7.66201 14.4563C7.90051 14.2703 8.11726 14.0535 8.55001 13.6208L14.9408 7.23L15.636 6.53475C16.1891 5.98168 16.4998 5.23155 16.4998 4.44938C16.4998 3.66721 16.1891 2.91708 15.636 2.364C15.0829 1.81093 14.3328 1.50021 13.5506 1.50021C12.7685 1.50021 12.0183 1.81093 11.4653 2.364Z"
|
||||
stroke="#2B91EF"
|
||||
stroke-width="1.5"
|
||||
/>
|
||||
<path
|
||||
opacity="0.5"
|
||||
d="M10.77 3.0585C10.77 3.0585 10.857 4.536 12.1605 5.8395C13.464 7.143 14.9408 7.22925 14.9408 7.22925M3.14852 16.2585L1.74152 14.85"
|
||||
stroke="#2B91EF"
|
||||
stroke-width="1.5"
|
||||
/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_72_940">
|
||||
<rect width="18" height="18" fill="white" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
</div>
|
||||
<div>
|
||||
<svg
|
||||
width="33"
|
||||
height="33"
|
||||
viewBox="0 0 27 27"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M14.9783 13.3875L18.9551 9.40951C19.0626 9.30573 19.1483 9.18159 19.2072 9.04434C19.2662 8.90709 19.2972 8.75946 19.2985 8.61009C19.2998 8.46071 19.2714 8.31257 19.2148 8.17431C19.1582 8.03605 19.0747 7.91045 18.9691 7.80482C18.8635 7.69919 18.7378 7.61565 18.5996 7.55909C18.4613 7.50252 18.3132 7.47406 18.1638 7.47535C18.0144 7.47665 17.8668 7.50769 17.7296 7.56665C17.5923 7.62561 17.4682 7.71131 17.3644 7.81876L13.3864 11.7956L9.40951 7.81876C9.30573 7.71131 9.18159 7.62561 9.04434 7.56665C8.90709 7.50769 8.75946 7.47665 8.61009 7.47535C8.46071 7.47406 8.31257 7.50252 8.17431 7.55909C8.03605 7.61565 7.91045 7.69919 7.80482 7.80482C7.69919 7.91045 7.61565 8.03605 7.55909 8.17431C7.50252 8.31257 7.47406 8.46071 7.47535 8.61009C7.47665 8.75946 7.50769 8.90709 7.56665 9.04434C7.62561 9.18159 7.71131 9.30573 7.81876 9.40951L11.7956 13.3864L7.81876 17.3644C7.71131 17.4682 7.62561 17.5923 7.56665 17.7296C7.50769 17.8668 7.47665 18.0144 7.47535 18.1638C7.47406 18.3132 7.50252 18.4613 7.55909 18.5996C7.61565 18.7378 7.69919 18.8635 7.80482 18.9691C7.91045 19.0747 8.03605 19.1582 8.17431 19.2148C8.31257 19.2714 8.46071 19.2998 8.61009 19.2985C8.75946 19.2972 8.90709 19.2662 9.04434 19.2072C9.18159 19.1483 9.30573 19.0626 9.40951 18.9551L13.3864 14.9783L17.3644 18.9551C17.4682 19.0626 17.5923 19.1483 17.7296 19.2072C17.8668 19.2662 18.0144 19.2972 18.1638 19.2985C18.3132 19.2998 18.4613 19.2714 18.5996 19.2148C18.7378 19.1582 18.8635 19.0747 18.9691 18.9691C19.0747 18.8635 19.1582 18.7378 19.2148 18.5996C19.2714 18.4613 19.2998 18.3132 19.2985 18.1638C19.2972 18.0144 19.2662 17.8668 19.2072 17.7296C19.1483 17.5923 19.0626 17.4682 18.9551 17.3644L14.9783 13.3875Z"
|
||||
fill="#FF2C2C"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</>
|
||||
) : (
|
||||
<div className="flex justify-center py-5">
|
||||
<div className="bg-white shadow mt-5 w-fit rounded-full p-4">
|
||||
چیزی یافت نشد
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default UsersEmployees;
|
|
@ -0,0 +1,91 @@
|
|||
"use client";
|
||||
|
||||
import AppContext from "@ctx/AppContext";
|
||||
import Buttonbriz from "plugins/Buttonbriz/page";
|
||||
import Input from "plugins/Input/page";
|
||||
import validateIranPhone from "plugins/IranPhoneRegex";
|
||||
import React, { useContext, useState } from "react";
|
||||
import { toast } from "react-toastify";
|
||||
|
||||
const LoginStep = (props) => {
|
||||
const [roleCheckBox, setRoleCheckBox] = useState(false);
|
||||
const [alertRolCheckBox, setAlertRolCheckBox] = useState(false);
|
||||
const CTX = useContext(AppContext);
|
||||
const phoneNumber = CTX.state.phoneNumber;
|
||||
// console.log(alertRolCheckBox);
|
||||
|
||||
const handleConfirmPhoneNumber = () => {
|
||||
setAlertRolCheckBox(false);
|
||||
|
||||
if (validateIranPhone(phoneNumber) && roleCheckBox) {
|
||||
CTX.ConfirmPhoneNumber(phoneNumber);
|
||||
} else {
|
||||
if (!validateIranPhone(phoneNumber)) {
|
||||
toast.error(" شماره تماس را درست وارد کنید ", {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
} else if (!roleCheckBox) {
|
||||
setTimeout(() => {
|
||||
setAlertRolCheckBox(true);
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="px-5 mt-6">
|
||||
<p className="mb-0 text-textMain-100 mt-1 text-right text-sm">
|
||||
{" "}
|
||||
برای ورود یا ثبت نام به اپلیکیشن مدیریت وظایف رستوران باید شماره تلفن
|
||||
همراه خود را وارد کنید
|
||||
</p>
|
||||
|
||||
<div className="mt-3">
|
||||
<Input
|
||||
lable="شماره تلفن خود را وارد کنید"
|
||||
id="phoneNumber-id"
|
||||
name="phoneNumber"
|
||||
type={"number"}
|
||||
inputEvent={(e) => CTX.setPhoneNumber(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Buttonbriz
|
||||
title="تایید شماره تلفن"
|
||||
color="SECONDARY"
|
||||
icon="PHONE"
|
||||
buttonEvent={() => handleConfirmPhoneNumber()}
|
||||
/>
|
||||
|
||||
<div
|
||||
className={`flex rtl mt-4 tr03 border-[2px] border-transparent py-2 ${
|
||||
alertRolCheckBox ? "animate-pulse-1 " : ""
|
||||
}`}
|
||||
>
|
||||
<div>
|
||||
{/* <input
|
||||
type="checkbox"
|
||||
className="w-[40px] h-[40px] !rounded-xl mx-2 custom-checkbox mt-1"
|
||||
value={}
|
||||
/> */}
|
||||
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={roleCheckBox ? true : false}
|
||||
defaultValue={roleCheckBox}
|
||||
className="w-[40px] h-[40px] !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>
|
||||
);
|
||||
};
|
||||
|
||||
export default LoginStep;
|
|
@ -0,0 +1,188 @@
|
|||
"use client";
|
||||
|
||||
import AppContext from "@ctx/AppContext";
|
||||
import { useRouter } from "next/navigation";
|
||||
import Buttonbriz from "plugins/Buttonbriz/page";
|
||||
import Input from "plugins/Input/page";
|
||||
import PersianNumber from "plugins/PersianNumber";
|
||||
import React, { useContext, useEffect, useRef, useState } from "react";
|
||||
import { toast } from "react-toastify";
|
||||
import SimpleReactValidator from "simple-react-validator";
|
||||
import { useSearchParams } from "next/navigation";
|
||||
|
||||
const SignUp = (props) => {
|
||||
const CTX = useContext(AppContext);
|
||||
const router = useRouter();
|
||||
const query = useSearchParams();
|
||||
|
||||
const [firstName, setFirstName] = useState("");
|
||||
const [lastName, setLastName] = useState("");
|
||||
const [complexName, setComplexName] = useState("");
|
||||
const [supportPhoneNumber, setSupportPhoneNumber] = useState(
|
||||
CTX.state.phoneNumber
|
||||
);
|
||||
const [complexAddress, setComplexAddress] = useState("");
|
||||
const [, forceUpdate] = useState();
|
||||
|
||||
const validator = useRef(
|
||||
new SimpleReactValidator({
|
||||
messages: {
|
||||
required: "پر کردن این فیلد الزامی میباشد",
|
||||
},
|
||||
element: (message) => (
|
||||
<>
|
||||
<div className="text-right px-1 ">
|
||||
<small className="text-red-600 t-ig-small ">{message}</small>
|
||||
</div>
|
||||
</>
|
||||
),
|
||||
})
|
||||
);
|
||||
|
||||
const body = {
|
||||
firstName,
|
||||
lastName,
|
||||
complexName,
|
||||
supportPhoneNumber,
|
||||
complexAddress,
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (!!query.get("phoneNumber")) {
|
||||
setSupportPhoneNumber(query.get("phoneNumber"));
|
||||
}
|
||||
}, []);
|
||||
|
||||
const handleSingnUp = () => {
|
||||
if (validator.current.allValid()) {
|
||||
CTX.SignUpLogin(body);
|
||||
} else {
|
||||
toast.error("پرکردن همه ی فیلد ها واجب است", {
|
||||
position: "bottom-right",
|
||||
autoClose: 2000,
|
||||
hideProgressBar: false,
|
||||
closeOnClick: true,
|
||||
pauseOnHover: true,
|
||||
draggable: true,
|
||||
progress: undefined,
|
||||
});
|
||||
|
||||
validator.current.showMessages();
|
||||
forceUpdate(1);
|
||||
}
|
||||
};
|
||||
|
||||
console.log(body);
|
||||
|
||||
return (
|
||||
<div className="px-5 mt-6">
|
||||
<p className="mb-0 text-textMain-100 mt-1 text-right text-sm ">
|
||||
برای ورود یا ثبت نام به اپلیکیشن مدیریت وظایف رستوران باید شماره تلفن
|
||||
همراه خود را وارد کنید
|
||||
</p>
|
||||
|
||||
<div className="mt-8">
|
||||
<Input
|
||||
lable="نام"
|
||||
id="firstName-id"
|
||||
name="firstName"
|
||||
type={"text"}
|
||||
value={firstName}
|
||||
inputEvent={(e) => {
|
||||
setFirstName(e.target.value);
|
||||
validator.current.showMessageFor("firstName");
|
||||
}}
|
||||
style="text-right"
|
||||
validator={true}
|
||||
validatorData={validator.current.message(
|
||||
"firstName",
|
||||
firstName,
|
||||
"required"
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="mt-8">
|
||||
<Input
|
||||
lable="نام خانوادگی"
|
||||
id="lastName-id"
|
||||
name="lastName"
|
||||
type={"text"}
|
||||
value={lastName}
|
||||
inputEvent={(e) => {
|
||||
setLastName(e.target.value);
|
||||
validator.current.showMessageFor("lastName");
|
||||
}}
|
||||
style="text-right"
|
||||
validator={true}
|
||||
validatorData={validator.current.message(
|
||||
"lastName",
|
||||
lastName,
|
||||
"required"
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="mt-8">
|
||||
<Input
|
||||
lable="نام مجموعه"
|
||||
id="complexName-id"
|
||||
name="complexName"
|
||||
type={"text"}
|
||||
value={complexName}
|
||||
inputEvent={(e) => {
|
||||
setComplexName(e.target.value);
|
||||
validator.current.showMessageFor("complexName");
|
||||
}}
|
||||
style="text-right"
|
||||
validator={true}
|
||||
validatorData={validator.current.message(
|
||||
"complexName",
|
||||
complexName,
|
||||
"required"
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="mt-3">
|
||||
<Input
|
||||
lable="شماره تماس مدیریت مجموعه"
|
||||
id="supportPhoneNumber-id"
|
||||
name="supportPhoneNumber"
|
||||
type={"number"}
|
||||
value={supportPhoneNumber}
|
||||
inputEvent={(e) => setSupportPhoneNumber(e.target.value)}
|
||||
style="text-right"
|
||||
readOnly={true}
|
||||
/>
|
||||
</div>
|
||||
<div className="mt-3">
|
||||
<Input
|
||||
lable="ادرس مجموعه "
|
||||
id="complexAddress-id"
|
||||
name="complexAddress"
|
||||
type={"text"}
|
||||
value={complexAddress}
|
||||
inputEvent={(e) => {
|
||||
setComplexAddress(e.target.value);
|
||||
validator.current.showMessageFor("complexAddress");
|
||||
}}
|
||||
style="text-right"
|
||||
validator={true}
|
||||
validatorData={validator.current.message(
|
||||
"complexAddress",
|
||||
complexAddress,
|
||||
"required"
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Buttonbriz
|
||||
title="تایید اطلاعات"
|
||||
color="PRIMARY"
|
||||
icon="CHECK"
|
||||
buttonEvent={() => handleSingnUp()}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default SignUp;
|
|
@ -0,0 +1,57 @@
|
|||
"use client";
|
||||
|
||||
import AppContext from "@ctx/AppContext";
|
||||
import Buttonbriz from "plugins/Buttonbriz/page";
|
||||
import Input from "plugins/Input/page";
|
||||
import PersianNumber from "plugins/PersianNumber";
|
||||
import React, { useContext } from "react";
|
||||
|
||||
const VerifyCodeStep = () => {
|
||||
const CTX = useContext(AppContext);
|
||||
const phoneNumber = CTX.state.phoneNumber;
|
||||
const verifyCode = CTX.state.verifyCode;
|
||||
|
||||
const handleSendVerify = () => {
|
||||
if (verifyCode.length <= 5) {
|
||||
toast.error(" کد را صحیح وارد کنید ", {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
} else {
|
||||
CTX.LoginWhitVerifyCode();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<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>
|
||||
ارسال شده است
|
||||
</p>
|
||||
|
||||
<div className="mt-3">
|
||||
<Input
|
||||
lable="کد ارسال شده را وارد کنید"
|
||||
id="verifyCode-id"
|
||||
name="verifyCode"
|
||||
type={"number"}
|
||||
style="text-center"
|
||||
inputEvent={(e) => CTX.setVerifyCode(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Buttonbriz
|
||||
title="تایید شماره تلفن"
|
||||
color="SECONDARY"
|
||||
icon="PHONE"
|
||||
buttonEvent={() => handleSendVerify()}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default VerifyCodeStep;
|
|
@ -0,0 +1,207 @@
|
|||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import React, { useContext } from "react";
|
||||
import { usePathname } from "next/navigation";
|
||||
import Image from "next/image";
|
||||
import logo from "@img/logo.png";
|
||||
import AppContext from "@ctx/AppContext";
|
||||
|
||||
const NavBAr = (props) => {
|
||||
const usePath = usePathname();
|
||||
const CTX = useContext(AppContext);
|
||||
|
||||
console.log("vvvvv", CTX.state.BigPlusOpen);
|
||||
|
||||
const openBigPlus = () => {
|
||||
setTimeout(() => {
|
||||
CTX.setBigPlusRotateIcon(true);
|
||||
}, 500);
|
||||
CTX.setBigPlusOpen(true);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="fixed w-full z-10 bottom-0 ">
|
||||
{/* <div className="w-[100px] text-left overflow-hidden">
|
||||
<Image src={divide} alt="" className=" " />
|
||||
</div> */}
|
||||
<div className="bg-white shadow px-4 py-5 flex rounded-t-[30px] ">
|
||||
<Link href={"/home"} className="w-full !no-underline mr-5">
|
||||
<>
|
||||
{usePath.includes("/home") ? (
|
||||
<div className="flex justify-center w-full">
|
||||
<svg
|
||||
width="32"
|
||||
height="32"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M11 14L15 20H21L12 4L3 20H9L13 14"
|
||||
stroke="black"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex justify-center opacity-20 w-full">
|
||||
<svg
|
||||
width="32"
|
||||
height="32"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M11 14L15 20H21L12 4L3 20H9L13 14"
|
||||
stroke="black"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
</Link>
|
||||
|
||||
<Link href={"/shifts"} className="w-full !no-underline mr-10">
|
||||
<>
|
||||
{usePath.includes("/shifts") ? (
|
||||
<div className="flex justify-center w-full">
|
||||
<svg
|
||||
width="32"
|
||||
height="32"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M20.984 12.53C21.0938 10.6693 20.6232 8.82034 19.6371 7.23856C18.6511 5.65678 17.1982 4.42018 15.4792 3.69954C13.7601 2.9789 11.8598 2.80978 10.0405 3.21554C8.22123 3.62129 6.57282 4.5819 5.32292 5.9647C4.07303 7.3475 3.28331 9.08426 3.06283 10.9351C2.84235 12.786 3.20198 14.6597 4.09207 16.2974C4.98216 17.9351 6.35878 19.2561 8.03183 20.0779C9.70487 20.8996 11.5918 21.1817 13.432 20.885"
|
||||
stroke="black"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
<path
|
||||
d="M12 7V12L15 15M19 16L17 19H21L19 22"
|
||||
stroke="black"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex justify-center opacity-20 w-full">
|
||||
<svg
|
||||
width="32"
|
||||
height="32"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M20.984 12.53C21.0938 10.6693 20.6232 8.82034 19.6371 7.23856C18.6511 5.65678 17.1982 4.42018 15.4792 3.69954C13.7601 2.9789 11.8598 2.80978 10.0405 3.21554C8.22123 3.62129 6.57282 4.5819 5.32292 5.9647C4.07303 7.3475 3.28331 9.08426 3.06283 10.9351C2.84235 12.786 3.20198 14.6597 4.09207 16.2974C4.98216 17.9351 6.35878 19.2561 8.03183 20.0779C9.70487 20.8996 11.5918 21.1817 13.432 20.885"
|
||||
stroke="black"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
<path
|
||||
d="M12 7V12L15 15M19 16L17 19H21L19 22"
|
||||
stroke="black"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
</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>
|
||||
|
||||
<Link href={"/employees"} className="w-full !no-underline ml-10">
|
||||
<>
|
||||
{usePath.includes("/employees") ? (
|
||||
<div className="flex justify-center w-full">
|
||||
<svg
|
||||
width="30"
|
||||
height="30"
|
||||
viewBox="0 0 256 256"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M125.18 156.94C135.231 148.492 142.44 137.157 145.83 124.473C149.22 111.789 148.627 98.369 144.131 86.0333C139.635 73.6976 131.454 63.043 120.698 55.5146C109.941 47.9861 97.1294 43.9481 84 43.9481C70.8706 43.9481 58.0588 47.9861 47.3022 55.5146C36.5456 63.043 28.3647 73.6976 23.8689 86.0333C19.3732 98.369 18.7801 111.789 22.1702 124.473C25.5603 137.157 32.7694 148.492 42.82 156.94C27.1258 164.036 13.5251 175.057 3.32997 188.94C1.44694 191.506 0.660351 194.715 1.14326 197.861C1.62616 201.007 3.339 203.832 5.90497 205.715C8.47094 207.598 11.6799 208.385 14.8258 207.902C17.9717 207.419 20.7969 205.706 22.68 203.14C29.7374 193.501 38.9676 185.662 49.6217 180.258C60.2758 174.854 72.0538 172.038 84 172.038C95.9462 172.038 107.724 174.854 118.378 180.258C129.032 185.662 138.263 193.501 145.32 203.14C147.203 205.707 150.029 207.421 153.176 207.905C156.322 208.389 159.533 207.603 162.1 205.72C164.667 203.837 166.381 201.011 166.865 197.864C167.349 194.717 166.563 191.507 164.68 188.94C154.479 175.059 140.875 164.039 125.18 156.94ZM44 108C44 100.089 46.3459 92.3552 50.7412 85.7772C55.1364 79.1992 61.3836 74.0723 68.6926 71.0448C76.0017 68.0173 84.0443 67.2252 91.8036 68.7686C99.5628 70.312 106.69 74.1216 112.284 79.7157C117.878 85.3098 121.688 92.4372 123.231 100.196C124.775 107.956 123.983 115.998 120.955 123.307C117.928 130.616 112.801 136.864 106.223 141.259C99.6448 145.654 91.9112 148 84 148C73.3913 148 63.2172 143.786 55.7157 136.284C48.2142 128.783 44 118.609 44 108ZM250.1 205.67C248.83 206.604 247.388 207.278 245.857 207.654C244.326 208.03 242.736 208.1 241.177 207.862C239.619 207.623 238.123 207.08 236.775 206.263C235.427 205.446 234.253 204.371 233.32 203.1C226.245 193.48 217.011 185.654 206.361 180.253C195.711 174.851 183.942 172.024 172 172C168.817 172 165.765 170.736 163.515 168.485C161.264 166.235 160 163.183 160 160C160 156.817 161.264 153.765 163.515 151.515C165.765 149.264 168.817 148 172 148C177.89 147.993 183.705 146.686 189.031 144.171C194.357 141.657 199.062 137.997 202.809 133.454C206.557 128.91 209.255 123.596 210.712 117.889C212.168 112.182 212.345 106.224 211.232 100.44C210.119 94.657 207.743 89.1907 204.273 84.4319C200.802 79.6732 196.324 75.7395 191.158 72.9118C185.991 70.0841 180.264 68.4322 174.385 68.0741C168.507 67.7159 162.621 68.6604 157.15 70.84C155.684 71.4401 154.114 71.7442 152.531 71.7347C150.947 71.7251 149.381 71.4022 147.922 70.7845C146.464 70.1667 145.142 69.2664 144.034 68.1355C142.925 67.0045 142.051 65.6653 141.463 64.195C140.874 62.7247 140.582 61.1524 140.604 59.5688C140.626 57.9852 140.961 56.4216 141.59 54.9682C142.219 53.5147 143.13 52.2002 144.27 51.1003C145.409 50.0005 146.755 49.1371 148.23 48.56C162.353 42.9054 178.029 42.4667 192.446 47.3225C206.863 52.1783 219.079 62.0109 226.904 75.0575C234.729 88.1041 237.65 103.511 235.144 118.517C232.638 133.522 224.869 147.144 213.23 156.94C228.924 164.036 242.525 175.057 252.72 188.94C254.584 191.508 255.355 194.711 254.864 197.846C254.373 200.981 252.66 203.795 250.1 205.67Z"
|
||||
fill="black"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex justify-center opacity-20 w-full">
|
||||
<svg
|
||||
width="30"
|
||||
height="30"
|
||||
viewBox="0 0 256 256"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M125.18 156.94C135.231 148.492 142.44 137.157 145.83 124.473C149.22 111.789 148.627 98.369 144.131 86.0333C139.635 73.6976 131.454 63.043 120.698 55.5146C109.941 47.9861 97.1294 43.9481 84 43.9481C70.8706 43.9481 58.0588 47.9861 47.3022 55.5146C36.5456 63.043 28.3647 73.6976 23.8689 86.0333C19.3732 98.369 18.7801 111.789 22.1702 124.473C25.5603 137.157 32.7694 148.492 42.82 156.94C27.1258 164.036 13.5251 175.057 3.32997 188.94C1.44694 191.506 0.660351 194.715 1.14326 197.861C1.62616 201.007 3.339 203.832 5.90497 205.715C8.47094 207.598 11.6799 208.385 14.8258 207.902C17.9717 207.419 20.7969 205.706 22.68 203.14C29.7374 193.501 38.9676 185.662 49.6217 180.258C60.2758 174.854 72.0538 172.038 84 172.038C95.9462 172.038 107.724 174.854 118.378 180.258C129.032 185.662 138.263 193.501 145.32 203.14C147.203 205.707 150.029 207.421 153.176 207.905C156.322 208.389 159.533 207.603 162.1 205.72C164.667 203.837 166.381 201.011 166.865 197.864C167.349 194.717 166.563 191.507 164.68 188.94C154.479 175.059 140.875 164.039 125.18 156.94ZM44 108C44 100.089 46.3459 92.3552 50.7412 85.7772C55.1364 79.1992 61.3836 74.0723 68.6926 71.0448C76.0017 68.0173 84.0443 67.2252 91.8036 68.7686C99.5628 70.312 106.69 74.1216 112.284 79.7157C117.878 85.3098 121.688 92.4372 123.231 100.196C124.775 107.956 123.983 115.998 120.955 123.307C117.928 130.616 112.801 136.864 106.223 141.259C99.6448 145.654 91.9112 148 84 148C73.3913 148 63.2172 143.786 55.7157 136.284C48.2142 128.783 44 118.609 44 108ZM250.1 205.67C248.83 206.604 247.388 207.278 245.857 207.654C244.326 208.03 242.736 208.1 241.177 207.862C239.619 207.623 238.123 207.08 236.775 206.263C235.427 205.446 234.253 204.371 233.32 203.1C226.245 193.48 217.011 185.654 206.361 180.253C195.711 174.851 183.942 172.024 172 172C168.817 172 165.765 170.736 163.515 168.485C161.264 166.235 160 163.183 160 160C160 156.817 161.264 153.765 163.515 151.515C165.765 149.264 168.817 148 172 148C177.89 147.993 183.705 146.686 189.031 144.171C194.357 141.657 199.062 137.997 202.809 133.454C206.557 128.91 209.255 123.596 210.712 117.889C212.168 112.182 212.345 106.224 211.232 100.44C210.119 94.657 207.743 89.1907 204.273 84.4319C200.802 79.6732 196.324 75.7395 191.158 72.9118C185.991 70.0841 180.264 68.4322 174.385 68.0741C168.507 67.7159 162.621 68.6604 157.15 70.84C155.684 71.4401 154.114 71.7442 152.531 71.7347C150.947 71.7251 149.381 71.4022 147.922 70.7845C146.464 70.1667 145.142 69.2664 144.034 68.1355C142.925 67.0045 142.051 65.6653 141.463 64.195C140.874 62.7247 140.582 61.1524 140.604 59.5688C140.626 57.9852 140.961 56.4216 141.59 54.9682C142.219 53.5147 143.13 52.2002 144.27 51.1003C145.409 50.0005 146.755 49.1371 148.23 48.56C162.353 42.9054 178.029 42.4667 192.446 47.3225C206.863 52.1783 219.079 62.0109 226.904 75.0575C234.729 88.1041 237.65 103.511 235.144 118.517C232.638 133.522 224.869 147.144 213.23 156.94C228.924 164.036 242.525 175.057 252.72 188.94C254.584 191.508 255.355 194.711 254.864 197.846C254.373 200.981 252.66 203.795 250.1 205.67Z"
|
||||
fill="black"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
</Link>
|
||||
|
||||
<Link href={"/dashboard"} className="w-full !no-underline ml-5">
|
||||
<>
|
||||
{usePath.includes("/dashboard") ? (
|
||||
<div className="flex justify-center w-full">
|
||||
<div className="w-[32px] mt-2">
|
||||
<Image src={logo} />
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex justify-center opacity-20 w-full">
|
||||
<div className="w-[32px] mt-2">
|
||||
<Image src={logo} />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default NavBAr;
|
|
@ -0,0 +1,214 @@
|
|||
"use client";
|
||||
import Buttonbriz from "plugins/Buttonbriz/page";
|
||||
import Input from "plugins/Input/page";
|
||||
import React, { useState } from "react";
|
||||
|
||||
const TaskCard = () => {
|
||||
const [conditionTask, setConditionTask] = useState(0);
|
||||
|
||||
const handleConditionTaskCircle = () => {
|
||||
if (conditionTask == 3 || conditionTask == 4) {
|
||||
return;
|
||||
} else {
|
||||
setConditionTask(1);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`bg-white shadow-sm rounded-xl p-4 mt-4 overflow-hidden ${
|
||||
conditionTask == 3 || conditionTask == 4 ? "fuck-click opacity-60" : ""
|
||||
}`}
|
||||
>
|
||||
<div className="flex">
|
||||
<div
|
||||
className={`w-[60px] h-[50px] border-2 rounded-full ml-3 tr03 ${
|
||||
conditionTask == 1
|
||||
? "animate-spin-slow duration-700 border-gray-700 border-dashed"
|
||||
: conditionTask == 2 || conditionTask == 4
|
||||
? "border-red-600"
|
||||
: conditionTask == 3
|
||||
? "border-primary-200"
|
||||
: "border-gray-700 border-dashed"
|
||||
}`}
|
||||
onClick={() => handleConditionTaskCircle()}
|
||||
>
|
||||
{conditionTask == 2 || conditionTask == 4 ? (
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 167 168"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mx-auto mt-3 "
|
||||
>
|
||||
<path
|
||||
d="M95.7504 84.0002L164.834 14.9169C166.199 13.3227 166.912 11.2721 166.831 9.1748C166.75 7.0775 165.881 5.08801 164.397 3.60389C162.913 2.11976 160.923 1.25032 158.826 1.16931C156.729 1.0883 154.678 1.80169 153.084 3.16691L84.0004 72.2502L14.9171 3.08358C13.3479 1.51438 11.2196 0.632812 9.00043 0.632812C6.78125 0.632812 4.65296 1.51438 3.08376 3.08358C1.51456 4.65277 0.632996 6.78106 0.632996 9.00024C0.632996 11.2194 1.51456 13.3477 3.08376 14.9169L72.2504 84.0002L3.08376 153.084C2.21141 153.831 1.50291 154.75 1.00272 155.784C0.502522 156.818 0.221437 157.944 0.177108 159.091C0.132779 160.239 0.326158 161.384 0.745113 162.453C1.16407 163.522 1.79955 164.494 2.61168 165.306C3.4238 166.118 4.39503 166.753 5.4644 167.172C6.53378 167.591 7.67821 167.785 8.82587 167.74C9.97353 167.696 11.0996 167.415 12.1335 166.915C13.1674 166.414 14.0867 165.706 14.8338 164.834L84.0004 95.7502L153.084 164.834C154.678 166.199 156.729 166.912 158.826 166.831C160.923 166.75 162.913 165.881 164.397 164.397C165.881 162.912 166.75 160.923 166.831 158.826C166.912 156.728 166.199 154.678 164.834 153.084L95.7504 84.0002Z"
|
||||
fill="red"
|
||||
/>
|
||||
</svg>
|
||||
) : conditionTask == 3 ? (
|
||||
<svg
|
||||
width="37"
|
||||
height="37"
|
||||
viewBox="0 0 300 300"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mx-auto mt-1 "
|
||||
>
|
||||
<path
|
||||
d="M57.062 155.087C56.2612 154.132 55.2777 153.345 54.1692 152.774C53.0607 152.203 51.8494 151.859 50.6062 151.762C49.363 151.665 48.113 151.817 46.9292 152.209C45.7455 152.6 44.6518 153.225 43.7122 154.044C42.7727 154.864 42.0061 155.863 41.4574 156.983C40.9087 158.103 40.5889 159.321 40.5167 160.566C40.4445 161.811 40.6214 163.057 41.037 164.233C41.4526 165.409 42.0985 166.49 42.937 167.412L57.062 155.087ZM89.287 206.25L82.2245 212.412C83.1045 213.421 84.19 214.228 85.4082 214.782C86.6264 215.336 87.949 215.622 89.287 215.622C90.6251 215.622 91.9477 215.336 93.1658 214.782C94.384 214.228 95.4696 213.421 96.3495 212.412L89.287 206.25ZM194.562 99.9125C195.401 98.9896 196.046 97.9086 196.462 96.7329C196.878 95.5573 197.055 94.3105 196.982 93.0657C196.91 91.8208 196.59 90.6028 196.042 89.4831C195.493 88.3633 194.726 87.3643 193.787 86.5445C192.847 85.7247 191.754 85.1005 190.57 84.7086C189.386 84.3166 188.136 84.1648 186.893 84.2619C185.65 84.359 184.438 84.7032 183.33 85.2742C182.221 85.8452 181.238 86.6317 180.437 87.5875L194.562 99.9125ZM131.325 143.837C129.749 145.718 128.973 148.142 129.164 150.589C129.355 153.035 130.498 155.309 132.347 156.922C134.196 158.536 136.604 159.36 139.053 159.218C141.503 159.076 143.799 157.979 145.45 156.162L131.325 143.837ZM120.9 184.287C121.738 183.365 122.384 182.284 122.8 181.108C123.215 179.932 123.392 178.686 123.32 177.441C123.248 176.196 122.928 174.978 122.379 173.858C121.83 172.738 121.064 171.739 120.124 170.919C119.185 170.1 118.091 169.475 116.907 169.084C115.724 168.692 114.474 168.54 113.23 168.637C111.987 168.734 110.776 169.078 109.667 169.649C108.559 170.22 107.575 171.007 106.775 171.962L120.9 184.287ZM42.937 167.412L82.2245 212.412L96.3495 200.087L57.062 155.087L42.937 167.412ZM96.3495 212.412L120.9 184.287L106.775 171.962L82.2245 200.087L96.3495 212.412ZM145.45 156.162L170.012 128.037L155.887 115.712L131.325 143.837L145.45 156.162ZM170.012 128.037L194.562 99.9125L180.437 87.5875L155.887 115.712L170.012 128.037Z"
|
||||
fill="green"
|
||||
/>
|
||||
<path
|
||||
d="M250 94.5371L196.425 150.787M137.5 200L142.862 207.037L169.65 178.912"
|
||||
stroke="green"
|
||||
stroke-width="18.75"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</div>
|
||||
<div className="w-full">
|
||||
<h3
|
||||
className={`text-base font-bold tr03 ${
|
||||
conditionTask == 2 || conditionTask == 4
|
||||
? "text-red-600"
|
||||
: "text-primary-300"
|
||||
} `}
|
||||
>
|
||||
پاک کردن شیشه های روبرویی رستوران
|
||||
</h3>
|
||||
<p
|
||||
className={`mb-0 text-[12px] tr03 ${
|
||||
conditionTask == 2 || conditionTask == 4 ? "text-red-600" : ""
|
||||
}`}
|
||||
>
|
||||
لطفا دو شیشه روبرو رستوران را با دقت تمیز کنید و جارو بکشید
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className={`flex mx-2 mt-3 tr03 ${
|
||||
conditionTask == 1 || conditionTask == 2
|
||||
? "relative top-[300px] h-0"
|
||||
: " relative top-0 h-fit "
|
||||
}`}
|
||||
>
|
||||
<div className="bg-secondaryLighter-100 w-fit relative px-2 text-[12px] my-2 mx-1 rounded-3xl text-secondary-200">
|
||||
اهمیت بالا{" "}
|
||||
</div>
|
||||
<div className="bg-secondaryLighter-100 w-fit relative px-2 text-[12px] my-2 mx-1 rounded-3xl text-secondary-200">
|
||||
شیفت صبح
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
className={`flex justify-between rtl mt-3 tr03 ${
|
||||
conditionTask == 1
|
||||
? "relative top-0 h-fit "
|
||||
: " relative top-[300px] h-0 "
|
||||
}`}
|
||||
>
|
||||
<div
|
||||
className="w-[50px] h-[50px] rounded-full bg-sky-600 pt-4"
|
||||
onClick={() => setConditionTask(0)}
|
||||
>
|
||||
<svg
|
||||
width="18"
|
||||
height="18"
|
||||
viewBox="0 0 150 88"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mx-auto"
|
||||
>
|
||||
<path
|
||||
d="M137.5 75L75 12.5L12.5 75"
|
||||
stroke="white"
|
||||
stroke-width="25"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
<div className="flex ">
|
||||
{" "}
|
||||
<div
|
||||
className="w-[50px] h-[50px] rounded-full bg-primary-200 pt-1 mx-2"
|
||||
onClick={() => setConditionTask(3)}
|
||||
>
|
||||
<svg
|
||||
width="37"
|
||||
height="37"
|
||||
viewBox="0 0 300 300"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mx-auto "
|
||||
>
|
||||
<path
|
||||
d="M57.062 155.087C56.2612 154.132 55.2777 153.345 54.1692 152.774C53.0607 152.203 51.8494 151.859 50.6062 151.762C49.363 151.665 48.113 151.817 46.9292 152.209C45.7455 152.6 44.6518 153.225 43.7122 154.044C42.7727 154.864 42.0061 155.863 41.4574 156.983C40.9087 158.103 40.5889 159.321 40.5167 160.566C40.4445 161.811 40.6214 163.057 41.037 164.233C41.4526 165.409 42.0985 166.49 42.937 167.412L57.062 155.087ZM89.287 206.25L82.2245 212.412C83.1045 213.421 84.19 214.228 85.4082 214.782C86.6264 215.336 87.949 215.622 89.287 215.622C90.6251 215.622 91.9477 215.336 93.1658 214.782C94.384 214.228 95.4696 213.421 96.3495 212.412L89.287 206.25ZM194.562 99.9125C195.401 98.9896 196.046 97.9086 196.462 96.7329C196.878 95.5573 197.055 94.3105 196.982 93.0657C196.91 91.8208 196.59 90.6028 196.042 89.4831C195.493 88.3633 194.726 87.3643 193.787 86.5445C192.847 85.7247 191.754 85.1005 190.57 84.7086C189.386 84.3166 188.136 84.1648 186.893 84.2619C185.65 84.359 184.438 84.7032 183.33 85.2742C182.221 85.8452 181.238 86.6317 180.437 87.5875L194.562 99.9125ZM131.325 143.837C129.749 145.718 128.973 148.142 129.164 150.589C129.355 153.035 130.498 155.309 132.347 156.922C134.196 158.536 136.604 159.36 139.053 159.218C141.503 159.076 143.799 157.979 145.45 156.162L131.325 143.837ZM120.9 184.287C121.738 183.365 122.384 182.284 122.8 181.108C123.215 179.932 123.392 178.686 123.32 177.441C123.248 176.196 122.928 174.978 122.379 173.858C121.83 172.738 121.064 171.739 120.124 170.919C119.185 170.1 118.091 169.475 116.907 169.084C115.724 168.692 114.474 168.54 113.23 168.637C111.987 168.734 110.776 169.078 109.667 169.649C108.559 170.22 107.575 171.007 106.775 171.962L120.9 184.287ZM42.937 167.412L82.2245 212.412L96.3495 200.087L57.062 155.087L42.937 167.412ZM96.3495 212.412L120.9 184.287L106.775 171.962L82.2245 200.087L96.3495 212.412ZM145.45 156.162L170.012 128.037L155.887 115.712L131.325 143.837L145.45 156.162ZM170.012 128.037L194.562 99.9125L180.437 87.5875L155.887 115.712L170.012 128.037Z"
|
||||
fill="#ffffff"
|
||||
/>
|
||||
<path
|
||||
d="M250 94.5371L196.425 150.787M137.5 200L142.862 207.037L169.65 178.912"
|
||||
stroke="#ffffff"
|
||||
stroke-width="18.75"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
<div
|
||||
className="w-[50px] h-[50px] rounded-full bg-red-600 pt-4"
|
||||
onClick={() => setConditionTask(2)}
|
||||
>
|
||||
<svg
|
||||
width="15"
|
||||
height="15"
|
||||
viewBox="0 0 167 168"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mx-auto "
|
||||
>
|
||||
<path
|
||||
d="M95.7504 84.0002L164.834 14.9169C166.199 13.3227 166.912 11.2721 166.831 9.1748C166.75 7.0775 165.881 5.08801 164.397 3.60389C162.913 2.11976 160.923 1.25032 158.826 1.16931C156.729 1.0883 154.678 1.80169 153.084 3.16691L84.0004 72.2502L14.9171 3.08358C13.3479 1.51438 11.2196 0.632812 9.00043 0.632812C6.78125 0.632812 4.65296 1.51438 3.08376 3.08358C1.51456 4.65277 0.632996 6.78106 0.632996 9.00024C0.632996 11.2194 1.51456 13.3477 3.08376 14.9169L72.2504 84.0002L3.08376 153.084C2.21141 153.831 1.50291 154.75 1.00272 155.784C0.502522 156.818 0.221437 157.944 0.177108 159.091C0.132779 160.239 0.326158 161.384 0.745113 162.453C1.16407 163.522 1.79955 164.494 2.61168 165.306C3.4238 166.118 4.39503 166.753 5.4644 167.172C6.53378 167.591 7.67821 167.785 8.82587 167.74C9.97353 167.696 11.0996 167.415 12.1335 166.915C13.1674 166.414 14.0867 165.706 14.8338 164.834L84.0004 95.7502L153.084 164.834C154.678 166.199 156.729 166.912 158.826 166.831C160.923 166.75 162.913 165.881 164.397 164.397C165.881 162.912 166.75 160.923 166.831 158.826C166.912 156.728 166.199 154.678 164.834 153.084L95.7504 84.0002Z"
|
||||
fill="white"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className={``}>
|
||||
<div
|
||||
className={`tr03 ${
|
||||
conditionTask == 2
|
||||
? "relative h-fit "
|
||||
: " relative h-0 overflow-hidden "
|
||||
}`}
|
||||
>
|
||||
<Input
|
||||
lable="چرا انجام نشد ؟؟؟ "
|
||||
id="birthDate-id"
|
||||
name="birthDate"
|
||||
type={"text"}
|
||||
textarea={true}
|
||||
theme={1}
|
||||
/>
|
||||
|
||||
<Buttonbriz
|
||||
title="ثبت فعالیت"
|
||||
color="INFO"
|
||||
icon="CHECK"
|
||||
buttonEvent={() => setConditionTask(4)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default TaskCard;
|
|
@ -0,0 +1,91 @@
|
|||
"use client";
|
||||
import { useEffect, useState } from "react";
|
||||
import PersianNumber from "../plugins/PersianNumber";
|
||||
import Link from "next/link";
|
||||
|
||||
const UnderDevelopeTimer = () => {
|
||||
const targetTimestamp = 1698635992 * 1000; // Convert to milliseconds
|
||||
|
||||
const [timeRemaining, setTimeRemaining] = useState({
|
||||
days: 0,
|
||||
hours: 0,
|
||||
minutes: 0,
|
||||
seconds: 0,
|
||||
milliseconds: 0,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
const interval = setInterval(() => {
|
||||
const now = new Date();
|
||||
const timeDifference = targetTimestamp - now.getTime();
|
||||
|
||||
if (timeDifference > 0) {
|
||||
const days = Math.floor(timeDifference / (1000 * 60 * 60 * 24));
|
||||
const hours = Math.floor(
|
||||
(timeDifference % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)
|
||||
);
|
||||
const minutes = Math.floor(
|
||||
(timeDifference % (1000 * 60 * 60)) / (1000 * 60)
|
||||
);
|
||||
const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000);
|
||||
const milliseconds = timeDifference % 1000;
|
||||
|
||||
setTimeRemaining({
|
||||
days,
|
||||
hours,
|
||||
minutes,
|
||||
seconds,
|
||||
milliseconds,
|
||||
});
|
||||
} else {
|
||||
clearInterval(interval);
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
return () => clearInterval(interval);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="flex justify-center ">
|
||||
<div className="mx-2 mt-4">
|
||||
<div className="w-[50px] h-[50px] rounded-full bg-sky-800">
|
||||
<p className="mb-0 text-2xl text-white font-bold pt-2">
|
||||
<PersianNumber number={timeRemaining.days} />
|
||||
</p>
|
||||
</div>
|
||||
<p className="mb-0">روز</p>
|
||||
</div>
|
||||
|
||||
<div className="mx-2 mt-4">
|
||||
<div className="w-[50px] h-[50px] rounded-full bg-sky-800">
|
||||
<p className="mb-0 text-2xl text-white font-bold pt-2">
|
||||
<PersianNumber number={timeRemaining.hours} />
|
||||
</p>
|
||||
</div>
|
||||
<p className="mb-0">ساعت</p>
|
||||
</div>
|
||||
|
||||
<div className="mx-2 mt-4">
|
||||
<div className="w-[50px] h-[50px] rounded-full bg-sky-800">
|
||||
<p className="mb-0 text-2xl text-white font-bold pt-2">
|
||||
<PersianNumber number={timeRemaining.minutes} />
|
||||
</p>
|
||||
</div>
|
||||
<p className="mb-0">دقیقه</p>
|
||||
</div>
|
||||
|
||||
<div className="mx-2 mt-4">
|
||||
<Link href="/login">
|
||||
<div className="w-[50px] h-[50px] rounded-full bg-sky-800">
|
||||
<p className="mb-0 text-2xl text-white font-bold pt-2">
|
||||
<PersianNumber number={timeRemaining.seconds} />
|
||||
</p>
|
||||
</div>
|
||||
</Link>
|
||||
<p className="mb-0">ثانیه</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default UnderDevelopeTimer;
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"module": "commonjs",
|
||||
"target": "es2020",
|
||||
"paths": {
|
||||
"@comp/*": ["components/*"],
|
||||
"@styles/*": ["styles/*"],
|
||||
"@assets/*": ["assets/*"],
|
||||
"@ctx/*": ["Contexts/*"],
|
||||
"@img/*": ["public/images/*"],
|
||||
"@layout/*": ["layout/*"]
|
||||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.js", "**/*.jsx"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {}
|
||||
|
||||
module.exports = nextConfig
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"name": "brizco",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"autoprefixer": "10.4.15",
|
||||
"axios": "^1.5.1",
|
||||
"framer-motion": "^10.16.1",
|
||||
"next": "13.4.19",
|
||||
"postcss": "8.4.28",
|
||||
"react": "18.2.0",
|
||||
"react-datepicker2": "^3.3.13",
|
||||
"react-dom": "18.2.0",
|
||||
"react-persian-datepicker": "^3.0.2",
|
||||
"react-spring-bottom-sheet": "^3.4.1",
|
||||
"react-toastify": "^9.1.3",
|
||||
"simple-react-validator": "^1.6.2",
|
||||
"swiper": "^10.2.0",
|
||||
"tailwindcss": "3.3.3",
|
||||
"zaman": "^2.0.8"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,248 @@
|
|||
"use client";
|
||||
|
||||
import React, { useContext, useRef, useState } from "react";
|
||||
import { BottomSheet } from "react-spring-bottom-sheet";
|
||||
import Input from "plugins/Input/page";
|
||||
import AppContext from "@ctx/AppContext";
|
||||
import SimpleReactValidator from "simple-react-validator";
|
||||
import { toast } from "react-toastify";
|
||||
import Buttonbriz from "plugins/Buttonbriz/page";
|
||||
|
||||
const BottomSheetCreateEmployees = (props) => {
|
||||
const CTX = useContext(AppContext);
|
||||
const [firstName, setFirstName] = useState("");
|
||||
const [lastName, setLastName] = useState("");
|
||||
const [phoneNumber, setPhoneNumber] = useState("");
|
||||
const [nationalId, setNationalId] = useState("");
|
||||
const [gender, setGender] = useState(0);
|
||||
const [roleSelectData, setRoleSelectData] = useState("");
|
||||
const [, forceUpdate] = useState();
|
||||
|
||||
const validator = useRef(
|
||||
new SimpleReactValidator({
|
||||
messages: {
|
||||
required: "پر کردن این فیلد الزامی میباشد",
|
||||
},
|
||||
element: (message) => (
|
||||
<>
|
||||
<div className="text-right px-1 ">
|
||||
<small className="text-red-600 t-ig-small ">{message}</small>
|
||||
</div>
|
||||
</>
|
||||
),
|
||||
})
|
||||
);
|
||||
const rolesChoose = CTX.state.rolesChoose;
|
||||
const rolesData = CTX.state.rolesData;
|
||||
|
||||
const body = {
|
||||
phoneNumber,
|
||||
firstName,
|
||||
lastName,
|
||||
// birthDate,
|
||||
gender,
|
||||
nationalId,
|
||||
roleIds: rolesChoose,
|
||||
};
|
||||
|
||||
const handleCreateUser = () => {
|
||||
if (validator.current.allValid()) {
|
||||
CTX.CreateUser(body);
|
||||
} else {
|
||||
toast.error("پرکردن همه ی فیلد ها واجب است", {
|
||||
position: "bottom-right",
|
||||
autoClose: 2000,
|
||||
hideProgressBar: false,
|
||||
closeOnClick: true,
|
||||
pauseOnHover: true,
|
||||
draggable: true,
|
||||
progress: undefined,
|
||||
});
|
||||
|
||||
validator.current.showMessages();
|
||||
forceUpdate(1);
|
||||
}
|
||||
};
|
||||
|
||||
const deleteRole = (id) => {
|
||||
CTX.setRolesChoose(rolesChoose.filter((el) => el !== id));
|
||||
};
|
||||
|
||||
return (
|
||||
<BottomSheet
|
||||
onSpringStart={(e) => {
|
||||
if (e.type == "OPEN") {
|
||||
CTX.GetRoles();
|
||||
}
|
||||
}}
|
||||
open={CTX.state.BottomSheetCreateEmployeesOpen}
|
||||
onDismiss={() => CTX.setBottomSheetCreateEmployeesOpen(false)}
|
||||
>
|
||||
<div className="text-center py-2 bg-primary-300 ">
|
||||
<p className="mb-0 text-white relative top-[-5px]">افزودن کاربر جدید</p>
|
||||
</div>
|
||||
|
||||
<div className="bg-body-100 p-4 ">
|
||||
<div className="">
|
||||
<Input
|
||||
lable="نام "
|
||||
id="firstName-id"
|
||||
name="firstName"
|
||||
type={"text"}
|
||||
value={firstName}
|
||||
inputEvent={(e) => {
|
||||
setFirstName(e.target.value);
|
||||
validator.current.showMessageFor("firstName");
|
||||
}}
|
||||
style="text-right"
|
||||
validator={true}
|
||||
validatorData={validator.current.message(
|
||||
"firstName",
|
||||
firstName,
|
||||
"required"
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Input
|
||||
lable="نام خانوادگی"
|
||||
id="lastName-id"
|
||||
name="lastName"
|
||||
type={"text"}
|
||||
value={lastName}
|
||||
inputEvent={(e) => {
|
||||
setLastName(e.target.value);
|
||||
validator.current.showMessageFor("lastName");
|
||||
}}
|
||||
style="text-right"
|
||||
validator={true}
|
||||
validatorData={validator.current.message(
|
||||
"lastName",
|
||||
lastName,
|
||||
"required"
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="جنسیت"
|
||||
id="gender-id"
|
||||
name="gender"
|
||||
type={"text"}
|
||||
value={gender}
|
||||
inputEvent={(e) => {
|
||||
setGender(e.target.value);
|
||||
validator.current.showMessageFor("gender");
|
||||
}}
|
||||
style="text-right"
|
||||
validator={true}
|
||||
validatorData={validator.current.message(
|
||||
"gender",
|
||||
gender,
|
||||
"required"
|
||||
)}
|
||||
select={true}
|
||||
selectData={[
|
||||
{ key: "مرد", value: "0" },
|
||||
{ key: "زن", value: "1" },
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="شماره تماس"
|
||||
id="phoneNumber-id"
|
||||
name="phoneNumber"
|
||||
type={"text"}
|
||||
value={phoneNumber}
|
||||
inputEvent={(e) => {
|
||||
setPhoneNumber(e.target.value);
|
||||
validator.current.showMessageFor("phoneNumber");
|
||||
}}
|
||||
style="text-right"
|
||||
validator={true}
|
||||
validatorData={validator.current.message(
|
||||
"phoneNumber",
|
||||
phoneNumber,
|
||||
"required"
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="کد ملی"
|
||||
id="nationalId-id"
|
||||
name="nationalId"
|
||||
type={"text"}
|
||||
value={nationalId}
|
||||
inputEvent={(e) => {
|
||||
setNationalId(e.target.value);
|
||||
}}
|
||||
style="text-right"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="سمت شغلی"
|
||||
id="roleIds-id"
|
||||
name="roleIds"
|
||||
type={"text"}
|
||||
value={roleSelectData}
|
||||
inputEvent={(e) => {
|
||||
setRoleSelectData(e.target.value);
|
||||
console.log("s11515", e.target.value);
|
||||
|
||||
if (!!rolesChoose.find((b) => b == e.target.value)) {
|
||||
toast.error("نقش تکراری است", {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
} else {
|
||||
CTX.setRolesChoose((current) => [...current, e.target.value]);
|
||||
}
|
||||
}}
|
||||
style="text-right"
|
||||
validatorData={validator.current.message(
|
||||
"phoneNumber",
|
||||
phoneNumber,
|
||||
"required"
|
||||
)}
|
||||
select={true}
|
||||
selectData={CTX.state.rolesData}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-wrap mt-3 rtl">
|
||||
{rolesChoose &&
|
||||
rolesChoose.map((e) => (
|
||||
<div className="flex bg-gray-300 p-1 rounded-full m-1 justify-start">
|
||||
<div
|
||||
className="w-[30px] h-[30px] rounded-full bg-gray-400 "
|
||||
onClick={() => deleteRole(e)}
|
||||
></div>
|
||||
|
||||
<div>
|
||||
<p className="mb-0 px-3 text-sm mt-1">
|
||||
{rolesData?.find((b) => b.id == e).persianName}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<Buttonbriz
|
||||
title="ثبت کاربر "
|
||||
color="INFO"
|
||||
icon="CHECK"
|
||||
buttonEvent={() => handleCreateUser()}
|
||||
/>
|
||||
</div>
|
||||
</BottomSheet>
|
||||
);
|
||||
};
|
||||
|
||||
export default BottomSheetCreateEmployees;
|
|
@ -0,0 +1,165 @@
|
|||
"use client";
|
||||
|
||||
import React, { useContext, useRef, useState } from "react";
|
||||
import { BottomSheet } from "react-spring-bottom-sheet";
|
||||
import Input from "plugins/Input/page";
|
||||
import AppContext from "@ctx/AppContext";
|
||||
import SimpleReactValidator from "simple-react-validator";
|
||||
import CheckBoxBriz from "plugins/CheckBoxBriz/page";
|
||||
import Buttonbriz from "plugins/Buttonbriz/page";
|
||||
import { toast } from "react-toastify";
|
||||
|
||||
const BottomSheetCreateRole = (props) => {
|
||||
const CTX = useContext(AppContext);
|
||||
const [persianName, setPersianName] = useState("");
|
||||
const [englishName, setEnglishName] = useState("");
|
||||
const [description, setDescription] = useState("");
|
||||
const [, forceUpdate] = useState();
|
||||
|
||||
const permissionsData = CTX.state.permissions;
|
||||
const permissionsChoose = CTX.state.permissionsChoose;
|
||||
|
||||
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 body = {
|
||||
persianName,
|
||||
englishName,
|
||||
description,
|
||||
permissions: permissionsChoose,
|
||||
};
|
||||
|
||||
const handleCreateRole = () => {
|
||||
if (validator.current.allValid()) {
|
||||
CTX.CreateRole(body);
|
||||
} else {
|
||||
toast.error("پرکردن همه ی فیلد ها واجب است", {
|
||||
position: "bottom-right",
|
||||
autoClose: 2000,
|
||||
hideProgressBar: false,
|
||||
closeOnClick: true,
|
||||
pauseOnHover: true,
|
||||
draggable: true,
|
||||
progress: undefined,
|
||||
});
|
||||
|
||||
validator.current.showMessages();
|
||||
forceUpdate(1);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<BottomSheet
|
||||
onSpringStart={(e) => {
|
||||
if (e.type == "OPEN") {
|
||||
CTX.GetPermissions();
|
||||
}
|
||||
}}
|
||||
open={CTX.state.BottomSheetCreateRoleOpen}
|
||||
onDismiss={() => CTX.setBottomSheetCreateRoleOpen(false)}
|
||||
>
|
||||
<div className="text-center py-2 bg-primary-300 ">
|
||||
<p className="mb-0 text-white relative top-[-5px]">افزودن نقش جدید</p>
|
||||
</div>
|
||||
|
||||
<div className="bg-body-100 p-4">
|
||||
<div className="">
|
||||
<Input
|
||||
lable=" (فارسی) نام نقش"
|
||||
id="persianName-id"
|
||||
name="persianName"
|
||||
type={"text"}
|
||||
value={persianName}
|
||||
inputEvent={(e) => {
|
||||
setPersianName(e.target.value);
|
||||
validator.current.showMessageFor("persianName");
|
||||
}}
|
||||
style="text-right"
|
||||
validator={true}
|
||||
validatorData={validator.current.message(
|
||||
"persianName",
|
||||
persianName,
|
||||
"required"
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable=" (انگلیسی) نام نقش"
|
||||
id="englishName-id"
|
||||
name="englishName"
|
||||
type={"text"}
|
||||
value={englishName}
|
||||
inputEvent={(e) => {
|
||||
setEnglishName(e.target.value);
|
||||
validator.current.showMessageFor("englishName");
|
||||
}}
|
||||
style="text-right"
|
||||
validator={true}
|
||||
validatorData={validator.current.message(
|
||||
"englishName",
|
||||
englishName,
|
||||
"required"
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable=" توضیحات"
|
||||
id="description-id"
|
||||
name="description"
|
||||
type={"text"}
|
||||
value={description}
|
||||
inputEvent={(e) => {
|
||||
setDescription(e.target.value);
|
||||
validator.current.showMessageFor("description");
|
||||
}}
|
||||
textarea={true}
|
||||
style="text-right"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="my-10">
|
||||
<div className="text-right m-2">
|
||||
<h4 className="text-base font-bold text-primary-300">
|
||||
دسترسی های مورد نظر{" "}
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
{permissionsData &&
|
||||
permissionsData.map((e) => (
|
||||
<CheckBoxBriz
|
||||
title={e.title}
|
||||
detail={e.detail}
|
||||
value={e.value}
|
||||
checkBoxEvent={(e) => setRoleCheckBox(e.target.checked)}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<Buttonbriz
|
||||
title="ثبت نقش"
|
||||
color="INFO"
|
||||
icon="CHECK"
|
||||
buttonEvent={() => handleCreateRole()}
|
||||
/>
|
||||
</div>
|
||||
</BottomSheet>
|
||||
);
|
||||
};
|
||||
|
||||
export default BottomSheetCreateRole;
|
|
@ -0,0 +1,124 @@
|
|||
"use client";
|
||||
|
||||
import React, { useContext } from "react";
|
||||
import { BottomSheet } from "react-spring-bottom-sheet";
|
||||
import Input from "plugins/Input/page";
|
||||
import AppContext from "@ctx/AppContext";
|
||||
|
||||
const BottomSheetCreateShifts = (props) => {
|
||||
const CTX = useContext(AppContext);
|
||||
|
||||
return (
|
||||
<BottomSheet
|
||||
open={CTX.state.BottomSheetCreateShiftsOpen}
|
||||
onDismiss={() => CTX.setBottomSheetCreateShiftsOpen(false)}
|
||||
>
|
||||
<div className="text-center py-2 bg-primary-300 ">
|
||||
<p className="mb-0 text-white relative top-[-5px]">
|
||||
افزودن شیفت کاری جدید
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="bg-body-100 p-4 ">
|
||||
<div className="">
|
||||
<Input
|
||||
lable="نام شیفت مورد نظر "
|
||||
id="ShiftName-id"
|
||||
name="ShiftName"
|
||||
type={"text"}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="ساعت شروع شیفت"
|
||||
id="ُStartShift-id"
|
||||
name="StartShift"
|
||||
type={"text"}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="ساعت پایان شیفت"
|
||||
id="EndShift-id"
|
||||
name="ُEndShift"
|
||||
type={"text"}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="انتخاب روزهای این شیفت در هفته"
|
||||
id="DaysShift-id"
|
||||
name="ُDaysShift"
|
||||
type={"text"}
|
||||
/>
|
||||
|
||||
<div className="flex flex-wrap mt-2">
|
||||
<div className="bg-gray-300 rounded-full p-1 m-2 ">
|
||||
<div className="flex rtl">
|
||||
<div className="bg-gray-200 w-[30px] h-[30px] rounded-full p-2 ">
|
||||
<svg
|
||||
width="12"
|
||||
height="12"
|
||||
viewBox="0 0 9 9"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mx-auto "
|
||||
>
|
||||
<path
|
||||
d="M5.54023 4.42081L8.33877 1.62148C8.41438 1.54845 8.4747 1.46109 8.51618 1.36451C8.55768 1.26792 8.57951 1.16404 8.58043 1.05892C8.58134 0.953805 8.56131 0.849559 8.52151 0.752266C8.4817 0.654973 8.42292 0.566582 8.34858 0.49225C8.27425 0.417918 8.18586 0.359134 8.08857 0.319329C7.99128 0.279523 7.88703 0.259492 7.78191 0.260406C7.6768 0.261319 7.57291 0.283158 7.47633 0.324649C7.37974 0.366139 7.29238 0.42645 7.21936 0.502063L4.42002 3.3006L1.62148 0.502063C1.54845 0.42645 1.46109 0.366139 1.36451 0.324649C1.26792 0.283158 1.16404 0.261319 1.05892 0.260406C0.953805 0.259492 0.849559 0.279523 0.752266 0.319329C0.654973 0.359134 0.566582 0.417918 0.49225 0.49225C0.417918 0.566582 0.359134 0.654973 0.319329 0.752266C0.279523 0.849559 0.259492 0.953805 0.260406 1.05892C0.261319 1.16404 0.283158 1.26792 0.324649 1.36451C0.366139 1.46109 0.42645 1.54845 0.502063 1.62148L3.3006 4.42002L0.502063 7.21936C0.42645 7.29238 0.366139 7.37974 0.324649 7.47633C0.283158 7.57291 0.261319 7.6768 0.260406 7.78191C0.259492 7.88703 0.279523 7.99128 0.319329 8.08857C0.359134 8.18586 0.417918 8.27425 0.49225 8.34858C0.566582 8.42292 0.654973 8.4817 0.752266 8.52151C0.849559 8.56131 0.953805 8.58134 1.05892 8.58043C1.16404 8.57951 1.26792 8.55768 1.36451 8.51618C1.46109 8.4747 1.54845 8.41438 1.62148 8.33877L4.42002 5.54023L7.21936 8.33877C7.29238 8.41438 7.37974 8.4747 7.47633 8.51618C7.57291 8.55768 7.6768 8.57951 7.78191 8.58043C7.88703 8.58134 7.99128 8.56131 8.08857 8.52151C8.18586 8.4817 8.27425 8.42292 8.34858 8.34858C8.42292 8.27425 8.4817 8.18586 8.52151 8.08857C8.56131 7.99128 8.58134 7.88703 8.58043 7.78191C8.57951 7.6768 8.55768 7.57291 8.51618 7.47633C8.4747 7.37974 8.41438 7.29238 8.33877 7.21936L5.54023 4.42081Z"
|
||||
fill="#666666"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
<p className="mb-0 px-4 mt-1">شنبه</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="توضیحات شیفت"
|
||||
id="EndShift-id"
|
||||
name="ُEndShift"
|
||||
type={"text"}
|
||||
textarea={true}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex rtl mt-10">
|
||||
<div className=" w-full">
|
||||
<button className="btn btn-info w-full rounded-xl mt-2 flex rtl justify-between p-2">
|
||||
<div className="w-[40px] h-[40px] rounded-xl bg-info-200">
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 12 10"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mx-auto mt-2"
|
||||
>
|
||||
<path
|
||||
d="M4.243 9.314L0 5.07L1.414 3.656L4.243 6.484L9.899 0.826996L11.314 2.242L4.243 9.312V9.314Z"
|
||||
fill="#FFFBE6"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
<span className="text-center mt-2">افزودن شیفت</span>
|
||||
<div className="w-[40px] h-[40px] rounded-xl "></div>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* <div className=" mx-7 mt-4">
|
||||
<p className="mb-0 text-info-200 "> بستن </p>
|
||||
</div> */}
|
||||
</div>
|
||||
</div>
|
||||
</BottomSheet>
|
||||
);
|
||||
};
|
||||
|
||||
export default BottomSheetCreateShifts;
|
|
@ -0,0 +1,83 @@
|
|||
import React from "react";
|
||||
|
||||
const Buttonbriz = ({ title, color, buttonEvent, icon }) => {
|
||||
const icons = [
|
||||
{
|
||||
iconName: "PHONE",
|
||||
icon: (
|
||||
<svg
|
||||
width="25"
|
||||
height="24"
|
||||
viewBox="0 0 25 24"
|
||||
fill="none"
|
||||
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"
|
||||
/>
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
{
|
||||
iconName: "CHECK",
|
||||
icon: (
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 12 10"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mx-auto mt-2"
|
||||
>
|
||||
<path
|
||||
d="M4.243 9.314L0 5.07L1.414 3.656L4.243 6.484L9.899 0.826996L11.314 2.242L4.243 9.312V9.314Z"
|
||||
fill="#FFFBE6"
|
||||
/>
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="flex rtl mt-4">
|
||||
<div className=" w-full">
|
||||
<button
|
||||
className={`btn w-full rounded-xl mt-2 flex rtl justify-between p-2 ${
|
||||
color === "PRIMARY"
|
||||
? "btn-primary"
|
||||
: color === "SECONDARY"
|
||||
? "btn-secondary"
|
||||
: color === "INFO"
|
||||
? "btn-info"
|
||||
: ""
|
||||
} `}
|
||||
onClick={buttonEvent}
|
||||
>
|
||||
<div
|
||||
className={`w-[40px] h-[40px] rounded-xl ${
|
||||
color === "PRIMARY"
|
||||
? "bg-primary-300"
|
||||
: color === "SECONDARY"
|
||||
? "bg-secondary-200"
|
||||
: color === "INFO"
|
||||
? "bg-info-200"
|
||||
: ""
|
||||
}`}
|
||||
>
|
||||
{icons.find((e) => e.iconName == icon)?.icon}
|
||||
</div>
|
||||
<span className="text-center mt-2">{title}</span>
|
||||
<div className="w-[40px] h-[40px] rounded-xl "></div>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* <div className=" mx-7 mt-4">
|
||||
<p className="mb-0 text-info-200 "> بستن </p>
|
||||
</div> */}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Buttonbriz;
|
|
@ -0,0 +1,41 @@
|
|||
import axios from "axios";
|
||||
|
||||
export const getToken = () => {
|
||||
return "Bearer " + localStorage.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(),
|
||||
}),
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
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
|
||||
|
||||
return response.data;
|
||||
},
|
||||
function (error) {
|
||||
// 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) {
|
||||
// localStorage.removeItem("token");
|
||||
// window.location.href = "/";
|
||||
// }
|
||||
return Promise.reject({ error, status: error?.response?.status });
|
||||
}
|
||||
);
|
||||
|
||||
export default Chapar;
|
|
@ -0,0 +1,37 @@
|
|||
"use client";
|
||||
|
||||
import AppContext from "@ctx/AppContext";
|
||||
import React, { useContext, useState } from "react";
|
||||
|
||||
const page = ({ title, detail, value }) => {
|
||||
const CTX = useContext(AppContext);
|
||||
|
||||
const [isChecked, setIsChecked] = useState(false);
|
||||
|
||||
const hanslePermissionsChoose = (e) => {
|
||||
setIsChecked(e.target.checked);
|
||||
CTX.setPermissionsChoose((current) => [...current, value]);
|
||||
};
|
||||
return (
|
||||
<div className="flex rtl mt-4">
|
||||
<div>
|
||||
<input
|
||||
type="checkbox"
|
||||
className="w-[40px] h-[40px] !rounded-xl mx-2 custom-checkbox mt-1"
|
||||
checked={isChecked ? true : false}
|
||||
defaultValue={isChecked}
|
||||
name="hasSchengenRelative"
|
||||
// onClick={checkBoxEvent}
|
||||
onChange={(e) => hanslePermissionsChoose(e)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2 className="font-bold text-textMain-100">{title}</h2>
|
||||
<p className="mb-0 text-textMain-100 text-right text-sm">{detail} </p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default page;
|
|
@ -0,0 +1,91 @@
|
|||
import React from "react";
|
||||
|
||||
const Input = ({
|
||||
id,
|
||||
lable,
|
||||
name,
|
||||
type,
|
||||
textarea,
|
||||
mt,
|
||||
disabled,
|
||||
theme,
|
||||
inputEvent,
|
||||
style,
|
||||
value,
|
||||
readOnly,
|
||||
validator,
|
||||
validatorData,
|
||||
select,
|
||||
selectData,
|
||||
}) => {
|
||||
return (
|
||||
<div
|
||||
class={`relative ${mt ? `mt-${mt}` : "mt-8"} ${
|
||||
disabled ? "opacity-40" : ""
|
||||
}`}
|
||||
>
|
||||
{textarea ? (
|
||||
<textarea
|
||||
type="text"
|
||||
className={`peer w-full border-b placeholder:text-transparent relative ${
|
||||
theme == 1 ? "form-control-white" : "form-control"
|
||||
}`}
|
||||
placeholder={name}
|
||||
disabled={disabled ? true : false}
|
||||
readOnly={readOnly ? true : false}
|
||||
value={value}
|
||||
onChange={inputEvent}
|
||||
/>
|
||||
) : select ? (
|
||||
<select
|
||||
className={`peer w-full border-b placeholder:text-transparent relative ${
|
||||
theme == 1 ? "form-control-white" : "form-control"
|
||||
}`}
|
||||
placeholder={name}
|
||||
disabled={disabled ? true : false}
|
||||
readOnly={readOnly ? true : false}
|
||||
value={value}
|
||||
onChange={inputEvent}
|
||||
>
|
||||
{selectData &&
|
||||
selectData.map((e) => (
|
||||
<option value={e.id}>{e.persianName}</option>
|
||||
))}
|
||||
</select>
|
||||
) : (
|
||||
<input
|
||||
type={type}
|
||||
id={id}
|
||||
className={`peer w-full border-b placeholder:text-transparent ${
|
||||
theme == 1 ? "form-control-white" : "form-control"
|
||||
} ${style ? style : ""} relative`}
|
||||
placeholder={name}
|
||||
disabled={disabled ? true : false}
|
||||
readOnly={readOnly ? true : false}
|
||||
value={value}
|
||||
onChange={inputEvent}
|
||||
/>
|
||||
)}
|
||||
|
||||
<div className="flex justify-start w-full absolute mt-[-2px]">
|
||||
<small className="absolute ">
|
||||
{" "}
|
||||
{validator ? <>{validatorData}</> : ""}
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<label
|
||||
htmlFor={id}
|
||||
className={`absolute right-0 mr-3 px-1 -translate-y-3 ${
|
||||
theme == 1 ? "bg-white" : "bg-body-100"
|
||||
} text-sm duration-100 ease-linear peer-placeholder-shown:translate-y-[15px] peer-placeholder-shown:text-base peer-placeholder-shown:text-gray-500 peer-focus:mr-6 peer-focus:-translate-y-3 peer-focus:px-1 peer-focus:text-sm`}
|
||||
>
|
||||
{lable}
|
||||
</label>
|
||||
|
||||
{/* <small>رمز اشتباه</small> */}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Input;
|
|
@ -0,0 +1,7 @@
|
|||
const iranPhoneRegex = new RegExp("^(\\+98|0)?9\\d{9}$");
|
||||
|
||||
const validateIranPhone = (phoneNumber) => {
|
||||
return iranPhoneRegex.test(phoneNumber);
|
||||
};
|
||||
|
||||
export default validateIranPhone;
|
|
@ -0,0 +1,28 @@
|
|||
import React, { useContext } from "react";
|
||||
|
||||
import AppContext from "@ctx/AppContext";
|
||||
import gif from "@img/loading.gif";
|
||||
import Image from "next/image";
|
||||
|
||||
const Loading = ({ rateId }) => {
|
||||
const CTX = useContext(AppContext);
|
||||
const loading = CTX.state.loading;
|
||||
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className={`fixed w-full tr03 z-50 ${
|
||||
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="w-[30px] ml-3">
|
||||
<Image src={gif} alt="" className="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
export default Loading;
|
|
@ -0,0 +1,8 @@
|
|||
export function ParseJwt(token) {
|
||||
if (!token) {
|
||||
return;
|
||||
}
|
||||
const base64Url = token.split(".")[1];
|
||||
const base64 = base64Url.replace("-", "+").replace("_", "/");
|
||||
return JSON.parse(window.atob(base64));
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
const PersianNumber = ({ number, isCost, size, bold }) => {
|
||||
if (number || number === 0) {
|
||||
const persianMap = "۰۱۲۳۴۵۶۷۸۹".split("");
|
||||
const formatNumber = isCost
|
||||
? number.toLocaleString().replace(/\d/g, (m) => persianMap[parseInt(m)])
|
||||
: number.toString().replace(/\d/g, (m) => persianMap[parseInt(m)]);
|
||||
return (
|
||||
<span
|
||||
className={`text-[${size ? size : ""}px] ${
|
||||
bold ? "font-bold" : ""
|
||||
} text-sm`}
|
||||
>
|
||||
{formatNumber}
|
||||
</span>
|
||||
);
|
||||
} else return null;
|
||||
};
|
||||
|
||||
export default PersianNumber;
|
|
@ -0,0 +1,6 @@
|
|||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
}
|
After Width: | Height: | Size: 79 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 150 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 16 KiB |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>
|
After Width: | Height: | Size: 1.3 KiB |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 283 64"><path fill="black" d="M141 16c-11 0-19 7-19 18s9 18 20 18c7 0 13-3 16-7l-7-5c-2 3-6 4-9 4-5 0-9-3-10-7h28v-3c0-11-8-18-19-18zm-9 15c1-4 4-7 9-7s8 3 9 7h-18zm117-15c-11 0-19 7-19 18s9 18 20 18c6 0 12-3 16-7l-8-5c-2 3-5 4-8 4-5 0-9-3-11-7h28l1-3c0-11-8-18-19-18zm-10 15c2-4 5-7 10-7s8 3 9 7h-19zm-39 3c0 6 4 10 10 10 4 0 7-2 9-5l8 5c-3 5-9 8-17 8-11 0-19-7-19-18s8-18 19-18c8 0 14 3 17 8l-8 5c-2-3-5-5-9-5-6 0-10 4-10 10zm83-29v46h-9V5h9zM37 0l37 64H0L37 0zm92 5-27 48L74 5h10l18 30 17-30h10zm59 12v10l-3-1c-6 0-10 4-10 10v15h-9V17h9v9c0-5 6-9 13-9z"/></svg>
|
After Width: | Height: | Size: 629 B |
|
@ -0,0 +1,107 @@
|
|||
import AppHeader from "@comp/AppHeader/page";
|
||||
import Buttonbriz from "plugins/Buttonbriz/page";
|
||||
import Input from "plugins/Input/page";
|
||||
import React from "react";
|
||||
import person from "@img/person.png";
|
||||
import Image from "next/image";
|
||||
|
||||
const page = () => {
|
||||
return (
|
||||
<div className="pb-20">
|
||||
<AppHeader
|
||||
title=" امیرحسین خادمی"
|
||||
sub=" رستوران بی بی گل"
|
||||
icon2={true}
|
||||
iconName2="ARROW"
|
||||
iconHref2="/home"
|
||||
/>
|
||||
|
||||
<div className="bg-body-100 relative top-[-30px] rounded-t-3xl overflow-hidden p-4 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="">
|
||||
<Image
|
||||
src={person}
|
||||
className="w-[100px] h-[100px] object-cover"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="absolute ml-[76px] mt-[59px]">
|
||||
<div className="bg-white w-[40px] h-[40px] rounded-full pt-2">
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 270 270"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mx-auto"
|
||||
>
|
||||
<path
|
||||
d="M164.512 35.9879C164.512 35.9879 165.95 60.6129 187.675 82.3254C209.4 104.05 234.012 105.5 234.012 105.5L245.6 93.9129C254.817 84.695 259.996 72.1928 259.996 59.1567C259.996 46.1205 254.817 33.6183 245.6 24.4004C236.382 15.1825 223.879 10.0039 210.843 10.0039C197.807 10.0039 185.305 15.1825 176.087 24.4004L164.5 35.9879L135 65.4879M234.012 105.488L168.262 171.263L129.5 210L127.5 212.013C120.275 219.225 116.662 222.838 112.687 225.938C107.996 229.599 102.92 232.739 97.5496 235.3C92.9996 237.463 88.1621 239.075 78.4746 242.3L37.4621 255.975M37.4621 255.975L27.4371 259.325C25.1002 260.109 22.5912 260.225 20.1919 259.661C17.7926 259.097 15.5983 257.875 13.8554 256.132C12.1126 254.389 10.8905 252.195 10.3263 249.796C9.76222 247.396 9.87848 244.887 10.6621 242.55L14.0121 232.525M37.4621 255.975L14.0121 232.525M14.0121 232.525L27.6871 191.513C30.9121 181.825 32.5246 176.988 34.6871 172.438C37.2496 167.063 40.3871 161.988 44.0496 157.3C47.1496 153.325 50.7621 149.713 57.9746 142.5L91.2496 109.238"
|
||||
stroke="black"
|
||||
stroke-width="18.75"
|
||||
stroke-linecap="round"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="w-full">
|
||||
<div className="">
|
||||
<Input
|
||||
lable="نام "
|
||||
id="firstName-id"
|
||||
name="firstName"
|
||||
type={"text"}
|
||||
/>
|
||||
</div>
|
||||
<div className="">
|
||||
<Input
|
||||
lable="نام خانوادگی "
|
||||
id="lastName-id"
|
||||
name="lastName"
|
||||
type={"text"}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="شماره تلفن همراه "
|
||||
id="phoneNumber-id"
|
||||
name="phoneNumber"
|
||||
type={"text"}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input lable="َایمیل " id="email-id" name="email" type={"text"} />
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="کد ملی "
|
||||
id="nationalCode-id"
|
||||
name="nationalCode"
|
||||
type={"text"}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="تاریخ تولد "
|
||||
id="birthDate-id"
|
||||
name="birthDate"
|
||||
type={"text"}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Buttonbriz title="ثبت تغییرات" color="INFO" icon="CHECK" />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default page;
|
|
@ -0,0 +1,57 @@
|
|||
import AppHeader from "@comp/AppHeader/page";
|
||||
import Buttonbriz from "plugins/Buttonbriz/page";
|
||||
import Input from "plugins/Input/page";
|
||||
import React from "react";
|
||||
|
||||
const AddBuy = () => {
|
||||
return (
|
||||
<div className="pb-20">
|
||||
<AppHeader
|
||||
title=" افزودن یک خرید جدید"
|
||||
sub=" قابلیت افزودن فعالیت جدید مختلف"
|
||||
icon2={true}
|
||||
iconName2="ARROW"
|
||||
iconHref2="/home"
|
||||
/>
|
||||
|
||||
<div className="bg-body-100 relative top-[-30px] rounded-t-3xl overflow-hidden p-4 rtl">
|
||||
<div>
|
||||
<div>
|
||||
<div className="">
|
||||
<Input
|
||||
lable="نام کالا"
|
||||
id="commodityName-id"
|
||||
name="commodityName"
|
||||
type={"text"}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="توضیحاتـ خرید"
|
||||
id="commodityDetail-id"
|
||||
name="commodityDetail"
|
||||
type={"text"}
|
||||
textarea={true}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="تاریخ مورد نظر برای خرید"
|
||||
id="commodityDate-id"
|
||||
name="commodityDate"
|
||||
type={"text"}
|
||||
mt="3"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Buttonbriz title="ثبت خرید" color="PRIMARY" icon="CHECK" />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default AddBuy;
|
|
@ -0,0 +1,169 @@
|
|||
import AppHeader from "@comp/AppHeader/page";
|
||||
import Buttonbriz from "plugins/Buttonbriz/page";
|
||||
import Input from "plugins/Input/page";
|
||||
import PersianNumber from "plugins/PersianNumber";
|
||||
import React from "react";
|
||||
|
||||
const AddTask = () => {
|
||||
return (
|
||||
<div className="pb-20">
|
||||
<AppHeader
|
||||
title=" افزودن فعالیت جدید"
|
||||
sub=" قابلیت افزودن فعالیت جدید مختلف"
|
||||
icon2={true}
|
||||
iconName2="ARROW"
|
||||
iconHref2="/home"
|
||||
/>
|
||||
|
||||
<div className="bg-body-100 relative top-[-30px] rounded-t-3xl overflow-hidden p-4 rtl">
|
||||
<div>
|
||||
<div className="">
|
||||
<Input
|
||||
lable="عنوان فعالیت "
|
||||
id="taskTitle-id"
|
||||
name="taskTitle"
|
||||
type={"text"}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="توضیحات کلی فعالیت "
|
||||
id="taskDetail-id"
|
||||
name="taskDetail"
|
||||
type={"text"}
|
||||
textarea={true}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="عنوان فعالیت "
|
||||
id="taskTitle-id"
|
||||
name="taskTitle"
|
||||
type={"text"}
|
||||
/>
|
||||
|
||||
<div className="flex ">
|
||||
<div className="flex relative rtl mt-2 w-6/12 ">
|
||||
<div className="absolute right-[0px] bg-red-900 w-[40px] h-[40px] rounded-full border-2 z-[1]"></div>
|
||||
<div className="absolute right-[13px] bg-green-900 w-[40px] h-[40px] rounded-full border-2 z-[2]"></div>
|
||||
<div className="absolute right-[26px] bg-sky-900 w-[40px] h-[40px] rounded-full border-2 z-[3]"></div>
|
||||
<div className="absolute right-[39px] bg-sky-300 w-[40px] h-[40px] rounded-full border-2 z-[3]"></div>
|
||||
<div className="absolute right-[52px] bg-green-300 w-[40px] h-[40px] rounded-full border-2 z-[3]"></div>
|
||||
<div className="absolute right-[65px] bg-red-300 w-[40px] h-[40px] rounded-full border-2 z-[3]"></div>
|
||||
</div>
|
||||
|
||||
<div className="relative w-full">
|
||||
<p className="text-black text-sm mt-4">
|
||||
+
|
||||
<strong className="mx-1">
|
||||
<PersianNumber number={3} />
|
||||
</strong>
|
||||
نفر دیگر
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className="flex rtl mt-10">
|
||||
<div>
|
||||
<input
|
||||
type="checkbox"
|
||||
className="w-[40px] h-[40px] !rounded-xl mx-2 custom-checkbox mt-1"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="mt-1">
|
||||
<h6 className="text-sm text-textMain-100 font-bold">
|
||||
آیا این تسک تکرار پذیر است ؟
|
||||
</h6>
|
||||
<p className="mb-0 text-textMain-100 text-right text-[12px]">
|
||||
تسک با قابلیت تکرار در زمان های متناوب تکرار میشوند
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="توضیحات کلی فعالیت "
|
||||
id="taskDetail-id"
|
||||
name="taskDetail"
|
||||
type={"text"}
|
||||
mt="2"
|
||||
disabled={true}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className="flex rtl mt-5">
|
||||
<div>
|
||||
<input
|
||||
type="checkbox"
|
||||
className="w-[40px] h-[40px] !rounded-xl mx-2 custom-checkbox mt-1"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="mt-1">
|
||||
<h6 className="text-sm text-textMain-100 font-bold">
|
||||
ایا این تسک به گروهی متصل است ؟{" "}
|
||||
</h6>
|
||||
<p className="mb-0 text-textMain-100 text-right text-[12px]">
|
||||
شما میتوانید یک تسک را به گروهی از افراد متصل کنید{" "}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="توضیحات کلی فعالیت "
|
||||
id="taskDetail-id"
|
||||
name="taskDetail"
|
||||
type={"text"}
|
||||
mt="2"
|
||||
disabled={true}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className="flex rtl mt-5">
|
||||
<div>
|
||||
<input
|
||||
type="checkbox"
|
||||
className="w-[40px] h-[40px] !rounded-xl mx-2 custom-checkbox mt-1"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="mt-1">
|
||||
<h6 className="text-sm text-textMain-100 font-bold">
|
||||
ایا این تسک به فرد متصل است ؟{" "}
|
||||
</h6>
|
||||
<p className="mb-0 text-textMain-100 text-right text-[12px]">
|
||||
شما میتوانید یک تسک را به تنها یک فرد خاص متصل کنید{" "}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="">
|
||||
<Input
|
||||
lable="توضیحات کلی فعالیت "
|
||||
id="taskDetail-id"
|
||||
name="taskDetail"
|
||||
type={"text"}
|
||||
mt="2"
|
||||
disabled={true}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Buttonbriz title="ثبت فعالیت" color="INFO" icon="CHECK" />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default AddTask;
|
|
@ -0,0 +1,117 @@
|
|||
"use client";
|
||||
|
||||
import AppHeader from "@comp/AppHeader/page";
|
||||
import RolesEmployees from "@comp/EmployeesComponent/Roles/page";
|
||||
import Roles from "@comp/EmployeesComponent/Roles/page";
|
||||
import UsersEmployees from "@comp/EmployeesComponent/Users/page";
|
||||
import AppContext from "@ctx/AppContext";
|
||||
import BottomSheetCreateEmployees from "plugins/BottomSheet/BottomSheetCreateEmployees";
|
||||
import BottomSheetCreateRole from "plugins/BottomSheet/BottomSheetCreateRole";
|
||||
import PersianNumber from "plugins/PersianNumber";
|
||||
import React, { useContext, useEffect } from "react";
|
||||
|
||||
// import second from "@img/test.png";
|
||||
|
||||
const Employees = (props) => {
|
||||
const CTX = useContext(AppContext);
|
||||
console.log("BottomSheetCreateRoleOpen", CTX.state.BottomSheetCreateRoleOpen);
|
||||
|
||||
useEffect(() => {
|
||||
CTX.GetRoles();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="pb-20">
|
||||
<AppHeader
|
||||
title=" مدیریت کارکنان و نقش ها"
|
||||
sub=" شما 12 نفر همکار در مجموعه دارید"
|
||||
icon2={true}
|
||||
iconName2="ARROW"
|
||||
iconHref2="/home"
|
||||
iconEvent2={() => {
|
||||
return undefined;
|
||||
}}
|
||||
/>
|
||||
|
||||
<div className="bg-body-100 relative top-[-30px] rounded-t-3xl overflow-hidden p-5 rtl">
|
||||
<div className="flex justify-between mt-3">
|
||||
<div>
|
||||
<h4 className="text-base font-bold">مدیریت نقش های مجموعه</h4>
|
||||
<p className="mb-0 text-sm">
|
||||
شما
|
||||
<strong className="mx-1 text-primary-300">
|
||||
<PersianNumber number={24} />
|
||||
</strong>
|
||||
نقش فعال دارید
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<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 className="flex justify-between mt-7">
|
||||
<div>
|
||||
<h4 className="text-base font-bold">مدیریت کارکنان مجموعه</h4>
|
||||
<p className="mb-0 text-sm">
|
||||
شما
|
||||
<strong className="mx-1 text-primary-300">
|
||||
<PersianNumber number={24} />
|
||||
</strong>
|
||||
کارمند فعال دارید
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div
|
||||
className="w-[40px] h-[40px] bg-white shadow-sm rounded-xl "
|
||||
onClick={() => CTX.setBottomSheetCreateEmployeesOpen(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>
|
||||
|
||||
<UsersEmployees />
|
||||
</div>
|
||||
<BottomSheetCreateRole />
|
||||
<BottomSheetCreateEmployees />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Employees;
|
After Width: | Height: | Size: 25 KiB |
|
@ -0,0 +1,258 @@
|
|||
"use client";
|
||||
|
||||
import AppHeader from "@comp/AppHeader/page";
|
||||
import TaskCard from "@comp/TaskCard/page";
|
||||
import AppContext from "@ctx/AppContext";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { getToken } from "plugins/Chapar";
|
||||
import { ParseJwt } from "plugins/ParseJwt/page";
|
||||
import PersianNumber from "plugins/PersianNumber";
|
||||
import React, { useContext, useEffect } from "react";
|
||||
import { Swiper, SwiperSlide } from "swiper/react";
|
||||
|
||||
const Home = (props) => {
|
||||
const CTX = useContext(AppContext);
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
if (!!localStorage.token) {
|
||||
console.log("inga");
|
||||
const datatoken = ParseJwt(getToken());
|
||||
console.log(datatoken);
|
||||
CTX.setComplexId(datatoken.ComplexId);
|
||||
|
||||
if (datatoken.SignUpStatus == 1) {
|
||||
CTX.setStepLogin(2);
|
||||
router.push(`/login?phoneNumber=${datatoken.unique_name}`);
|
||||
}
|
||||
} else {
|
||||
console.log("inja1111111111111111");
|
||||
router.push("/login");
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="pb-20">
|
||||
<AppHeader
|
||||
title="حسین معصومی"
|
||||
sub="مجموعه بیبی گل"
|
||||
icon1={true}
|
||||
iconName1="ACOUNT"
|
||||
iconHref1="/acount"
|
||||
iconEvent1={() => {
|
||||
return undefined;
|
||||
}}
|
||||
icon2={true}
|
||||
iconName2="NINJA"
|
||||
iconHref2="#"
|
||||
iconEvent2={() => {
|
||||
return undefined;
|
||||
}}
|
||||
userIcon={true}
|
||||
/>
|
||||
|
||||
<div className="bg-body-100 relative top-[-30px] rounded-t-3xl overflow-hidden p-5 rtl">
|
||||
<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={24} />
|
||||
</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>
|
||||
|
||||
<Swiper
|
||||
spaceBetween={20}
|
||||
slidesPerView={1.6}
|
||||
onSlideChange={() => console.log("slide change")}
|
||||
onSwiper={(swiper) => console.log(swiper)}
|
||||
>
|
||||
<SwiperSlide>
|
||||
<div className=" bg-white h-[180px] rounded-3xl overflow-hidden relative mt-5">
|
||||
<div className="flex mx-2">
|
||||
<div className="bg-secondaryLighter-100 w-fit relative px-2 text-[12px] my-2 mx-1 rounded-3xl text-secondary-200">
|
||||
اهمیت بالا{" "}
|
||||
</div>
|
||||
<div className="bg-secondaryLighter-100 w-fit relative px-2 text-[12px] my-2 mx-1 rounded-3xl text-secondary-200">
|
||||
شیفت صبح
|
||||
</div>
|
||||
</div>
|
||||
<div className=" relative m-2 text-white">
|
||||
<div className="text-right">
|
||||
<h4 className="mb-0 text-primary-300 font-semibold text-sm">
|
||||
کارگاه بدنسازی در خانه برای رستوران توگک
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div className="flex">
|
||||
<div className="flex rtl mt-2 w-full">
|
||||
<div className="absolute right-[0px] bg-red-900 w-[40px] h-[40px] rounded-full border-2 z-[1]"></div>
|
||||
<div className="absolute right-[13px] bg-green-900 w-[40px] h-[40px] rounded-full border-2 z-[2]"></div>
|
||||
<div className="absolute right-[26px] bg-sky-900 w-[40px] h-[40px] rounded-full border-2 z-[3]"></div>
|
||||
</div>
|
||||
|
||||
<div className="relative w-full">
|
||||
<p className="text-black text-sm mt-4">
|
||||
+
|
||||
<strong className="mx-1">
|
||||
<PersianNumber number={3} />
|
||||
</strong>
|
||||
نفر دیگر
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex mt-6 relative">
|
||||
<div>
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 14 14"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M11.0833 2.33332H9.91667V1.74999C9.91667 1.59528 9.85522 1.44691 9.74582 1.33751C9.63642 1.22811 9.48805 1.16666 9.33334 1.16666C9.17863 1.16666 9.03026 1.22811 8.92086 1.33751C8.81146 1.44691 8.75001 1.59528 8.75001 1.74999V2.33332H5.25001V1.74999C5.25001 1.59528 5.18855 1.44691 5.07915 1.33751C4.96975 1.22811 4.82138 1.16666 4.66667 1.16666C4.51196 1.16666 4.36359 1.22811 4.25419 1.33751C4.1448 1.44691 4.08334 1.59528 4.08334 1.74999V2.33332H2.91667C2.45254 2.33332 2.00742 2.5177 1.67923 2.84589C1.35105 3.17408 1.16667 3.61919 1.16667 4.08332V11.0833C1.16667 11.5475 1.35105 11.9926 1.67923 12.3208C2.00742 12.6489 2.45254 12.8333 2.91667 12.8333H11.0833C11.5475 12.8333 11.9926 12.6489 12.3208 12.3208C12.649 11.9926 12.8333 11.5475 12.8333 11.0833V4.08332C12.8333 3.61919 12.649 3.17408 12.3208 2.84589C11.9926 2.5177 11.5475 2.33332 11.0833 2.33332ZM11.6667 11.0833C11.6667 11.238 11.6052 11.3864 11.4958 11.4958C11.3864 11.6052 11.238 11.6667 11.0833 11.6667H2.91667C2.76196 11.6667 2.61359 11.6052 2.50419 11.4958C2.3948 11.3864 2.33334 11.238 2.33334 11.0833V6.99999H11.6667V11.0833ZM11.6667 5.83332H2.33334V4.08332C2.33334 3.92861 2.3948 3.78024 2.50419 3.67084C2.61359 3.56145 2.76196 3.49999 2.91667 3.49999H4.08334V4.08332C4.08334 4.23803 4.1448 4.38641 4.25419 4.4958C4.36359 4.6052 4.51196 4.66666 4.66667 4.66666C4.82138 4.66666 4.96975 4.6052 5.07915 4.4958C5.18855 4.38641 5.25001 4.23803 5.25001 4.08332V3.49999H8.75001V4.08332C8.75001 4.23803 8.81146 4.38641 8.92086 4.4958C9.03026 4.6052 9.17863 4.66666 9.33334 4.66666C9.48805 4.66666 9.63642 4.6052 9.74582 4.4958C9.85522 4.38641 9.91667 4.23803 9.91667 4.08332V3.49999H11.0833C11.238 3.49999 11.3864 3.56145 11.4958 3.67084C11.6052 3.78024 11.6667 3.92861 11.6667 4.08332V5.83332Z"
|
||||
fill="#888888"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
<p className="mb-0 text-textMain-100 text-sm opacity-70 mr-1">
|
||||
دوشنبه
|
||||
<strong className="mx-1">
|
||||
<PersianNumber number={19} />
|
||||
</strong>
|
||||
اردیبهشت
|
||||
<strong className="mx-1">
|
||||
<PersianNumber number={1401} />
|
||||
</strong>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</SwiperSlide>
|
||||
|
||||
<SwiperSlide>
|
||||
<div className=" bg-white h-[180px] rounded-3xl overflow-hidden relative mt-5">
|
||||
<div className="flex mx-2">
|
||||
<div className="bg-secondaryLighter-100 w-fit relative px-2 text-[12px] my-2 mx-1 rounded-3xl text-secondary-200">
|
||||
اهمیت بالا{" "}
|
||||
</div>
|
||||
<div className="bg-secondaryLighter-100 w-fit relative px-2 text-[12px] my-2 mx-1 rounded-3xl text-secondary-200">
|
||||
شیفت صبح
|
||||
</div>
|
||||
</div>
|
||||
<div className=" relative m-2 text-white">
|
||||
<div className="text-right">
|
||||
<h4 className="mb-0 text-primary-300 font-semibold text-sm">
|
||||
کارگاه بدنسازی در خانه برای رستوران توگک
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div className="flex">
|
||||
<div className="flex rtl mt-2 w-full">
|
||||
<div className="absolute right-[0px] bg-red-900 w-[40px] h-[40px] rounded-full border-2 z-[1]"></div>
|
||||
<div className="absolute right-[13px] bg-green-900 w-[40px] h-[40px] rounded-full border-2 z-[2]"></div>
|
||||
<div className="absolute right-[26px] bg-sky-900 w-[40px] h-[40px] rounded-full border-2 z-[3]"></div>
|
||||
</div>
|
||||
|
||||
<div className="relative w-full">
|
||||
<p className="text-black text-sm mt-4">
|
||||
+
|
||||
<strong className="mx-1">
|
||||
<PersianNumber number={3} />
|
||||
</strong>
|
||||
نفر دیگر
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex mt-6 relative">
|
||||
<div>
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 14 14"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M11.0833 2.33332H9.91667V1.74999C9.91667 1.59528 9.85522 1.44691 9.74582 1.33751C9.63642 1.22811 9.48805 1.16666 9.33334 1.16666C9.17863 1.16666 9.03026 1.22811 8.92086 1.33751C8.81146 1.44691 8.75001 1.59528 8.75001 1.74999V2.33332H5.25001V1.74999C5.25001 1.59528 5.18855 1.44691 5.07915 1.33751C4.96975 1.22811 4.82138 1.16666 4.66667 1.16666C4.51196 1.16666 4.36359 1.22811 4.25419 1.33751C4.1448 1.44691 4.08334 1.59528 4.08334 1.74999V2.33332H2.91667C2.45254 2.33332 2.00742 2.5177 1.67923 2.84589C1.35105 3.17408 1.16667 3.61919 1.16667 4.08332V11.0833C1.16667 11.5475 1.35105 11.9926 1.67923 12.3208C2.00742 12.6489 2.45254 12.8333 2.91667 12.8333H11.0833C11.5475 12.8333 11.9926 12.6489 12.3208 12.3208C12.649 11.9926 12.8333 11.5475 12.8333 11.0833V4.08332C12.8333 3.61919 12.649 3.17408 12.3208 2.84589C11.9926 2.5177 11.5475 2.33332 11.0833 2.33332ZM11.6667 11.0833C11.6667 11.238 11.6052 11.3864 11.4958 11.4958C11.3864 11.6052 11.238 11.6667 11.0833 11.6667H2.91667C2.76196 11.6667 2.61359 11.6052 2.50419 11.4958C2.3948 11.3864 2.33334 11.238 2.33334 11.0833V6.99999H11.6667V11.0833ZM11.6667 5.83332H2.33334V4.08332C2.33334 3.92861 2.3948 3.78024 2.50419 3.67084C2.61359 3.56145 2.76196 3.49999 2.91667 3.49999H4.08334V4.08332C4.08334 4.23803 4.1448 4.38641 4.25419 4.4958C4.36359 4.6052 4.51196 4.66666 4.66667 4.66666C4.82138 4.66666 4.96975 4.6052 5.07915 4.4958C5.18855 4.38641 5.25001 4.23803 5.25001 4.08332V3.49999H8.75001V4.08332C8.75001 4.23803 8.81146 4.38641 8.92086 4.4958C9.03026 4.6052 9.17863 4.66666 9.33334 4.66666C9.48805 4.66666 9.63642 4.6052 9.74582 4.4958C9.85522 4.38641 9.91667 4.23803 9.91667 4.08332V3.49999H11.0833C11.238 3.49999 11.3864 3.56145 11.4958 3.67084C11.6052 3.78024 11.6667 3.92861 11.6667 4.08332V5.83332Z"
|
||||
fill="#888888"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
<p className="mb-0 text-textMain-100 text-sm opacity-70 mr-1">
|
||||
دوشنبه
|
||||
<strong className="mx-1">
|
||||
<PersianNumber number={19} />
|
||||
</strong>
|
||||
اردیبهشت
|
||||
<strong className="mx-1">
|
||||
<PersianNumber number={1401} />
|
||||
</strong>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</SwiperSlide>
|
||||
</Swiper>
|
||||
|
||||
<div className="flex justify-between mt-7">
|
||||
<div>
|
||||
<h4 className="text-base font-bold">تسک های امروز</h4>
|
||||
<p className="mb-0 text-sm">
|
||||
امروز
|
||||
<strong className="mx-1 text-primary-300">
|
||||
<PersianNumber number={24} />
|
||||
</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>
|
||||
<div className=" mt-3">
|
||||
<TaskCard />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Home;
|
|
@ -0,0 +1,398 @@
|
|||
"use client";
|
||||
|
||||
import "../../style/globals.css";
|
||||
import { Inter } from "next/font/google";
|
||||
import "../../style/fontiran.css";
|
||||
import NavBAr from "@comp/NavBar/NavBAr";
|
||||
import "swiper/css";
|
||||
import "swiper/css/navigation";
|
||||
import "react-spring-bottom-sheet/dist/style.css";
|
||||
import AppContext from "../../Contexts/AppContext";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { motion } from "framer-motion";
|
||||
import Link from "next/link";
|
||||
import { usePathname, useRouter } from "next/navigation";
|
||||
import { toast, ToastContainer } from "react-toastify";
|
||||
import "react-toastify/dist/ReactToastify.css";
|
||||
import Loading from "plugins/Loading/page";
|
||||
import Chapar, { getToken } from "plugins/Chapar";
|
||||
import { Calendar, DatePicker } from "react-persian-datepicker";
|
||||
|
||||
const inter = Inter({ subsets: ["latin"] });
|
||||
|
||||
export const metadata = {
|
||||
title: "Create Next App",
|
||||
description: "Generated by create next app",
|
||||
};
|
||||
|
||||
export default function RootLayout({ children }) {
|
||||
// BottomSheet
|
||||
const [BottomSheetCreateRoleOpen, setBottomSheetCreateRoleOpen] =
|
||||
useState(false);
|
||||
|
||||
const [BottomSheetCreateEmployeesOpen, setBottomSheetCreateEmployeesOpen] =
|
||||
useState(false);
|
||||
|
||||
const [BottomSheetCreateShiftsOpen, setBottomSheetCreateShiftsOpen] =
|
||||
useState(false);
|
||||
|
||||
// BigPlus
|
||||
const [BigPlusOpen, setBigPlusOpen] = useState(false);
|
||||
const [BigPlusRotateIcon, setBigPlusRotateIcon] = useState(false);
|
||||
|
||||
// login
|
||||
const [phoneNumber, setPhoneNumber] = useState("");
|
||||
const [verifyCode, setVerifyCode] = useState("");
|
||||
const [stepLogin, setStepLogin] = useState(0);
|
||||
const [tokenForStorage, setTokenForStorage] = useState(null);
|
||||
|
||||
// loading
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
//auth
|
||||
const [complexId, setComplexId] = useState(0);
|
||||
|
||||
// createRole / role
|
||||
const [permissions, setPermissions] = useState(0);
|
||||
const [permissionsChoose, setPermissionsChoose] = useState([]);
|
||||
const [rolesData, setRolesData] = useState([]);
|
||||
|
||||
// createUser/ user
|
||||
const [usersData, setUsersData] = useState([]);
|
||||
const [rolesChoose, setRolesChoose] = useState([]);
|
||||
|
||||
const pathname = usePathname();
|
||||
const router = useRouter();
|
||||
const hiddenUrls = ["/login", "/"];
|
||||
const shouldRenderComponent = !hiddenUrls.includes(pathname);
|
||||
|
||||
const closeBigPlusPage = () => {
|
||||
setTimeout(() => {
|
||||
setBigPlusOpen(false);
|
||||
}, 500);
|
||||
|
||||
setBigPlusRotateIcon(false);
|
||||
};
|
||||
|
||||
const ConfirmPhoneNumber = async (phoneNumber) => {
|
||||
try {
|
||||
const data = await Chapar.get(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/auth/verifycode?phoneNumber=${phoneNumber}`
|
||||
);
|
||||
setStepLogin(1);
|
||||
localStorage.removeItem("token");
|
||||
} catch ({ error, status }) {
|
||||
toast.error(" اطلاعات را صحیح وارد کنید ", {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
}
|
||||
};
|
||||
const LoginWhitVerifyCode = async () => {
|
||||
setLoading(true);
|
||||
|
||||
try {
|
||||
const data = await Chapar.post(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/auth/login/code`,
|
||||
{
|
||||
userName: phoneNumber,
|
||||
password: null,
|
||||
verifyCode,
|
||||
}
|
||||
);
|
||||
setLoading(false);
|
||||
localStorage.setItem("token", data.access_token);
|
||||
|
||||
if (data.user.signUpStatus == 1) {
|
||||
setStepLogin(2);
|
||||
} else if (data.user.signUpStatus == 2) {
|
||||
toast.success(` ${data.user.firstName} جان خوش اومدی `, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
router.push("/home");
|
||||
}
|
||||
} catch ({ error, status }) {
|
||||
toast.error(`${error.response.data.message}`, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
const SignUpLogin = async (body) => {
|
||||
setLoading(true);
|
||||
|
||||
try {
|
||||
const data = await Chapar.post(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/auth/signup/complex`,
|
||||
body,
|
||||
{
|
||||
headers: {
|
||||
Authorization: getToken(),
|
||||
},
|
||||
}
|
||||
);
|
||||
setLoading(false);
|
||||
|
||||
if (data.user.signUpStatus == 2 || data.user.signUpStatus == 3) {
|
||||
toast.success(` ${data.user.firstName} جان خوش اومدی `, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
localStorage.setItem("token", data.access_token);
|
||||
|
||||
router.push("/home");
|
||||
}
|
||||
} catch ({ error, status }) {
|
||||
toast.error(`${error.response.data.message}`, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
const GetPermissions = async (body) => {
|
||||
setLoading(true);
|
||||
|
||||
try {
|
||||
const data = await Chapar.get(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/role/permission`,
|
||||
|
||||
{
|
||||
headers: {
|
||||
Authorization: getToken(),
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
console.log(data);
|
||||
setPermissions(data);
|
||||
setLoading(false);
|
||||
} catch ({ error, status }) {
|
||||
toast.error(`${error.response.data.message}`, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
const CreateRole = async (body) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const data = await Chapar.post(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/role`,
|
||||
body,
|
||||
|
||||
{
|
||||
headers: {
|
||||
Authorization: getToken(),
|
||||
},
|
||||
}
|
||||
);
|
||||
toast.success(`نقش ساخته شد`, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
setBottomSheetCreateRoleOpen(false);
|
||||
setLoading(false);
|
||||
GetRoles();
|
||||
} catch ({ error, status }) {
|
||||
toast.error(`${error.response.data.message}`, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
const GetRoles = async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const data = await Chapar.get(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/role?page=0`,
|
||||
|
||||
{
|
||||
headers: {
|
||||
Authorization: getToken(),
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
setRolesData(data);
|
||||
setLoading(false);
|
||||
} catch ({ error, status }) {
|
||||
toast.error(`${error.response.data.message}`, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
const CreateUser = async (body) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const data = await Chapar.post(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/user`,
|
||||
body,
|
||||
|
||||
{
|
||||
headers: {
|
||||
Authorization: getToken(),
|
||||
},
|
||||
}
|
||||
);
|
||||
toast.success(`کاربر ساخته شد`, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
setBottomSheetCreateEmployeesOpen(false);
|
||||
setLoading(false);
|
||||
GetUsers();
|
||||
} catch ({ error, status }) {
|
||||
toast.error(`${error.response.data.message}`, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
const GetUsers = async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const data = await Chapar.get(
|
||||
`${process.env.NEXT_PUBLIC_API_URL}/role?page=0`,
|
||||
|
||||
{
|
||||
headers: {
|
||||
Authorization: getToken(),
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
setUsersData(data);
|
||||
setLoading(false);
|
||||
} catch ({ error, status }) {
|
||||
toast.error(`${error.response.data.message}`, {
|
||||
position: "bottom-right",
|
||||
closeOnClick: true,
|
||||
});
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
// useEffect(() => {
|
||||
// GetPermissions();
|
||||
// }, []);
|
||||
|
||||
return (
|
||||
<AppContext.Provider
|
||||
value={{
|
||||
state: {
|
||||
BottomSheetCreateRoleOpen,
|
||||
BottomSheetCreateEmployeesOpen,
|
||||
BottomSheetCreateShiftsOpen,
|
||||
BigPlusOpen,
|
||||
BigPlusRotateIcon,
|
||||
loading,
|
||||
stepLogin,
|
||||
phoneNumber,
|
||||
verifyCode,
|
||||
tokenForStorage,
|
||||
complexId,
|
||||
permissions,
|
||||
permissionsChoose,
|
||||
rolesData,
|
||||
usersData,
|
||||
rolesChoose,
|
||||
},
|
||||
setBottomSheetCreateRoleOpen,
|
||||
setBottomSheetCreateEmployeesOpen,
|
||||
setBottomSheetCreateShiftsOpen,
|
||||
setBigPlusOpen,
|
||||
setBigPlusRotateIcon,
|
||||
setLoading,
|
||||
ConfirmPhoneNumber,
|
||||
LoginWhitVerifyCode,
|
||||
setStepLogin,
|
||||
setPhoneNumber,
|
||||
setVerifyCode,
|
||||
SignUpLogin,
|
||||
setTokenForStorage,
|
||||
setComplexId,
|
||||
setPermissions,
|
||||
GetPermissions,
|
||||
setPermissionsChoose,
|
||||
CreateRole,
|
||||
setRolesData,
|
||||
GetRoles,
|
||||
CreateUser,
|
||||
GetUsers,
|
||||
setUsersData,
|
||||
setRolesChoose,
|
||||
}}
|
||||
>
|
||||
<html lang="en">
|
||||
<body className={inter.className}>
|
||||
{children}
|
||||
{shouldRenderComponent && <NavBAr />}
|
||||
<ToastContainer position="bottom-right" closeOnClick={true} rtl />
|
||||
<Loading />
|
||||
|
||||
<DatePicker />
|
||||
|
||||
{BigPlusOpen ? (
|
||||
<div className="fixed w-full top-0 z-40">
|
||||
<motion.div
|
||||
animate={{ opacity: [0, 0.5, 1] }}
|
||||
transition={{ duration: 0.3 }}
|
||||
>
|
||||
<div className="bg-BigPlus h-screen">
|
||||
<div className="flex justify-center">
|
||||
<div className="bg-primary-200 w-[60px] h-[60px] rounded-full fixed bottom-[37px] ">
|
||||
<div
|
||||
onClick={() => {
|
||||
closeBigPlusPage();
|
||||
}}
|
||||
>
|
||||
<svg
|
||||
width="25"
|
||||
height="25"
|
||||
viewBox="0 0 16 16"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className={`mx-auto mt-[16px] transition-all ${
|
||||
BigPlusRotateIcon ? " rotate-45" : " rotate-0"
|
||||
} `}
|
||||
>
|
||||
<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>
|
||||
</div>
|
||||
<div className="flex justify-between px-4 fixed bottom-[110px] w-full">
|
||||
<Link href={"/dsdasd"}>
|
||||
<div className="bg-secondaryDark-100 p-3 m-2 w-full rounded-full">
|
||||
<p className="mb-0 text-white">افزودن خرید جدیـــــد</p>
|
||||
</div>
|
||||
</Link>
|
||||
|
||||
<Link href={"/dsdasd"}>
|
||||
<div className="bg-secondaryDark-100 p-3 m-2 w-full rounded-full">
|
||||
<p className="mb-0 text-white">افزودن وظیفه جدید</p>
|
||||
</div>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</body>
|
||||
</html>
|
||||
</AppContext.Provider>
|
||||
);
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
"use client";
|
||||
|
||||
import React, { useContext, useEffect, useState } from "react";
|
||||
import task from "@img/logo-t.png";
|
||||
import Image from "next/image";
|
||||
import LoginStep from "@comp/LoginComponents/LoginStep";
|
||||
import AppContext from "@ctx/AppContext";
|
||||
import VerifyCodeStep from "@comp/LoginComponents/VerifyCodeStep";
|
||||
import SignUp from "@comp/LoginComponents/SignUp";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
const Login = (props) => {
|
||||
const CTX = useContext(AppContext);
|
||||
const stepLogin = CTX.state.stepLogin;
|
||||
const router = useRouter();
|
||||
|
||||
// useEffect(() => {
|
||||
// if (typeof window !== "undefined") {
|
||||
// const item = localStorage.token;
|
||||
// if (!!item) {
|
||||
// router.push("/home");
|
||||
// }
|
||||
// }
|
||||
// }, []);
|
||||
|
||||
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>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
{stepLogin == 0 ? (
|
||||
<LoginStep />
|
||||
) : stepLogin == 1 ? (
|
||||
<VerifyCodeStep />
|
||||
) : stepLogin == 2 ? (
|
||||
<SignUp />
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Login;
|
|
@ -0,0 +1,82 @@
|
|||
"use client";
|
||||
|
||||
import Image from "next/image";
|
||||
import { motion } from "framer-motion";
|
||||
|
||||
import cloud1 from "../../public/images/cloud1.png";
|
||||
import cloud2 from "../../public/images/cloud2.png";
|
||||
import cloud3 from "../../public/images/cloud3.png";
|
||||
import core from "../../public/images/core.png";
|
||||
import { useEffect, useState } from "react";
|
||||
import PersianNumber from "../../plugins/PersianNumber";
|
||||
import UnderDevelopeTimer from "../../components/UnderDevelopeTimer";
|
||||
|
||||
export default function Home() {
|
||||
const [state, setstate] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setstate(true);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="h-[100vh] overflow-hidden relative ">
|
||||
<div className="flex justify-center">
|
||||
<div
|
||||
className={`relative z-50 ${
|
||||
state ? " top-[-200px]" : "top-[-650px]"
|
||||
} tr2`}
|
||||
>
|
||||
<div className="w-[200px]">
|
||||
<motion.div
|
||||
animate={{ y: [30, 0, 30] }}
|
||||
transition={{ repeat: Infinity, duration: 15 }}
|
||||
>
|
||||
<Image src={core} alt="" className="w-full" />
|
||||
</motion.div>{" "}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex justify-center">
|
||||
<div className="w-[250px] absolute top-[50px] z-0">
|
||||
<motion.div
|
||||
animate={{ x: [60, 0, 60] }}
|
||||
transition={{ repeat: Infinity, duration: 50 }}
|
||||
>
|
||||
<Image src={cloud1} alt="" className="w-full" />
|
||||
</motion.div>
|
||||
</div>
|
||||
|
||||
<div className="w-[250px] absolute top-[120px] mr-[150px] z-0">
|
||||
<motion.div
|
||||
animate={{ x: [-60, 0, -60] }}
|
||||
transition={{ repeat: Infinity, duration: 50 }}
|
||||
>
|
||||
<Image src={cloud2} alt="" className="w-full" />
|
||||
</motion.div>{" "}
|
||||
</div>
|
||||
|
||||
<div className="w-[250px] absolute top-[170px] ml-[200px] z-0">
|
||||
<motion.div
|
||||
animate={{ x: [60, 0, 60] }}
|
||||
transition={{ repeat: Infinity, duration: 50 }}
|
||||
>
|
||||
<Image src={cloud3} alt="" className="w-full" />
|
||||
</motion.div>{" "}
|
||||
</div>
|
||||
</div>
|
||||
<motion.div animate={{ y: [0, -130] }} transition={{ duration: 3 }}>
|
||||
<div className="text-center">
|
||||
<h3 className="font-bold text-2xl text-gray-700 rtl">
|
||||
کارگران مشغول کارند
|
||||
<br />
|
||||
<PersianNumber number={30} size={30} />
|
||||
{" "}
|
||||
شهریــــــــــــــــــــــور میبینمتون
|
||||
</h3>
|
||||
|
||||
<UnderDevelopeTimer />
|
||||
</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
);
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import AppHeader from "@comp/AppHeader/page";
|
||||
import TaskCard from "@comp/TaskCard/page";
|
||||
import PersianNumber from "plugins/PersianNumber";
|
||||
import React from "react";
|
||||
|
||||
const CompleteShift = () => {
|
||||
const data = [1, 2, 3, 4, 5, 8];
|
||||
return (
|
||||
<div className="pb-20">
|
||||
<AppHeader
|
||||
title=" عملیات بستن شیفت"
|
||||
sub="عملیات بستن شیفت برای بررسی تکمیل وظایف"
|
||||
icon2={true}
|
||||
iconName2="ARROW"
|
||||
iconHref2="/home"
|
||||
/>
|
||||
|
||||
<div className="bg-body-100 relative top-[-30px] rounded-t-3xl overflow-hidden p-4 rtl">
|
||||
{" "}
|
||||
<div>
|
||||
<h4 className="text-base font-bold text-primary-200">
|
||||
فعالیت های انجام شده{" "}
|
||||
</h4>
|
||||
<p className="mb-0 text-sm text-gray-500">
|
||||
در این شیفت
|
||||
<strong className="mx-1 text-primary-300">
|
||||
<PersianNumber number={24} />
|
||||
</strong>
|
||||
فعالیت از
|
||||
<strong className="mx-1 text-primary-300">
|
||||
<PersianNumber number={3} />
|
||||
</strong>
|
||||
نفر انجام شده است
|
||||
</p>
|
||||
</div>
|
||||
{data.map((e) => (
|
||||
<TaskCard />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default CompleteShift;
|
|
@ -0,0 +1,254 @@
|
|||
"use client";
|
||||
|
||||
import AppHeader from "@comp/AppHeader/page";
|
||||
import AppContext from "@ctx/AppContext";
|
||||
import BottomSheetCreateShifts from "plugins/BottomSheet/BottomSheetCreateShifts";
|
||||
import PersianNumber from "plugins/PersianNumber";
|
||||
import React, { useContext } from "react";
|
||||
|
||||
const Shifts = (props) => {
|
||||
const CTX = useContext(AppContext);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="pb-20">
|
||||
<AppHeader
|
||||
title="شیفتــــ های مجموعه"
|
||||
sub="شما 12 نفر شیفت متفاوت دارید"
|
||||
icon1={true}
|
||||
iconName1="PLUS"
|
||||
iconHref1="#"
|
||||
iconEvent1={() => CTX.setBottomSheetCreateShiftsOpen(true)}
|
||||
icon2={true}
|
||||
iconName2="ARROW"
|
||||
iconHref2="/home"
|
||||
iconEvent2={() => {
|
||||
return undefined;
|
||||
}}
|
||||
/>
|
||||
|
||||
<div className="bg-body-100 relative top-[-30px] rounded-t-3xl overflow-hidden p-4 rtl mt-2">
|
||||
<div>
|
||||
<div className="bg-primary-200 p-3 rounded-xl">
|
||||
<h2 className="mb-0 text-white font-bold text-base mt-3">
|
||||
شیفتــــ های مجموعه{" "}
|
||||
</h2>
|
||||
<p className="mb-0 text-white text-sm">
|
||||
شما میتوانید به صورت هفتگی شیفت بندی های رستوران خود را تعریف
|
||||
نمایید و با توجه به نیاز های مجموعه خود شیفت بندی کنید .{" "}
|
||||
</p>
|
||||
<div className="flex my-3">
|
||||
<button className="btn btn-secondary text-[12px] w-full">
|
||||
{" "}
|
||||
شیفت بندی هفته
|
||||
</button>
|
||||
<button className="btn bg-transparent border-[2px] border-white border-dashed text-white text-[12px] mx-2 w-full">
|
||||
{" "}
|
||||
شیفت بندی هغته بعد
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="bg-white rounded-xl mt-5">
|
||||
<div className=" bg-white rounded-t-xl rounded-b-3xl border shadow p-2 flex justify-between w-full h-fit pr-5 mt-2 ">
|
||||
<div>
|
||||
<h4 className="text-xl font-bold text-primary-300 mt-1">
|
||||
شیفت صبح{" "}
|
||||
</h4>
|
||||
</div>
|
||||
<div className="flex mt-1">
|
||||
<div className="mx-2 ">
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 18 18"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mt-1"
|
||||
>
|
||||
<g clip-path="url(#clip0_72_940)">
|
||||
<path
|
||||
d="M11.4653 2.364L10.77 3.05925L4.37926 9.44925C3.94651 9.88275 3.72976 10.0995 3.54376 10.338C3.32409 10.6195 3.13573 10.924 2.98201 11.2463C2.85226 11.5193 2.75551 11.8103 2.56201 12.3908L1.74151 14.8515L1.54051 15.453C1.4935 15.5932 1.48652 15.7438 1.52037 15.8877C1.55422 16.0317 1.62755 16.1633 1.73212 16.2679C1.83669 16.3725 1.96835 16.4458 2.1123 16.4796C2.25626 16.5135 2.4068 16.5065 2.54701 16.4595L3.14851 16.2585L5.60926 15.438C6.19051 15.2445 6.48076 15.1478 6.75376 15.018C7.07626 14.8643 7.38076 14.676 7.66201 14.4563C7.90051 14.2703 8.11726 14.0535 8.55001 13.6208L14.9408 7.23L15.636 6.53475C16.1891 5.98168 16.4998 5.23155 16.4998 4.44938C16.4998 3.66721 16.1891 2.91708 15.636 2.364C15.0829 1.81093 14.3328 1.50021 13.5506 1.50021C12.7685 1.50021 12.0183 1.81093 11.4653 2.364Z"
|
||||
stroke="#2B91EF"
|
||||
stroke-width="1.5"
|
||||
/>
|
||||
<path
|
||||
opacity="0.5"
|
||||
d="M10.77 3.0585C10.77 3.0585 10.857 4.536 12.1605 5.8395C13.464 7.143 14.9408 7.22925 14.9408 7.22925M3.14852 16.2585L1.74152 14.85"
|
||||
stroke="#2B91EF"
|
||||
stroke-width="1.5"
|
||||
/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_72_940">
|
||||
<rect width="18" height="18" fill="white" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
</div>
|
||||
<div>
|
||||
<svg
|
||||
width="33"
|
||||
height="33"
|
||||
viewBox="0 0 27 27"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M14.9783 13.3875L18.9551 9.40951C19.0626 9.30573 19.1483 9.18159 19.2072 9.04434C19.2662 8.90709 19.2972 8.75946 19.2985 8.61009C19.2998 8.46071 19.2714 8.31257 19.2148 8.17431C19.1582 8.03605 19.0747 7.91045 18.9691 7.80482C18.8635 7.69919 18.7378 7.61565 18.5996 7.55909C18.4613 7.50252 18.3132 7.47406 18.1638 7.47535C18.0144 7.47665 17.8668 7.50769 17.7296 7.56665C17.5923 7.62561 17.4682 7.71131 17.3644 7.81876L13.3864 11.7956L9.40951 7.81876C9.30573 7.71131 9.18159 7.62561 9.04434 7.56665C8.90709 7.50769 8.75946 7.47665 8.61009 7.47535C8.46071 7.47406 8.31257 7.50252 8.17431 7.55909C8.03605 7.61565 7.91045 7.69919 7.80482 7.80482C7.69919 7.91045 7.61565 8.03605 7.55909 8.17431C7.50252 8.31257 7.47406 8.46071 7.47535 8.61009C7.47665 8.75946 7.50769 8.90709 7.56665 9.04434C7.62561 9.18159 7.71131 9.30573 7.81876 9.40951L11.7956 13.3864L7.81876 17.3644C7.71131 17.4682 7.62561 17.5923 7.56665 17.7296C7.50769 17.8668 7.47665 18.0144 7.47535 18.1638C7.47406 18.3132 7.50252 18.4613 7.55909 18.5996C7.61565 18.7378 7.69919 18.8635 7.80482 18.9691C7.91045 19.0747 8.03605 19.1582 8.17431 19.2148C8.31257 19.2714 8.46071 19.2998 8.61009 19.2985C8.75946 19.2972 8.90709 19.2662 9.04434 19.2072C9.18159 19.1483 9.30573 19.0626 9.40951 18.9551L13.3864 14.9783L17.3644 18.9551C17.4682 19.0626 17.5923 19.1483 17.7296 19.2072C17.8668 19.2662 18.0144 19.2972 18.1638 19.2985C18.3132 19.2998 18.4613 19.2714 18.5996 19.2148C18.7378 19.1582 18.8635 19.0747 18.9691 18.9691C19.0747 18.8635 19.1582 18.7378 19.2148 18.5996C19.2714 18.4613 19.2998 18.3132 19.2985 18.1638C19.2972 18.0144 19.2662 17.8668 19.2072 17.7296C19.1483 17.5923 19.0626 17.4682 18.9551 17.3644L14.9783 13.3875Z"
|
||||
fill="#FF2C2C"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="py-2 px-3">
|
||||
<div className="flex">
|
||||
<p className="mb-0 border-l-[1px] border-gray-500 pl-2 text-gray-500 ">
|
||||
ساعت شروع :
|
||||
<strong className="font-bold mx-1">
|
||||
<PersianNumber number={8} />
|
||||
</strong>
|
||||
صبح
|
||||
</p>
|
||||
|
||||
<p className="mb-0 pr-2 text-gray-500">
|
||||
ساعت شروع :
|
||||
<strong className="font-bold mx-1">
|
||||
<PersianNumber number={5} />
|
||||
</strong>
|
||||
ظهر
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-wrap p-3">
|
||||
<div className="bg-secondaryLighter-100 rounded-full py-1 px-4 mx-1 mt-2">
|
||||
<p className="mb-0 text-[11px] white text-secondary-200 font-bold ">
|
||||
{" "}
|
||||
21 نفر در این شیفت قرار دارند
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="bg-secondaryLighter-100 rounded-full py-1 px-4 mx-1 mt-2">
|
||||
<p className="mb-0 text-[11px] white text-secondary-200 font-bold ">
|
||||
{" "}
|
||||
40 تسک فهال{" "}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="bg-secondaryLighter-100 rounded-full py-1 px-4 mx-1 mt-2">
|
||||
<p className="mb-0 text-[11px] white text-secondary-200 font-bold ">
|
||||
{" "}
|
||||
21 نفر در این شیفت قرار دارند
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="bg-white rounded-xl mt-5">
|
||||
<div className=" bg-white rounded-t-xl rounded-b-3xl border shadow p-2 flex justify-between w-full h-fit pr-5 mt-2 ">
|
||||
<div>
|
||||
<h4 className="text-xl font-bold text-primary-300 mt-1">
|
||||
شیفت عصر شنبه{" "}
|
||||
</h4>
|
||||
</div>
|
||||
<div className="flex mt-1">
|
||||
<div className="mx-2 ">
|
||||
<svg
|
||||
width="20"
|
||||
height="20"
|
||||
viewBox="0 0 18 18"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
className="mt-1"
|
||||
>
|
||||
<g clip-path="url(#clip0_72_940)">
|
||||
<path
|
||||
d="M11.4653 2.364L10.77 3.05925L4.37926 9.44925C3.94651 9.88275 3.72976 10.0995 3.54376 10.338C3.32409 10.6195 3.13573 10.924 2.98201 11.2463C2.85226 11.5193 2.75551 11.8103 2.56201 12.3908L1.74151 14.8515L1.54051 15.453C1.4935 15.5932 1.48652 15.7438 1.52037 15.8877C1.55422 16.0317 1.62755 16.1633 1.73212 16.2679C1.83669 16.3725 1.96835 16.4458 2.1123 16.4796C2.25626 16.5135 2.4068 16.5065 2.54701 16.4595L3.14851 16.2585L5.60926 15.438C6.19051 15.2445 6.48076 15.1478 6.75376 15.018C7.07626 14.8643 7.38076 14.676 7.66201 14.4563C7.90051 14.2703 8.11726 14.0535 8.55001 13.6208L14.9408 7.23L15.636 6.53475C16.1891 5.98168 16.4998 5.23155 16.4998 4.44938C16.4998 3.66721 16.1891 2.91708 15.636 2.364C15.0829 1.81093 14.3328 1.50021 13.5506 1.50021C12.7685 1.50021 12.0183 1.81093 11.4653 2.364Z"
|
||||
stroke="#2B91EF"
|
||||
stroke-width="1.5"
|
||||
/>
|
||||
<path
|
||||
opacity="0.5"
|
||||
d="M10.77 3.0585C10.77 3.0585 10.857 4.536 12.1605 5.8395C13.464 7.143 14.9408 7.22925 14.9408 7.22925M3.14852 16.2585L1.74152 14.85"
|
||||
stroke="#2B91EF"
|
||||
stroke-width="1.5"
|
||||
/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_72_940">
|
||||
<rect width="18" height="18" fill="white" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
</div>
|
||||
<div>
|
||||
<svg
|
||||
width="33"
|
||||
height="33"
|
||||
viewBox="0 0 27 27"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M14.9783 13.3875L18.9551 9.40951C19.0626 9.30573 19.1483 9.18159 19.2072 9.04434C19.2662 8.90709 19.2972 8.75946 19.2985 8.61009C19.2998 8.46071 19.2714 8.31257 19.2148 8.17431C19.1582 8.03605 19.0747 7.91045 18.9691 7.80482C18.8635 7.69919 18.7378 7.61565 18.5996 7.55909C18.4613 7.50252 18.3132 7.47406 18.1638 7.47535C18.0144 7.47665 17.8668 7.50769 17.7296 7.56665C17.5923 7.62561 17.4682 7.71131 17.3644 7.81876L13.3864 11.7956L9.40951 7.81876C9.30573 7.71131 9.18159 7.62561 9.04434 7.56665C8.90709 7.50769 8.75946 7.47665 8.61009 7.47535C8.46071 7.47406 8.31257 7.50252 8.17431 7.55909C8.03605 7.61565 7.91045 7.69919 7.80482 7.80482C7.69919 7.91045 7.61565 8.03605 7.55909 8.17431C7.50252 8.31257 7.47406 8.46071 7.47535 8.61009C7.47665 8.75946 7.50769 8.90709 7.56665 9.04434C7.62561 9.18159 7.71131 9.30573 7.81876 9.40951L11.7956 13.3864L7.81876 17.3644C7.71131 17.4682 7.62561 17.5923 7.56665 17.7296C7.50769 17.8668 7.47665 18.0144 7.47535 18.1638C7.47406 18.3132 7.50252 18.4613 7.55909 18.5996C7.61565 18.7378 7.69919 18.8635 7.80482 18.9691C7.91045 19.0747 8.03605 19.1582 8.17431 19.2148C8.31257 19.2714 8.46071 19.2998 8.61009 19.2985C8.75946 19.2972 8.90709 19.2662 9.04434 19.2072C9.18159 19.1483 9.30573 19.0626 9.40951 18.9551L13.3864 14.9783L17.3644 18.9551C17.4682 19.0626 17.5923 19.1483 17.7296 19.2072C17.8668 19.2662 18.0144 19.2972 18.1638 19.2985C18.3132 19.2998 18.4613 19.2714 18.5996 19.2148C18.7378 19.1582 18.8635 19.0747 18.9691 18.9691C19.0747 18.8635 19.1582 18.7378 19.2148 18.5996C19.2714 18.4613 19.2998 18.3132 19.2985 18.1638C19.2972 18.0144 19.2662 17.8668 19.2072 17.7296C19.1483 17.5923 19.0626 17.4682 18.9551 17.3644L14.9783 13.3875Z"
|
||||
fill="#FF2C2C"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="py-2 px-3">
|
||||
<div className="flex">
|
||||
<p className="mb-0 border-l-[1px] border-gray-500 pl-2 text-gray-500 ">
|
||||
ساعت شروع :
|
||||
<strong className="font-bold mx-1">
|
||||
<PersianNumber number={8} />
|
||||
</strong>
|
||||
صبح
|
||||
</p>
|
||||
|
||||
<p className="mb-0 pr-2 text-gray-500">
|
||||
ساعت شروع :
|
||||
<strong className="font-bold mx-1">
|
||||
<PersianNumber number={5} />
|
||||
</strong>
|
||||
ظهر
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-wrap p-3">
|
||||
<div className="bg-secondaryLighter-100 rounded-full py-1 px-4 mx-1 mt-2">
|
||||
<p className="mb-0 text-[11px] white text-secondary-200 font-bold ">
|
||||
{" "}
|
||||
21 نفر در این شیفت قرار دارند
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="bg-secondaryLighter-100 rounded-full py-1 px-4 mx-1 mt-2">
|
||||
<p className="mb-0 text-[11px] white text-secondary-200 font-bold ">
|
||||
{" "}
|
||||
40 تسک فهال{" "}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="bg-secondaryLighter-100 rounded-full py-1 px-4 mx-1 mt-2">
|
||||
<p className="mb-0 text-[11px] white text-secondary-200 font-bold ">
|
||||
{" "}
|
||||
21 نفر در این شیفت قرار دارند
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<BottomSheetCreateShifts />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Shifts;
|
|
@ -0,0 +1,92 @@
|
|||
/**
|
||||
*
|
||||
* Name: Kalameh ././fonts
|
||||
* Version: 4.1
|
||||
* Author: Naser Khadem
|
||||
* Created on: March 11, 2019
|
||||
* Updated on: July 17, 2021
|
||||
* Website: http://fontiran.com
|
||||
* Copyright: Commercial/Proprietary Software
|
||||
--------------------------------------------------------------------------------------
|
||||
فونت کلمه یک نرم افزار مالکیتی محسوب می شود. جهت آگاهی از قوانین استفاده از این فونت ها لطفا به وب سایت (فونت ایران دات کام) مراجعه نمایید
|
||||
--------------------------------------------------------------------------------------
|
||||
Kalameh ././fonts are considered a proprietary software. To gain information about the laws regarding the use of these ././fonts, please visit www.fontiran.com
|
||||
--------------------------------------------------------------------------------------
|
||||
This set of ././fonts are used in this project under the license: (.....)
|
||||
------------------------------------------------------------------------------------- ././fonts/-
|
||||
*
|
||||
**/
|
||||
|
||||
@font-face {
|
||||
font-family: KalamehWeb;
|
||||
font-style: normal;
|
||||
font-weight: 100;
|
||||
src: url("./fonts/woff2/KalamehWeb-Thin.woff2") format("woff2"),
|
||||
/* FF39+,Chrome36+, Opera24+*/ url("./fonts/woff/KalamehWeb-Thin.woff")
|
||||
format("woff"); /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
|
||||
}
|
||||
@font-face {
|
||||
font-family: KalamehWeb;
|
||||
font-style: normal;
|
||||
font-weight: 200;
|
||||
src: url("./fonts/woff2/KalamehWeb-ExtraLight.woff2") format("woff2"),
|
||||
/* FF39+,Chrome36+, Opera24+*/
|
||||
url("./fonts/woff/KalamehWeb-ExtraLight.woff") format("woff"); /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
|
||||
}
|
||||
@font-face {
|
||||
font-family: KalamehWeb;
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
src: url("./fonts/woff2/KalamehWeb-Light.woff2") format("woff2"),
|
||||
/* FF39+,Chrome36+, Opera24+*/ url("./fonts/woff/KalamehWeb-Light.woff")
|
||||
format("woff"); /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
|
||||
}
|
||||
@font-face {
|
||||
font-family: KalamehWeb;
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
src: url("./fonts/woff2/KalamehWeb-Medium.woff2") format("woff2"),
|
||||
/* FF39+,Chrome36+, Opera24+*/ url("./fonts/woff/KalamehWeb-Medium.woff")
|
||||
format("woff"); /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
|
||||
}
|
||||
@font-face {
|
||||
font-family: KalamehWeb;
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
src: url("./fonts/woff2/KalamehWeb-Semibold.woff2") format("woff2"),
|
||||
/* FF39+,Chrome36+, Opera24+*/ url("./fonts/woff/KalamehWeb-Semibold.woff")
|
||||
format("woff"); /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: KalamehWeb;
|
||||
font-style: normal;
|
||||
font-weight: 800;
|
||||
src: url("./fonts/woff2/KalamehWeb-ExtraBold.woff2") format("woff2"),
|
||||
/* FF39+,Chrome36+, Opera24+*/ url("./fonts/woff/KalamehWeb-ExtraBold.woff")
|
||||
format("woff"); /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
|
||||
}
|
||||
@font-face {
|
||||
font-family: KalamehWeb;
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
src: url("./fonts/woff2/KalamehWeb-Black.woff2") format("woff2"),
|
||||
/* FF39+,Chrome36+, Opera24+*/ url("./fonts/woff/KalamehWeb-Black.woff")
|
||||
format("woff"); /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
|
||||
}
|
||||
@font-face {
|
||||
font-family: KalamehWeb;
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
src: url("./fonts/woff2/KalamehWeb-Bold.woff2") format("woff2"),
|
||||
/* FF39+,Chrome36+, Opera24+*/ url("./fonts/woff/KalamehWeb-Bold.woff")
|
||||
format("woff"); /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
|
||||
}
|
||||
@font-face {
|
||||
font-family: KalamehWeb;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
src: url("./fonts/woff2/KalamehWeb-Regular.woff2") format("woff2"),
|
||||
/* FF39+,Chrome36+, Opera24+*/ url("./fonts/woff/KalamehWeb-Regular.woff")
|
||||
format("woff"); /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
|
||||
}
|
|
@ -0,0 +1,282 @@
|
|||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
@layer components {
|
||||
/* .btn-outline-primary {
|
||||
@apply bg-transparent hover:bg-sky-400 text-sky-400 hover:text-white border-2 border-sky-400 border-opacity-60 rounded-full py-2 transition;
|
||||
}
|
||||
.btn-primary {
|
||||
@apply bg-sky-400 hover:bg-sky-400 text-white hover:text-white border-2 border-sky-400 border-opacity-60 rounded-full py-2 transition;
|
||||
} */
|
||||
.btn {
|
||||
@apply font-bold py-2 px-4 rounded transition-all;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
@apply bg-primary-200 text-white;
|
||||
}
|
||||
.btn-primary:hover {
|
||||
@apply bg-primary-300;
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
@apply bg-secondary-100 text-white;
|
||||
}
|
||||
.btn-secondary:hover {
|
||||
@apply bg-secondary-200;
|
||||
}
|
||||
|
||||
.btn-info {
|
||||
@apply bg-info-100 text-white;
|
||||
}
|
||||
.btn-info:hover {
|
||||
@apply bg-info-200;
|
||||
}
|
||||
|
||||
.form-control {
|
||||
@apply appearance-none !border-[2px] bg-body-100 border-gray-300 rounded-2xl w-full py-4 px-3 text-gray-700 leading-tight focus:border-[2px] focus:border-red-600 focus:outline-none transition-all;
|
||||
}
|
||||
|
||||
.form-control-white {
|
||||
@apply appearance-none !border-[2px] bg-white border-gray-300 rounded-2xl w-full py-4 px-3 text-gray-700 leading-tight focus:border-[2px] focus:border-red-600 focus:outline-none transition-all;
|
||||
}
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
/* Hide the default checkbox appearance */
|
||||
appearance: inherit;
|
||||
/* -webkit-appearance: none; */
|
||||
/* -moz-appearance: none; */
|
||||
|
||||
/* Set the desired size and border radius */
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 30px; /* Use a percentage for a circular shape */
|
||||
|
||||
/* Add custom styling */
|
||||
border: 2px solid hsl(14, 82%, 47%);
|
||||
background-color: #fff;
|
||||
}
|
||||
input[type="checkbox"]:checked {
|
||||
background-color: #da4215;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: KalamehWeb !important;
|
||||
background: #eeeeee;
|
||||
--toastify-font-family: KalamehWeb !important;
|
||||
}
|
||||
|
||||
.rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
.ltr {
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
.tr2 {
|
||||
transition: 2s;
|
||||
}
|
||||
|
||||
.tr03 {
|
||||
transition: 0.3s all;
|
||||
}
|
||||
|
||||
.fuck-cick {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.bg-BigPlus {
|
||||
background: rgba(0, 0, 0, 0.9);
|
||||
}
|
||||
|
||||
.loader {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border: 3px solid #fff;
|
||||
border-bottom-color: transparent;
|
||||
border-radius: 50%;
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
animation: rotation 0.9s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes rotation {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
[data-rsbs-backdrop] {
|
||||
z-index: 20 !important;
|
||||
background-color: rgba(0, 0, 0, 0.8) !important;
|
||||
}
|
||||
[data-rsbs-overlay] {
|
||||
z-index: 999 !important;
|
||||
overflow: hidden;
|
||||
}
|
||||
[data-rsbs-header] {
|
||||
background-color: #356859;
|
||||
}
|
||||
|
||||
.calendarContainer {
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 3px 10px #dbdbdb;
|
||||
border: 1px solid #cccccc;
|
||||
width: 300px;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.calendarContainer * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.calendarContainer .dayPickerContainer:after,
|
||||
.calendarContainer .monthsList:after,
|
||||
.calendarContainer .daysOfWeek:after {
|
||||
content: "";
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* Heading */
|
||||
.calendarContainer .heading {
|
||||
height: 42px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.calendarContainer .heading > button {
|
||||
border-radius: 3px;
|
||||
background: none;
|
||||
margin: 5px 0;
|
||||
border: 1px solid #f7f7f7;
|
||||
text-align: center;
|
||||
line-height: 30px;
|
||||
width: 36px;
|
||||
height: 32px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.calendarContainer .heading > button:hover {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
.calendarContainer .heading > span {
|
||||
line-height: 35px;
|
||||
}
|
||||
|
||||
.calendarContainer .heading svg {
|
||||
width: 10px;
|
||||
}
|
||||
|
||||
.calendarContainer .heading .prev {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.calendarContainer .heading .next {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.calendarContainer .heading .title {
|
||||
line-height: 32px;
|
||||
width: 120px;
|
||||
height: 32px;
|
||||
font-size: 1em;
|
||||
margin: 5px 0;
|
||||
border: 1px solid #f7f7f7;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* Day wrapper styles */
|
||||
.calendarContainer .dayWrapper {
|
||||
padding: 5;
|
||||
float: right;
|
||||
width: 14.28571429%;
|
||||
}
|
||||
|
||||
/* Day wrapper button styles */
|
||||
.calendarContainer .dayWrapper button {
|
||||
border: none;
|
||||
background: none;
|
||||
outline: none;
|
||||
width: 100%;
|
||||
height: 36px;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.calendarContainer .dayWrapper button:hover {
|
||||
background-color: #eeeeff;
|
||||
}
|
||||
|
||||
.calendarContainer .dayWrapper button[disabled] {
|
||||
color: #aaa;
|
||||
cursor: not-allowed;
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
|
||||
.calendarContainer .dayWrapper button.selected {
|
||||
background-color: #337ab7;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.calendarContainer .dayWrapper:not(.currentMonth) button {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
/* Days of week row */
|
||||
.calendarContainer .daysOfWeek {
|
||||
border-bottom: 1px solid #eee;
|
||||
margin-bottom: 5px;
|
||||
padding-bottom: 5px;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.calendarContainer .daysOfWeek > div {
|
||||
flex-grow: 1;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
/* Month selector portion */
|
||||
.calendarContainer .monthsList {
|
||||
clear: both;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.calendarContainer .monthsList button {
|
||||
width: 33.33333332%;
|
||||
height: 25%;
|
||||
float: right;
|
||||
border: 1px solid #f9f9f9;
|
||||
outline: none;
|
||||
font-size: 1em;
|
||||
background: #fff;
|
||||
padding: 10px 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.calendarContainer .monthsList button:hover {
|
||||
background: #eeeeee;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Selected state of buttons */
|
||||
.calendarContainer .selected button,
|
||||
.calendarContainer .selected button:hover,
|
||||
.calendarContainer .selected button:active,
|
||||
.calendarContainer .selected button:focus {
|
||||
background-color: #337ab7;
|
||||
color: #ffffff;
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
@import url(./fontiran.css);
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-family: KalamehWeb !important;
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: [
|
||||
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./plugins/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
],
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
backgroundPrimary: {
|
||||
100: "#FFFBE6",
|
||||
},
|
||||
primary: {
|
||||
100: "#B9E4C9",
|
||||
200: "#37966F",
|
||||
300: "#356859",
|
||||
},
|
||||
|
||||
secondary: {
|
||||
100: "#FD5523",
|
||||
200: "#DA4215",
|
||||
},
|
||||
secondaryDark: {
|
||||
100: "#D03405",
|
||||
},
|
||||
secondaryLighter: {
|
||||
100: "#FFDACF",
|
||||
},
|
||||
textMain: {
|
||||
100: "#444444",
|
||||
},
|
||||
mainDisable: {
|
||||
100: "#888888",
|
||||
},
|
||||
info: {
|
||||
100: "#2B91EF",
|
||||
200: "#0061bd",
|
||||
},
|
||||
danger: {
|
||||
100: "#FF2C2C",
|
||||
},
|
||||
body: {
|
||||
100: "#EEEEEE",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
screens: {
|
||||
xs: "290px",
|
||||
sm: "640px",
|
||||
// => @media (min-width: 640px) { ... }
|
||||
|
||||
md: "768px",
|
||||
// => @media (min-width: 768px) { ... }
|
||||
|
||||
lg: "1024px",
|
||||
// => @media (min-width: 1024px) { ... }
|
||||
|
||||
xl: "1280px",
|
||||
// => @media (min-width: 1280px) { ... }
|
||||
|
||||
"2xl": "1536px",
|
||||
// => @media (min-width: 1536px) { ... }
|
||||
},
|
||||
|
||||
animation: {
|
||||
"spin-slow": "spin 8s linear infinite",
|
||||
"pulse-1": "pulse .7s linear ",
|
||||
},
|
||||
},
|
||||
plugins: [],
|
||||
};
|