Bugs of meeting fixed

Kahdooie
Hossein Rahmani 2024-07-17 13:15:09 +03:30
parent e6194009d5
commit bb86584422
9 changed files with 190 additions and 135 deletions

View File

@ -9,7 +9,6 @@ import { getContents } from "@/utils/commonApi";
import { toast } from "sonner"; import { toast } from "sonner";
export default function AdminWebContents() { export default function AdminWebContents() {
const [contentValueCall, setContentValueCall] = useState(""); const [contentValueCall, setContentValueCall] = useState("");
const [contentValueAbout, setContentValueAbout] = useState(""); const [contentValueAbout, setContentValueAbout] = useState("");
const [contentValueAfter, setContentValueAfter] = useState(""); const [contentValueAfter, setContentValueAfter] = useState("");
@ -25,7 +24,7 @@ export default function AdminWebContents() {
const [contentTitle, setContentTitle] = useState(""); const [contentTitle, setContentTitle] = useState("");
const [contentDesc, setContentDesc] = useState(""); const [contentDesc, setContentDesc] = useState("");
var toolbarOptions = [ var toolbarOptions = [
["bold", "italic", "underline", "strike"], // toggled buttons ["bold", "italic", "underline", "strike"], // toggled buttons
["blockquote", "code-block"], ["blockquote", "code-block"],
@ -75,40 +74,38 @@ export default function AdminWebContents() {
queryFn: () => getContents(), queryFn: () => getContents(),
refetchOnWindowFocus: false, refetchOnWindowFocus: false,
}); });
useEffect(() => { useEffect(() => {
// if (isInitialRender2 && isSuccess1) { // if (isInitialRender2 && isSuccess1) {
if (isSuccess1) { if (isSuccess1) {
// { // {
data1?.map((item: any) => { data1?.map((item: any) => {
if (item.title === "CallUs") { if (item.title === "CallUs") {
setContentValueCall(item.content); setContentValueCall(item.content);
setCallId(item.id); setCallId(item.id);
setCallBtn("Edit"); setCallBtn("Edit");
} }
if (item.title === "AboutUs") { if (item.title === "AboutUs") {
setContentValueAbout(item.content); setContentValueAbout(item.content);
setAboutId(item.id); setAboutId(item.id);
setAboutBtn("Edit"); setAboutBtn("Edit");
} }
if (item.title === "AfterRegistration") { if (item.title === "AfterRegistration") {
setContentValueAfter(item.content); setContentValueAfter(item.content);
setAfterId(item.id); setAfterId(item.id);
setAfterBtn("Edit"); setAfterBtn("Edit");
} }
if (item.title === "BeforeRegistration") { if (item.title === "BeforeRegistration") {
setContentValueBefore(item.content); setContentValueBefore(item.content);
setBeforeId(item.id); setBeforeId(item.id);
setBeforeBtn("Edit"); setBeforeBtn("Edit");
} }
}); });
} }
}, [isSuccess1 , refetch1]); }, [isSuccess1, refetch1]);
// Add // Add
// ............'Mutation' Change Key Submit // ............'Mutation' Change Key Submit
@ -131,7 +128,6 @@ export default function AdminWebContents() {
className: "!bg-red-500 !text-white", className: "!bg-red-500 !text-white",
}); });
refetch1(); refetch1();
}, },
}); });
@ -140,7 +136,6 @@ export default function AdminWebContents() {
mutationKey: ["EditWebContents"], mutationKey: ["EditWebContents"],
mutationFn: UpdateWebContents, mutationFn: UpdateWebContents,
onSuccess: (res) => { onSuccess: (res) => {
toast("عملیات ویرایش شما با موفقیت انجام شد . ", { toast("عملیات ویرایش شما با موفقیت انجام شد . ", {
className: "!bg-green-500 !text-white", className: "!bg-green-500 !text-white",
}); });
@ -216,7 +211,7 @@ export default function AdminWebContents() {
formData.append("title", "AfterRegistration"); formData.append("title", "AfterRegistration");
formData.append("description", "AfterRegistration...."); formData.append("description", "AfterRegistration....");
formData.append("Content", contentValueAfter); formData.append("Content", contentValueAfter);
EditWebContents.mutate({ id: afterId, payload: formData }); EditWebContents.mutate({ id: afterId, payload: formData });
} }
function onEditBeforeText() { function onEditBeforeText() {
@ -229,7 +224,7 @@ export default function AdminWebContents() {
return ( return (
<div className="w-full min-h-[85vh] flex justify-center"> <div className="w-full min-h-[85vh] flex justify-center">
<div className="w-[95vw] lg:w-[85vw] 3xl:w-[70vw] mt-8 max-sm:mt-16 pt-9 "> <div className="w-[95vw] lg:w-[85vw] 3xl:w-[70vw] mt-8 max-sm:mt-16 pt-9 pb-6 ">
{/* Cull Us */} {/* Cull Us */}
<div className="flex flex-col w-full"> <div className="flex flex-col w-full">
<div className="my-4 text-base font-bold text-right text-neutral-600"> <div className="my-4 text-base font-bold text-right text-neutral-600">
@ -269,8 +264,8 @@ export default function AdminWebContents() {
<ReactQuill <ReactQuill
modules={modules} modules={modules}
theme="snow" theme="snow"
value={contentValueAbout} value={contentValueAbout}
onChange={setContentValueAbout} onChange={setContentValueAbout}
style={editorStyles} style={editorStyles}
/> />
<Button <Button
@ -288,6 +283,34 @@ export default function AdminWebContents() {
</Button> </Button>
</div> </div>
{/* BeforeRegistration*/}
<div className="flex flex-col w-full">
<div className="my-4 text-base font-bold text-right text-neutral-600">
محتوای قبل از ثبت گزارش
</div>
<ReactQuill
modules={modules}
theme="snow"
value={contentValueBefore}
onChange={setContentValueBefore}
style={editorStyles}
/>
<Button
type="submit"
onClick={() => {
if (beforeBtn === "Add") {
onSubmitAddBeforeText();
} else if (beforeBtn === "Edit") {
onEditBeforeText();
}
}}
className="self-end w-1/6 my-2"
>
ثبت
</Button>
</div>
{/* AfterRegistration */} {/* AfterRegistration */}
<div className="flex flex-col w-full"> <div className="flex flex-col w-full">
<div className="my-4 text-base font-bold text-right text-neutral-600"> <div className="my-4 text-base font-bold text-right text-neutral-600">
@ -297,7 +320,7 @@ export default function AdminWebContents() {
<ReactQuill <ReactQuill
modules={modules} modules={modules}
theme="snow" theme="snow"
value={contentValueAfter} value={contentValueAfter}
onChange={setContentValueAfter} onChange={setContentValueAfter}
style={editorStyles} style={editorStyles}
/> />
@ -315,34 +338,6 @@ export default function AdminWebContents() {
ثبت ثبت
</Button> </Button>
</div> </div>
{/* BeforeRegistration*/}
<div className="flex flex-col w-full">
<div className="my-4 text-base font-bold text-right text-neutral-600">
محتوای قبل از ثبت گزارش
</div>
<ReactQuill
modules={modules}
theme="snow"
value={contentValueBefore}
onChange={setContentValueBefore}
style={editorStyles}
/>
<Button
type="submit"
onClick={() => {
if (beforeBtn === "Add") {
onSubmitAddBeforeText();
} else if (beforeBtn === "Edit") {
onEditBeforeText();
}
}}
className="self-end w-1/6 my-2"
>
ثبت
</Button>
</div>
</div> </div>
</div> </div>
); );

View File

@ -7,53 +7,101 @@ 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";
export default function AttachmentsDialog({ export default function AttachmentsDialog({
children, children,
attachments, attachments,
deleteFile, deleteFile,
deleteAllAttachmentsFiles,
}: { }: {
children: React.ReactNode; children: React.ReactNode;
attachments: File[] | []; attachments: File[] | [];
deleteFile: (file: any) => void; deleteFile: (file: any) => void;
deleteAllAttachmentsFiles: () => void;
}) { }) {
return ( return (
<Dialog> <Dialog>
{children} {children}
<DialogContent> <DialogContent className=" max-h-[95vh] overflow-y-auto max-sm:p-0">
<DialogHeader> <AlertDialog>
<DialogTitle>پیوست‌ها</DialogTitle> <DialogHeader>
<DialogDescription> <DialogTitle className=" mt-7">پیوست‌ها</DialogTitle>
{attachments.length == 0 ? ( <DialogDescription className="max-md:px-2 py-5 w-full">
<div className=" text-center my-5">هیج پیوستی وجود ندارد.</div> {attachments.length != 0 && (
) : ( <AlertDialogTrigger>
<div className=" flex flex-col gap-2 mt-2"> <Button className=" mb-2 absolute right-3 top-1 p-1 bg-white hover:bg-white text-red-600 ">
{attachments?.map((item, index) => { حذف همه
return ( </Button>{" "}
<div </AlertDialogTrigger>
key={index} )}
className=" flex gap-2 w-full items-center"
>
<div className=" p-2 bg-blue w-10 grid place-content-center rounded-lg text-white">
{index + 1}
</div>
<div className="bg-gray-200 p-2 rounded-lg max-w-full justify-between flex flex-1">
<div className="">
<p className=" truncate">{item.name}</p>
</div>
<X {attachments.length == 0 ? (
onClick={() => deleteFile(item.name)} <div className=" text-center my-5">هیج پیوستی وجود ندارد.</div>
className=" cursor-pointer hover:drop-shadow-md" ) : (
/> <div className=" flex flex-col gap-2 mt-2 h-full mx-2">
{attachments?.map((item, index) => {
return (
<div
key={index}
className=" flex gap-2 w-full items-center"
>
<div className=" p-2 bg-blue w-10 grid place-content-center rounded-lg text-white">
{index + 1}
</div>
<div className="bg-gray-200 p-2 rounded-lg max-w-full justify-between flex flex-1">
<div className="">
<p className=" truncate max-w-[16rem]">
{item.name}
</p>
</div>
<X
onClick={() => deleteFile(item.name)}
className=" cursor-pointer hover:drop-shadow-md"
/>
</div>
</div> </div>
</div> );
); })}
})} </div>
</div> )}
)}
</DialogDescription> <AlertDialogContent>
</DialogHeader> <AlertDialogHeader>
<AlertDialogTitle>
آیا میخواهید همه ی فایل ها را حذف کنید؟
</AlertDialogTitle>
<AlertDialogDescription></AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter className=" gap-2">
<AlertDialogCancel className=" flex-1">
لغو
</AlertDialogCancel>
<AlertDialogAction
className=" flex-1"
onClick={() => deleteAllAttachmentsFiles()}
>
تایید
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</DialogDescription>
</DialogHeader>
</AlertDialog>
</DialogContent> </DialogContent>
</Dialog> </Dialog>
); );

View File

@ -90,7 +90,11 @@ export default function ComplainsDetails({
data = getComplaintMutation.data; data = getComplaintMutation.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();
@ -109,9 +113,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>");
@ -261,7 +263,7 @@ export default function ComplainsDetails({
<div className="flex items-start w-full gap-2 mt-2 max-lg:flex-col lg:h-[80vh] mb-10"> <div className="flex items-start w-full gap-2 mt-2 max-lg:flex-col lg:h-[80vh] mb-10">
{/* 1 */} {/* 1 */}
<div className="flex flex-col w-full lg:w-1/3 gap-3 lg:sticky top-28 lg:h-[80vh] max-lg:order-3"> <div className="flex flex-col w-full lg:w-1/3 gap-3 lg:sticky top-28 lg:h-[80vh] max-lg:order-3">
<div className=" bg-[#E9E9E9] rounded-md p-4 px-10 flex flex-col lg:h-full"> <div className=" bg-[#E9E9E9] rounded-md p-4 px-6 flex flex-col lg:h-full">
<p className="text-[#464646] text-base font-bold mb-1"> <p className="text-[#464646] text-base font-bold mb-1">
انجام عملیات انجام عملیات
</p> </p>
@ -276,7 +278,7 @@ export default function ComplainsDetails({
</div> </div>
{/* 2 */} {/* 2 */}
<div className="flex flex-col self-stretch w-full gap-2 rounded-lg lg:w-2/3 "> <div className="flex flex-col self-stretch w-full gap-2 rounded-lg lg:w-2/3 ">
<div className=" bg-[#E9E9E9] rounded-md py-5 px-10 flex flex-col md:flex-row gap-2 min-h-56 items-stretch justify-center"> <div className=" bg-[#E9E9E9] rounded-md py-5 px-6 flex flex-col md:flex-row gap-2 min-h-56 items-stretch justify-center">
{data.user == null ? ( {data.user == null ? (
<> <>
<div className="relative flex flex-col w-full p-5 mt-2 border border-gray-400 rounded-md gap-y-1"> <div className="relative flex flex-col w-full p-5 mt-2 border border-gray-400 rounded-md gap-y-1">
@ -290,7 +292,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
@ -298,7 +300,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>
@ -338,7 +340,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
@ -346,7 +348,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>
@ -419,9 +421,9 @@ export default function ComplainsDetails({
)} )}
</div> </div>
<div className="h-[calc(80vh-12.8em)] max-h-[calc(80vh-12.8em)] overflow-hidden"> <div className="h-[calc(80vh-12.8em)] max-h-[calc(80vh-12.8em)] 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-6 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-y-auto className="flex flex-col mt-4 gap-y-4 overflow-y-auto
@ -458,23 +460,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"
onClick={() =>
openFileInNewTab(
item.data,
item.mimeType,
item.title
)
}
> >
<a <a className="flex items-center gap-2 truncate cursor-pointer ">
onClick={() =>
openFileInNewTab(
item.data,
item.mimeType
)
}
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(
@ -483,7 +484,7 @@ export default function ComplainsDetails({
item.mimeType item.mimeType
) )
} }
/> /> */}
</div> </div>
); );
})} })}

View File

@ -154,6 +154,11 @@ export default function InspectorOperations({
} }
OperationMutation.mutate(formData); OperationMutation.mutate(formData);
} }
const deleteAllAttachmentsFiles = () => {
setFile([]);
// @ts-expect-error
form.setValue("media", []);
};
const deleteFileFromAttachments = (File: any) => { const deleteFileFromAttachments = (File: any) => {
const filtered = file?.filter((item) => item.name !== File); const filtered = file?.filter((item) => item.name !== File);
@ -187,7 +192,7 @@ export default function InspectorOperations({
<FormControl> <FormControl>
<Textarea <Textarea
// placeholder="متن خود را وارد نمایید" // placeholder="متن خود را وارد نمایید"
className="resize-none bg-white lg:min-h-[20em]" className="resize-none bg-white lg:min-h-[18em]"
{...field} {...field}
disabled={possibleOperations.length == 0} disabled={possibleOperations.length == 0}
/> />
@ -214,6 +219,7 @@ export default function InspectorOperations({
<AttachmentsDialog <AttachmentsDialog
attachments={file} attachments={file}
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" />
@ -243,8 +249,13 @@ export default function InspectorOperations({
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 = fileArray1.concat(fileArray2);
setFile(mergedArray); const uniqueFiles = Array.from(
field.onChange(mergedArray); new Map(
mergedArray.map((file: any) => [file.name, file])
).values()
);
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);
@ -257,7 +268,7 @@ export default function InspectorOperations({
<FormDescription className=" text-xs my-1 "> <FormDescription className=" text-xs my-1 ">
<span> <span>
حجم هر فایل حداکثر می بایست {formatSize(data?.maxFileSize)}{" "} حجم هر فایل حداکثر می بایست {formatSize(data?.maxFileSize)}{" "}
مگابایت باشد باشد
</span>{" "} </span>{" "}
و{" "} و{" "}
{`تعداد فایل های پیوست شده می بایست حداکثر ${data?.maxFileCount} تا باشد.`} {`تعداد فایل های پیوست شده می بایست حداکثر ${data?.maxFileCount} تا باشد.`}
@ -308,7 +319,7 @@ export default function InspectorOperations({
disabled={possibleOperations.length == 0} disabled={possibleOperations.length == 0}
/> />
</FormControl> </FormControl>
<FormLabel className="font-normal">عمومی</FormLabel> <FormLabel className="font-normal">گزارشگر</FormLabel>
</FormItem> </FormItem>
</RadioGroup> </RadioGroup>
</FormControl> </FormControl>
@ -352,7 +363,7 @@ export default function InspectorOperations({
</FormControl> </FormControl>
<SelectContent dir="rtl"> <SelectContent dir="rtl">
<SelectGroup> <SelectGroup>
<SelectLabel>عملیات</SelectLabel> <SelectLabel>نوع عملیات</SelectLabel>
{possibleOperations.map((item: any) => { {possibleOperations.map((item: any) => {
return ( return (
<SelectItem <SelectItem

View File

@ -175,7 +175,7 @@ export default function TabController() {
{" "} {" "}
{data?.data.length == 0 && ( {data?.data.length == 0 && (
<p className="flex justify-center mx-auto mt-10 text-blue/50"> <p className="flex justify-center mx-auto mt-10 text-blue/50">
درخواستی وجود ندارد گزارشی وجود ندارد
</p> </p>
)} )}
</> </>
@ -332,7 +332,7 @@ export default function TabController() {
{" "} {" "}
{data?.data.length == 0 && ( {data?.data.length == 0 && (
<p className="flex justify-center mx-auto mt-10 text-blue/50"> <p className="flex justify-center mx-auto mt-10 text-blue/50">
درخواستی وجود ندارد گزارشی وجود ندارد
</p> </p>
)} )}
</> </>

View File

@ -74,7 +74,7 @@ export default function TableController({
<TableHead> تاریخ ثبت</TableHead> <TableHead> تاریخ ثبت</TableHead>
<TableHead>تاریخ آخرین تغییر</TableHead> <TableHead>تاریخ آخرین تغییر</TableHead>
<TableHead>موضوع</TableHead> <TableHead>موضوع</TableHead>
<TableHead>دستگاه مربوطه</TableHead> <TableHead>دستگاه مرتبط</TableHead>
</TableRow> </TableRow>
</TableHeader> </TableHeader>
<TableBody className="bg-[#F5F5F5] min-h-[20rem] "> <TableBody className="bg-[#F5F5F5] min-h-[20rem] ">

View File

@ -115,7 +115,7 @@ const AlertDialogAction = React.forwardRef<
>(({ className, ...props }, ref) => ( >(({ className, ...props }, ref) => (
<AlertDialogPrimitive.Action <AlertDialogPrimitive.Action
ref={ref} ref={ref}
className={cn(buttonVariants(), className)} className={cn(buttonVariants(), "mt-2 sm:mt-0", className)}
{...props} {...props}
/> />
)); ));

View File

@ -24,7 +24,7 @@ export const boxItems = [
name: "ثبت شکایت", name: "ثبت شکایت",
icon: "/img/box1.svg", icon: "/img/box1.svg",
icon2: "/img/box1-hover.svg", icon2: "/img/box1-hover.svg",
description: "ارسال درخواست نارضایتی از پرسنل", description: "ارسال گزارش نارضایتی از پرسنل",
link: "/RequestStep1", link: "/RequestStep1",
}, },
{ {
@ -32,7 +32,7 @@ export const boxItems = [
name: "پیگیری شکایت", name: "پیگیری شکایت",
icon: "/img/box2.svg", icon: "/img/box2.svg",
icon2: "/img/box2-hover.svg", icon2: "/img/box2-hover.svg",
description: "پیگیری درخواست ارسال شده", description: "پیگیری گزارش ارسال شده",
link: "/FollowUp", link: "/FollowUp",
}, },
{ {
@ -40,7 +40,7 @@ export const boxItems = [
name: "ثبت شکایت(شناس)", name: "ثبت شکایت(شناس)",
icon: "/img/box1.svg", icon: "/img/box1.svg",
icon2: "/img/box1-hover.svg", icon2: "/img/box1-hover.svg",
description: "ارسال درخواست نارضایتی از پرسنل", description: "ارسال گزارش نارضایتی از پرسنل",
link: "/CitizenLogin", link: "/CitizenLogin",
}, },
// { // {

View File

@ -36,7 +36,7 @@ const useSignalR = () => {
postConnectionIdMutation.mutate(connection.connectionId); postConnectionIdMutation.mutate(connection.connectionId);
connection.on("Created", (message) => { connection.on("Created", (message) => {
queryClient.invalidateQueries(["ComplaintsList"]); queryClient.invalidateQueries(["ComplaintsList"]);
toast.info("یک درخواست جدید دارید."); toast.info("یک گزارش جدید دارید.");
}); });
connection.on("Updated", (message, id) => { connection.on("Updated", (message, id) => {
toast.info(`${message}`); toast.info(`${message}`);