build and format

This commit is contained in:
2026-06-13 11:48:47 +03:30
parent 22032b885c
commit dec752bc17
43 changed files with 2581 additions and 2581 deletions

View File

@@ -18,6 +18,11 @@ const ShowRoute = ({ area }) => {
}); });
}; };
useEffect(() => {
if (coords.length > 0) {
map.flyToBounds(coords, { padding: [50, 50], duration: 1.5 });
}
}, [area]);
const sourceIcon = createCustomIcon(defaultIconSize, SourceIcon.src); const sourceIcon = createCustomIcon(defaultIconSize, SourceIcon.src);
const destIcon = createCustomIcon(defaultIconSize, DestIcon.src); const destIcon = createCustomIcon(defaultIconSize, DestIcon.src);
@@ -28,11 +33,6 @@ const ShowRoute = ({ area }) => {
const sourcePosition = coords[0]; const sourcePosition = coords[0];
const destPosition = coords[coords.length - 1]; const destPosition = coords[coords.length - 1];
useEffect(() => {
if (coords.length > 0) {
map.flyToBounds(coords, { padding: [50, 50], duration: 1.5 });
}
}, [area]);
return ( return (
<> <>

View File

@@ -18,6 +18,11 @@ const ShowRoute = ({ area }) => {
}); });
}; };
useEffect(() => {
if (coords.length > 0) {
map.flyToBounds(coords, { padding: [50, 50], duration: 1.5 });
}
}, [area]);
const sourceIcon = createCustomIcon(defaultIconSize, SourceIcon.src); const sourceIcon = createCustomIcon(defaultIconSize, SourceIcon.src);
const destIcon = createCustomIcon(defaultIconSize, DestIcon.src); const destIcon = createCustomIcon(defaultIconSize, DestIcon.src);
@@ -28,11 +33,6 @@ const ShowRoute = ({ area }) => {
const sourcePosition = coords[0]; const sourcePosition = coords[0];
const destPosition = coords[coords.length - 1]; const destPosition = coords[coords.length - 1];
useEffect(() => {
if (coords.length > 0) {
map.flyToBounds(coords, { padding: [50, 50], duration: 1.5 });
}
}, [area]);
return ( return (
<> <>

View File

@@ -20,6 +20,11 @@ const ShowRoute = ({ area }) => {
const sourceIcon = createCustomIcon(defaultIconSize, SourceIcon.src); const sourceIcon = createCustomIcon(defaultIconSize, SourceIcon.src);
const destIcon = createCustomIcon(defaultIconSize, DestIcon.src); const destIcon = createCustomIcon(defaultIconSize, DestIcon.src);
useEffect(() => {
if (coords.length > 0) {
map.flyToBounds(coords, { padding: [50, 50], duration: 1.5 });
}
}, [area]);
if (!area) return null; if (!area) return null;
const coords = polyline.decode(area, 6); const coords = polyline.decode(area, 6);
@@ -28,11 +33,6 @@ const ShowRoute = ({ area }) => {
const sourcePosition = coords[0]; const sourcePosition = coords[0];
const destPosition = coords[coords.length - 1]; const destPosition = coords[coords.length - 1];
useEffect(() => {
if (coords.length > 0) {
map.flyToBounds(coords, { padding: [50, 50], duration: 1.5 });
}
}, [area]);
return ( return (
<> <>

View File

@@ -5,7 +5,7 @@ import SearchReportList from "./Search";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import ReportLists from "./ReportLists"; import ReportLists from "./ReportLists";
import useRequest from "@/lib/hooks/useRequest"; import useRequest from "@/lib/hooks/useRequest";
import { GET_CITY_ACTIVITY_REPORT, GET_PROVINCE_ACTIVITY_REPORT } from "@/core/utils/routes"; import { GET_COUNTRY_ACTIVITY_REPORT, GET_PROVINCE_ACTIVITY_REPORT } from "@/core/utils/routes";
import moment from "jalali-moment"; import moment from "jalali-moment";
import * as yup from "yup"; import * as yup from "yup";
import { useForm } from "react-hook-form"; import { useForm } from "react-hook-form";
@@ -70,7 +70,7 @@ const ReportPage = () => {
} else { } else {
try { try {
params.set("province_id", `${data.province_id}`); params.set("province_id", `${data.province_id}`);
const response = await requestServer(`${GET_CITY_ACTIVITY_REPORT}?${params}`); const response = await requestServer(`${GET_COUNTRY_ACTIVITY_REPORT}?${params}`);
const result = response.data.data; const result = response.data.data;
const nationalReportForItem = result.activities.find((report) => report.edare_id === "-1"); const nationalReportForItem = result.activities.find((report) => report.edare_id === "-1");
const nationalReport = { const nationalReport = {