the Footer , CallUs Page , Menu Panel ... is done
parent
34a9a588eb
commit
5bec94d2bd
|
|
@ -0,0 +1,8 @@
|
|||
import React from "react";
|
||||
import CallUs from "@/components/CallUs";
|
||||
|
||||
export default function page() {
|
||||
return (
|
||||
<CallUs />
|
||||
);
|
||||
}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
import React from "react";
|
||||
import Request from "@/components/Request";
|
||||
import RequestStep1 from "@/components/RequestStep1";
|
||||
|
||||
export default function page() {
|
||||
return (
|
||||
<Request />
|
||||
<RequestStep1 />
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
import React from "react";
|
||||
import RequestStep2 from "@/components/RequestStep2";
|
||||
|
||||
export default function page() {
|
||||
return (
|
||||
<RequestStep2 />
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
{/* <Nav /> */}
|
||||
{children}
|
||||
</>
|
||||
)
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import React from 'react'
|
||||
|
||||
export default function page() {
|
||||
return (
|
||||
<div>page</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
import NavbarPanel from "@/components/NavbarPanel";
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<NavbarPanel />
|
||||
{children}
|
||||
</>
|
||||
)
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import React from "react";
|
||||
|
||||
export default function page() {
|
||||
return (
|
||||
<div className="flex w-full mt-11">
|
||||
<div className="w-[200px] h-[200px] px-[29px] pt-[117px] pb-[31px] bg-zinc-100 rounded-[10px] shadow justify-center items-center inline-flex">
|
||||
<div className="w-[142px] h-[52px] text-center text-black text-sm font-medium font-['IRANYekanFN']">
|
||||
تعداد درخواست ها 30 روز گذشته
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
import React from 'react'
|
||||
|
||||
export default function page() {
|
||||
return (
|
||||
<div>Userpage</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -84,3 +84,8 @@
|
|||
font-family: "yekan-m";
|
||||
src: url(../fonts/iranyekanwebmediumfanum.ttf);
|
||||
}
|
||||
|
||||
.leaflet-container {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
}
|
||||
|
|
@ -20,7 +20,7 @@ export default function RootLayout({
|
|||
|
||||
return (
|
||||
<html lang="fa" dir="rtl">
|
||||
<body className="font-[yekan-m] h-screen">
|
||||
<body className="font-[yekan-m] ">
|
||||
<Navbar />
|
||||
<NavbarSm />
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,110 @@
|
|||
"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";
|
||||
|
||||
// Map
|
||||
// import { MapContainer } from "react-leaflet/MapContainer";
|
||||
// import { TileLayer } from "react-leaflet/TileLayer";
|
||||
// import { useMap } from "react-leaflet/hooks";
|
||||
// import { Marker, Popup } from "leaflet";
|
||||
|
||||
// import { Map, TileLayer } from 'react-leaflet';
|
||||
// import "leaflet/dist/leaflet.css";
|
||||
// const defaultCenter = [38.9072, -77.0369];
|
||||
// const defaultZoom = 8;
|
||||
// const disneyWorldLatLng = [28.3852, -81.5639];
|
||||
// const disneyLandLatLng = [33.8121, -117.919];
|
||||
|
||||
// src/components/Map.tsx
|
||||
import { MapContainer, Marker, Popup, TileLayer, Tooltip } from "react-leaflet";
|
||||
import "leaflet/dist/leaflet.css";
|
||||
// import "leaflet-defaulticon-compatibility";
|
||||
// import "leaflet-defaulticon-compatibility/dist/leaflet-defaulticon-compatibility.css";
|
||||
|
||||
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}
|
||||
/>
|
||||
{/* <MapContainer center={position} zoom={zoom} scrollWheelZoom={false}>
|
||||
<TileLayer
|
||||
attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
||||
/>
|
||||
<Marker position={position}>
|
||||
<Popup>
|
||||
A pretty CSS3 popup. <br /> Easily customizable.
|
||||
</Popup>
|
||||
</Marker>
|
||||
</MapContainer> */}
|
||||
{/* <MapContainer
|
||||
center={[51.505, -0.09]}
|
||||
zoom={13}
|
||||
scrollWheelZoom={false}
|
||||
>
|
||||
<TileLayer
|
||||
attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
||||
/>
|
||||
<Marker position={[51.505, -0.09]}>
|
||||
<Popup>
|
||||
A pretty CSS3 popup. <br /> Easily customizable.
|
||||
</Popup>
|
||||
</Marker>
|
||||
</MapContainer> */}
|
||||
</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>
|
||||
);
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@ import { IoMdClose } from "react-icons/io";
|
|||
|
||||
export default function FollowResult() {
|
||||
return (
|
||||
<div className="w-full h-full sm:w-2/3 md:w-3/4 lg:w-1/2 max-sm:p-4 pt-12">
|
||||
<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="h-full flex flex-col justify-center">
|
||||
<p
|
||||
className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white
|
||||
|
|
@ -38,7 +38,7 @@ export default function FollowResult() {
|
|||
type="submit"
|
||||
className="w-1/2 sm:w-1/3 lg:w-1/4 bg-blue text-white p-2 rounded-xl text-center"
|
||||
>
|
||||
ارسال درخواست
|
||||
پرینت درخواست
|
||||
</Button>
|
||||
</AlertDialogTrigger>
|
||||
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ export default function FollowUp() {
|
|||
console.log(data);
|
||||
}
|
||||
return (
|
||||
<div className="w-full h-full sm:w-2/3 md:w-2/4 max-sm:p-4 pt-12">
|
||||
<div className="space-y-3 md:space-y-4 h-full flex flex-col justify-start mt-12">
|
||||
<p className="text-sm font-bold leading-tight tracking-tight text-blue dark:text-white">
|
||||
<div className="w-full h-full sm:w-2/3 md:w-2/4 max-sm:p-8 pt-12">
|
||||
<div className="space-y-3 md:space-y-4 h-full flex flex-col justify-start ">
|
||||
<p className="text-sm md:text-base font-bold leading-tight tracking-tight text-blue dark:text-white">
|
||||
لطفا جهت پیگیری درخواست و مشاهده وضعیت آن کد رهگیری و رمز عبور خود را
|
||||
وارد نمایید.
|
||||
</p>
|
||||
|
|
@ -63,7 +63,7 @@ export default function FollowUp() {
|
|||
<Form {...form}>
|
||||
<form
|
||||
onSubmit={form.handleSubmit(onSubmit)}
|
||||
className="w-full flex flex-col "
|
||||
className="w-full flex flex-col mt-6 "
|
||||
>
|
||||
<div className="flex flex-row flex-wrap justify-between">
|
||||
<FormField
|
||||
|
|
@ -105,10 +105,10 @@ export default function FollowUp() {
|
|||
/>
|
||||
</div>
|
||||
|
||||
<div className="flex justify-end gap-2 w-full mt-9">
|
||||
<div className="flex justify-center sm:justify-end gap-2 w-full mt-8">
|
||||
<Link href="/FollowResult"
|
||||
type="submit"
|
||||
className="bg-blue text-white w-1/3 p-2 rounded-xl text-center"
|
||||
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"
|
||||
>
|
||||
پیگیری درخواست
|
||||
</Link>
|
||||
|
|
|
|||
|
|
@ -52,8 +52,9 @@ export default function Login() {
|
|||
}
|
||||
|
||||
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="space-y-3 md:space-y-4 flex flex-col py-12 px-20">
|
||||
<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]
|
||||
h-full max-md:p-8 pt-12">
|
||||
<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 "/>
|
||||
|
||||
<p className="text-lg font-bold leading-tight tracking-tight text-blue dark:text-white">
|
||||
|
|
@ -98,9 +99,8 @@ export default function Login() {
|
|||
)}
|
||||
/>
|
||||
|
||||
<div className="flex justify-end gap-2 w-full mt-16">
|
||||
<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 className="flex justify-end gap-2 w-full mt-14">
|
||||
<Button type="submit" className="bg-blue text-white w-1/2 md:w-1/3 p-2 rounded-xl">ورود</Button>
|
||||
</div>
|
||||
</form>
|
||||
</Form>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,109 @@
|
|||
import React, { Component, createRef } from 'react';
|
||||
import { Map, TileLayer, Marker, Popup, MapControl, withLeaflet } from 'react-leaflet';
|
||||
import { GeoSearchControl, OpenStreetMapProvider } from 'leaflet-geosearch';
|
||||
|
||||
|
||||
class SearchBox extends MapControl {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
props.leaflet.map.on('geosearch/showlocation', (e) => props.updateMarker(e));
|
||||
}
|
||||
|
||||
createLeafletElement() {
|
||||
const searchEl = GeoSearchControl({
|
||||
provider: new OpenStreetMapProvider(),
|
||||
style: 'bar',
|
||||
showMarker: true,
|
||||
showPopup: false,
|
||||
autoClose: true,
|
||||
retainZoomLevel: false,
|
||||
animateZoom: true,
|
||||
keepResult: false,
|
||||
searchLabel: 'search'
|
||||
});
|
||||
return searchEl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export default class MyMap extends Component {
|
||||
state = {
|
||||
center: {
|
||||
lat: 31.698956,
|
||||
lng: 76.732407,
|
||||
},
|
||||
marker: {
|
||||
lat: 31.698956,
|
||||
lng: 76.732407,
|
||||
},
|
||||
zoom: 13,
|
||||
draggable: true,
|
||||
}
|
||||
|
||||
refmarker = createRef(this.state.marker)
|
||||
|
||||
toggleDraggable = () => {
|
||||
this.setState({ draggable: !this.state.draggable });
|
||||
}
|
||||
|
||||
updateMarker = (e) => {
|
||||
// const marker = e.marker;
|
||||
this.setState({
|
||||
marker: e.marker.getLatLng(),
|
||||
});
|
||||
console.log(e.marker.getLatLng());
|
||||
}
|
||||
|
||||
updatePosition = () => {
|
||||
const marker = this.refmarker.current;
|
||||
if (marker != null) {
|
||||
this.setState({
|
||||
marker: marker.leafletElement.getLatLng(),
|
||||
});
|
||||
}
|
||||
console.log(marker.leafletElement.getLatLng());
|
||||
}
|
||||
|
||||
render() {
|
||||
const position = [this.state.center.lat, this.state.center.lng];
|
||||
const markerPosition = [this.state.marker.lat, this.state.marker.lng];
|
||||
const SearchBar = withLeaflet(SearchBox);
|
||||
|
||||
return (
|
||||
<div className="map-root">
|
||||
<Map center={position} zoom={this.state.zoom} style={{
|
||||
height:"700px"
|
||||
}}>
|
||||
<TileLayer
|
||||
attribution='&copy <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
||||
/>
|
||||
<Marker
|
||||
draggable={true}
|
||||
onDragend={this.updatePosition}
|
||||
position={markerPosition}
|
||||
animate={true}
|
||||
ref={this.refmarker}>
|
||||
<Popup minWidth={90}>
|
||||
<span onClick={this.toggleDraggable}>
|
||||
{this.state.draggable ? 'DRAG MARKER' : 'MARKER FIXED'}
|
||||
</span>
|
||||
</Popup>
|
||||
</Marker>
|
||||
<SearchBar updateMarker={this.updateMarker} />
|
||||
</Map>
|
||||
<style jsx>{`
|
||||
.map-root {
|
||||
height: 100%;
|
||||
}
|
||||
.leaflet-container {
|
||||
height: 400px !important;
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
import React from "react";
|
||||
import Link from "next/link";
|
||||
import { ControllerMenuItems } from "@/constants";
|
||||
|
||||
export default function NavbarPanel() {
|
||||
return (
|
||||
<div className="absolute flex justify-between items-center w-full px-8 py-2 z-10 bg-blue max-md:px-0 max-md:justify-end ">
|
||||
{/* <p>Current pathname: {pathname}</p> */}
|
||||
<div className="flex items-center gap-10">
|
||||
<div className=" flex items-center gap-3 md:ml-4">
|
||||
<p className="text-white inline-block bg-clip-text text-lg max-md:text-base">
|
||||
پنل کاربری |
|
||||
</p>
|
||||
|
||||
{ControllerMenuItems.map((item) => {
|
||||
return (
|
||||
<Link key={item.id} href={item.href}>
|
||||
<p className="text-white text-sm font-normal ">{item.name}</p>
|
||||
</Link>
|
||||
);
|
||||
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h1
|
||||
className="text-white inline-block bg-clip-text before:max-md:hidden"
|
||||
>
|
||||
نام و نام خانوادگی (بازرس)
|
||||
</h1>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
@ -10,9 +10,13 @@ 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);
|
||||
|
|
@ -40,7 +44,8 @@ export default function NavbarSm() {
|
|||
<>
|
||||
<div
|
||||
ref={ref}
|
||||
className="md:hidden w-full fixed bg-white z-[100] flex flex-row justify-between items-center px-4"
|
||||
className={`md:hidden w-full bg-white z-[100] flex flex-row justify-between items-center px-4 ${pathname === "/" ? "fixed" : "relative"}
|
||||
shadow-md`}
|
||||
>
|
||||
<Hamburger toggled={isOpen} size={20} toggle={setOpen} />
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import Resultimg from "../public/img/result.png";
|
|||
|
||||
export default function Result() {
|
||||
return (
|
||||
<div className="w-full h-full sm:w-2/3 md:w-3/4 lg:w-1/2 max-sm:p-4 pt-12 ">
|
||||
<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="h-full flex flex-col justify-center">
|
||||
|
||||
<p className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white
|
||||
|
|
|
|||
|
|
@ -0,0 +1,166 @@
|
|||
"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>
|
||||
);
|
||||
}
|
||||
|
|
@ -19,24 +19,10 @@ import { Input } from "@/components/ui/input";
|
|||
import { toast } from "@/components/ui/use-toast";
|
||||
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 Result from "./RequestResult";
|
||||
import RequestResult from "./RequestResult";
|
||||
|
||||
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, {
|
||||
message: "subject must be at least 2 characters.",
|
||||
}),
|
||||
|
|
@ -56,14 +42,10 @@ const FormSchema = z.object({
|
|||
}),
|
||||
});
|
||||
|
||||
export default function Request() {
|
||||
export default function RequestStep2() {
|
||||
const form = useForm<z.infer<typeof FormSchema>>({
|
||||
resolver: zodResolver(FormSchema),
|
||||
defaultValues: {
|
||||
firstName: "",
|
||||
lastName: "",
|
||||
// nationalCode: ,
|
||||
// phoneNumber: ,
|
||||
subject: "",
|
||||
organisation: "",
|
||||
person: "",
|
||||
|
|
@ -84,91 +66,17 @@ export default function Request() {
|
|||
}
|
||||
|
||||
return (
|
||||
<div className="w-full h-full sm:w-2/3 md:w-2/4 max-sm:p-4 pt-12">
|
||||
<div className="w-full h-full sm:w-2/3 md:w-2/4 max-sm:p-8 pt-12">
|
||||
<div className="space-y-3 md:space-y-4 h-full flex flex-col justify-center">
|
||||
<p className="text-base font-bold leading-tight tracking-tight text-blue dark:text-white">
|
||||
<p className="text-sm md:text-base font-bold leading-tight tracking-tight text-blue dark:text-white">
|
||||
لطفا جهت ارسال درخواست فرم زیر را تکمیل نمایید.
|
||||
</p>
|
||||
|
||||
<Form {...form}>
|
||||
<form
|
||||
onSubmit={form.handleSubmit(onSubmit)}
|
||||
className="w-full flex flex-col "
|
||||
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>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
|
|
@ -250,8 +158,11 @@ export default function Request() {
|
|||
|
||||
<div className="flex justify-center sm:justify-end gap-2 w-full mt-8">
|
||||
{/* <Button> */}
|
||||
<Link href="/RequestResult" 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
|
||||
href="/RequestResult"
|
||||
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> */}
|
||||
|
|
@ -1,14 +1,19 @@
|
|||
|
||||
import { LuMapPin } from "react-icons/lu";
|
||||
import { HiOutlineMail } from "react-icons/hi";
|
||||
import { FiPhone } from "react-icons/fi";
|
||||
|
||||
export const menuItems = [
|
||||
{ id: 1, name: "صفحه اصلی" , href:"/" },
|
||||
{ id: 2, name: "اخبار" , href:"/" },
|
||||
{ id: 3, name: "درباره ما" , href:"/" },
|
||||
{ id: 4, name: "تماس با ما" , href:"/" },
|
||||
{ id: 4, name: "تماس با ما" , href:"/CallUs" },
|
||||
{ id: 5, name: "پیگیری" , href:"/" },
|
||||
{ id: 6, name: "ورود به پنل کاربری" , href:"/Login" },
|
||||
];
|
||||
|
||||
export const boxItems = [
|
||||
{ id: 1, name: "ثبت شکایت", icon: "/img/box1.svg" , icon2: "/img/box1-hover.svg" , description:"ارسال درخواست نارضایتی از پرسنل", link:"/Request"},
|
||||
{ id: 1, name: "ثبت شکایت", 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:"/"},
|
||||
];
|
||||
|
|
@ -63,3 +68,23 @@ export const footerItems = [
|
|||
{ 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:"/" },
|
||||
{ id: 2, name: "شکایات" , href:"/" },
|
||||
{ id: 3, name: "گزارشات و آمار" , href:"/" },
|
||||
];
|
||||
|
||||
export const AdminMenuItems = [
|
||||
{ id: 1, name: "داشبورد" , href:"/" },
|
||||
{ id: 2, name: "شکایات" , href:"/" },
|
||||
{ id: 3, name: "گزارشات و آمار" , href:"/" },
|
||||
];
|
||||
|
|
|
|||
|
|
@ -19,12 +19,15 @@
|
|||
"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",
|
||||
"next": "14.0.3",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-hook-form": "^7.48.2",
|
||||
"react-icons": "^4.12.0",
|
||||
"react-leaflet": "^4.2.1",
|
||||
"react-use": "^17.4.2",
|
||||
"swiper": "^11.0.5",
|
||||
"tailwind-merge": "^2.1.0",
|
||||
|
|
@ -32,6 +35,7 @@
|
|||
"zod": "^3.22.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/leaflet": "^1.9.8",
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^18.2.43",
|
||||
"@types/react-dom": "^18",
|
||||
|
|
@ -145,6 +149,15 @@
|
|||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@googlemaps/js-api-loader": {
|
||||
"version": "1.16.2",
|
||||
"resolved": "https://registry.npmjs.org/@googlemaps/js-api-loader/-/js-api-loader-1.16.2.tgz",
|
||||
"integrity": "sha512-psGw5u0QM6humao48Hn4lrChOM2/rA43ZCm3tKK9qQsEj1/VzqkCqnvGfEOshDbBQflydfaRovbKwZMF4AyqbA==",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"fast-deep-equal": "^3.1.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@hookform/resolvers": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-3.3.2.tgz",
|
||||
|
|
@ -867,6 +880,16 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@react-leaflet/core": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@react-leaflet/core/-/core-2.1.0.tgz",
|
||||
"integrity": "sha512-Qk7Pfu8BSarKGqILj4x7bCSZ1pjuAPZ+qmRwH5S7mDS91VSbVVsJSrW4qA+GPrro8t69gFYVMWb1Zc4yFmPiVg==",
|
||||
"peerDependencies": {
|
||||
"leaflet": "^1.9.0",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@rushstack/eslint-patch": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.6.0.tgz",
|
||||
|
|
@ -915,6 +938,12 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@types/geojson": {
|
||||
"version": "7946.0.13",
|
||||
"resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.13.tgz",
|
||||
"integrity": "sha512-bmrNrgKMOhM3WsafmbGmC+6dsF2Z308vLFsQ3a/bT8X8Sv5clVYpPars/UPq+sAaJP+5OoLAYgwbkS5QEJdLUQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/js-cookie": {
|
||||
"version": "2.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/js-cookie/-/js-cookie-2.2.7.tgz",
|
||||
|
|
@ -926,6 +955,15 @@
|
|||
"integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/leaflet": {
|
||||
"version": "1.9.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/leaflet/-/leaflet-1.9.8.tgz",
|
||||
"integrity": "sha512-EXdsL4EhoUtGm2GC2ZYtXn+Fzc6pluVgagvo2VC1RHWToLGlTRwVYoDpqS/7QXa01rmDyBjJk3Catpf60VMkwg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/geojson": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.9.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.4.tgz",
|
||||
|
|
@ -3395,6 +3433,20 @@
|
|||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/leaflet": {
|
||||
"version": "1.9.4",
|
||||
"resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz",
|
||||
"integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA=="
|
||||
},
|
||||
"node_modules/leaflet-geosearch": {
|
||||
"version": "3.11.0",
|
||||
"resolved": "https://registry.npmjs.org/leaflet-geosearch/-/leaflet-geosearch-3.11.0.tgz",
|
||||
"integrity": "sha512-lWmryKXg7S//7q53fMyooCAyAzYxMtozeEmjrQqtkmsPmeHphaKMuFEm/uD4ZwoblBIIMXsUnuNBLvg6bSfjqA==",
|
||||
"optionalDependencies": {
|
||||
"@googlemaps/js-api-loader": "^1.14.3",
|
||||
"leaflet": "^1.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/levn": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
|
||||
|
|
@ -4146,6 +4198,19 @@
|
|||
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/react-leaflet": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/react-leaflet/-/react-leaflet-4.2.1.tgz",
|
||||
"integrity": "sha512-p9chkvhcKrWn/H/1FFeVSqLdReGwn2qmiobOQGO3BifX+/vV/39qhY8dGqbdcPh1e6jxh/QHriLXr7a4eLFK4Q==",
|
||||
"dependencies": {
|
||||
"@react-leaflet/core": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"leaflet": "^1.9.0",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-remove-scroll": {
|
||||
"version": "2.5.5",
|
||||
"resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.5.tgz",
|
||||
|
|
|
|||
|
|
@ -20,12 +20,15 @@
|
|||
"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",
|
||||
"next": "14.0.3",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-hook-form": "^7.48.2",
|
||||
"react-icons": "^4.12.0",
|
||||
"react-leaflet": "^4.2.1",
|
||||
"react-use": "^17.4.2",
|
||||
"swiper": "^11.0.5",
|
||||
"tailwind-merge": "^2.1.0",
|
||||
|
|
@ -33,6 +36,7 @@
|
|||
"zod": "^3.22.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/leaflet": "^1.9.8",
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^18.2.43",
|
||||
"@types/react-dom": "^18",
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 776 KiB |
|
|
@ -30,6 +30,7 @@ module.exports = {
|
|||
yellow: "#F7A600",
|
||||
brown: "#D28249",
|
||||
gray:"#BFBFBF",
|
||||
red:"#FF0000",
|
||||
border: "hsl(var(--border))",
|
||||
input: "hsl(var(--input))",
|
||||
ring: "hsl(var(--ring))",
|
||||
|
|
|
|||
Loading…
Reference in New Issue