A new Notifications module shows a bell beside the profile menu with the number of unseen notifications and a panel of the last 7 days; opening it marks them seen, and each notification links to its job or task. - A daily run at 14.00 (notifications:task-starts) tells the assignee and members of tasks that start by the next working day, skipping holidays and days off, done tasks and archived jobs. - Jobs publishes PeopleAddedToTask and PeopleAddedToJob when someone else makes a user a task's assignee or member or gives them a role on a job; those users are notified at once. UpdateTask and ScheduleTask now take the acting user. - A notification link to #task-<id> opens that task card on the job page. Also: simplifying job fields per service unit (K31) moves to the end of phase 4, and the workflow template browser test waits for Livewire's progress bar before its last accessibility check. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
115 lines
5.3 KiB
PHP
115 lines
5.3 KiB
PHP
<!DOCTYPE html>
|
|
<html
|
|
lang="{{ str_replace('_', '-', app()->getLocale()) }}"
|
|
x-data="tallstackui_darkTheme({ default: 'system' })"
|
|
x-bind:class="{ 'dark': darkTheme }"
|
|
>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>{{ $title ?? config('app.name') }}</title>
|
|
|
|
{{--
|
|
Apply the stored theme before the first paint. TallStackUI's
|
|
tallstackui_darkTheme() keeps it in localStorage ("dark-theme"),
|
|
but only runs once Alpine starts, which would flash the light theme.
|
|
Like the package, any value other than dark/light (true/false) means "system".
|
|
wire:navigate replaces the <html> attributes with the server's, which
|
|
drops the class, so it is applied again on every page swap.
|
|
--}}
|
|
<script>
|
|
(() => {
|
|
const applyStoredTheme = () => {
|
|
const stored = localStorage.getItem('dark-theme');
|
|
const dark = stored === 'dark' || stored === 'true'
|
|
|| (stored !== 'light' && stored !== 'false' && window.matchMedia('(prefers-color-scheme: dark)').matches);
|
|
document.documentElement.classList.toggle('dark', dark);
|
|
};
|
|
|
|
applyStoredTheme();
|
|
document.addEventListener('livewire:navigating', (event) => event.detail.onSwap(applyStoredTheme));
|
|
})();
|
|
</script>
|
|
|
|
<link rel="preconnect" href="https://fonts.bunny.net">
|
|
<link href="https://fonts.bunny.net/css?family=inter:400,500,600&display=swap" rel="stylesheet" />
|
|
|
|
@include('partials.tallstackui-script')
|
|
@livewireStyles
|
|
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
|
</head>
|
|
<body class="min-h-screen bg-zinc-100 text-zinc-900 antialiased dark:bg-zinc-800 dark:text-zinc-100">
|
|
<a
|
|
href="#main-content"
|
|
class="sr-only focus:not-sr-only focus:fixed focus:start-4 focus:top-4 focus:z-50 focus:rounded-md focus:bg-white focus:px-4 focus:py-2 focus:text-zinc-900 focus:shadow-lg focus:outline-2 focus:outline-offset-2 focus:outline-blue-700"
|
|
>
|
|
{{ __('layout.skip_to_content') }}
|
|
</a>
|
|
|
|
@auth
|
|
{{-- Sticky from md up; on narrow screens (and 400 % zoom) the wrapped header would take too much of the view. --}}
|
|
<header id="app-header" class="dark border-b border-zinc-700 bg-zinc-800 text-zinc-100 md:sticky md:top-0 md:z-30">
|
|
<div class="mx-auto flex max-w-5xl flex-wrap items-center gap-x-6 gap-y-2 px-4 py-3 sm:px-6">
|
|
<a href="{{ route('home') }}" wire:navigate class="rounded font-semibold text-zinc-200 hover:text-white focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-400">
|
|
{{ app(\App\Modules\Shared\Application\UseCases\CompanyDetailsStore::class)->menuName() }}
|
|
</a>
|
|
|
|
<nav aria-label="{{ __('layout.main_menu') }}" class="flex flex-1 flex-wrap items-center gap-1">
|
|
@foreach (app(\App\View\MainMenu::class)->groups(auth()->user()) as $group)
|
|
<x-nav-group :group="$group" />
|
|
@endforeach
|
|
</nav>
|
|
|
|
<div class="flex flex-wrap items-start gap-1">
|
|
<livewire:notifications::bell />
|
|
<x-profile-menu />
|
|
</div>
|
|
</div>
|
|
</header>
|
|
@else
|
|
<header class="flex items-center justify-end gap-3 px-4 pt-3 sm:px-6">
|
|
@include('partials.locale-switch')
|
|
@include('partials.theme-toggle')
|
|
</header>
|
|
@endauth
|
|
|
|
<main id="main-content" tabindex="-1" class="focus:outline-none">
|
|
{{ $slot }}
|
|
</main>
|
|
|
|
{{--
|
|
While the header is sticky, scroll-padding-top keeps focused elements, anchors (#tasks) and the skip link
|
|
target from scrolling under it (WCAG 2.4.11). The offset follows the header's height as it wraps or resizes,
|
|
and is set again after wire:navigate swaps the page (data-navigate-once: the listeners are added only once).
|
|
--}}
|
|
<script data-navigate-once>
|
|
(() => {
|
|
let observer = null;
|
|
|
|
const trackHeader = () => {
|
|
observer?.disconnect();
|
|
const header = document.getElementById('app-header');
|
|
const update = () => {
|
|
const sticky = header !== null && getComputedStyle(header).position === 'sticky';
|
|
document.documentElement.style.setProperty('--app-header-offset', sticky ? header.offsetHeight + 'px' : '0px');
|
|
};
|
|
|
|
update();
|
|
|
|
if (header !== null && 'ResizeObserver' in window) {
|
|
observer = new ResizeObserver(update);
|
|
observer.observe(header);
|
|
}
|
|
};
|
|
|
|
trackHeader();
|
|
window.addEventListener('resize', trackHeader);
|
|
document.addEventListener('livewire:navigated', trackHeader);
|
|
})();
|
|
</script>
|
|
|
|
@livewireScripts
|
|
</body>
|
|
</html>
|