Fix store sales search and QR wallet receipt downloads

This commit is contained in:
ramram1515
2026-07-03 11:54:40 +08:00
parent 9123ffe099
commit 21874c0764
17 changed files with 532 additions and 162 deletions

View File

@@ -5,6 +5,7 @@ namespace App\Http\Resources;
use App\Models\QrCode;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Support\Facades\URL;
class QrCodeBatchResource extends JsonResource
{
@@ -39,6 +40,11 @@ class QrCodeBatchResource extends JsonResource
'expires_at' => $this->expires_at?->toIso8601String(),
'notes' => $this->notes,
'status_counts' => $statusCounts,
'print_url' => URL::temporarySignedRoute(
'api.v1.admin.qr-batches.print-pdf',
now()->addHours(24),
['qr_code_batch' => $this->id]
),
'created_at' => $this->created_at?->toIso8601String(),
];
}