update property detail
This commit is contained in:
@@ -481,7 +481,9 @@ const PropertyDetail = () => {
|
|||||||
name: savedSection.name,
|
name: savedSection.name,
|
||||||
coordinates: savedSection.polygonData.coordinates[0],
|
coordinates: savedSection.polygonData.coordinates[0],
|
||||||
color: savedSection.polygonData.color,
|
color: savedSection.polygonData.color,
|
||||||
area: savedSection.area
|
area: savedSection.area,
|
||||||
|
grassType: savedSection.grassType || '',
|
||||||
|
grassTypes: savedSection.grassTypes || []
|
||||||
};
|
};
|
||||||
|
|
||||||
setLawnSections(prev => [...prev, newSection]);
|
setLawnSections(prev => [...prev, newSection]);
|
||||||
@@ -546,7 +548,9 @@ const PropertyDetail = () => {
|
|||||||
const updatedSection = {
|
const updatedSection = {
|
||||||
...editingSection,
|
...editingSection,
|
||||||
name: sectionName,
|
name: sectionName,
|
||||||
color: currentColor
|
color: currentColor,
|
||||||
|
grassType: editGrassTypes.join(', '),
|
||||||
|
grassTypes: [...editGrassTypes]
|
||||||
};
|
};
|
||||||
|
|
||||||
setLawnSections(prev => prev.map(s => s.id === editingSection.id ? updatedSection : s));
|
setLawnSections(prev => prev.map(s => s.id === editingSection.id ? updatedSection : s));
|
||||||
|
|||||||
Reference in New Issue
Block a user