Compare commits

..

No commits in common. "8298bc30e739a3f7e73b6c03a855fed9e2f508a4" and "04631324ebb05de35924b28994ff73ab87bc79c8" have entirely different histories.

65 changed files with 249 additions and 2993 deletions

View File

@ -1,8 +0,0 @@
import React from "react";
import CallUs from "@/components/CallUs";
export default function page() {
return (
<CallUs />
);
}

View File

@ -3,6 +3,8 @@ import FollowResult from "@/components/FollowResult";
export default function page() { export default function page() {
return ( return (
<div className="flex justify-center items-center content-center h-full">
<FollowResult /> <FollowResult />
</div>
); );
} }

View File

@ -1,8 +1,10 @@
import React from "react";
import FollowUp from "@/components/FollowUp"; import FollowUp from "@/components/FollowUp";
import React from "react";
export default function page() { export default function page() {
return ( return (
<div className="flex justify-center items-center content-center h-full">
<FollowUp /> <FollowUp />
</div>
); );
} }

View File

@ -3,6 +3,8 @@ import React from "react";
export default function page() { export default function page() {
return ( return (
<div className="flex justify-center items-center content-center h-full">
<Login /> <Login />
</div>
); );
} }

10
app/Request/page.tsx Normal file
View File

@ -0,0 +1,10 @@
import React from "react";
import Request from "@/components/Request";
export default function page() {
return (
<div className="flex justify-center items-center content-center h-full">
<Request />
</div>
);
}

View File

@ -3,6 +3,8 @@ import Result from "@/components/RequestResult";
export default function page() { export default function page() {
return ( return (
<div className="flex justify-center items-center content-center h-full">
<Result /> <Result />
</div>
); );
} }

View File

@ -1,8 +0,0 @@
import React from "react";
import RequestStep1 from "@/components/RequestStep1";
export default function page() {
return (
<RequestStep1 />
);
}

View File

@ -1,8 +0,0 @@
import React from "react";
import RequestStep2 from "@/components/RequestStep2";
export default function page() {
return (
<RequestStep2 />
);
}

View File

@ -1,8 +0,0 @@
import AdminManagement from '@/components/AdminManagement'
import React from 'react'
export default function page() {
return (
<AdminManagement />
)
}

View File

@ -1,15 +0,0 @@
import NavbarPanel from "@/components/NavbarPanel";
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<NavbarPanel />
{children}
</>
)
}

View File

@ -1,8 +0,0 @@
import AdminDashboard from "@/components/AdminDashboard";
import React from "react";
export default function page() {
return (
<AdminDashboard />
);
}

View File

@ -1,13 +0,0 @@
import ComplainsDetails from '@/components/ComplainsDetails'
import React from 'react'
export default function page({params}:{params:any}) {
const id = params.id;
{ console.log(params);}
{ console.log(id);}
return (
<ComplainsDetails id={id} />
)
}

View File

@ -1,9 +0,0 @@
import TabController from '@/components/TabController'
import React from 'react'
export default function page() {
return (
<TabController />
)
}

View File

@ -1,8 +0,0 @@
import ReportsController from '@/components/ReportsController'
import React from 'react'
export default function page() {
return (
<ReportsController />
)
}

View File

@ -1,15 +0,0 @@
import NavbarPanel from "@/components/NavbarPanel";
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
<NavbarPanel />
{children}
</>
)
}

View File

@ -1,8 +0,0 @@
import ControllerDashboard from "@/components/ControllerDashboard";
import React from "react";
export default function page() {
return (
<ControllerDashboard />
);
}

View File

@ -1,7 +0,0 @@
import React from 'react'
export default function page() {
return (
<div>Userpage</div>
)
}

View File

@ -8,7 +8,6 @@ import Image from "next/image";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import Link from "next/link"; import Link from "next/link";
import bgimg from "../../public/img/bg.png"; import bgimg from "../../public/img/bg.png";
import Footer from "@/components/Footer";
export default function Landing() { export default function Landing() {
return ( return (
@ -18,7 +17,7 @@ export default function Landing() {
// backgroundSize: "cover", // backgroundSize: "cover",
// backgroundSize: "100%" // backgroundSize: "100%"
}} }}
className="w-full bg-top lg:bg-center bg-no-repeat h-[13rem] sm:h-[20rem] md:h-[24rem] xl:h-[33rem]" className="w-full bg-contain bg-top lg:bg-center bg-no-repeat h-[13rem] sm:h-[20rem] md:h-[24rem] xl:h-[33rem] "
> >
<Image <Image
alt="bg" alt="bg"
@ -161,8 +160,6 @@ export default function Landing() {
{/*SubmitRequest */} {/*SubmitRequest */}
<SubmitRequest /> <SubmitRequest />
<Footer />
</div> </div>
); );
} }

View File

@ -84,8 +84,3 @@
font-family: "yekan-m"; font-family: "yekan-m";
src: url(../fonts/iranyekanwebmediumfanum.ttf); src: url(../fonts/iranyekanwebmediumfanum.ttf);
} }
.leaflet-container {
width: 100%;
height: 100vh;
}

View File

@ -3,8 +3,6 @@ import { Inter } from "next/font/google";
import "./globals.css"; import "./globals.css";
import { Toaster } from "@/components/ui/toaster"; import { Toaster } from "@/components/ui/toaster";
import Navbar from "@/components/Navbar"; import Navbar from "@/components/Navbar";
import NavbarSm from "@/components/NavbarSm";
const inter = Inter({ subsets: ["latin"] }); const inter = Inter({ subsets: ["latin"] });
@ -18,19 +16,12 @@ export default function RootLayout({
}: { }: {
children: React.ReactNode; children: React.ReactNode;
}) { }) {
return ( return (
<html lang="fa" dir="rtl"> <html lang="fa" dir="rtl">
<body className="font-[yekan-m] "> <body className="font-[yekan-m] h-screen">
<Navbar /> <Navbar />
<NavbarSm />
<div className="flex justify-center " >
{children} {children}
</div>
<Toaster /> <Toaster />
</body> </body>
</html> </html>
); );

View File

@ -1,35 +0,0 @@
import React from "react";
import BoxDashboard from "./BoxDashboard";
import LineChart from "./LineChart";
import { HorizontalChart } from "./HorizontalChart";
import { VerticalChart } from "./VerticalChart";
import { PieChart } from "./PieChart";
export default function AdminDashboard() {
return (
<div className="w-[95vw] lg:w-[82vw] xl:w-[70vw] 3xl:w-[65vw] mt-8 max-sm:mt-16 pt-9">
<div className="w-full mb-6 flex flex-col gap-4 ">
<div className="w-full md:h-36 flex flex-row max-md:flex-wrap justify-center md:justify-between gap-3 ">
<BoxDashboard />
<BoxDashboard />
<BoxDashboard />
<BoxDashboard />
<BoxDashboard />
<BoxDashboard />
</div>
<div className="w-full flex flex-col md:flex-row gap-12 md:gap-1 ">
<div className="w-full md:w-1/3 h-full flex justify-center">
<PieChart />
</div>
<hr />
<div className="w-full md:w-2/3 h-full flex justify-center">
<VerticalChart />
</div>
</div>
</div>
</div>
);
}

View File

@ -1,134 +0,0 @@
"use client";
import React from "react";
import Search from "./Search";
import { MdOutlineManageSearch } from "react-icons/md";
import { IoIosArrowDown } from "react-icons/io";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuGroup,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuPortal,
DropdownMenuSeparator,
DropdownMenuShortcut,
DropdownMenuSub,
DropdownMenuSubContent,
DropdownMenuSubTrigger,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { Button } from "./ui/button";
import { AdminCardItems } from "@/constants";
import TableAdmin from "./TableAdmin";
export default function AdminManagement() {
return (
<div className="w-full bg-[#F5F5F5] min-h-[82vh] flex justify-center">
<div className="w-[95vw] lg:w-[85vw] 3xl:w-[70vw] mt-8 max-sm:mt-16 pt-9 ">
<div className="w-full flex flex-col gap-5 ">
{/* 1 */}
<div className="w-full flex flex-col justify-start gap-3">
<div className="w-full text-right text-neutral-600 text-lg font-bold">
مدیریت کاربران
</div>
<div className="w-full flex flex-col lg:flex-row justify-center items-center gap-6 ">
<div className="w-full lg:w-3/5 h-11 bg-white rounded-[5px] block">
<Search mode="admin" />
</div>
<div className="w-full lg:w-2/5 flex flex-row justify-between items-center gap-2 ">
<MdOutlineManageSearch size="1.5em" />
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button
variant="link"
className="gap-3 hover:no-underline focus-visible:ring-0"
>
<IoIosArrowDown /> جستجوی پیشرفته
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent className="w-56">
<DropdownMenuLabel>My Account</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuGroup>
<DropdownMenuItem>
Profile
<DropdownMenuShortcut>⇧P</DropdownMenuShortcut>
</DropdownMenuItem>
<DropdownMenuItem>
Billing
<DropdownMenuShortcut>⇧B</DropdownMenuShortcut>
</DropdownMenuItem>
</DropdownMenuGroup>
</DropdownMenuContent>
</DropdownMenu>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button
variant="link"
className="gap-3 hover:no-underline focus-visible:ring-0"
>
<IoIosArrowDown /> مرتب سازی
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent className="w-56">
<DropdownMenuLabel>My Account</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuGroup>
<DropdownMenuItem>
Profile
<DropdownMenuShortcut>⇧P</DropdownMenuShortcut>
</DropdownMenuItem>
<DropdownMenuItem>
Billing
<DropdownMenuShortcut>⇧B</DropdownMenuShortcut>
</DropdownMenuItem>
</DropdownMenuGroup>
</DropdownMenuContent>
</DropdownMenu>
<Button className=" bg-blue hover:bg-blue/90 rounded-lg">
+ افزودن کاربر
</Button>
</div>
</div>
</div>
{/* 2 */}
<div className="w-full flex flex-row max-md:flex-wrap justify-center gap-3">
{AdminCardItems.map((item) => {
return (
<div
key={item.id}
className=" flex flex-col justify-center items-end gap-2 w-2/5 lg:w-1/4 h-28 px-5 bg-white rounded-md shadow-md"
>
<p className=" text-slate-400 text-sm font-normal leading-none">
{item.name}
</p>
<p className=" text-slate-800 text-xl font-bold leading-normal">
{item.count}
</p>
</div>
);
})}
</div>
{/* 3 */}
<div className="w-full flex flex-col justify-start bg-white rounded-md">
<div className="w-full text-right text-neutral-600 text-lg font-bold py-5 pr-4">
لیست کاربران
</div>
<TableAdmin />
</div>
</div>
</div>
</div>
);
}

View File

@ -1,16 +0,0 @@
import React from "react";
export default function BoxDashboard() {
return (
<div
className="w-full h-full px-7 py-8 bg-zinc-100 rounded-lg shadow flex flex-col justify-end items-center text-black
transition-all duration-300 hover:transition-all hover:duration-300
hover:text-white hover:bg-blue hover:pb-10
max-lg:min-h-[10em] max-lg:max-w-[10em]"
>
<p className="text-center text-sm font-medium ">
تعداد درخواست ها 30 روز گذشته
</p>
</div>
);
}

View File

@ -1,68 +0,0 @@
"use client";
import Image from "next/image";
import React from "react";
import mapImg from "../public/img/map.png";
import { callUsItems } from "@/constants";
import { cn } from "@/lib/utils";
import Map from "./Map";
export default function CallUs(props: any) {
const { position, zoom } = props;
return (
<div className="bg-white dark:bg-gray-900 w-screen">
<div className="w-full">
<div className="w-full h-[42vh]">
{/* <Image
src={mapImg}
className="object-cover w-full h-full "
alt=" Logo1"
quality={100}
width={100}
height={100}
/> */}
<Map />
</div>
<div className="container">
<div className="grid gap-8 md:gap-0 grid-cols-1 md:grid-cols-3 md:h-[40vh] h-full w-full lg:px-32 xl:px-52 md:py-8 py-12">
{callUsItems.map((item) => {
return (
<div
key={item.id}
className={cn(
" px-4 md:px-6 gap-4 flex justify-center items-center lg:border-l-[1px] border-black h-full",
item.id == 3 && " lg:border-l-0 backdrop:"
)}
>
<div
key={item.id}
className="p-4 lg:p-6 dark:bg-gray-800 gap-4 flex flex-col justify-between items-center
border-black max-md:rounded-lg h-full w-full lg:bg-transparent bg-[#EBEBEB]
rounded-lg hover:bg-[#EBEBEB] hover:shadow-[0px_4px_4px_0px_#00000026]
hover:transition-all transition-all delay-300 cursor-default"
>
<span className="inline-block text-orange-500 w-14 h-14">
{item.icon}
</span>
<p className=" text-center text-neutral-700 text-lg font-bold dark:text-white">
{item.title}
</p>
<p className="text-center text-neutral-500 text-base dark:text-gray-400 line-clamp-2">
{item.description}
</p>
<p className="text-center text-orange-500 text-lg font-bold">
{item.description2}
</p>
</div>
</div>
);
})}
</div>
</div>
</div>
</div>
);
}

View File

@ -1,86 +0,0 @@
import React from "react";
import greenIcon from "../public/img/greenPoint.svg";
import blueIcon from "../public/img/bluepoint.svg";
import Image from "next/image";
import { ComplainDetailsItems } from "@/constants";
export default function ComplainsDetails({ id }: { id: number }) {
return (
<div className="w-[95vw] lg:w-[82vw] xl:w-[70vw] 3xl:w-[65vw] mt-16 sm:mt-8 pt-9">
<div className="w-full flex flex-col md:flex-row min-h-[60vh] gap-5">
{/* Right */}
<div className="w-full md:w-2/3 pb-20 md:pb-0 bg-[#E9E9E9] rounded-md pt-4 px-11 flex flex-col gap-7">
<p className="text-[#464646] text-base font-bold">گزارش شکایات</p>
<div className="">
<p className="text-[#464646] text-sm font-medium">
{" "}
موضوع شکایت:{" "}
<span className="text-[#7C838A] text-sm font-medium">
متن تستی
</span>
</p>
<p className="text-[#464646] text-sm font-medium">
{" "}
موضوع شکایت:{" "}
<span className="text-[#7C838A] text-sm font-medium">
متن تستی
</span>
</p>
<p className="text-[#464646] text-sm font-medium">
{" "}
موضوع شکایت:{" "}
<span className="text-[#7C838A] text-sm font-medium">
متن تستی
</span>
</p>
<p className="text-[#464646] text-sm font-medium"> موضوع شکایت:</p>
</div>
<p className="text-[#464646] text-sm font-medium text-justify">
درخواست شما با کد رهگیری 1243230783 و رمز عبور 12422 در دست بررسی و
اقدام می باشد. در صورت تمایل می توانید با شماره تلفن 0353286545 جهت
پشتیبانی تماس حاصل کنید.{" "}
</p>
</div>
{/* Left */}
<div className="w-full md:w-1/3 bg-white shadow-lg rounded-md pt-3 px-4 flex flex-row md:flex-col max-md:flex-wrap">
<p className="text-[#464646] text-base font-bold mb-3">
وضعیت درخواست
</p>
{/* 1 */}
{ComplainDetailsItems.map((item, index, array) => {
return (
<div className="w-full justify-start items-start gap-4 inline-flex " key={item.id}>
<div className="grow shrink basis-0 pb-2 flex-col justify-start items-start gap-1 inline-flex">
<div className="self-stretch text-right text-lime-800 text-lg font-semibold leading-[30px]">
{item.title}
</div>
<div className="self-stretch text-right text-zinc-700 text-base font-normal uppercase">
{item.desc}
</div>
<div className="self-stretch text-right text-zinc-700 text-base font-normal">
{item.date} <br /> {item.time}
</div>
</div>
<div className="w-6 self-stretch flex-col justify-start items-center gap-1 inline-flex">
<div className="py-0.5 justify-start items-start gap-2.5 inline-flex">
<Image
src={greenIcon}
alt="greenIcon"
width={100}
height={100}
/>
</div>
<div className="w-1 grow shrink basis-0 bg-lime-800 rounded-[1px]"></div>
</div>
</div>
);
})}
</div>
</div>
</div>
);
}

View File

@ -1,55 +0,0 @@
import React from "react";
import BoxDashboard from "./BoxDashboard";
import LineChart from "./LineChart";
import { HorizontalChart } from "./HorizontalChart";
export default function ControllerDashboard() {
return (
<div className="w-[95vw] lg:w-[82vw] xl:w-[70vw] 3xl:w-[65vw] mt-8 max-sm:mt-16 pt-9">
{/* Lg Show */}
<div className="w-full h-[45vh] mb-6 flex-row gap-0 hidden lg:flex">
<div className="w-1/5 flex flex-col gap-8 pl-6">
<BoxDashboard />
<BoxDashboard />
</div>
<div className="w-4/5 bg-[#EFEFEF80] rounded-lg flex justify-center">
<LineChart />
</div>
</div>
<div className="w-full flex-row gap-6 h-[20vh] hidden lg:flex">
<div className="w-3/5 flex flex-row gap-7">
<BoxDashboard />
<BoxDashboard />
<BoxDashboard />
</div>
<div className="w-2/5 flex justify-end">
<HorizontalChart />
</div>
</div>
{/* max Lg show */}
<div className="w-full mb-6 flex-col gap-12 flex lg:hidden">
<div className="w-full flex flex-row flex-wrap justify-center gap-4 ">
<BoxDashboard />
<BoxDashboard />
<BoxDashboard />
<BoxDashboard />
<BoxDashboard />
</div>
<div className="w-full flex flex-col gap-12 ">
<div className="h-1/2">
<LineChart />
</div>
<hr />
<div className="h-1/2">
<HorizontalChart />
</div>
</div>
</div>
</div>
);
}

View File

@ -19,7 +19,7 @@ export default function Counter() {
max-md:gap-4 max-lg:flex-wrap max-lg:justify-center'> max-md:gap-4 max-lg:flex-wrap max-lg:justify-center'>
{counterItems.map((item) => { {counterItems.map((item) => {
return ( return (
<div className='h-48 flex flex-col justify-end items-center gap-1 px-7 py-6 rounded-lg bg-blue50 <div className='h-48 flex flex-col justify-end items-center gap-1 px-7 py-6 rounded-lg
hover:bg-[#002A5B] transition-all duration-500 text-center hover:bg-[#002A5B] transition-all duration-500 text-center
max-md:px-1 max-md:py-1 max-lg:h-36 max-md:h-32' max-md:px-1 max-md:py-1 max-lg:h-36 max-md:h-32'
key={item.id}> key={item.id}>

View File

@ -19,7 +19,7 @@ import { IoMdClose } from "react-icons/io";
export default function FollowResult() { export default function FollowResult() {
return ( return (
<div className="w-full h-full sm:w-2/3 md:w-3/4 lg:w-1/2 max-sm:p-8 pt-12"> <div className="w-full h-full sm:w-2/3 md:w-3/4 lg:w-1/2 max-sm:p-4 ">
<div className="h-full flex flex-col justify-center"> <div className="h-full flex flex-col justify-center">
<p <p
className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white
@ -38,7 +38,7 @@ export default function FollowResult() {
type="submit" type="submit"
className="w-1/2 sm:w-1/3 lg:w-1/4 bg-blue text-white p-2 rounded-xl text-center" className="w-1/2 sm:w-1/3 lg:w-1/4 bg-blue text-white p-2 rounded-xl text-center"
> >
پرینت درخواست ارسال درخواست
</Button> </Button>
</AlertDialogTrigger> </AlertDialogTrigger>

View File

@ -45,7 +45,7 @@ export default function FollowUp() {
toast({ toast({
title: "You submitted the following values:", title: "You submitted the following values:",
description: ( description: (
<pre className="mt-2 w-[340px] rounded-md bg-slate-950 p-4 pt-12"> <pre className="mt-2 w-[340px] rounded-md bg-slate-950 p-4">
<code className="text-white">{JSON.stringify(data, null, 2)}</code> <code className="text-white">{JSON.stringify(data, null, 2)}</code>
</pre> </pre>
), ),
@ -53,9 +53,9 @@ export default function FollowUp() {
console.log(data); console.log(data);
} }
return ( return (
<div className="w-full h-full sm:w-2/3 md:w-2/4 max-sm:p-8 pt-12"> <div className="w-full h-full sm:w-2/3 md:w-2/4 max-sm:p-4 ">
<div className="space-y-3 md:space-y-4 h-full flex flex-col justify-start "> <div className="space-y-3 md:space-y-4 h-full flex flex-col justify-start mt-12">
<p className="text-sm md:text-base font-bold leading-tight tracking-tight text-blue dark:text-white"> <p className="text-sm font-bold leading-tight tracking-tight text-blue dark:text-white">
لطفا جهت پیگیری درخواست و مشاهده وضعیت آن کد رهگیری و رمز عبور خود را لطفا جهت پیگیری درخواست و مشاهده وضعیت آن کد رهگیری و رمز عبور خود را
وارد نمایید. وارد نمایید.
</p> </p>
@ -63,7 +63,7 @@ export default function FollowUp() {
<Form {...form}> <Form {...form}>
<form <form
onSubmit={form.handleSubmit(onSubmit)} onSubmit={form.handleSubmit(onSubmit)}
className="w-full flex flex-col mt-6 " className="w-full flex flex-col "
> >
<div className="flex flex-row flex-wrap justify-between"> <div className="flex flex-row flex-wrap justify-between">
<FormField <FormField
@ -105,10 +105,10 @@ export default function FollowUp() {
/> />
</div> </div>
<div className="flex justify-center sm:justify-end gap-2 w-full mt-8"> <div className="flex justify-end gap-2 w-full mt-9">
<Link href="/FollowResult" <Link href="/FollowResult"
type="submit" type="submit"
className="bg-blue text-white min-w-max w-1/2 sm:w-1/3 lg:w-1/4 p-2 rounded-xl text-center" className="bg-blue text-white w-1/3 p-2 rounded-xl text-center"
> >
پیگیری درخواست پیگیری درخواست
</Link> </Link>

View File

@ -1,84 +0,0 @@
import React from "react";
import Image from "next/image";
import img1 from "../public/img/footerImg1.png";
import img2 from "../public/img/footerImg2.png";
import { footerItems } from "@/constants";
import { aboutFooterItems } from "@/constants";
import Link from "next/link";
export default function Footer() {
return (
// <div classNameName="flex justify-center items-center w-full bg-blue ">
<footer className="bg-blue dark:bg-gray-900">
<div
className="mx-auto w-full max-w-screen-3xl px-4 py-7 md:px-8 md:py-8 lg:pt-14 lg:pb-7 lg:px-11 "
>
<div className="md:flex md:justify-between w-full ">
<div className="grid gap-10 sm:gap-16 md:gap-20 lg:gap-28 grid-cols-1 w-full md:grid-cols-2 md:w-3/4 lg:w-2/4" >
<div>
<h2 className="text-white text-sm sm:text-base font-bold mb-4 ">
درباره سامانه سوت زنی
</h2>
{aboutFooterItems.map((item) => {
return (
<div key={item.id}>
<p className=" text-white text-xs md:text-sm font-normal md:leading-7">{item.name}</p>
</div>
);
})}
</div>
<div>
<h2 className="text-white text-sm sm:text-base font-bold mb-4">
دسترسی سریع
</h2>
<ul className="text-gray-500 dark:text-gray-400 font-medium text-right">
{footerItems.map((item, index, array) => {
return (
<Link key={item.id} href={item.href}>
<div className=" text-white text-xs md:text-sm font-normal leading-6 mb-3">{item.name}</div>
</Link>
);
})}
</ul>
</div>
</div>
<div className=" max-md:mt-6 flex flex-row justify-center md:justify-end items-start w-full md:w-1/4 ">
<div className="w-23 h-23 sm:w-36 sm:h-36 ">
<Image
src={img1}
className="h-full w-full object-contain"
alt=" Logo1"
quality={100}
width={100}
height={100}
/>
</div>
<div className="w-23 h-23 sm:w-36 sm:h-36 ">
<Image
src={img2}
className="h-full w-full object-contain"
alt=" Logo2"
quality={100}
width={100}
height={100}
/>
</div>
</div>
</div>
<hr className=" border-gray-200 sm:mx-auto dark:border-gray-700 mt-5 sm:mt-10" />
<div className="sm:flex sm:items-center sm:justify-between">
<p className="text-white text-xs font-normal mt-4">
تمامی حقوق مادی و معنوی این وب سایت متعلق به سوت زنی میباشد.
</p>
</div>
</div>
</footer>
// </div>
);
}

View File

@ -1,68 +0,0 @@
"use client"
import React from 'react';
import {
Chart as ChartJS,
CategoryScale,
LinearScale,
BarElement,
Title,
Tooltip,
Legend,
} from 'chart.js';
import { Bar } from 'react-chartjs-2';
import { faker } from "@faker-js/faker";
ChartJS.register(
CategoryScale,
LinearScale,
BarElement,
Title,
Tooltip,
Legend
);
export const options = {
indexAxis: 'y' as const,
elements: {
bar: {
borderWidth: 2,
},
},
responsive: true,
plugins: {
legend: {
position: 'right' as const,
},
title: {
display: true,
text: 'Chart.js Horizontal Bar Chart',
},
},
};
const labels = ['January', 'February', 'March', 'April', 'May', 'June', 'July'];
export const data = {
labels,
datasets: [
{
label: 'Dataset 1',
data: labels.map(() => faker.datatype.number({ min: 0, max: 1000 })),
borderColor: 'rgb(255, 99, 132)',
backgroundColor: 'rgba(255, 99, 132, 0.5)',
},
{
label: 'Dataset 2',
data: labels.map(() => faker.datatype.number({ min: 0, max: 1000 })),
borderColor: 'rgb(53, 162, 235)',
backgroundColor: 'rgba(53, 162, 235, 0.5)',
},
],
};
export function HorizontalChart() {
return (
<Bar options={options} data={data} className='!w-full !h-full'/>
)
}

View File

@ -1,64 +0,0 @@
"use client";
import React from "react";
import {
Chart as ChartJS,
CategoryScale,
LinearScale,
PointElement,
LineElement,
Title,
Tooltip,
Legend,
} from "chart.js";
import { Line } from "react-chartjs-2";
import { faker } from "@faker-js/faker";
ChartJS.register(
CategoryScale,
LinearScale,
PointElement,
LineElement,
Title,
Tooltip,
Legend
);
export const options = {
responsive: true,
plugins: {
legend: {
position: "top" as const,
},
title: {
display: true,
text: "Chart.js Line Chart",
},
},
};
const labels = ["January", "February", "March", "April", "May", "June", "July"];
export const data = {
labels,
datasets: [
{
label: "Dataset 1",
data: labels.map(() => faker.datatype.number({ min: -1000, max: 1000 })),
borderColor: "rgb(255, 99, 132)",
backgroundColor: "rgba(255, 99, 132, 0.5)",
},
{
label: "Dataset 2",
data: labels.map(() => faker.datatype.number({ min: -1000, max: 1000 })),
borderColor: "rgb(53, 162, 235)",
backgroundColor: "rgba(53, 162, 235, 0.5)",
},
],
};
export default function LineChart() {
return (
<Line options={options} data={data} className=' '/>
);
}

View File

@ -15,7 +15,6 @@ import {
FormLabel, FormLabel,
FormMessage, FormMessage,
} from "@/components/ui/form"; } from "@/components/ui/form";
import { Input } from "@/components/ui/input"; import { Input } from "@/components/ui/input";
import { toast } from "@/components/ui/use-toast"; import { toast } from "@/components/ui/use-toast";
import Image from "next/image"; import Image from "next/image";
@ -43,7 +42,7 @@ export default function Login() {
toast({ toast({
title: "You submitted the following values:", title: "You submitted the following values:",
description: ( description: (
<pre className="mt-2 w-[340px] rounded-md bg-slate-950 p-4 pt-12"> <pre className="mt-2 w-[340px] rounded-md bg-slate-950 p-4">
<code className="text-white">{JSON.stringify(data, null, 2)}</code> <code className="text-white">{JSON.stringify(data, null, 2)}</code>
</pre> </pre>
), ),
@ -52,9 +51,8 @@ export default function Login() {
} }
return ( return (
<div className="w-full mt-12 sm:w-2/3 md:w-2/4 xl:w-1/3 bg-white rounded-lg dark:border xl:p-0 dark:bg-gray-800 dark:border-gray-700 shadow-[0px_0px_15px_0px_#00000040] <div className="w-full sm:w-2/3 md:w-2/4 xl:w-1/3 bg-white rounded-lg dark:border md:mt-0 xl:p-0 dark:bg-gray-800 dark:border-gray-700 shadow-[0px_0px_15px_0px_#00000040]">
h-full max-md:p-8 pt-12"> <div className="space-y-3 md:space-y-4 flex flex-col py-12 px-20">
<div className="space-y-3 md:space-y-4 flex flex-col md:py-12 md:px-20 h-full justify-center">
<Image alt="icon" src={LoginIcon} className="self-center w-1/3 "/> <Image alt="icon" src={LoginIcon} className="self-center w-1/3 "/>
<p className="text-lg font-bold leading-tight tracking-tight text-blue dark:text-white"> <p className="text-lg font-bold leading-tight tracking-tight text-blue dark:text-white">
@ -99,8 +97,9 @@ export default function Login() {
)} )}
/> />
<div className="flex justify-end gap-2 w-full mt-14"> <div className="flex justify-end gap-2 w-full mt-16">
<Button type="submit" className="bg-blue text-white w-1/2 md:w-1/3 p-2 rounded-xl">ورود</Button> <Button type="submit" className="bg-blue text-white w-1/3 p-2 rounded-xl">بازرس</Button>
<Button type="submit" className="bg-blue text-white w-1/3 p-2 rounded-xl">ادمین</Button>
</div> </div>
</form> </form>
</Form> </Form>

View File

@ -1,48 +0,0 @@
"use client";
import React, { useEffect, useRef } from "react";
import { MapContainer, TileLayer, Marker, Popup } from "react-leaflet";
import L from "leaflet";
// import MarkerIcon from "../../node_modules/leaflet/dist/images/marker-icon.png";
// import MarkerShadow from "../../node_modules/leaflet/dist/images/marker-shadow.png";
import "leaflet/dist/leaflet.css";
import { any } from "zod";
const Map = () => {
const markerRef = useRef<any>(null);
useEffect(() => {
if (markerRef.current) {
markerRef.current.openPopup()
}
}, []);
return (
<MapContainer
center={[31.8974, 54.3569]}
zoom={13}
style={{ height: "300px" }}
className=" rounded-lg max-w-full"
>
<TileLayer url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" />
<Marker
position={[31.8974, 54.3569]}
// icon={
// new L.Icon({
// iconUrl: MarkerIcon.src,
// iconRetinaUrl: MarkerIcon.src,
// iconSize: [25, 41],
// iconAnchor: [12.5, 41],
// popupAnchor: [0, -41],
// shadowUrl: MarkerShadow.src,
// shadowSize: [41, 41],
// })
// }
ref={markerRef}
>
<Popup className=" font-[Yekan] font-bold">داروخانه چمران</Popup>
</Marker>
</MapContainer>
);
};
export default Map;

View File

@ -8,16 +8,84 @@ import Link from "next/link";
import Login from "./Login"; import Login from "./Login";
import { Button } from "./ui/button"; import { Button } from "./ui/button";
import { usePathname } from 'next/navigation' import { usePathname } from 'next/navigation'
import TopNav from "./TopNav";
export default function Navbar() { export default function Navbar() {
const pathname = usePathname() const pathname = usePathname()
return ( return (
<div className={`max-md:hidden left-0 right-0 top-0 ${pathname === "/" ? "absolute" : "sticky"}`}> <div className={`left-0 right-0 top-0 ${pathname === "/" ? "absolute" : "relative"}`}>
<TopNav /> <div className="flex justify-between items-center w-full px-8 py-2 z-10 border-b-[#C9CFD7] border-b-[1px] border-solid">
<h1 className="bg-gradient-to-r from-gradient1 to-gradient2 inline-block text-transparent bg-clip-text">
سال 1402 | مهارم تورم، رشد تولید
</h1>
{/* <p>Current pathname: {pathname}</p> */}
<div className=" flex items-center gap-10">
<div className=" relative flex bg-gray-300 rounded-xl items-center">
<Input
className="mb-0 h-8 bg-slate-300 border-none focus-visible:none w-64 rounded-xl"
placeholder="جستجو..."
/>
<button className="absolute left-0">
<svg
xmlns="http://www.w3.org/2000/svg"
width="18"
height="19"
viewBox="0 0 18 19"
fill="none"
className=" ml-2"
>
<path
d="M8.25 14.75C11.5637 14.75 14.25 12.0637 14.25 8.75C14.25 5.43629 11.5637 2.75 8.25 2.75C4.93629 2.75 2.25 5.43629 2.25 8.75C2.25 12.0637 4.93629 14.75 8.25 14.75Z"
stroke="black"
stroke-opacity="0.9"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M15.75 16.25L12.4875 12.9875"
stroke="black"
stroke-opacity="0.9"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
</button>
</div>
<div className=" flex items-center gap-3 ml-4">
<p className="bg-gradient-to-r from-gradient1 to-gradient2 inline-block text-transparent bg-clip-text text-sm">
امروز: چهارشنبه 24 آبان 1402
</p>
<svg
xmlns="http://www.w3.org/2000/svg"
width="18"
height="19"
viewBox="0 0 18 19"
fill="none"
>
<g clip-path="url(#clip0_113_99)">
<path
d="M11.2875 4.25C12.02 4.39292 12.6932 4.75119 13.221 5.27895C13.7488 5.80671 14.107 6.47995 14.2499 7.2125L11.2875 4.25ZM11.2875 1.25C12.8094 1.41908 14.2286 2.10063 15.3121 3.18276C16.3956 4.26488 17.079 5.68326 17.2499 7.205L11.2875 1.25ZM16.4999 13.19V15.44C16.5008 15.6489 16.458 15.8556 16.3743 16.047C16.2907 16.2384 16.1679 16.4102 16.014 16.5514C15.8601 16.6926 15.6784 16.8001 15.4805 16.867C15.2826 16.9339 15.073 16.9588 14.8649 16.94C12.5571 16.6892 10.3402 15.9006 8.39245 14.6375C6.58032 13.486 5.04395 11.9496 3.89245 10.1375C2.62493 8.1809 1.83613 5.95325 1.58995 3.635C1.57121 3.4276 1.59586 3.21857 1.66233 3.02122C1.72879 2.82387 1.83563 2.64252 1.97602 2.48872C2.11642 2.33491 2.2873 2.21203 2.47779 2.12789C2.66828 2.04375 2.87421 2.0002 3.08245 2H5.33245C5.69643 1.99642 6.04929 2.12531 6.32527 2.36265C6.60125 2.59999 6.78151 2.92959 6.83245 3.29C6.92742 4.01005 7.10354 4.71705 7.35745 5.3975C7.45836 5.66594 7.4802 5.95769 7.42038 6.23816C7.36056 6.51863 7.2216 6.77608 7.01995 6.98L6.06745 7.9325C7.13512 9.81016 8.68979 11.3648 10.5675 12.4325L11.5199 11.48C11.7239 11.2784 11.9813 11.1394 12.2618 11.0796C12.5423 11.0198 12.834 11.0416 13.1024 11.1425C13.7829 11.3964 14.4899 11.5725 15.21 11.6675C15.5743 11.7189 15.907 11.9024 16.1448 12.1831C16.3827 12.4638 16.5091 12.8222 16.4999 13.19Z"
stroke="black"
stroke-linecap="round"
stroke-linejoin="round"
/>
</g>
<defs>
<clipPath id="clip0_113_99">
<rect
width="18"
height="18"
fill="white"
transform="translate(0 0.5)"
/>
</clipPath>
</defs>
</svg>
</div>
</div>
</div>
<div className=" bg-white h-20 shadow-md flex items-center justify-between py-2 px-8"> <div className=" bg-white h-20 shadow-md flex items-center justify-between py-2 px-8">
<div className=" flex "> <div className=" flex ">
<div className=" flex items-center "> <div className=" flex items-center ">
@ -34,20 +102,12 @@ export default function Navbar() {
</div> </div>
</div> </div>
<div className=" flex gap-5 items-center mr-8"> <div className=" flex gap-5 items-center mr-8">
{menuItems.map((item, index, array) => { {menuItems.map((item) => {
if (array.length - 1 !== index){
return ( return (
<Link key={item.id} href={item.href}> <Link key={item.id} href="/">
<div className=" text-sm">{item.name}</div> <div className=" text-sm">{item.name}</div>
</Link> </Link>
); );
}else{
return (
<></>
);
}
})} })}
</div> </div>
</div> </div>

View File

@ -1,54 +0,0 @@
"use client";
import React from "react";
import Link from "next/link";
import { AdminMenuItems, ControllerMenuItems } from "@/constants";
import { usePathname } from "next/navigation";
export default function NavbarPanel() {
const pathname = usePathname();
return (
<div className="fixed flex flex-col-reverse justify-between items-start gap-3
sm:flex-row sm:items-center sm:gap-0
w-full px-8 py-2 z-10 bg-blue max-md:px-4
">
<div className=" flex items-center gap-8 max-md:gap-4">
<p className="text-white inline-block bg-clip-text text-lg font-bold max-md:text-base max-md:font-medium">
پنل کاربری |
</p>
<div className="flex flex-row gap-7 max-md:gap-3">
{/* {ControllerMenuItems.map((item) => {
return (
<Link key={item.id} href={item.href}>
<p className="text-white font-normal text-sm max-md:text-xs
hover:bg-white/50 rounded-sm p-1
animate-out duration-300 ">{item.name}</p>
</Link>
);
})} */}
{AdminMenuItems.map((item) => {
return (
<Link key={item.id} href={item.href}>
<p className="text-white font-normal text-sm max-md:text-xs
hover:bg-white/50 rounded-sm p-1
animate-out duration-300 ">{item.name}</p>
</Link>
);
})}
</div>
</div>
<h1 className="text-white inline-block bg-clip-text before:max-md:hidden text-sm font-bold max-md:text-xs max-md:font-medium">
نام و نام خانوادگی (بازرس)
</h1>
</div>
);
}

View File

@ -1,104 +0,0 @@
"use client";
import React from "react";
import { useRef } from "react";
import { useState, useEffect } from "react";
// import { useClickAway } from "react-use/lib/useClickAway";
import { AnimatePresence, motion } from "framer-motion";
import { Squash as Hamburger } from "hamburger-react";
import { menuItems } from "@/constants";
import Link from "next/link";
import { Button } from "./ui/button";
import TopNav from "./TopNav";
import { usePathname } from "next/navigation";
// import { routes } from "../routes";
export default function NavbarSm() {
const pathname = usePathname();
// useClickAway(ref, () => setOpen(false));
const [isOpen, setOpen] = useState(false);
const ref = useRef(null);
// resize
function getSize() {
return {
width: window.innerWidth,
};
}
const [windowSize, setWindowSize] = useState(getSize);
useEffect(() => {
function handleResize() {
setWindowSize(getSize());
}
window.addEventListener("resize", handleResize);
return () => window.removeEventListener("resize", handleResize);
}, [windowSize]);
return (
<>
<div
ref={ref}
className={`md:hidden w-full bg-white z-[100] flex flex-row justify-between items-center px-4
sticky top-0
shadow-md`}
>
<Hamburger toggled={isOpen} size={20} toggle={setOpen} />
{/* <Link href="/Login">
<Button className=" bg-blue hover:bg-blue/90 rounded-lg text-xs ">
ورود به پنل کاربری
</Button>
</Link> */}
{window.innerWidth <= 768 ? <TopNav /> : <></>}
<AnimatePresence>
{isOpen && (
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
transition={{ duration: 0.2 }}
className="fixed z-[100] left-0 shadow-4xl right-0 top-[3rem] p-5 bg-gradient-to-b from-blue to-white border-b border-b-white/20"
>
<ul className="grid gap-2 ">
{menuItems.map((item, idx, array) => {
// const { Icon } = item;
const lastItem = array.length - 1;
return (
<motion.li
initial={{ scale: 0, opacity: 0 }}
animate={{ scale: 1, opacity: 1 }}
transition={{
type: "spring",
stiffness: 260,
damping: 20,
delay: 0.1 + idx / 10,
}}
key={item.name}
className=" w-full p-[0.08rem] rounded-xl bg-gradient-to-tr from-neutral-800 via-white to-neutral-700"
>
<Link
onClick={() => setOpen((prev) => !prev)}
className={`flex items-center justify-between w-full p-3 rounded-xl text-white
${lastItem === idx ? "bg-yellow" : "bg-blue"} `}
href={item.href}
>
<span className="flex gap-1 text-sm">{item.name}</span>
{/* <Icon className="text-xl" /> */}
</Link>
</motion.li>
);
})}
</ul>
</motion.div>
)}
</AnimatePresence>
</div>
</>
);
}

View File

@ -1,37 +0,0 @@
"use client"
import React from 'react';
import { Chart as ChartJS, ArcElement, Tooltip, Legend } from 'chart.js';
import { Pie } from 'react-chartjs-2';
ChartJS.register(ArcElement, Tooltip, Legend);
export const data = {
labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],
datasets: [
{
label: '# of Votes',
data: [12, 19, 3, 5, 2, 3],
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)',
],
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,
},
],
};
export function PieChart() {
return <Pie data={data} />;
}

View File

@ -1,106 +0,0 @@
"use client"
import React from "react";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import LineChart from "./LineChart";
import { BsBarChartLineFill } from "react-icons/bs";
import { BsBarChartLine } from "react-icons/bs";
import { VerticalChart } from "./VerticalChart";
import { HorizontalChart } from "./HorizontalChart";
export default function ReportsController() {
return (
<div className="w-[95vw] lg:w-[85vw] 3xl:w-[70vw] mt-8 max-sm:mt-16 pt-9">
<Tabs
defaultValue="tab1"
className="w-full flex flex-col md:flex-row gap-16"
dir="rtl"
>
<div className="w-full md:w-1/4 flex flex-col justify-between items-center ">
{/* Tab Title */}
<TabsList className="w-full h-full flex flex-row md:flex-col max-md:flex-wrap max-md:justify-between bg-transparent gap-4">
<TabsTrigger
className="w-[45%] md:w-full h-12 bg-muted text-[#555353] shadow-md hover:shadow-none text-sm md:text-lg font-bold py-3 gap-2 justify-start"
value="tab1"
>
{" "}
<BsBarChartLineFill /> نمودار شماره یک
</TabsTrigger>
<TabsTrigger
className="w-[45%] md:w-full h-12 bg-muted text-[#555353] shadow-md hover:shadow-none text-sm md:text-lg font-bold py-3 gap-2 justify-start"
value="tab2"
>
{" "}
<BsBarChartLineFill /> نمودار شماره 2
</TabsTrigger>
<TabsTrigger
className="w-[45%] md:w-full h-12 bg-muted text-[#555353] shadow-md hover:shadow-none text-sm md:text-lg font-bold py-3 gap-2 justify-start"
value="tab3"
>
{" "}
<BsBarChartLineFill /> نمودار شماره 3
</TabsTrigger>
<TabsTrigger
className="w-[45%] md:w-full h-12 bg-muted text-[#555353] shadow-md hover:shadow-none text-sm md:text-lg font-bold py-3 gap-2 justify-start"
value="tab4"
>
{" "}
<BsBarChartLineFill /> نمودار شماره 4
</TabsTrigger>
<TabsTrigger
className="w-[45%] md:w-full h-12 bg-muted text-[#555353] shadow-md hover:shadow-none text-sm md:text-lg font-bold py-3 gap-2 justify-start"
value="tab5"
>
{" "}
<BsBarChartLineFill /> نمودار شماره 5
</TabsTrigger>
<TabsTrigger
className="w-[45%] md:w-full h-12 bg-muted text-[#555353] shadow-md hover:shadow-none text-sm md:text-lg font-bold py-3 gap-2 justify-start"
value="tab6"
>
{" "}
<BsBarChartLineFill /> نمودار شماره 6
</TabsTrigger>
<TabsTrigger
className="w-[45%] md:w-full h-12 bg-muted text-[#555353] shadow-md hover:shadow-none text-sm md:text-lg font-bold py-3 gap-2 justify-start"
value="tab7"
>
{" "}
<BsBarChartLineFill /> نمودار شماره 7
</TabsTrigger>
<TabsTrigger
className="w-[45%] md:w-full h-12 bg-muted text-[#555353] shadow-md hover:shadow-none text-sm md:text-lg font-bold py-3 gap-2 justify-start"
value="tab8"
>
{" "}
<BsBarChartLineFill /> نمودار شماره 8
</TabsTrigger>
</TabsList>
</div>
<div className="w-full md:w-3/4 flex justify-between items-center ">
{/* Tab Content */}
<TabsContent value="tab1" className="w-full h-full ">
<VerticalChart />
</TabsContent>
<TabsContent value="tab2" className="w-full h-full ">
<HorizontalChart />
</TabsContent>
<TabsContent value="tab3" className="w-full h-full ">
<LineChart />
</TabsContent>
<TabsContent value="tab4" className="w-full h-full ">
<HorizontalChart />
</TabsContent>
</div>
</Tabs>
</div>
);
}

View File

@ -19,10 +19,24 @@ import { Input } from "@/components/ui/input";
import { toast } from "@/components/ui/use-toast"; import { toast } from "@/components/ui/use-toast";
import { Textarea } from "@/components/ui/textarea"; import { Textarea } from "@/components/ui/textarea";
import Image from "next/image";
import LoginIcon from "../public/img/login-icon.svg";
import Link from "next/link"; import Link from "next/link";
import RequestResult from "./RequestResult"; import Result from "./RequestResult";
const FormSchema = z.object({ const FormSchema = z.object({
firstName: z.string().min(2, {
message: "firstName must be at least 2 characters.",
}),
lastName: z.string().min(2, {
message: "lastName must be at least 2 characters.",
}),
nationalCode: z.number().min(10, {
message: "nationalCode must be at least 10 characters.",
}),
phoneNumber: z.number().min(11, {
message: "phoneNumber must be at least 11 characters.",
}),
subject: z.string().min(2, { subject: z.string().min(2, {
message: "subject must be at least 2 characters.", message: "subject must be at least 2 characters.",
}), }),
@ -42,10 +56,14 @@ const FormSchema = z.object({
}), }),
}); });
export default function RequestStep2() { export default function Request() {
const form = useForm<z.infer<typeof FormSchema>>({ const form = useForm<z.infer<typeof FormSchema>>({
resolver: zodResolver(FormSchema), resolver: zodResolver(FormSchema),
defaultValues: { defaultValues: {
firstName: "",
lastName: "",
// nationalCode: ,
// phoneNumber: ,
subject: "", subject: "",
organisation: "", organisation: "",
person: "", person: "",
@ -66,17 +84,91 @@ export default function RequestStep2() {
} }
return ( return (
<div className="w-full h-full sm:w-2/3 md:w-2/4 max-sm:p-8 pt-12"> <div className="w-full h-full sm:w-2/3 md:w-2/4 max-sm:p-4 ">
<div className="space-y-3 md:space-y-4 h-full flex flex-col justify-center"> <div className="space-y-3 md:space-y-4 h-full flex flex-col justify-center">
<p className="text-sm md:text-base font-bold leading-tight tracking-tight text-blue dark:text-white"> <p className="text-base font-bold leading-tight tracking-tight text-blue dark:text-white">
لطفا جهت ارسال درخواست فرم زیر را تکمیل نمایید. لطفا جهت ارسال درخواست فرم زیر را تکمیل نمایید.
</p> </p>
<Form {...form}> <Form {...form}>
<form <form
onSubmit={form.handleSubmit(onSubmit)} onSubmit={form.handleSubmit(onSubmit)}
className="w-full flex flex-col mt-6" className="w-full flex flex-col "
> >
<div className="flex flex-row flex-wrap justify-between">
<FormField
control={form.control}
name="firstName"
render={({ field }) => (
<FormItem className="w-full sm:w-[48%]">
<FormLabel className="text-[#7C838A] text-sm font-medium">
نام
</FormLabel>
<FormControl>
<Input placeholder="نام خود را وارد نمایید" {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="lastName"
render={({ field }) => (
<FormItem className="w-full sm:w-[48%] ">
<FormLabel className="text-[#7C838A] text-sm font-medium">
نام خانوادگی
</FormLabel>
<FormControl>
<Input
placeholder="نام خانوادگی خود را وارد نمایید"
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="nationalCode"
render={({ field }) => (
<FormItem className="w-full sm:w-[48%]">
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
کد ملی
</FormLabel>
<FormControl>
<Input
type="number"
placeholder="کد ملی خود را وارد نمایید "
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="phoneNumber"
render={({ field }) => (
<FormItem className=" w-full sm:w-[48%]">
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
شماره تماس
</FormLabel>
<FormControl>
<Input
type="number"
placeholder="شماره تماس خود را وارد نمایید "
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
</div>
<FormField <FormField
control={form.control} control={form.control}
@ -158,11 +250,8 @@ export default function RequestStep2() {
<div className="flex justify-center sm:justify-end gap-2 w-full mt-8"> <div className="flex justify-center sm:justify-end gap-2 w-full mt-8">
{/* <Button> */} {/* <Button> */}
<Link <Link href="/RequestResult" type="submit"
href="/RequestResult" className="w-1/2 sm:w-1/3 lg:w-1/4 bg-blue text-white p-2 rounded-xl text-center">
type="submit"
className="w-1/2 sm:w-1/3 lg:w-1/4 bg-blue text-white p-2 rounded-xl text-center"
>
ارسال درخواست ارسال درخواست
</Link> </Link>
{/* </Button> */} {/* </Button> */}

View File

@ -4,7 +4,7 @@ import Resultimg from "../public/img/result.png";
export default function Result() { export default function Result() {
return ( return (
<div className="w-full h-full sm:w-2/3 md:w-3/4 lg:w-1/2 max-sm:p-8 pt-12 "> <div className="w-full h-full sm:w-2/3 md:w-3/4 lg:w-1/2 max-sm:p-4 ">
<div className="h-full flex flex-col justify-center"> <div className="h-full flex flex-col justify-center">
<p className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white <p className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white

View File

@ -1,166 +0,0 @@
"use client";
import React from "react";
import { zodResolver } from "@hookform/resolvers/zod";
import { useForm } from "react-hook-form";
import * as z from "zod";
import { Button } from "@/components/ui/button";
import {
Form,
FormControl,
FormDescription,
FormField,
FormItem,
FormLabel,
FormMessage,
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { toast } from "@/components/ui/use-toast";
import Link from "next/link";
import RequestStep2 from "./RequestStep2";
const FormSchema = z.object({
firstName: z.string().min(2, {
message: "firstName must be at least 2 characters.",
}),
lastName: z.string().min(2, {
message: "lastName must be at least 2 characters.",
}),
nationalCode: z.number().min(10, {
message: "nationalCode must be at least 10 characters.",
}),
phoneNumber: z.number().min(11, {
message: "phoneNumber must be at least 11 characters.",
}),
});
export default function RequestStep1() {
const form = useForm<z.infer<typeof FormSchema>>({
resolver: zodResolver(FormSchema),
defaultValues: {
firstName: "",
lastName: "",
// nationalCode: ,
// phoneNumber: ,
},
});
function onSubmit(data: z.infer<typeof FormSchema>) {
toast({
title: "You submitted the following values:",
description: (
<pre className="mt-2 w-[340px] rounded-md bg-slate-950 p-4">
<code className="text-white">{JSON.stringify(data, null, 2)}</code>
</pre>
),
});
console.log(data);
}
return (
<div className="w-full h-full sm:w-2/3 md:w-2/4 max-sm:p-8 pt-12">
<div className="space-y-4 md:space-y-4 h-full flex flex-col justify-center">
<p className="text-sm md:text-base font-bold leading-tight tracking-tight text-blue dark:text-white">
لطفا جهت ارسال درخواست فرم زیر را تکمیل نمایید.
</p>
<p className="text-sm md:text-base font-bold leading-tight tracking-tight text-red dark:text-white">
در صورت عدم تمایل به ثبت مشخصات شخصی می توانید به صفحه ی بعد مراجعه کنید.
</p>
<Form {...form}>
<form
onSubmit={form.handleSubmit(onSubmit)}
className="w-full flex flex-col mt-6 "
>
<div className="flex flex-row flex-wrap justify-between">
<FormField
control={form.control}
name="firstName"
render={({ field }) => (
<FormItem className="w-full sm:w-[48%]">
<FormLabel className="text-[#7C838A] text-sm font-medium">
نام
</FormLabel>
<FormControl>
<Input placeholder="نام خود را وارد نمایید" {...field} />
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="lastName"
render={({ field }) => (
<FormItem className="w-full sm:w-[48%] ">
<FormLabel className="text-[#7C838A] text-sm font-medium">
نام خانوادگی
</FormLabel>
<FormControl>
<Input
placeholder="نام خانوادگی خود را وارد نمایید"
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="nationalCode"
render={({ field }) => (
<FormItem className="w-full sm:w-[48%]">
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
کد ملی
</FormLabel>
<FormControl>
<Input
type="number"
placeholder="کد ملی خود را وارد نمایید "
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
<FormField
control={form.control}
name="phoneNumber"
render={({ field }) => (
<FormItem className=" w-full sm:w-[48%]">
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
شماره تماس
</FormLabel>
<FormControl>
<Input
type="number"
placeholder="شماره تماس خود را وارد نمایید "
{...field}
/>
</FormControl>
<FormMessage />
</FormItem>
)}
/>
</div>
<div className="flex justify-center sm:justify-end gap-2 w-full mt-8">
{/* <Button> */}
<Link
href="/RequestStep2"
type="submit"
className="w-1/2 sm:w-1/3 lg:w-1/4 bg-blue text-white p-2 rounded-xl text-center"
>
صفحه ی بعد
</Link>
{/* </Button> */}
</div>
</form>
</Form>
</div>
</div>
);
}

View File

@ -1,113 +0,0 @@
"use client";
import React, { useState, useEffect } from "react";
import { Input } from "./ui/input";
import { Label } from "./ui/label";
import { Button } from "./ui/button";
import { CiSearch } from "react-icons/ci";
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
import { IoMdClose } from "react-icons/io";
export default function Search({mode}:{mode:string}) {
// resize
function getSize() {
return {
width: window.innerWidth,
};
}
const [windowSize, setWindowSize] = useState(getSize);
useEffect(() => {
function handleResize() {
setWindowSize(getSize());
}
window.addEventListener("resize", handleResize);
return () => window.removeEventListener("resize", handleResize);
}, [windowSize]);
return (
<div>
{window.innerWidth >= 768 || mode === 'controller' || mode === 'admin'? (
<div className=" relative flex bg-gray-300 rounded-xl items-center">
<Input
// type="search"
id="default-search"
className={`mb-0 h-8 bg-[#D6D8DE66] border-none focus-visible:none rounded-lg
block w-full min-w-[13rem] lg:min-w-[16rem] text-xs text-black
text-opacity-60 dark:text-white
${mode === 'controller' && 'h-12 max-lg:min-w-[95vw]'}
${mode === 'admin' && 'w-full min-w-full bg-white lg:min-w-full h-11'}
`}
placeholder="جستجو..."
required
/>
{/* <Button
className="absolute left-0 bg-transparent h-auto w-auto text-slate-800"
>
<CiSearch />
</Button> */}
<button className="absolute left-3">
<CiSearch />
</button>
</div>
) : (
<div className="">
<AlertDialog>
<AlertDialogTrigger asChild>
<button
// variant="outline"
// type="submit"
className=" bg-gradient2 text-white font-bold rounded-md p-1"
>
<CiSearch />
</button>
</AlertDialogTrigger>
<AlertDialogContent className=" h-1/5 min-w-[80%] max-w-fit">
<AlertDialogHeader className="w-full" >
<AlertDialogTitle className=" py-1">
<p className="text-[#464646] text-base font-bold">
فرم جستجو
</p>
<AlertDialogCancel className="p-0 border-0 h-auto">
<IoMdClose />
</AlertDialogCancel>
</AlertDialogTitle>
<AlertDialogDescription className="justify-center sm:px-14 sm:py-6">
<Input
// type="search"
id="default-search"
className="mb-0 h-12 bg-gray border-none focus-visible:none rounded-lg
block w-full min-w-[13rem] lg:min-w-[16rem] text-xs text-black text-opacity-60 dark:text-white "
placeholder="جستجو..."
required
/>
<button className="absolute left-16 text-black">
<CiSearch />
</button>
</AlertDialogDescription>
</AlertDialogHeader>
</AlertDialogContent>
</AlertDialog>
</div>
)}
</div>
);
}

View File

@ -1,45 +0,0 @@
import React from "react";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import TableController from "./TableController";
import Search from "./Search";
export default function TabController() {
return (
<div className="w-[95vw] lg:w-[82vw] xl:w-[70vw] 3xl:w-[65vw] mt-8 pt-9">
<Tabs defaultValue="tab1" className="" dir="rtl">
<div className="w-full flex flex-col-reverse lg:flex-row gap-4 lg:gap-12 justify-between items-center mt-6 md:mt-12 mb-10">
{/* Tab Title */}
<TabsList className="w-full lg:w-2/3 flex gap-1 md:gap-4 lg:gap-7">
<p className="3xl:ml-6 text-xs sm:text-sm font-bold">لیست شکایت ها |</p>
<TabsTrigger value="tab1" className="hover:border-b-2 border-b-blue">جدید (2)</TabsTrigger>
<TabsTrigger value="tab2" className="hover:border-b-2 border-b-blue">در انتظار پاسخ</TabsTrigger>
<TabsTrigger value="tab3" className="hover:border-b-2 border-b-blue">در حال بررسی</TabsTrigger>
<TabsTrigger value="tab4" className="hover:border-b-2 border-b-blue">پایان یافته </TabsTrigger>
</TabsList>
{/* Search Box */}
<Search mode='controller'/>
</div>
{/* Tab Content */}
<TabsContent value="tab1" >
<TableController />
</TabsContent>
<TabsContent value="tab2">
<p>password2</p>
</TabsContent>
<TabsContent value="tab3">
<p>password3</p>
</TabsContent>
<TabsContent value="tab4">
<p>password4</p>
</TabsContent>
</Tabs>
</div>
);
}

View File

@ -1,63 +0,0 @@
import React from "react";
import {
Table,
TableBody,
TableCaption,
TableCell,
TableHead,
TableHeader,
TableRow,
} from "@/components/ui/table";
import { AdminTableItems } from "@/constants";
import Link from "next/link";
import { BiEditAlt } from "react-icons/bi";
import { HiOutlineTrash } from "react-icons/hi";
export default function TableAdmin() {
return (
<Table className="border-[1px] border-solid border-muted rounded-md ">
{/* <TableCaption>A list of your recent invoices.</TableCaption> */}
<TableHeader>
<TableRow className="bg-[#EFF4FA] ">
<TableHead className="text-[#8F9BB3] text-right pr-4">نام و نام خانوادگی</TableHead>
<TableHead className="text-[#8F9BB3] text-right">نقش کاربر</TableHead>
<TableHead className="text-[#8F9BB3] text-right">تاریخ عضویت</TableHead>
<TableHead className="text-[#8F9BB3] text-right">توضیحات</TableHead>
<TableHead className="text-[#8F9BB3] text-right">ویرایش</TableHead>
</TableRow>
</TableHeader>
<TableBody className="bg-white ">
{AdminTableItems.map((item) => {
return (
<TableRow key={item.id}>
<Link
href={`#`}
className="contents h-14"
>
<TableCell className="w-3/12 font-medium text-black text-right pr-4">
{item.name}
<p className="text-slate-500 text-xs">{item.phone}</p>
</TableCell>
<TableCell className="w-2/12 text-black text-right">
<p className="bg-blue rounded-lg text-white w-1/2 text-center">
{item.useRole}
</p>
</TableCell>
<TableCell className="w-2/12 text-black text-right">
{item.date}
</TableCell>
<TableCell className="w-4/12 text-black text-right">
{item.desc}
</TableCell>
<TableCell className="w-1/12 min-w-full flex gap-2 pt-4 text-muted-foreground text-right">
<HiOutlineTrash size="20px"/>
<BiEditAlt size="20px"/>
</TableCell>
</Link>
</TableRow>
);
})}
</TableBody>
</Table>
);
}

View File

@ -1,45 +0,0 @@
import React from "react";
import {
Table,
TableBody,
TableCaption,
TableCell,
TableHead,
TableHeader,
TableRow,
} from "@/components/ui/table";
import { ControllerTableItems } from "@/constants";
import Link from "next/link";
export default function TableController() {
return (
<Table className="border-[1px] border-solid border-muted rounded-md ">
{/* <TableCaption>A list of your recent invoices.</TableCaption> */}
<TableHeader>
<TableRow>
<TableHead>ردیف</TableHead>
<TableHead>تاریخ</TableHead>
<TableHead>موضوع</TableHead>
<TableHead>دستگاه مربوطه</TableHead>
</TableRow>
</TableHeader>
<TableBody className="bg-[#F5F5F5]">
{ControllerTableItems.map((item) => {
return (
<TableRow key={item.id}>
<Link
href={`/UserPanel/ControllerDashboard/Complaints/${item.id}`}
className="contents "
>
<TableCell className="w-1/12 font-medium ">{item.id}</TableCell>
<TableCell className="w-2/12">{item.date}</TableCell>
<TableCell className="w-2/12">{item.title}</TableCell>
<TableCell className="w-7/12">{item.content}</TableCell>
</Link>
</TableRow>
);
})}
</TableBody>
</Table>
);
}

View File

@ -1,65 +0,0 @@
"use client";
import React from "react";
import { Input } from "./ui/input";
import Link from "next/link";
import Search from "./Search";
import { usePathname } from 'next/navigation'
export default function TopNav() {
const pathname = usePathname()
return (
<div className={`flex justify-between items-center w-full px-8 py-2 z-10 border-b-[#C9CFD7] border-b-[1px] border-solid
max-md:bg-gray max-md:bg-transparent max-md:px-0 max-md:justify-end max-md:border-b-0
${pathname === "/" ? "bg-transparent" : "bg-white"} `}>
<h1 className="bg-gradient-to-r from-gradient1 to-gradient2 inline-block text-transparent bg-clip-text
max-md:hidden">
سال 1402 | مهارم تورم، رشد تولید
</h1>
{/* <p>Current pathname: {pathname}</p> */}
<div className="flex items-center gap-10">
<div className=" flex items-center gap-3 md:ml-4">
<p className="bg-gradient-to-r from-gradient1 to-gradient2 inline-block text-transparent bg-clip-text text-sm max-md:text-xs">
امروز: چهارشنبه 24 آبان 1402
</p>
<svg
className="max-md:hidden"
xmlns="http://www.w3.org/2000/svg"
width="18"
height="19"
viewBox="0 0 18 19"
fill="none"
>
<g clip-path="url(#clip0_113_99)">
<path
d="M11.2875 4.25C12.02 4.39292 12.6932 4.75119 13.221 5.27895C13.7488 5.80671 14.107 6.47995 14.2499 7.2125L11.2875 4.25ZM11.2875 1.25C12.8094 1.41908 14.2286 2.10063 15.3121 3.18276C16.3956 4.26488 17.079 5.68326 17.2499 7.205L11.2875 1.25ZM16.4999 13.19V15.44C16.5008 15.6489 16.458 15.8556 16.3743 16.047C16.2907 16.2384 16.1679 16.4102 16.014 16.5514C15.8601 16.6926 15.6784 16.8001 15.4805 16.867C15.2826 16.9339 15.073 16.9588 14.8649 16.94C12.5571 16.6892 10.3402 15.9006 8.39245 14.6375C6.58032 13.486 5.04395 11.9496 3.89245 10.1375C2.62493 8.1809 1.83613 5.95325 1.58995 3.635C1.57121 3.4276 1.59586 3.21857 1.66233 3.02122C1.72879 2.82387 1.83563 2.64252 1.97602 2.48872C2.11642 2.33491 2.2873 2.21203 2.47779 2.12789C2.66828 2.04375 2.87421 2.0002 3.08245 2H5.33245C5.69643 1.99642 6.04929 2.12531 6.32527 2.36265C6.60125 2.59999 6.78151 2.92959 6.83245 3.29C6.92742 4.01005 7.10354 4.71705 7.35745 5.3975C7.45836 5.66594 7.4802 5.95769 7.42038 6.23816C7.36056 6.51863 7.2216 6.77608 7.01995 6.98L6.06745 7.9325C7.13512 9.81016 8.68979 11.3648 10.5675 12.4325L11.5199 11.48C11.7239 11.2784 11.9813 11.1394 12.2618 11.0796C12.5423 11.0198 12.834 11.0416 13.1024 11.1425C13.7829 11.3964 14.4899 11.5725 15.21 11.6675C15.5743 11.7189 15.907 11.9024 16.1448 12.1831C16.3827 12.4638 16.5091 12.8222 16.4999 13.19Z"
stroke="black"
stroke-linecap="round"
stroke-linejoin="round"
/>
</g>
<defs>
<clipPath id="clip0_113_99">
<rect
width="18"
height="18"
fill="white"
transform="translate(0 0.5)"
/>
</clipPath>
</defs>
</svg>
</div>
<Search/>
</div>
</div>
);
}

View File

@ -1,60 +0,0 @@
"use client"
import React from 'react';
import {
Chart as ChartJS,
CategoryScale,
LinearScale,
BarElement,
Title,
Tooltip,
Legend,
} from 'chart.js';
import { Bar } from 'react-chartjs-2';
import { faker } from "@faker-js/faker";
ChartJS.register(
CategoryScale,
LinearScale,
BarElement,
Title,
Tooltip,
Legend
);
export const options = {
responsive: true,
plugins: {
legend: {
position: 'top' as const,
},
title: {
display: true,
text: 'Chart.js Bar Chart',
},
},
};
const labels = ['January', 'February', 'March', 'April', 'May', 'June', 'July'];
export const data = {
labels,
datasets: [
{
label: 'Dataset 1',
data: labels.map(() => faker.datatype.number({ min: 0, max: 1000 })),
backgroundColor: 'rgba(255, 99, 132, 0.5)',
},
{
label: 'Dataset 2',
data: labels.map(() => faker.datatype.number({ min: 0, max: 1000 })),
backgroundColor: 'rgba(53, 162, 235, 0.5)',
},
],
};
export function VerticalChart() {
return (
<Bar options={options} data={data} className='!w-full !h-full'/>
)
}

View File

@ -39,7 +39,7 @@ const AlertDialogContent = React.forwardRef<
`fixed left-[50%] top-[50%] z-50 grid w-full max-w-4xl translate-x-[-50%] translate-y-[-50%] gap-4 border duration-200 `fixed left-[50%] top-[50%] z-50 grid w-full max-w-4xl translate-x-[-50%] translate-y-[-50%] gap-4 border duration-200
data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95
data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2
data-[state=open]:slide-in-from-top-[48%] rounded-lg data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg
h-full max-h-[32em] content-between p-0 bg-opacity-30 bg-[#FFFFF999] filter h-full max-h-[32em] content-between p-0 bg-opacity-30 bg-[#FFFFF999] filter
shadow-[0px_0px_30px_0px_rgba(0,0,0,0.3)] shadow-[0px_0px_30px_0px_rgba(0,0,0,0.3)]
`, `,

View File

@ -1,205 +0,0 @@
"use client"
import * as React from "react"
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
import {
CheckIcon,
ChevronRightIcon,
DotFilledIcon,
} from "@radix-ui/react-icons"
import { cn } from "@/lib/utils"
const DropdownMenu = DropdownMenuPrimitive.Root
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger
const DropdownMenuGroup = DropdownMenuPrimitive.Group
const DropdownMenuPortal = DropdownMenuPrimitive.Portal
const DropdownMenuSub = DropdownMenuPrimitive.Sub
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup
const DropdownMenuSubTrigger = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
inset?: boolean
}
>(({ className, inset, children, ...props }, ref) => (
<DropdownMenuPrimitive.SubTrigger
ref={ref}
className={cn(
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
inset && "pl-8",
className
)}
{...props}
>
{children}
<ChevronRightIcon className="ml-auto h-4 w-4" />
</DropdownMenuPrimitive.SubTrigger>
))
DropdownMenuSubTrigger.displayName =
DropdownMenuPrimitive.SubTrigger.displayName
const DropdownMenuSubContent = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
>(({ className, ...props }, ref) => (
<DropdownMenuPrimitive.SubContent
ref={ref}
className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className
)}
{...props}
/>
))
DropdownMenuSubContent.displayName =
DropdownMenuPrimitive.SubContent.displayName
const DropdownMenuContent = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
>(({ className, sideOffset = 4, ...props }, ref) => (
<DropdownMenuPrimitive.Portal>
<DropdownMenuPrimitive.Content
ref={ref}
sideOffset={sideOffset}
className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className
)}
{...props}
/>
</DropdownMenuPrimitive.Portal>
))
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName
const DropdownMenuItem = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
inset?: boolean
}
>(({ className, inset, ...props }, ref) => (
<DropdownMenuPrimitive.Item
ref={ref}
className={cn(
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
inset && "pl-8",
className
)}
{...props}
/>
))
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName
const DropdownMenuCheckboxItem = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>
>(({ className, children, checked, ...props }, ref) => (
<DropdownMenuPrimitive.CheckboxItem
ref={ref}
className={cn(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className
)}
checked={checked}
{...props}
>
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
<DropdownMenuPrimitive.ItemIndicator>
<CheckIcon className="h-4 w-4" />
</DropdownMenuPrimitive.ItemIndicator>
</span>
{children}
</DropdownMenuPrimitive.CheckboxItem>
))
DropdownMenuCheckboxItem.displayName =
DropdownMenuPrimitive.CheckboxItem.displayName
const DropdownMenuRadioItem = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>
>(({ className, children, ...props }, ref) => (
<DropdownMenuPrimitive.RadioItem
ref={ref}
className={cn(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className
)}
{...props}
>
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
<DropdownMenuPrimitive.ItemIndicator>
<DotFilledIcon className="h-4 w-4 fill-current" />
</DropdownMenuPrimitive.ItemIndicator>
</span>
{children}
</DropdownMenuPrimitive.RadioItem>
))
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName
const DropdownMenuLabel = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.Label>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
inset?: boolean
}
>(({ className, inset, ...props }, ref) => (
<DropdownMenuPrimitive.Label
ref={ref}
className={cn(
"px-2 py-1.5 text-sm font-semibold",
inset && "pl-8",
className
)}
{...props}
/>
))
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName
const DropdownMenuSeparator = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
>(({ className, ...props }, ref) => (
<DropdownMenuPrimitive.Separator
ref={ref}
className={cn("-mx-1 my-1 h-px bg-muted", className)}
{...props}
/>
))
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName
const DropdownMenuShortcut = ({
className,
...props
}: React.HTMLAttributes<HTMLSpanElement>) => {
return (
<span
className={cn("ml-auto text-xs tracking-widest opacity-60", className)}
{...props}
/>
)
}
DropdownMenuShortcut.displayName = "DropdownMenuShortcut"
export {
DropdownMenu,
DropdownMenuTrigger,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuCheckboxItem,
DropdownMenuRadioItem,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuShortcut,
DropdownMenuGroup,
DropdownMenuPortal,
DropdownMenuSub,
DropdownMenuSubContent,
DropdownMenuSubTrigger,
DropdownMenuRadioGroup,
}

View File

@ -1,120 +0,0 @@
import * as React from "react"
import { cn } from "@/lib/utils"
const Table = React.forwardRef<
HTMLTableElement,
React.HTMLAttributes<HTMLTableElement>
>(({ className, ...props }, ref) => (
<div className="relative w-full overflow-auto">
<table
ref={ref}
className={cn("w-full caption-bottom text-sm", className)}
{...props}
/>
</div>
))
Table.displayName = "Table"
const TableHeader = React.forwardRef<
HTMLTableSectionElement,
React.HTMLAttributes<HTMLTableSectionElement>
>(({ className, ...props }, ref) => (
<thead ref={ref} className={cn("[&_tr]:border-b border-b-2", className)} {...props} />
))
TableHeader.displayName = "TableHeader"
const TableBody = React.forwardRef<
HTMLTableSectionElement,
React.HTMLAttributes<HTMLTableSectionElement>
>(({ className, ...props }, ref) => (
<tbody
ref={ref}
className={cn("[&_tr:last-child]:border-0", className)}
{...props}
/>
))
TableBody.displayName = "TableBody"
const TableFooter = React.forwardRef<
HTMLTableSectionElement,
React.HTMLAttributes<HTMLTableSectionElement>
>(({ className, ...props }, ref) => (
<tfoot
ref={ref}
className={cn(
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
className
)}
{...props}
/>
))
TableFooter.displayName = "TableFooter"
const TableRow = React.forwardRef<
HTMLTableRowElement,
React.HTMLAttributes<HTMLTableRowElement>
>(({ className, ...props }, ref) => (
<tr
ref={ref}
className={cn(
"border-b transition-colors data-[state=selected]:bg-muted h-12",
className
)}
{...props}
/>
))
TableRow.displayName = "TableRow"
const TableHead = React.forwardRef<
HTMLTableCellElement,
React.ThHTMLAttributes<HTMLTableCellElement>
>(({ className, ...props }, ref) => (
<th
ref={ref}
className={cn(
"h-10 px-2 text-center align-middle font-medium text-black [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
className
)}
{...props}
/>
))
TableHead.displayName = "TableHead"
const TableCell = React.forwardRef<
HTMLTableCellElement,
React.TdHTMLAttributes<HTMLTableCellElement>
>(({ className, ...props }, ref) => (
<td
ref={ref}
className={cn(
"p-2 text-center text-muted-foreground align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
className
)}
{...props}
/>
))
TableCell.displayName = "TableCell"
const TableCaption = React.forwardRef<
HTMLTableCaptionElement,
React.HTMLAttributes<HTMLTableCaptionElement>
>(({ className, ...props }, ref) => (
<caption
ref={ref}
className={cn("mt-4 text-sm text-muted-foreground", className)}
{...props}
/>
))
TableCaption.displayName = "TableCaption"
export {
Table,
TableHeader,
TableBody,
TableFooter,
TableHead,
TableRow,
TableCell,
TableCaption,
}

View File

@ -1,55 +0,0 @@
"use client"
import * as React from "react"
import * as TabsPrimitive from "@radix-ui/react-tabs"
import { cn } from "@/lib/utils"
const Tabs = TabsPrimitive.Root
const TabsList = React.forwardRef<
React.ElementRef<typeof TabsPrimitive.List>,
React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
>(({ className, ...props }, ref) => (
<TabsPrimitive.List
ref={ref}
className={cn(
"inline-flex h-14 items-center justify-start rounded-md bg-[#E9E9E9] p-2 text-muted-foreground",
className
)}
{...props}
/>
))
TabsList.displayName = TabsPrimitive.List.displayName
const TabsTrigger = React.forwardRef<
React.ElementRef<typeof TabsPrimitive.Trigger>,
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
>(({ className, ...props }, ref) => (
<TabsPrimitive.Trigger
ref={ref}
className={cn(
"inline-flex items-center justify-center h-full whitespace-nowrap rounded-sm px-1 sm:px-3 py-1.5 text-xs sm:text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-blue data-[state=active]:text-white data-[state=active]:shadow-sm",
className
)}
{...props}
/>
))
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName
const TabsContent = React.forwardRef<
React.ElementRef<typeof TabsPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
>(({ className, ...props }, ref) => (
<TabsPrimitive.Content
ref={ref}
className={cn(
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
className
)}
{...props}
/>
))
TabsContent.displayName = TabsPrimitive.Content.displayName
export { Tabs, TabsList, TabsTrigger, TabsContent }

View File

@ -1,41 +1,15 @@
import { LuMapPin } from "react-icons/lu";
import { HiOutlineMail } from "react-icons/hi";
import { FiPhone } from "react-icons/fi";
export const menuItems = [ export const menuItems = [
{ id: 1, name: "صفحه اصلی", href: "/" }, { id: 1, name: "صفحه اصلی" },
{ id: 2, name: "اخبار", href: "/" }, { id: 2, name: "اخبار" },
{ id: 3, name: "درباره ما", href: "/" }, { id: 3, name: "درباره ما" },
{ id: 4, name: "تماس با ما", href: "/CallUs" }, { id: 4, name: "تماس با ما" },
{ id: 5, name: "پیگیری", href: "/" }, { id: 5, name: "پیگیری" },
{ id: 6, name: "ورود به پنل کاربری", href: "/Login" },
]; ];
export const boxItems = [ export const boxItems = [
{ { id: 1, name: "ثبت شکایت", icon: "/img/box1.svg" , icon2: "/img/box1-hover.svg" , description:"ارسال درخواست نارضایتی از پرسنل", link:"/Request"},
id: 1, { id: 2, name: "پیگیری شکایت", icon: "/img/box2.svg" , icon2: "/img/box2-hover.svg" , description:"پیگیری درخواست ارسال شده" , link:"/FollowUp"},
name: "ثبت شکایت", { id: 3, name: "مشاهده آمار", icon: "/img/box3.svg" , icon2: "/img/box3-hover.svg" , description:"مشاهده آمار و گزارشات درخواست ها" , link:"/"},
icon: "/img/box1.svg",
icon2: "/img/box1-hover.svg",
description: "ارسال درخواست نارضایتی از پرسنل",
link: "/RequestStep1",
},
{
id: 2,
name: "پیگیری شکایت",
icon: "/img/box2.svg",
icon2: "/img/box2-hover.svg",
description: "پیگیری درخواست ارسال شده",
link: "/FollowUp",
},
{
id: 3,
name: "مشاهده آمار",
icon: "/img/box3.svg",
icon2: "/img/box3-hover.svg",
description: "مشاهده آمار و گزارشات درخواست ها",
link: "/",
},
]; ];
export const newsItems = [ export const newsItems = [
@ -76,136 +50,3 @@ export const requestItems = [
{ id: 3, name: "بررسی توسط بازرس شهرداری" }, { id: 3, name: "بررسی توسط بازرس شهرداری" },
{ id: 4, name: " اعلام نتیجه درخواست" }, { id: 4, name: " اعلام نتیجه درخواست" },
]; ];
export const aboutFooterItems = [
{
id: 1,
name: "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و بااستفاده از طراحان گرافیک است. چاپگرها و متون بلکه روزنامه و مجلهدر ستون و سطرآنچنان که لازم است لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ ",
},
];
export const footerItems = [
{ id: 1, name: "قوانین مربوط به سوت زنی", href: "/" },
{ id: 2, name: "ارسال گزارش در سامانه سوت زنی قوه قضاییه", href: "/" },
{ id: 3, name: "وب سایت قوه قضاییه", href: "/" },
{ id: 4, name: " وب سایت ریاست جمهوری", href: "/" },
];
export const callUsItems = [
{
id: 1,
title: "نشانی",
icon: <LuMapPin size="full" />,
description: " نشانی ما جهت ارتباط ",
description2: "google map",
},
{
id: 2,
title: "نشانی الکترونیک",
icon: <HiOutlineMail size="full" />,
description: "جهت ارتباط ما با باا شماره",
description2: "sotzani@gamil.com",
},
{
id: 3,
title: "تماس با ما ",
icon: <FiPhone size="full" />,
description: "جهت ارتباط ما با باا شماره",
description2: "03531234567",
},
];
export const ControllerMenuItems = [
{ id: 1, name: "داشبورد", href: "/UserPanel/ControllerDashboard" },
{ id: 2, name: "شکایات", href: "/UserPanel/ControllerDashboard/Complaints" },
{
id: 3,
name: "گزارشات و آمار",
href: "/UserPanel/ControllerDashboard/Reports",
},
];
export const AdminMenuItems = [
{ id: 1, name: "داشبورد", href: "/UserPanel/AdminDashboard" },
{ id: 2, name: "مدیریت کاربران", href: "/UserPanel/AdminDashboard/Management" },
{ id: 2, name: "تنظیمات", href: "/UserPanel/AdminDashboard" },
{ id: 3, name: "گزارشات و آمار", href: "/UserPanel/AdminDashboard" },
];
export const ControllerTableItems = [
{
id: 1,
date: "1402/09/05",
title: "درخواست رشوه ",
content: "واحد روابط عمومی شهرداری",
},
{
id: 2,
date: "1402/09/05",
title: "درخواست رشوه ",
content: "واحد روابط عمومی شهرداری",
},
{
id: 3,
date: "1402/09/05",
title: "درخواست رشوه ",
content: "واحد روابط عمومی شهرداری",
},
];
export const ComplainDetailsItems = [
{
id: 1,
title: "ثبت شکایت",
desc: "سند 54841",
date: "1402/09/05",
time: " 12:58 ",
},
{
id: 2,
title: "تایید توسط بازرس ...",
desc: "سند 54841",
date: "1402/09/05",
time: " 12:58 ",
},
{
id: 3,
title: "ارجاع به واحد...",
desc: "سند 54841",
date: "1402/09/05",
time: " 12:58 ",
},
{
id: 4,
title: "پاسخ",
desc: "سند 54841",
date: "1402/09/05",
time: " 12:58 ",
},
];
export const AdminCardItems = [
{ id: 1, name: "تعداد گزارشات ارسال شده", count: "100" },
{ id: 2, name: "تعداد گزارشات ارسال شده", count: "200" },
{ id: 3, name: "تعداد گزارشات ارسال شده", count: "300" },
{ id: 4, name: "تعداد گزارشات ارسال شده", count: "400" },
];
export const AdminTableItems = [
{
id: 1,
name: "محمد یزدی زاده",
phone:"09134504190",
useRole: "ادمین",
date: "1402/09/05",
desc: "واحد روابط عمومی شهرداری",
},
{
id: 2,
name: "محسن یزدی پناه",
phone:"09134504190",
useRole: "ادمین",
date: "1402/09/05",
desc: "واحد روابط عمومی شهرداری",
},
];

721
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -11,40 +11,26 @@
"dependencies": { "dependencies": {
"@hookform/resolvers": "^3.3.2", "@hookform/resolvers": "^3.3.2",
"@radix-ui/react-alert-dialog": "^1.0.5", "@radix-ui/react-alert-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-label": "^2.0.2", "@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-tabs": "^1.0.4",
"@radix-ui/react-toast": "^1.1.5", "@radix-ui/react-toast": "^1.1.5",
"@tanstack/react-query": "^5.8.7", "@tanstack/react-query": "^5.8.7",
"@uidotdev/usehooks": "^2.4.1",
"chart.js": "^4.4.1",
"class-variance-authority": "^0.7.0", "class-variance-authority": "^0.7.0",
"clsx": "^2.0.0", "clsx": "^2.0.0",
"framer-motion": "^10.16.16",
"hamburger-react": "^2.5.0",
"leaflet": "^1.9.4",
"leaflet-geosearch": "^3.11.0",
"lucide-react": "^0.292.0", "lucide-react": "^0.292.0",
"next": "14.0.3", "next": "14.0.3",
"react": "^18.2.0", "react": "^18",
"react-chartjs-2": "^5.2.0", "react-dom": "^18",
"react-dom": "^18.2.0",
"react-hook-form": "^7.48.2", "react-hook-form": "^7.48.2",
"react-icons": "^4.12.0", "react-icons": "^4.12.0",
"react-leaflet": "^4.2.1",
"react-use": "^17.4.2",
"swiper": "^11.0.5", "swiper": "^11.0.5",
"tailwind-merge": "^2.1.0", "tailwind-merge": "^2.1.0",
"tailwindcss-animate": "^1.0.7", "tailwindcss-animate": "^1.0.7",
"zod": "^3.22.4" "zod": "^3.22.4"
}, },
"devDependencies": { "devDependencies": {
"@faker-js/faker": "^8.3.1",
"@types/leaflet": "^1.9.8",
"@types/node": "^20", "@types/node": "^20",
"@types/react": "^18.2.43", "@types/react": "^18",
"@types/react-dom": "^18", "@types/react-dom": "^18",
"autoprefixer": "^10.0.1", "autoprefixer": "^10.0.1",
"eslint": "^8", "eslint": "^8",

View File

@ -1,3 +0,0 @@
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="6" cy="6" r="6" fill="#126DA0"/>
</svg>

Before

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 647 B

View File

@ -1,3 +0,0 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 0C9.62663 0 7.30655 0.703788 5.33316 2.02236C3.35977 3.34094 1.8217 5.21508 0.913451 7.4078C0.00519941 9.60051 -0.232441 12.0133 0.230582 14.3411C0.693605 16.6689 1.83649 18.807 3.51472 20.4853C5.19295 22.1635 7.33115 23.3064 9.65892 23.7694C11.9867 24.2324 14.3995 23.9948 16.5922 23.0865C18.7849 22.1783 20.6591 20.6402 21.9776 18.6668C23.2962 16.6934 24 14.3734 24 12C23.9966 8.81843 22.7313 5.76814 20.4816 3.51843C18.2319 1.26872 15.1816 0.00335979 12 0ZM17.2685 9.88384L10.8069 16.3454C10.7212 16.4312 10.6194 16.4993 10.5073 16.5457C10.3953 16.5922 10.2752 16.6161 10.1538 16.6161C10.0325 16.6161 9.91243 16.5922 9.80037 16.5457C9.68831 16.4993 9.5865 16.4312 9.50077 16.3454L6.73154 13.5762C6.55834 13.4029 6.46103 13.168 6.46103 12.9231C6.46103 12.6781 6.55834 12.4432 6.73154 12.27C6.90475 12.0968 7.13967 11.9995 7.38462 11.9995C7.62957 11.9995 7.86449 12.0968 8.0377 12.27L10.1538 14.3873L15.9623 8.57769C16.0481 8.49193 16.1499 8.4239 16.2619 8.37748C16.374 8.33107 16.4941 8.30718 16.6154 8.30718C16.7367 8.30718 16.8568 8.33107 16.9688 8.37748C17.0809 8.4239 17.1827 8.49193 17.2685 8.57769C17.3542 8.66345 17.4223 8.76527 17.4687 8.87733C17.5151 8.98938 17.539 9.10948 17.539 9.23077C17.539 9.35205 17.5151 9.47216 17.4687 9.58421C17.4223 9.69627 17.3542 9.79808 17.2685 9.88384Z" fill="#2F6926"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 776 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

View File

@ -26,11 +26,9 @@ module.exports = {
gradient1: "#E44D26", gradient1: "#E44D26",
gradient2: "#F16529 ", gradient2: "#F16529 ",
blue: "#003778", blue: "#003778",
blue50: "#335F9380",
yellow: "#F7A600", yellow: "#F7A600",
brown: "#D28249", brown: "#D28249",
gray:"#BFBFBF", gray:"#BFBFBF",
red:"#FF0000",
border: "hsl(var(--border))", border: "hsl(var(--border))",
input: "hsl(var(--input))", input: "hsl(var(--input))",
ring: "hsl(var(--ring))", ring: "hsl(var(--ring))",

View File

View File