push dashboard

main
حسین معصومی پور 2024-04-18 23:47:31 +03:30
parent 9b9dfac9e8
commit 0b7ef23096
6 changed files with 454 additions and 278 deletions

12
.env
View File

@ -1,8 +1,8 @@
NODE_ENV="development"
NEXT_PUBLIC_SERVER_URL=http://192.168.88.251:32769
NEXT_PUBLIC_PUBLIC_URL=http://192.168.88.251:32769
NEXT_PUBLIC_API_URL=http://192.168.88.251:32769/api
# NEXT_PUBLIC_SERVER_URL=http://192.168.88.251:32769
# NEXT_PUBLIC_PUBLIC_URL=http://192.168.88.251:32769
# NEXT_PUBLIC_API_URL=http://192.168.88.251:32769/api
# SECURE_LOCAL_STORAGE_HASH_KEY=f1da2b2c7a4c446934267fea631102ec389b5b99
# NEXT_PUBLIC_API_URL_IMAGE=https://192.168.88.12:49154/Files/ReportImages
@ -14,8 +14,8 @@ NEXT_PUBLIC_API_URL=http://192.168.88.251:32769/api
# NEXT_PUBLIC_SERVER_URL=https://api.brizco.io
# NEXT_PUBLIC_PUBLIC_URL=https://api.brizco.io
# NEXT_PUBLIC_API_URL=https://api.brizco.io/api
NEXT_PUBLIC_SERVER_URL=https://api.brizco.io
NEXT_PUBLIC_PUBLIC_URL=https://api.brizco.io
NEXT_PUBLIC_API_URL=https://api.brizco.io/api
# NEXT_PUBLIC_API_URL_IMAGE=https://api.macsonline.ir/Files/ReportImages
# NEXT_PUBLIC_API_URL_BackUp=https://api.macsonline.ir/Files/BackUps

View File

@ -29,117 +29,119 @@ const NavBAr = (props) => {
}, [permissions]);
return (
<div
className={`fixed w-full z-[110] tr03 ${
profileFill ? "bottom-0" : "bottom-[-300px]"
} `}
>
{/* <div className="w-[100px] text-left overflow-hidden">
<div className=" bg-body-100 h-10 z-90 w-full fixed bottom-0">
<div
className={`fixed px-3 w-full z-[110] tr03 ${
profileFill ? "bottom-3" : "bottom-[-300px]"
} `}
>
{/* <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] ">
{HasPermission("ViewDashboard", permissions) && (
<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>
)}
{HasPermission("ViewShiftPlans", permissions) && (
<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
<div className="bg-white shadow px-4 py-3 flex rounded-[30px] ">
{HasPermission("ViewDashboard", permissions) && (
<Link href={"/home"} className="w-full !no-underline">
<>
{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>
)}
{HasPermission("ViewShiftPlans", permissions) && (
<Link href={"/shifts"} className="w-full !no-underline">
<>
{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();
@ -160,65 +162,66 @@ const NavBAr = (props) => {
/>
</svg>
</div>
</div> */}
{HasPermission("ViewComplexSettings", permissions) && (
<Link href={"/employees"} className="w-full !no-underline ">
<>
{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>
)}
{HasPermission("ViewActivities", permissions) && (
<Link href={"/tasks"} className="w-full !no-underline ">
<>
{usePath.includes("/tasks") ? (
<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>
{HasPermission("ViewComplexSettings", permissions) && (
<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>
)}
{HasPermission("ViewActivities", permissions) && (
<Link href={"/tasks"} className="w-full !no-underline ml-5">
<>
{usePath.includes("/tasks") ? (
<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>
);

View File

@ -14,32 +14,18 @@ import { Chart as ChartJS, ArcElement, Tooltip, Legend } from "chart.js";
import { Doughnut, Pie } from "react-chartjs-2";
import BottomSheetChangeRole from "plugins/BottomSheet/BottomSheetChangeRole";
import HasPermission from "plugins/HasPermission/page";
import Avatar from "boring-avatars";
ChartJS.register(ArcElement, Tooltip, Legend);
export const data = {
datasets: [
{
label: ["پوزیشن"],
data: [60, 38, 95, 60, 20, 30],
backgroundColor: [
"rgba(46, 161, 134, 0.8)",
"rgba(52, 115, 101, 0.41)",
"rgba(80, 143, 114, 0.61)",
"rgba(75, 155, 138, 0.61)",
"rgba(85, 155, 138, 0.91)",
"rgba(12, 75, 61, 0.51)",
],
borderColor: [
"rgba(255, 99, 132, 1)",
"rgba(54, 162, 235, 1)",
"rgba(255, 206, 86, 1)",
"rgba(75, 192, 192, 1)",
"rgba(153, 102, 255, 1)",
"rgba(255, 159, 64, 1)",
],
borderWidth: 1,
borderColor: " #356859",
label: ["", " "],
data: [350, 200],
backgroundColor: ["rgba(203, 203, 203, 0.38)", "rgba(222, 193, 72, 1)"],
borderColor: ["transparent"],
cutout: 35,
},
],
};
@ -79,66 +65,264 @@ const Home = (props) => {
/>
<div className="bg-body-100 relative top-[-30px] rounded-t-3xl overflow-hidden p-5 rtl">
<div className=" p-2 rounded-xl my-3">
<div className="m-2">
<h2 className="mb-0 font-bold text-base">مسیر فرایند شروع</h2>
<div>
<div className="bg-white p-3 rounded-full shadow">
<div className="flex justify-between">
<div className="flex">
<div className="w-[50px] h-[50px] rounded-full bg-white border-[5px]">
<div className=" rounded-full z-10 ">
<Avatar
size={40}
name={"حسین"}
variant="beam"
colors={["#9d9f88", "#83af96", "#b2de93"]}
/>
</div>
</div>
<div className="w-[50px] h-[50px] rounded-full bg-white border-[5px] absolute mr-[30px]">
<div className=" rounded-full z-10 ">
<Avatar
size={40}
name={"skasd"}
variant="beam"
colors={["#9d9f88", "#83af96", "#b2de93"]}
/>
</div>
</div>
<div className="w-[50px] h-[50px] rounded-full bg-white border-[5px] absolute mr-[60px]">
<div className=" rounded-full z-10 ">
<Avatar
size={40}
name={"daerfgf"}
variant="beam"
colors={["#9d9f88", "#83af96", "#b2de93"]}
/>
</div>
</div>
<div className="w-[50px] h-[50px] rounded-full bg-white border-[5px] absolute mr-[90px]">
<div className=" rounded-full z-10 ">
<Avatar
size={40}
name={"wwwe"}
variant="beam"
colors={["#9d9f88", "#83af96", "#b2de93"]}
/>
</div>
</div>
</div>
<p className="mb-0 text-sm text-gray-600 mt-2">
شما
<PersianNumber number={60} style="font-bold mx-1" />
درصد از فرایند شروع را انجام داده اید
</p>
</div>
<div className=" border-[2px] border-primary-300 opacity-70 p-3 rounded-full z-10 relative"></div>
<div className="relative flex justify-end">
<div className=" bg-secondary-100 absolute w-[70%] p-3 rounded-full mt-[-26px] z-0"></div>
</div>
<div className="flex justify-end mt-3">
<p className="mb-0 w-fit text-sm">ادامه فرایند</p>
<div>
{" "}
<svg
width="12"
height="12"
viewBox="0 0 11 18"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className=" mt-[3px] mx-1"
>
<path d="M10 1L2 9L10 17" stroke="#555555" stroke-width="2" />
</svg>
<div className="mt-4 ml-[40px]">
<h2 className="font-bold text-gray-600">
<PersianNumber
number={12}
style={"!text-[25px] font-bold ml-1"}
/>
در شیفت عصر
</h2>
</div>
</div>
</div>
</div>
<div className=" rounded-2xl p-3">
<div className="flex justify-between ">
<div className="mt-5">
<h3 className="text-right p-3 font-medium">شنبه 20 فروردین 1403</h3>
<div className="grid xs:grid-cols-2 gap-4 rtl">
<div>
<div className="flex mt-3">
<div className="w-[35px] h-[10px] mt-2 bg-primary-300 rounded-full"></div>
<p className="mb-0 text-sm mx-2"> پوزیشن</p>
<div className="bg-dahs-chart rounded-2xl p-2 h-[195px]">
<div className="flex justify-center ">
<div className="absolute mt-[40px]">
<h2 className="text-lg text-white">
<PersianNumber number={10} />
<small className="text-white text-[11px] ml-1">%</small>
</h2>
</div>
</div>
<div className="flex justify-center">
<div className="w-[100px]">
<Doughnut data={data} />
</div>
</div>
<div className="mt-3">
<p className="mb-0 text-gray-300 text-[10px] text-center">
مجموعه شما امروز
<PersianNumber number={25} style="!text-[10px] mx-[3px]" />
فعالیت فعال دارد
</p>
</div>
</div>
<div className="flex mt-3">
<div className="w-[15px] h-[10px] mt-2 bg-primary-300 rounded-full"></div>
<p className="mb-0 text-sm mx-2"> سکشن</p>
</div>
<div className="flex mt-3">
<div className="w-[20px] h-[10px] mt-2 bg-primary-300 rounded-full"></div>
<p className="mb-0 text-sm mx-2"> روتین</p>
</div>
<div className="flex mt-3">
<div className="w-[70px] h-[10px] mt-2 bg-primary-300 rounded-full"></div>
<p className="mb-0 text-sm mx-2"> یوزر</p>
</div>
<div className="flex mt-3">
<div className="w-[10px] h-[10px] mt-2 bg-primary-300 rounded-full"></div>
<p className="mb-0 text-sm mx-2"> شبفت</p>
<div className="bg-[#d4818138] p-4 rounded-2xl mt-4">
<p className="mb-0 text-center text-[#c20000] text-sm">
بستن شیفت
</p>
</div>
</div>
<div className="w-[190px]">
<Doughnut data={data} />
<div className="">
<div className="bg-[#d19751] p-3 rounded-2xl">
<div>
<svg
width="30"
height="36"
viewBox="0 0 250 226"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M246.5 100.625L196.375 13.1249C194.231 9.27721 191.093 6.0758 187.289 3.85501C183.485 1.63421 179.155 0.475501 174.75 0.499889H75C70.5953 0.475501 66.2649 1.63421 62.461 3.85501C58.657 6.0758 55.5191 9.27721 53.375 13.1249L34.25 46.4999L24.25 63.8749L3.25002 100.625C1.129 104.405 0.010209 108.665 2.51422e-05 113C-0.00611845 117.337 1.11374 121.601 3.25002 125.375L24.25 162.125L34.25 179.5L53.375 212.875C55.5191 216.723 58.657 219.924 62.461 222.145C66.2649 224.366 70.5953 225.524 75 225.5H174.75C179.155 225.524 183.485 224.366 187.289 222.145C191.093 219.924 194.231 216.723 196.375 212.875L246.5 125.375C248.636 121.601 249.756 117.337 249.75 113C249.784 108.66 248.663 104.388 246.5 100.625ZM191.7 175.3L191.775 175.25L191.725 175.337L191.7 175.3ZM228.5 113L191.813 175.175C190.338 175.3 188.888 175.5 187.375 175.5C171.025 175.49 155.331 169.065 143.668 157.607C132.004 146.149 125.301 130.572 125 114.225V112.75C124.921 96.2213 118.303 80.396 106.592 68.7318C94.8805 57.0676 79.0288 50.5129 62.5 50.4999C61.2027 50.5568 59.9092 50.682 58.625 50.8749L73.625 25.4999H176.875L228.625 113H228.5Z"
fill="#EBEBEB"
/>
</svg>
</div>
<div>
<p className="mb-0 text-white text-[12px] mt-3 font-medium">
کل شیفت های مجموعه{" "}
</p>
</div>
</div>
<div className="bg-[#279e96] p-3 rounded-2xl mt-3">
<div>
<svg
width="30"
height="36"
viewBox="0 0 251 226"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M246.65 100.5L196.612 13.0002C194.463 9.19349 191.338 6.02857 187.559 3.83143C183.78 1.63429 179.483 0.48438 175.112 0.50016H75.062C70.6812 0.545125 66.3859 1.71914 62.5912 3.9088C58.7966 6.09846 55.6307 9.22974 53.3995 13.0002L3.36204 100.5C1.16661 104.3 0.0107422 108.611 0.0107422 113C0.0107422 117.389 1.16661 121.7 3.36204 125.5L53.3995 213C55.6307 216.771 58.7966 219.902 62.5912 222.092C66.3859 224.281 70.6812 225.455 75.062 225.5H175.137C179.507 225.515 183.801 224.365 187.578 222.167C191.355 219.97 194.478 216.806 196.625 213L246.662 125.5C248.857 121.7 250.013 117.389 250.013 113C250.013 108.611 248.845 104.3 246.65 100.5ZM175 200.5H74.9995L24.9995 113L74.9995 25.5002H175L225 113L175 200.5Z"
fill="#EBEBEB"
/>
</svg>
</div>
<div>
<p className="mb-0 text-gray-100 text-[12px] mt-3">
کل تسک های مجموعه{" "}
</p>
</div>
</div>{" "}
<div className="bg-[#75a29f46] p-4 rounded-2xl mt-4">
<p className="mb-0 text-center text-[#006e67] text-sm font-medium">
افزودن تسک{" "}
</p>
</div>
</div>
<div className="col-span-2">
<div className="bg-[#e4be8f34] p-4 rounded-2xl ">
<p className="mb-0 text-center text-[#66451d] text-sm font-medium">
شیفت بندی هفته{" "}
</p>
</div>
</div>
</div>
<h3 className="text-right p-3 font-medium mt-4">گزارش های مجموعه</h3>
<div className="rtl mt-2">
<div className="flex ">
<div className="w-[50px] h-[50px] rounded-2xl bg-white shadow">
<svg
width="25"
height="25"
viewBox="0 0 251 226"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="mx-auto mt-3"
s
>
<path
d="M246.65 100.5L196.612 13.0002C194.463 9.19349 191.338 6.02857 187.559 3.83143C183.78 1.63429 179.483 0.48438 175.112 0.50016H75.062C70.6812 0.545125 66.3859 1.71914 62.5912 3.9088C58.7966 6.09846 55.6307 9.22974 53.3995 13.0002L3.36204 100.5C1.16661 104.3 0.0107422 108.611 0.0107422 113C0.0107422 117.389 1.16661 121.7 3.36204 125.5L53.3995 213C55.6307 216.771 58.7966 219.902 62.5912 222.092C66.3859 224.281 70.6812 225.455 75.062 225.5H175.137C179.507 225.515 183.801 224.365 187.578 222.167C191.355 219.97 194.478 216.806 196.625 213L246.662 125.5C248.857 121.7 250.013 117.389 250.013 113C250.013 108.611 248.845 104.3 246.65 100.5ZM175 200.5H74.9995L24.9995 113L74.9995 25.5002H175L225 113L175 200.5Z"
fill="#ABABAB"
/>
<path
d="M112 63.5C112 56.5964 117.596 51 124.5 51V51C131.404 51 137 56.5964 137 63.5V126C137 132.904 131.404 138.5 124.5 138.5V138.5C117.596 138.5 112 132.904 112 126V63.5Z"
fill="#ABABAB"
/>
<path
d="M124.5 173C131.404 173 137 167.404 137 160.5C137 153.596 131.404 148 124.5 148C117.596 148 112 153.596 112 160.5C112 167.404 117.596 173 124.5 173Z"
fill="#ABABAB"
/>
</svg>
</div>
<div className="mx-2 mt-1">
<h3 className="text-sm font-bold "> شیفت های بسته شده</h3>
<p className="mb-0 text-right text-sm text-gray-500">
خروجی اکسل
</p>
</div>
</div>
</div>
<div className="rtl mt-4">
<div className="flex ">
<div className="w-[50px] h-[50px] rounded-2xl bg-white shadow">
<svg
width="25"
height="25"
viewBox="0 0 251 226"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="mx-auto mt-3"
s
>
<path
d="M246.65 100.5L196.612 13.0002C194.463 9.19349 191.338 6.02857 187.559 3.83143C183.78 1.63429 179.483 0.48438 175.112 0.50016H75.062C70.6812 0.545125 66.3859 1.71914 62.5912 3.9088C58.7966 6.09846 55.6307 9.22974 53.3995 13.0002L3.36204 100.5C1.16661 104.3 0.0107422 108.611 0.0107422 113C0.0107422 117.389 1.16661 121.7 3.36204 125.5L53.3995 213C55.6307 216.771 58.7966 219.902 62.5912 222.092C66.3859 224.281 70.6812 225.455 75.062 225.5H175.137C179.507 225.515 183.801 224.365 187.578 222.167C191.355 219.97 194.478 216.806 196.625 213L246.662 125.5C248.857 121.7 250.013 117.389 250.013 113C250.013 108.611 248.845 104.3 246.65 100.5ZM175 200.5H74.9995L24.9995 113L74.9995 25.5002H175L225 113L175 200.5Z"
fill="#ABABAB"
/>
<path
d="M112 63.5C112 56.5964 117.596 51 124.5 51V51C131.404 51 137 56.5964 137 63.5V126C137 132.904 131.404 138.5 124.5 138.5V138.5C117.596 138.5 112 132.904 112 126V63.5Z"
fill="#ABABAB"
/>
<path
d="M124.5 173C131.404 173 137 167.404 137 160.5C137 153.596 131.404 148 124.5 148C117.596 148 112 153.596 112 160.5C112 167.404 117.596 173 124.5 173Z"
fill="#ABABAB"
/>
</svg>
</div>
<div className="mx-2 mt-1">
<h3 className="text-sm font-bold "> تسک های مجموعه</h3>
<p className="mb-0 text-right text-sm text-gray-500">
خروجی اکسل
</p>
</div>
</div>
</div>
<div className="rtl mt-4">
<div className="flex ">
<div className="w-[50px] h-[50px] rounded-2xl bg-white shadow">
<svg
width="25"
height="25"
viewBox="0 0 251 226"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className="mx-auto mt-3"
s
>
<path
d="M246.65 100.5L196.612 13.0002C194.463 9.19349 191.338 6.02857 187.559 3.83143C183.78 1.63429 179.483 0.48438 175.112 0.50016H75.062C70.6812 0.545125 66.3859 1.71914 62.5912 3.9088C58.7966 6.09846 55.6307 9.22974 53.3995 13.0002L3.36204 100.5C1.16661 104.3 0.0107422 108.611 0.0107422 113C0.0107422 117.389 1.16661 121.7 3.36204 125.5L53.3995 213C55.6307 216.771 58.7966 219.902 62.5912 222.092C66.3859 224.281 70.6812 225.455 75.062 225.5H175.137C179.507 225.515 183.801 224.365 187.578 222.167C191.355 219.97 194.478 216.806 196.625 213L246.662 125.5C248.857 121.7 250.013 117.389 250.013 113C250.013 108.611 248.845 104.3 246.65 100.5ZM175 200.5H74.9995L24.9995 113L74.9995 25.5002H175L225 113L175 200.5Z"
fill="#ABABAB"
/>
<path
d="M112 63.5C112 56.5964 117.596 51 124.5 51V51C131.404 51 137 56.5964 137 63.5V126C137 132.904 131.404 138.5 124.5 138.5V138.5C117.596 138.5 112 132.904 112 126V63.5Z"
fill="#ABABAB"
/>
<path
d="M124.5 173C131.404 173 137 167.404 137 160.5C137 153.596 131.404 148 124.5 148C117.596 148 112 153.596 112 160.5C112 167.404 117.596 173 124.5 173Z"
fill="#ABABAB"
/>
</svg>
</div>
<div className="mx-2 mt-1">
<h3 className="text-sm font-bold ">کارمند های مجموعه</h3>
<p className="mb-0 text-right text-sm text-gray-500">
خروجی اکسل
</p>
</div>
</div>
</div>
</div>

View File

@ -1763,7 +1763,7 @@ export default function RootLayout({ children }) {
<BottomSheetReport />
{openTimePicker && <TimePicker />}
{BigPlusOpen ? (
{/* {BigPlusOpen ? (
<div className="fixed w-full top-0 z-[120] ">
<motion.div
animate={{ opacity: [0, 0.5, 1] }}
@ -1832,7 +1832,7 @@ export default function RootLayout({ children }) {
</div>
) : (
""
)}
)} */}
</body>
</html>
</AppContext.Provider>

View File

@ -85,40 +85,18 @@ const Shifts = (props) => {
}}
/>
{HasPermission("ManageShiftPlans", permissions) && (
<>
<div className="bg-primary-300 flex whitespace-nowrap rtl p-3">
<Link
href={"/shifts/manage-shift"}
className=" bg-white rounded-3xl p-5 inline-block w-fit relative top-[-32px] mx-2"
>
<div>
<h2 className="text-sm"> شیفت هفته </h2>
<div className="flex justify-end">
<div className="w-10 h-3 rounded-full bg-secondary-200 opacity-30"></div>
</div>
</div>
</Link>
<Link
href={"/shifts/manage-shift"}
className=" bg-white rounded-3xl p-5 inline-block w-fit relative top-[-32px]"
>
<div>
<h2 className="text-sm">
{" "}
شیفت بعدی
<strong> هفته بعد </strong>
</h2>
<div className="flex justify-end">
<div className="w-5 h-3 rounded-full bg-secondary-100 opacity-30"></div>
</div>{" "}
</div>
</Link>
</div>
</>
)}
<div className="bg-body-100 relative top-[-30px] rounded-t-3xl overflow-hidden p-4 rtl mt-2">
{HasPermission("ManageShiftPlans", permissions) && (
<>
<Link href={"/shifts/manage-shift"}>
<div className="bg-[#e4be8f34] p-4 rounded-2xl ">
<p className="mb-0 text-center text-[#66451d] text-sm font-medium">
شیفت بندی هفته{" "}
</p>
</div>
</Link>
</>
)}
{shiftplans.length <= 0 ? (
<div className="flex justify-center py-5">
<div className="bg-white shadow mt-5 w-fit rounded-full text-sm p-4">

View File

@ -459,3 +459,14 @@ body {
background-size: cover;
background-image: url(../public/images/bg.png);
}
.bg-dahs-chart {
background-image: radial-gradient(
circle,
#b16a62,
#b8645a,
#be5e52,
#c45749,
#c95040
);
}