feat(sales): filter and serialize admin statuses

This commit is contained in:
2026-09-02 12:42:11 -03:00
parent f74bf41931
commit dcf105c316
6 changed files with 88 additions and 14 deletions

View File

@@ -20,6 +20,8 @@ class SaleResource extends JsonResource
'customer_name' => $this->nombre_apellido,
'quantity' => (int) ($this->quantity ?? 0),
'status' => $this->status,
'admin_status' => Purchase::adminStatusFor($this->status),
'status_label' => Purchase::adminStatusNameFor($this->status),
'total' => number_format((float) $this->total, 2, '.', ''),
'tickets_count' => $ticketsCount,
'has_generated_tickets' => $ticketsCount > 0,