Server configuration

This commit is contained in:
ISA
2024-05-28 06:19:46 +02:00
parent f949272371
commit ea3f65e80f
8 changed files with 1954 additions and 1525 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -22,7 +22,7 @@ import { poiReadFromDbTriggerAtom } from "../store/atoms/poiReadFromDbTriggerAto
import { InformationCircleIcon } from "@heroicons/react/20/solid"; // oder 'outline'
import PoiUpdateModal from "./PoiUpdateModal.js";
import { selectedPoiState } from "../store/atoms/poiState.js";
import { currentPoiState } from '../store/atoms/currentPoiState';
import { currentPoiState } from "../store/atoms/currentPoiState";
//import { createRoot } from "react-dom/client";
@@ -35,7 +35,6 @@ const plusRoundIcon = L.icon({
});
const MapComponent = ({ locations, onLocationUpdate }) => {
const setSelectedPoi = useSetRecoilState(selectedPoiState);
const openPoiUpdateModal = () => setShowPoiUpdateModal(true);
@@ -59,8 +58,7 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
description: marker.options.description,
});
console.log("POI-Daten1:", currentPoiData);
fetchPoiData(marker.options.id);
setShowPoiUpdateModal(true);
@@ -601,11 +599,11 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
setShowEditModal(true);
};
// In der Marker-Erstellungsfunktion
//---------------------------------------------------------
useEffect(() => {
console.log("useEffect current Data:", currentPoiData);
}, [currentPoiData]);
//---------------------------------------------------------
//---------------------------------------------------------
useEffect(() => {
console.log("useEffect current Data:", currentPoiData);
}, [currentPoiData]);
//---------------------------------------------------------
//------------------------------------------
// API-Daten laden für GisStationsStaticDistrict
//http://10.10.0.13/talas5/ClientData/WebServiceMap.asmx/GisStationsStaticDistrict?idMap=10&idUser=485
@@ -901,7 +899,10 @@ useEffect(() => {
}
//------------------------------------------
<<<<<<< HEAD
=======
>>>>>>> 1a87c21 (Server configuration)
const fetchDeviceNameById = async (idLD) => {
try {
const response = await fetch(`/api/locationDeviceNameById?idLD=${idLD}`);
@@ -918,6 +919,11 @@ useEffect(() => {
};
//------------------------------------------
<<<<<<< HEAD
=======
//------------------------------------------
>>>>>>> 1a87c21 (Server configuration)
// poiLayerRef(poiDbLayer) POI hinzufügen
//--------------------------------------------
@@ -935,6 +941,10 @@ useEffect(() => {
//console.log("location.idPoiTyp poiLayer:", location.idPoiTyp);
console.log("location.idPoiTyp poiLayer:", location);
console.log("location.idPoiTyp:", location.idPoiTyp);
<<<<<<< HEAD
=======
>>>>>>> 1a87c21 (Server configuration)
const deviceName = await fetchDeviceNameById(location.idLD);
const marker = L.marker([latitude, longitude], {
icon: L.icon({
@@ -963,7 +973,11 @@ useEffect(() => {
marker.bindPopup(`
<div>
<b class="text-xl text-black-700">${location.description || "Unbekannt"}</b><br>
<<<<<<< HEAD
${deviceName}<br> <!-- Gerät:-->
=======
${deviceName}<br> <!-- Gerät:-->
>>>>>>> 1a87c21 (Server configuration)
${poiTypName}<br> <!-- Typ:-->
</div>
`);
@@ -991,8 +1005,11 @@ useEffect(() => {
setCurrentPoi(location);
console.log("POI-Daten currentPoi:", currentPoi);
//console.log("poiData in MapComponent.js:", poiData);
<<<<<<< HEAD
>>>>>>> b983067 (Prepair: With Recoil atom pass current poi data from MapComponent to poiUpdateModal.js when mouse over)
=======
>>>>>>> 1a87c21 (Server configuration)
});
marker.on("mouseout", function () {
this.closePopup();