with pagination nwo with the proper view selection

This commit is contained in:
Mark Gregory
2026-07-01 13:20:48 +01:00
parent 9f68eb288e
commit 6a94be9dab
2 changed files with 21 additions and 24 deletions
+11 -9
View File
@@ -1,6 +1,6 @@
<x-layouts.app :title="__('Module Control')"> <x-layouts.app :title="__('Module Control')">
<div class="overflow-hidden rounded-[1.75rem] border border-zinc-800 bg-gradient-to-r from-slate-950 via-blue-950 to-cyan-700 px-6 py-8 shadow-sm sm:px-8 lg:px-10"> <div class="overflow-hidden rounded-[1.75rem] border border-zinc-800 bg-gradient-to-r from-slate-950 via-blue-950 to-cyan-700 px-6 py-8 shadow-sm sm:px-8 lg:px-10">
<div class="flex items-center justify-between gap-8"> <div class="flex flex-col gap-6 lg:flex-row lg:items-center lg:justify-between">
<div class="min-w-0"> <div class="min-w-0">
<p class="text-[0.72rem] font-black uppercase tracking-[0.32em] text-cyan-300">MPBA WMS</p> <p class="text-[0.72rem] font-black uppercase tracking-[0.32em] text-cyan-300">MPBA WMS</p>
<h1 class="mt-4 text-4xl font-black tracking-tight text-white sm:text-5xl">Module Control</h1> <h1 class="mt-4 text-4xl font-black tracking-tight text-white sm:text-5xl">Module Control</h1>
@@ -9,10 +9,12 @@
</p> </p>
</div> </div>
<div class="hidden shrink-0 lg:flex"> <div class="hidden shrink-0 items-center gap-5 lg:flex lg:justify-end">
<span class="inline-flex h-24 w-24 items-center justify-center rounded-2xl bg-white/15 text-white ring-1 ring-white/15 shadow-sm backdrop-blur"> <div class="h-16 w-px bg-white/15"></div>
<i class="fa-solid fa-puzzle-piece text-4xl" aria-hidden="true"></i>
</span> <div class="inline-flex h-20 w-20 items-center justify-center rounded-2xl border border-cyan-300/20 bg-white/10 text-emerald-300 shadow-sm ring-1 ring-white/10 backdrop-blur">
<i class="fa-solid fa-puzzle-piece text-3xl" aria-hidden="true"></i>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -109,7 +111,7 @@
<form method="POST" action="{{ route('modules.control.sync') }}"> <form method="POST" action="{{ route('modules.control.sync') }}">
@csrf @csrf
<button type="submit" class="rounded-xl border border-zinc-300 px-4 py-2 text-sm font-semibold text-zinc-800 hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-100 dark:hover:bg-zinc-800"> <button type="submit" class="rounded-xl border border-zinc-700 bg-zinc-950 px-4 py-2 text-sm font-semibold text-zinc-100 shadow-sm transition hover:border-zinc-600 hover:bg-zinc-800 hover:text-white focus:outline-none focus:ring-2 focus:ring-zinc-600/40">
Sync Database Sync Database
</button> </button>
</form> </form>
@@ -120,7 +122,7 @@
@foreach ($secondaryFilters as $key => $label) @foreach ($secondaryFilters as $key => $label)
<a <a
href="{{ route('modules.control.index', array_filter(['filter' => $key, 'search' => $search, 'sort' => $sort === 'order' ? null : $sort])) }}" href="{{ route('modules.control.index', array_filter(['filter' => $key, 'search' => $search, 'sort' => $sort === 'order' ? null : $sort])) }}"
class="rounded-full border px-3 py-1 text-xs font-semibold transition {{ $filter === $key ? 'border-blue-500/40 bg-blue-500/10 text-blue-700 dark:text-blue-300' : 'border-zinc-300 text-zinc-600 hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800' }}" class="rounded-full border px-3 py-1 text-xs font-semibold transition {{ $filter === $key ? 'border-blue-500/40 bg-blue-500/10 text-blue-700 dark:text-blue-300' : 'border-zinc-700 bg-zinc-950/70 text-zinc-300 hover:border-zinc-600 hover:bg-zinc-800 hover:text-white' }}"
> >
{{ $label }} {{ $label }}
</a> </a>
@@ -156,7 +158,7 @@
<option value="enable">Enable selected</option> <option value="enable">Enable selected</option>
<option value="disable">Disable selected</option> <option value="disable">Disable selected</option>
</select> </select>
<button type="submit" class="rounded-xl border border-zinc-300 px-4 py-2 text-sm font-semibold text-zinc-800 hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-100 dark:hover:bg-zinc-800"> <button type="submit" class="rounded-xl border border-zinc-700 bg-zinc-950 px-4 py-2 text-sm font-semibold text-zinc-100 shadow-sm transition hover:border-zinc-600 hover:bg-zinc-800 hover:text-white focus:outline-none focus:ring-2 focus:ring-zinc-600/40">
Apply Apply
</button> </button>
</div> </div>
@@ -232,7 +234,7 @@
</td> </td>
<td class="px-4 py-4"> <td class="px-4 py-4">
<div class="flex justify-end gap-2"> <div class="flex justify-end gap-2">
<a href="{{ route('modules.control.show', $module['name']) }}" class="inline-flex items-center justify-center rounded-lg border border-emerald-500/40 bg-emerald-600 px-3 py-1.5 text-sm font-semibold text-white shadow-sm transition hover:border-emerald-400 hover:bg-emerald-700 hover:text-white focus:outline-none focus:ring-2 focus:ring-emerald-400/40 dark:border-emerald-500/40 dark:bg-emerald-600 dark:text-white dark:hover:border-emerald-400 dark:hover:bg-emerald-500 dark:hover:text-white">View</a> <a href="{{ route('modules.control.show', $module['name']) }}" class="inline-flex items-center justify-center rounded-lg border border-emerald-400/40 bg-emerald-600 px-3 py-1.5 text-sm font-semibold !text-white shadow-sm transition hover:border-emerald-300/60 hover:!bg-emerald-500 hover:!text-white focus:outline-none focus:ring-2 focus:ring-emerald-400/50">View</a>
@if ($module['enabled']) @if ($module['enabled'])
<button type="submit" formaction="{{ route('modules.control.disable', $module['name']) }}" class="rounded-lg border border-red-500/40 bg-red-600 px-3 py-1.5 text-sm font-semibold text-white hover:bg-red-700" @disabled(! $module['can_disable'])> <button type="submit" formaction="{{ route('modules.control.disable', $module['name']) }}" class="rounded-lg border border-red-500/40 bg-red-600 px-3 py-1.5 text-sm font-semibold text-white hover:bg-red-700" @disabled(! $module['can_disable'])>
Disable Disable
+10 -15
View File
@@ -1,31 +1,26 @@
<x-layouts.app :title="$module['name'].' Module'"> <x-layouts.app :title="$module['name'].' Module'">
<div class="overflow-hidden rounded-[1.75rem] border border-zinc-800 bg-gradient-to-r from-slate-950 via-blue-950 to-cyan-700 px-6 py-8 shadow-sm sm:px-8 lg:px-10"> <div class="overflow-hidden rounded-[1.75rem] border border-zinc-800 bg-gradient-to-r from-slate-950 via-blue-950 to-cyan-700 px-6 py-8 shadow-sm sm:px-8 lg:px-10">
<div class="flex items-center justify-between gap-8"> <div class="flex flex-col gap-6 lg:flex-row lg:items-center lg:justify-between">
<div class="min-w-0"> <div class="min-w-0">
<p class="text-[0.72rem] font-black uppercase tracking-[0.32em] text-cyan-300">Module Control</p> <p class="text-[0.72rem] font-black uppercase tracking-[0.32em] text-cyan-300">Module Control</p>
<h1 class="mt-4 text-4xl font-black tracking-tight text-white sm:text-5xl">{{ $module['name'] }} Module</h1> <h1 class="mt-4 text-4xl font-black tracking-tight text-white sm:text-5xl">{{ $module['name'] }} Module</h1>
<p class="mt-4 max-w-3xl text-base font-medium leading-7 text-slate-200 sm:text-lg"> <p class="mt-4 max-w-3xl text-base font-medium leading-7 text-slate-200 sm:text-lg">
Database metadata, dependencies, developer information and activation controls. Database metadata, dependencies, developer information and activation controls.
</p> </p>
</div> </div>
<div class="hidden shrink-0 lg:flex lg:flex-col lg:items-end lg:gap-4"> <div class="flex shrink-0 items-center gap-5 lg:justify-end">
<a href="{{ route('modules.control.index') }}" wire:navigate class="inline-flex items-center justify-center rounded-xl border border-emerald-500/40 bg-emerald-600 px-4 py-2 text-sm font-bold text-white shadow-sm transition hover:border-emerald-400 hover:bg-emerald-700 hover:text-white focus:outline-none focus:ring-2 focus:ring-emerald-400/50"> <a href="{{ route('modules.control.index') }}" wire:navigate
<i class="fa-solid fa-arrow-left mr-2 text-xs" aria-hidden="true"></i> class="inline-flex min-h-12 items-center justify-center gap-3 rounded-2xl border border-emerald-300/40 bg-emerald-600 px-6 py-3 text-sm font-black text-white shadow-lg shadow-emerald-950/30 ring-1 ring-emerald-300/20 transition hover:border-emerald-200/60 hover:bg-emerald-500 hover:text-white focus:outline-none focus:ring-2 focus:ring-emerald-300/70">
Back to Module Control <i class="fa-solid fa-arrow-left text-sm" aria-hidden="true"></i>
<span>{{ __('Back to Module Control') }}</span>
</a> </a>
<span class="inline-flex h-24 w-24 items-center justify-center rounded-2xl bg-white/15 text-white ring-1 ring-white/15 shadow-sm backdrop-blur"> <div class="hidden h-16 w-px bg-white/15 lg:block"></div>
<i class="fa-solid {{ $module['icon'] ?: 'fa-puzzle-piece' }} text-4xl" aria-hidden="true"></i>
</span>
</div>
<div class="mt-5 flex lg:hidden"> <div class="hidden h-20 w-20 items-center justify-center rounded-2xl border border-cyan-300/20 bg-white/10 text-emerald-300 shadow-sm ring-1 ring-white/10 backdrop-blur lg:inline-flex">
<a href="{{ route('modules.control.index') }}" wire:navigate class="inline-flex items-center justify-center rounded-xl border border-emerald-500/40 bg-emerald-600 px-4 py-2 text-sm font-bold text-white shadow-sm transition hover:border-emerald-400 hover:bg-emerald-700 hover:text-white focus:outline-none focus:ring-2 focus:ring-emerald-400/50"> <i class="fa-solid {{ $module['icon'] ?: 'fa-puzzle-piece' }} text-3xl" aria-hidden="true"></i>
<i class="fa-solid fa-arrow-left mr-2 text-xs" aria-hidden="true"></i> </div>
Back to Module Control
</a>
</div> </div>
</div> </div>
</div> </div>