Bugs Fixed
parent
e1d9413e99
commit
b5c5d2963d
|
|
@ -118,7 +118,10 @@ export default function ComplainsDetails({
|
||||||
<div className=" flex flex-col gap-y-4 mt-4">
|
<div className=" flex flex-col gap-y-4 mt-4">
|
||||||
{data.contents?.map((item: any) => {
|
{data.contents?.map((item: any) => {
|
||||||
return (
|
return (
|
||||||
<div key={item.id} className=" bg-white p-4 rounded-lg shadow-md">
|
<div
|
||||||
|
key={item.id}
|
||||||
|
className=" bg-white p-4 rounded-lg shadow-md"
|
||||||
|
>
|
||||||
<div className=" flex gap-4 items-center">
|
<div className=" flex gap-4 items-center">
|
||||||
<p className="">
|
<p className="">
|
||||||
<Badge>{item.sender == 0 ? "شهروند" : "بازرس"}</Badge>
|
<Badge>{item.sender == 0 ? "شهروند" : "بازرس"}</Badge>
|
||||||
|
|
@ -139,86 +142,6 @@ export default function ComplainsDetails({
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
{/* {data.contents?.map((item: any) => {
|
|
||||||
return (
|
|
||||||
<div key={item.id} className=" bg-white p-4 rounded-lg shadow-md">
|
|
||||||
<div className=" flex gap-4 items-center">
|
|
||||||
<p className="">
|
|
||||||
<Badge>{item.sender == 0 ? "شهروند" : "بازرس"}</Badge>
|
|
||||||
</p>
|
|
||||||
<p className="">
|
|
||||||
تاریخ :
|
|
||||||
<span className="text-[#7C838A]">
|
|
||||||
{convertDate(item.dateTime)}
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div className=" text-[#7C838A] mt-2">
|
|
||||||
متن: {item.text ? item.text : "-"}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
{data.contents?.map((item: any) => {
|
|
||||||
return (
|
|
||||||
<div className=" bg-white p-4 rounded-lg shadow-md">
|
|
||||||
<div className=" flex gap-4 items-center">
|
|
||||||
<p className="">
|
|
||||||
<Badge>{item.sender == 0 ? "شهروند" : "بازرس"}</Badge>
|
|
||||||
</p>
|
|
||||||
<p className="">
|
|
||||||
تاریخ :
|
|
||||||
<span className="text-[#7C838A]">
|
|
||||||
{convertDate(item.dateTime)}
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div className=" text-[#7C838A] mt-2">
|
|
||||||
متن: {item.text ? item.text : "-"}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
{data.contents?.map((item: any) => {
|
|
||||||
return (
|
|
||||||
<div className=" bg-white p-4 rounded-lg shadow-md">
|
|
||||||
<div className=" flex gap-4 items-center">
|
|
||||||
<p className="">
|
|
||||||
<Badge>{item.sender == 0 ? "شهروند" : "بازرس"}</Badge>
|
|
||||||
</p>
|
|
||||||
<p className="">
|
|
||||||
تاریخ :
|
|
||||||
<span className="text-[#7C838A]">
|
|
||||||
{convertDate(item.dateTime)}
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div className=" text-[#7C838A] mt-2">
|
|
||||||
متن: {item.text ? item.text : "-"}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
{data.contents?.map((item: any) => {
|
|
||||||
return (
|
|
||||||
<div className=" bg-white p-4 rounded-lg shadow-md">
|
|
||||||
<div className=" flex gap-4 items-center">
|
|
||||||
<p className="">
|
|
||||||
<Badge>{item.sender == 0 ? "شهروند" : "بازرس"}</Badge>
|
|
||||||
</p>
|
|
||||||
<p className="">
|
|
||||||
تاریخ :
|
|
||||||
<span className="text-[#7C838A]">
|
|
||||||
{convertDate(item.dateTime)}
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div className=" text-[#7C838A] mt-2">
|
|
||||||
متن: {item.text ? item.text : "-"}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className=" lg:hidden order-2 w-full bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col">
|
<div className=" lg:hidden order-2 w-full bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col">
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ export default function FollowResult() {
|
||||||
const [complaintData, setComplaintData] = useState<any>();
|
const [complaintData, setComplaintData] = useState<any>();
|
||||||
const [printStyle, setPrintStyle] = useState<boolean>(true);
|
const [printStyle, setPrintStyle] = useState<boolean>(true);
|
||||||
|
|
||||||
|
|
||||||
// Print component Data
|
// Print component Data
|
||||||
const componentRef = useRef<HTMLDivElement>(null);
|
const componentRef = useRef<HTMLDivElement>(null);
|
||||||
const handlePrint = useReactToPrint({
|
const handlePrint = useReactToPrint({
|
||||||
|
|
@ -128,39 +127,6 @@ export default function FollowResult() {
|
||||||
</AlertDialogTitle>
|
</AlertDialogTitle>
|
||||||
|
|
||||||
<AlertDialogDescription className="h-full px-0 py-0 sm:px-0 sm:pt-0 ">
|
<AlertDialogDescription className="h-full px-0 py-0 sm:px-0 sm:pt-0 ">
|
||||||
{complaintPrintMutation.isPending ? (
|
|
||||||
<div className="felx justify-center items-center self-center h-full">
|
|
||||||
<ThreeDots
|
|
||||||
visible={true}
|
|
||||||
height="80"
|
|
||||||
width="100"
|
|
||||||
color="#003778"
|
|
||||||
radius="9"
|
|
||||||
ariaLabel="three-dots-loading"
|
|
||||||
wrapperStyle={{}}
|
|
||||||
wrapperClass=""
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
) : (
|
|
||||||
<div dir="rtl" className=" font-[yekan] px-10 py-4 sm:px-28 sm:pt-9 " id="details" ref={componentRef}
|
|
||||||
// style={{ border: printStyle ? 'none' : '5px solid black' , margin: printStyle ? 'auto': '1em' }}
|
|
||||||
>
|
|
||||||
<p className="text-[#464646] text-sm font-medium">
|
|
||||||
{" "}
|
|
||||||
موضوع شکایت:{" "}
|
|
||||||
<span className="text-[#7C838A] text-sm font-medium">
|
|
||||||
{`${complaintData?.title}`}
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
<p className="text-[#464646] text-sm font-medium">
|
|
||||||
{" "}
|
|
||||||
متن شکایت:{" "}
|
|
||||||
<span className="text-[#7C838A] text-sm font-medium">
|
|
||||||
{`${complaintData?.contents[0]?.text}`}
|
|
||||||
</span>
|
|
||||||
</p>
|
|
||||||
<br />
|
|
||||||
<AlertDialogDescription className="h-full">
|
|
||||||
{complaintPrintMutation.isPending ? (
|
{complaintPrintMutation.isPending ? (
|
||||||
<div className="felx justify-center items-center self-center h-full">
|
<div className="felx justify-center items-center self-center h-full">
|
||||||
<ThreeDots
|
<ThreeDots
|
||||||
|
|
@ -177,9 +143,10 @@ export default function FollowResult() {
|
||||||
) : (
|
) : (
|
||||||
<div
|
<div
|
||||||
dir="rtl"
|
dir="rtl"
|
||||||
className=" font-[yekan]"
|
className=" font-[yekan] px-10 py-4 sm:px-28 sm:pt-9 "
|
||||||
id="details"
|
id="details"
|
||||||
ref={componentRef}
|
ref={componentRef}
|
||||||
|
// style={{ border: printStyle ? 'none' : '5px solid black' , margin: printStyle ? 'auto': '1em' }}
|
||||||
>
|
>
|
||||||
<p className="text-[#464646] text-sm font-medium">
|
<p className="text-[#464646] text-sm font-medium">
|
||||||
{" "}
|
{" "}
|
||||||
|
|
@ -216,7 +183,6 @@ export default function FollowResult() {
|
||||||
</AlertDialogDescription>
|
</AlertDialogDescription>
|
||||||
</AlertDialogHeader>
|
</AlertDialogHeader>
|
||||||
<AlertDialogFooter>
|
<AlertDialogFooter>
|
||||||
{/* <AlertDialogCancel>Cancel</AlertDialogCancel> */}
|
|
||||||
<Button
|
<Button
|
||||||
className="bg-blue text-white w-1/2 sm:w-1/6"
|
className="bg-blue text-white w-1/2 sm:w-1/6"
|
||||||
onClick={handlePrint}
|
onClick={handlePrint}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue