Compare commits

..

3 Commits

Author SHA1 Message Date
yasaman bb50eabb35 a bug fixed 2024-02-13 15:10:05 +03:30
yasaman 7bb9b1a621 Login Desgin Modified 2024-02-12 15:12:36 +03:30
yasaman 0728cc33c5 Login HTML Modified 2024-02-12 13:05:27 +03:30
15 changed files with 52 additions and 28 deletions

View File

@ -2,5 +2,10 @@ import TabController from "@/components/TabController";
import React from "react"; import React from "react";
export default function page() { export default function page() {
return <TabController />; return (
<div className="flex justify-center items-center w-full">
<TabController />
<div className="w-full h-full bg-left-top bg-repeat bg-[url('/img/login-pattern.png')] absolute top-0 left-0 "></div>
</div>
);
} }

View File

@ -10,5 +10,11 @@ export default function page() {
// if (!token) { // if (!token) {
// redirect("/"); // redirect("/");
// } // }
return <CitizenLogin />; return (
<div className="flex justify-center items-center w-full h-[calc(100vh-4rem)] ">
<CitizenLogin />
<div className="w-full h-full bg-left-top bg-repeat bg-[url('/img/login-pattern.png')] absolute top-0 left-0 "></div>
</div>
);
} }

View File

@ -2,5 +2,11 @@ import Verify from "@/components/Verify";
import React from "react"; import React from "react";
export default function page() { export default function page() {
return <Verify />; return (
<div className="flex justify-center items-center w-full h-[calc(100vh-4rem)] ">
<Verify />
<div className="w-full h-full bg-left-top bg-repeat bg-[url('/img/login-pattern.png')] absolute top-0 left-0 "></div>
</div>
);
} }

View File

@ -29,7 +29,7 @@ export default function RootLayout({
<Navbar /> <Navbar />
{/* <NavbarSm /> */} {/* <NavbarSm /> */}
<div className="flex justify-center mt-20 sm:mt-14"> <div className="flex justify-center mt-16 sm:mt-14">
<ProgressBarProviders>{children}</ProgressBarProviders> <ProgressBarProviders>{children}</ProgressBarProviders>
</div> </div>

View File

@ -90,8 +90,8 @@ export default function CitizenLogin() {
return ( return (
<div <div
className="w-full mt-14 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-full 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" h-3/4 max-md:p-8 z-10 bg-[url('/img/yazd1.png')] bg-no-repeat bg-bottom bg-contain"
> >
<div className="flex flex-col justify-center h-full space-y-3 md:space-y-4 md:py-10 md:px-12 lg:px-16"> <div className="flex flex-col justify-center h-full space-y-3 md:space-y-4 md:py-10 md:px-12 lg:px-16">
<Image alt="icon" src={LoginIcon} className="self-center w-1/3 " /> <Image alt="icon" src={LoginIcon} className="self-center w-1/3 " />

View File

@ -126,22 +126,23 @@ export default function Navbar() {
</AnimatePresence> </AnimatePresence>
</div> </div>
<div className=" flex items-center max-md:mr-1 gap-5"> <div className=" flex items-center max-md:mr-1 gap-5">
<Link href="/" className=" max-sm:hidden"> <Link href="/" className="">
<Image <Image
src="/img/logo.png" src="/img/Logo1.png"
quality={100} quality={100}
alt="log" alt="log"
width={32} width={500}
height={32} height={500}
className="w-28 h-12"
/> />
</Link> </Link>
<div className=" text-brown flex flex-col text-center"> {/* <div className=" text-brown flex flex-col text-center">
<Link href="/"> <Link href="/">
<h1 className="text-[23px] w-full">عیــون</h1> <h1 className="text-[23px] w-full">عیــون</h1>
<h1 className="text-[9px]">سامانه افشای فساد شهرداری</h1> <h1 className="text-[9px]">سامانه افشای فساد شهرداری</h1>
</Link> </Link>
</div> </div> */}
</div> </div>
<div className=" flex gap-5 items-center mr-8 max-md:hidden"> <div className=" flex gap-5 items-center mr-8 max-md:hidden">
{auth ? ( {auth ? (

View File

@ -38,12 +38,12 @@ export default function Pagination({
previousLabel={<MdKeyboardArrowRight className="w-5 h-5 " />} previousLabel={<MdKeyboardArrowRight className="w-5 h-5 " />}
pageClassName=" w-10 h-10 grid place-content-center rounded-lg !text-blue shadow-md" pageClassName=" w-10 h-10 grid place-content-center rounded-lg !text-blue shadow-md"
className={twMerge( className={twMerge(
" flex flex-wrap gap-3 text-sm md:text-base w-full rounded-md p-2 pb-3 bg-white/30 backdrop-blur-lg justify-center text-blue mt-5 fixed left-0 right-0 bottom-0" " flex flex-wrap gap-3 text-sm md:text-base w-full rounded-md p-2 pb-3 bg-transparent justify-center text-blue mt-5 fixed left-0 right-0 bottom-0"
)} )}
activeClassName=" bg-blue text-blue shadow-md shadow-main" activeClassName=" bg-blue text-blue shadow-md shadow-main"
activeLinkClassName=" text-white w-full p-1 h-full" activeLinkClassName=" text-white w-full p-1 h-full"
previousLinkClassName=" w-10 h-10 grid place-content-center rounded-lg text-sm shadow-md" previousLinkClassName=" w-10 h-10 grid place-content-center rounded-lg text-sm shadow-md bg-white"
nextLinkClassName=" w-10 h-10 grid place-content-center rounded-lg text-sm shadow-md" nextLinkClassName=" w-10 h-10 grid place-content-center rounded-lg text-sm shadow-md bg-white"
/> />
</> </>
); );

View File

@ -65,6 +65,7 @@ interface Organization {
export default function RequestStep2() { export default function RequestStep2() {
const router = useRouter(); const router = useRouter();
const [file, setFile] = useState<File[]>([]); const [file, setFile] = useState<File[]>([]);
const [charCount, setCharCount] = useState(0);
// Queries // Queries
const { data: optionsData, isLoading: isLoadingData } = useQuery({ const { data: optionsData, isLoading: isLoadingData } = useQuery({
@ -86,7 +87,7 @@ export default function RequestStep2() {
.min(1, { .min(1, {
message: "لطفا توضیحات خود را بنویسید.", message: "لطفا توضیحات خود را بنویسید.",
}) })
.max(300, { .max(1024, {
message: "تعداد کاراکترها بیشتر از حد مجاز میباشد.", message: "تعداد کاراکترها بیشتر از حد مجاز میباشد.",
}), }),
uploadFile: z uploadFile: z
@ -133,7 +134,7 @@ export default function RequestStep2() {
mutationFn: postAuthorizedComplaintSubmit, mutationFn: postAuthorizedComplaintSubmit,
onSuccess: (res) => { onSuccess: (res) => {
const currentDate = new Date(); const currentDate = new Date();
const formattedDate = currentDate.toISOString() const formattedDate = currentDate.toISOString();
localStorage.setItem("trackingNumber", res.trackingNumber); localStorage.setItem("trackingNumber", res.trackingNumber);
localStorage.setItem("password", res.password); localStorage.setItem("password", res.password);
@ -187,6 +188,11 @@ export default function RequestStep2() {
}, },
}); });
// Add the useEffect hook to monitor changes in the description field
useEffect(() => {
setCharCount(form.watch("description").length);
}, [form.watch("description")]);
function onSubmit(data: z.infer<typeof FormSchema>) { function onSubmit(data: z.infer<typeof FormSchema>) {
console.log(data); console.log(data);
const formData = new FormData(); const formData = new FormData();
@ -260,11 +266,11 @@ export default function RequestStep2() {
render={({ field }) => ( render={({ field }) => (
<FormItem> <FormItem>
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7"> <FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
*موضوع شکایت *موضوع گزارش
</FormLabel> </FormLabel>
<FormControl> <FormControl>
<Input <Input
placeholder="موضوع شکایت خود را بنویسید" placeholder="موضوع گزارش خود را بنویسید"
{...field} {...field}
/> />
</FormControl> </FormControl>
@ -279,7 +285,7 @@ export default function RequestStep2() {
render={({ field }) => ( render={({ field }) => (
<FormItem className=" w-full sm:w-[48%]"> <FormItem className=" w-full sm:w-[48%]">
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7"> <FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
*دستگاه مربوطه *واحد مورد گزارش
</FormLabel> </FormLabel>
<Select <Select
onValueChange={field.onChange} onValueChange={field.onChange}
@ -293,7 +299,7 @@ export default function RequestStep2() {
> >
<SelectValue <SelectValue
className="" className=""
placeholder="دستگاه مربوطه را انتخاب نمایید." placeholder="واحد مورد گزارش را انتخاب نمایید."
/> />
</SelectTrigger> </SelectTrigger>
</FormControl> </FormControl>
@ -340,11 +346,11 @@ export default function RequestStep2() {
render={({ field }) => ( render={({ field }) => (
<FormItem> <FormItem>
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7"> <FormLabel className="text-[#7C838A] text-sm font-medium mt-7">
توضیحات توضیحات ({charCount}/1024)
</FormLabel> </FormLabel>
<FormControl> <FormControl>
<Textarea <Textarea
placeholder="متن توضیحات خود را بنویسید" placeholder=" توضیحات خود را بنویسید"
className="mb-3 resize-none" className="mb-3 resize-none"
{...field} {...field}
/> />

View File

@ -60,7 +60,7 @@ export default function TabController() {
}; };
return ( return (
<div className="w-[95vw] lg:w-[82vw] xl:w-[70vw] 3xl:w-[65vw] mt-16 pt-9"> <div className="w-[95vw] lg:w-[82vw] xl:w-[70vw] 3xl:w-[65vw] mt-16 pt-9 z-10">
<Button <Button
onClick={() => { onClick={() => {
router.push("/RequestStep2"); router.push("/RequestStep2");

View File

@ -73,7 +73,7 @@ export default function TableController({ data }: { data: Complaint[] }) {
<div> <div>
<Table className="border-[1px] border-solid border-muted rounded-md mb-20"> <Table className="border-[1px] border-solid border-muted rounded-md mb-20">
{/* <TableCaption>A list of your recent invoices.</TableCaption> */} {/* <TableCaption>A list of your recent invoices.</TableCaption> */}
<TableHeader> <TableHeader className="bg-white">
<TableRow> <TableRow>
<TableHead>ردیف</TableHead> <TableHead>ردیف</TableHead>
<TableHead>کد پیگیری</TableHead> <TableHead>کد پیگیری</TableHead>

View File

@ -72,8 +72,8 @@ export default function Verify() {
}, [otp]); }, [otp]);
return ( return (
<div <div
className="w-full mt-28 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-full 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 relative" h-3/5 sm:h-3/4 max-md:p-8 relative z-10 bg-[url('/img/yazd1.png')] bg-no-repeat bg-bottom bg-contain"
> >
{CitizenVerifyMutation.isPending && ( {CitizenVerifyMutation.isPending && (
<div className="absolute top-3 left-5 "> <div className="absolute top-3 left-5 ">
@ -88,7 +88,7 @@ export default function Verify() {
/> />
</div> </div>
)} )}
<div className="flex flex-col justify-center h-full space-y-3 md:space-y-4 md:py-12 md:px-20"> <div className="flex flex-col justify-start h-full space-y-3 md:space-y-6 md:py-16 md:px-20">
<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">
تایید کد تایید کد

BIN
public/img/Logo1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
public/img/Rectangle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 KiB

BIN
public/img/yazd1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB