Feature/abniye fani

This commit is contained in:
2025-02-19 11:52:27 +00:00
committed by AmirHossein Mahmoodi
parent ed4724a7de
commit f5ff082258
33 changed files with 2085 additions and 126 deletions

View File

@@ -37,7 +37,7 @@ const createCustomIcon = (size, iconUrl, labelText, color) => {
};
const MAX_ZOOM_FOR_MARKER = 13;
const MapInteraction = ({ setValue, startLat, startLng }) => {
const MapInteraction = ({ setValue, startLat, startLng, title }) => {
const [isMarkerLocked, setIsMarkerLocked] = useState(!!(startLat && startLng));
const [enableSend, setEnableSend] = useState(false);
const [startIconColor, setStartIconColor] = useState(startLat ? "#1CAC66" : "#003d4f");
@@ -109,7 +109,7 @@ const MapInteraction = ({ setValue, startLat, startLng }) => {
>
<Zoom in={!enableSend}>
<Alert sx={{ mt: 1, py: 0.5, px: 2, borderRadius: 2, border: 1 }} icon={false} color={"warning"}>
برای ثبت محل فعالیت، لطفاً نقشه را بیشتر زوم کنید.
{title}
</Alert>
</Zoom>
</Stack>
@@ -131,7 +131,12 @@ const MapInteraction = ({ setValue, startLat, startLng }) => {
);
};
const MapInfoOneMarker = ({ setValue, errors, StartPoint = null }) => {
const MapInfoOneMarker = ({
setValue,
errors,
StartPoint = null,
title = "برای ثبت محل فعالیت، لطفاً نقشه را بیشتر زوم کنید.",
}) => {
return (
<Box>
<Box sx={{ width: "100%", height: "400px", marginBottom: "16px" }}>
@@ -140,6 +145,7 @@ const MapInfoOneMarker = ({ setValue, errors, StartPoint = null }) => {
setValue={setValue}
startLat={StartPoint ? StartPoint.lat : null}
startLng={StartPoint ? StartPoint.lng : null}
title={title}
/>
</MapLayer>
</Box>