feat: Group map entities + delete useless logs

This commit is contained in:
2025-07-13 20:56:25 +03:00
parent bf117ef048
commit 97f95fc394
9 changed files with 374 additions and 236 deletions

File diff suppressed because it is too large Load Diff

View File

@ -45,10 +45,10 @@ export const MediaEditPage = observer(() => {
if (id) { if (id) {
mediaStore.getOneMedia(id); mediaStore.getOneMedia(id);
} }
console.log(newFile);
console.log(uploadDialogOpen);
}, [id]); }, [id]);
useEffect(() => {}, [newFile, uploadDialogOpen]);
useEffect(() => { useEffect(() => {
if (media) { if (media) {
setMediaName(media.media_name); setMediaName(media.media_name);

View File

@ -140,9 +140,7 @@ export const LinkedItemsContents = <
const [activeTab, setActiveTab] = useState(0); const [activeTab, setActiveTab] = useState(0);
const [searchQuery, setSearchQuery] = useState(""); const [searchQuery, setSearchQuery] = useState("");
useEffect(() => { useEffect(() => {}, [error]);
console.log(error);
}, [error]);
const parentResource = "route"; const parentResource = "route";
const childResource = "station"; const childResource = "station";

View File

@ -82,11 +82,7 @@ export const Sight = ({ sight, id }: Readonly<SightProps>) => {
Assets.load("/SightIcon.png").then(setTexture); Assets.load("/SightIcon.png").then(setTexture);
}, []); }, []);
useEffect(() => { useEffect(() => {}, [id, sight.latitude, sight.longitude]);
console.log(
`Rendering Sight ${id + 1} at [${sight.latitude}, ${sight.longitude}]`
);
}, [id, sight.latitude, sight.longitude]);
if (!sight) { if (!sight) {
console.error("sight is null"); console.error("sight is null");

View File

@ -132,7 +132,6 @@ export const SightListPage = observer(() => {
loading={isLoading} loading={isLoading}
localeText={ruRU.components.MuiDataGrid.defaultProps.localeText} localeText={ruRU.components.MuiDataGrid.defaultProps.localeText}
onRowSelectionModelChange={(newSelection) => { onRowSelectionModelChange={(newSelection) => {
console.log(newSelection);
setIds(Array.from(newSelection.ids as unknown as number[])); setIds(Array.from(newSelection.ids as unknown as number[]));
}} }}
slots={{ slots={{

View File

@ -93,9 +93,7 @@ export const LinkedSightsContents = <
const [isLoading, setIsLoading] = useState<boolean>(true); const [isLoading, setIsLoading] = useState<boolean>(true);
const [error, setError] = useState<string | null>(null); const [error, setError] = useState<string | null>(null);
useEffect(() => { useEffect(() => {}, [error]);
console.log(error);
}, [error]);
const parentResource = "station"; const parentResource = "station";
const childResource = "sight"; const childResource = "sight";

View File

@ -497,9 +497,7 @@ class EditSightStore {
media_name: media_name, media_name: media_name,
media_type: type, media_type: type,
}; };
} catch (error) { } catch (error) {}
console.log(error);
}
}; };
createLinkWithArticle = async (media: { createLinkWithArticle = async (media: {

View File

@ -82,11 +82,6 @@ class RouteStore {
}; };
setRouteStations = (routeId: number, stationId: number, data: any) => { setRouteStations = (routeId: number, stationId: number, data: any) => {
console.log(
this.routeStations[routeId],
stationId,
this.routeStations[routeId].find((station) => station.id === stationId)
);
this.routeStations[routeId] = this.routeStations[routeId]?.map((station) => this.routeStations[routeId] = this.routeStations[routeId]?.map((station) =>
station.id === stationId ? { ...station, ...data } : station station.id === stationId ? { ...station, ...data } : station
); );

View File

@ -202,7 +202,6 @@ export const DevicesTable = observer(() => {
try { try {
// Create an array of promises for all snapshot requests // Create an array of promises for all snapshot requests
const snapshotPromises = selectedDeviceUuids.map((deviceUuid) => { const snapshotPromises = selectedDeviceUuids.map((deviceUuid) => {
console.log(`Sending snapshot ${snapshotId} to device ${deviceUuid}`);
return send(deviceUuid); return send(deviceUuid);
}); });