Fix programme attachment dropdown always appearing disabled on events.
Deploy Ladill Events / deploy (push) Successful in 31s
Deploy Ladill Events / deploy (push) Successful in 31s
Load itinerary options in the event show controller and link to programme creation when none exist yet. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -206,6 +206,13 @@ class QrCodeController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
$itineraryOptions = $qrCode->type === QrCode::TYPE_EVENT
|
||||
? $account->qrCodes()
|
||||
->where('type', QrCode::TYPE_ITINERARY)
|
||||
->orderBy('label')
|
||||
->get(['id', 'label'])
|
||||
: collect();
|
||||
|
||||
return view('qr-codes.show', [
|
||||
'qrCode' => $qrCode,
|
||||
'previewDataUri' => $previewDataUri,
|
||||
@@ -229,6 +236,7 @@ class QrCodeController extends Controller
|
||||
'customDomains' => \App\Models\CustomDomain::where('qr_code_id', $qrCode->id)->get(),
|
||||
'customDomainsEnabled' => app(\App\Services\CustomDomain\CustomDomainService::class)->enabled(),
|
||||
'customDomainServerIp' => config('customdomain.server_ip'),
|
||||
'itineraryOptions' => $itineraryOptions,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user