Compare commits
No commits in common. "87fb5e90f77483aaab54325cc2ecc8832b468e85" and "fc69de78f55da17118dcda132f6cf9324c360b65" have entirely different histories.
87fb5e90f7
...
fc69de78f5
|
|
@ -98,9 +98,7 @@ export default function RequestStep2() {
|
||||||
)
|
)
|
||||||
.refine(
|
.refine(
|
||||||
(files) => files.every((item) => item.size < optionsData?.maxFileSize),
|
(files) => files.every((item) => item.size < optionsData?.maxFileSize),
|
||||||
`حجم هر فایل حداکثر می بایست ${formatBytes(
|
`حجم هر فایل حداکثر می بایست ${optionsData?.maxFileSize} مگابایت باشد.`
|
||||||
optionsData?.maxFileSize
|
|
||||||
)} باشد.`
|
|
||||||
)
|
)
|
||||||
.nullish(),
|
.nullish(),
|
||||||
categoryId: z.string({
|
categoryId: z.string({
|
||||||
|
|
@ -188,7 +186,6 @@ export default function RequestStep2() {
|
||||||
});
|
});
|
||||||
|
|
||||||
function onSubmit(data: z.infer<typeof FormSchema>) {
|
function onSubmit(data: z.infer<typeof FormSchema>) {
|
||||||
console.log(data);
|
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("Title", data.title);
|
formData.append("Title", data.title);
|
||||||
formData.append("Text", data.description);
|
formData.append("Text", data.description);
|
||||||
|
|
@ -200,7 +197,7 @@ export default function RequestStep2() {
|
||||||
}
|
}
|
||||||
formData.append("Captcha.Value", data.captchaValue);
|
formData.append("Captcha.Value", data.captchaValue);
|
||||||
formData.append("Captcha.Key", CaptchaData?.headers["captcha-key"]);
|
formData.append("Captcha.Key", CaptchaData?.headers["captcha-key"]);
|
||||||
formData.append("Complaining", data.person ? data.person : "-");
|
formData.append("Complaining", data.person ? data.person : "");
|
||||||
formData.append("OrganizationId", data.OrganizationId);
|
formData.append("OrganizationId", data.OrganizationId);
|
||||||
const unknown = localStorage.getItem("unknown");
|
const unknown = localStorage.getItem("unknown");
|
||||||
const isAuth = getCookie("Sootzani_Token");
|
const isAuth = getCookie("Sootzani_Token");
|
||||||
|
|
@ -464,7 +461,6 @@ export default function RequestStep2() {
|
||||||
) : (
|
) : (
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
)} */}
|
)} */}
|
||||||
<FormMessage />
|
|
||||||
</FormItem>
|
</FormItem>
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ export default function TabController() {
|
||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
router.push("/RequestStep2");
|
router.push("/RequestStep2");
|
||||||
localStorage.removeItem("unknown");
|
localStorage.removeItemItem("unknown");
|
||||||
}}
|
}}
|
||||||
className=" bg-blue hover:bg-blue/90 rounded-lg max-sm:text-xs"
|
className=" bg-blue hover:bg-blue/90 rounded-lg max-sm:text-xs"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,10 @@ export function formatBytes(bytes: number, decimals = 2) {
|
||||||
const k = 1024;
|
const k = 1024;
|
||||||
const dm = decimals < 0 ? 0 : decimals;
|
const dm = decimals < 0 ? 0 : decimals;
|
||||||
const sizes = [
|
const sizes = [
|
||||||
"بایت",
|
"Bytes",
|
||||||
"کیلوبایت",
|
"KB",
|
||||||
"مگابایت",
|
"MB",
|
||||||
"گیگابایت",
|
"GiB",
|
||||||
"TiB",
|
"TiB",
|
||||||
"PiB",
|
"PiB",
|
||||||
"EiB",
|
"EiB",
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.4 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 52 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 330 KiB |
Loading…
Reference in New Issue