Files
Verde-Web/app/Http/Requests/Qr/GenerateBatchRequest.php
admin cec29a2fc9 feat(web): full admin shell with sidebar + working pages
Sidebar with all 8 nav groups (Operations / Planning / People / QR /
Areas / Finance / Reports / Settings) per the admin-panel-flow spec.
Disabled items show "Soon" and toast on click.

Working pages (real API):
- Dashboard with live stat cards + recent verification queue
- Households (filter, approve, reject with reason)
- Service Areas (CRUD via slide-over)
- QR Batches (generate, mark printed, link to print PDF)
- QR Code Search (lifecycle lookup by serial)
- Drop-off Points (filter + create)
- Dumpsites, Routes, All Users (filterable lists)

Shared helpers on window.Verde — apiFetch, requireAuth, logout, toast,
escapeHtml, formatDate. Tailwind brand tokens, table/card/badge classes,
slide-over panels.

GenerateBatchRequest now accepts target_area_id by uuid for consistency
with the rest of the public API.

139 tests passing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 02:45:56 +08:00

32 lines
880 B
PHP

<?php
namespace App\Http\Requests\Qr;
use App\Models\QrCodeBatch;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class GenerateBatchRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'quantity' => ['required', 'integer', 'min:1', 'max:50000'],
'purpose' => ['required', Rule::in([
QrCodeBatch::PURPOSE_FREE,
QrCodeBatch::PURPOSE_STORE,
QrCodeBatch::PURPOSE_PROMO,
])],
'target_area_id' => ['nullable', 'string', 'exists:service_areas,uuid'],
'target_store_id' => ['nullable', 'integer'],
'expires_at' => ['nullable', 'date', 'after:today'],
'notes' => ['nullable', 'string', 'max:1000'],
];
}
}