major ui updates

This commit is contained in:
Mark Gregory
2026-06-12 15:11:51 +01:00
parent 3c9b39d83b
commit 7bc8f20ed5
154 changed files with 3796 additions and 4117 deletions
@@ -10,20 +10,18 @@ final class TicketReferenceService
{
/**
* Build the next human-readable ticket reference.
*
* @return string
*/
public function next(): string
{
$year = now()->format('Y');
$prefix = 'HD-' . $year . '-';
$prefix = 'HD-'.$year.'-';
$last = Ticket::query()
->where('reference', 'like', $prefix . '%')
->where('reference', 'like', $prefix.'%')
->latest('id')
->value('reference');
$next = $last ? ((int) substr((string) $last, -5)) + 1 : 1;
return $prefix . str_pad((string) $next, 5, '0', STR_PAD_LEFT);
return $prefix.str_pad((string) $next, 5, '0', STR_PAD_LEFT);
}
}