feat(sales): filter and serialize admin statuses
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user