Add employee presence with kiosk sign-in, QR badges, and mobile step-out.
Deploy Ladill Frontdesk / deploy (push) Failing after 26s
Deploy Ladill Frontdesk / deploy (push) Failing after 26s
Enables staff roster, PIN/code kiosk flow, attendance reports, evacuation staff roll call, webhooks, branch mismatch warnings, and a linked-user My presence portal. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Services\Frontdesk;
|
||||
|
||||
use App\Models\Employee;
|
||||
use App\Models\Visit;
|
||||
use chillerlan\QRCode\QRCode;
|
||||
use chillerlan\QRCode\QROptions;
|
||||
@@ -15,7 +16,24 @@ class QrCodeService
|
||||
return url($path.'/'.$visit->qr_token);
|
||||
}
|
||||
|
||||
public function employeeUrl(Employee $employee): string
|
||||
{
|
||||
$path = config('frontdesk.badge.employee_qr_url_path', '/eq');
|
||||
|
||||
return url($path.'/'.$employee->qr_token);
|
||||
}
|
||||
|
||||
public function svg(Visit $visit, int $size = 200): string
|
||||
{
|
||||
return $this->renderSvg($this->visitUrl($visit), $size);
|
||||
}
|
||||
|
||||
public function employeeSvg(Employee $employee, int $size = 200): string
|
||||
{
|
||||
return $this->renderSvg($this->employeeUrl($employee), $size);
|
||||
}
|
||||
|
||||
protected function renderSvg(string $url, int $size = 200): string
|
||||
{
|
||||
$options = new QROptions([
|
||||
'outputType' => QRCode::OUTPUT_MARKUP_SVG,
|
||||
@@ -23,6 +41,6 @@ class QrCodeService
|
||||
'imageBase64' => false,
|
||||
]);
|
||||
|
||||
return (new QRCode($options))->render($this->visitUrl($visit));
|
||||
return (new QRCode($options))->render($url);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user