Files
ladill-frontdesk/resources/views/frontdesk/settings/edit.blade.php
T
isaaccladandCursor dfda39df6e
Deploy Ladill Frontdesk / deploy (push) Successful in 23s
Add custom company logo upload and simplify kiosk branding.
Show Ladill Frontdesk or uploaded logo top-left on kiosk; allow logo upload in onboarding and organization settings.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 21:49:17 +00:00

137 lines
9.0 KiB
PHP

<x-app-layout title="Settings">
@php
$settings = $organization->settings ?? [];
@endphp
<h1 class="text-xl font-semibold text-slate-900">Settings</h1>
<p class="text-sm text-slate-500">{{ $organization->name }}</p>
<form method="POST" action="{{ route('frontdesk.settings.update') }}" enctype="multipart/form-data" class="mt-6 max-w-2xl space-y-6">
@csrf @method('PUT')
<section class="rounded-2xl border border-slate-200 bg-white p-5 space-y-4">
<h2 class="text-sm font-semibold text-slate-900">Organization</h2>
@if ($canManage)
<div>
<label class="block text-sm font-medium text-slate-700">Name</label>
<input type="text" name="name" value="{{ old('name', $organization->name) }}" required class="mt-1 w-full rounded-lg border-slate-300 text-sm">
</div>
<div>
<label class="block text-sm font-medium text-slate-700">Timezone</label>
<select name="timezone" class="mt-1 w-full rounded-lg border-slate-300 text-sm">
@foreach (timezone_identifiers_list() as $tz)
<option value="{{ $tz }}" @selected(old('timezone', $organization->timezone) === $tz)>{{ $tz }}</option>
@endforeach
</select>
</div>
<div>
<label class="block text-sm font-medium text-slate-700">Company logo</label>
<p class="mt-1 text-xs text-slate-500">Shown on the visitor kiosk instead of the Ladill Frontdesk logo. PNG, JPG, WebP, or SVG up to 2&nbsp;MB.</p>
@if (\App\Support\OrganizationBranding::hasCustomLogo($organization))
<img src="{{ \App\Support\OrganizationBranding::logoUrl($organization) }}"
alt="{{ $organization->name }}"
class="mt-3 h-12 w-auto max-w-xs rounded-lg border border-slate-200 bg-white object-contain p-2">
<label class="mt-3 flex items-center gap-2 text-sm text-slate-600">
<input type="checkbox" name="remove_logo" value="1" @checked(old('remove_logo'))>
Remove custom logo
</label>
@endif
<input type="file" name="logo" accept="image/png,image/jpeg,image/webp,image/svg+xml"
class="mt-3 block w-full text-sm text-slate-600 file:mr-3 file:rounded-lg file:border-0 file:bg-indigo-50 file:px-3 file:py-2 file:text-sm file:font-medium file:text-indigo-700">
</div>
@else
<dl class="text-sm space-y-2">
<div class="flex justify-between"><dt class="text-slate-500">Name</dt><dd>{{ $organization->name }}</dd></div>
<div class="flex justify-between"><dt class="text-slate-500">Timezone</dt><dd>{{ $organization->timezone }}</dd></div>
</dl>
@endif
</section>
@if ($canManage)
<section class="rounded-2xl border border-slate-200 bg-white p-5 space-y-4">
<h2 class="text-sm font-semibold text-slate-900">Reception & kiosk</h2>
<div class="grid gap-4 sm:grid-cols-2">
<div>
<label class="block text-sm font-medium text-slate-700">Badge expiry (hours)</label>
<input type="number" name="badge_expiry_hours" value="{{ old('badge_expiry_hours', $settings['badge_expiry_hours'] ?? 8) }}" min="1" max="24" class="mt-1 w-full rounded-lg border-slate-300 text-sm">
</div>
<div>
<label class="block text-sm font-medium text-slate-700">Kiosk inactivity reset (seconds)</label>
<input type="number" name="kiosk_reset_seconds" value="{{ old('kiosk_reset_seconds', $settings['kiosk_reset_seconds'] ?? 120) }}" min="30" max="600" class="mt-1 w-full rounded-lg border-slate-300 text-sm">
</div>
<div>
<label class="block text-sm font-medium text-slate-700">Contractor badge expiry (hours)</label>
<input type="number" name="contractor_badge_expiry_hours" value="{{ old('contractor_badge_expiry_hours', data_get($settings, 'type_badge_expiry_hours.contractor', 12)) }}" min="1" max="24" class="mt-1 w-full rounded-lg border-slate-300 text-sm">
</div>
</div>
<div>
<label class="block text-sm font-medium text-slate-700">Visitor policy</label>
<textarea name="visitor_policy" rows="4" class="mt-1 w-full rounded-lg border-slate-300 text-sm">{{ old('visitor_policy', $settings['visitor_policy'] ?? '') }}</textarea>
</div>
<div>
<p class="text-sm font-medium text-slate-700">Notification channels</p>
<div class="mt-2 flex flex-wrap gap-3">
@foreach ($notificationChannels as $key => $label)
<label class="flex items-center gap-2 text-sm">
<input type="checkbox" name="notification_channels[]" value="{{ $key }}"
@checked(in_array($key, old('notification_channels', $settings['notification_channels'] ?? ['email'])))>
{{ $label }}
</label>
@endforeach
</div>
</div>
<div>
<p class="text-sm font-medium text-slate-700">Notification events</p>
<div class="mt-2 grid gap-2 sm:grid-cols-2">
@foreach ($notificationEvents as $key => $label)
<label class="flex items-center gap-2 text-sm">
<input type="checkbox" name="notification_events[{{ $key }}]" value="1"
@checked(old("notification_events.{$key}", data_get($settings, "notification_events.{$key}", true)))>
{{ $label }}
</label>
@endforeach
</div>
</div>
<div>
<label class="block text-sm font-medium text-slate-700">Daily report recipients</label>
<input type="text" name="report_daily_recipients" value="{{ old('report_daily_recipients', implode(', ', $settings['report_daily_recipients'] ?? [])) }}" placeholder="admin@example.com, security@example.com" class="mt-1 w-full rounded-lg border-slate-300 text-sm">
<p class="mt-1 text-xs text-slate-500">Comma-separated emails for the daily summary report.</p>
</div>
</section>
<button type="submit" class="btn-primary">Save settings</button>
@endif
</form>
<div class="mt-8 grid gap-4 lg:grid-cols-3">
@if ($canManage)
<a href="{{ route('frontdesk.branches.index') }}" class="rounded-2xl border border-slate-200 bg-white p-5 hover:border-indigo-300">
<h3 class="font-semibold text-slate-900">Branches</h3>
<p class="mt-1 text-sm text-slate-500">{{ $branchCount }} branch{{ $branchCount === 1 ? '' : 'es' }}</p>
</a>
<a href="{{ route('frontdesk.members.index') }}" class="rounded-2xl border border-slate-200 bg-white p-5 hover:border-indigo-300">
<h3 class="font-semibold text-slate-900">Team members</h3>
<p class="mt-1 text-sm text-slate-500">Manage roles and access</p>
</a>
@endif
<a href="{{ route('frontdesk.kiosk') }}" class="rounded-2xl border border-slate-200 bg-white p-5 hover:border-indigo-300">
<h3 class="font-semibold text-slate-900">Kiosk mode</h3>
<p class="mt-1 text-sm text-slate-500">Open self-service check-in</p>
</a>
@if ($canManage)
<a href="{{ route('frontdesk.settings.badge') }}" class="rounded-2xl border border-slate-200 bg-white p-5 hover:border-indigo-300">
<h3 class="font-semibold text-slate-900">Badge template</h3>
<p class="mt-1 text-sm text-slate-500">Layout, photo, and QR settings</p>
</a>
<a href="{{ route('frontdesk.integrations.edit') }}" class="rounded-2xl border border-slate-200 bg-white p-5 hover:border-indigo-300">
<h3 class="font-semibold text-slate-900">Integrations</h3>
<p class="mt-1 text-sm text-slate-500">Webhooks and calendar feeds</p>
</a>
<a href="{{ route('frontdesk.devices.index') }}" class="rounded-2xl border border-slate-200 bg-white p-5 hover:border-indigo-300">
<h3 class="font-semibold text-slate-900">Devices</h3>
<p class="mt-1 text-sm text-slate-500">Kiosks, printers, and hardware</p>
</a>
@endif
</div>
</x-app-layout>