ui changed
parent
f7078d588e
commit
96dcc0ab3f
|
|
@ -15,7 +15,7 @@ export default function RootLayout({
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<NavbarPanel />
|
<NavbarPanel />
|
||||||
{children}
|
<div className="mt-10 mx-auto container">{children}</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,11 +22,7 @@ export default function RootLayout({
|
||||||
<html lang="fa" dir="rtl">
|
<html lang="fa" dir="rtl">
|
||||||
<body className="font-[yekan] ">
|
<body className="font-[yekan] ">
|
||||||
<Provider>
|
<Provider>
|
||||||
<Navbar />
|
{children}
|
||||||
<NavbarSm />
|
|
||||||
|
|
||||||
<div className="flex justify-center">{children}</div>
|
|
||||||
|
|
||||||
<Toaster />
|
<Toaster />
|
||||||
<SonnerToaster />
|
<SonnerToaster />
|
||||||
</Provider>
|
</Provider>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import Landing from "@/app/components/Landing";
|
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
|
import CitizenLogin from "../components/CitizenLogin";
|
||||||
|
import Login from "@/components/Login";
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
return <Landing />;
|
return <Login />;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,8 +85,8 @@ export default function CitizenLogin() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<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]
|
className=" w-[20rem] 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 mb-10"
|
h-full max-md:p-8 pt-12"
|
||||||
>
|
>
|
||||||
<div className="space-y-3 md:space-y-4 flex flex-col md:py-10 md:px-12 lg:px-16 h-full justify-center">
|
<div className="space-y-3 md:space-y-4 flex flex-col md:py-10 md:px-12 lg:px-16 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 " />
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ export default function ControllerDashboard() {
|
||||||
if (data) {
|
if (data) {
|
||||||
}
|
}
|
||||||
return (
|
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-[95vw] lg:w-[82vw] xl:w-[70vw] 3xl:w-[65vw] mt-8 pt-9 mx-auto">
|
||||||
{/* Lg Show */}
|
{/* Lg Show */}
|
||||||
<div className="w-full h-[45vh] mb-6 flex-row gap-0 hidden lg:flex">
|
<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">
|
<div className="w-1/5 flex flex-col gap-8 pl-6">
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ const FormSchema = z.object({
|
||||||
export default function Login() {
|
export default function Login() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const saveData = useData((state) => state.saveData);
|
const saveData = useData((state) => state.saveData);
|
||||||
|
|
||||||
const {
|
const {
|
||||||
data: CaptchaData,
|
data: CaptchaData,
|
||||||
isLoading,
|
isLoading,
|
||||||
|
|
@ -90,136 +90,138 @@ export default function Login() {
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div className=" w-screen h-screen grid place-content-center ">
|
||||||
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
|
||||||
h-full max-md:p-8 pt-12 mb-10"
|
className="w-full sm:[20rem] md:[20rem] xl:w-[30rem] bg-white rounded-lg dark:border xl:p-0 dark:bg-gray-800 dark:border-gray-700 shadow-[0px_0px_15px_0px_#00000040]
|
||||||
>
|
h-fit"
|
||||||
<div className="space-y-3 md:space-y-4 flex flex-col md:py-10 md:px-12 lg:px-16 h-full justify-center">
|
>
|
||||||
<Image alt="icon" src={LoginIcon} className="self-center w-1/3 " />
|
<div className="space-y-3 md:space-y-4 flex flex-col md:py-10 md:px-12 lg:px-16 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">
|
<p className="text-lg 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 "
|
className="w-full flex flex-col "
|
||||||
>
|
>
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name="username"
|
|
||||||
rules={{ required: true }}
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormItem>
|
|
||||||
<FormLabel className="text-[#7C838A] text-sm font-medium">
|
|
||||||
نام کاربری
|
|
||||||
</FormLabel>
|
|
||||||
<FormControl>
|
|
||||||
<Input
|
|
||||||
className="mb-4"
|
|
||||||
placeholder="نام کاربری خود را وارد نمایید"
|
|
||||||
{...field}
|
|
||||||
/>
|
|
||||||
</FormControl>
|
|
||||||
{/* <FormDescription>
|
|
||||||
This is your public display name.
|
|
||||||
</FormDescription> */}
|
|
||||||
<FormMessage />
|
|
||||||
</FormItem>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<FormField
|
|
||||||
control={form.control}
|
|
||||||
name="password"
|
|
||||||
rules={{ required: true }}
|
|
||||||
render={({ field }) => (
|
|
||||||
<FormItem>
|
|
||||||
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
|
|
||||||
رمز عبور
|
|
||||||
</FormLabel>
|
|
||||||
<FormControl>
|
|
||||||
<Input
|
|
||||||
type="password"
|
|
||||||
placeholder="رمز عبور خود را وارد کنید"
|
|
||||||
{...field}
|
|
||||||
/>
|
|
||||||
</FormControl>
|
|
||||||
<FormMessage />
|
|
||||||
</FormItem>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
<div className="flex gap-4 mt-4 items-center">
|
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name="captcha"
|
name="username"
|
||||||
rules={{ required: true }}
|
rules={{ required: true }}
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem className=" items-center h-10 flex-1">
|
<FormItem>
|
||||||
{/* <FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
|
<FormLabel className="text-[#7C838A] text-sm font-medium">
|
||||||
رمز عبور
|
نام کاربری
|
||||||
</FormLabel> */}
|
</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input placeholder="کد امنیتی" {...field} />
|
<Input
|
||||||
|
className="mb-4"
|
||||||
|
placeholder="نام کاربری خود را وارد نمایید"
|
||||||
|
{...field}
|
||||||
|
/>
|
||||||
|
</FormControl>
|
||||||
|
{/* <FormDescription>
|
||||||
|
This is your public display name.
|
||||||
|
</FormDescription> */}
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<FormField
|
||||||
|
control={form.control}
|
||||||
|
name="password"
|
||||||
|
rules={{ required: true }}
|
||||||
|
render={({ field }) => (
|
||||||
|
<FormItem>
|
||||||
|
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
|
||||||
|
رمز عبور
|
||||||
|
</FormLabel>
|
||||||
|
<FormControl>
|
||||||
|
<Input
|
||||||
|
type="password"
|
||||||
|
placeholder="رمز عبور خود را وارد کنید"
|
||||||
|
{...field}
|
||||||
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
{isLoading ? (
|
<div className="flex gap-4 mt-4 items-center">
|
||||||
<div className=" w-36 flex justify-center text-center">
|
<FormField
|
||||||
<ThreeDots
|
control={form.control}
|
||||||
visible={true}
|
name="captcha"
|
||||||
height="50"
|
rules={{ required: true }}
|
||||||
width="50"
|
render={({ field }) => (
|
||||||
color="#003778"
|
<FormItem className=" items-center h-10 flex-1">
|
||||||
radius="9"
|
{/* <FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
|
||||||
ariaLabel="three-dots-loading"
|
رمز عبور
|
||||||
wrapperStyle={{}}
|
</FormLabel> */}
|
||||||
wrapperClass=""
|
<FormControl>
|
||||||
/>
|
<Input placeholder="کد امنیتی" {...field} />
|
||||||
</div>
|
</FormControl>
|
||||||
) : (
|
<FormMessage />
|
||||||
<div className=" flex justify-center text-center">
|
</FormItem>
|
||||||
<Image
|
)}
|
||||||
alt="icon"
|
/>
|
||||||
src={srcForImage as string}
|
{isLoading ? (
|
||||||
className=" h-12 rounded-md shadow-md w-36"
|
<div className=" w-36 flex justify-center text-center">
|
||||||
width={150}
|
<ThreeDots
|
||||||
height={20}
|
|
||||||
quality={100}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<div className="flex justify-end gap-2 w-full mt-14">
|
|
||||||
<Button
|
|
||||||
disabled={loginMutation.isPending}
|
|
||||||
type="submit"
|
|
||||||
className="bg-blue hover:bg-blue/90 transition text-white w-1/2 md:w-1/3 p-2 rounded-xl"
|
|
||||||
>
|
|
||||||
{loginMutation.isPending ? (
|
|
||||||
<div className="flex justify-center items-center gap-2">
|
|
||||||
<Oval
|
|
||||||
visible={true}
|
visible={true}
|
||||||
height="20"
|
height="50"
|
||||||
width="20"
|
width="50"
|
||||||
color="#fff"
|
color="#003778"
|
||||||
ariaLabel="oval-loading"
|
radius="9"
|
||||||
|
ariaLabel="three-dots-loading"
|
||||||
wrapperStyle={{}}
|
wrapperStyle={{}}
|
||||||
wrapperClass=""
|
wrapperClass=""
|
||||||
/>
|
/>
|
||||||
{/* <p>در حال انجام ...</p> */}
|
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
"ورود"
|
<div className=" flex justify-center text-center">
|
||||||
|
<Image
|
||||||
|
alt="icon"
|
||||||
|
src={srcForImage as string}
|
||||||
|
className=" h-12 rounded-md shadow-md w-36"
|
||||||
|
width={150}
|
||||||
|
height={20}
|
||||||
|
quality={100}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
{/* ورود */}
|
</div>
|
||||||
</Button>
|
<div className="flex justify-end gap-2 w-full mt-14">
|
||||||
</div>
|
<Button
|
||||||
</form>
|
disabled={loginMutation.isPending}
|
||||||
</Form>
|
type="submit"
|
||||||
|
className="bg-blue hover:bg-blue/90 transition text-white w-1/2 md:w-1/3 p-2 rounded-xl"
|
||||||
|
>
|
||||||
|
{loginMutation.isPending ? (
|
||||||
|
<div className="flex justify-center items-center gap-2">
|
||||||
|
<Oval
|
||||||
|
visible={true}
|
||||||
|
height="20"
|
||||||
|
width="20"
|
||||||
|
color="#fff"
|
||||||
|
ariaLabel="oval-loading"
|
||||||
|
wrapperStyle={{}}
|
||||||
|
wrapperClass=""
|
||||||
|
/>
|
||||||
|
{/* <p>در حال انجام ...</p> */}
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
"ورود"
|
||||||
|
)}
|
||||||
|
{/* ورود */}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</Form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ export default function NavbarPanel() {
|
||||||
<div
|
<div
|
||||||
className="fixed flex flex-col-reverse justify-between items-start gap-3
|
className="fixed flex flex-col-reverse justify-between items-start gap-3
|
||||||
sm:flex-row sm:items-center sm:gap-0
|
sm:flex-row sm:items-center sm:gap-0
|
||||||
w-full px-8 py-1 z-10 bg-blue max-md:px-4
|
w-full px-8 py-4 z-10 top-0 bg-blue max-md:px-4 shadow-md
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div className=" flex items-center gap-8 max-md:gap-4">
|
<div className=" flex items-center gap-8 max-md:gap-4">
|
||||||
|
|
@ -68,9 +68,9 @@ export default function NavbarPanel() {
|
||||||
</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 className="text-white inline-block bg-clip-text before:max-md:hidden text-sm font-bold max-md:text-xs max-md:font-medium">
|
||||||
|
{role === "Admin"
|
||||||
{role === 'Admin' ? 'نام و نام خانوادگی (ادمین)' : 'نام و نام خانوادگی (بازرس)'}
|
? "نام و نام خانوادگی (ادمین)"
|
||||||
|
: "نام و نام خانوادگی (بازرس)"}
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ export default function TabController() {
|
||||||
const finishedComplaints = data?.filter((item: any) => item.status == 4);
|
const finishedComplaints = data?.filter((item: any) => item.status == 4);
|
||||||
console.log(newComplaints);
|
console.log(newComplaints);
|
||||||
return (
|
return (
|
||||||
<div className="w-[95vw] lg:w-[82vw] xl:w-[70vw] 3xl:w-[65vw] mt-8 pt-9">
|
<div className="w-[95vw] lg:w-[82vw] xl:w-[70vw] 3xl:w-[65vw] mt-8 pt-9 mx-auto">
|
||||||
<Dialog>
|
<Dialog>
|
||||||
<DialogTrigger className=" appearance-none" asChild>
|
<DialogTrigger className=" appearance-none" asChild>
|
||||||
<Button
|
<Button
|
||||||
|
|
|
||||||
|
|
@ -69,64 +69,65 @@ export default function Verify() {
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div className=" w-screen h-screen grid place-content-center ">
|
||||||
className="w-full my-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
|
||||||
h-full max-md:p-8 pt-12"
|
className="w-full sm:[20rem] md:[20rem] xl:w-[30rem] bg-white rounded-lg dark:border xl:p-0 dark:bg-gray-800 dark:border-gray-700 shadow-[0px_0px_15px_0px_#00000040]
|
||||||
>
|
h-fit"
|
||||||
<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 " />
|
<div className="space-y-3 md:space-y-4 flex flex-col md:py-12 md:px-20 h-full justify-center">
|
||||||
<p className="text-lg font-bold leading-tight tracking-tight text-blue dark:text-white">
|
<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>
|
تایید کد
|
||||||
<div className="w-full " dir="ltr">
|
</p>
|
||||||
<OtpInput
|
<div className="w-full " dir="ltr">
|
||||||
value={otp}
|
<OtpInput
|
||||||
onChange={setOtp}
|
value={otp}
|
||||||
numInputs={6}
|
onChange={setOtp}
|
||||||
renderSeparator={<span>{space}</span>}
|
numInputs={6}
|
||||||
renderInput={(props, idx) => (
|
renderSeparator={<span>{space}</span>}
|
||||||
<input
|
renderInput={(props, idx) => (
|
||||||
autoFocus={idx == 0}
|
<input
|
||||||
inputMode="decimal"
|
autoFocus={idx == 0}
|
||||||
pattern="[0-9]*"
|
inputMode="decimal"
|
||||||
{...props}
|
pattern="[0-9]*"
|
||||||
/>
|
{...props}
|
||||||
)}
|
|
||||||
containerStyle=" flex justify-center"
|
|
||||||
inputStyle=" !w-10 rounded-md h-10 bg-[#F5F5F5] border border-blue/30 text-black"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<label className="label text-center">
|
|
||||||
<span className="text-xs text-blue/70 label-text text-center">
|
|
||||||
کد دریافت شده توسط پیامک را وارد نمایید.
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
<div className="flex justify-end gap-2 w-full mt-14">
|
|
||||||
<Button
|
|
||||||
disabled={verifyMutation.isPending}
|
|
||||||
onClick={handelVerify}
|
|
||||||
type="submit"
|
|
||||||
className="bg-blue hover:bg-blue/90 text-white w-1/2 md:w-1/3 p-2 rounded-xl"
|
|
||||||
>
|
|
||||||
{verifyMutation.isPending ? (
|
|
||||||
<div className="flex justify-center items-center gap-2">
|
|
||||||
<Oval
|
|
||||||
visible={true}
|
|
||||||
height="20"
|
|
||||||
width="20"
|
|
||||||
color="#fff"
|
|
||||||
ariaLabel="oval-loading"
|
|
||||||
wrapperStyle={{}}
|
|
||||||
wrapperClass=""
|
|
||||||
/>
|
/>
|
||||||
{/* <p>در حال انجام ...</p> */}
|
)}
|
||||||
</div>
|
containerStyle=" flex justify-center"
|
||||||
) : (
|
inputStyle=" !w-10 rounded-md h-10 bg-[#F5F5F5] border border-blue/30 text-black"
|
||||||
"تایید"
|
/>
|
||||||
)}
|
</div>
|
||||||
</Button>
|
<label className="label text-center">
|
||||||
</div>
|
<span className="text-xs text-blue/70 label-text text-center">
|
||||||
{/* <Form {...form}>
|
کد دریافت شده توسط پیامک را وارد نمایید.
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<div className="flex justify-end gap-2 w-full mt-14">
|
||||||
|
<Button
|
||||||
|
disabled={verifyMutation.isPending}
|
||||||
|
onClick={handelVerify}
|
||||||
|
type="submit"
|
||||||
|
className="bg-blue hover:bg-blue/90 text-white w-1/2 md:w-1/3 p-2 rounded-xl"
|
||||||
|
>
|
||||||
|
{verifyMutation.isPending ? (
|
||||||
|
<div className="flex justify-center items-center gap-2">
|
||||||
|
<Oval
|
||||||
|
visible={true}
|
||||||
|
height="20"
|
||||||
|
width="20"
|
||||||
|
color="#fff"
|
||||||
|
ariaLabel="oval-loading"
|
||||||
|
wrapperStyle={{}}
|
||||||
|
wrapperClass=""
|
||||||
|
/>
|
||||||
|
{/* <p>در حال انجام ...</p> */}
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
"تایید"
|
||||||
|
)}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
{/* <Form {...form}>
|
||||||
<form
|
<form
|
||||||
onSubmit={form.handleSubmit(onSubmit)}
|
onSubmit={form.handleSubmit(onSubmit)}
|
||||||
className="w-full flex flex-col "
|
className="w-full flex flex-col "
|
||||||
|
|
@ -180,6 +181,7 @@ export default function Verify() {
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</Form> */}
|
</Form> */}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ module.exports = {
|
||||||
blue50: "#335F9380",
|
blue50: "#335F9380",
|
||||||
yellow: "#F7A600",
|
yellow: "#F7A600",
|
||||||
brown: "#D28249",
|
brown: "#D28249",
|
||||||
gray: "#BFBFBF",
|
gray2: "#BFBFBF",
|
||||||
border: "hsl(var(--border))",
|
border: "hsl(var(--border))",
|
||||||
input: "hsl(var(--input))",
|
input: "hsl(var(--input))",
|
||||||
ring: "hsl(var(--ring))",
|
ring: "hsl(var(--ring))",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue