Implement household, QR sale, team helpers assignment, and helper endpoints

This commit is contained in:
Developer
2026-06-29 16:56:33 +08:00
parent b85fc255cf
commit 7dc074e3c3
31 changed files with 1574 additions and 98 deletions

View File

@@ -22,6 +22,11 @@ class QrCodeBatchResource extends JsonResource
'purpose' => $this->purpose,
'target_area' => $this->whenLoaded('targetArea', fn () => $this->targetArea?->code),
'target_store_id' => $this->target_store_id,
'household' => $this->whenLoaded('household', fn () => $this->household ? [
'id' => $this->household->id,
'address' => $this->household->address_line,
'head_name' => $this->household->head?->full_name,
] : null),
'created_by' => $this->whenLoaded('createdBy', fn () => $this->createdBy?->full_name),
'printed_at' => $this->printed_at?->toIso8601String(),
'expires_at' => $this->expires_at?->toIso8601String(),