Compare commits
No commits in common. "bb865844220acf9b30c17c683e051683e05099d0" and "c3e22fae229f178c0d982d6951092d52f591240c" have entirely different histories.
bb86584422
...
c3e22fae22
|
|
@ -9,6 +9,7 @@ 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("");
|
||||||
|
|
@ -75,6 +76,7 @@ export default function AdminWebContents() {
|
||||||
refetchOnWindowFocus: false,
|
refetchOnWindowFocus: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// if (isInitialRender2 && isSuccess1) {
|
// if (isInitialRender2 && isSuccess1) {
|
||||||
if (isSuccess1) {
|
if (isSuccess1) {
|
||||||
|
|
@ -105,7 +107,8 @@ export default function AdminWebContents() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [isSuccess1, refetch1]);
|
}, [isSuccess1 , refetch1]);
|
||||||
|
|
||||||
|
|
||||||
// Add
|
// Add
|
||||||
// ............'Mutation' Change Key Submit
|
// ............'Mutation' Change Key Submit
|
||||||
|
|
@ -128,6 +131,7 @@ export default function AdminWebContents() {
|
||||||
className: "!bg-red-500 !text-white",
|
className: "!bg-red-500 !text-white",
|
||||||
});
|
});
|
||||||
refetch1();
|
refetch1();
|
||||||
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -136,6 +140,7 @@ 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",
|
||||||
});
|
});
|
||||||
|
|
@ -224,7 +229,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 pb-6 ">
|
<div className="w-[95vw] lg:w-[85vw] 3xl:w-[70vw] mt-8 max-sm:mt-16 pt-9 ">
|
||||||
{/* 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">
|
||||||
|
|
@ -283,34 +288,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>
|
|
||||||
|
|
||||||
{/* 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">
|
||||||
|
|
@ -338,6 +315,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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -7,52 +7,27 @@ 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 className=" max-h-[95vh] overflow-y-auto max-sm:p-0">
|
<DialogContent>
|
||||||
<AlertDialog>
|
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle className=" mt-7">پیوستها</DialogTitle>
|
<DialogTitle>پیوستها</DialogTitle>
|
||||||
<DialogDescription className="max-md:px-2 py-5 w-full">
|
<DialogDescription>
|
||||||
{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 h-full mx-2">
|
<div className=" flex flex-col gap-2 mt-2">
|
||||||
{attachments?.map((item, index) => {
|
{attachments?.map((item, index) => {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
|
@ -64,9 +39,7 @@ 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]">
|
<p className=" truncate">{item.name}</p>
|
||||||
{item.name}
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<X
|
<X
|
||||||
|
|
@ -79,29 +52,8 @@ 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,11 +90,7 @@ export default function ComplainsDetails({
|
||||||
data = getComplaintMutation.data;
|
data = getComplaintMutation.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
const openFileInNewTab = (
|
const openFileInNewTab = (base64Data: any, fileType: any) => {
|
||||||
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();
|
||||||
|
|
@ -113,7 +109,9 @@ export default function ComplainsDetails({
|
||||||
`<iframe width="100%" height="100%" src="${blobUrl}"></iframe>`
|
`<iframe width="100%" height="100%" src="${blobUrl}"></iframe>`
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
downloadFile(base64Data, fileName, fileType);
|
newTab.document.write(
|
||||||
|
`<a href="${blobUrl}" target="_blank">Open in New Tab</a>`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
newTab.document.write("</body></html>");
|
newTab.document.write("</body></html>");
|
||||||
|
|
@ -263,7 +261,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-6 flex flex-col lg:h-full">
|
<div className=" bg-[#E9E9E9] rounded-md p-4 px-10 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>
|
||||||
|
|
@ -278,7 +276,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-6 flex flex-col md:flex-row gap-2 min-h-56 items-stretch justify-center">
|
<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">
|
||||||
{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">
|
||||||
|
|
@ -292,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
|
||||||
|
|
@ -300,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>
|
||||||
|
|
@ -340,7 +338,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
|
||||||
|
|
@ -348,7 +346,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>
|
||||||
|
|
@ -421,9 +419,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-6 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-y-auto
|
className="flex flex-col mt-4 gap-y-4 overflow-y-auto
|
||||||
|
|
@ -460,22 +458,23 @@ 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 cursor-pointer"
|
className=" bg-gray-100 text-[#7C838A] w-full md:w-[30%] rounded-md h-12 p-2 flex justify-between gap-3 items-center"
|
||||||
|
>
|
||||||
|
<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-full truncate">
|
<p className=" max-w-[5rem] truncate">
|
||||||
{item.title}
|
{item.title}
|
||||||
</p>
|
</p>
|
||||||
</a>
|
</a>
|
||||||
{/* <ArrowDownToLine
|
<ArrowDownToLine
|
||||||
className="cursor-pointer "
|
className="cursor-pointer "
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
downloadFile(
|
downloadFile(
|
||||||
|
|
@ -484,7 +483,7 @@ export default function ComplainsDetails({
|
||||||
item.mimeType
|
item.mimeType
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/> */}
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
|
||||||
|
|
@ -154,11 +154,6 @@ 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);
|
||||||
|
|
@ -192,7 +187,7 @@ export default function InspectorOperations({
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Textarea
|
<Textarea
|
||||||
// placeholder="متن خود را وارد نمایید"
|
// placeholder="متن خود را وارد نمایید"
|
||||||
className="resize-none bg-white lg:min-h-[18em]"
|
className="resize-none bg-white lg:min-h-[20em]"
|
||||||
{...field}
|
{...field}
|
||||||
disabled={possibleOperations.length == 0}
|
disabled={possibleOperations.length == 0}
|
||||||
/>
|
/>
|
||||||
|
|
@ -219,7 +214,6 @@ 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" />
|
||||||
|
|
@ -249,13 +243,8 @@ 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);
|
||||||
const uniqueFiles = Array.from(
|
setFile(mergedArray);
|
||||||
new Map(
|
field.onChange(mergedArray);
|
||||||
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);
|
||||||
|
|
@ -268,7 +257,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} تا باشد.`}
|
||||||
|
|
@ -319,7 +308,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>
|
||||||
|
|
@ -363,7 +352,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
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ export default function Login() {
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="grid w-screen h-screen bg-left-top bg-repeat bg-[url('/img/login-pattern.png')] place-content-center">
|
<div className="grid w-screen h-screen bg-gray-200 place-content-center">
|
||||||
<div
|
<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]
|
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"
|
h-fit"
|
||||||
|
|
|
||||||
|
|
@ -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] ">
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ export default function Verify() {
|
||||||
}, [otp]);
|
}, [otp]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="grid w-screen h-screen bg-left-top bg-repeat bg-[url('/img/login-pattern.png')] place-content-center">
|
<div className="grid w-screen h-screen bg-gray-200 place-content-center">
|
||||||
<div
|
<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]
|
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 relative"
|
h-fit relative"
|
||||||
|
|
|
||||||
|
|
@ -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(), "mt-2 sm:mt-0", className)}
|
className={cn(buttonVariants(), 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}`);
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "sootzani",
|
"name": "sootzani",
|
||||||
"version": "0.2.20",
|
"version": "0.2.18",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "sootzani",
|
"name": "sootzani",
|
||||||
"version": "0.2.20",
|
"version": "0.2.18",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hookform/resolvers": "^3.3.2",
|
"@hookform/resolvers": "^3.3.2",
|
||||||
"@microsoft/signalr": "^8.0.0",
|
"@microsoft/signalr": "^8.0.0",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "sootzani",
|
"name": "sootzani",
|
||||||
"version": "0.2.20",
|
"version": "0.2.18",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 548 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 34 KiB |
Loading…
Reference in New Issue