This commit is contained in:
Jake Kasper
2025-08-22 15:57:27 -04:00
parent 7790b72eb3
commit 0c71d5ce6a
2 changed files with 33 additions and 2 deletions

View File

@@ -238,7 +238,15 @@ const ApplicationPlanModal = ({ onClose, onSubmit }) => {
setLoadingProperty(true);
const response = await propertiesAPI.getById(parseInt(propertyId));
console.log('Property details response:', response.data);
setSelectedPropertyDetails(response.data.data.property);
const property = response.data.data.property;
console.log('Property sections with polygon data:', property.sections?.map(s => ({
id: s.id,
name: s.name,
hasPolygonData: !!s.polygonData,
polygonDataType: typeof s.polygonData,
coordinates: s.polygonData?.coordinates?.[0]?.length || 0
})));
setSelectedPropertyDetails(property);
} catch (error) {
console.error('Failed to fetch property details:', error);
toast.error('Failed to load property details');
@@ -342,7 +350,6 @@ const ApplicationPlanModal = ({ onClose, onSubmit }) => {
{selectedPropertyDetails.latitude && selectedPropertyDetails.longitude && (
<div className="mb-4">
<div className="relative">
{console.log('Map sections data:', selectedPropertyDetails.sections)}
<PropertyMap
center={[selectedPropertyDetails.latitude, selectedPropertyDetails.longitude]}
zoom={18}