Give the UI an indigo look with cards, status badges and empty states
- Dark indigo header and tinted page background; the mobile main menu gets its own row, in the same order as the keyboard reaches it. - Page titles with an icon chip (x-page-title, x-page, x-page-header) and card sections (x-panel, the card utility); x-table styled as a card with an indigo header row in AppServiceProvider::styleTables(). - Job and task statuses, late work, unapproved hours and stock states as badges with icon and text (x-status-badge, x-jobs.status, x-jobs.task-status), never colour alone. - Empty lists as x-empty-state; dashboard quick link tiles, week hour bars and trend arrows; Kanban columns and task cards edged by status; calendar today column and bar accents; quick sale, reports and machine console restyled; signed-out pages show the app name. - Focus rings use the primary colour in both themes (white in the header). - Document the components in CLAUDE.md; test the status badges. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -318,7 +318,7 @@ new class extends Component
|
||||
|
||||
<div class="space-y-2">
|
||||
<p><x-link :href="route('billing.index')" navigate>{{ __('billing.export.back') }}</x-link></p>
|
||||
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
|
||||
<x-page-title icon="document-arrow-down">{{ $this->heading() }}</x-page-title>
|
||||
<p class="flex items-center gap-2 text-sm">
|
||||
@if ($export->isDraft())
|
||||
<x-icon name="pencil-square" class="size-5 shrink-0" aria-hidden="true" />
|
||||
@@ -353,7 +353,7 @@ new class extends Component
|
||||
wire:change="savePeriod($event.target.value)"
|
||||
aria-describedby="billing-period-help @error('period') billing-period-error @enderror"
|
||||
@error('period') aria-invalid="true" @enderror
|
||||
class="w-full rounded-md border border-zinc-400 bg-white px-2 py-1.5 text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 aria-invalid:border-red-700 dark:border-zinc-500 dark:bg-zinc-900 dark:text-zinc-100 dark:aria-invalid:border-red-400 dark:[color-scheme:dark]"
|
||||
class="w-full rounded-md border border-zinc-400 bg-white px-2 py-1.5 text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 aria-invalid:border-red-700 dark:border-zinc-500 dark:bg-zinc-900 dark:text-zinc-100 dark:aria-invalid:border-red-400 dark:[color-scheme:dark]"
|
||||
/>
|
||||
<p id="billing-period-help" class="text-xs text-zinc-600 dark:text-zinc-300">{{ __('billing.export.period_help') }}</p>
|
||||
@error('period')
|
||||
@@ -362,7 +362,7 @@ new class extends Component
|
||||
</div>
|
||||
|
||||
@if ($export->hasProblems())
|
||||
<p class="flex items-start gap-2 rounded-lg border border-amber-700 p-4 text-sm dark:border-amber-400">
|
||||
<p class="flex items-start gap-2 rounded-lg border border-amber-700 bg-amber-50 p-4 text-sm text-amber-950 dark:border-amber-400 dark:bg-amber-400/10 dark:text-amber-100">
|
||||
<x-icon name="exclamation-triangle" class="size-5 shrink-0" aria-hidden="true" />
|
||||
{{ __('billing.export.problems') }}
|
||||
</p>
|
||||
@@ -380,11 +380,11 @@ new class extends Component
|
||||
<h2 id="invoices-heading" class="text-xl font-semibold">{{ __('billing.invoices.title') }}</h2>
|
||||
|
||||
@if ($export->invoices === [])
|
||||
<p class="text-sm">{{ __('billing.invoices.none') }}</p>
|
||||
<x-empty-state icon="banknotes">{{ __('billing.invoices.none') }}</x-empty-state>
|
||||
@endif
|
||||
|
||||
@foreach ($export->invoices as $invoiceNumber => $invoice)
|
||||
<section wire:key="invoice-{{ $invoice->key }}" aria-labelledby="invoice-{{ $invoice->key }}-heading" class="space-y-4 rounded-lg border border-zinc-300 bg-white p-4 dark:border-zinc-600 dark:bg-zinc-900">
|
||||
<section wire:key="invoice-{{ $invoice->key }}" aria-labelledby="invoice-{{ $invoice->key }}-heading" class="card space-y-4">
|
||||
<div class="space-y-1">
|
||||
<h3 id="invoice-{{ $invoice->key }}-heading" class="text-lg font-semibold">{{ __('billing.invoices.heading', ['number' => $invoiceNumber + 1, 'customer' => $invoice->customerName]) }}</h3>
|
||||
<dl class="grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]">
|
||||
@@ -428,7 +428,7 @@ new class extends Component
|
||||
<table class="w-full text-sm">
|
||||
<caption class="mb-1 text-left font-medium">{{ __('billing.jobs.months_caption', ['job' => $job->label()]) }}</caption>
|
||||
<thead>
|
||||
<tr class="border-b border-zinc-300 text-left dark:border-zinc-600">
|
||||
<tr class="border-b-2 border-primary-200 text-left text-primary-900 dark:border-primary-800 dark:text-primary-100">
|
||||
<th scope="col" class="py-2 pr-3">{{ __('billing.jobs.month') }}</th>
|
||||
<th scope="col" class="py-2 text-right">{{ __('billing.jobs.amount') }}</th>
|
||||
</tr>
|
||||
@@ -463,7 +463,7 @@ new class extends Component
|
||||
<table class="w-full text-sm">
|
||||
<caption class="sr-only">{{ __('billing.jobs.hours_caption', ['job' => $job->label()]) }}</caption>
|
||||
<thead>
|
||||
<tr class="border-b border-zinc-300 text-left dark:border-zinc-600">
|
||||
<tr class="border-b-2 border-primary-200 text-left text-primary-900 dark:border-primary-800 dark:text-primary-100">
|
||||
<th scope="col" class="py-2 pr-3">{{ __('billing.jobs.work_type') }}</th>
|
||||
<th scope="col" class="py-2 pr-3 text-right">{{ __('billing.jobs.approved_hours') }}</th>
|
||||
<th scope="col" class="py-2 pr-3">{{ __('billing.jobs.billable_hours') }}</th>
|
||||
@@ -488,7 +488,7 @@ new class extends Component
|
||||
aria-label="{{ __('billing.jobs.billable_label', ['work_type' => $row->name]) }}"
|
||||
aria-describedby="hours-help-{{ $job->jobId }}"
|
||||
@error('hours.'.$job->jobId.'.'.$row->workTypeId) aria-invalid="true" aria-errormessage="{{ $fieldId }}-error" @enderror
|
||||
class="w-20 rounded-md border border-zinc-400 bg-white px-2 py-1.5 text-right text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 aria-invalid:border-red-700 dark:border-zinc-500 dark:bg-zinc-900 dark:text-zinc-100 dark:aria-invalid:border-red-400"
|
||||
class="w-20 rounded-md border border-zinc-400 bg-white px-2 py-1.5 text-right text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 aria-invalid:border-red-700 dark:border-zinc-500 dark:bg-zinc-900 dark:text-zinc-100 dark:aria-invalid:border-red-400"
|
||||
/>
|
||||
@if ($row->isAdjusted)
|
||||
<span class="ml-1 text-xs">({{ __('billing.jobs.adjusted') }})</span>
|
||||
@@ -512,7 +512,7 @@ new class extends Component
|
||||
<table class="w-full text-sm">
|
||||
<caption class="mb-1 text-left font-medium">{{ __('billing.jobs.expenses_caption', ['job' => $job->label()]) }}</caption>
|
||||
<thead>
|
||||
<tr class="border-b border-zinc-300 text-left dark:border-zinc-600">
|
||||
<tr class="border-b-2 border-primary-200 text-left text-primary-900 dark:border-primary-800 dark:text-primary-100">
|
||||
<th scope="col" class="py-2 pr-3">{{ __('billing.jobs.expense') }}</th>
|
||||
<th scope="col" class="py-2 text-right">{{ __('billing.jobs.amount') }}</th>
|
||||
</tr>
|
||||
@@ -557,7 +557,7 @@ new class extends Component
|
||||
<table class="w-full text-sm">
|
||||
<caption class="sr-only">{{ __('billing.lines.caption', ['job' => $job->label()]) }}</caption>
|
||||
<thead>
|
||||
<tr class="border-b border-zinc-300 text-left dark:border-zinc-600">
|
||||
<tr class="border-b-2 border-primary-200 text-left text-primary-900 dark:border-primary-800 dark:text-primary-100">
|
||||
<th scope="col" class="py-2 pr-3">{{ __('billing.lines.description') }}</th>
|
||||
<th scope="col" class="py-2 pr-3 text-right">{{ __('billing.lines.recorded') }}</th>
|
||||
<th scope="col" class="py-2 pr-3 text-right">{{ __('billing.lines.quantity') }}</th>
|
||||
@@ -630,7 +630,7 @@ new class extends Component
|
||||
<p class="text-sm">{{ __('billing.available.intro') }}</p>
|
||||
|
||||
@if ($export->availableJobs === [])
|
||||
<p class="text-sm">{{ __('billing.available.none') }}</p>
|
||||
<x-empty-state icon="banknotes">{{ __('billing.available.none') }}</x-empty-state>
|
||||
@else
|
||||
<x-table :headers="$this->availableHeaders()" :rows="$export->availableJobs">
|
||||
@interact('column_job', $available)
|
||||
|
||||
@@ -87,7 +87,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-6xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl font-semibold">{{ __('billing.index.title') }}</h1>
|
||||
<x-page-title icon="banknotes">{{ __('billing.index.title') }}</x-page-title>
|
||||
<p class="max-w-3xl text-sm">{{ __('billing.index.intro') }}</p>
|
||||
</div>
|
||||
|
||||
@@ -102,7 +102,7 @@ new class extends Component
|
||||
<p role="status" aria-live="polite" class="text-sm font-medium">{{ $statusMessage }}</p>
|
||||
|
||||
@if ($this->exports === [])
|
||||
<p class="text-sm">{{ __('billing.index.none') }}</p>
|
||||
<x-empty-state icon="banknotes">{{ __('billing.index.none') }}</x-empty-state>
|
||||
@else
|
||||
<x-table :headers="$this->headers()" :rows="$this->exports">
|
||||
@interact('column_number', $export)
|
||||
|
||||
@@ -78,11 +78,11 @@ new class extends Component
|
||||
<div class="mx-auto max-w-4xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<p><x-link :href="route('jobs.show', $job->id)" navigate>{{ __('billing.job_months.back') }}</x-link></p>
|
||||
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
|
||||
<x-page-title icon="calendar">{{ $this->heading() }}</x-page-title>
|
||||
<p class="max-w-3xl text-sm">{{ __('billing.job_months.intro') }}</p>
|
||||
</div>
|
||||
|
||||
<section aria-labelledby="summary-heading" class="space-y-2">
|
||||
<section aria-labelledby="summary-heading" class="card space-y-2">
|
||||
<h2 id="summary-heading" class="sr-only">{{ __('billing.job_months.summary') }}</h2>
|
||||
<dl class="grid grid-cols-1 gap-x-6 gap-y-1 text-sm sm:grid-cols-[auto_1fr]">
|
||||
<dt class="font-medium">{{ __('billing.job_months.customer') }}</dt>
|
||||
@@ -113,7 +113,7 @@ new class extends Component
|
||||
<h2 id="billed-heading" class="text-xl font-semibold">{{ __('billing.job_months.billed_title', ['count' => count($billing->billed)]) }}</h2>
|
||||
|
||||
@if ($billing->billed === [])
|
||||
<p class="text-sm">{{ __('billing.job_months.none_billed') }}</p>
|
||||
<x-empty-state icon="banknotes">{{ __('billing.job_months.none_billed') }}</x-empty-state>
|
||||
@else
|
||||
<x-table :headers="$this->headers()" :rows="$billing->billed">
|
||||
@interact('column_month', $month)
|
||||
@@ -137,7 +137,7 @@ new class extends Component
|
||||
@endif
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="unbilled-heading" class="space-y-3">
|
||||
<section aria-labelledby="unbilled-heading" class="card space-y-3">
|
||||
<h2 id="unbilled-heading" class="text-xl font-semibold">{{ __('billing.job_months.unbilled_title', ['month' => $this->monthLabel($billing->currentMonth)]) }}</h2>
|
||||
|
||||
@if ($billing->unbilled === [])
|
||||
|
||||
@@ -114,7 +114,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-5xl space-y-6 p-4 sm:p-6">
|
||||
<div class="flex flex-wrap items-center justify-between gap-4">
|
||||
<h1 class="text-2xl font-semibold">{{ __('catalog.title') }}</h1>
|
||||
<x-page-title icon="squares-plus">{{ __('catalog.title') }}</x-page-title>
|
||||
|
||||
<x-button :href="route('catalog.service-units.create')" wire:navigate icon="plus" :text="__('catalog.actions.add_service_unit')" />
|
||||
</div>
|
||||
@@ -139,7 +139,7 @@ new class extends Component
|
||||
<section
|
||||
wire:key="service-unit-{{ $unit->id }}"
|
||||
aria-labelledby="service-unit-{{ $unit->id }}-heading"
|
||||
class="space-y-4 rounded-lg border border-zinc-200 p-4 dark:border-zinc-700"
|
||||
class="card space-y-4"
|
||||
>
|
||||
<div class="flex flex-wrap items-center justify-between gap-3">
|
||||
<h2 id="service-unit-{{ $unit->id }}-heading" class="text-xl font-semibold break-words">
|
||||
|
||||
@@ -121,7 +121,7 @@ new class extends Component
|
||||
?>
|
||||
|
||||
<div class="mx-auto max-w-5xl space-y-8 p-4 sm:p-6">
|
||||
<h1 class="text-2xl font-semibold">{{ __('catalog.prices.title') }}</h1>
|
||||
<x-page-title icon="tag">{{ __('catalog.prices.title') }}</x-page-title>
|
||||
|
||||
<section aria-labelledby="consumer-products-heading" class="space-y-4">
|
||||
<div class="space-y-1">
|
||||
@@ -130,7 +130,7 @@ new class extends Component
|
||||
</div>
|
||||
|
||||
@if ($this->consumerProducts === [])
|
||||
<p class="text-sm">{{ __('catalog.products.none') }}</p>
|
||||
<x-empty-state icon="tag">{{ __('catalog.products.none') }}</x-empty-state>
|
||||
@else
|
||||
<x-table :headers="$this->consumerHeaders()" :rows="$this->consumerProducts">
|
||||
@interact('column_name', $product)
|
||||
@@ -191,7 +191,7 @@ new class extends Component
|
||||
<h2 id="other-products-heading" class="text-xl font-semibold">{{ __('catalog.price_list.other_products') }}</h2>
|
||||
|
||||
@if ($this->otherProducts === [])
|
||||
<p class="text-sm">{{ __('catalog.products.none') }}</p>
|
||||
<x-empty-state icon="tag">{{ __('catalog.products.none') }}</x-empty-state>
|
||||
@else
|
||||
<x-table :headers="$this->otherHeaders()" :rows="$this->otherProducts">
|
||||
@interact('column_name', $product)
|
||||
@@ -217,7 +217,7 @@ new class extends Component
|
||||
@endif
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="mileage-heading" class="space-y-2">
|
||||
<section aria-labelledby="mileage-heading" class="card space-y-2">
|
||||
<h2 id="mileage-heading" class="text-xl font-semibold">{{ __('catalog.mileage.title') }}</h2>
|
||||
<p>
|
||||
{{ $this->mileageRateCents === null
|
||||
|
||||
@@ -346,7 +346,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-5xl space-y-8 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl font-semibold">{{ __('catalog.prices.title') }}</h1>
|
||||
<x-page-title icon="tag">{{ __('catalog.prices.title') }}</x-page-title>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('catalog.prices.intro') }}</p>
|
||||
</div>
|
||||
|
||||
@@ -405,7 +405,7 @@ new class extends Component
|
||||
wire:change="saveRate({{ $row->workTypeId }}, $event.target.value)"
|
||||
aria-label="{{ __('catalog.prices.rate_label', ['name' => ($row->serviceName !== null ? $row->serviceName.': ' : '').$row->name, 'unit' => $group->serviceUnitName]) }}"
|
||||
@error('rates.'.$row->workTypeId) aria-invalid="true" aria-describedby="rate-{{ $row->workTypeId }}-error" @enderror
|
||||
class="w-24 rounded-md border border-zinc-400 bg-white px-2 py-1.5 text-right text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 aria-invalid:border-red-700 dark:border-zinc-500 dark:bg-zinc-900 dark:text-zinc-100 dark:aria-invalid:border-red-400"
|
||||
class="w-24 rounded-md border border-zinc-400 bg-white px-2 py-1.5 text-right text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 aria-invalid:border-red-700 dark:border-zinc-500 dark:bg-zinc-900 dark:text-zinc-100 dark:aria-invalid:border-red-400"
|
||||
/>
|
||||
@error('rates.'.$row->workTypeId)
|
||||
<p id="rate-{{ $row->workTypeId }}-error" class="mt-1 text-xs text-red-700 dark:text-red-400">{{ $message }}</p>
|
||||
@@ -427,7 +427,7 @@ new class extends Component
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('catalog.products.help') }}</p>
|
||||
|
||||
@if ($this->products === [])
|
||||
<p class="text-sm">{{ __('catalog.products.none') }}</p>
|
||||
<x-empty-state icon="tag">{{ __('catalog.products.none') }}</x-empty-state>
|
||||
@else
|
||||
<x-table :headers="$this->productHeaders()" :rows="$this->products">
|
||||
@interact('column_name', $product)
|
||||
@@ -522,7 +522,7 @@ new class extends Component
|
||||
</x-table>
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="mileage-heading" class="space-y-4">
|
||||
<section aria-labelledby="mileage-heading" class="card space-y-4">
|
||||
<h2 id="mileage-heading" class="text-xl font-semibold">{{ __('catalog.expense_markup.section') }}</h2>
|
||||
|
||||
<form wire:submit="saveMileageRate" class="flex max-w-md flex-wrap items-end gap-3" novalidate>
|
||||
@@ -552,7 +552,7 @@ new class extends Component
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="internal-cost-heading" class="space-y-4">
|
||||
<section aria-labelledby="internal-cost-heading" class="card space-y-4">
|
||||
<h2 id="internal-cost-heading" class="text-xl font-semibold">{{ __('catalog.internal_cost.section') }}</h2>
|
||||
|
||||
<form wire:submit="saveInternalHourlyCost" class="flex max-w-md flex-wrap items-end gap-3" novalidate>
|
||||
|
||||
@@ -179,9 +179,9 @@ new class extends Component
|
||||
?>
|
||||
|
||||
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
|
||||
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
|
||||
<x-page-title icon="cube">{{ $this->heading() }}</x-page-title>
|
||||
|
||||
<form wire:submit="save" class="space-y-6" novalidate>
|
||||
<form wire:submit="save" class="card space-y-6" novalidate>
|
||||
<x-input wire:model="form.name" :label="__('catalog.fields.name')" autocomplete="off" required />
|
||||
|
||||
{{-- TallStackUI's native select does not tie its label to the control, so aria-label names it. --}}
|
||||
|
||||
@@ -87,13 +87,13 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-1">
|
||||
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
|
||||
<x-page-title icon="rectangle-stack">{{ $this->heading() }}</x-page-title>
|
||||
@if ($unitName !== '')
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('catalog.fields.service_unit') }}: {{ $unitName }}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<form wire:submit="save" class="space-y-6" novalidate>
|
||||
<form wire:submit="save" class="card space-y-6" novalidate>
|
||||
<x-input wire:model="form.name" :label="__('catalog.fields.name')" autocomplete="off" required />
|
||||
|
||||
<div class="flex flex-wrap gap-3">
|
||||
|
||||
@@ -89,11 +89,11 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-1">
|
||||
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
|
||||
<x-page-title icon="building-office">{{ $this->heading() }}</x-page-title>
|
||||
|
||||
</div>
|
||||
|
||||
<form wire:submit="save" class="space-y-6" novalidate>
|
||||
<form wire:submit="save" class="card space-y-6" novalidate>
|
||||
<x-input wire:model="form.name" :label="__('catalog.fields.name')" autocomplete="off" required />
|
||||
|
||||
@unless ($isShared)
|
||||
|
||||
@@ -103,13 +103,13 @@ new class extends Component
|
||||
?>
|
||||
|
||||
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
|
||||
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
|
||||
<x-page-title icon="receipt-percent">{{ $this->heading() }}</x-page-title>
|
||||
|
||||
@if ($vatRateId !== null)
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('catalog.vat_rates.change_help') }}</p>
|
||||
@endif
|
||||
|
||||
<form wire:submit="save" class="space-y-6" novalidate>
|
||||
<form wire:submit="save" class="card space-y-6" novalidate>
|
||||
<x-input wire:model="name" :label="__('catalog.fields.name')" :hint="__('catalog.vat_rates.name_help')" autocomplete="off" required />
|
||||
|
||||
<x-input
|
||||
|
||||
@@ -106,13 +106,13 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-1">
|
||||
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
|
||||
<x-page-title icon="wrench-screwdriver">{{ $this->heading() }}</x-page-title>
|
||||
@if ($unitName !== '')
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('catalog.fields.service_unit') }}: {{ $unitName }}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<form wire:submit="save" class="space-y-6" novalidate>
|
||||
<form wire:submit="save" class="card space-y-6" novalidate>
|
||||
<x-input wire:model="form.name" :label="__('catalog.fields.name')" autocomplete="off" required />
|
||||
|
||||
@if ($this->services !== [])
|
||||
|
||||
@@ -311,7 +311,7 @@ new class extends Component
|
||||
?>
|
||||
|
||||
<div class="mx-auto max-w-3xl space-y-6 p-4 sm:p-6">
|
||||
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
|
||||
<x-page-title icon="queue-list">{{ $this->heading() }}</x-page-title>
|
||||
|
||||
<form wire:submit="save" class="space-y-6" novalidate>
|
||||
<x-input wire:model="form.name" :label="__('catalog.fields.name')" :hint="__('catalog.workflows.name_help')" autocomplete="off" required />
|
||||
@@ -334,7 +334,7 @@ new class extends Component
|
||||
@endforeach
|
||||
</x-select.native>
|
||||
|
||||
<section aria-labelledby="steps-heading" class="space-y-4">
|
||||
<section aria-labelledby="steps-heading" class="card space-y-4">
|
||||
<div class="space-y-1">
|
||||
<h2 id="steps-heading" class="text-xl font-semibold">{{ __('catalog.workflows.steps') }}</h2>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('catalog.workflows.steps_help') }}</p>
|
||||
@@ -350,7 +350,7 @@ new class extends Component
|
||||
@foreach ($form->steps as $index => $step)
|
||||
{{-- The index is part of the key: a moved step is rendered anew, so its fields bind to their new position. --}}
|
||||
<li wire:key="step-{{ $step['key'] }}-{{ $index }}">
|
||||
<fieldset class="space-y-4 rounded-lg border border-zinc-200 bg-white p-4 dark:border-zinc-700 dark:bg-black">
|
||||
<fieldset class="space-y-4 rounded-lg border border-zinc-200 bg-white p-4 dark:border-zinc-700 dark:bg-zinc-900">
|
||||
<legend class="px-1 font-medium">{{ __('catalog.workflows.step_legend', ['number' => $index + 1]) }}</legend>
|
||||
|
||||
<x-input
|
||||
|
||||
@@ -82,7 +82,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-5xl space-y-6 p-4 sm:p-6">
|
||||
<div class="flex flex-wrap items-center justify-between gap-4">
|
||||
<h1 class="text-2xl font-semibold">{{ __('catalog.workflows.title') }}</h1>
|
||||
<x-page-title icon="queue-list">{{ __('catalog.workflows.title') }}</x-page-title>
|
||||
|
||||
<x-button :href="route('catalog.workflow-templates.create')" wire:navigate icon="plus" :text="__('catalog.workflows.add')" />
|
||||
</div>
|
||||
@@ -138,7 +138,7 @@ new class extends Component
|
||||
wire:click="toggleActive({{ $template->id }})"
|
||||
@checked($template->isActive)
|
||||
aria-label="{{ __('catalog.actions.active_named', ['name' => $template->name]) }}"
|
||||
class="size-4 rounded border-zinc-400 text-primary-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:border-zinc-500 dark:bg-zinc-800"
|
||||
class="size-4 rounded border-zinc-400 text-primary-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 dark:border-zinc-500 dark:bg-zinc-800"
|
||||
/>
|
||||
<span aria-hidden="true">{{ __('catalog.actions.active') }}</span>
|
||||
</label>
|
||||
@@ -147,6 +147,6 @@ new class extends Component
|
||||
</x-table>
|
||||
</section>
|
||||
@empty
|
||||
<p>{{ __('catalog.workflows.none') }}</p>
|
||||
<x-empty-state icon="tag">{{ __('catalog.workflows.none') }}</x-empty-state>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
@@ -91,14 +91,14 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-1">
|
||||
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
|
||||
<x-page-title icon="building-office-2">{{ $this->heading() }}</x-page-title>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">
|
||||
{{ __('customers.customer_label') }}:
|
||||
<x-link :href="route('customers.show', $customerId)" navigate>{{ $customerName }}</x-link>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<form wire:submit="save" class="space-y-6" novalidate>
|
||||
<form wire:submit="save" class="card space-y-6" novalidate>
|
||||
<x-input wire:model="form.name" :label="__('customers.billing_units.fields.name')" :hint="__('customers.billing_units.fields.name_description')" autocomplete="off" required />
|
||||
|
||||
<x-textarea wire:model="form.billing_address" :label="__('customers.billing_units.fields.billing_address')" :hint="__('customers.billing_units.fields.billing_address_description')" resize-auto />
|
||||
|
||||
@@ -88,14 +88,14 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-1">
|
||||
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
|
||||
<x-page-title icon="user">{{ $this->heading() }}</x-page-title>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">
|
||||
{{ __('customers.customer_label') }}:
|
||||
<x-link :href="route('customers.show', $customerId)" navigate>{{ $customerName }}</x-link>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<form wire:submit="save" class="space-y-6" novalidate>
|
||||
<form wire:submit="save" class="card space-y-6" novalidate>
|
||||
<x-input wire:model="form.name" :label="__('customers.contacts.fields.name')" autocomplete="off" required />
|
||||
|
||||
<x-input wire:model="form.title" :label="__('customers.contacts.fields.title')" :hint="__('customers.contacts.fields.title_description')" autocomplete="off" />
|
||||
|
||||
@@ -120,11 +120,11 @@ new class extends Component
|
||||
?>
|
||||
|
||||
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
|
||||
<h1 class="text-2xl font-semibold">
|
||||
<x-page-title icon="user-group">
|
||||
{{ __($customerId === null ? 'customers.create_title' : 'customers.edit_title') }}
|
||||
</h1>
|
||||
</x-page-title>
|
||||
|
||||
<form wire:submit="save" class="space-y-6" novalidate>
|
||||
<form wire:submit="save" class="card space-y-6" novalidate>
|
||||
<x-input
|
||||
wire:model="form.name"
|
||||
:label="__('customers.fields.name')"
|
||||
|
||||
@@ -63,7 +63,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-5xl space-y-6 p-4 sm:p-6">
|
||||
<div class="flex flex-wrap items-center justify-between gap-4">
|
||||
<h1 class="text-2xl font-semibold">{{ __('customers.title') }}</h1>
|
||||
<x-page-title icon="user-group">{{ __('customers.title') }}</x-page-title>
|
||||
|
||||
<x-button :href="route('customers.create')" wire:navigate icon="plus" :text="__('customers.new')" />
|
||||
</div>
|
||||
@@ -85,7 +85,7 @@ new class extends Component
|
||||
</p>
|
||||
|
||||
@if ($this->customers->total() === 0)
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('customers.empty') }}</p>
|
||||
<x-empty-state icon="user-group">{{ __('customers.empty') }}</x-empty-state>
|
||||
@else
|
||||
<x-table :headers="$this->headers()" :rows="$this->customers" paginate>
|
||||
@interact('column_name', $customer)
|
||||
|
||||
@@ -211,8 +211,11 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-5xl space-y-8 p-4 sm:p-6">
|
||||
<div class="space-y-4">
|
||||
<a href="{{ route('customers.index') }}" wire:navigate class="inline-flex min-h-6 items-center gap-1 rounded-md text-sm font-medium text-primary-700 underline-offset-4 hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:text-primary-300 dark:focus-visible:outline-primary-300">
|
||||
<x-icon name="arrow-left" class="size-4" aria-hidden="true" />{{ __('customers.title') }}
|
||||
</a>
|
||||
<div class="flex flex-wrap items-center justify-between gap-4">
|
||||
<h1 id="customer-heading" tabindex="-1" class="text-2xl font-semibold break-words focus:outline-none">{{ $this->customer->name }}</h1>
|
||||
<x-page-title icon="user-group" id="customer-heading" tabindex="-1" class="focus:outline-none">{{ $this->customer->name }}</x-page-title>
|
||||
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<x-button
|
||||
@@ -240,7 +243,7 @@ new class extends Component
|
||||
<x-alert role="status" color="green" light icon="check-circle" :text="session('status')" />
|
||||
@endif
|
||||
|
||||
<dl class="grid gap-x-6 gap-y-2 text-sm sm:grid-cols-[max-content_1fr]">
|
||||
<dl class="card grid gap-x-6 gap-y-2 text-sm sm:grid-cols-[max-content_1fr]">
|
||||
<dt class="font-medium">{{ __('customers.fields.type') }}</dt>
|
||||
<dd>
|
||||
{{ __('customers.types.'.$this->customer->type->value) }}
|
||||
@@ -272,7 +275,7 @@ new class extends Component
|
||||
<p role="status" aria-live="polite" class="text-sm">{{ $statusMessage }}</p>
|
||||
</div>
|
||||
|
||||
<section aria-labelledby="contacts-heading" class="space-y-4">
|
||||
<section aria-labelledby="contacts-heading" class="card space-y-4">
|
||||
<div class="flex flex-wrap items-center justify-between gap-4">
|
||||
<h2 id="contacts-heading" tabindex="-1" class="text-xl font-semibold focus:outline-none">
|
||||
{{ __('customers.contacts.title') }}
|
||||
@@ -287,7 +290,7 @@ new class extends Component
|
||||
</div>
|
||||
|
||||
@if ($this->contacts === [])
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('customers.contacts.empty') }}</p>
|
||||
<x-empty-state icon="user-group">{{ __('customers.contacts.empty') }}</x-empty-state>
|
||||
@else
|
||||
<ul class="divide-y divide-zinc-200 rounded-lg border border-zinc-200 dark:divide-zinc-700 dark:border-zinc-700">
|
||||
@foreach ($this->contacts as $contact)
|
||||
@@ -345,7 +348,7 @@ new class extends Component
|
||||
@endif
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="billing-units-heading" class="space-y-4">
|
||||
<section aria-labelledby="billing-units-heading" class="card space-y-4">
|
||||
<div class="flex flex-wrap items-center justify-between gap-4">
|
||||
<h2 id="billing-units-heading" tabindex="-1" class="text-xl font-semibold focus:outline-none">
|
||||
{{ __('customers.billing_units.title') }}
|
||||
@@ -360,7 +363,7 @@ new class extends Component
|
||||
</div>
|
||||
|
||||
@if ($this->billingUnits === [])
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('customers.billing_units.empty') }}</p>
|
||||
<x-empty-state icon="user-group">{{ __('customers.billing_units.empty') }}</x-empty-state>
|
||||
@else
|
||||
<ul class="divide-y divide-zinc-200 rounded-lg border border-zinc-200 dark:divide-zinc-700 dark:border-zinc-700">
|
||||
@foreach ($this->billingUnits as $billingUnit)
|
||||
|
||||
@@ -54,33 +54,42 @@ new class extends Component
|
||||
};
|
||||
?>
|
||||
|
||||
<div class="mx-auto max-w-7xl space-y-8 p-4 sm:p-6">
|
||||
<h1 class="text-2xl font-semibold">{{ __('dashboard.greeting', ['name' => auth()->user()->name]) }}</h1>
|
||||
<x-page width="wide">
|
||||
<x-page-header :title="__('dashboard.greeting', ['name' => auth()->user()->name])" />
|
||||
|
||||
@php($overview = $this->overview)
|
||||
|
||||
<nav aria-label="{{ __('dashboard.links.title') }}">
|
||||
<ul class="flex flex-wrap gap-2">
|
||||
<ul class="grid grid-cols-1 gap-3 min-[400px]:grid-cols-2 sm:grid-cols-3 lg:grid-cols-5">
|
||||
@foreach ($this->quickLinks() as $link)
|
||||
<li><x-button :href="route($link['route'])" wire:navigate :icon="$link['icon']" :text="$link['label']" /></li>
|
||||
<li>
|
||||
<a
|
||||
href="{{ route($link['route']) }}"
|
||||
wire:navigate
|
||||
class="group flex h-full min-h-16 items-center gap-3 rounded-xl border border-zinc-200 bg-white p-3 text-sm font-medium shadow-sm transition hover:border-primary-400 hover:shadow-md focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:border-zinc-700 dark:bg-zinc-900 dark:hover:border-primary-300 dark:focus-visible:outline-primary-300"
|
||||
>
|
||||
<span class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-primary-600 text-white group-hover:bg-primary-700 dark:bg-primary-500" aria-hidden="true">
|
||||
<x-icon :name="$link['icon']" class="size-5" />
|
||||
</span>
|
||||
<span class="min-w-0 break-words">{{ $link['label'] }}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<div class="grid gap-6 lg:grid-cols-2">
|
||||
<section aria-labelledby="tasks-heading" class="space-y-4 rounded-lg border border-zinc-300 bg-white p-4 dark:border-zinc-600 dark:bg-zinc-900">
|
||||
<h2 id="tasks-heading" class="text-xl font-semibold">{{ __('dashboard.tasks.title') }}</h2>
|
||||
|
||||
<x-panel :title="__('dashboard.tasks.title')" icon="clipboard-document-list" heading-id="tasks-heading">
|
||||
@if (! $overview->hasTasks())
|
||||
<p class="text-sm">{{ __('dashboard.tasks.none') }}</p>
|
||||
<x-empty-state icon="check-badge">{{ __('dashboard.tasks.none') }}</x-empty-state>
|
||||
@endif
|
||||
|
||||
@foreach (['overdue' => $overview->overdue, 'soon' => $overview->soon, 'this_week' => $overview->thisWeek] as $group => $tasks)
|
||||
@if ($tasks !== [])
|
||||
<div class="space-y-2">
|
||||
<h3 class="flex items-center gap-2 font-semibold">
|
||||
<div @class(['space-y-2', 'rounded-lg border border-red-200 bg-red-50 p-3 dark:border-red-400/30 dark:bg-red-400/10' => $group === 'overdue'])>
|
||||
<h3 @class(['flex items-center gap-2 font-semibold', 'text-red-800 dark:text-red-200' => $group === 'overdue'])>
|
||||
@if ($group === 'overdue')
|
||||
<x-icon name="exclamation-triangle" class="size-5 text-red-700 dark:text-red-400" aria-hidden="true" />
|
||||
<x-icon name="exclamation-triangle" class="size-5" aria-hidden="true" />
|
||||
@endif
|
||||
{{ __('dashboard.tasks.groups.'.$group, ['count' => count($tasks)]) }}
|
||||
</h3>
|
||||
@@ -89,8 +98,8 @@ new class extends Component
|
||||
<li wire:key="task-{{ $task->taskId }}" class="py-2 text-sm">
|
||||
<x-link :href="route('jobs.show', $task->jobId).'#task-'.$task->taskId" navigate class="font-medium">{{ $task->title }}</x-link>
|
||||
<span class="block text-zinc-600 dark:text-zinc-300">{{ $task->jobNumber }} {{ $task->jobName }}</span>
|
||||
<span class="flex flex-wrap gap-x-3 text-zinc-700 dark:text-zinc-200">
|
||||
<span>{{ __('jobs.tasks.statuses.'.$task->status) }}</span>
|
||||
<span class="mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-zinc-700 dark:text-zinc-200">
|
||||
<x-jobs.task-status :status="$task->status" />
|
||||
@if ($task->dueOn !== null)
|
||||
<span>{{ __('dashboard.tasks.due', ['date' => $this->dateLabel($task->dueOn)]) }}</span>
|
||||
@endif
|
||||
@@ -98,9 +107,7 @@ new class extends Component
|
||||
<span>{{ __('dashboard.tasks.starts', ['date' => $this->dateLabel($task->plannedFrom)]) }}</span>
|
||||
@endif
|
||||
@if ($task->isLate)
|
||||
<span class="inline-flex items-center gap-1 font-medium text-red-700 dark:text-red-400">
|
||||
<x-icon name="exclamation-triangle" class="size-4" aria-hidden="true" />{{ __('jobs.late') }}
|
||||
</span>
|
||||
<x-status-badge tone="danger" icon="exclamation-triangle">{{ __('jobs.late') }}</x-status-badge>
|
||||
@endif
|
||||
</span>
|
||||
</li>
|
||||
@@ -114,12 +121,12 @@ new class extends Component
|
||||
<p class="text-sm">{{ trans_choice('dashboard.tasks.later', $overview->laterCount, ['count' => $overview->laterCount]) }}</p>
|
||||
<p class="text-sm"><x-link :href="route('jobs.calendar')" navigate>{{ __('dashboard.tasks.to_calendar') }}</x-link></p>
|
||||
@endif
|
||||
</section>
|
||||
</x-panel>
|
||||
|
||||
<div class="space-y-6">
|
||||
<section aria-labelledby="week-heading" class="space-y-3 rounded-lg border border-zinc-300 bg-white p-4 dark:border-zinc-600 dark:bg-zinc-900">
|
||||
<h2 id="week-heading" class="text-xl font-semibold">{{ __('dashboard.week.title') }}</h2>
|
||||
|
||||
<x-panel :title="__('dashboard.week.title')" icon="clock" heading-id="week-heading">
|
||||
{{-- The bars are decoration; the hours are the table's text. A full day (7.5 h) or the week's longest day fills a bar. --}}
|
||||
@php($dayMax = max(30, ...array_values($overview->week->days)))
|
||||
<table class="w-full text-sm">
|
||||
<caption class="sr-only">{{ __('dashboard.week.caption', ['from' => $this->dateLabel($overview->week->monday)]) }}</caption>
|
||||
<thead>
|
||||
@@ -135,45 +142,43 @@ new class extends Component
|
||||
<tbody>
|
||||
<tr>
|
||||
@foreach ($overview->week->days as $quarters)
|
||||
<td class="py-1 text-center">{{ $this->hours($quarters) }}</td>
|
||||
<td class="px-0.5 pt-2 text-center align-bottom">
|
||||
<span class="mx-auto flex h-14 w-full max-w-8 items-end overflow-hidden rounded-md bg-zinc-100 dark:bg-zinc-800" aria-hidden="true">
|
||||
<span class="block w-full bg-primary-500 dark:bg-primary-400" style="height: {{ round(min(1, $quarters / $dayMax) * 100) }}%"></span>
|
||||
</span>
|
||||
<span class="mt-1 block tabular-nums">{{ $this->hours($quarters) }}</span>
|
||||
</td>
|
||||
@endforeach
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p class="text-sm">
|
||||
{{ __('dashboard.week.total', ['hours' => $this->hours($overview->week->totalQuarters)]) }}
|
||||
<p class="flex flex-wrap items-center gap-2 text-sm">
|
||||
<span class="font-semibold">{{ __('dashboard.week.total', ['hours' => $this->hours($overview->week->totalQuarters)]) }}</span>
|
||||
@if ($overview->week->unapprovedQuarters > 0)
|
||||
<span class="inline-flex items-center gap-1">
|
||||
<x-icon name="exclamation-circle" class="size-4" aria-hidden="true" />
|
||||
{{ __('dashboard.week.unapproved', ['hours' => $this->hours($overview->week->unapprovedQuarters)]) }}
|
||||
</span>
|
||||
<x-status-badge tone="warning" icon="exclamation-circle">{{ __('dashboard.week.unapproved', ['hours' => $this->hours($overview->week->unapprovedQuarters)]) }}</x-status-badge>
|
||||
@endif
|
||||
</p>
|
||||
<p class="text-sm"><x-link :href="route('time.week')" navigate>{{ __('dashboard.week.open') }}</x-link></p>
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="jobs-heading" class="space-y-3 rounded-lg border border-zinc-300 bg-white p-4 dark:border-zinc-600 dark:bg-zinc-900">
|
||||
<h2 id="jobs-heading" class="text-xl font-semibold">{{ __('dashboard.jobs.title') }}</h2>
|
||||
</x-panel>
|
||||
|
||||
<x-panel :title="__('dashboard.jobs.title')" icon="briefcase" heading-id="jobs-heading">
|
||||
@if ($overview->jobs === [])
|
||||
<p class="text-sm">{{ __('dashboard.jobs.none') }}</p>
|
||||
<x-empty-state icon="briefcase">{{ __('dashboard.jobs.none') }}</x-empty-state>
|
||||
@else
|
||||
<ul class="divide-y divide-zinc-200 dark:divide-zinc-700">
|
||||
@foreach ($overview->jobs as $job)
|
||||
<li wire:key="job-{{ $job->id }}" class="py-2 text-sm">
|
||||
<x-link :href="route('jobs.show', $job->id)" navigate class="font-medium">{{ $job->number }} {{ $job->name }}</x-link>
|
||||
<span class="block text-zinc-600 dark:text-zinc-300">{{ $job->customerName }}</span>
|
||||
<span class="flex flex-wrap items-center gap-x-3 text-zinc-700 dark:text-zinc-200">
|
||||
<span>{{ __('jobs.statuses.'.$job->status) }}</span>
|
||||
<span class="mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-zinc-700 dark:text-zinc-200">
|
||||
<x-jobs.status :status="$job->status" />
|
||||
<x-jobs.priority :priority="\App\Modules\Jobs\Domain\Enums\Priority::from($job->priority)" />
|
||||
@if ($job->dueOn !== null)
|
||||
<span>{{ __('dashboard.jobs.due', ['date' => $this->dateLabel($job->dueOn)]) }}</span>
|
||||
@endif
|
||||
@if ($job->isLate)
|
||||
<span class="inline-flex items-center gap-1 font-medium text-red-700 dark:text-red-400">
|
||||
<x-icon name="exclamation-triangle" class="size-4" aria-hidden="true" />{{ __('jobs.late') }}
|
||||
</span>
|
||||
<x-status-badge tone="danger" icon="exclamation-triangle">{{ __('jobs.late') }}</x-status-badge>
|
||||
@endif
|
||||
</span>
|
||||
</li>
|
||||
@@ -184,7 +189,7 @@ new class extends Component
|
||||
<p class="text-sm">
|
||||
<x-link :href="route('jobs.index')" navigate>{{ trans_choice('dashboard.jobs.all', $overview->jobCount, ['count' => $overview->jobCount]) }}</x-link>
|
||||
</p>
|
||||
</section>
|
||||
</x-panel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -192,4 +197,4 @@ new class extends Component
|
||||
{{-- Loaded right after the page, not only when scrolled to. --}}
|
||||
<livewire:dashboard::management lazy="on-load" />
|
||||
@endcan
|
||||
</div>
|
||||
</x-page>
|
||||
|
||||
@@ -32,7 +32,7 @@ new class extends Component
|
||||
|
||||
public function placeholder(): string
|
||||
{
|
||||
return '<section class="rounded-lg border border-zinc-300 p-4 dark:border-zinc-600"><p role="status" class="text-sm">'.e(__('dashboard.management.loading')).'</p></section>';
|
||||
return '<section class="rounded-xl border border-zinc-200 bg-white p-4 shadow-sm dark:border-zinc-700 dark:bg-zinc-900"><p role="status" class="text-sm">'.e(__('dashboard.management.loading')).'</p></section>';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,12 +66,13 @@ new class extends Component
|
||||
<section aria-labelledby="management-heading" class="space-y-6">
|
||||
@php($overview = $this->overview)
|
||||
|
||||
<h2 id="management-heading" class="text-xl font-semibold">{{ __('dashboard.management.title') }}</h2>
|
||||
<h2 id="management-heading" class="flex items-center gap-2 border-t border-zinc-200 pt-6 text-xl font-semibold dark:border-zinc-700">
|
||||
<x-icon name="presentation-chart-line" class="size-6 text-primary-700 dark:text-primary-300" aria-hidden="true" />
|
||||
{{ __('dashboard.management.title') }}
|
||||
</h2>
|
||||
|
||||
<div class="grid gap-6 lg:grid-cols-2">
|
||||
<section aria-labelledby="todo-heading" class="space-y-3 rounded-lg border border-zinc-300 bg-white p-4 dark:border-zinc-600 dark:bg-zinc-900">
|
||||
<h3 id="todo-heading" class="text-lg font-semibold">{{ __('dashboard.todo.title') }}</h3>
|
||||
|
||||
<x-panel :title="__('dashboard.todo.title')" icon="inbox-stack" :level="3" heading-id="todo-heading">
|
||||
<ul class="space-y-2 text-sm">
|
||||
@can('time.approve-others')
|
||||
<li>
|
||||
@@ -133,11 +134,10 @@ new class extends Component
|
||||
</li>
|
||||
@endcan
|
||||
</ul>
|
||||
</section>
|
||||
</x-panel>
|
||||
|
||||
@can('reports.view')
|
||||
<section aria-labelledby="month-heading" class="space-y-3 rounded-lg border border-zinc-300 bg-white p-4 dark:border-zinc-600 dark:bg-zinc-900">
|
||||
<h3 id="month-heading" class="text-lg font-semibold">{{ __('dashboard.month.title') }}</h3>
|
||||
<x-panel :title="__('dashboard.month.title')" icon="chart-bar" :level="3" heading-id="month-heading">
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">
|
||||
{{ __('dashboard.month.period', [
|
||||
'from' => $this->dateLabel($overview->monthFrom), 'to' => $this->dateLabel($overview->monthTo),
|
||||
@@ -155,25 +155,32 @@ new class extends Component
|
||||
['label' => 'margin', 'value' => $month->marginCents === null ? __('dashboard.month.no_cost') : $this->money($month->marginCents), 'current' => $month->marginCents, 'previous' => $previous->marginCents, 'route' => 'reports.profitability'],
|
||||
['label' => 'sales', 'value' => $this->money($month->salesCents), 'current' => $month->salesCents, 'previous' => $previous->salesCents, 'route' => 'reports.sales'],
|
||||
] as $figure)
|
||||
<div class="rounded border border-zinc-200 p-3 dark:border-zinc-700">
|
||||
@php($ratio = $figure['current'] !== null && $figure['previous'] !== null ? (new \App\Modules\Dashboard\Domain\ValueObjects\Change($figure['current'], $figure['previous']))->ratio() : null)
|
||||
<div class="rounded-lg border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-700 dark:bg-zinc-800/60">
|
||||
<dt class="text-sm">
|
||||
<x-link :href="route($figure['route'])" navigate>{{ __('dashboard.month.'.$figure['label']) }}</x-link>
|
||||
</dt>
|
||||
<dd class="text-lg font-semibold">{{ $figure['value'] }}</dd>
|
||||
<dd class="text-xl font-semibold tabular-nums">{{ $figure['value'] }}</dd>
|
||||
@if ($figure['current'] !== null && $figure['previous'] !== null)
|
||||
<dd class="text-sm text-zinc-700 dark:text-zinc-200">{{ $this->change($figure['current'], $figure['previous']) }}</dd>
|
||||
<dd class="flex items-center gap-1 text-sm text-zinc-700 dark:text-zinc-200">
|
||||
@if ($ratio !== null && $ratio > 0)
|
||||
<x-icon name="arrow-trending-up" class="size-4 text-emerald-700 dark:text-emerald-300" aria-hidden="true" />
|
||||
@elseif ($ratio !== null && $ratio < 0)
|
||||
<x-icon name="arrow-trending-down" class="size-4 text-red-700 dark:text-red-300" aria-hidden="true" />
|
||||
@endif
|
||||
{{ $this->change($figure['current'], $figure['previous']) }}
|
||||
</dd>
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
</dl>
|
||||
<p class="text-xs text-zinc-600 dark:text-zinc-300">{{ __('dashboard.month.billing_note') }}</p>
|
||||
</section>
|
||||
</x-panel>
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
<div class="grid gap-6 lg:grid-cols-2">
|
||||
<section aria-labelledby="jobs-overview-heading" class="space-y-3 rounded-lg border border-zinc-300 bg-white p-4 dark:border-zinc-600 dark:bg-zinc-900">
|
||||
<h3 id="jobs-overview-heading" class="text-lg font-semibold">{{ __('dashboard.stock.title') }}</h3>
|
||||
<x-panel :title="__('dashboard.stock.title')" icon="briefcase" :level="3" heading-id="jobs-overview-heading">
|
||||
|
||||
<table class="w-full text-sm">
|
||||
<caption class="sr-only">{{ __('dashboard.stock.caption') }}</caption>
|
||||
@@ -186,10 +193,12 @@ new class extends Component
|
||||
<tbody class="divide-y divide-zinc-200 dark:divide-zinc-700">
|
||||
@foreach ($overview->jobCounts as $status => $count)
|
||||
<tr wire:key="status-{{ $status }}">
|
||||
<th scope="row" class="py-1 text-left font-normal">
|
||||
<x-link :href="route('jobs.index', ['status' => $status, 'mine' => 0])" navigate>{{ __('jobs.statuses.'.$status) }}</x-link>
|
||||
<th scope="row" class="py-1.5 text-left font-normal">
|
||||
<a href="{{ route('jobs.index', ['status' => $status, 'mine' => 0]) }}" wire:navigate class="rounded-full focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300">
|
||||
<x-jobs.status :status="$status" class="underline-offset-2 hover:underline" />
|
||||
</a>
|
||||
</th>
|
||||
<td class="py-1 text-right">{{ $count }}</td>
|
||||
<td class="py-1.5 text-right font-semibold tabular-nums">{{ $count }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@@ -222,13 +231,11 @@ new class extends Component
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="load-heading" class="space-y-3 rounded-lg border border-zinc-300 bg-white p-4 dark:border-zinc-600 dark:bg-zinc-900">
|
||||
<h3 id="load-heading" class="text-lg font-semibold">{{ __('dashboard.load.title') }}</h3>
|
||||
</x-panel>
|
||||
|
||||
<x-panel :title="__('dashboard.load.title')" icon="users" :level="3" heading-id="load-heading">
|
||||
@if ($overview->workloads === [])
|
||||
<p class="text-sm">{{ __('dashboard.load.none') }}</p>
|
||||
<x-empty-state icon="users">{{ __('dashboard.load.none') }}</x-empty-state>
|
||||
@else
|
||||
<div class="overflow-x-auto rounded focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600" tabindex="0" role="region" aria-label="{{ __('dashboard.load.caption') }}">
|
||||
<table class="w-full text-sm">
|
||||
@@ -262,6 +269,6 @@ new class extends Component
|
||||
<p class="text-sm">{{ __('dashboard.load.note') }}</p>
|
||||
<p class="text-sm"><x-link :href="route('jobs.calendar')" navigate>{{ __('dashboard.load.to_calendar') }}</x-link></p>
|
||||
@endif
|
||||
</section>
|
||||
</x-panel>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -227,7 +227,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-1">
|
||||
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
|
||||
<x-page-title icon="receipt-refund">{{ $this->heading() }}</x-page-title>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('expenses.fields.job') }}: {{ $job->label() }}</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-5xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl font-semibold break-words">{{ __('expenses.job_page.title', ['job' => $job->label()]) }}</h1>
|
||||
<x-page-title icon="receipt-refund">{{ __('expenses.job_page.title', ['job' => $job->label()]) }}</x-page-title>
|
||||
<x-link :href="route('jobs.show', $job->id)" navigate class="text-sm">{{ __('expenses.job_page.back_to_job') }}</x-link>
|
||||
</div>
|
||||
|
||||
@@ -165,7 +165,7 @@ new class extends Component
|
||||
@endunless
|
||||
|
||||
@if ($this->expenses === [])
|
||||
<p class="text-sm">{{ __('expenses.none') }}</p>
|
||||
<x-empty-state icon="receipt-refund">{{ __('expenses.none') }}</x-empty-state>
|
||||
@else
|
||||
<x-table :headers="$this->headers()" :rows="$this->expenses">
|
||||
@interact('column_spentOn', $expense)
|
||||
|
||||
@@ -101,7 +101,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-5xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl font-semibold">{{ __('expenses.mine.title') }}</h1>
|
||||
<x-page-title icon="receipt-refund">{{ __('expenses.mine.title') }}</x-page-title>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">
|
||||
{{ __(auth()->user()?->can('expenses.record') ? 'expenses.mine.help' : 'expenses.mine.help_subcontractor') }}
|
||||
</p>
|
||||
@@ -117,7 +117,7 @@ new class extends Component
|
||||
<h2 id="month-heading" class="text-xl font-semibold" aria-live="polite">{{ $this->monthLabel() }}</h2>
|
||||
|
||||
@if ($this->expenses === [])
|
||||
<p class="text-sm">{{ __('expenses.none') }}</p>
|
||||
<x-empty-state icon="receipt-refund">{{ __('expenses.none') }}</x-empty-state>
|
||||
@else
|
||||
<x-table :headers="$this->headers()" :rows="$this->expenses">
|
||||
@interact('column_spentOn', $expense)
|
||||
|
||||
@@ -171,7 +171,7 @@ new class extends Component
|
||||
|
||||
<div class="space-y-2">
|
||||
<p class="text-sm"><x-link :href="route('inventory.counts')" navigate>{{ __('inventory.counts.back') }}</x-link></p>
|
||||
<h1 class="text-2xl font-semibold">{{ __('inventory.counts.name', ['date' => $this->dateLabel($count->countedOn)]) }}</h1>
|
||||
<x-page-title icon="clipboard-document-check">{{ __('inventory.counts.name', ['date' => $this->dateLabel($count->countedOn)]) }}</x-page-title>
|
||||
<p class="text-sm">
|
||||
{{ $count->groupNames === [] ? __('inventory.counts.whole_stock') : implode(', ', $count->groupNames) }}
|
||||
· {{ __('inventory.counts.started_by', ['name' => $count->startedByName]) }}
|
||||
@@ -202,7 +202,7 @@ new class extends Component
|
||||
@endcan
|
||||
@else
|
||||
@can('inventory.manage-counts')
|
||||
<a href="{{ route('inventory.counts.csv', $count->id) }}" class="inline-flex items-center gap-1 text-sm font-medium underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700">
|
||||
<a href="{{ route('inventory.counts.csv', $count->id) }}" class="inline-flex items-center gap-1 text-sm font-medium underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300">
|
||||
<x-icon name="arrow-down-tray" class="size-4" aria-hidden="true" />
|
||||
{{ __('inventory.counts.download_csv') }}
|
||||
</a>
|
||||
@@ -211,7 +211,7 @@ new class extends Component
|
||||
</div>
|
||||
|
||||
@forelse ($this->groupedLines() as $groupName => $lines)
|
||||
<section wire:key="count-group-{{ md5($groupName) }}" aria-label="{{ $groupName }}" class="space-y-2">
|
||||
<section wire:key="count-group-{{ md5($groupName) }}" aria-label="{{ $groupName }}" class="card space-y-2">
|
||||
<h2 class="text-lg font-semibold">{{ $groupName }}</h2>
|
||||
<ul class="divide-y divide-zinc-200 rounded-lg border border-zinc-300 dark:divide-zinc-700 dark:border-zinc-600">
|
||||
@foreach ($lines as $line)
|
||||
@@ -252,7 +252,7 @@ new class extends Component
|
||||
value="{{ $line->isCounted() ? StockQuantity::inputValue((int) $line->countedMilli) : '' }}"
|
||||
wire:change="saveCounted({{ $line->itemId }}, $event.target.value)"
|
||||
@error('counted.'.$line->itemId) aria-invalid="true" aria-describedby="counted-{{ $line->itemId }}-error" @enderror
|
||||
class="mt-1 h-10 w-full rounded-md border border-zinc-500 bg-white px-2 text-right text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:border-zinc-400 dark:bg-zinc-900 dark:text-zinc-100"
|
||||
class="mt-1 h-10 w-full rounded-md border border-zinc-500 bg-white px-2 text-right text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 dark:border-zinc-400 dark:bg-zinc-900 dark:text-zinc-100"
|
||||
/>
|
||||
@error('counted.'.$line->itemId)
|
||||
<p id="counted-{{ $line->itemId }}-error" class="mt-1 text-sm text-red-700 dark:text-red-400">{{ $message }}</p>
|
||||
|
||||
@@ -73,12 +73,12 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-5xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl font-semibold">{{ __('inventory.counts.title') }}</h1>
|
||||
<x-page-title icon="clipboard-document-check">{{ __('inventory.counts.title') }}</x-page-title>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('inventory.counts.intro') }}</p>
|
||||
</div>
|
||||
|
||||
@can('inventory.manage-counts')
|
||||
<section aria-labelledby="start-heading" class="space-y-3 rounded-lg border border-zinc-300 p-4 dark:border-zinc-600">
|
||||
<section aria-labelledby="start-heading" class="card space-y-3">
|
||||
<h2 id="start-heading" class="text-lg font-semibold">{{ __('inventory.counts.start_title') }}</h2>
|
||||
<form wire:submit="start" class="space-y-4" novalidate>
|
||||
@if ($this->groupOptions !== [])
|
||||
@@ -97,11 +97,11 @@ new class extends Component
|
||||
</section>
|
||||
@endcan
|
||||
|
||||
<section aria-labelledby="counts-heading" class="space-y-3">
|
||||
<section aria-labelledby="counts-heading" class="card space-y-3">
|
||||
<h2 id="counts-heading" class="text-lg font-semibold">{{ __('inventory.counts.list') }}</h2>
|
||||
|
||||
@if ($this->counts === [])
|
||||
<p class="text-sm">{{ __('inventory.counts.none') }}</p>
|
||||
<x-empty-state icon="archive-box">{{ __('inventory.counts.none') }}</x-empty-state>
|
||||
@else
|
||||
<ul class="divide-y divide-zinc-200 rounded-lg border border-zinc-300 dark:divide-zinc-700 dark:border-zinc-600">
|
||||
@foreach ($this->counts as $count)
|
||||
@@ -124,7 +124,7 @@ new class extends Component
|
||||
{{ __('inventory.counts.confirmed_by', ['name' => $count->confirmedByName, 'at' => $this->dateLabel((string) $count->confirmedAt)]) }}
|
||||
</span>
|
||||
@can('inventory.manage-counts')
|
||||
<a href="{{ route('inventory.counts.csv', $count->id) }}" class="inline-flex items-center gap-1 font-medium underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700">
|
||||
<a href="{{ route('inventory.counts.csv', $count->id) }}" class="inline-flex items-center gap-1 font-medium underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300">
|
||||
<x-icon name="arrow-down-tray" class="size-4" aria-hidden="true" />
|
||||
{{ __('inventory.counts.csv_named', ['date' => $this->dateLabel($count->countedOn)]) }}
|
||||
</a>
|
||||
|
||||
@@ -152,14 +152,14 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-3xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl font-semibold">{{ __('inventory.groups.title') }}</h1>
|
||||
<x-page-title icon="folder">{{ __('inventory.groups.title') }}</x-page-title>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('inventory.groups.intro') }}</p>
|
||||
<p class="text-sm"><x-link :href="route('inventory.index')" navigate>{{ __('inventory.groups.back') }}</x-link></p>
|
||||
</div>
|
||||
|
||||
<p role="status" aria-live="polite" class="text-sm font-medium">{{ $message }}</p>
|
||||
|
||||
<form wire:submit="add" class="flex flex-wrap items-end gap-3" novalidate>
|
||||
<form wire:submit="add" class="card flex flex-wrap items-end gap-3" novalidate>
|
||||
<div class="min-w-0 flex-1">
|
||||
<x-input id="new-group-name" wire:model="newName" :label="__('inventory.groups.name')" autocomplete="off" maxlength="150" />
|
||||
</div>
|
||||
@@ -167,7 +167,7 @@ new class extends Component
|
||||
</form>
|
||||
|
||||
@if ($this->groups === [])
|
||||
<p class="text-sm">{{ __('inventory.groups.none') }}</p>
|
||||
<x-empty-state icon="archive-box">{{ __('inventory.groups.none') }}</x-empty-state>
|
||||
@else
|
||||
<ul class="divide-y divide-zinc-200 rounded-lg border border-zinc-300 dark:divide-zinc-700 dark:border-zinc-600">
|
||||
@foreach ($this->groups as $group)
|
||||
|
||||
@@ -93,7 +93,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-6xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl font-semibold">{{ __('inventory.index.title') }}</h1>
|
||||
<x-page-title icon="archive-box">{{ __('inventory.index.title') }}</x-page-title>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('inventory.index.intro') }}</p>
|
||||
@can('inventory.manage')
|
||||
<div class="flex flex-wrap gap-3">
|
||||
@@ -127,7 +127,7 @@ new class extends Component
|
||||
</p>
|
||||
|
||||
@if ($this->items === [])
|
||||
<p class="text-sm">{{ __('inventory.index.none') }}</p>
|
||||
<x-empty-state icon="archive-box">{{ __('inventory.index.none') }}</x-empty-state>
|
||||
@else
|
||||
<x-table :headers="$this->headers()" :rows="$this->items">
|
||||
@interact('column_name', $item)
|
||||
|
||||
@@ -170,7 +170,7 @@ new class extends Component
|
||||
?>
|
||||
|
||||
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
|
||||
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
|
||||
<x-page-title icon="archive-box">{{ $this->heading() }}</x-page-title>
|
||||
|
||||
@if ($this->groups === [])
|
||||
<p class="text-sm">{{ __('inventory.form.no_groups') }} <x-link :href="route('inventory.groups')" navigate>{{ __('inventory.index.groups') }}</x-link></p>
|
||||
@@ -211,7 +211,7 @@ new class extends Component
|
||||
accept="image/jpeg,image/png,image/webp,image/gif"
|
||||
aria-describedby="item-image-hint @error('image') item-image-error @enderror"
|
||||
@error('image') aria-invalid="true" @enderror
|
||||
class="block w-full max-w-md rounded-md text-sm text-zinc-900 file:me-3 file:min-h-9 file:cursor-pointer file:rounded-md file:border-0 file:bg-zinc-200 file:px-3 file:py-2 file:font-medium file:text-zinc-900 hover:file:bg-zinc-300 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:text-zinc-100 dark:file:bg-zinc-700 dark:file:text-zinc-100 dark:hover:file:bg-zinc-600 dark:focus-visible:outline-blue-400"
|
||||
class="block w-full max-w-md rounded-md text-sm text-zinc-900 file:me-3 file:min-h-9 file:cursor-pointer file:rounded-md file:border-0 file:bg-zinc-200 file:px-3 file:py-2 file:font-medium file:text-zinc-900 hover:file:bg-zinc-300 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 dark:text-zinc-100 dark:file:bg-zinc-700 dark:file:text-zinc-100 dark:hover:file:bg-zinc-600"
|
||||
/>
|
||||
@error('image')
|
||||
<p id="item-image-error" class="text-sm text-red-700 dark:text-red-400">{{ $message }}</p>
|
||||
|
||||
@@ -347,7 +347,7 @@ new class extends Component
|
||||
@endif
|
||||
<div class="min-w-0 flex-1 space-y-2">
|
||||
<p class="text-sm"><x-link :href="route('inventory.index')" navigate>{{ __('inventory.groups.back') }}</x-link></p>
|
||||
<h1 class="text-2xl font-semibold break-words">{{ $item->name }}</h1>
|
||||
<x-page-title icon="archive-box">{{ $item->name }}</x-page-title>
|
||||
<x-inventory.stock-status :item="$item" />
|
||||
@can('inventory.manage')
|
||||
<div class="flex flex-wrap gap-2">
|
||||
@@ -360,7 +360,7 @@ new class extends Component
|
||||
|
||||
<p id="item-status" tabindex="-1" role="status" aria-live="polite" class="text-sm font-medium focus:outline-none">{{ $message }}</p>
|
||||
|
||||
<section aria-labelledby="details-heading" class="space-y-3">
|
||||
<section aria-labelledby="details-heading" class="card space-y-3">
|
||||
<h2 id="details-heading" class="text-lg font-semibold">{{ __('inventory.item.details') }}</h2>
|
||||
<dl class="grid gap-x-6 gap-y-2 text-sm sm:grid-cols-2 lg:grid-cols-3">
|
||||
<div>
|
||||
@@ -406,7 +406,7 @@ new class extends Component
|
||||
|
||||
<div class="grid gap-6 lg:grid-cols-2">
|
||||
@can('inventory.manage')
|
||||
<section aria-labelledby="purchase-heading" class="space-y-3 rounded-lg border border-zinc-300 p-4 dark:border-zinc-600">
|
||||
<section aria-labelledby="purchase-heading" class="card space-y-3">
|
||||
<h2 id="purchase-heading" class="text-lg font-semibold">{{ __('inventory.purchase.title') }}</h2>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('inventory.purchase.intro') }}</p>
|
||||
<form wire:submit="recordPurchase" class="space-y-4" novalidate>
|
||||
@@ -420,7 +420,7 @@ new class extends Component
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="write-off-heading" class="space-y-3 rounded-lg border border-zinc-300 p-4 dark:border-zinc-600">
|
||||
<section aria-labelledby="write-off-heading" class="card space-y-3">
|
||||
<h2 id="write-off-heading" class="text-lg font-semibold">{{ __('inventory.write_off.title') }}</h2>
|
||||
<form wire:submit="recordWriteOff" class="space-y-4" novalidate>
|
||||
<x-input id="write-off-quantity" wire:model="writeOffQuantity" inputmode="decimal" :label="__('inventory.write_off.quantity', ['unit' => $unitLabel])" autocomplete="off" />
|
||||
@@ -432,7 +432,7 @@ new class extends Component
|
||||
|
||||
@if ($item->isActive)
|
||||
@can('inventory.record-use')
|
||||
<section aria-labelledby="use-heading" class="space-y-3 rounded-lg border border-zinc-300 p-4 dark:border-zinc-600">
|
||||
<section aria-labelledby="use-heading" class="card space-y-3">
|
||||
<h2 id="use-heading" class="text-lg font-semibold">{{ __('inventory.use.title') }}</h2>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('inventory.use.intro') }}</p>
|
||||
<form wire:submit="recordUse" class="space-y-4" novalidate>
|
||||
@@ -451,7 +451,7 @@ new class extends Component
|
||||
<h2 id="history-heading" class="text-lg font-semibold">{{ __('inventory.item.history') }}</h2>
|
||||
|
||||
@if ($this->movements === [])
|
||||
<p class="text-sm">{{ __('inventory.item.history_none') }}</p>
|
||||
<x-empty-state icon="archive-box">{{ __('inventory.item.history_none') }}</x-empty-state>
|
||||
@else
|
||||
@if (count($this->movements) >= $this::HISTORY_LIMIT)
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('inventory.item.history_limit', ['count' => $this::HISTORY_LIMIT]) }}</p>
|
||||
|
||||
@@ -341,7 +341,7 @@ new class extends Component
|
||||
<button
|
||||
type="button"
|
||||
wire:click="selectItem({{ $result->id }})"
|
||||
class="flex min-h-11 w-full flex-wrap items-center justify-between gap-2 rounded-md px-3 py-2 text-left text-sm hover:bg-zinc-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:hover:bg-zinc-700"
|
||||
class="flex min-h-11 w-full flex-wrap items-center justify-between gap-2 rounded-md px-3 py-2 text-left text-sm hover:bg-zinc-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 dark:hover:bg-zinc-700"
|
||||
aria-label="{{ __('inventory.task.choose', ['item' => $result->name, 'balance' => $this->quantity($result->balanceMilli, $result->unit)]) }}"
|
||||
>
|
||||
<span class="font-medium">{{ $result->name }}</span>
|
||||
|
||||
@@ -153,14 +153,12 @@ new class extends Component
|
||||
|
||||
@php($canMove = Gate::allows('jobs.manage'))
|
||||
|
||||
<div class="mx-auto max-w-[120rem] space-y-6 p-4 sm:p-6">
|
||||
<div class="flex flex-wrap items-center justify-between gap-4">
|
||||
<h1 class="text-2xl font-semibold">{{ __('jobs.board.title') }}</h1>
|
||||
<x-page width="full">
|
||||
<x-page-header :title="__('jobs.board.title')" icon="view-columns">
|
||||
<x-link :href="route('jobs.index')" navigate class="text-sm">{{ __('jobs.board.show_list') }}</x-link>
|
||||
</x-page-header>
|
||||
|
||||
<x-link :href="route('jobs.index')" navigate>{{ __('jobs.board.show_list') }}</x-link>
|
||||
</div>
|
||||
|
||||
<div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
||||
<div class="grid gap-4 rounded-xl border border-zinc-200 bg-white p-4 shadow-sm sm:grid-cols-2 lg:grid-cols-3 dark:border-zinc-700 dark:bg-zinc-900">
|
||||
{{-- TallStackUI's native select does not tie its label to the control, so aria-label names it. --}}
|
||||
<x-select.native wire:model.live="priority" :label="__('jobs.fields.priority')" :aria-label="__('jobs.fields.priority')">
|
||||
<option value="">{{ __('jobs.list.all_priorities') }}</option>
|
||||
@@ -205,11 +203,18 @@ new class extends Component
|
||||
id="column-{{ $status }}"
|
||||
wire:key="column-{{ $status }}"
|
||||
aria-labelledby="column-{{ $status }}-heading"
|
||||
class="flex min-w-0 flex-col rounded-lg border border-zinc-300 bg-zinc-200 p-3 dark:border-zinc-700 dark:bg-zinc-950"
|
||||
@class(['flex min-w-0 flex-col rounded-xl border border-t-4 border-zinc-200 bg-zinc-100 p-3 dark:border-zinc-700 dark:bg-zinc-900/60', match ($status) {
|
||||
'quote_request' => 'border-t-violet-500',
|
||||
'order', 'invoiced' => 'border-t-sky-500',
|
||||
'in_production' => 'border-t-primary-500',
|
||||
'on_hold' => 'border-t-amber-500',
|
||||
'done', 'billed' => 'border-t-emerald-500',
|
||||
default => 'border-t-zinc-400',
|
||||
}])
|
||||
>
|
||||
<h2 id="column-{{ $status }}-heading" class="mb-3 flex items-baseline justify-between gap-2 text-base font-semibold">
|
||||
{{ __('jobs.statuses.'.$status) }}
|
||||
<span class="text-sm font-normal">{{ trans_choice('jobs.board.count', count($jobs), ['count' => count($jobs)]) }}</span>
|
||||
<h2 id="column-{{ $status }}-heading" class="mb-3 flex flex-wrap items-center justify-between gap-2 text-base font-semibold">
|
||||
<x-jobs.status :status="$status" class="px-2.5 py-1 text-sm" />
|
||||
<span class="text-sm font-normal text-zinc-700 dark:text-zinc-200">{{ trans_choice('jobs.board.count', count($jobs), ['count' => count($jobs)]) }}</span>
|
||||
</h2>
|
||||
|
||||
<ul
|
||||
@@ -224,7 +229,7 @@ new class extends Component
|
||||
<li wire:key="job-card-{{ $job->id }}" @if ($canMove) wire:sort:item="{{ $job->id }}" @endif>
|
||||
<article
|
||||
aria-labelledby="job-card-{{ $job->id }}-title"
|
||||
class="relative space-y-2 rounded-md border border-zinc-200 bg-white p-3 text-sm shadow-sm dark:border-zinc-600 dark:bg-zinc-900"
|
||||
@class(['relative space-y-2 rounded-lg border border-zinc-200 bg-white p-3 text-sm shadow-sm transition hover:shadow-md dark:border-zinc-600 dark:bg-zinc-800', 'border-l-4 border-l-red-600 dark:border-l-red-400' => in_array($job->priority->value, ['urgent', 'immediate'], true)])
|
||||
>
|
||||
@if ($canMove)
|
||||
<x-icon name="bars-3" class="absolute top-3 right-3 size-5 cursor-grab text-zinc-500 dark:text-zinc-400" aria-hidden="true" />
|
||||
@@ -264,10 +269,10 @@ new class extends Component
|
||||
</article>
|
||||
</li>
|
||||
@empty
|
||||
<li wire:key="empty-{{ $status }}" class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('jobs.board.empty') }}</li>
|
||||
<li wire:key="empty-{{ $status }}" class="rounded-lg border border-dashed border-zinc-300 p-3 text-center text-sm text-zinc-700 dark:border-zinc-600 dark:text-zinc-200">{{ __('jobs.board.empty') }}</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
</section>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</x-page>
|
||||
|
||||
@@ -508,11 +508,11 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-[120rem] space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-1">
|
||||
<h1 class="text-2xl font-semibold">{{ __('jobs.calendar.title') }}</h1>
|
||||
<x-page-title icon="calendar-days">{{ __('jobs.calendar.title') }}</x-page-title>
|
||||
<p class="max-w-3xl text-sm text-zinc-600 dark:text-zinc-300">{{ __('jobs.calendar.intro') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap items-end gap-4">
|
||||
<div class="card flex flex-wrap items-end gap-4">
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<x-button subtle color="black" icon="chevron-left" wire:click="showPrevious" :text="__('jobs.calendar.previous')" />
|
||||
<x-button subtle color="black" wire:click="showToday" :text="__('jobs.calendar.today')" />
|
||||
@@ -540,7 +540,7 @@ new class extends Component
|
||||
|
||||
<p role="status" aria-live="polite" class="min-h-5 text-sm font-medium">{{ $statusMessage }}</p>
|
||||
|
||||
<section aria-labelledby="calendar-range-heading" class="space-y-3">
|
||||
<section aria-labelledby="calendar-range-heading" class="card space-y-3">
|
||||
<h2 id="calendar-range-heading" class="text-lg font-semibold">
|
||||
{{ __('jobs.calendar.range', ['from' => $this->shortDate($days[0]), 'to' => $this->shortDate($days[count($days) - 1])]) }}
|
||||
</h2>
|
||||
@@ -563,6 +563,7 @@ new class extends Component
|
||||
@class([
|
||||
'border-l border-zinc-200 px-1 py-2 text-center dark:border-zinc-700',
|
||||
'bg-zinc-200 dark:bg-zinc-950' => $this->isDayOff($day),
|
||||
'border-b-4 border-b-primary-600 bg-primary-50 text-primary-900 dark:border-b-primary-300 dark:bg-primary-950 dark:text-primary-100' => $day === now()->format('Y-m-d'),
|
||||
])
|
||||
>
|
||||
<div @class(['font-semibold' => $day === now()->format('Y-m-d')])>{{ $this->dayLabel($day) }}</div>
|
||||
@@ -606,7 +607,7 @@ new class extends Component
|
||||
wire:key="cell-{{ $rowKey }}-{{ $day }}"
|
||||
data-calendar-day="{{ $day }}"
|
||||
data-calendar-user="{{ $row->userId ?? '' }}"
|
||||
x-bind:class="isTarget('{{ $day }}', '{{ $row->userId ?? '' }}') && 'outline-2 -outline-offset-2 outline-blue-700 dark:outline-blue-300'"
|
||||
x-bind:class="isTarget('{{ $day }}', '{{ $row->userId ?? '' }}') && 'outline-2 -outline-offset-2 outline-primary-600 dark:outline-primary-300'"
|
||||
@class([
|
||||
'min-h-12 border-l border-zinc-200 dark:border-zinc-700',
|
||||
'bg-amber-100 dark:bg-amber-950' => $overloaded,
|
||||
@@ -651,10 +652,10 @@ new class extends Component
|
||||
x-on:pointerdown="begin($event, 'move', @js(['task' => $bar->task->taskId, 'job' => $bar->task->jobId, 'user' => $bar->userId, 'from' => $bar->from, 'to' => $bar->to]))"
|
||||
x-on:click="clickBar($el, 'bar-info-{{ $bar->key() }}', () => $wire.openDialog({{ $bar->task->taskId }}, {{ $bar->userId ?? 'null' }}))"
|
||||
@class([
|
||||
'relative z-10 mx-0.5 my-1 flex min-w-0 touch-none flex-col justify-center overflow-hidden border px-2 text-left text-xs leading-tight select-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:focus-visible:outline-blue-300',
|
||||
'relative z-10 mx-0.5 my-1 flex min-w-0 touch-none flex-col justify-center overflow-hidden border px-2 text-left text-xs leading-tight select-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300',
|
||||
'cursor-grab' => $canManage,
|
||||
'border-primary-300 bg-primary-100 text-primary-950 dark:border-primary-600 dark:bg-primary-900 dark:text-white' => $bar->task->status !== TaskStatus::Done && ! $bar->late,
|
||||
'border-red-600 bg-red-100 text-red-950 dark:border-red-400 dark:bg-red-950 dark:text-white' => $bar->late,
|
||||
'border-primary-300 border-l-4 border-l-primary-600 bg-primary-100 text-primary-950 shadow-sm dark:border-primary-600 dark:border-l-primary-300 dark:bg-primary-900 dark:text-white' => $bar->task->status !== TaskStatus::Done && ! $bar->late,
|
||||
'border-red-600 border-l-4 bg-red-100 text-red-950 shadow-sm dark:border-red-400 dark:bg-red-950 dark:text-white' => $bar->late,
|
||||
'border-zinc-300 bg-zinc-100 text-zinc-800 dark:border-zinc-600 dark:bg-zinc-700 dark:text-zinc-100' => $bar->task->status === TaskStatus::Done,
|
||||
'rounded-l-md' => $bar->from >= $days[0],
|
||||
'rounded-r-md' => $bar->to <= $days[count($days) - 1],
|
||||
@@ -760,7 +761,7 @@ new class extends Component
|
||||
id="agenda-bar-{{ $bar->key() }}"
|
||||
wire:click="openDialog({{ $bar->task->taskId }}, {{ $bar->userId ?? 'null' }})"
|
||||
@class([
|
||||
'flex w-full flex-col gap-1 rounded-md border p-2 text-left text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:focus-visible:outline-blue-300',
|
||||
'flex w-full flex-col gap-1 rounded-md border p-2 text-left text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300',
|
||||
'border-zinc-300 dark:border-zinc-600' => ! $bar->late,
|
||||
'border-red-600 border-l-4 bg-red-50 dark:border-red-400 dark:bg-red-950' => $bar->late,
|
||||
])
|
||||
@@ -786,11 +787,11 @@ new class extends Component
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="unscheduled-heading" class="space-y-3" x-data>
|
||||
<section aria-labelledby="unscheduled-heading" class="card space-y-3" x-data>
|
||||
<h2 id="unscheduled-heading" class="text-lg font-semibold">{{ __('jobs.calendar.unscheduled') }}</h2>
|
||||
|
||||
@if ($this->unscheduled === [])
|
||||
<p class="text-sm">{{ __('jobs.calendar.unscheduled_none') }}</p>
|
||||
<x-empty-state icon="calendar-days">{{ __('jobs.calendar.unscheduled_none') }}</x-empty-state>
|
||||
@else
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('jobs.calendar.unscheduled_intro') }}</p>
|
||||
|
||||
|
||||
@@ -282,11 +282,11 @@ new class extends Component
|
||||
@endphp
|
||||
|
||||
<div class="mx-auto max-w-3xl space-y-6 p-4 sm:p-6">
|
||||
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
|
||||
<x-page-title icon="briefcase">{{ $this->heading() }}</x-page-title>
|
||||
|
||||
<p role="status" aria-live="polite" class="text-sm">{{ $statusMessage }}</p>
|
||||
|
||||
<form wire:submit="save" class="space-y-8" novalidate>
|
||||
<form wire:submit="save" class="card space-y-8" novalidate>
|
||||
<fieldset class="space-y-6">
|
||||
<legend class="text-lg font-semibold">{{ __('jobs.sections.basics') }}</legend>
|
||||
|
||||
|
||||
@@ -97,20 +97,17 @@ new class extends Component
|
||||
};
|
||||
?>
|
||||
|
||||
<div class="mx-auto max-w-7xl space-y-6 p-4 sm:p-6">
|
||||
<div class="flex flex-wrap items-center justify-between gap-4">
|
||||
<div class="flex flex-wrap items-baseline gap-x-4 gap-y-1">
|
||||
<h1 class="text-2xl font-semibold">{{ __('jobs.title') }}</h1>
|
||||
<x-link :href="route('jobs.board')" navigate>{{ __('jobs.board.link') }}</x-link>
|
||||
</div>
|
||||
<x-page width="wide">
|
||||
<x-page-header :title="__('jobs.title')" icon="briefcase">
|
||||
<x-link :href="route('jobs.board')" navigate class="text-sm">{{ __('jobs.board.link') }}</x-link>
|
||||
|
||||
@can('jobs.manage')
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<x-slot:actions>
|
||||
<x-button :href="route('jobs.quick')" wire:navigate subtle color="black" icon="bolt" :text="__('jobs.quick.link')" />
|
||||
<x-button :href="route('jobs.create')" wire:navigate icon="plus" :text="__('jobs.new')" />
|
||||
</div>
|
||||
</x-slot:actions>
|
||||
@endcan
|
||||
</div>
|
||||
</x-page-header>
|
||||
|
||||
@if (session('status'))
|
||||
<x-alert role="status" color="green" light icon="check-circle" :text="session('status')" />
|
||||
@@ -120,7 +117,7 @@ new class extends Component
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('jobs.list.subcontractor_note') }}</p>
|
||||
@endif
|
||||
|
||||
<div class="grid gap-4 md:grid-cols-2 xl:grid-cols-4">
|
||||
<div class="grid gap-4 rounded-xl border border-zinc-200 bg-white p-4 shadow-sm md:grid-cols-2 xl:grid-cols-4 dark:border-zinc-700 dark:bg-zinc-900">
|
||||
<div class="md:col-span-2 xl:col-span-4">
|
||||
<x-input
|
||||
wire:model.live.debounce.300ms="search"
|
||||
@@ -169,7 +166,7 @@ new class extends Component
|
||||
</p>
|
||||
|
||||
@if ($this->jobs->total() === 0)
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('jobs.list.empty') }}</p>
|
||||
<x-empty-state icon="briefcase">{{ __('jobs.list.empty') }}</x-empty-state>
|
||||
@else
|
||||
<x-table :headers="$this->headers()" :rows="$this->jobs" paginate>
|
||||
@interact('column_number', $job)
|
||||
@@ -181,7 +178,7 @@ new class extends Component
|
||||
@endinteract
|
||||
|
||||
@interact('column_status', $job)
|
||||
{{ __('jobs.statuses.'.$job->status->value) }}
|
||||
<x-jobs.status :status="$job->status" />
|
||||
@endinteract
|
||||
|
||||
@interact('column_priority', $job)
|
||||
@@ -193,4 +190,4 @@ new class extends Component
|
||||
@endinteract
|
||||
</x-table>
|
||||
@endif
|
||||
</div>
|
||||
</x-page>
|
||||
|
||||
@@ -103,7 +103,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-lg space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-1">
|
||||
<h1 class="text-2xl font-semibold">{{ __('jobs.quick.title') }}</h1>
|
||||
<x-page-title icon="bolt">{{ __('jobs.quick.title') }}</x-page-title>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('jobs.quick.intro') }}</p>
|
||||
</div>
|
||||
|
||||
@@ -124,7 +124,7 @@ new class extends Component
|
||||
|
||||
<p role="status" aria-live="polite" class="text-sm">{{ $statusMessage }}</p>
|
||||
|
||||
<form wire:submit="save" class="space-y-6" novalidate>
|
||||
<form wire:submit="save" class="card space-y-6" novalidate>
|
||||
<x-jobs.customer-picker
|
||||
:customer-id="$form->customer_id"
|
||||
:customer-name="$customerName"
|
||||
|
||||
@@ -205,15 +205,20 @@ new class extends Component
|
||||
|
||||
@php($job = $this->job)
|
||||
|
||||
<div class="mx-auto max-w-5xl space-y-8 p-4 sm:p-6">
|
||||
<x-page>
|
||||
<div class="space-y-4">
|
||||
<div class="flex flex-wrap items-start justify-between gap-4">
|
||||
<h1 class="text-2xl font-semibold break-words">
|
||||
<span class="whitespace-nowrap">{{ $job->number }}</span> {{ $job->name }}
|
||||
</h1>
|
||||
<div class="min-w-0 flex-1 space-y-1">
|
||||
<a href="{{ route('jobs.index') }}" wire:navigate class="inline-flex min-h-6 items-center gap-1 rounded-md text-sm font-medium text-primary-700 underline-offset-4 hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:text-primary-300 dark:focus-visible:outline-primary-300">
|
||||
<x-icon name="arrow-left" class="size-4" aria-hidden="true" />{{ __('jobs.title') }}
|
||||
</a>
|
||||
<h1 class="text-2xl font-semibold break-words">
|
||||
<span class="whitespace-nowrap text-primary-700 dark:text-primary-300">{{ $job->number }}</span> {{ $job->name }}
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
@can('jobs.manage')
|
||||
<x-button :href="route('jobs.edit', $job->id)" wire:navigate subtle color="black" icon="pencil" :text="__('jobs.edit')" />
|
||||
<x-button :href="route('jobs.edit', $job->id)" wire:navigate icon="pencil" :text="__('jobs.edit')" />
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
@@ -221,14 +226,14 @@ new class extends Component
|
||||
<x-alert role="status" color="green" light icon="check-circle" :text="session('status')" />
|
||||
@endif
|
||||
|
||||
<dl class="flex flex-wrap gap-x-8 gap-y-2 text-sm">
|
||||
<div class="flex gap-2"><dt class="font-medium">{{ __('jobs.fields.status') }}:</dt><dd>{{ __('jobs.statuses.'.$job->status->value) }}</dd></div>
|
||||
<dl class="card flex flex-wrap items-center gap-x-8 gap-y-2 py-3 text-sm sm:py-3">
|
||||
<div class="flex items-center gap-2"><dt class="font-medium">{{ __('jobs.fields.status') }}:</dt><dd><x-jobs.status :status="$job->status" class="text-sm" /></dd></div>
|
||||
<div class="flex gap-2"><dt class="font-medium">{{ __('jobs.fields.priority') }}:</dt><dd><x-jobs.priority :priority="$job->priority" /></dd></div>
|
||||
<div class="flex gap-2"><dt class="font-medium">{{ __('jobs.fields.due_on') }}:</dt><dd><x-jobs.due-date :date="$job->dueOn" :status="$job->status" /></dd></div>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<section aria-labelledby="basics-heading" class="space-y-3">
|
||||
<section aria-labelledby="basics-heading" class="card space-y-3">
|
||||
<h2 id="basics-heading" class="text-xl font-semibold">{{ __('jobs.sections.basics') }}</h2>
|
||||
|
||||
<dl class="grid gap-x-6 gap-y-2 text-sm sm:grid-cols-[max-content_1fr]">
|
||||
@@ -291,7 +296,8 @@ new class extends Component
|
||||
@endif
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="schedule-heading" class="space-y-3">
|
||||
<div class="grid gap-6 md:grid-cols-2">
|
||||
<section aria-labelledby="schedule-heading" class="card space-y-3">
|
||||
<h2 id="schedule-heading" class="text-xl font-semibold">{{ __('jobs.sections.schedule') }}</h2>
|
||||
|
||||
<dl class="grid gap-x-6 gap-y-2 text-sm sm:grid-cols-[max-content_1fr]">
|
||||
@@ -306,7 +312,7 @@ new class extends Component
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="members-heading" class="space-y-3">
|
||||
<section aria-labelledby="members-heading" class="card space-y-3">
|
||||
<h2 id="members-heading" class="text-xl font-semibold">{{ __('jobs.sections.members') }}</h2>
|
||||
|
||||
<dl class="grid gap-x-6 gap-y-2 text-sm sm:grid-cols-[max-content_1fr]">
|
||||
@@ -325,6 +331,8 @@ new class extends Component
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<section id="tasks" aria-labelledby="tasks-heading" class="space-y-4">
|
||||
<div class="flex flex-wrap items-center justify-between gap-4">
|
||||
<h2 id="tasks-heading" tabindex="-1" class="text-xl font-semibold focus:outline-none">{{ __('jobs.tasks.title') }}</h2>
|
||||
@@ -348,7 +356,7 @@ new class extends Component
|
||||
<p role="status" aria-live="polite" class="text-sm">{{ $taskStatusMessage }}</p>
|
||||
|
||||
@if ($this->tasks === [])
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('jobs.tasks.empty') }}</p>
|
||||
<x-empty-state icon="clipboard-document-list">{{ __('jobs.tasks.empty') }}</x-empty-state>
|
||||
@else
|
||||
@php($canChangeStatus = Gate::allows('jobs.update-task-status', $job->id))
|
||||
@php($canManageTasks = Gate::allows('jobs.manage-tasks', $job->id))
|
||||
@@ -395,7 +403,7 @@ new class extends Component
|
||||
x-on:tasks-expand.window="open = $event.detail"
|
||||
x-on:focusin="if ($event.target.closest('[data-task-details]')) open = true"
|
||||
>
|
||||
<article aria-labelledby="task-{{ $task->id }}-title" class="rounded-lg border border-zinc-200 bg-white text-sm dark:border-zinc-700 dark:bg-zinc-900">
|
||||
<article aria-labelledby="task-{{ $task->id }}-title" @class(['rounded-xl border border-l-4 border-zinc-200 bg-white text-sm shadow-sm dark:border-zinc-700 dark:bg-zinc-900', match ($task->status->value) { 'in_progress' => 'border-l-primary-500', 'in_review' => 'border-l-amber-500', 'done' => 'border-l-emerald-500', default => 'border-l-zinc-400' }])>
|
||||
<div class="flex flex-col gap-2 p-3 sm:flex-row sm:flex-wrap sm:items-center sm:gap-x-6">
|
||||
<h3 id="task-{{ $task->id }}-title" class="min-w-0 text-base font-medium sm:flex-1">
|
||||
<button
|
||||
@@ -405,7 +413,7 @@ new class extends Component
|
||||
x-bind:aria-expanded="open.toString()"
|
||||
aria-expanded="false"
|
||||
aria-controls="task-{{ $task->id }}-details"
|
||||
class="flex min-h-6 w-full items-start gap-2 rounded-md text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:focus-visible:outline-blue-400"
|
||||
class="flex min-h-6 w-full items-start gap-2 rounded-md text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300"
|
||||
>
|
||||
<x-icon name="chevron-right" class="mt-0.5 size-5 shrink-0 transition-transform" x-bind:class="{ 'rotate-90': open }" aria-hidden="true" />
|
||||
<span class="min-w-0 break-words">{{ $task->title }}</span>
|
||||
@@ -423,7 +431,7 @@ new class extends Component
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-x-1">
|
||||
<dt class="font-medium">{{ __('jobs.tasks.fields.status') }}:</dt>
|
||||
<dd>{{ __('jobs.tasks.statuses.'.$task->status->value) }}</dd>
|
||||
<dd><x-jobs.task-status :status="$task->status" /></dd>
|
||||
</div>
|
||||
@if ($task->commentCount > 0)
|
||||
<div class="flex flex-wrap gap-x-1">
|
||||
@@ -570,13 +578,13 @@ new class extends Component
|
||||
</section>
|
||||
|
||||
@can('expenses.record')
|
||||
<section aria-labelledby="expenses-heading" class="space-y-3">
|
||||
<section aria-labelledby="expenses-heading" class="card space-y-3">
|
||||
<h2 id="expenses-heading" class="text-xl font-semibold">{{ __('jobs.sections.expenses') }}</h2>
|
||||
<x-link :href="route('expenses.job', $job->id)" navigate>{{ __('expenses.job_page.link') }}</x-link>
|
||||
</section>
|
||||
@endcan
|
||||
|
||||
<section aria-labelledby="links-heading" class="space-y-3">
|
||||
<section aria-labelledby="links-heading" class="card space-y-3">
|
||||
<h2 id="links-heading" class="text-xl font-semibold">{{ __('jobs.sections.links') }}</h2>
|
||||
|
||||
@if ($job->links === [])
|
||||
@@ -594,12 +602,12 @@ new class extends Component
|
||||
@endif
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="instructions-heading" class="space-y-3">
|
||||
<section aria-labelledby="instructions-heading" class="card space-y-3">
|
||||
<h2 id="instructions-heading" class="text-xl font-semibold">{{ __('jobs.sections.instructions') }}</h2>
|
||||
<p class="whitespace-pre-line text-sm">{{ $job->instructions ?? __('jobs.not_set') }}</p>
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="history-heading" class="space-y-3" x-data="{ open: false }">
|
||||
<section aria-labelledby="history-heading" class="card space-y-3" x-data="{ open: false }">
|
||||
<h2 id="history-heading" class="text-xl font-semibold">
|
||||
<button
|
||||
type="button"
|
||||
@@ -608,7 +616,7 @@ new class extends Component
|
||||
x-bind:aria-expanded="open.toString()"
|
||||
aria-expanded="false"
|
||||
aria-controls="history-panel"
|
||||
class="flex min-h-6 items-center gap-2 rounded-md text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:focus-visible:outline-blue-400"
|
||||
class="flex min-h-6 items-center gap-2 rounded-md text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300"
|
||||
>
|
||||
<x-icon name="chevron-right" class="size-5 shrink-0 transition-transform" x-bind:class="{ 'rotate-90': open }" aria-hidden="true" />
|
||||
{{ __('jobs.sections.history') }}
|
||||
@@ -644,4 +652,4 @@ new class extends Component
|
||||
@endif
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</x-page>
|
||||
|
||||
@@ -297,7 +297,7 @@ new class extends Component
|
||||
id="checklist-item-{{ $item->id }}"
|
||||
wire:change="check({{ $item->id }}, $event.target.checked)"
|
||||
@checked($item->done)
|
||||
class="mt-0.5 size-4 shrink-0 rounded border-zinc-400 text-primary-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:border-zinc-500 dark:bg-zinc-800"
|
||||
class="mt-0.5 size-4 shrink-0 rounded border-zinc-400 text-primary-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 dark:border-zinc-500 dark:bg-zinc-800"
|
||||
/>
|
||||
<span @class(['line-through' => $item->done])>{{ $item->text }}</span>
|
||||
</label>
|
||||
|
||||
@@ -171,14 +171,14 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-1">
|
||||
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
|
||||
<x-page-title icon="clipboard-document-list">{{ $this->heading() }}</x-page-title>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">
|
||||
{{ __('jobs.tasks.job_label') }}:
|
||||
<x-link :href="route('jobs.show', $jobId)" navigate>{{ $jobTitle }}</x-link>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<form wire:submit="save" class="space-y-6" novalidate>
|
||||
<form wire:submit="save" class="card space-y-6" novalidate>
|
||||
<x-input wire:model="form.title" :label="__('jobs.tasks.fields.title')" autocomplete="off" required />
|
||||
|
||||
{{-- TallStackUI's native select does not tie its label to the control, so aria-label names it. --}}
|
||||
|
||||
@@ -351,7 +351,7 @@ new class extends Component
|
||||
href="{{ $fullUrl }}"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
class="block rounded-md focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:focus-visible:outline-blue-400"
|
||||
class="block rounded-md focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300"
|
||||
>
|
||||
<img
|
||||
src="{{ route('jobs.tasks.images.show', [$jobId, $taskId, $image->id, 'thumbnail']) }}"
|
||||
@@ -386,7 +386,7 @@ new class extends Component
|
||||
<a
|
||||
href="{{ $fullUrl }}?download=1"
|
||||
aria-label="{{ __('jobs.tasks.images.download_named', ['image' => $alt]) }}"
|
||||
class="inline-flex min-h-6 items-center rounded-md px-2 py-1 text-sm font-medium text-zinc-900 underline hover:no-underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:text-zinc-100 dark:focus-visible:outline-blue-400"
|
||||
class="inline-flex min-h-6 items-center rounded-md px-2 py-1 text-sm font-medium text-zinc-900 underline hover:no-underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 dark:text-zinc-100"
|
||||
>{{ __('jobs.tasks.images.download') }}</a>
|
||||
|
||||
@if ($canUpload && $this->isOwn($image))
|
||||
@@ -431,7 +431,7 @@ new class extends Component
|
||||
accept="image/jpeg,image/png,image/webp,image/gif"
|
||||
aria-describedby="image-new-{{ $taskId }}-hint @error('photo') image-new-{{ $taskId }}-error @enderror"
|
||||
@error('photo') aria-invalid="true" @enderror
|
||||
class="block w-full max-w-md rounded-md text-sm text-zinc-900 file:me-3 file:min-h-9 file:cursor-pointer file:rounded-md file:border-0 file:bg-zinc-200 file:px-3 file:py-2 file:font-medium file:text-zinc-900 hover:file:bg-zinc-300 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:text-zinc-100 dark:file:bg-zinc-700 dark:file:text-zinc-100 dark:hover:file:bg-zinc-600 dark:focus-visible:outline-blue-400"
|
||||
class="block w-full max-w-md rounded-md text-sm text-zinc-900 file:me-3 file:min-h-9 file:cursor-pointer file:rounded-md file:border-0 file:bg-zinc-200 file:px-3 file:py-2 file:font-medium file:text-zinc-900 hover:file:bg-zinc-300 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 dark:text-zinc-100 dark:file:bg-zinc-700 dark:file:text-zinc-100 dark:hover:file:bg-zinc-600"
|
||||
/>
|
||||
@error('photo')
|
||||
<p id="image-new-{{ $taskId }}-error" class="text-sm text-red-700 dark:text-red-400">{{ $message }}</p>
|
||||
|
||||
@@ -214,7 +214,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-1">
|
||||
<h1 class="text-2xl font-semibold">{{ __('jobs.tasks.from_template.title') }}</h1>
|
||||
<x-page-title icon="queue-list">{{ __('jobs.tasks.from_template.title') }}</x-page-title>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('jobs.tasks.job_label') }}: {{ $jobTitle }}</p>
|
||||
</div>
|
||||
|
||||
@@ -225,7 +225,7 @@ new class extends Component
|
||||
<p role="alert" class="text-sm text-red-700 dark:text-red-400">{{ $message }}</p>
|
||||
@enderror
|
||||
|
||||
<p>{{ __('jobs.tasks.from_template.none') }}</p>
|
||||
<x-empty-state icon="queue-list">{{ __('jobs.tasks.from_template.none') }}</x-empty-state>
|
||||
|
||||
<x-button :href="route('jobs.show', $jobId)" wire:navigate subtle color="black" :text="__('jobs.tasks.from_template.back')" />
|
||||
@else
|
||||
|
||||
@@ -36,10 +36,10 @@ new #[Layout('layouts.console')] class extends Component
|
||||
?>
|
||||
|
||||
<div class="mx-auto max-w-3xl space-y-6 p-3 sm:p-6">
|
||||
<h1 class="text-2xl font-semibold">{{ __('machines.console_picker.title') }}</h1>
|
||||
<x-page-title icon="cpu-chip">{{ __('machines.console_picker.title') }}</x-page-title>
|
||||
|
||||
@if ($this->machines === [])
|
||||
<p>{{ __('machines.console_picker.empty') }}</p>
|
||||
<x-empty-state icon="cpu-chip">{{ __('machines.console_picker.empty') }}</x-empty-state>
|
||||
@else
|
||||
<p>{{ __('machines.console_picker.intro') }}</p>
|
||||
|
||||
@@ -48,7 +48,7 @@ new #[Layout('layouts.console')] class extends Component
|
||||
<li wire:key="console-machine-{{ $machine->id }}">
|
||||
<a
|
||||
href="{{ route('machines.console', $machine->id) }}"
|
||||
class="flex min-h-14 flex-col justify-center rounded-lg border border-zinc-400 bg-white px-4 py-3 text-xl font-semibold text-zinc-900 hover:bg-zinc-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:border-zinc-500 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-700 dark:focus-visible:outline-blue-400"
|
||||
class="flex min-h-14 flex-col justify-center rounded-lg border border-zinc-400 bg-white px-4 py-3 text-xl font-semibold text-zinc-900 hover:bg-zinc-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 dark:border-zinc-500 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-700"
|
||||
>
|
||||
{{ $machine->name }}
|
||||
@if ($machine->serviceUnitNames !== [])
|
||||
|
||||
@@ -620,7 +620,7 @@ new #[Layout('layouts.console')] class extends Component
|
||||
?>
|
||||
|
||||
@php
|
||||
$touch = 'inline-flex min-h-11 min-w-11 items-center justify-center gap-2 rounded-lg px-4 py-2 font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:focus-visible:outline-blue-400';
|
||||
$touch = 'inline-flex min-h-11 min-w-11 items-center justify-center gap-2 rounded-lg px-4 py-2 font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300';
|
||||
$primary = $touch.' bg-primary-600 text-white hover:bg-primary-700';
|
||||
$secondary = $touch.' border border-zinc-500 bg-white text-zinc-900 hover:bg-zinc-100 dark:border-zinc-400 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-700';
|
||||
$machine = $this->machine;
|
||||
@@ -628,9 +628,9 @@ new #[Layout('layouts.console')] class extends Component
|
||||
@endphp
|
||||
|
||||
<div wire:poll.30s="refreshList" class="mx-auto max-w-6xl space-y-6 p-3 sm:p-4">
|
||||
<header class="flex flex-wrap items-center justify-between gap-3 rounded-lg bg-zinc-800 p-3 text-zinc-100 dark">
|
||||
<header class="flex flex-wrap items-center justify-between gap-3 rounded-xl bg-primary-950 p-3 text-zinc-100 shadow-md dark">
|
||||
<div class="min-w-0">
|
||||
<h1 class="text-2xl font-semibold break-words">{{ $machine->name }}</h1>
|
||||
<x-page-title icon="cpu-chip">{{ $machine->name }}</x-page-title>
|
||||
<p class="text-base">{{ __('machines.console.user', ['name' => auth()->user()?->name]) }}</p>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
@@ -640,7 +640,7 @@ new #[Layout('layouts.console')] class extends Component
|
||||
</button>
|
||||
<livewire:users::pin-switch :return-to="route('machines.console', $machine->id)" />
|
||||
{{-- The normal user interface has a session of its own (Users' UseConsoleSession). --}}
|
||||
<a href="{{ route('machines.show', $machine->id) }}" class="{{ $touch }} border border-zinc-300 text-zinc-100 hover:bg-zinc-700">
|
||||
<a href="{{ route('machines.show', $machine->id) }}" class="{{ $touch }} border border-white/60 text-zinc-100 hover:bg-white/10">
|
||||
<x-icon name="arrow-left" class="size-6" aria-hidden="true" />
|
||||
{{ __('machines.console.back') }}
|
||||
</a>
|
||||
@@ -653,7 +653,7 @@ new #[Layout('layouts.console')] class extends Component
|
||||
</div>
|
||||
|
||||
@if ($lateMaintenance !== [])
|
||||
<div class="space-y-1 rounded-lg border-2 border-red-700 p-3 dark:border-red-400">
|
||||
<div class="space-y-1 rounded-xl border-2 border-red-700 bg-red-50 p-3 dark:border-red-400 dark:bg-red-400/10">
|
||||
@foreach ($lateMaintenance as $late)
|
||||
<p wire:key="late-{{ $late->id }}" class="flex items-center gap-2 font-semibold text-red-700 dark:text-red-400">
|
||||
<x-icon name="exclamation-triangle" class="size-6 shrink-0" aria-hidden="true" />
|
||||
@@ -664,7 +664,7 @@ new #[Layout('layouts.console')] class extends Component
|
||||
@endif
|
||||
|
||||
<div class="grid gap-6 lg:grid-cols-2">
|
||||
<section aria-labelledby="console-list-heading" class="space-y-3">
|
||||
<section aria-labelledby="console-list-heading" class="card space-y-3">
|
||||
<h2 id="console-list-heading" class="text-xl font-semibold">{{ $nextDay ? __('machines.console.next_list', ['date' => $this->dateLabel($this->day())]) : __('machines.console.today_list') }}</h2>
|
||||
<div class="flex flex-wrap gap-2" role="group" aria-label="{{ __('machines.show.day_navigation') }}">
|
||||
<button type="button" wire:click="showDay(false)" class="{{ $nextDay ? $secondary : $primary }}" @unless ($nextDay) aria-pressed="true" @else aria-pressed="false" @endunless>{{ __('machines.show.today') }}</button>
|
||||
@@ -672,7 +672,7 @@ new #[Layout('layouts.console')] class extends Component
|
||||
</div>
|
||||
|
||||
@if ($this->rows === [])
|
||||
<p>{{ __('machines.show.none') }}</p>
|
||||
<x-empty-state icon="cpu-chip">{{ __('machines.show.none') }}</x-empty-state>
|
||||
@else
|
||||
<ol class="space-y-3">
|
||||
@foreach ($this->rows as $row)
|
||||
@@ -827,7 +827,7 @@ new #[Layout('layouts.console')] class extends Component
|
||||
<button
|
||||
type="button"
|
||||
wire:click="selectItem({{ $item->id }})"
|
||||
class="flex h-full min-h-24 w-full flex-col items-start gap-1 rounded-lg border-2 p-2 text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 {{ $selectedItemId === $item->id ? 'border-primary-600 dark:border-primary-400' : 'border-zinc-300 bg-white hover:bg-zinc-100 dark:border-zinc-600 dark:bg-zinc-900 dark:hover:bg-zinc-700' }}"
|
||||
class="flex h-full min-h-24 w-full flex-col items-start gap-1 rounded-lg border-2 p-2 text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 {{ $selectedItemId === $item->id ? 'border-primary-600 dark:border-primary-400' : 'border-zinc-300 bg-white hover:bg-zinc-100 dark:border-zinc-600 dark:bg-zinc-900 dark:hover:bg-zinc-700' }}"
|
||||
aria-label="{{ __('inventory.task.choose', ['item' => $item->name, 'balance' => $this->quantity($item->balanceMilli, $item->unit)]) }}"
|
||||
>
|
||||
@if ($item->hasImage)
|
||||
@@ -868,7 +868,7 @@ new #[Layout('layouts.console')] class extends Component
|
||||
</div>
|
||||
|
||||
@if ($machine->counters !== [] || $this->maintenance !== [])
|
||||
<section aria-labelledby="console-maintenance-heading" class="space-y-3">
|
||||
<section aria-labelledby="console-maintenance-heading" class="card space-y-3">
|
||||
<h2 id="console-maintenance-heading" class="text-xl font-semibold">{{ __('machines.console.counters_and_maintenance') }}</h2>
|
||||
|
||||
<div class="grid gap-3 md:grid-cols-2">
|
||||
|
||||
@@ -243,11 +243,11 @@ new class extends Component
|
||||
?>
|
||||
|
||||
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
|
||||
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
|
||||
<x-page-title icon="cpu-chip">{{ $this->heading() }}</x-page-title>
|
||||
|
||||
<p role="status" aria-live="polite" class="text-sm font-medium">{{ $message }}</p>
|
||||
|
||||
<form wire:submit="save" class="space-y-6" novalidate>
|
||||
<form wire:submit="save" class="card space-y-6" novalidate>
|
||||
<x-input id="machine-name" wire:model="name" :label="__('machines.form.name')" autocomplete="off" maxlength="150" required />
|
||||
|
||||
{{-- TallStackUI's native select does not tie its label to the control, so aria-label names it. --}}
|
||||
|
||||
@@ -86,7 +86,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-5xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl font-semibold">{{ __('machines.index.title') }}</h1>
|
||||
<x-page-title icon="cpu-chip">{{ __('machines.index.title') }}</x-page-title>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('machines.index.intro') }}</p>
|
||||
@can('machines.manage')
|
||||
<p><x-button :href="route('machines.create')" wire:navigate icon="plus" :text="__('machines.index.new')" /></p>
|
||||
@@ -109,7 +109,7 @@ new class extends Component
|
||||
</div>
|
||||
|
||||
@forelse ($this->grouped() as $unitName => $machines)
|
||||
<section wire:key="unit-{{ md5($unitName) }}" aria-label="{{ $unitName }}" class="space-y-2">
|
||||
<section wire:key="unit-{{ md5($unitName) }}" aria-label="{{ $unitName }}" class="card space-y-2">
|
||||
<h2 class="text-lg font-semibold">{{ $unitName }}</h2>
|
||||
<ul class="divide-y divide-zinc-200 rounded-lg border border-zinc-300 dark:divide-zinc-700 dark:border-zinc-600">
|
||||
@foreach ($machines as $machine)
|
||||
@@ -134,6 +134,6 @@ new class extends Component
|
||||
</ul>
|
||||
</section>
|
||||
@empty
|
||||
<p class="text-sm">{{ __('machines.index.none') }}</p>
|
||||
<x-empty-state icon="cpu-chip">{{ __('machines.index.none') }}</x-empty-state>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
@@ -183,13 +183,13 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-1">
|
||||
<h1 class="text-2xl font-semibold">{{ $this->heading() }}</h1>
|
||||
<x-page-title icon="wrench">{{ $this->heading() }}</x-page-title>
|
||||
<p class="text-sm">{{ $this->machine->name }}</p>
|
||||
</div>
|
||||
|
||||
<p role="status" aria-live="polite" class="text-sm font-medium">{{ $message }}</p>
|
||||
|
||||
<form wire:submit="save" class="space-y-6" novalidate>
|
||||
<form wire:submit="save" class="card space-y-6" novalidate>
|
||||
<x-input id="item-name" wire:model="name" :label="__('machines.maintenance.name')" :hint="__('machines.maintenance.name_hint')" autocomplete="off" maxlength="150" required />
|
||||
|
||||
<fieldset class="space-y-3">
|
||||
|
||||
@@ -211,7 +211,7 @@ new class extends Component
|
||||
<p id="maintenance-status" tabindex="-1" role="status" aria-live="polite" class="text-sm font-medium focus:outline-none">{{ $message }}</p>
|
||||
|
||||
@if ($this->machine->counters !== [])
|
||||
<section aria-labelledby="counters-heading" class="space-y-3">
|
||||
<section aria-labelledby="counters-heading" class="card space-y-3">
|
||||
<h2 id="counters-heading" class="text-xl font-semibold">{{ __('machines.maintenance.counters') }}</h2>
|
||||
<ul class="space-y-3">
|
||||
@foreach ($this->machine->counters as $counter)
|
||||
@@ -247,14 +247,14 @@ new class extends Component
|
||||
@php($hasMaintenance = $this->machine->counters !== [] || $this->items !== [])
|
||||
|
||||
@if ($hasMaintenance || auth()->user()?->can('machines.manage'))
|
||||
<section aria-labelledby="maintenance-heading" class="space-y-3">
|
||||
<section aria-labelledby="maintenance-heading" class="card space-y-3">
|
||||
<h2 id="maintenance-heading" class="text-xl font-semibold">{{ __('machines.maintenance.items') }}</h2>
|
||||
@can('machines.manage')
|
||||
<p><x-button :href="route('machines.maintenance.create', $machineId)" wire:navigate sm icon="plus" :text="__('machines.maintenance.add')" /></p>
|
||||
@endcan
|
||||
|
||||
@if ($this->items === [])
|
||||
<p class="text-sm">{{ __('machines.maintenance.none') }}</p>
|
||||
<x-empty-state icon="cpu-chip">{{ __('machines.maintenance.none') }}</x-empty-state>
|
||||
@else
|
||||
<ul class="space-y-3">
|
||||
@foreach ($this->items as $item)
|
||||
@@ -308,7 +308,7 @@ new class extends Component
|
||||
@endif
|
||||
|
||||
@if ($hasMaintenance)
|
||||
<section aria-labelledby="history-heading" class="space-y-3">
|
||||
<section aria-labelledby="history-heading" class="card space-y-3">
|
||||
<h2 id="history-heading" class="text-xl font-semibold">{{ __('machines.maintenance.history') }}</h2>
|
||||
<div class="grid gap-3 sm:grid-cols-3">
|
||||
{{-- TallStackUI's native select does not tie its label to the control, so aria-label names it. --}}
|
||||
|
||||
@@ -209,7 +209,7 @@ new class extends Component
|
||||
|
||||
<div>
|
||||
@if ($this->isAvailable())
|
||||
<section aria-labelledby="process-heading" class="space-y-4 rounded-lg border border-zinc-300 p-4 dark:border-zinc-600">
|
||||
<section aria-labelledby="process-heading" class="card space-y-4">
|
||||
<h2 id="process-heading" class="text-xl font-semibold">{{ __('machines.process.title') }}</h2>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('machines.process.intro') }}</p>
|
||||
|
||||
|
||||
@@ -243,7 +243,7 @@ new class extends Component
|
||||
|
||||
<div class="space-y-2">
|
||||
<p class="text-sm"><x-link :href="route('machines.index')" navigate>{{ __('machines.show.back') }}</x-link></p>
|
||||
<h1 class="text-2xl font-semibold break-words">{{ $machine->name }}</h1>
|
||||
<x-page-title icon="cpu-chip">{{ $machine->name }}</x-page-title>
|
||||
<p class="text-sm">
|
||||
{{ __('machines.types.'.$machine->type->value) }}
|
||||
· {{ __('machines.show.units', ['units' => implode(', ', $machine->serviceUnitNames)]) }}
|
||||
@@ -268,7 +268,7 @@ new class extends Component
|
||||
|
||||
<p id="work-list-status" tabindex="-1" role="status" aria-live="polite" class="text-sm font-medium focus:outline-none">{{ $message }}</p>
|
||||
|
||||
<section aria-labelledby="work-list-heading" class="space-y-4">
|
||||
<section aria-labelledby="work-list-heading" class="card space-y-4">
|
||||
<h2 id="work-list-heading" class="text-xl font-semibold">{{ __('machines.show.work_list') }}</h2>
|
||||
|
||||
<nav aria-label="{{ __('machines.show.day_navigation') }}" class="flex flex-wrap items-end gap-2">
|
||||
@@ -289,7 +289,7 @@ new class extends Component
|
||||
<button
|
||||
type="button"
|
||||
wire:click="showDate('{{ $dayLoad->day }}')"
|
||||
class="rounded-md border border-zinc-300 px-2 py-1 hover:bg-zinc-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:border-zinc-600 dark:hover:bg-zinc-700 @if ($dayLoad->day === $day) font-semibold @endif"
|
||||
class="rounded-md border border-zinc-300 px-2 py-1 hover:bg-zinc-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 dark:border-zinc-600 dark:hover:bg-zinc-700 @if ($dayLoad->day === $day) font-semibold @endif"
|
||||
@if ($dayLoad->day === $day) aria-current="date" @endif
|
||||
>
|
||||
{{ __('machines.show.load_row', ['date' => $this->shortDay($dayLoad->day), 'rows' => trans_choice('machines.show.rows', $dayLoad->rows, ['count' => $dayLoad->rows]), 'hours' => $this->quarters($dayLoad->estimatedQuarters)]) }}
|
||||
@@ -303,7 +303,7 @@ new class extends Component
|
||||
<p class="text-sm">{{ trans_choice('machines.show.row_count', count($this->rows), ['count' => count($this->rows)]) }}</p>
|
||||
|
||||
@if ($this->rows === [])
|
||||
<p class="text-sm">{{ __('machines.show.none') }}</p>
|
||||
<x-empty-state icon="cpu-chip">{{ __('machines.show.none') }}</x-empty-state>
|
||||
@else
|
||||
<ol class="space-y-3">
|
||||
@foreach ($this->rows as $row)
|
||||
|
||||
@@ -154,7 +154,7 @@ new class extends Component
|
||||
aria-controls="notifications-panel"
|
||||
aria-describedby="notifications-count"
|
||||
data-notifications-bell
|
||||
class="relative flex min-h-9 items-center gap-1 rounded-md px-3 py-2 text-sm font-medium text-zinc-200 hover:bg-zinc-700 hover:text-white focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-400"
|
||||
class="relative flex min-h-9 items-center gap-1 rounded-md px-3 py-2 text-sm font-medium text-zinc-200 hover:bg-white/10 hover:text-white focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white"
|
||||
>
|
||||
<x-icon name="bell" class="size-5" aria-hidden="true" />
|
||||
<span class="sr-only">{{ __('notifications.title') }}</span>
|
||||
@@ -168,7 +168,7 @@ new class extends Component
|
||||
id="notifications-panel"
|
||||
x-show="open"
|
||||
x-cloak
|
||||
class="z-40 mt-1 w-96 max-w-[calc(100vw-2rem)] rounded-md border border-zinc-600 bg-zinc-800 p-4 text-sm text-zinc-100 shadow-lg sm:absolute sm:end-0"
|
||||
class="z-40 mt-1 w-96 max-w-[calc(100vw-2rem)] rounded-md border border-white/15 bg-primary-950 p-4 text-sm text-zinc-100 shadow-lg sm:absolute sm:end-0"
|
||||
>
|
||||
{{-- Not a heading: the header comes before the page's h1. --}}
|
||||
<p id="notifications-panel-title" class="mb-2 font-semibold">{{ __('notifications.recent') }}</p>
|
||||
@@ -182,7 +182,7 @@ new class extends Component
|
||||
<a
|
||||
href="{{ $this->url($notification) }}"
|
||||
wire:navigate
|
||||
class="block rounded-md px-2 py-2 hover:bg-zinc-700 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-400"
|
||||
class="block rounded-md px-2 py-2 hover:bg-white/10 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white"
|
||||
>
|
||||
@if (in_array($notification->id, $newIds, true))
|
||||
<span class="me-1 rounded bg-zinc-100 px-1.5 py-0.5 text-xs font-semibold text-zinc-900">{{ __('notifications.new') }}</span>
|
||||
|
||||
@@ -72,7 +72,7 @@ new class extends Component
|
||||
?>
|
||||
|
||||
<div class="mx-auto max-w-6xl space-y-6 p-4 sm:p-6">
|
||||
<h1 class="text-2xl font-semibold">{{ __('reports.hours.title') }}</h1>
|
||||
<x-page-title icon="clock">{{ __('reports.hours.title') }}</x-page-title>
|
||||
|
||||
<x-reports.period-filter :presets="$this->periodPresets()" :valid="$this->period !== null" />
|
||||
|
||||
@@ -102,13 +102,13 @@ new class extends Component
|
||||
</div>
|
||||
|
||||
@if ($report->people === [])
|
||||
<p>{{ __('reports.hours.none') }}</p>
|
||||
<x-empty-state icon="chart-bar">{{ __('reports.hours.none') }}</x-empty-state>
|
||||
@else
|
||||
<div class="overflow-x-auto rounded focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600" tabindex="0" role="region" aria-label="{{ __('reports.hours.table', ['period' => $this->periodLabel()]) }}">
|
||||
<div class="card overflow-x-auto focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600" tabindex="0" role="region" aria-label="{{ __('reports.hours.table', ['period' => $this->periodLabel()]) }}">
|
||||
<table class="w-full text-sm">
|
||||
<caption class="sr-only">{{ __('reports.hours.table', ['period' => $this->periodLabel()]) }}</caption>
|
||||
<thead>
|
||||
<tr class="border-b border-zinc-300 text-left dark:border-zinc-600">
|
||||
<tr class="border-b-2 border-primary-200 text-left text-primary-900 dark:border-primary-800 dark:text-primary-100">
|
||||
<th scope="col" class="py-2 pr-3">{{ __('reports.hours.person') }}</th>
|
||||
<th scope="col" class="py-2 pr-3 text-right">{{ __('reports.hours.total') }}</th>
|
||||
<th scope="col" class="py-2 pr-3 text-right">{{ __('reports.hours.customer') }}</th>
|
||||
|
||||
@@ -75,7 +75,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-7xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl font-semibold">{{ __('reports.profitability.title') }}</h1>
|
||||
<x-page-title icon="chart-bar">{{ __('reports.profitability.title') }}</x-page-title>
|
||||
<p class="max-w-3xl text-sm">{{ __('reports.profitability.intro') }}</p>
|
||||
</div>
|
||||
|
||||
@@ -92,7 +92,7 @@ new class extends Component
|
||||
</div>
|
||||
|
||||
@if ($report->hourlyCostCents === null)
|
||||
<div class="flex items-start gap-2 rounded-lg border border-amber-700 p-4 text-sm dark:border-amber-400">
|
||||
<div class="flex items-start gap-2 rounded-lg border border-amber-700 bg-amber-50 p-4 text-sm text-amber-950 dark:border-amber-400 dark:bg-amber-400/10 dark:text-amber-100">
|
||||
<x-icon name="exclamation-triangle" class="size-5 shrink-0" aria-hidden="true" />
|
||||
<p>
|
||||
{{ __('reports.profitability.no_cost') }}
|
||||
@@ -106,17 +106,17 @@ new class extends Component
|
||||
@endif
|
||||
|
||||
@if ($report->jobs === [])
|
||||
<p>{{ __('reports.profitability.none') }}</p>
|
||||
<x-empty-state icon="chart-bar">{{ __('reports.profitability.none') }}</x-empty-state>
|
||||
@else
|
||||
<section aria-labelledby="units-heading" class="space-y-4">
|
||||
<h2 id="units-heading" class="text-xl font-semibold">{{ __('reports.profitability.by_service_unit') }}</h2>
|
||||
<p class="text-sm">{{ __('reports.profitability.split_note') }}</p>
|
||||
|
||||
<div class="overflow-x-auto rounded focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600" tabindex="0" role="region" aria-label="{{ __('reports.profitability.units_table', ['period' => $this->periodLabel()]) }}">
|
||||
<div class="card overflow-x-auto focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600" tabindex="0" role="region" aria-label="{{ __('reports.profitability.units_table', ['period' => $this->periodLabel()]) }}">
|
||||
<table class="w-full text-sm">
|
||||
<caption class="sr-only">{{ __('reports.profitability.units_table', ['period' => $this->periodLabel()]) }}</caption>
|
||||
<thead>
|
||||
<tr class="border-b border-zinc-300 text-left dark:border-zinc-600">
|
||||
<tr class="border-b-2 border-primary-200 text-left text-primary-900 dark:border-primary-800 dark:text-primary-100">
|
||||
<th scope="col" class="py-2 pr-3">{{ __('reports.profitability.service_unit') }}</th>
|
||||
<th scope="col" class="py-2 pr-3 text-right">{{ __('reports.profitability.jobs') }}</th>
|
||||
<th scope="col" class="py-2 pr-3 text-right">{{ __('reports.profitability.hours') }}</th>
|
||||
@@ -156,11 +156,11 @@ new class extends Component
|
||||
<section aria-labelledby="jobs-heading" class="space-y-4">
|
||||
<h2 id="jobs-heading" class="text-xl font-semibold">{{ __('reports.profitability.by_job') }}</h2>
|
||||
|
||||
<div class="overflow-x-auto rounded focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600" tabindex="0" role="region" aria-label="{{ __('reports.profitability.jobs_table', ['period' => $this->periodLabel()]) }}">
|
||||
<div class="card overflow-x-auto focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600" tabindex="0" role="region" aria-label="{{ __('reports.profitability.jobs_table', ['period' => $this->periodLabel()]) }}">
|
||||
<table class="w-full text-sm">
|
||||
<caption class="sr-only">{{ __('reports.profitability.jobs_table', ['period' => $this->periodLabel()]) }}</caption>
|
||||
<thead>
|
||||
<tr class="border-b border-zinc-300 text-left align-bottom dark:border-zinc-600">
|
||||
<tr class="border-b-2 border-primary-200 text-left align-bottom text-primary-900 dark:border-primary-800 dark:text-primary-100">
|
||||
<th scope="col" class="py-2 pr-3">{{ __('reports.profitability.job') }}</th>
|
||||
<th scope="col" class="py-2 pr-3 text-right">{{ __('reports.profitability.hours') }}</th>
|
||||
<th scope="col" class="py-2 pr-3 text-right">{{ __('reports.profitability.billed_hours') }}</th>
|
||||
|
||||
@@ -56,7 +56,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-6xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl font-semibold">{{ __('reports.reimbursements.title') }}</h1>
|
||||
<x-page-title icon="receipt-refund">{{ __('reports.reimbursements.title') }}</x-page-title>
|
||||
<p class="max-w-3xl text-sm">{{ __('reports.reimbursements.intro') }}</p>
|
||||
</div>
|
||||
|
||||
@@ -74,7 +74,7 @@ new class extends Component
|
||||
</div>
|
||||
|
||||
@if ($report->people === [])
|
||||
<p>{{ __('reports.reimbursements.none') }}</p>
|
||||
<x-empty-state icon="chart-bar">{{ __('reports.reimbursements.none') }}</x-empty-state>
|
||||
@else
|
||||
<p class="font-semibold">
|
||||
{{ __('reports.reimbursements.grand_total', ['amount' => $this->money($report->costCents), 'km' => $this->kilometers($report->kilometerTenths)]) }}
|
||||
@@ -84,11 +84,11 @@ new class extends Component
|
||||
<section wire:key="person-{{ $person->userId }}" aria-labelledby="person-{{ $person->userId }}" class="space-y-2 break-inside-avoid">
|
||||
<h3 id="person-{{ $person->userId }}" class="text-lg font-semibold">{{ $person->name }}</h3>
|
||||
|
||||
<div class="overflow-x-auto rounded focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600" tabindex="0" role="region" aria-label="{{ __('reports.reimbursements.table', ['name' => $person->name, 'period' => $this->periodLabel()]) }}">
|
||||
<div class="card overflow-x-auto focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600" tabindex="0" role="region" aria-label="{{ __('reports.reimbursements.table', ['name' => $person->name, 'period' => $this->periodLabel()]) }}">
|
||||
<table class="w-full text-sm">
|
||||
<caption class="sr-only">{{ __('reports.reimbursements.table', ['name' => $person->name, 'period' => $this->periodLabel()]) }}</caption>
|
||||
<thead>
|
||||
<tr class="border-b border-zinc-300 text-left dark:border-zinc-600">
|
||||
<tr class="border-b-2 border-primary-200 text-left text-primary-900 dark:border-primary-800 dark:text-primary-100">
|
||||
<th scope="col" class="py-2 pr-3">{{ __('reports.reimbursements.day') }}</th>
|
||||
<th scope="col" class="py-2 pr-3">{{ __('reports.reimbursements.category') }}</th>
|
||||
<th scope="col" class="py-2 pr-3">{{ __('reports.reimbursements.what') }}</th>
|
||||
|
||||
@@ -55,7 +55,7 @@ new class extends Component
|
||||
?>
|
||||
|
||||
<div class="mx-auto max-w-6xl space-y-6 p-4 sm:p-6">
|
||||
<h1 class="text-2xl font-semibold">{{ __('reports.sales.title') }}</h1>
|
||||
<x-page-title icon="shopping-cart">{{ __('reports.sales.title') }}</x-page-title>
|
||||
|
||||
<x-reports.period-filter :presets="$this->periodPresets()" :valid="$this->period !== null" />
|
||||
|
||||
@@ -68,7 +68,7 @@ new class extends Component
|
||||
</div>
|
||||
|
||||
@if ($report->days === [])
|
||||
<p>{{ __('reports.sales.none') }}</p>
|
||||
<x-empty-state icon="chart-bar">{{ __('reports.sales.none') }}</x-empty-state>
|
||||
@else
|
||||
@if ($report->openDays > 0)
|
||||
<p class="flex items-start gap-2 text-sm">
|
||||
@@ -179,11 +179,11 @@ new class extends Component
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="overflow-x-auto rounded focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600" tabindex="0" role="region" aria-label="{{ __('reports.sales.by_day') }}">
|
||||
<div class="card overflow-x-auto focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600" tabindex="0" role="region" aria-label="{{ __('reports.sales.by_day') }}">
|
||||
<table class="w-full text-sm">
|
||||
<caption class="mb-2 text-left text-base font-semibold">{{ __('reports.sales.by_day') }}</caption>
|
||||
<thead>
|
||||
<tr class="border-b border-zinc-300 text-left dark:border-zinc-600">
|
||||
<tr class="border-b-2 border-primary-200 text-left text-primary-900 dark:border-primary-800 dark:text-primary-100">
|
||||
<th scope="col" class="py-2 pr-3">{{ __('reports.sales.day') }}</th>
|
||||
<th scope="col" class="py-2 pr-3 text-right">{{ __('reports.sales.count') }}</th>
|
||||
<th scope="col" class="py-2 pr-3 text-right">{{ __('reports.sales.cash') }}</th>
|
||||
|
||||
@@ -68,7 +68,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-6xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl font-semibold">{{ __('reports.stock_usage.title') }}</h1>
|
||||
<x-page-title icon="archive-box-arrow-down">{{ __('reports.stock_usage.title') }}</x-page-title>
|
||||
<p class="max-w-3xl text-sm">{{ __('reports.stock_usage.intro') }}</p>
|
||||
</div>
|
||||
|
||||
@@ -83,17 +83,17 @@ new class extends Component
|
||||
</div>
|
||||
|
||||
@if ($report->items === [])
|
||||
<p>{{ __('reports.stock_usage.empty') }}</p>
|
||||
<x-empty-state icon="chart-bar">{{ __('reports.stock_usage.empty') }}</x-empty-state>
|
||||
@else
|
||||
<p class="font-semibold">{{ __('reports.stock_usage.total', ['amount' => $this->signedMoney($report->total->totalCents())]) }}</p>
|
||||
|
||||
<section aria-labelledby="usage-items" class="space-y-2">
|
||||
<h3 id="usage-items" class="text-lg font-semibold">{{ __('reports.stock_usage.by_item') }}</h3>
|
||||
<div class="overflow-x-auto rounded focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600" tabindex="0" role="region" aria-label="{{ __('reports.stock_usage.by_item') }}, {{ $this->periodLabel() }}">
|
||||
<div class="card overflow-x-auto focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600" tabindex="0" role="region" aria-label="{{ __('reports.stock_usage.by_item') }}, {{ $this->periodLabel() }}">
|
||||
<table class="w-full text-sm">
|
||||
<caption class="sr-only">{{ __('reports.stock_usage.by_item') }}, {{ $this->periodLabel() }}</caption>
|
||||
<thead>
|
||||
<tr class="border-b border-zinc-300 text-left align-bottom dark:border-zinc-600">
|
||||
<tr class="border-b-2 border-primary-200 text-left align-bottom text-primary-900 dark:border-primary-800 dark:text-primary-100">
|
||||
<th scope="col" class="py-2 pr-3">{{ __('reports.stock_usage.item') }}</th>
|
||||
<th scope="col" class="py-2 pr-3">{{ __('reports.stock_usage.group') }}</th>
|
||||
<th scope="col" class="py-2 pr-3 text-right">{{ __('reports.stock_usage.used') }}</th>
|
||||
@@ -121,11 +121,11 @@ new class extends Component
|
||||
@foreach ($this->summaries($report) as $summary)
|
||||
<section wire:key="summary-{{ $summary['key'] }}" aria-labelledby="usage-{{ $summary['key'] }}" class="space-y-2">
|
||||
<h3 id="usage-{{ $summary['key'] }}" class="text-lg font-semibold">{{ __('reports.stock_usage.by_'.$summary['key']) }}</h3>
|
||||
<div class="overflow-x-auto rounded focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600" tabindex="0" role="region" aria-label="{{ __('reports.stock_usage.by_'.$summary['key']) }}, {{ $this->periodLabel() }}">
|
||||
<div class="card overflow-x-auto focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600" tabindex="0" role="region" aria-label="{{ __('reports.stock_usage.by_'.$summary['key']) }}, {{ $this->periodLabel() }}">
|
||||
<table class="w-full text-sm">
|
||||
<caption class="sr-only">{{ __('reports.stock_usage.by_'.$summary['key']) }}, {{ $this->periodLabel() }}</caption>
|
||||
<thead>
|
||||
<tr class="border-b border-zinc-300 text-left dark:border-zinc-600">
|
||||
<tr class="border-b-2 border-primary-200 text-left text-primary-900 dark:border-primary-800 dark:text-primary-100">
|
||||
<th scope="col" class="py-2 pr-3">{{ __('reports.stock_usage.'.$summary['key'].'_column') }}</th>
|
||||
<th scope="col" class="py-2 pr-3 text-right">{{ __('reports.stock_usage.used_value') }}</th>
|
||||
<th scope="col" class="py-2 pr-3 text-right">{{ __('reports.stock_usage.written_off_value') }}</th>
|
||||
|
||||
@@ -75,7 +75,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-6xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl font-semibold">{{ __('reports.stock_value.title') }}</h1>
|
||||
<x-page-title icon="currency-euro">{{ __('reports.stock_value.title') }}</x-page-title>
|
||||
<p class="max-w-3xl text-sm">{{ __('reports.stock_value.intro') }}</p>
|
||||
</div>
|
||||
|
||||
@@ -94,7 +94,7 @@ new class extends Component
|
||||
</div>
|
||||
|
||||
@if ($report->toOrder !== [])
|
||||
<section aria-labelledby="to-order" class="space-y-2 rounded-lg border border-amber-700 p-3 dark:border-amber-400">
|
||||
<section aria-labelledby="to-order" class="space-y-2 rounded-lg border border-amber-700 bg-amber-50 p-3 text-amber-950 dark:border-amber-400 dark:bg-amber-400/10 dark:text-amber-100">
|
||||
<h3 id="to-order" class="flex items-center gap-2 font-semibold">
|
||||
<x-icon name="shopping-cart" class="size-5" aria-hidden="true" />
|
||||
{{ __('reports.stock_value.to_order') }}
|
||||
@@ -108,13 +108,13 @@ new class extends Component
|
||||
@endif
|
||||
|
||||
@if ($report->items === [])
|
||||
<p>{{ __('reports.stock_value.empty') }}</p>
|
||||
<x-empty-state icon="chart-bar">{{ __('reports.stock_value.empty') }}</x-empty-state>
|
||||
@else
|
||||
<div class="overflow-x-auto rounded focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600" tabindex="0" role="region" aria-label="{{ __('reports.stock_value.table', ['date' => $this->dateLabel($day)]) }}">
|
||||
<div class="card overflow-x-auto focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600" tabindex="0" role="region" aria-label="{{ __('reports.stock_value.table', ['date' => $this->dateLabel($day)]) }}">
|
||||
<table class="w-full text-sm">
|
||||
<caption class="sr-only">{{ __('reports.stock_value.table', ['date' => $this->dateLabel($day)]) }}</caption>
|
||||
<thead>
|
||||
<tr class="border-b border-zinc-300 text-left dark:border-zinc-600">
|
||||
<tr class="border-b-2 border-primary-200 text-left text-primary-900 dark:border-primary-800 dark:text-primary-100">
|
||||
<th scope="col" class="py-2 pr-3">{{ __('reports.stock_usage.item') }}</th>
|
||||
<th scope="col" class="py-2 pr-3">{{ __('reports.stock_usage.group') }}</th>
|
||||
<th scope="col" class="py-2 pr-3 text-right">{{ __('inventory.columns.balance') }}</th>
|
||||
|
||||
@@ -85,7 +85,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-6xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl font-semibold">{{ __('reports.unbilled.title') }}</h1>
|
||||
<x-page-title icon="document-currency-euro">{{ __('reports.unbilled.title') }}</x-page-title>
|
||||
<p class="max-w-3xl text-sm">{{ __('reports.unbilled.intro') }}</p>
|
||||
</div>
|
||||
|
||||
@@ -117,13 +117,13 @@ new class extends Component
|
||||
</div>
|
||||
|
||||
@if ($report->jobs === [])
|
||||
<p>{{ __('reports.unbilled.none') }}</p>
|
||||
<x-empty-state icon="chart-bar">{{ __('reports.unbilled.none') }}</x-empty-state>
|
||||
@else
|
||||
<div class="overflow-x-auto rounded focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600" tabindex="0" role="region" aria-label="{{ __('reports.unbilled.table', ['day' => $this->dateLabel($day)]) }}">
|
||||
<div class="card overflow-x-auto focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600" tabindex="0" role="region" aria-label="{{ __('reports.unbilled.table', ['day' => $this->dateLabel($day)]) }}">
|
||||
<table class="w-full text-sm">
|
||||
<caption class="sr-only">{{ __('reports.unbilled.table', ['day' => $this->dateLabel($day)]) }}</caption>
|
||||
<thead>
|
||||
<tr class="border-b border-zinc-300 text-left dark:border-zinc-600">
|
||||
<tr class="border-b-2 border-primary-200 text-left text-primary-900 dark:border-primary-800 dark:text-primary-100">
|
||||
<th scope="col" class="py-2 pr-3">{{ __('reports.unbilled.job') }}</th>
|
||||
<th scope="col" class="py-2 pr-3">{{ __('reports.unbilled.status') }}</th>
|
||||
<th scope="col" class="py-2 pr-3">{{ __('reports.unbilled.oldest') }}</th>
|
||||
@@ -156,7 +156,7 @@ new class extends Component
|
||||
</details>
|
||||
</th>
|
||||
<td class="py-2 pr-3">
|
||||
{{ __('jobs.statuses.'.$row->job->status) }}
|
||||
<x-jobs.status :status="$row->job->status" />
|
||||
@if ($row->job->paymentBasis !== null)
|
||||
<span class="block text-xs text-zinc-600 dark:text-zinc-300">{{ __('jobs.payment_bases.'.$row->job->paymentBasis) }}</span>
|
||||
@endif
|
||||
|
||||
@@ -289,7 +289,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-6xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl font-semibold">{{ __('sales.index.title') }}</h1>
|
||||
<x-page-title icon="receipt-percent">{{ __('sales.index.title') }}</x-page-title>
|
||||
<p>
|
||||
<x-button :href="route('sales.sell')" wire:navigate icon="plus" :text="__('sales.index.new_sale')" />
|
||||
</p>
|
||||
@@ -304,7 +304,7 @@ new class extends Component
|
||||
<p id="sales-status" tabindex="-1" role="status" aria-live="polite" class="text-sm font-medium focus:outline-none">{{ $statusMessage }}</p>
|
||||
|
||||
@if ($this->unclosedDays !== [])
|
||||
<div class="rounded-lg border border-amber-700 p-4 text-sm dark:border-amber-400">
|
||||
<div class="rounded-lg border border-amber-700 bg-amber-50 p-4 text-sm text-amber-950 dark:border-amber-400 dark:bg-amber-400/10 dark:text-amber-100">
|
||||
<p class="flex items-start gap-2">
|
||||
<x-icon name="exclamation-triangle" class="size-5 shrink-0" aria-hidden="true" />
|
||||
{{ __('sales.index.unclosed') }}
|
||||
@@ -422,7 +422,7 @@ new class extends Component
|
||||
@endcan
|
||||
|
||||
@if ($this->sales === [])
|
||||
<p class="text-sm">{{ __('sales.index.none') }}</p>
|
||||
<x-empty-state icon="shopping-cart">{{ __('sales.index.none') }}</x-empty-state>
|
||||
@else
|
||||
<x-table :headers="$this->headers()" :rows="$this->sales">
|
||||
@interact('column_time', $sale)
|
||||
@@ -463,7 +463,7 @@ new class extends Component
|
||||
href="{{ route('sales.receipt', $sale->id) }}"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
class="mr-2 inline-flex items-center gap-1 text-sm font-medium underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700"
|
||||
class="mr-2 inline-flex items-center gap-1 text-sm font-medium underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300"
|
||||
aria-label="{{ __('sales.receipt.open_named', ['number' => $sale->id]) }}"
|
||||
>
|
||||
<x-icon name="document-text" class="size-4" aria-hidden="true" />
|
||||
|
||||
@@ -327,7 +327,7 @@ new class extends Component
|
||||
<p>{{ $message }}</p>
|
||||
@if ($paidSaleId !== null)
|
||||
<p>
|
||||
<a href="{{ route('sales.receipt', $paidSaleId) }}" target="_blank" rel="noopener" class="inline-flex items-center gap-1 underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700">
|
||||
<a href="{{ route('sales.receipt', $paidSaleId) }}" target="_blank" rel="noopener" class="inline-flex items-center gap-1 underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300">
|
||||
<x-icon name="document-text" class="size-5" aria-hidden="true" />
|
||||
{{ __('sales.receipt.open', ['number' => $paidSaleId]) }}
|
||||
</a>
|
||||
@@ -336,7 +336,7 @@ new class extends Component
|
||||
</div>
|
||||
|
||||
@if ($this->orders === [])
|
||||
<p class="text-sm">{{ __('sales.orders.none') }}</p>
|
||||
<x-empty-state icon="shopping-cart">{{ __('sales.orders.none') }}</x-empty-state>
|
||||
@else
|
||||
<ul class="space-y-3">
|
||||
@foreach ($this->orders as $order)
|
||||
|
||||
@@ -477,7 +477,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-lg space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-1">
|
||||
<h1 class="text-2xl font-semibold">{{ __('sales.sell.title') }}</h1>
|
||||
<x-page-title icon="shopping-cart">{{ __('sales.sell.title') }}</x-page-title>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('sales.sell.intro') }}</p>
|
||||
<p class="text-sm">
|
||||
<x-link :href="route('sales.index')" navigate>{{ __('sales.sell.to_list') }}</x-link>
|
||||
@@ -503,7 +503,7 @@ new class extends Component
|
||||
href="{{ route('sales.receipt', $savedSaleId) }}"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
class="inline-flex items-center gap-1 font-medium underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700"
|
||||
class="inline-flex items-center gap-1 font-medium underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300"
|
||||
>
|
||||
<x-icon name="document-text" class="size-5" aria-hidden="true" />
|
||||
{{ __('sales.receipt.open', ['number' => $savedSaleId]) }}
|
||||
@@ -522,9 +522,9 @@ new class extends Component
|
||||
@enderror
|
||||
|
||||
@if ($this->products === [])
|
||||
<p class="text-sm">{{ __('sales.sell.no_products') }}</p>
|
||||
<x-empty-state icon="shopping-cart">{{ __('sales.sell.no_products') }}</x-empty-state>
|
||||
@else
|
||||
<section aria-labelledby="products-heading" class="space-y-3">
|
||||
<section aria-labelledby="products-heading" class="card space-y-3">
|
||||
<h2 id="products-heading" class="text-lg font-semibold">{{ __('sales.sell.products') }}</h2>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('sales.sell.products_help') }}</p>
|
||||
|
||||
@@ -534,11 +534,11 @@ new class extends Component
|
||||
<button
|
||||
type="button"
|
||||
wire:click="addProduct({{ $product->id }})"
|
||||
class="flex h-full min-h-16 w-full flex-col items-start justify-center rounded-lg border border-zinc-400 bg-white px-3 py-2 text-left hover:bg-zinc-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:border-zinc-500 dark:bg-zinc-800 dark:hover:bg-zinc-700"
|
||||
class="flex h-full min-h-16 w-full flex-col items-start justify-center rounded-xl border border-zinc-400 bg-white px-3 py-2 text-left shadow-sm transition hover:border-primary-600 hover:bg-primary-50 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 dark:border-zinc-500 dark:bg-zinc-800 dark:hover:border-primary-300 dark:hover:bg-primary-950"
|
||||
aria-label="{{ __('sales.sell.add_named', ['product' => $product->name, 'price' => $this->money($product->grossCents), 'unit' => __('catalog.units.'.$product->unit)]) }}"
|
||||
>
|
||||
<span class="font-medium break-words">{{ $product->name }}</span>
|
||||
<span class="text-sm text-zinc-700 dark:text-zinc-300">{{ $this->money($product->grossCents) }} / {{ __('catalog.units.'.$product->unit) }}</span>
|
||||
<span class="text-sm font-semibold text-primary-800 dark:text-primary-200">{{ $this->money($product->grossCents) }} / {{ __('catalog.units.'.$product->unit) }}</span>
|
||||
@if (in_array($product->id, $this->madeProductIds, true))
|
||||
<span class="inline-flex items-center gap-1 text-xs">
|
||||
<x-icon name="printer" class="size-4" aria-hidden="true" />
|
||||
@@ -551,7 +551,7 @@ new class extends Component
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="cart-heading" class="space-y-3">
|
||||
<section aria-labelledby="cart-heading" class="card space-y-3">
|
||||
<h2 id="cart-heading" tabindex="-1" class="text-lg font-semibold focus:outline-none">{{ __('sales.sell.cart') }}</h2>
|
||||
|
||||
<p role="status" aria-live="polite" class="sr-only">{{ $cartMessage }}</p>
|
||||
@@ -590,7 +590,7 @@ new class extends Component
|
||||
wire:change="setQuantity({{ $product->id }}, $event.target.value)"
|
||||
wire:keydown.enter.prevent="setQuantity({{ $product->id }}, $event.target.value)"
|
||||
aria-label="{{ __('sales.sell.quantity_named', ['product' => $product->name]) }}"
|
||||
class="h-9 w-14 rounded-md border border-zinc-500 bg-white px-2 text-center font-medium text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:border-zinc-400 dark:bg-zinc-900 dark:text-zinc-100"
|
||||
class="h-9 w-14 rounded-md border border-zinc-500 bg-white px-2 text-center font-medium text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 dark:border-zinc-400 dark:bg-zinc-900 dark:text-zinc-100"
|
||||
/>
|
||||
<x-button wire:click="addProduct({{ $product->id }})" subtle color="black" sm icon="plus" :aria-label="__('sales.sell.increase_named', ['product' => $product->name])" />
|
||||
<x-button wire:click="removeProduct({{ $product->id }})" subtle color="black" sm icon="trash" :aria-label="__('sales.sell.remove_named', ['product' => $product->name])" />
|
||||
@@ -600,14 +600,14 @@ new class extends Component
|
||||
</ul>
|
||||
@endif
|
||||
|
||||
<p class="text-lg font-semibold">
|
||||
<p class="flex items-center justify-between gap-2 rounded-lg bg-primary-50 px-3 py-2 text-lg font-semibold text-primary-900 dark:bg-primary-950 dark:text-primary-100">
|
||||
{{ __('sales.sell.total', ['total' => $this->money($this->totalCents)]) }}
|
||||
</p>
|
||||
</section>
|
||||
|
||||
@php($isOrder = $this->isOrder() || $editingOrderId !== null)
|
||||
|
||||
<form wire:submit="save" class="space-y-6" novalidate>
|
||||
<form wire:submit="save" class="card space-y-6" novalidate>
|
||||
@if ($editingOrderId !== null)
|
||||
<div class="flex flex-wrap items-center gap-3 rounded-lg border border-zinc-400 p-3 text-sm dark:border-zinc-500">
|
||||
<x-icon name="pencil" class="size-5 shrink-0" aria-hidden="true" />
|
||||
@@ -669,7 +669,7 @@ new class extends Component
|
||||
<button
|
||||
type="button"
|
||||
wire:click="selectCustomer({{ $customer->id }})"
|
||||
class="w-full rounded-md px-3 py-2 text-left text-sm hover:bg-zinc-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:hover:bg-zinc-700"
|
||||
class="w-full rounded-md px-3 py-2 text-left text-sm hover:bg-zinc-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 dark:hover:bg-zinc-700"
|
||||
aria-label="{{ __('sales.sell.choose_customer', ['name' => $customer->name]) }}"
|
||||
>
|
||||
<span class="font-medium">{{ $customer->name }}</span>
|
||||
|
||||
@@ -118,13 +118,13 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-lg space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-1">
|
||||
<h1 class="text-2xl font-semibold">{{ __('company.title') }}</h1>
|
||||
<x-page-title icon="building-office">{{ __('company.title') }}</x-page-title>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('company.intro') }}</p>
|
||||
</div>
|
||||
|
||||
<p role="status" aria-live="polite" class="text-sm font-medium">{{ $statusMessage }}</p>
|
||||
|
||||
<form wire:submit="save" class="space-y-6" novalidate>
|
||||
<form wire:submit="save" class="card space-y-6" novalidate>
|
||||
<x-input wire:model="name" :label="__('company.fields.name')" autocomplete="organization" required />
|
||||
<x-input wire:model="menu_name" :label="__('company.fields.menu_name')" :hint="__('company.fields.menu_name_hint')" autocomplete="off" />
|
||||
<x-input wire:model="business_id" :label="__('company.fields.business_id')" :hint="__('company.fields.business_id_hint')" autocomplete="off" required />
|
||||
|
||||
@@ -161,7 +161,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-4xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-1">
|
||||
<h1 class="text-2xl font-semibold">{{ __('holidays.title') }}</h1>
|
||||
<x-page-title icon="sun">{{ __('holidays.title') }}</x-page-title>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('holidays.intro') }}</p>
|
||||
<p class="text-sm"><x-link :href="route('settings.company')" navigate>{{ __('company.title') }}</x-link></p>
|
||||
</div>
|
||||
@@ -208,7 +208,7 @@ new class extends Component
|
||||
</x-table>
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="holidays-add-heading" class="space-y-4">
|
||||
<section aria-labelledby="holidays-add-heading" class="card space-y-4">
|
||||
<h2 id="holidays-add-heading" class="text-lg font-semibold">{{ __('holidays.add_heading') }}</h2>
|
||||
|
||||
<form wire:submit="add" class="grid gap-4 sm:grid-cols-[12rem_1fr_auto] sm:items-start" novalidate>
|
||||
|
||||
@@ -128,7 +128,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-5xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl font-semibold">{{ __('time.approvals.title') }}</h1>
|
||||
<x-page-title icon="check-badge">{{ __('time.approvals.title') }}</x-page-title>
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('time.approvals.intro') }}</p>
|
||||
</div>
|
||||
|
||||
@@ -148,7 +148,7 @@ new class extends Component
|
||||
<h2 id="pending-heading" tabindex="-1" class="text-xl font-semibold focus:outline-none">{{ __('time.approvals.pending') }}</h2>
|
||||
|
||||
@if ($this->pending === [])
|
||||
<p class="text-sm">{{ __('time.approvals.none_pending') }}</p>
|
||||
<x-empty-state icon="check-badge">{{ __('time.approvals.none_pending') }}</x-empty-state>
|
||||
@else
|
||||
<x-table :headers="$this->pendingHeaders()" :rows="$this->pending">
|
||||
@interact('column_person', $week)
|
||||
@@ -191,7 +191,7 @@ new class extends Component
|
||||
<h2 id="approved-heading" class="text-xl font-semibold">{{ __('time.approvals.approved') }}</h2>
|
||||
|
||||
@if ($this->approved === [])
|
||||
<p class="text-sm">{{ __('time.approvals.none_approved') }}</p>
|
||||
<x-empty-state icon="check-badge">{{ __('time.approvals.none_approved') }}</x-empty-state>
|
||||
@else
|
||||
<x-table :headers="$this->approvedHeaders()" :rows="$this->approved">
|
||||
@interact('column_person', $week)
|
||||
|
||||
@@ -213,7 +213,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl font-semibold break-words">{{ __('time.task_page.title', ['task' => $task->taskTitle]) }}</h1>
|
||||
<x-page-title icon="clock">{{ __('time.task_page.title', ['task' => $task->taskTitle]) }}</x-page-title>
|
||||
|
||||
<dl class="grid gap-x-6 gap-y-1 text-sm sm:grid-cols-[max-content_1fr]">
|
||||
<dt class="font-medium">{{ __('time.task_page.job') }}</dt>
|
||||
@@ -243,7 +243,7 @@ new class extends Component
|
||||
</form>
|
||||
@endif
|
||||
|
||||
<section aria-labelledby="entries-heading" class="space-y-3">
|
||||
<section aria-labelledby="entries-heading" class="card space-y-3">
|
||||
<h2 id="entries-heading" tabindex="-1" class="text-xl font-semibold focus:outline-none">{{ __('time.task_page.own_entries') }}</h2>
|
||||
|
||||
@if ($this->entries === [])
|
||||
|
||||
@@ -344,7 +344,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-7xl space-y-6 p-4 sm:p-6">
|
||||
<div class="space-y-2">
|
||||
<h1 class="text-2xl font-semibold break-words">{{ $this->heading() }}</h1>
|
||||
<x-page-title icon="clock">{{ $this->heading() }}</x-page-title>
|
||||
@if ($this->isReadOnly())
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('time.other_intro') }}</p>
|
||||
<x-link :href="route('time.approvals')" navigate class="text-sm">{{ __('time.approval.back_to_list') }}</x-link>
|
||||
@@ -366,14 +366,14 @@ new class extends Component
|
||||
<p role="alert" class="text-sm font-medium text-red-700 dark:text-red-400">{{ $errorMessage }}</p>
|
||||
|
||||
@if ($sheet->rows === [])
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('time.no_rows') }}</p>
|
||||
<x-empty-state icon="clock">{{ __('time.no_rows') }}</x-empty-state>
|
||||
@else
|
||||
{{-- Desktop: the whole week as an input grid (a form, so a native table rather than <x-table>). --}}
|
||||
<div class="hidden lg:block">
|
||||
<div class="card hidden lg:block">
|
||||
<table class="w-full border-collapse text-sm">
|
||||
<caption class="sr-only">{{ __('time.table_caption') }}</caption>
|
||||
<thead>
|
||||
<tr class="border-b border-zinc-300 dark:border-zinc-600">
|
||||
<tr class="border-b-2 border-primary-200 text-primary-900 dark:border-primary-800 dark:text-primary-100">
|
||||
<th scope="col" class="py-2 pr-3 text-left font-semibold">{{ __('time.task') }}</th>
|
||||
@foreach ($sheet->days as $day)
|
||||
<th scope="col" class="w-20 px-1 py-2 text-center font-semibold">{{ $this->dayLabel($day) }}</th>
|
||||
@@ -413,7 +413,7 @@ new class extends Component
|
||||
wire:change="saveCell({{ $row->task->taskId }}, '{{ $day }}', $event.target.value)"
|
||||
aria-label="{{ __('time.cell_label', ['task' => $row->task->taskTitle, 'day' => $this->dayLabel($day)]) }}"
|
||||
@error('cells.'.$row->task->taskId.'.'.$day) aria-invalid="true" aria-describedby="cell-{{ $row->task->taskId }}-{{ $day }}-error" @enderror
|
||||
class="w-16 rounded-md border border-zinc-400 bg-white px-2 py-1.5 text-center text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 aria-invalid:border-red-700 dark:border-zinc-500 dark:bg-zinc-900 dark:text-zinc-100 dark:aria-invalid:border-red-400"
|
||||
class="w-16 rounded-md border border-zinc-400 bg-white px-2 py-1.5 text-center text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 aria-invalid:border-red-700 dark:border-zinc-500 dark:bg-zinc-900 dark:text-zinc-100 dark:aria-invalid:border-red-400"
|
||||
/>
|
||||
@error('cells.'.$row->task->taskId.'.'.$day)
|
||||
<p id="cell-{{ $row->task->taskId }}-{{ $day }}-error" class="mt-1 text-xs text-red-700 dark:text-red-400">{{ $message }}</p>
|
||||
@@ -447,7 +447,7 @@ new class extends Component
|
||||
aria-pressed="{{ $day === $selectedDay ? 'true' : 'false' }}"
|
||||
aria-label="{{ __('time.day_button', ['day' => $this->dayLabel($day), 'hours' => $this->hours($sheet->dayTotals[$day])]) }}"
|
||||
@class([
|
||||
'rounded-md border px-2 py-2 text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700',
|
||||
'rounded-md border px-2 py-2 text-sm focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300',
|
||||
'border-primary-700 bg-primary-700 font-semibold text-white' => $day === $selectedDay,
|
||||
'border-zinc-300 bg-white text-zinc-900 dark:border-zinc-600 dark:bg-zinc-900 dark:text-zinc-100' => $day !== $selectedDay,
|
||||
])
|
||||
@@ -460,7 +460,7 @@ new class extends Component
|
||||
|
||||
<ul class="space-y-3">
|
||||
@foreach ($sheet->rows as $row)
|
||||
<li wire:key="mrow-{{ $row->task->taskId }}" class="rounded-lg border border-zinc-200 p-3 text-sm dark:border-zinc-700">
|
||||
<li wire:key="mrow-{{ $row->task->taskId }}" class="rounded-xl border border-zinc-200 bg-white p-3 text-sm shadow-sm dark:border-zinc-700 dark:bg-zinc-900">
|
||||
<x-link :href="route('time.task', $row->task->taskId)" navigate class="font-medium break-words">{{ $row->task->label() }}</x-link>
|
||||
<span class="block text-zinc-600 dark:text-zinc-300">{{ $row->task->workTypeName }}</span>
|
||||
|
||||
@@ -490,7 +490,7 @@ new class extends Component
|
||||
value="{{ $rejected[$row->task->taskId.'.'.$selectedDay] ?? $cells[$row->task->taskId][$selectedDay] ?? '' }}"
|
||||
wire:change="saveCell({{ $row->task->taskId }}, '{{ $selectedDay }}', $event.target.value)"
|
||||
@error('cells.'.$row->task->taskId.'.'.$selectedDay) aria-invalid="true" aria-describedby="mcell-{{ $row->task->taskId }}-{{ $selectedDay }}-error" @enderror
|
||||
class="mt-1 w-24 rounded-md border border-zinc-400 bg-white px-2 py-2 text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 aria-invalid:border-red-700 dark:border-zinc-500 dark:bg-zinc-900 dark:text-zinc-100 dark:aria-invalid:border-red-400"
|
||||
class="mt-1 w-24 rounded-md border border-zinc-400 bg-white px-2 py-2 text-zinc-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 aria-invalid:border-red-700 dark:border-zinc-500 dark:bg-zinc-900 dark:text-zinc-100 dark:aria-invalid:border-red-400"
|
||||
/>
|
||||
@error('cells.'.$row->task->taskId.'.'.$selectedDay)
|
||||
<p id="mcell-{{ $row->task->taskId }}-{{ $selectedDay }}-error" class="mt-1 text-xs text-red-700 dark:text-red-400">{{ $message }}</p>
|
||||
@@ -501,10 +501,10 @@ new class extends Component
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<p class="text-sm font-semibold">{{ __('time.week_total', ['hours' => $this->hours($sheet->totalQuarters)]) }}</p>
|
||||
<p class="inline-flex items-center gap-2 rounded-lg bg-primary-50 px-3 py-2 text-sm font-semibold text-primary-900 dark:bg-primary-950 dark:text-primary-100"><x-icon name="clock" class="size-4" aria-hidden="true" />{{ __('time.week_total', ['hours' => $this->hours($sheet->totalQuarters)]) }}</p>
|
||||
@endif
|
||||
|
||||
<section aria-labelledby="approval-heading" class="space-y-3 rounded-lg border border-zinc-200 p-4 dark:border-zinc-700">
|
||||
<section aria-labelledby="approval-heading" class="card space-y-3">
|
||||
<h2 id="approval-heading" tabindex="-1" class="text-lg font-semibold focus:outline-none">{{ __('time.approval.title') }}</h2>
|
||||
|
||||
@if ($sheet->hasUnapprovedHours())
|
||||
@@ -548,7 +548,7 @@ new class extends Component
|
||||
@endcan
|
||||
|
||||
@unless ($this->isReadOnly())
|
||||
<section aria-labelledby="add-task-heading" class="space-y-2">
|
||||
<section aria-labelledby="add-task-heading" class="card space-y-2">
|
||||
<h2 id="add-task-heading" class="sr-only">{{ __('time.add.search') }}</h2>
|
||||
<x-input
|
||||
id="task-search"
|
||||
@@ -571,7 +571,7 @@ new class extends Component
|
||||
type="button"
|
||||
wire:click="addTask({{ $task->taskId }})"
|
||||
aria-label="{{ __('time.add.choose', ['task' => $task->label()]) }}"
|
||||
class="w-full rounded-md px-3 py-2 text-left text-sm hover:bg-zinc-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:hover:bg-zinc-700"
|
||||
class="w-full rounded-md px-3 py-2 text-left text-sm hover:bg-zinc-100 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 dark:hover:bg-zinc-700"
|
||||
>
|
||||
<span class="font-medium">{{ $task->label() }}</span>
|
||||
<span class="text-zinc-600 dark:text-zinc-300">{{ $task->workTypeName }}</span>
|
||||
|
||||
@@ -57,7 +57,7 @@ new #[Layout('layouts.console')] class extends Component
|
||||
@endif
|
||||
|
||||
<div class="grid gap-6 md:grid-cols-2">
|
||||
<section aria-labelledby="console-login-pin" class="space-y-4 rounded-lg border border-zinc-300 p-4 dark:border-zinc-600">
|
||||
<section aria-labelledby="console-login-pin" class="card space-y-4">
|
||||
<h2 id="console-login-pin" class="text-xl font-semibold">{{ __('users.console_login.with_pin') }}</h2>
|
||||
@if ($this->pinUsers === [])
|
||||
<p>{{ __('users.pin_switch.no_users') }}</p>
|
||||
@@ -69,7 +69,7 @@ new #[Layout('layouts.console')] class extends Component
|
||||
@endif
|
||||
</section>
|
||||
|
||||
<section aria-labelledby="console-login-password" class="space-y-4 rounded-lg border border-zinc-300 p-4 dark:border-zinc-600">
|
||||
<section aria-labelledby="console-login-password" class="card space-y-4">
|
||||
<h2 id="console-login-password" class="text-xl font-semibold">{{ __('users.console_login.with_password') }}</h2>
|
||||
<form wire:submit="loginWithPassword" class="space-y-4" novalidate>
|
||||
<x-input id="console-login-email" wire:model="email" type="email" :label="__('auth.email')" autocomplete="username" required />
|
||||
|
||||
@@ -50,7 +50,9 @@ new class extends Component
|
||||
?>
|
||||
|
||||
<div class="mx-auto max-w-md space-y-6 p-4 sm:p-6 sm:pt-16">
|
||||
<h1 class="text-2xl font-semibold">{{ __('auth.forgot_title') }}</h1>
|
||||
@include('partials.guest-brand')
|
||||
|
||||
<h1 class=\"text-2xl font-semibold\">{{ __('auth.forgot_title') }}</h1>
|
||||
|
||||
<div role="status" aria-live="polite">
|
||||
@if ($linkRequested)
|
||||
@@ -60,7 +62,7 @@ new class extends Component
|
||||
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('auth.forgot_intro') }}</p>
|
||||
|
||||
<form wire:submit="sendLink" class="space-y-6" novalidate>
|
||||
<form wire:submit="sendLink" class="card space-y-6" novalidate>
|
||||
<x-input wire:model="email" type="email" :label="__('auth.email')" autocomplete="username" required />
|
||||
|
||||
<div class="flex flex-wrap items-center justify-between gap-4">
|
||||
|
||||
@@ -123,11 +123,11 @@ new class extends Component
|
||||
?>
|
||||
|
||||
<div class="mx-auto max-w-2xl space-y-6 p-4 sm:p-6">
|
||||
<h1 class="text-2xl font-semibold">
|
||||
<x-page-title icon="user">
|
||||
{{ __($userId === null ? 'users.create_title' : 'users.edit_title') }}
|
||||
</h1>
|
||||
</x-page-title>
|
||||
|
||||
<form wire:submit="save" class="space-y-6" novalidate>
|
||||
<form wire:submit="save" class="card space-y-6" novalidate>
|
||||
<x-input wire:model="form.name" :label="__('users.fields.name')" autocomplete="off" required />
|
||||
|
||||
<x-input wire:model="form.email" type="email" :label="__('users.fields.email')" autocomplete="off" required />
|
||||
|
||||
@@ -83,7 +83,7 @@ new class extends Component
|
||||
|
||||
<div class="mx-auto max-w-5xl space-y-6 p-4 sm:p-6">
|
||||
<div class="flex flex-wrap items-center justify-between gap-4">
|
||||
<h1 class="text-2xl font-semibold">{{ __('users.title') }}</h1>
|
||||
<x-page-title icon="users">{{ __('users.title') }}</x-page-title>
|
||||
|
||||
<x-button :href="route('users.create')" wire:navigate icon="plus" :text="__('users.new')" />
|
||||
</div>
|
||||
@@ -105,7 +105,7 @@ new class extends Component
|
||||
</p>
|
||||
|
||||
@if ($this->users->total() === 0)
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('users.empty') }}</p>
|
||||
<x-empty-state icon="users">{{ __('users.empty') }}</x-empty-state>
|
||||
@else
|
||||
<x-table :headers="$this->headers()" :rows="$this->users" paginate>
|
||||
@interact('column_name', $user)
|
||||
|
||||
@@ -37,7 +37,9 @@ new class extends Component
|
||||
?>
|
||||
|
||||
<div class="mx-auto max-w-md space-y-6 p-4 sm:p-6 sm:pt-16">
|
||||
<h1 class="text-2xl font-semibold">{{ __('auth.login_title') }}</h1>
|
||||
@include('partials.guest-brand')
|
||||
|
||||
<h1 class=\"text-2xl font-semibold\">{{ __('auth.login_title') }}</h1>
|
||||
|
||||
@if ($accessEnded)
|
||||
<x-alert role="status" color="yellow" light icon="exclamation-triangle" :text="__('auth.account_disabled')" />
|
||||
@@ -45,7 +47,7 @@ new class extends Component
|
||||
<x-alert role="status" color="green" light icon="information-circle" :text="session('status')" />
|
||||
@endif
|
||||
|
||||
<form wire:submit="login" class="space-y-6" novalidate>
|
||||
<form wire:submit="login" class="card space-y-6" novalidate>
|
||||
<x-input
|
||||
wire:model="email"
|
||||
type="email"
|
||||
|
||||
@@ -45,7 +45,7 @@ new class extends Component
|
||||
?>
|
||||
|
||||
@php
|
||||
$touch = 'inline-flex min-h-11 min-w-11 items-center justify-center gap-2 rounded-lg px-4 py-2 font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:focus-visible:outline-blue-400';
|
||||
$touch = 'inline-flex min-h-11 min-w-11 items-center justify-center gap-2 rounded-lg px-4 py-2 font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300';
|
||||
@endphp
|
||||
|
||||
<div>
|
||||
@@ -71,7 +71,7 @@ new class extends Component
|
||||
<form method="POST" action="{{ route('console.logout') }}" class="mt-4 border-t border-zinc-300 pt-3 dark:border-zinc-600">
|
||||
@csrf
|
||||
<input type="hidden" name="return_to" value="{{ $returnTo }}">
|
||||
<button type="submit" class="text-sm font-medium text-primary-700 underline hover:no-underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-700 dark:text-primary-300">{{ __('users.pin_switch.with_password') }}</button>
|
||||
<button type="submit" class="text-sm font-medium text-primary-700 underline hover:no-underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-600 dark:focus-visible:outline-primary-300 dark:text-primary-300">{{ __('users.pin_switch.with_password') }}</button>
|
||||
</form>
|
||||
|
||||
<x-slot:actions>
|
||||
|
||||
@@ -116,7 +116,7 @@ new class extends Component
|
||||
?>
|
||||
|
||||
<div class="mx-auto max-w-md space-y-6 p-4 sm:p-6">
|
||||
<h1 class="text-2xl font-semibold">{{ __('users.pin.title') }}</h1>
|
||||
<x-page-title icon="key">{{ __('users.pin.title') }}</x-page-title>
|
||||
|
||||
<p class="text-sm">{{ __('users.pin.intro') }}</p>
|
||||
|
||||
@@ -124,7 +124,7 @@ new class extends Component
|
||||
{{ $message !== '' ? $message : (app(LoginPins::class)->has((int) auth()->id()) ? __('users.pin.is_set') : __('users.pin.not_set')) }}
|
||||
</p>
|
||||
|
||||
<form wire:submit="save" class="space-y-4" novalidate>
|
||||
<form wire:submit="save" class="card space-y-4" novalidate>
|
||||
<x-password-field id="current-password" wire:model="currentPassword" :label="__('users.pin.current_password')" autocomplete="current-password" />
|
||||
<x-input id="pin" wire:model="pin" type="password" inputmode="numeric" maxlength="6" :label="__('users.pin.pin')" :hint="__('users.pin.pin_hint')" autocomplete="off" />
|
||||
<x-input id="pin-confirmation" wire:model="pinConfirmation" type="password" inputmode="numeric" maxlength="6" :label="__('users.pin.pin_confirmation')" autocomplete="off" />
|
||||
|
||||
@@ -94,11 +94,13 @@ new class extends Component
|
||||
?>
|
||||
|
||||
<div class="mx-auto max-w-md space-y-6 p-4 sm:p-6 sm:pt-16">
|
||||
<h1 class="text-2xl font-semibold">{{ __('auth.reset_title') }}</h1>
|
||||
@include('partials.guest-brand')
|
||||
|
||||
<h1 class=\"text-2xl font-semibold\">{{ __('auth.reset_title') }}</h1>
|
||||
|
||||
<p class="text-sm text-zinc-600 dark:text-zinc-300">{{ __('auth.reset_intro') }}</p>
|
||||
|
||||
<form wire:submit="resetPassword" class="space-y-6" novalidate>
|
||||
<form wire:submit="resetPassword" class="card space-y-6" novalidate>
|
||||
<x-input wire:model="email" type="email" :label="__('auth.email')" autocomplete="username" required />
|
||||
|
||||
<x-password-field
|
||||
|
||||
Reference in New Issue
Block a user