Show uploaded company logo on employee badges instead of org name.
Deploy Ladill Frontdesk / deploy (push) Successful in 33s
Deploy Ladill Frontdesk / deploy (push) Successful in 33s
Use the organization logo from Settings when present, with the company name as fallback when no logo is uploaded. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
body { font-family: system-ui, sans-serif; margin: 0; padding: 1rem; background: #f8fafc; }
|
body { font-family: system-ui, sans-serif; margin: 0; padding: 1rem; background: #f8fafc; }
|
||||||
.badge { width: 3.5in; border: 2px solid #4f46e5; border-radius: 12px; padding: 1rem; background: #fff; }
|
.badge { width: 3.5in; border: 2px solid #4f46e5; border-radius: 12px; padding: 1rem; background: #fff; }
|
||||||
.org { font-size: 0.75rem; color: #666; text-transform: uppercase; letter-spacing: 0.05em; }
|
.org { font-size: 0.75rem; color: #666; text-transform: uppercase; letter-spacing: 0.05em; }
|
||||||
|
.org-logo { display: block; max-height: 2.25rem; max-width: 100%; object-fit: contain; margin-bottom: 0.5rem; }
|
||||||
.name { font-size: 1.5rem; font-weight: 700; margin: 0.5rem 0; color: #0f172a; }
|
.name { font-size: 1.5rem; font-weight: 700; margin: 0.5rem 0; color: #0f172a; }
|
||||||
.meta { font-size: 0.875rem; color: #444; line-height: 1.5; }
|
.meta { font-size: 0.875rem; color: #444; line-height: 1.5; }
|
||||||
.code { font-family: monospace; font-size: 1.25rem; font-weight: 700; color: #4f46e5; margin-top: 1rem; }
|
.code { font-family: monospace; font-size: 1.25rem; font-weight: 700; color: #4f46e5; margin-top: 1rem; }
|
||||||
@@ -17,7 +18,14 @@
|
|||||||
<body onload="window.print()">
|
<body onload="window.print()">
|
||||||
<button class="no-print" onclick="window.print()" style="margin-bottom:1rem">Print badge</button>
|
<button class="no-print" onclick="window.print()" style="margin-bottom:1rem">Print badge</button>
|
||||||
<div class="badge">
|
<div class="badge">
|
||||||
<div class="org">{{ $employee->organization->name ?? 'Staff' }}</div>
|
@php($organization = $employee->organization)
|
||||||
|
@if ($organization && \App\Support\OrganizationBranding::hasCustomLogo($organization))
|
||||||
|
<img src="{{ \App\Support\OrganizationBranding::logoUrl($organization) }}"
|
||||||
|
alt="{{ \App\Support\OrganizationBranding::logoAlt($organization) }}"
|
||||||
|
class="org-logo">
|
||||||
|
@else
|
||||||
|
<div class="org">{{ $organization->name ?? 'Staff' }}</div>
|
||||||
|
@endif
|
||||||
<div class="name">{{ $employee->full_name }}</div>
|
<div class="name">{{ $employee->full_name }}</div>
|
||||||
<div class="meta">
|
<div class="meta">
|
||||||
@if ($employee->department){{ $employee->department }}<br>@endif
|
@if ($employee->department){{ $employee->department }}<br>@endif
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-slate-700">Company logo</label>
|
<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 MB.</p>
|
<p class="mt-1 text-xs text-slate-500">Shown on the visitor kiosk and employee badges. PNG, JPG, WebP, or SVG up to 2 MB.</p>
|
||||||
@if (\App\Support\OrganizationBranding::hasCustomLogo($organization))
|
@if (\App\Support\OrganizationBranding::hasCustomLogo($organization))
|
||||||
<img src="{{ \App\Support\OrganizationBranding::logoUrl($organization) }}"
|
<img src="{{ \App\Support\OrganizationBranding::logoUrl($organization) }}"
|
||||||
alt="{{ $organization->name }}"
|
alt="{{ $organization->name }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user