From 273b7392b6b41508ae99188313f29f27fba7f3a8 Mon Sep 17 00:00:00 2001 From: cesarLima1 Date: Mon, 20 May 2024 15:30:10 -0400 Subject: [PATCH] change reference from est_area to calc_area --- .../V2/Terrafund/TerrafundEditGeometryController.php | 2 +- app/Models/V2/Sites/SitePolygon.php | 2 +- app/Services/PolygonService.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/V2/Terrafund/TerrafundEditGeometryController.php b/app/Http/Controllers/V2/Terrafund/TerrafundEditGeometryController.php index fe1ce9868..fa540955e 100644 --- a/app/Http/Controllers/V2/Terrafund/TerrafundEditGeometryController.php +++ b/app/Http/Controllers/V2/Terrafund/TerrafundEditGeometryController.php @@ -215,7 +215,7 @@ public function createSitePolygon(string $uuid, string $siteUuid, Request $reque 'practice' => $validatedData['practice'], 'distr' => $validatedData['distr'], 'num_trees' => $validatedData['num_trees'], - 'est_area' => $areaHectares, // Assign the calculated area + 'calc_area' => $areaHectares, // Assign the calculated area 'target_sys' => $validatedData['target_sys'], 'poly_id' => $uuid, 'created_by' => Auth::user()?->id, diff --git a/app/Models/V2/Sites/SitePolygon.php b/app/Models/V2/Sites/SitePolygon.php index 82fc2e7b6..73636d2ff 100644 --- a/app/Models/V2/Sites/SitePolygon.php +++ b/app/Models/V2/Sites/SitePolygon.php @@ -40,7 +40,7 @@ class SitePolygon extends Model 'num_trees', 'calc_area', 'status', - 'est_area', + 'calc_area', 'country', 'created_by', ]; diff --git a/app/Services/PolygonService.php b/app/Services/PolygonService.php index 15a0fc29a..40c268ca9 100644 --- a/app/Services/PolygonService.php +++ b/app/Services/PolygonService.php @@ -180,7 +180,7 @@ protected function validateSitePolygonProperties(string $polygonUuid, array $pro 'target_sys' => $properties['target_sys'] ?? null, 'distr' => $properties['distr'] ?? null, 'num_trees' => $properties['num_trees'], - 'est_area' => $properties['area'] ?? null, + 'calc_area' => $properties['area'] ?? null, ]; } }