the Request , Fololow , Result Pages is done
parent
526ef9a38b
commit
f657afb986
|
|
@ -0,0 +1,10 @@
|
||||||
|
import React from "react";
|
||||||
|
import FollowResult from "@/components/FollowResult";
|
||||||
|
|
||||||
|
export default function page() {
|
||||||
|
return (
|
||||||
|
<div className="flex justify-center items-center content-center h-full">
|
||||||
|
<FollowResult />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
import FollowUp from "@/components/FollowUp";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default function page() {
|
||||||
|
return (
|
||||||
|
<div className="flex justify-center items-center content-center h-full">
|
||||||
|
<FollowUp />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import Request from "@/components/Request";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
import Request from "@/components/Request";
|
||||||
|
|
||||||
export default function page() {
|
export default function page() {
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
import React from "react";
|
||||||
|
import Result from "@/components/RequestResult";
|
||||||
|
|
||||||
|
export default function page() {
|
||||||
|
return (
|
||||||
|
<div className="flex justify-center items-center content-center h-full">
|
||||||
|
<Result />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -27,7 +27,7 @@ export default function Landing() {
|
||||||
quality={100}
|
quality={100}
|
||||||
className=" w-full h-full bg-cover"
|
className=" w-full h-full bg-cover"
|
||||||
/>
|
/>
|
||||||
<Navbar />
|
{/* <Navbar /> */}
|
||||||
</div>
|
</div>
|
||||||
<div className="3xl:w-[60%] w-[75%] mx-auto max-md:mt-5">
|
<div className="3xl:w-[60%] w-[75%] mx-auto max-md:mt-5">
|
||||||
<div className="flex justify-between gap-6 w-full mx-auto -mt-24 max-md:mt-0 max-sm:flex-wrap max-sm:justify-around ">
|
<div className="flex justify-between gap-6 w-full mx-auto -mt-24 max-md:mt-0 max-sm:flex-wrap max-sm:justify-around ">
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ export default function RootLayout({
|
||||||
return (
|
return (
|
||||||
<html lang="fa" dir="rtl">
|
<html lang="fa" dir="rtl">
|
||||||
<body className="font-[yekan-m] h-screen">
|
<body className="font-[yekan-m] h-screen">
|
||||||
{/* <Navbar /> */}
|
<Navbar />
|
||||||
{children}
|
{children}
|
||||||
<Toaster />
|
<Toaster />
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
import React from "react";
|
||||||
|
import Image from "next/image";
|
||||||
|
import Resultimg from "../public/img/followResult.png";
|
||||||
|
import Link from "next/link";
|
||||||
|
|
||||||
|
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 ">
|
||||||
|
<div className="h-full flex flex-col justify-center">
|
||||||
|
<p
|
||||||
|
className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white
|
||||||
|
3xl:text-base 3xl:font-bold "
|
||||||
|
>
|
||||||
|
درخواست شما با کد رهگیری 1243230783 و رمز عبور 12422 در دست بررسی و
|
||||||
|
اقدام می باشد. در صورت تمایل می توانید با شماره تلفن 0353286545 جهت
|
||||||
|
پشتیبانی تماس حاصل کنید.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div className="flex justify-center sm:justify-end gap-2 w-full mt-8">
|
||||||
|
<Link
|
||||||
|
href="#"
|
||||||
|
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>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Image
|
||||||
|
alt="icon"
|
||||||
|
src={Resultimg}
|
||||||
|
className="self-center w-3/5 mt-5 sm:w-[23em] sm:h-[20em] 3xl:w-3/5 3xl:h-[30em] object-contain"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
"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 { Textarea } from "@/components/ui/textarea";
|
||||||
|
|
||||||
|
import Image from "next/image";
|
||||||
|
import Link from "next/link";
|
||||||
|
import FollowResult from "./FollowResult";
|
||||||
|
|
||||||
|
const FormSchema = z.object({
|
||||||
|
fllowCode: z.string().min(2, {
|
||||||
|
message: "fllowCode must be at least 2 characters.",
|
||||||
|
}),
|
||||||
|
password: z.string().min(4, {
|
||||||
|
message: "Password must be at least 4 characters.",
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
|
||||||
|
export default function FollowUp() {
|
||||||
|
const form = useForm<z.infer<typeof FormSchema>>({
|
||||||
|
resolver: zodResolver(FormSchema),
|
||||||
|
defaultValues: {
|
||||||
|
fllowCode: "",
|
||||||
|
password: "",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
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-4 ">
|
||||||
|
<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">
|
||||||
|
لطفا جهت پیگیری درخواست و مشاهده وضعیت آن کد رهگیری و رمز عبور خود را
|
||||||
|
وارد نمایید.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<Form {...form}>
|
||||||
|
<form
|
||||||
|
onSubmit={form.handleSubmit(onSubmit)}
|
||||||
|
className="w-full flex flex-col "
|
||||||
|
>
|
||||||
|
<div className="flex flex-row flex-wrap justify-between">
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="fllowCode"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem className=" w-full lg:w-[48%]">
|
||||||
|
<FormLabel className="text-[#7C838A] text-sm font-medium">
|
||||||
|
کد پیگیری
|
||||||
|
</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<Input
|
||||||
|
placeholder="کد پیگیری خود را وارد نمایید"
|
||||||
|
{...field}
|
||||||
|
/>
|
||||||
|
</FormControl>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="password"
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem className=" w-full lg:w-[48%]">
|
||||||
|
<FormLabel className="text-[#7C838A] text-sm font-medium ">
|
||||||
|
رمز عبور
|
||||||
|
</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<Input
|
||||||
|
placeholder="رمز عبور خود را وارد کنید"
|
||||||
|
{...field}
|
||||||
|
/>
|
||||||
|
</FormControl>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="flex justify-end gap-2 w-full mt-9">
|
||||||
|
<Link href="/FollowResult"
|
||||||
|
type="submit"
|
||||||
|
className="bg-blue text-white w-1/3 p-2 rounded-xl text-center"
|
||||||
|
>
|
||||||
|
پیگیری درخواست
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</Form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
"use client";
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { Input } from "./ui/input";
|
import { Input } from "./ui/input";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
|
|
@ -5,15 +7,20 @@ import { menuItems } from "@/constants";
|
||||||
import Link from "next/link";
|
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'
|
||||||
|
|
||||||
|
|
||||||
export default function Navbar() {
|
export default function Navbar() {
|
||||||
|
const pathname = usePathname()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="absolute left-0 right-0 top-0">
|
<div className={`left-0 right-0 top-0 ${pathname === "/" ? "absolute" : "relative"}`}>
|
||||||
|
|
||||||
<div className="flex justify-between items-center w-full px-8 py-2 z-10 border-b-[#C9CFD7] border-b-[1px] border-solid">
|
<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">
|
<h1 className="bg-gradient-to-r from-gradient1 to-gradient2 inline-block text-transparent bg-clip-text">
|
||||||
سال 1402 | مهارم تورم، رشد تولید
|
سال 1402 | مهارم تورم، رشد تولید
|
||||||
</h1>
|
</h1>
|
||||||
|
{/* <p>Current pathname: {pathname}</p> */}
|
||||||
<div className=" flex items-center gap-10">
|
<div className=" flex items-center gap-10">
|
||||||
<div className=" relative flex bg-gray-300 rounded-xl items-center">
|
<div className=" relative flex bg-gray-300 rounded-xl items-center">
|
||||||
<Input
|
<Input
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,8 @@ import { Textarea } from "@/components/ui/textarea";
|
||||||
|
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import LoginIcon from "../public/img/login-icon.svg";
|
import LoginIcon from "../public/img/login-icon.svg";
|
||||||
|
import Link from "next/link";
|
||||||
|
import Result from "./RequestResult";
|
||||||
|
|
||||||
const FormSchema = z.object({
|
const FormSchema = z.object({
|
||||||
firstName: z.string().min(2, {
|
firstName: z.string().min(2, {
|
||||||
|
|
@ -226,13 +228,14 @@ export default function Request() {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="description"
|
name="description"
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">توضیحات</FormLabel>
|
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
|
||||||
|
توضیحات
|
||||||
|
</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Textarea
|
<Textarea
|
||||||
placeholder="متن توضیحات خود را بنویسید"
|
placeholder="متن توضیحات خود را بنویسید"
|
||||||
|
|
@ -246,12 +249,12 @@ export default function Request() {
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<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> */}
|
||||||
type="submit"
|
<Link href="/RequestResult" type="submit"
|
||||||
className="w-1/2 sm:w-1/3 lg:w-1/4 bg-blue text-white p-3 rounded-xl"
|
className="w-1/2 sm:w-1/3 lg:w-1/4 bg-blue text-white p-2 rounded-xl text-center">
|
||||||
>
|
|
||||||
ارسال درخواست
|
ارسال درخواست
|
||||||
</Button>
|
</Link>
|
||||||
|
{/* </Button> */}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
import React from "react";
|
||||||
|
import Image from "next/image";
|
||||||
|
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 ">
|
||||||
|
<div className="h-full flex flex-col justify-center">
|
||||||
|
|
||||||
|
<p className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white
|
||||||
|
3xl:text-base 3xl:font-bold " >با تشکر از شما</p>
|
||||||
|
|
||||||
|
<p className="text-sm font-medium leading-6 tracking-wide text-[#7C838A] dark:text-white
|
||||||
|
3xl:text-base 3xl:font-bold ">
|
||||||
|
درخواست شما با کد پیگیری 258945885 و رمز عبور 5845 در سامانه سوت زنی
|
||||||
|
ثبت شده و شما می توانید نتیجه درخواست خود را از صفحه پیگیری درخواست،
|
||||||
|
با استفاده از کد رهگیری و رمز عبور مشاهده کنید.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<Image alt="icon" src={Resultimg} className="self-center w-3/5 mt-5 sm:w-[23em] sm:h-[20em] 3xl:w-3/5 3xl:h-[30em] object-contain" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import * as React from "react"
|
import * as React from "react";
|
||||||
|
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
export interface InputProps
|
export interface InputProps
|
||||||
extends React.InputHTMLAttributes<HTMLInputElement> {}
|
extends React.InputHTMLAttributes<HTMLInputElement> {}
|
||||||
|
|
@ -11,16 +11,21 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
||||||
<input
|
<input
|
||||||
type={type}
|
type={type}
|
||||||
className={cn(
|
className={cn(
|
||||||
`flex h-12 w-full rounded-md border border-input px-3 py-2 ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50
|
`flex w-full rounded-md border border-input px-3 py-2 ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50
|
||||||
text-black text-opacity-50 text-xs font-normal bg-slate-200 mb-3`,
|
text-black text-opacity-50 text-xs font-normal bg-slate-200 mb-3
|
||||||
|
3xl:h-12 h-10 transition-all
|
||||||
|
hover:bg-slate-300 hover:cursor-pointer focus:cursor-auto
|
||||||
|
focus:outline-4 focus:outline-slate-300 focus:bg-slate-200
|
||||||
|
|
||||||
|
`,
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
)
|
);
|
||||||
Input.displayName = "Input"
|
Input.displayName = "Input";
|
||||||
|
|
||||||
export { Input }
|
export { Input };
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,9 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
||||||
return (
|
return (
|
||||||
<textarea
|
<textarea
|
||||||
className={cn(
|
className={cn(
|
||||||
`flex min-h-[198px] w-full rounded-md border border-input px-3 py-2 ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50
|
`flex w-full rounded-md border border-input px-3 py-2 ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50
|
||||||
text-black text-opacity-50 text-xs font-normal bg-slate-200 `,
|
text-black text-opacity-50 text-xs font-normal bg-slate-200
|
||||||
|
3xl:min-h-[198px] min-h-[150px]`,
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ export const menuItems = [
|
||||||
|
|
||||||
export const boxItems = [
|
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:"/Request"},
|
||||||
{ id: 2, name: "پیگیری شکایت", icon: "/img/box2.svg" , icon2: "/img/box2-hover.svg" , description:"پیگیری درخواست ارسال شده" , link:"/"},
|
{ 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:"/"},
|
{ id: 3, name: "مشاهده آمار", icon: "/img/box3.svg" , icon2: "/img/box3-hover.svg" , description:"مشاهده آمار و گزارشات درخواست ها" , link:"/"},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 46 KiB |
Loading…
Reference in New Issue