a Bug Fixed
parent
a5a3c48a61
commit
e1b6237318
|
|
@ -207,7 +207,11 @@ export default function ComplainsDetails({
|
|||
{/* Editt */}
|
||||
<div className="flex items-start w-full gap-2 mt-2 max-lg:flex-col lg:h-[80vh] mb-10">
|
||||
{/* 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 ${
|
||||
possibleOperations.length == 0 && "hidden"
|
||||
}`}
|
||||
>
|
||||
{/* ***** */}
|
||||
<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">
|
||||
|
|
@ -225,7 +229,11 @@ export default function ComplainsDetails({
|
|||
</div>
|
||||
|
||||
{/* 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 ${
|
||||
possibleOperations.length == 0 && "lg:w-full"
|
||||
}`}
|
||||
>
|
||||
<div className=" bg-[#E9E9E9] rounded-md py-4 px-10 flex flex-col md:flex-row gap-2 items-center justify-center">
|
||||
{data?.user == null ? (
|
||||
<>
|
||||
|
|
@ -344,19 +352,25 @@ export default function ComplainsDetails({
|
|||
className="flex flex-col mt-4 gap-y-4 overflow-auto
|
||||
scrollbar-thin scrollbar-thumb-gray-500 scrollbar-track-gray-100 "
|
||||
>
|
||||
{data.contents?.map((item: any) => {
|
||||
{data.contents?.map((item: any, index: any, array: any) => {
|
||||
return (
|
||||
<div
|
||||
key={item.id}
|
||||
className="p-4 bg-white rounded-lg shadow-md "
|
||||
>
|
||||
<div className="flex items-center gap-4 justify-between">
|
||||
<div>
|
||||
<span className=" flex items-center justify-center w-8 h-8 bg-blue-100 rounded-full -start-4 ring-2 ring-blue bg-blue2 text-black">
|
||||
{array.length - index}
|
||||
</span>
|
||||
<p className="">
|
||||
<Badge>
|
||||
{item.operationWithDescription.description} توسط{" "}
|
||||
{item.sender == 0 ? "شهروند" : "بازرس"}
|
||||
{item.operationWithDescription.description}{" "}
|
||||
توسط {item.sender == 0 ? "شهروند" : "بازرس"}
|
||||
</Badge>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p className="">
|
||||
<span className="text-[#7C838A] text-sm">
|
||||
{convertFullTime(item.dateTime)}
|
||||
|
|
|
|||
|
|
@ -184,7 +184,6 @@ export default function InspectorOperations({
|
|||
className="resize-none bg-white lg:min-h-[20em]"
|
||||
{...field}
|
||||
readOnly={possibleOperations.length == 0}
|
||||
|
||||
onChange={(e) => {
|
||||
const currentValue = e.target.value;
|
||||
if (currentValue.length <= data?.maxTextLength) {
|
||||
|
|
@ -192,10 +191,11 @@ export default function InspectorOperations({
|
|||
handleTextChange(e);
|
||||
} else {
|
||||
// Truncate the value to the allowed limit
|
||||
field.onChange(currentValue.substring(0, data?.maxTextLength));
|
||||
field.onChange(
|
||||
currentValue.substring(0, data?.maxTextLength)
|
||||
);
|
||||
}
|
||||
}}
|
||||
|
||||
/>
|
||||
</FormControl>
|
||||
{!error ? (
|
||||
|
|
@ -264,7 +264,7 @@ export default function InspectorOperations({
|
|||
<FormDescription className=" text-xs my-1 ">
|
||||
<span>
|
||||
حجم هر فایل حداکثر می بایست {formatSize(data?.maxFileSize)}{" "}
|
||||
مگابایت باشد
|
||||
باشد
|
||||
</span>{" "}
|
||||
و{" "}
|
||||
{`تعداد فایل های پیوست شده می بایست حداکثر ${data?.maxFileCount} تا باشد.`}
|
||||
|
|
|
|||
|
|
@ -82,7 +82,8 @@ export default function RequestStep2() {
|
|||
OrganizationId: z.string({
|
||||
required_error: "لطفا دستگاه مربوطه را انتخاب نمایید.",
|
||||
}),
|
||||
person: z.string()
|
||||
person: z
|
||||
.string()
|
||||
.min(1, {
|
||||
message: "لطفا نام فرد مورد نظر را بنویسید.",
|
||||
})
|
||||
|
|
@ -292,7 +293,7 @@ export default function RequestStep2() {
|
|||
<Form {...form}>
|
||||
<form
|
||||
onSubmit={form.handleSubmit(onSubmit)}
|
||||
className="flex flex-col w-full mt-6"
|
||||
className="flex flex-col w-full mt-6 max-sm:gap-4"
|
||||
>
|
||||
<FormField
|
||||
control={form.control}
|
||||
|
|
@ -312,7 +313,7 @@ export default function RequestStep2() {
|
|||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
<div className="flex flex-row flex-wrap justify-between">
|
||||
<div className="flex flex-row flex-wrap justify-between max-sm:gap-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="OrganizationId"
|
||||
|
|
@ -373,12 +374,7 @@ export default function RequestStep2() {
|
|||
handlePersonCharCountChange(e);
|
||||
} else {
|
||||
// Truncate the value to the allowed limit
|
||||
field.onChange(
|
||||
currentValue.substring(
|
||||
0,
|
||||
50
|
||||
)
|
||||
);
|
||||
field.onChange(currentValue.substring(0, 50));
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
|
@ -424,7 +420,7 @@ export default function RequestStep2() {
|
|||
)}
|
||||
/>
|
||||
|
||||
<div className="flex flex-row flex-wrap justify-between mb-2">
|
||||
<div className="flex flex-row flex-wrap justify-between mb-2 max-sm:gap-4">
|
||||
{/* Select Option */}
|
||||
<FormField
|
||||
control={form.control}
|
||||
|
|
@ -527,19 +523,19 @@ export default function RequestStep2() {
|
|||
}}
|
||||
/>
|
||||
</div>
|
||||
{/* {!error ? (
|
||||
{!error ? (
|
||||
<FormDescription className=" text-xs my-1 ">
|
||||
<span>
|
||||
حجم هر فایل حداکثر می بایست{" "}
|
||||
{formatSize(optionsData?.maxFileSize)} مگابایت باشد
|
||||
</span>{" "}
|
||||
و{" "}
|
||||
{formatSize(optionsData?.maxFileSize)} باشد
|
||||
</span>
|
||||
و {" "}
|
||||
{`تعداد فایل های پیوست شده می بایست حداکثر ${optionsData?.maxFileCount} تا باشد.`}
|
||||
</FormDescription>
|
||||
) : (
|
||||
<FormMessage />
|
||||
)} */}
|
||||
<FormMessage />
|
||||
)}
|
||||
{/* <FormMessage /> */}
|
||||
</FormItem>
|
||||
);
|
||||
}}
|
||||
|
|
@ -598,10 +594,10 @@ export default function RequestStep2() {
|
|||
)}
|
||||
</div>
|
||||
|
||||
<div className="flex justify-center w-full gap-2 mt-4 sm:justify-end">
|
||||
<div className="flex justify-center w-full gap-2 mt-0 sm:justify-end">
|
||||
<Button
|
||||
type="submit"
|
||||
className="w-1/2 p-2 mb-4 text-center text-white sm:w-1/3 lg:w-1/4 bg-blue rounded-xl"
|
||||
className="w-1/2 p-2 mb-3 text-center text-white sm:w-1/3 lg:w-1/4 bg-blue rounded-xl"
|
||||
>
|
||||
{authorizedComplaintSubmitMutation.isPending ||
|
||||
complaintSubmitMutation.isPending ? (
|
||||
|
|
|
|||
|
|
@ -18,8 +18,13 @@ function convertDate(date: string) {
|
|||
.format("YYYY/M/DD");
|
||||
return convertedDate;
|
||||
}
|
||||
const registeredAt = localStorage.getItem("registeredAt");
|
||||
const convertedDate = registeredAt ? convertDate(registeredAt) : "Invalid Date";
|
||||
// const registeredAt = localStorage.getItem("registeredAt");
|
||||
// const convertedDate = registeredAt ? convertDate(registeredAt) : "Invalid Date";
|
||||
|
||||
|
||||
const currentDate = new Date();
|
||||
const formattedDate = currentDate.toISOString();
|
||||
const convertedDate = convertDate(formattedDate);
|
||||
|
||||
const PrintPage: React.FC<PrintPageProps> = ({
|
||||
contentRef,
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ const SelectContent = React.forwardRef<
|
|||
<SelectPrimitive.Content
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"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",
|
||||
"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",
|
||||
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",
|
||||
className
|
||||
|
|
|
|||
Loading…
Reference in New Issue