Bugs of meeting fixed
parent
e6194009d5
commit
bb86584422
|
|
@ -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("");
|
||||||
|
|
@ -76,7 +75,6 @@ export default function AdminWebContents() {
|
||||||
refetchOnWindowFocus: false,
|
refetchOnWindowFocus: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// if (isInitialRender2 && isSuccess1) {
|
// if (isInitialRender2 && isSuccess1) {
|
||||||
if (isSuccess1) {
|
if (isSuccess1) {
|
||||||
|
|
@ -109,7 +107,6 @@ export default function AdminWebContents() {
|
||||||
}
|
}
|
||||||
}, [isSuccess1, refetch1]);
|
}, [isSuccess1, refetch1]);
|
||||||
|
|
||||||
|
|
||||||
// Add
|
// Add
|
||||||
// ............'Mutation' Change Key Submit
|
// ............'Mutation' Change Key Submit
|
||||||
const AddWebContents = useMutation({
|
const AddWebContents = useMutation({
|
||||||
|
|
@ -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",
|
||||||
});
|
});
|
||||||
|
|
@ -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">
|
||||||
|
|
@ -288,34 +283,6 @@ export default function AdminWebContents() {
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* AfterRegistration */}
|
|
||||||
<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={contentValueAfter}
|
|
||||||
onChange={setContentValueAfter}
|
|
||||||
style={editorStyles}
|
|
||||||
/>
|
|
||||||
<Button
|
|
||||||
type="submit"
|
|
||||||
onClick={() => {
|
|
||||||
if (afterBtn === "Add") {
|
|
||||||
onSubmitAddَAfterText();
|
|
||||||
} else if (afterBtn === "Edit") {
|
|
||||||
onEditAfterText();
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
className="self-end w-1/6 my-2"
|
|
||||||
>
|
|
||||||
ثبت
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* BeforeRegistration*/}
|
{/* BeforeRegistration*/}
|
||||||
<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">
|
||||||
|
|
@ -343,6 +310,34 @@ export default function AdminWebContents() {
|
||||||
ثبت
|
ثبت
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* AfterRegistration */}
|
||||||
|
<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={contentValueAfter}
|
||||||
|
onChange={setContentValueAfter}
|
||||||
|
style={editorStyles}
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
type="submit"
|
||||||
|
onClick={() => {
|
||||||
|
if (afterBtn === "Add") {
|
||||||
|
onSubmitAddَAfterText();
|
||||||
|
} else if (afterBtn === "Edit") {
|
||||||
|
onEditAfterText();
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
className="self-end w-1/6 my-2"
|
||||||
|
>
|
||||||
|
ثبت
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -7,27 +7,52 @@ 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">
|
||||||
|
<AlertDialog>
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>پیوستها</DialogTitle>
|
<DialogTitle className=" mt-7">پیوستها</DialogTitle>
|
||||||
<DialogDescription>
|
<DialogDescription className="max-md:px-2 py-5 w-full">
|
||||||
|
{attachments.length != 0 && (
|
||||||
|
<AlertDialogTrigger>
|
||||||
|
<Button className=" mb-2 absolute right-3 top-1 p-1 bg-white hover:bg-white text-red-600 ">
|
||||||
|
حذف همه
|
||||||
|
</Button>{" "}
|
||||||
|
</AlertDialogTrigger>
|
||||||
|
)}
|
||||||
|
|
||||||
{attachments.length == 0 ? (
|
{attachments.length == 0 ? (
|
||||||
<div className=" text-center my-5">هیج پیوستی وجود ندارد.</div>
|
<div className=" text-center my-5">هیج پیوستی وجود ندارد.</div>
|
||||||
) : (
|
) : (
|
||||||
<div className=" flex flex-col gap-2 mt-2">
|
<div className=" flex flex-col gap-2 mt-2 h-full mx-2">
|
||||||
{attachments?.map((item, index) => {
|
{attachments?.map((item, index) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
|
@ -39,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">{item.name}</p>
|
<p className=" truncate max-w-[16rem]">
|
||||||
|
{item.name}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<X
|
<X
|
||||||
|
|
@ -52,8 +79,29 @@ export default function AttachmentsDialog({
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
<AlertDialogContent>
|
||||||
|
<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>
|
</DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
|
</AlertDialog>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
>
|
|
||||||
<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(
|
||||||
|
|
@ -483,7 +484,7 @@ export default function ComplainsDetails({
|
||||||
item.mimeType
|
item.mimeType
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/> */}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -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] ">
|
||||||
|
|
|
||||||
|
|
@ -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}
|
||||||
/>
|
/>
|
||||||
));
|
));
|
||||||
|
|
|
||||||
|
|
@ -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",
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
|
|
|
||||||
|
|
@ -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}`);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue