feat: integrate dynamic geofence fetching, service area spatial boundaries, partner store profiles & editing with Leaflet maps, custom store portal icons, QR distribution charts with geographic/LGU filters, and optimize admin dashboards

This commit is contained in:
Super Admin
2026-07-04 18:30:46 +08:00
parent 8d82674e8f
commit a2cf8c2c75
44 changed files with 3854 additions and 99 deletions

View File

@@ -9,6 +9,17 @@ class ServiceAreaResource extends JsonResource
{
public function toArray(Request $request): array
{
$boundaryPoints = null;
if ($this->boundary) {
$rings = $this->boundary->getGeometries();
$ring = $rings->first();
if ($ring) {
$boundaryPoints = $ring->getGeometries()
->map(fn ($p) => ['lat' => $p->latitude, 'lng' => $p->longitude])
->all();
}
}
return [
'id' => $this->uuid,
'db_id' => $this->id,
@@ -16,6 +27,7 @@ class ServiceAreaResource extends JsonResource
'code' => $this->code,
'status' => $this->status,
'description' => $this->description,
'boundary' => $boundaryPoints,
'barangay_count' => $this->whenCounted('barangays'),
'barangays' => BarangayResource::collection($this->whenLoaded('barangays')),
'created_at' => $this->created_at?->toIso8601String(),