with pagination nwo with the proper view selection
This commit is contained in:
@@ -1,9 +1,21 @@
|
|||||||
<x-layouts.app :title="__('Module Control')">
|
<x-layouts.app :title="__('Module Control')">
|
||||||
<x-dynamic-component
|
<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">
|
||||||
:component="config('modules.admin.hero_component', 'wms.page-hero')"
|
<div class="flex items-center justify-between gap-8">
|
||||||
title="Module Control"
|
<div class="min-w-0">
|
||||||
subtitle="Manage installed modules, database metadata, dependencies and activation state."
|
<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>
|
||||||
|
<p class="mt-4 max-w-3xl text-base font-medium leading-7 text-slate-200 sm:text-lg">
|
||||||
|
Manage installed modules, database metadata, dependencies and activation state.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="hidden shrink-0 lg:flex">
|
||||||
|
<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">
|
||||||
|
<i class="fa-solid fa-puzzle-piece text-4xl" aria-hidden="true"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
@php
|
@php
|
||||||
$filterCards = [
|
$filterCards = [
|
||||||
@@ -39,46 +51,6 @@
|
|||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
<div class="overflow-hidden rounded-2xl border border-zinc-200 bg-white shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
|
|
||||||
<div class="grid gap-0 lg:grid-cols-[minmax(0,1fr)_22rem]">
|
|
||||||
<div class="p-5 sm:p-6">
|
|
||||||
<p class="text-[0.68rem] font-black uppercase tracking-[0.18em] text-blue-600 dark:text-blue-300">Module operations</p>
|
|
||||||
<h2 class="mt-2 text-xl font-extrabold tracking-tight text-zinc-950 dark:text-zinc-100">Runtime control centre</h2>
|
|
||||||
<p class="mt-2 max-w-3xl text-sm leading-6 text-zinc-600 dark:text-zinc-400">
|
|
||||||
Search, filter and safely manage database-backed module activation without changing module.json metadata on disk.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="mt-4 grid gap-3 sm:grid-cols-3">
|
|
||||||
<div class="rounded-xl border border-blue-500/20 bg-blue-500/10 px-3 py-2 text-sm font-semibold text-blue-700 dark:text-blue-200">
|
|
||||||
<i class="fa-solid fa-database mr-2" aria-hidden="true"></i>
|
|
||||||
Database state
|
|
||||||
</div>
|
|
||||||
<div class="rounded-xl border border-emerald-500/20 bg-emerald-500/10 px-3 py-2 text-sm font-semibold text-emerald-700 dark:text-emerald-200">
|
|
||||||
<i class="fa-solid fa-shield-halved mr-2" aria-hidden="true"></i>
|
|
||||||
Safe toggles
|
|
||||||
</div>
|
|
||||||
<div class="rounded-xl border border-violet-500/20 bg-violet-500/10 px-3 py-2 text-sm font-semibold text-violet-700 dark:text-violet-200">
|
|
||||||
<i class="fa-solid fa-code-branch mr-2" aria-hidden="true"></i>
|
|
||||||
Dependency view
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="relative hidden min-h-48 overflow-hidden border-l border-zinc-200 bg-gradient-to-br from-slate-950 via-blue-950 to-cyan-900 dark:border-zinc-800 lg:block">
|
|
||||||
<div class="absolute inset-0 opacity-30" style="background-image: radial-gradient(circle at 20% 20%, rgba(34,211,238,.55), transparent 28%), radial-gradient(circle at 80% 30%, rgba(59,130,246,.45), transparent 26%), radial-gradient(circle at 50% 85%, rgba(16,185,129,.35), transparent 30%);"></div>
|
|
||||||
<div class="relative flex h-full items-center justify-center p-6">
|
|
||||||
<div class="grid grid-cols-3 gap-3">
|
|
||||||
@foreach (['fa-puzzle-piece', 'fa-database', 'fa-toggle-on', 'fa-code-branch', 'fa-shield-halved', 'fa-chart-simple'] as $graphicIcon)
|
|
||||||
<div class="flex h-16 w-16 items-center justify-center rounded-2xl bg-white/10 text-white ring-1 ring-white/20 shadow-xl backdrop-blur">
|
|
||||||
<i class="fa-solid {{ $graphicIcon }} text-xl" aria-hidden="true"></i>
|
|
||||||
</div>
|
|
||||||
@endforeach
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="grid gap-4 md:grid-cols-2 xl:grid-cols-5">
|
<div class="grid gap-4 md:grid-cols-2 xl:grid-cols-5">
|
||||||
@foreach ($filterCards as $card)
|
@foreach ($filterCards as $card)
|
||||||
<a
|
<a
|
||||||
@@ -137,7 +109,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-50 dark:border-zinc-700 dark:text-zinc-100 dark:hover:bg-zinc-800">
|
<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">
|
||||||
Sync Database
|
Sync Database
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
@@ -148,14 +120,14 @@
|
|||||||
@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-50 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-300 text-zinc-600 hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800' }}"
|
||||||
>
|
>
|
||||||
{{ $label }}
|
{{ $label }}
|
||||||
</a>
|
</a>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
@if ($filter !== 'all' || $search !== '')
|
@if ($filter !== 'all' || $search !== '')
|
||||||
<a href="{{ route('modules.control.index') }}" class="rounded-full border border-zinc-300 px-3 py-1 text-xs font-semibold text-zinc-600 hover:bg-zinc-50 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800">
|
<a href="{{ route('modules.control.index') }}" class="rounded-full border border-zinc-300 px-3 py-1 text-xs font-semibold text-zinc-600 hover:bg-zinc-100 dark:border-zinc-700 dark:text-zinc-300 dark:hover:bg-zinc-800">
|
||||||
Clear filters
|
Clear filters
|
||||||
</a>
|
</a>
|
||||||
@endif
|
@endif
|
||||||
@@ -184,7 +156,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-50 dark:border-zinc-700 dark:text-zinc-100 dark:hover:bg-zinc-800">
|
<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">
|
||||||
Apply
|
Apply
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -207,7 +179,7 @@
|
|||||||
|
|
||||||
<tbody class="divide-y divide-zinc-200 dark:divide-zinc-800">
|
<tbody class="divide-y divide-zinc-200 dark:divide-zinc-800">
|
||||||
@forelse ($modules as $module)
|
@forelse ($modules as $module)
|
||||||
<tr class="align-top transition hover:!bg-zinc-900/40 dark:hover:!bg-zinc-900/40">
|
<tr class="align-top transition hover:!bg-zinc-100/70 dark:hover:!bg-zinc-800/45">
|
||||||
<td class="px-4 py-4">
|
<td class="px-4 py-4">
|
||||||
<input type="checkbox" name="modules[]" value="{{ $module['name'] }}" class="rounded border-zinc-300 text-blue-600 focus:ring-blue-500 dark:border-zinc-700 dark:bg-zinc-950" />
|
<input type="checkbox" name="modules[]" value="{{ $module['name'] }}" class="rounded border-zinc-300 text-blue-600 focus:ring-blue-500 dark:border-zinc-700 dark:bg-zinc-950" />
|
||||||
</td>
|
</td>
|
||||||
@@ -260,7 +232,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="rounded-lg border border-zinc-700 bg-zinc-950/40 px-3 py-1.5 text-sm font-semibold text-zinc-100 transition hover:!border-blue-500/60 hover:!bg-blue-500/10 hover:!text-white focus:outline-none focus:ring-2 focus:ring-blue-500/30">View</a>
|
<a href="{{ route('modules.control.show', $module['name']) }}" class="rounded-lg border border-zinc-300 bg-white px-3 py-1.5 text-sm font-semibold text-zinc-800 shadow-sm transition hover:!border-blue-500/60 hover:!bg-blue-50 hover:!text-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500/30 dark:border-zinc-700 dark:bg-zinc-950/40 dark:text-zinc-100 dark:hover:!border-blue-500/60 dark:hover:!bg-blue-500/10 dark:hover:!text-white">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
|
||||||
|
|||||||
@@ -1,15 +1,25 @@
|
|||||||
<x-layouts.app :title="$module['name'].' Module'">
|
<x-layouts.app :title="$module['name'].' Module'">
|
||||||
<x-dynamic-component
|
<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">
|
||||||
:component="config('modules.admin.hero_component', 'wms.page-hero')"
|
<div class="flex items-center justify-between gap-8">
|
||||||
:title="$module['name'].' Module'"
|
<div class="min-w-0">
|
||||||
subtitle="Database metadata, dependencies, developer information and activation controls."
|
<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>
|
||||||
|
<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.
|
||||||
|
</p>
|
||||||
|
|
||||||
<div class="mt-4 flex justify-end">
|
<a href="{{ route('modules.control.index') }}" wire:navigate class="mt-5 inline-flex items-center justify-center rounded-xl bg-white/15 px-4 py-2 text-sm font-bold text-white ring-1 ring-white/20 shadow-sm transition hover:bg-white/25 focus:outline-none focus:ring-2 focus:ring-white/40">
|
||||||
<a href="{{ route('modules.control.index') }}" wire:navigate class="inline-flex items-center justify-center rounded-xl border border-zinc-300 bg-white px-4 py-2 text-sm font-bold text-zinc-800 shadow-sm transition hover:border-blue-500/50 hover:bg-blue-50 hover:text-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500/30 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:border-blue-500/60 dark:hover:bg-blue-500/10 dark:hover:text-white">
|
<i class="fa-solid fa-arrow-left mr-2 text-xs" aria-hidden="true"></i>
|
||||||
<i class="fa-solid fa-arrow-left mr-2 text-xs" aria-hidden="true"></i>
|
Back to Module Control
|
||||||
Back to Module Control
|
</a>
|
||||||
</a>
|
</div>
|
||||||
|
|
||||||
|
<div class="hidden shrink-0 lg:flex">
|
||||||
|
<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">
|
||||||
|
<i class="fa-solid {{ $module['icon'] ?: 'fa-puzzle-piece' }} text-4xl" aria-hidden="true"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@php
|
@php
|
||||||
@@ -31,44 +41,6 @@
|
|||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
<div class="overflow-hidden rounded-2xl border border-zinc-200 bg-white shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
|
|
||||||
<div class="grid gap-0 lg:grid-cols-[minmax(0,1fr)_20rem]">
|
|
||||||
<div class="p-5 sm:p-6">
|
|
||||||
<div class="flex items-start gap-4">
|
|
||||||
<span class="inline-flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl border border-blue-500/20 bg-blue-500/10 text-blue-700 shadow-sm dark:text-blue-300">
|
|
||||||
<i class="fa-solid {{ $module['icon'] ?: 'fa-puzzle-piece' }} text-xl" aria-hidden="true"></i>
|
|
||||||
</span>
|
|
||||||
<div class="min-w-0">
|
|
||||||
<p class="text-[0.68rem] font-black uppercase tracking-[0.18em] text-blue-600 dark:text-blue-300">Module profile</p>
|
|
||||||
<h2 class="mt-1 text-xl font-extrabold tracking-tight text-zinc-950 dark:text-zinc-100">{{ $module['name'] }} control overview</h2>
|
|
||||||
<p class="mt-2 max-w-3xl text-sm leading-6 text-zinc-600 dark:text-zinc-400">
|
|
||||||
Review database-only metadata, activation state, dependencies, developer files and documentation for this module.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="relative hidden min-h-40 overflow-hidden border-l border-zinc-200 bg-gradient-to-br from-slate-950 via-blue-950 to-emerald-900 dark:border-zinc-800 lg:block">
|
|
||||||
<div class="absolute inset-0 opacity-35" style="background-image: radial-gradient(circle at 30% 25%, rgba(34,211,238,.55), transparent 28%), radial-gradient(circle at 72% 70%, rgba(16,185,129,.45), transparent 30%);"></div>
|
|
||||||
<div class="relative flex h-full items-center justify-center p-6">
|
|
||||||
<div class="flex items-center gap-3">
|
|
||||||
<div class="flex h-16 w-16 items-center justify-center rounded-2xl bg-white/10 text-white ring-1 ring-white/20 shadow-xl backdrop-blur">
|
|
||||||
<i class="fa-solid {{ $module['icon'] ?: 'fa-puzzle-piece' }} text-xl" aria-hidden="true"></i>
|
|
||||||
</div>
|
|
||||||
<div class="h-px w-10 bg-white/30"></div>
|
|
||||||
<div class="flex h-14 w-14 items-center justify-center rounded-2xl bg-white/10 text-white ring-1 ring-white/20 shadow-xl backdrop-blur">
|
|
||||||
<i class="fa-solid fa-database" aria-hidden="true"></i>
|
|
||||||
</div>
|
|
||||||
<div class="h-px w-10 bg-white/30"></div>
|
|
||||||
<div class="flex h-14 w-14 items-center justify-center rounded-2xl bg-white/10 text-white ring-1 ring-white/20 shadow-xl backdrop-blur">
|
|
||||||
<i class="fa-solid {{ $module['enabled'] ? 'fa-toggle-on' : 'fa-toggle-off' }}" aria-hidden="true"></i>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="grid gap-4 lg:grid-cols-4">
|
<div class="grid gap-4 lg:grid-cols-4">
|
||||||
<div class="rounded-2xl border border-zinc-200 bg-white p-5 shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
|
<div class="rounded-2xl border border-zinc-200 bg-white p-5 shadow-sm dark:border-zinc-800 dark:bg-zinc-900">
|
||||||
<div class="flex items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
|
|||||||
Reference in New Issue
Block a user