ui changed
parent
f7078d588e
commit
96dcc0ab3f
|
|
@ -15,7 +15,7 @@ export default function RootLayout({
|
|||
return (
|
||||
<>
|
||||
<NavbarPanel />
|
||||
{children}
|
||||
<div className="mt-10 mx-auto container">{children}</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,11 +22,7 @@ export default function RootLayout({
|
|||
<html lang="fa" dir="rtl">
|
||||
<body className="font-[yekan] ">
|
||||
<Provider>
|
||||
<Navbar />
|
||||
<NavbarSm />
|
||||
|
||||
<div className="flex justify-center">{children}</div>
|
||||
|
||||
{children}
|
||||
<Toaster />
|
||||
<SonnerToaster />
|
||||
</Provider>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import Landing from "@/app/components/Landing";
|
||||
import Image from "next/image";
|
||||
import CitizenLogin from "../components/CitizenLogin";
|
||||
import Login from "@/components/Login";
|
||||
|
||||
export default function Home() {
|
||||
return <Landing />;
|
||||
return <Login />;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,8 +85,8 @@ export default function CitizenLogin() {
|
|||
|
||||
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]
|
||||
h-full max-md:p-8 pt-12 mb-10"
|
||||
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"
|
||||
>
|
||||
<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 " />
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export default function ControllerDashboard() {
|
|||
if (data) {
|
||||
}
|
||||
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 */}
|
||||
<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">
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ const FormSchema = z.object({
|
|||
export default function Login() {
|
||||
const router = useRouter();
|
||||
const saveData = useData((state) => state.saveData);
|
||||
|
||||
|
||||
const {
|
||||
data: CaptchaData,
|
||||
isLoading,
|
||||
|
|
@ -90,136 +90,138 @@ export default function Login() {
|
|||
: null;
|
||||
|
||||
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]
|
||||
h-full max-md:p-8 pt-12 mb-10"
|
||||
>
|
||||
<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=" w-screen h-screen grid place-content-center ">
|
||||
<div
|
||||
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 " />
|
||||
|
||||
<p className="text-lg font-bold leading-tight tracking-tight text-blue dark:text-white">
|
||||
ورود به پنل کاربری
|
||||
</p>
|
||||
<p className="text-lg 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 "
|
||||
>
|
||||
<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">
|
||||
<Form {...form}>
|
||||
<form
|
||||
onSubmit={form.handleSubmit(onSubmit)}
|
||||
className="w-full flex flex-col "
|
||||
>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="captcha"
|
||||
name="username"
|
||||
rules={{ required: true }}
|
||||
render={({ field }) => (
|
||||
<FormItem className=" items-center h-10 flex-1">
|
||||
{/* <FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
|
||||
رمز عبور
|
||||
</FormLabel> */}
|
||||
<FormItem>
|
||||
<FormLabel className="text-[#7C838A] text-sm font-medium">
|
||||
نام کاربری
|
||||
</FormLabel>
|
||||
<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>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
{isLoading ? (
|
||||
<div className=" w-36 flex justify-center text-center">
|
||||
<ThreeDots
|
||||
visible={true}
|
||||
height="50"
|
||||
width="50"
|
||||
color="#003778"
|
||||
radius="9"
|
||||
ariaLabel="three-dots-loading"
|
||||
wrapperStyle={{}}
|
||||
wrapperClass=""
|
||||
/>
|
||||
</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>
|
||||
<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
|
||||
<div className="flex gap-4 mt-4 items-center">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="captcha"
|
||||
rules={{ required: true }}
|
||||
render={({ field }) => (
|
||||
<FormItem className=" items-center h-10 flex-1">
|
||||
{/* <FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
|
||||
رمز عبور
|
||||
</FormLabel> */}
|
||||
<FormControl>
|
||||
<Input placeholder="کد امنیتی" {...field} />
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
{isLoading ? (
|
||||
<div className=" w-36 flex justify-center text-center">
|
||||
<ThreeDots
|
||||
visible={true}
|
||||
height="20"
|
||||
width="20"
|
||||
color="#fff"
|
||||
ariaLabel="oval-loading"
|
||||
height="50"
|
||||
width="50"
|
||||
color="#003778"
|
||||
radius="9"
|
||||
ariaLabel="three-dots-loading"
|
||||
wrapperStyle={{}}
|
||||
wrapperClass=""
|
||||
/>
|
||||
{/* <p>در حال انجام ...</p> */}
|
||||
</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>
|
||||
)}
|
||||
{/* ورود */}
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
</Form>
|
||||
</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}
|
||||
height="20"
|
||||
width="20"
|
||||
color="#fff"
|
||||
ariaLabel="oval-loading"
|
||||
wrapperStyle={{}}
|
||||
wrapperClass=""
|
||||
/>
|
||||
{/* <p>در حال انجام ...</p> */}
|
||||
</div>
|
||||
) : (
|
||||
"ورود"
|
||||
)}
|
||||
{/* ورود */}
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
</Form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export default function NavbarPanel() {
|
|||
<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-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">
|
||||
|
|
@ -68,9 +68,9 @@ export default function NavbarPanel() {
|
|||
</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">
|
||||
|
||||
{role === 'Admin' ? 'نام و نام خانوادگی (ادمین)' : 'نام و نام خانوادگی (بازرس)'}
|
||||
|
||||
{role === "Admin"
|
||||
? "نام و نام خانوادگی (ادمین)"
|
||||
: "نام و نام خانوادگی (بازرس)"}
|
||||
</h1>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ export default function TabController() {
|
|||
const finishedComplaints = data?.filter((item: any) => item.status == 4);
|
||||
console.log(newComplaints);
|
||||
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>
|
||||
<DialogTrigger className=" appearance-none" asChild>
|
||||
<Button
|
||||
|
|
|
|||
|
|
@ -69,64 +69,65 @@ export default function Verify() {
|
|||
}, []);
|
||||
|
||||
return (
|
||||
<div
|
||||
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]
|
||||
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">
|
||||
تایید کد
|
||||
</p>
|
||||
<div className="w-full " dir="ltr">
|
||||
<OtpInput
|
||||
value={otp}
|
||||
onChange={setOtp}
|
||||
numInputs={6}
|
||||
renderSeparator={<span>{space}</span>}
|
||||
renderInput={(props, idx) => (
|
||||
<input
|
||||
autoFocus={idx == 0}
|
||||
inputMode="decimal"
|
||||
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=""
|
||||
<div className=" w-screen h-screen grid place-content-center ">
|
||||
<div
|
||||
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 " />
|
||||
<p className="text-lg font-bold leading-tight tracking-tight text-blue dark:text-white">
|
||||
تایید کد
|
||||
</p>
|
||||
<div className="w-full " dir="ltr">
|
||||
<OtpInput
|
||||
value={otp}
|
||||
onChange={setOtp}
|
||||
numInputs={6}
|
||||
renderSeparator={<span>{space}</span>}
|
||||
renderInput={(props, idx) => (
|
||||
<input
|
||||
autoFocus={idx == 0}
|
||||
inputMode="decimal"
|
||||
pattern="[0-9]*"
|
||||
{...props}
|
||||
/>
|
||||
{/* <p>در حال انجام ...</p> */}
|
||||
</div>
|
||||
) : (
|
||||
"تایید"
|
||||
)}
|
||||
</Button>
|
||||
</div>
|
||||
{/* <Form {...form}>
|
||||
)}
|
||||
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>
|
||||
) : (
|
||||
"تایید"
|
||||
)}
|
||||
</Button>
|
||||
</div>
|
||||
{/* <Form {...form}>
|
||||
<form
|
||||
onSubmit={form.handleSubmit(onSubmit)}
|
||||
className="w-full flex flex-col "
|
||||
|
|
@ -180,6 +181,7 @@ export default function Verify() {
|
|||
</div>
|
||||
</form>
|
||||
</Form> */}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ module.exports = {
|
|||
blue50: "#335F9380",
|
||||
yellow: "#F7A600",
|
||||
brown: "#D28249",
|
||||
gray: "#BFBFBF",
|
||||
gray2: "#BFBFBF",
|
||||
border: "hsl(var(--border))",
|
||||
input: "hsl(var(--input))",
|
||||
ring: "hsl(var(--ring))",
|
||||
|
|
|
|||
Loading…
Reference in New Issue