Bugs of meeting fixed

Kahdooei
Hossein Rahmani 2024-07-17 11:39:31 +03:30
parent e1b6237318
commit 00c7604c63
15 changed files with 202 additions and 132 deletions

View File

@ -7,6 +7,19 @@ import {
DialogTitle, DialogTitle,
DialogTrigger, DialogTrigger,
} from "@/components/ui/dialog"; } from "@/components/ui/dialog";
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/components/ui/alert-dialog";
import { X } from "lucide-react"; import { X } from "lucide-react";
import { Button } from "./ui/button"; import { Button } from "./ui/button";
export default function AttachmentsDialog({ export default function AttachmentsDialog({
@ -24,16 +37,16 @@ export default function AttachmentsDialog({
<Dialog> <Dialog>
{children} {children}
<DialogContent className=" max-h-[95vh] overflow-y-auto max-sm:p-0"> <DialogContent className=" max-h-[95vh] overflow-y-auto max-sm:p-0">
<AlertDialog>
<DialogHeader> <DialogHeader>
<DialogTitle className=" mt-7">پیوست‌ها</DialogTitle> <DialogTitle className=" mt-7">پیوست‌ها</DialogTitle>
<DialogDescription className="max-md:px-2 py-5 w-full"> <DialogDescription className="max-md:px-2 py-5 w-full">
{attachments.length != 0 && ( {attachments.length != 0 && (
<Button <AlertDialogTrigger>
onClick={() => deleteAllAttachmentsFiles()} <Button className=" mb-2 absolute right-3 top-1 p-1 bg-white hover:bg-white text-red-600 ">
className=" mb-2 absolute right-3 top-1 p-1 bg-white hover:bg-white text-red-600 "
>
حذف همه حذف همه
</Button> </Button>{" "}
</AlertDialogTrigger>
)} )}
{attachments.length == 0 ? ( {attachments.length == 0 ? (
@ -51,7 +64,9 @@ export default function AttachmentsDialog({
</div> </div>
<div className="bg-gray-200 p-2 rounded-lg max-w-full justify-between flex flex-1"> <div className="bg-gray-200 p-2 rounded-lg max-w-full justify-between flex flex-1">
<div className=""> <div className="">
<p className=" truncate max-w-[16rem]">{item.name}</p> <p className=" truncate max-w-[16rem]">
{item.name}
</p>
</div> </div>
<X <X
@ -64,8 +79,26 @@ export default function AttachmentsDialog({
})} })}
</div> </div>
)} )}
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>آیا میخواهید همه ی فایلها را حذف کنید؟</AlertDialogTitle>
<AlertDialogDescription>
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter className=" gap-2">
<AlertDialogCancel>لغو</AlertDialogCancel>
<AlertDialogAction
onClick={() => deleteAllAttachmentsFiles()}
>
تایید
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</DialogDescription> </DialogDescription>
</DialogHeader> </DialogHeader>
</AlertDialog>
</DialogContent> </DialogContent>
</Dialog> </Dialog>
); );

View File

@ -139,7 +139,10 @@ export default function CitizenLogin() {
رمز عبور رمز عبور
</FormLabel> */} </FormLabel> */}
<FormControl> <FormControl>
<Input placeholder="کد امنیتی" {...field} /> <Input
placeholder="کد امنیتی"
{...field}
/>
</FormControl> </FormControl>
<FormMessage /> <FormMessage />
</FormItem> </FormItem>

View File

@ -47,7 +47,11 @@ export default function ComplainsDetails({
const storeData = useData((state) => state.data); const storeData = useData((state) => state.data);
let data; let data;
const openFileInNewTab = (base64Data: any, fileType: any) => { const openFileInNewTab = (
base64Data: any,
fileType: any,
fileName?: string
) => {
const blob = b64toBlob(base64Data, fileType); const blob = b64toBlob(base64Data, fileType);
const blobUrl = URL.createObjectURL(blob); const blobUrl = URL.createObjectURL(blob);
const newTab = window.open(); const newTab = window.open();
@ -66,9 +70,7 @@ export default function ComplainsDetails({
`<iframe width="100%" height="100%" src="${blobUrl}"></iframe>` `<iframe width="100%" height="100%" src="${blobUrl}"></iframe>`
); );
} else { } else {
newTab.document.write( downloadFile(base64Data, fileName, fileType);
`<a href="${blobUrl}" target="_blank">Open in New Tab</a>`
);
} }
newTab.document.write("</body></html>"); newTab.document.write("</body></html>");
@ -160,7 +162,7 @@ export default function ComplainsDetails({
<AlertDialogHeader dir="rtl"> <AlertDialogHeader dir="rtl">
<AlertDialogTitle dir="rtl">رمز عبور</AlertDialogTitle> <AlertDialogTitle dir="rtl">رمز عبور</AlertDialogTitle>
<AlertDialogDescription className=" w-full mx-auto"> <AlertDialogDescription className=" w-full mx-auto">
برای مشاهده درخواست رمز عبور خود را وارد نمایید. برای مشاهده گزارش رمز عبور خود را وارد نمایید.
</AlertDialogDescription> </AlertDialogDescription>
</AlertDialogHeader> </AlertDialogHeader>
<div className="grid items-center gap-1.5 w-full px-10 mx-auto"> <div className="grid items-center gap-1.5 w-full px-10 mx-auto">
@ -248,7 +250,7 @@ export default function ComplainsDetails({
</span> </span>
</p> </p>
<p className="text-[#464646] text-sm font-medium"> <p className="text-[#464646] text-sm font-medium">
دستگاه مربوطه:{" "} واحد مرتبط:{" "}
<span className="text-[#7C838A] text-sm font-medium"> <span className="text-[#7C838A] text-sm font-medium">
{data?.complaintOrganization {data?.complaintOrganization
? data?.complaintOrganization.title ? data?.complaintOrganization.title
@ -256,7 +258,7 @@ export default function ComplainsDetails({
</span> </span>
</p> </p>
<p className="text-[#464646] text-sm font-medium"> <p className="text-[#464646] text-sm font-medium">
فرد مربوطه:{" "} فرد مرتبط:{" "}
<span className="text-[#7C838A] text-sm font-medium"> <span className="text-[#7C838A] text-sm font-medium">
{data.complaining ? data.complaining : "-"} {data.complaining ? data.complaining : "-"}
</span> </span>
@ -288,7 +290,7 @@ export default function ComplainsDetails({
</span> </span>
</p> </p>
<p className="text-[#464646] text-sm font-medium"> <p className="text-[#464646] text-sm font-medium">
دستگاه مربوطه:{" "} دستگاه مرتبط:{" "}
<span className="text-[#7C838A] text-sm font-medium"> <span className="text-[#7C838A] text-sm font-medium">
{data?.complaintOrganization {data?.complaintOrganization
? data?.complaintOrganization.title ? data?.complaintOrganization.title
@ -296,7 +298,7 @@ export default function ComplainsDetails({
</span> </span>
</p> </p>
<p className="text-[#464646] text-sm font-medium"> <p className="text-[#464646] text-sm font-medium">
فرد مربوطه:{" "} فرد مرتبط:{" "}
<span className="text-[#7C838A] text-sm font-medium"> <span className="text-[#7C838A] text-sm font-medium">
{data.complaining ? data.complaining : "-"} {data.complaining ? data.complaining : "-"}
</span> </span>
@ -346,7 +348,7 @@ export default function ComplainsDetails({
<div className="h-[calc(80vh-11.5em)] max-h-[calc(80vh-11.5em)] overflow-hidden"> <div className="h-[calc(80vh-11.5em)] max-h-[calc(80vh-11.5em)] overflow-hidden">
<div className="bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col h-full "> <div className="bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col h-full ">
<p className="text-[#464646] text-base font-bold"> <p className="text-[#464646] text-base font-bold">
روند شکایت روند رسیدگی گزارش
</p> </p>
<div <div
className="flex flex-col mt-4 gap-y-4 overflow-auto className="flex flex-col mt-4 gap-y-4 overflow-auto
@ -391,23 +393,22 @@ export default function ComplainsDetails({
return ( return (
<div <div
key={index} key={index}
className=" bg-gray-100 text-[#7C838A] w-full md:w-[30%] rounded-md h-12 p-2 flex justify-between gap-3 items-center" className=" bg-gray-100 text-[#7C838A] w-full md:w-[30%] rounded-md h-12 p-2 flex justify-between gap-3 items-center cursor-pointer"
>
<a
onClick={() => onClick={() =>
openFileInNewTab( openFileInNewTab(
item.data, item.data,
item.mimeType item.mimeType,
item.title
) )
} }
className="flex items-center gap-2 truncate cursor-pointer "
> >
<a className="flex items-center gap-2 truncate cursor-pointer ">
<File className="w-6 h-6 " /> <File className="w-6 h-6 " />
<p className=" max-w-[5rem] truncate"> <p className=" max-w-full truncate">
{item.title} {item.title}
</p> </p>
</a> </a>
<ArrowDownToLine {/* <ArrowDownToLine
className="cursor-pointer " className="cursor-pointer "
onClick={() => onClick={() =>
downloadFile( downloadFile(
@ -416,7 +417,7 @@ export default function ComplainsDetails({
item.mimeType item.mimeType
) )
} }
/> /> */}
</div> </div>
); );
})} })}

View File

@ -85,7 +85,7 @@ export default function FollowUp() {
<div className="w-full h-full pt-12 sm:w-2/3 md:w-2/4 max-sm:p-8"> <div className="w-full h-full pt-12 sm:w-2/3 md:w-2/4 max-sm:p-8">
<div className="flex flex-col justify-start h-full space-y-3 md:space-y-4 "> <div className="flex flex-col justify-start h-full space-y-3 md:space-y-4 ">
<p className="text-sm font-bold leading-tight tracking-tight md:text-base text-blue dark:text-white"> <p className="text-sm font-bold leading-tight tracking-tight md:text-base text-blue dark:text-white">
لطفا جهت پیگیری درخواست و مشاهده وضعیت آن کد رهگیری و رمز عبور خود را لطفا جهت پیگیری گزارش و مشاهده وضعیت آن کد رهگیری و رمز عبور خود را
وارد نمایید. وارد نمایید.
</p> </p>
@ -93,6 +93,7 @@ export default function FollowUp() {
<form <form
onSubmit={form.handleSubmit(onSubmit)} onSubmit={form.handleSubmit(onSubmit)}
className="flex flex-col w-full mt-6 " className="flex flex-col w-full mt-6 "
autoComplete="off"
> >
<div className="flex flex-row flex-wrap justify-between"> <div className="flex flex-row flex-wrap justify-between">
<FormField <FormField
@ -105,6 +106,7 @@ export default function FollowUp() {
</FormLabel> </FormLabel>
<FormControl> <FormControl>
<Input <Input
autoComplete="off"
placeholder="کد پیگیری خود را وارد نمایید" placeholder="کد پیگیری خود را وارد نمایید"
{...field} {...field}
/> />
@ -125,6 +127,7 @@ export default function FollowUp() {
<FormControl> <FormControl>
<Input <Input
type="password" type="password"
autoComplete="off"
placeholder="رمز عبور خود را وارد کنید" placeholder="رمز عبور خود را وارد کنید"
{...field} {...field}
/> />
@ -154,7 +157,7 @@ export default function FollowUp() {
/> />
</div> </div>
) : ( ) : (
"پیگیری درخواست" "پیگیری گزارش"
)} )}
</Button> </Button>
</div> </div>

View File

@ -150,6 +150,11 @@ export default function InspectorOperations({
OperationMutation.mutate(formData); OperationMutation.mutate(formData);
} }
const deleteAllAttachmentsFiles = () => {
setfirst([]);
form.setValue("media", []);
};
const deleteFileFromAttachments = (file: any) => { const deleteFileFromAttachments = (file: any) => {
const filtered = first?.filter((item) => item.name !== file); const filtered = first?.filter((item) => item.name !== file);
setfirst(filtered); setfirst(filtered);
@ -218,9 +223,9 @@ export default function InspectorOperations({
</FormLabel> </FormLabel>
<div className="flex gap-2 w-full items-center mt-1 mb-2"> <div className="flex gap-2 w-full items-center mt-1 mb-2">
<AttachmentsDialog <AttachmentsDialog
deleteAllAttachmentsFiles={() => console.log("1")}
attachments={first} attachments={first}
deleteFile={(item) => deleteFileFromAttachments(item)} deleteFile={(item) => deleteFileFromAttachments(item)}
deleteAllAttachmentsFiles={deleteAllAttachmentsFiles}
> >
<DialogTrigger className=" bg-white rounded-md h-9 text-xs flex-1 flex gap-2 items-center justify-center"> <DialogTrigger className=" bg-white rounded-md h-9 text-xs flex-1 flex gap-2 items-center justify-center">
<Eye className=" w-4 h-4" /> <Eye className=" w-4 h-4" />

View File

@ -74,7 +74,10 @@ export default function ProfileDropDown() {
className=" max-sm:-mr-8 max-sm:text-xs w-12" className=" max-sm:-mr-8 max-sm:text-xs w-12"
asChild asChild
> >
<Button variant="outline" className=" truncate w-32 grid place-content-center"> <Button
variant="outline"
className=" truncate w-32 grid place-content-center"
>
{/* {profileData?.title ? profileData?.title : profileData?.userName} */} {/* {profileData?.title ? profileData?.title : profileData?.userName} */}
<p className=" truncate w-full"> <p className=" truncate w-full">
{" "} {" "}
@ -92,7 +95,7 @@ export default function ProfileDropDown() {
</DropdownMenuItem> </DropdownMenuItem>
<DropdownMenuItem onClick={() => router.push("/Account/Complaints")}> <DropdownMenuItem onClick={() => router.push("/Account/Complaints")}>
<CreditCard className="w-4 h-4 ml-2" /> <CreditCard className="w-4 h-4 ml-2" />
<span>درخواست های من</span> <span>گزارش های من</span>
</DropdownMenuItem> </DropdownMenuItem>
</DropdownMenuGroup> </DropdownMenuGroup>
<DropdownMenuSeparator /> <DropdownMenuSeparator />

View File

@ -80,7 +80,7 @@ export default function Result() {
3xl:text-base 3xl:font-bold " 3xl:text-base 3xl:font-bold "
> >
رمز عبور : رمز عبور :
<span className="text-slate-500 mx-2 font-mono font-extrabold">{`${password}`}</span> <span className="text-slate-500 mx-2 !font-mono font-extrabold">{`${password}`}</span>
</p> </p>
{/* <Image {/* <Image

View File

@ -95,7 +95,7 @@ export default function RequestStep1() {
<div className="w-full h-full pt-12 sm:w-2/3 md:w-2/4 max-sm:p-8"> <div className="w-full h-full pt-12 sm:w-2/3 md:w-2/4 max-sm:p-8">
<div className="flex flex-col justify-center h-full space-y-4 md:space-y-4"> <div className="flex flex-col justify-center h-full space-y-4 md:space-y-4">
<p className="text-sm font-bold leading-tight tracking-tight md:text-base text-blue dark:text-white"> <p className="text-sm font-bold leading-tight tracking-tight md:text-base text-blue dark:text-white">
فرم ثبت درخواست{" "} فرم ثبت گزارش{" "}
</p> </p>
{profileData && ( {profileData && (
<Form {...form}> <Form {...form}>

View File

@ -80,7 +80,7 @@ export default function RequestStep2() {
message: "لطفا موضوع شکایت را وارد نمایید.", message: "لطفا موضوع شکایت را وارد نمایید.",
}), }),
OrganizationId: z.string({ OrganizationId: z.string({
required_error: "لطفا دستگاه مربوطه را انتخاب نمایید.", required_error: "لطفا دستگاه مرتبط را انتخاب نمایید.",
}), }),
person: z person: z
.string() .string()
@ -287,7 +287,7 @@ export default function RequestStep2() {
ارسال گزارش ارسال گزارش
</span> </span>
<p className="text-sm font-bold leading-tight tracking-tight md:text-sm text-[#7C838A] dark:text-white"> <p className="text-sm font-bold leading-tight tracking-tight md:text-sm text-[#7C838A] dark:text-white">
لطفا جهت ارسال درخواست فرم زیر را تکمیل نمایید. لطفا جهت ارسال گزارش فرم زیر را تکمیل نمایید.
</p> </p>
<Form {...form}> <Form {...form}>
@ -300,7 +300,7 @@ export default function RequestStep2() {
name="title" name="title"
render={({ field }) => ( render={({ field }) => (
<FormItem> <FormItem>
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7"> <FormLabel className="text-[#7C838A] text-sm font-medium">
<span className=" text-red-500">*</span>موضوع گزارش <span className=" text-red-500">*</span>موضوع گزارش
</FormLabel> </FormLabel>
<FormControl> <FormControl>
@ -319,7 +319,7 @@ export default function RequestStep2() {
name="OrganizationId" name="OrganizationId"
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">
<span className=" text-red-500">*</span>واحد مورد گزارش <span className=" text-red-500">*</span>واحد مورد گزارش
</FormLabel> </FormLabel>
<Select <Select
@ -338,7 +338,13 @@ export default function RequestStep2() {
/> />
</SelectTrigger> </SelectTrigger>
</FormControl> </FormControl>
<SelectContent dir="rtl"> <SelectContent
ref={(ref) => {
if (!ref) return;
ref.ontouchstart = (e) => e.preventDefault();
}}
dir="rtl"
>
<SelectGroup> <SelectGroup>
{organizationsData?.map((item: any) => { {organizationsData?.map((item: any) => {
return ( return (
@ -360,8 +366,9 @@ export default function RequestStep2() {
name="person" name="person"
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">
فرد مرتبط({charCountPerson}/{50}) فرد مرتبط
{/* ({charCountPerson}/{50}) */}
</FormLabel> </FormLabel>
<FormControl> <FormControl>
<Input <Input
@ -427,7 +434,7 @@ export default function RequestStep2() {
name="categoryId" name="categoryId"
render={({ field }) => ( render={({ field }) => (
<FormItem className="w-full sm:w-[48%] flex-row-reverse"> <FormItem className="w-full sm:w-[48%] flex-row-reverse">
<FormLabel className="text-[#7C838A] text-sm font-medium mt-7"> <FormLabel className="text-[#7C838A] text-sm font-medium">
انتخاب دسته بندی انتخاب دسته بندی
</FormLabel> </FormLabel>
<Select <Select
@ -440,7 +447,12 @@ export default function RequestStep2() {
<SelectValue placeholder=" دسته بندی ها" /> <SelectValue placeholder=" دسته بندی ها" />
</SelectTrigger> </SelectTrigger>
</FormControl> </FormControl>
<SelectContent> <SelectContent
ref={(ref) => {
if (!ref) return;
ref.ontouchstart = (e) => e.preventDefault();
}}
>
{categoryData?.map((catItems: any, index: any) => ( {categoryData?.map((catItems: any, index: any) => (
<SelectItem key={index} value={catItems.id}> <SelectItem key={index} value={catItems.id}>
{catItems.title} {catItems.title}
@ -508,13 +520,27 @@ export default function RequestStep2() {
if (file && e.target.files) { if (file && e.target.files) {
const fileArray1 = Array.from(file); const fileArray1 = Array.from(file);
const fileArray2 = Array.from(e.target.files); const fileArray2 = Array.from(e.target.files);
const mergedArray = fileArray1.concat(fileArray2); const mergedArray: File[] =
const newMergedArray = mergedArray.filter( fileArray1.concat(fileArray2);
(item, index) => const allFiles = mergedArray.map((item) => {
mergedArray.indexOf(item) === index return { name: item.name, type: item.type };
});
const newMergedArray = Array.from(
new Set(mergedArray)
); );
setFile(mergedArray); const uniqueFiles = Array.from(
field.onChange(mergedArray); new Map(
mergedArray.map((file: any) => [
file.name,
file,
])
).values()
);
console.log(uniqueFiles);
console.log(newMergedArray);
setFile(uniqueFiles);
field.onChange(uniqueFiles);
} else if (!file && e.target.files) { } else if (!file && e.target.files) {
const fileArray2 = Array.from(e.target.files); const fileArray2 = Array.from(e.target.files);
setFile(fileArray2); setFile(fileArray2);
@ -528,8 +554,8 @@ export default function RequestStep2() {
<span> <span>
حجم هر فایل حداکثر می بایست{" "} حجم هر فایل حداکثر می بایست{" "}
{formatSize(optionsData?.maxFileSize)} باشد {formatSize(optionsData?.maxFileSize)} باشد
</span> </span>{" "}
و {" "} و{" "}
{`تعداد فایل های پیوست شده می بایست حداکثر ${optionsData?.maxFileCount} تا باشد.`} {`تعداد فایل های پیوست شده می بایست حداکثر ${optionsData?.maxFileCount} تا باشد.`}
</FormDescription> </FormDescription>
) : ( ) : (
@ -613,7 +639,7 @@ export default function RequestStep2() {
/> />
</div> </div>
) : ( ) : (
"ارسال درخواست" "ارسال گزارش"
)} )}
</Button> </Button>
</div> </div>

View File

@ -19,9 +19,9 @@ export default function SubmitRequest() {
<div className=" w-full flex flex-row gap-12 max-lg:flex-col-reverse items-center"> <div className=" w-full flex flex-row gap-12 max-lg:flex-col-reverse items-center">
<div className="w-1/3 flex flex-col justify-between gap-8 max-lg:w-full"> <div className="w-1/3 flex flex-col justify-between gap-8 max-lg:w-full">
<p className="font-normal text-sm leading-6 text-justify text-black line-clamp-5 tracking-wider max-sm:pr-0 "> <p className="font-normal text-sm leading-6 text-justify text-black line-clamp-5 tracking-wider max-sm:pr-0 ">
این سامانه با هدف بررسی درخواست های مردمی و شکایت های ایشان از پرسنل این سامانه با هدف بررسی گزارش های مردمی و شکایت های ایشان از پرسنل
شهرداری و رسیدگی به آن ایجاد شده است. فلوچارت روبرو نحوه ارسال شهرداری و رسیدگی به آن ایجاد شده است. فلوچارت روبرو نحوه ارسال گزارش
درخواست و پیگیری آن را مشاهده می کنید. و پیگیری آن را مشاهده می کنید.
</p> </p>
<Link <Link
href="/RequestStep2" href="/RequestStep2"
@ -30,7 +30,7 @@ export default function SubmitRequest() {
}} }}
className="text-sm font-bold text-blue text-left underline underline-offset-4" className="text-sm font-bold text-blue text-left underline underline-offset-4"
> >
برای شروع ارسال درخواست کلیک کنید. برای شروع ارسال گزارش کلیک کنید.
</Link> </Link>
</div> </div>
<div className="w-2/3 flex items-center max-lg:w-full max-sm:flex-wrap justify-center"> <div className="w-2/3 flex items-center max-lg:w-full max-sm:flex-wrap justify-center">

View File

@ -68,7 +68,7 @@ export default function TabController() {
}} }}
className=" bg-blue hover:bg-blue/90 rounded-lg max-sm:text-xs" className=" bg-blue hover:bg-blue/90 rounded-lg max-sm:text-xs"
> >
ثبت درخواست ثبت گزارش
</Button> </Button>
<Search <Search

View File

@ -81,7 +81,7 @@ export default function TableController({ data }: { data: Complaint[] }) {
<TableHead>تاریخ آخرین تغییر</TableHead> <TableHead>تاریخ آخرین تغییر</TableHead>
<TableHead>موضوع</TableHead> <TableHead>موضوع</TableHead>
<TableHead>وضعیت</TableHead> <TableHead>وضعیت</TableHead>
<TableHead>دستگاه مربوطه</TableHead> <TableHead>واحد مرتبط</TableHead>
</TableRow> </TableRow>
</TableHeader> </TableHeader>
<TableBody className="bg-[#F5F5F5]"> <TableBody className="bg-[#F5F5F5]">

View File

@ -38,7 +38,7 @@ const PrintPage: React.FC<PrintPageProps> = ({
className="w-screen h-screen border-2 border-spacing-6 p-36 bg-slate-200 bg-[url('/img/bg-print.jpg')] bg-no-repeat bg-bottom bg-cover font-[yekan]" className="w-screen h-screen border-2 border-spacing-6 p-36 bg-slate-200 bg-[url('/img/bg-print.jpg')] bg-no-repeat bg-bottom bg-cover font-[yekan]"
dir="rtl" dir="rtl"
> >
<div className="flex flex-col absolute top-7 left-28 text-xs gap-1"> <div className="flex flex-col absolute top-[125px] left-[104px] text-xs gap-1">
<p>سامانه نظارت شهرداری یزد</p> <p>سامانه نظارت شهرداری یزد</p>
<p> <p>
تاریخ: <span>{convertedDate}</span> تاریخ: <span>{convertedDate}</span>
@ -55,7 +55,7 @@ const PrintPage: React.FC<PrintPageProps> = ({
</p> </p>
<p> <p>
رمز عبور : <span>{password}</span> رمز عبور : <span className="font-mono">{password}</span>
</p> </p>
</div> </div>
); );

View File

@ -1,21 +1,16 @@
"use client" "use client";
import * as React from "react" import * as React from "react";
import { import * as SelectPrimitive from "@radix-ui/react-select";
CaretSortIcon, import { Check, ChevronDown, ChevronUp } from "lucide-react";
CheckIcon,
ChevronDownIcon,
ChevronUpIcon,
} from "@radix-ui/react-icons"
import * as SelectPrimitive from "@radix-ui/react-select"
import { cn } from "@/lib/utils" import { cn } from "@/lib/utils";
const Select = SelectPrimitive.Root const Select = SelectPrimitive.Root;
const SelectGroup = SelectPrimitive.Group const SelectGroup = SelectPrimitive.Group;
const SelectValue = SelectPrimitive.Value const SelectValue = SelectPrimitive.Value;
const SelectTrigger = React.forwardRef< const SelectTrigger = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Trigger>, React.ElementRef<typeof SelectPrimitive.Trigger>,
@ -24,18 +19,18 @@ const SelectTrigger = React.forwardRef<
<SelectPrimitive.Trigger <SelectPrimitive.Trigger
ref={ref} ref={ref}
className={cn( className={cn(
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
className className
)} )}
{...props} {...props}
> >
{children} {children}
<SelectPrimitive.Icon asChild> <SelectPrimitive.Icon asChild>
<CaretSortIcon className="h-4 w-4 opacity-50" /> <ChevronDown className="h-4 w-4 opacity-50" />
</SelectPrimitive.Icon> </SelectPrimitive.Icon>
</SelectPrimitive.Trigger> </SelectPrimitive.Trigger>
)) ));
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
const SelectScrollUpButton = React.forwardRef< const SelectScrollUpButton = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.ScrollUpButton>, React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
@ -49,10 +44,10 @@ const SelectScrollUpButton = React.forwardRef<
)} )}
{...props} {...props}
> >
<ChevronUpIcon /> <ChevronUp className="h-4 w-4" />
</SelectPrimitive.ScrollUpButton> </SelectPrimitive.ScrollUpButton>
)) ));
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
const SelectScrollDownButton = React.forwardRef< const SelectScrollDownButton = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.ScrollDownButton>, React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
@ -66,11 +61,11 @@ const SelectScrollDownButton = React.forwardRef<
)} )}
{...props} {...props}
> >
<ChevronDownIcon /> <ChevronDown className="h-4 w-4" />
</SelectPrimitive.ScrollDownButton> </SelectPrimitive.ScrollDownButton>
)) ));
SelectScrollDownButton.displayName = SelectScrollDownButton.displayName =
SelectPrimitive.ScrollDownButton.displayName SelectPrimitive.ScrollDownButton.displayName;
const SelectContent = React.forwardRef< const SelectContent = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Content>, React.ElementRef<typeof SelectPrimitive.Content>,
@ -80,7 +75,7 @@ const SelectContent = React.forwardRef<
<SelectPrimitive.Content <SelectPrimitive.Content
ref={ref} ref={ref}
className={cn( className={cn(
"relative z-[100] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
position === "popper" && position === "popper" &&
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
className className
@ -101,8 +96,8 @@ const SelectContent = React.forwardRef<
<SelectScrollDownButton /> <SelectScrollDownButton />
</SelectPrimitive.Content> </SelectPrimitive.Content>
</SelectPrimitive.Portal> </SelectPrimitive.Portal>
)) ));
SelectContent.displayName = SelectPrimitive.Content.displayName SelectContent.displayName = SelectPrimitive.Content.displayName;
const SelectLabel = React.forwardRef< const SelectLabel = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Label>, React.ElementRef<typeof SelectPrimitive.Label>,
@ -110,11 +105,11 @@ const SelectLabel = React.forwardRef<
>(({ className, ...props }, ref) => ( >(({ className, ...props }, ref) => (
<SelectPrimitive.Label <SelectPrimitive.Label
ref={ref} ref={ref}
className={cn("px-2 py-1.5 text-sm font-semibold", className)} className={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
{...props} {...props}
/> />
)) ));
SelectLabel.displayName = SelectPrimitive.Label.displayName SelectLabel.displayName = SelectPrimitive.Label.displayName;
const SelectItem = React.forwardRef< const SelectItem = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Item>, React.ElementRef<typeof SelectPrimitive.Item>,
@ -123,20 +118,21 @@ const SelectItem = React.forwardRef<
<SelectPrimitive.Item <SelectPrimitive.Item
ref={ref} ref={ref}
className={cn( className={cn(
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className className
)} )}
{...props} {...props}
> >
<span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center"> <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
<SelectPrimitive.ItemIndicator> <SelectPrimitive.ItemIndicator>
<CheckIcon className="h-4 w-4" /> <Check className="h-4 w-4" />
</SelectPrimitive.ItemIndicator> </SelectPrimitive.ItemIndicator>
</span> </span>
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText> <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
</SelectPrimitive.Item> </SelectPrimitive.Item>
)) ));
SelectItem.displayName = SelectPrimitive.Item.displayName SelectItem.displayName = SelectPrimitive.Item.displayName;
const SelectSeparator = React.forwardRef< const SelectSeparator = React.forwardRef<
React.ElementRef<typeof SelectPrimitive.Separator>, React.ElementRef<typeof SelectPrimitive.Separator>,
@ -147,8 +143,8 @@ const SelectSeparator = React.forwardRef<
className={cn("-mx-1 my-1 h-px bg-muted", className)} className={cn("-mx-1 my-1 h-px bg-muted", className)}
{...props} {...props}
/> />
)) ));
SelectSeparator.displayName = SelectPrimitive.Separator.displayName SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
export { export {
Select, Select,
@ -161,4 +157,4 @@ export {
SelectSeparator, SelectSeparator,
SelectScrollUpButton, SelectScrollUpButton,
SelectScrollDownButton, SelectScrollDownButton,
} };

View File

@ -14,7 +14,7 @@ export const menuItems = [
export const authorizedMenuItems = [ export const authorizedMenuItems = [
{ id: 1, name: "صفحه اصلی", href: "/" }, { id: 1, name: "صفحه اصلی", href: "/" },
{ id: 2, name: "پیگیری", href: "/FollowUp" }, { id: 2, name: "پیگیری", href: "/FollowUp" },
{ id: 3, name: "درخواست های من", href: "/Account/Complaints" }, { id: 3, name: "گزارش های من", href: "/Account/Complaints" },
{ id: 4, name: "اخبار", href: "/News" }, { id: 4, name: "اخبار", href: "/News" },
{ id: 5, name: "تماس با ما", href: "/CallUs" }, { id: 5, name: "تماس با ما", href: "/CallUs" },
]; ];