Darken the dark canvas, add customer colours, the ongoing status and the board model
- Dark theme page background is #5a5e60; text on it is lifted to zinc-200 / primary-100 and TallStackUI's dark labels, hints and checkbox labels are lightened so everything stays at 4.5:1. - Shared HexColor picks white or black text by the higher WCAG contrast; a native-dialog colour picker and a large work dialog component. - Customers get a header colour (customers.header_color), set on the customer page. - New job status Jatkuvat / Kausi (ongoing): open, never late, billed monthly like running jobs. - Kanban model: board columns and views, urgent threshold, per-user board preferences (density, column colours and sort), card positions, tasks of continuing jobs pinned to the board, MoveBoardCard and board queries with logged hours from TimeTracking. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -5,6 +5,7 @@ use App\Modules\Customers\Application\DTOs\BillingUnitSummary;
|
||||
use App\Modules\Customers\Application\DTOs\ContactSummary;
|
||||
use App\Modules\Customers\Application\DTOs\CustomerSummary;
|
||||
use App\Modules\Customers\Application\Services\CustomerRemoval;
|
||||
use App\Modules\Customers\Application\UseCases\ChangeCustomerHeaderColor;
|
||||
use App\Modules\Customers\Application\UseCases\RemoveBillingUnit;
|
||||
use App\Modules\Customers\Application\UseCases\RemoveContact;
|
||||
use App\Modules\Customers\Application\UseCases\RemoveCustomer;
|
||||
@@ -16,6 +17,7 @@ use App\Modules\Customers\Domain\Exceptions\CustomerInUse;
|
||||
use App\Modules\Customers\Domain\Exceptions\CustomerNotFound;
|
||||
use App\Modules\Customers\Domain\Exceptions\InternalCustomerCannotBeRemoved;
|
||||
use App\Modules\Customers\Domain\Enums\CustomerType;
|
||||
use App\Modules\Shared\Domain\Exceptions\InvalidHexColor;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Livewire\Attributes\Computed;
|
||||
use Livewire\Attributes\Locked;
|
||||
@@ -71,6 +73,27 @@ new class extends Component
|
||||
return $this->customerQueries->findSummary($this->customerId) ?? abort(404);
|
||||
}
|
||||
|
||||
/**
|
||||
* The colour picker's "Use colour", or "Restore default colour" with null.
|
||||
*/
|
||||
public function setHeaderColor(?string $color, ChangeCustomerHeaderColor $changeColor): void
|
||||
{
|
||||
$this->authorize('customers.use');
|
||||
|
||||
try {
|
||||
$changeColor->execute($this->customerId, $color);
|
||||
} catch (InvalidHexColor) {
|
||||
$this->statusMessage = __('customers.errors.invalid_header_color');
|
||||
|
||||
return;
|
||||
} catch (CustomerNotFound) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
unset($this->customer);
|
||||
$this->statusMessage = __('customers.header_color_saved');
|
||||
}
|
||||
|
||||
/**
|
||||
* The personal identity code as this user may see it: in full for admins
|
||||
* and management, masked for others. Computed, so the full code is never
|
||||
@@ -211,7 +234,7 @@ 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">
|
||||
<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-100 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">
|
||||
@@ -227,6 +250,14 @@ new class extends Component
|
||||
:text="__('customers.edit_details')"
|
||||
/>
|
||||
|
||||
<x-button
|
||||
subtle
|
||||
color="black"
|
||||
icon="swatch"
|
||||
:text="__('customers.fields.header_color')"
|
||||
x-on:click="$dispatch('color-picker:open', {{ Js::from(['id' => 'colour-picker', 'title' => __('customers.header_color_title', ['name' => $this->customer->name]), 'color' => $this->customer->headerColor ?? '#23476a', 'method' => 'setHeaderColor', 'args' => [], 'resettable' => $this->customer->headerColor !== null]) }})"
|
||||
/>
|
||||
|
||||
@if ($this->canBeRemoved)
|
||||
<x-button
|
||||
wire:click="confirmRemoval('customer', {{ $customerId }})"
|
||||
@@ -317,7 +348,7 @@ new class extends Component
|
||||
@endif
|
||||
|
||||
@if ($contact->note !== null)
|
||||
<p class="whitespace-pre-line text-zinc-600 dark:text-zinc-300">{{ $contact->note }}</p>
|
||||
<p class="whitespace-pre-line text-zinc-600 dark:text-zinc-200">{{ $contact->note }}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@@ -430,4 +461,6 @@ new class extends Component
|
||||
<x-button wire:click="remove" color="red" icon="trash" :text="__('customers.remove')" />
|
||||
</x-slot:actions>
|
||||
</x-confirm-dialog>
|
||||
|
||||
<x-color-picker />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user