Skip to content

Commit

Permalink
change reference from est_area to calc_area
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarLima1 committed May 20, 2024
1 parent fc8939c commit 273b739
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion app/Models/V2/Sites/SitePolygon.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class SitePolygon extends Model
'num_trees',
'calc_area',
'status',
'est_area',
'calc_area',
'country',
'created_by',
];
Expand Down
2 changes: 1 addition & 1 deletion app/Services/PolygonService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
];
}
}

0 comments on commit 273b739

Please sign in to comment.