AI Review Center
Commit Review Workspace ?
Select a commit on the left to inspect quality, security, business value, findings, and suggested code changes.
Project AI Score
?
68%
Quality Avg
?
74%
Security Avg
?
54%
Reviews
?
7
Review Result ?
jattin01/antfast-dashboard · 63a00bcb
This commit adds multiple Laravel controllers and an export class for financial records, providing features like data filtering, export to PDF and Excel, and UI data provisioning. The code is mostly well-structured and adheres to typical Laravel practices. However, there is no explicit handling for invalid date inputs beyond validation, no authorization checks, and the commit message is uninformative.
Quality
?
85%
Security
?
40%
Business Value
?
75%
Maintainability
?
83%
Issues & Suggested Fixes
?
1AI detects the issue
2Shows file, line, or evidence
3Suggests the fix to apply
Issue
Where
commit message
Issue / Evidence
issue
Suggested Fix
provide a descriptive commit message explaining the changes and their purpose
Missing Validation
Where
app/Http/Controllers/FinanceController.php:43
Issue / Evidence
validation limited to only 'nullable' and 'date'; consider stricter validation or sanitization to increase security and reduce potential bugs
Suggested Fix
enhance validation rules for date inputs or add error handling
Filterrows Method Uses Date Parsing Withou...
Where
app/Http/Controllers/FinanceController.php:56
Issue / Evidence
filterRows method uses date parsing without exception handling; if data is malformed, could cause runtime errors
Suggested Fix
add error handling to date parsing in the filterRows method
Security Issue
Where
app/Http/Controllers/FinanceController.php
Issue / Evidence
no authorization checks present on exported data or viewing methods
Suggested Fix
implement authorization to restrict access to sensitive finance data
Map Method Assumes All Keys Exist In $Row;...
Where
app/Exports/FinanceRecordsExport.php:30
Issue / Evidence
map method assumes all keys exist in $row; missing keys could cause undefined index errors
Suggested Fix
add checks or defaults to map method to handle missing or malformed data
File Lacks A Header Docblock Describing Pu...
Where
app/Exports/FinanceRecordsExport.php:1
Issue / Evidence
file lacks a header docblock describing purpose and usage
Suggested Fix
add file and class docblocks for clarity and maintainability
Uses Demodata Static Methods, Which May Be...
Where
app/Http/Controllers/ApprovalWorkflowController.php
Issue / Evidence
uses DemoData static methods, which may be demo stubs rather than production data
Suggested Fix
replace DemoData usage with actual data source or document this is intended for demo purposes
Code Change Preview · app/Exports/FinanceRecordsExport.php
?
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Exports; + + use Illuminate\Support\Carbon; + use Maatwebsite\Excel\Concerns\FromArray; + use Maatwebsite\Excel\Concerns\ShouldAutoSize; + use Maatwebsite\Excel\Concerns\WithHeadings; + use Maatwebsite\Excel\Concerns\WithMapping; + use Maatwebsite\Excel\Concerns\WithStyles; + use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet; + + class FinanceRecordsExport implements FromArray, ShouldAutoSize, WithHeadings, WithMapping, WithStyles + { + public function __construct(private readonly array $rows) + { + } +
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Support\Demo\DemoData; + + class ApprovalWorkflowController extends Controller + { + public function index() + { + return view('pages.approval-workflows', DemoData::approvalWorkflows()); + } + + public function create() + { + $workflows = DemoData::approvalWorkflows(); + + return view('pages.approval-setup', [
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Support\Demo\DemoData; + + class CapacityController extends Controller + { + public function index() + { + return view('pages.capacity', DemoData::capacity()); + } + + public function create() + { + return view('pages.capacity-create', [ + 'units' => DemoData::capacity()['units'], + ]);
Removed / Before Commit
- - namespace App\Http\Controllers; - - use App\Support\Demo\DemoData; - - class FinanceController extends Controller - { - public function index() - { - return view('pages.finance', DemoData::finance()); - } - }
Added / After Commit
+ + namespace App\Http\Controllers; + + use App\Exports\FinanceRecordsExport; + use App\Support\Demo\DemoData; + use Barryvdh\DomPDF\Facade\Pdf; + use Illuminate\Http\Request; + use Illuminate\Support\Carbon; + use Maatwebsite\Excel\Facades\Excel; + + class FinanceController extends Controller + { + public function index(Request $request) + { + $filters = $this->filtersFromRequest($request); + + $data = DemoData::finance(); + $data['rows'] = $this->filterRows($data['rows'], $filters);
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Support\Demo\DemoData; + + class GlobalMasterController extends Controller + { + public function index() + { + return view('pages.global-master', DemoData::globalMaster()); + } + + public function create() + { + $globalMaster = DemoData::globalMaster(); + + return view('pages.global-master-create', [
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Support\Demo\DemoData; + use Illuminate\Http\Request; + + class InventoryController extends Controller + { + public function index(Request $request) + { + return view('pages.inventory', DemoData::inventory($request->query('plant'))); + } + + public function create(Request $request) + { + return view('pages.inventory-create', [ + 'plants' => collect(DemoData::plants()['rows'])->map(fn ($plant) => ['code' => $plant['code'], 'name' => $plant['name']])->all(),
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Support\Demo\DemoData; + + class LocationController extends Controller + { + public function index() + { + return view('pages.locations', DemoData::locations()); + } + + public function create() + { + return view('pages.location-create', [ + 'companies' => ['RMB Dubai', 'Antfast ReadyMix', 'Gulf Aggregate Co.', 'Metro Batch Systems', 'Prime Concrete Works', 'UrbanMix Logistics'], + 'plants' => collect(DemoData::plants()['rows'])->pluck('name')->all(),
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Support\Demo\DemoData; + + class MixController extends Controller + { + public function index() + { + return view('pages.mixes', DemoData::mixes()); + } + + public function create() + { + return view('pages.mix-create', [ + 'companies' => ['RMB Dubai', 'Antfast ReadyMix', 'Gulf Aggregate Co.', 'Metro Batch Systems', 'Prime Concrete Works', 'UrbanMix Logistics'], + 'plants' => collect(DemoData::plants()['rows'])->pluck('name')->all(),
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Support\Demo\DemoData; + + class MixTypeController extends Controller + { + public function index() + { + return view('pages.mix-types', DemoData::mixTypes()); + } + + public function create() + { + return view('pages.mix-type-create', [ + 'companies' => DemoData::mixTypes()['companies'], + 'plants' => collect(DemoData::plants()['rows'])->pluck('name')->all(),
Removed / Before Commit
- { - return view('pages.orders', DemoData::orders()); - } - }
Added / After Commit
+ { + return view('pages.orders', DemoData::orders()); + } + + public function show(string $id) + { + $details = DemoData::orderDetail($id); + + abort_if(! $details, 404); + + return view('pages.order-details', $details); + } + }
Removed / Before Commit
- return view('pages.plants-dashboard', DemoData::plants()); - } - - public function show(string $code) - { - $profile = DemoData::plantProfile($code);
Added / After Commit
+ return view('pages.plants-dashboard', DemoData::plants()); + } + + public function create() + { + return view('pages.plant-create', [ + 'companies' => ['RMB Dubai', 'Antfast ReadyMix', 'Gulf Aggregate Co.', 'Metro Batch Systems', 'Prime Concrete Works', 'UrbanMix Logistics'], + 'locations' => collect(DemoData::locations()['rows'])->map(fn ($row) => "{$row['name']} - {$row['code']}")->all(), + ]); + } + + public function show(string $code) + { + $profile = DemoData::plantProfile($code);
Removed / Before Commit
- { - return view('pages.projects', DemoData::projects()); - } - }
Added / After Commit
+ { + return view('pages.projects', DemoData::projects()); + } + + public function create() + { + $data = DemoData::projects(); + + return view('pages.project-create', [ + 'customers' => $data['customers'], + 'projectTypes' => $data['projectTypes'], + 'companies' => ['RMB Dubai', 'Antfast ReadyMix', 'Gulf Aggregate Co.', 'Metro Batch Systems', 'Prime Concrete Works', 'UrbanMix Logistics'], + ]); + } + }
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Support\Demo\DemoData; + + class PumpController extends Controller + { + public function index() + { + return view('pages.pumps', DemoData::pumps()); + } + + public function create() + { + $operators = collect(DemoData::pumps()['rows'])->pluck('operator')->unique()->values()->all(); + + return view('pages.pump-create', [
Removed / Before Commit
- { - public function index() - { - return view('pages.settings', DemoData::settings()); - } - }
Added / After Commit
+ { + public function index() + { + return view('pages.settings', ['sections' => DemoData::settingsSections()]); + } + + }
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Support\Demo\DemoData; + + class SettingsDriverController extends Controller + { + public function index() + { + return view('pages.settings-drivers', DemoData::driverSettings()); + } + + public function create() + { + $data = DemoData::driverSettings(); + + return view('pages.settings-driver-create', [
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Support\Demo\DemoData; + + class StructureController extends Controller + { + public function index() + { + return view('pages.structures', DemoData::structures()); + } + + public function create() + { + return view('pages.structure-create', [ + 'companies' => DemoData::structures()['companies'], + ]);
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Support\Demo\DemoData; + + class TransitMixerController extends Controller + { + public function index() + { + return view('pages.transit-mixers', DemoData::transitMixers()); + } + + public function create() + { + $drivers = collect(DemoData::transitMixers()['rows'])->pluck('driver') + ->merge(collect(DemoData::drivers()['rows'])->pluck('name')) + ->unique()
Removed / Before Commit
- { - return view('pages.users', DemoData::users()); - } - }
Added / After Commit
+ { + return view('pages.users', DemoData::users()); + } + + public function create() + { + $users = DemoData::users(); + + return view('pages.user-create', [ + 'companies' => $users['companies'], + 'roles' => $users['roles'], + 'plants' => collect(DemoData::plants()['rows'])->pluck('name')->all(), + 'locations' => collect(DemoData::locations()['rows'])->map(fn ($row) => "{$row['name']} - {$row['code']}")->all(), + ]); + } + }
Removed / Before Commit
Added / After Commit
+ <?php + + namespace App\Http\Controllers; + + use App\Support\Demo\DemoData; + use Illuminate\Http\Request; + + class VendorController extends Controller + { + public function create(Request $request) + { + $step = (int) $request->query('step', 1); + $step = in_array($step, [1, 2], true) ? $step : 1; + + if ($step === 2 && ! session()->has('vendor_wizard.vendor')) { + return redirect()->route('vendors.create', ['step' => 1]); + } +
Removed / Before Commit
- return [ - ['route' => 'dashboard', 'icon' => 'layout-dashboard', 'label' => 'Dashboard'], - ['route' => 'customers.index', 'icon' => 'users', 'label' => 'Customers'], - ['route' => 'companies.index', 'icon' => 'building-2', 'label' => 'Companies'], - ['route' => 'projects.index', 'icon' => 'briefcase', 'label' => 'Projects'], - ['route' => 'orders.index', 'icon' => 'clipboard-list', 'label' => 'Orders'], - ['route' => 'dispatch.index', 'icon' => 'route', 'label' => 'Dispatch'], - ['route' => 'plants.index', 'icon' => 'factory', 'label' => 'Plants'], - ['route' => 'products.index', 'icon' => 'package', 'label' => 'Products'], - ['route' => 'pricing.index', 'icon' => 'badge-dollar-sign', 'label' => 'Pricing'], - ['route' => 'finance.index', 'icon' => 'landmark', 'label' => 'Finance'], - ['route' => 'verification.index', 'icon' => 'shield-check', 'label' => 'Verification'], - ['route' => 'reports.index', 'icon' => 'bar-chart-3', 'label' => 'Reports'], - ['route' => 'notifications.index', 'icon' => 'bell', 'label' => 'Alerts'], - public static function projects(): array - { - return [ - 'stats' => [
Added / After Commit
+ return [ + ['route' => 'dashboard', 'icon' => 'layout-dashboard', 'label' => 'Dashboard'], + ['route' => 'customers.index', 'icon' => 'users', 'label' => 'Customers'], + ['route' => 'plants.index', 'icon' => 'factory', 'label' => 'Vendor', 'submenu' => [ + ['route' => 'plants.index', 'icon' => 'factory', 'label' => 'Vendor'], + ['route' => 'transit-mixers.index', 'icon' => 'truck', 'label' => 'Transit Mixer'], + ['route' => 'pumps.index', 'icon' => 'fuel', 'label' => 'Pump'], + ['route' => 'locations.index', 'icon' => 'map-pin', 'label' => 'Location'], + ['route' => 'mixes.index', 'icon' => 'blend', 'label' => 'Mix'], + ['route' => 'mix-types.index', 'icon' => 'shuffle', 'label' => 'Mix Type'], + ]], + ['route' => 'orders.index', 'icon' => 'clipboard-list', 'label' => 'Orders'], + ['route' => 'finance.index', 'icon' => 'landmark', 'label' => 'Finance'], + // ['route' => 'companies.index', 'icon' => 'building-2', 'label' => 'Companies'], + ['route' => 'projects.index', 'icon' => 'briefcase', 'label' => 'Projects'], + ['route' => 'dispatch.index', 'icon' => 'route', 'label' => 'Dispatch'], + + ['route' => 'products.index', 'icon' => 'package', 'label' => 'Products'],
Removed / Before Commit
- { - "name": "antfast-admin", - "lockfileVersion": 3, - "requires": true, - "packages": { - ] - }, - "node_modules/@tailwindcss/node": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.1.tgz", - "integrity": "sha512-6NDaqRoAMSXD1mr/RXu0HBvNE9a2n5tHPsxu9XHLws8o4Twes5rBM2205SUUiJ9goAtadrN6xTGX0UDEwp/N4A==", - "dev": true, - "license": "MIT", - "dependencies": { - "lightningcss": "1.32.0", - "magic-string": "^0.30.21", - "source-map-js": "^1.2.1", - "tailwindcss": "4.3.1"
Added / After Commit
+ { + "name": "antfast-dashboard", + "lockfileVersion": 3, + "requires": true, + "packages": { + ] + }, + "node_modules/@tailwindcss/node": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.2.tgz", + "integrity": "sha512-yWP/sqEcBLaD8JuA6zNwxoYKr75qxTioYwlRwekj5Jr/I5GXnoJfjetH/psLUIv74cYTH2lBUEzBkinthoYcBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "1.32.0", + "magic-string": "^0.30.21", + "source-map-js": "^1.2.1", + "tailwindcss": "4.3.2"
Removed / Before Commit
- }); - } - - function initCommandPalette() { - const overlay = document.querySelector('[data-command-palette]'); - const input = document.querySelector('[data-command-input]'); - const rows = Array.from(root.querySelectorAll('[data-plant-row]')); - const emptyRow = root.querySelector('[data-empty-row]'); - const searchInput = root.querySelector('[data-plant-search]'); - const filters = Array.from(root.querySelectorAll('[data-filter]')); - const sortButtons = Array.from(root.querySelectorAll('[data-sort]')); - const selectAll = root.querySelector('[data-select-all]'); - return true; - }; - - const getMatchingRows = () => { - const query = normalize(searchInput?.value); - const activeFilters = Object.fromEntries(filters.map((filter) => [filter.dataset.filter, filter.value]));
Added / After Commit
+ }); + } + + function initExportMenus() { + document.querySelectorAll('[data-export-menu]').forEach((wrapper) => { + const trigger = wrapper.querySelector('[data-export-menu-trigger]'); + const panel = wrapper.querySelector('[data-export-menu-panel]'); + if (!trigger || !panel) return; + + trigger.addEventListener('click', (e) => { + e.stopPropagation(); + panel.classList.toggle('hidden'); + }); + + document.addEventListener('click', (e) => { + if (!wrapper.contains(e.target)) { + panel.classList.add('hidden'); + }
Removed / Before Commit
- - <main class="flex-1 pb-28 pt-5 lg:pb-6"> - {{ $slot }} - </main> - </div> - </div>
Added / After Commit
+ + <main class="flex-1 pb-28 pt-5 lg:pb-6"> + {{ $slot }} + + <footer class="mt-10 border-t border-ink-100 pt-5 text-center text-[11px] font-semibold text-ink-400"> + Ant Fast Order Management System © {{ date('Y') }}. All rights reserved. + </footer> + </main> + </div> + </div>
Removed / Before Commit
- @foreach ($items as $item) - @php($hasSubmenu = !empty($item['submenu'])) - @php($active = $hasSubmenu - ? (request()->routeIs($item['route']) || collect($item['submenu'])->contains(fn($s) => request()->routeIs($s['route']))) - : request()->routeIs($item['route'])) - - @if ($hasSubmenu) - class="fixed z-[55] hidden w-[204px] overflow-hidden rounded-2xl border border-ink-100 bg-white shadow-lift" - style="opacity:0;transform:scale(0.95) translateY(-4px);transition:opacity 160ms ease,transform 160ms ease;" - > - {{-- Header --}} - <div class="flex items-center gap-2.5 bg-gradient-to-r from-navy-800 to-navy-700 px-3.5 py-3"> - <span class="grid h-7 w-7 shrink-0 place-items-center rounded-lg bg-white/10 text-white ring-1 ring-white/15"> - <x-lucide-factory class="h-3.5 w-3.5" /> - </span> - <span class="font-display text-[13.5px] font-extrabold tracking-tight text-white">Plants</span> - <x-lucide-chevron-right class="ml-auto h-3.5 w-3.5 shrink-0 text-white/35" /> - </div>
Added / After Commit
+ @foreach ($items as $item) + @php($hasSubmenu = !empty($item['submenu'])) + @php($active = $hasSubmenu + ? (request()->routeIs($item['route']) || collect($item['submenu'])->contains(fn($s) => $s['route'] && request()->routeIs($s['route']))) + : request()->routeIs($item['route'])) + + @if ($hasSubmenu) + class="fixed z-[55] hidden w-[204px] overflow-hidden rounded-2xl border border-ink-100 bg-white shadow-lift" + style="opacity:0;transform:scale(0.95) translateY(-4px);transition:opacity 160ms ease,transform 160ms ease;" + > + {{-- Items --}} + <div data-nav-submenu-list class="p-1.5 overflow-y-auto scrollbar-thin"> + @foreach ($item['submenu'] as $sub) + @php($subDisabled = empty($sub['route'])) + @php($subActive = !$subDisabled && request()->routeIs($sub['route'])) + @if ($subDisabled) + <span + title="Coming soon"
Removed / Before Commit
Added / After Commit
+ @props(['label', 'name', 'icon' => 'file-text', 'accept' => '.pdf,.jpg,.jpeg,.png', 'hint' => 'PDF, JPG or PNG']) + + <label data-file-field class="group relative flex cursor-pointer flex-col items-center justify-center gap-2 rounded-2xl border-2 border-dashed border-ink-200 bg-ink-50/40 px-4 py-5 text-center shadow-soft transition hover:border-brand-300 hover:bg-brand-50/30"> + <span class="grid h-10 w-10 shrink-0 place-items-center rounded-xl bg-white text-ink-500 shadow-soft ring-1 ring-ink-100 transition group-hover:bg-brand-500 group-hover:text-white"> + <x-dynamic-component :component="'lucide-' . $icon" class="h-5 w-5" /> + </span> + <span class="text-[12.5px] font-extrabold text-ink-800">{{ $label }}</span> + <span data-file-field-name class="text-[11px] font-semibold text-ink-400">Click to upload · {{ $hint }}</span> + <input type="file" name="{{ $name }}" accept="{{ $accept }}" {{ $attributes->merge(['class' => 'sr-only']) }} /> + </label>
Removed / Before Commit
Added / After Commit
+ @props(['label', 'name']) + + <div> + <label data-field-wrapper class="relative block rounded-2xl border border-ink-200 bg-white px-4 py-2.5 shadow-soft transition focus-within:border-brand-300 focus-within:ring-4 focus-within:ring-brand-100"> + <span class="block text-xs font-bold text-ink-400">{{ $label }}</span> + <select + name="{{ $name }}" + {{ $attributes->merge(['class' => 'mt-0.5 block w-full appearance-none bg-transparent pr-6 text-[15px] font-extrabold text-ink-900 outline-none']) }} + > + {{ $slot }} + </select> + <x-lucide-chevron-down class="pointer-events-none absolute bottom-3 right-4 h-4 w-4 text-ink-400" /> + </label> + <p data-field-error class="mt-1.5 hidden text-[11px] font-bold text-rose-600"></p> + </div>
Removed / Before Commit
- - @php - $variants = [ - 'Active' => 'success', 'Available' => 'success', 'Completed' => 'success', 'Delivered' => 'success', 'Paid' => 'success', 'Passed' => 'success', 'Pass' => 'success', 'Approved' => 'success', 'Working' => 'success', 'Online' => 'success', 'Clear' => 'success', - 'Scheduled' => 'info', 'Under Review' => 'info', 'Out for Delivery' => 'info', 'Track' => 'info', 'Live' => 'info', 'Production' => 'info', 'Assigned' => 'info', 'Idle' => 'info', 'Mixing' => 'info', 'Quality Check' => 'info', 'Ready for Loading' => 'info', 'Ready for Dispatch' => 'info', - 'New' => 'warn', 'Pending' => 'warn', 'Queued' => 'warn', 'Batching' => 'warn', 'QC Hold' => 'warn', 'Wallet Hold' => 'warn', 'Hold' => 'warn', 'On Hold' => 'warn', 'Loading' => 'warn', 'Limited' => 'warn', 'In Progress' => 'warn', 'Need Resubmission' => 'warn', 'Traffic' => 'warn', 'Loading Queue' => 'warn', 'Maintenance' => 'warn', 'Outstanding' => 'warn', - 'Failed' => 'bad', 'Cancelled' => 'bad', 'Needs Assignment' => 'bad', 'Rejected' => 'bad', 'Blocked' => 'bad', 'Overdue' => 'bad', 'Offline' => 'bad', - ]; - - $variant = $variants[$label] ?? 'neutral';
Added / After Commit
+ + @php + $variants = [ + 'Active' => 'success', 'Available' => 'success', 'Completed' => 'success', 'Delivered' => 'success', 'Paid' => 'success', 'Passed' => 'success', 'Pass' => 'success', 'Approved' => 'success', 'Working' => 'success', 'Online' => 'success', 'Clear' => 'success', 'Healthy' => 'success', + 'Scheduled' => 'info', 'Under Review' => 'info', 'Out for Delivery' => 'info', 'Track' => 'info', 'Live' => 'info', 'Production' => 'info', 'Assigned' => 'info', 'Idle' => 'info', 'Mixing' => 'info', 'Quality Check' => 'info', 'Ready for Loading' => 'info', 'Ready for Dispatch' => 'info', + 'New' => 'warn', 'Pending' => 'warn', 'Queued' => 'warn', 'Batching' => 'warn', 'QC Hold' => 'warn', 'Wallet Hold' => 'warn', 'Hold' => 'warn', 'On Hold' => 'warn', 'Loading' => 'warn', 'Limited' => 'warn', 'In Progress' => 'warn', 'Need Resubmission' => 'warn', 'Traffic' => 'warn', 'Loading Queue' => 'warn', 'Maintenance' => 'warn', 'Outstanding' => 'warn', 'Overstock' => 'warn', + 'Failed' => 'bad', 'Cancelled' => 'bad', 'Needs Assignment' => 'bad', 'Rejected' => 'bad', 'Blocked' => 'bad', 'Overdue' => 'bad', 'Offline' => 'bad', 'Low Stock' => 'bad', + ]; + + $variant = $variants[$label] ?? 'neutral';
Removed / Before Commit
Added / After Commit
+ @props(['label', 'name', 'type' => 'text', 'placeholder' => 'Enter']) + + <div> + <label data-field-wrapper class="block rounded-2xl border border-ink-200 bg-white px-4 py-2.5 shadow-soft transition focus-within:border-brand-300 focus-within:ring-4 focus-within:ring-brand-100"> + <span class="block text-xs font-bold text-ink-400">{{ $label }}</span> + <input + type="{{ $type }}" + name="{{ $name }}" + placeholder="{{ $placeholder }}" + {{ $attributes->merge(['class' => 'mt-0.5 block w-full bg-transparent text-[15px] font-extrabold text-ink-900 outline-none placeholder:font-bold placeholder:text-ink-300']) }} + /> + </label> + <p data-field-error class="mt-1.5 hidden text-[11px] font-bold text-rose-600"></p> + </div>
Removed / Before Commit
Added / After Commit
+ @props(['label', 'name', 'rows' => 4, 'placeholder' => 'Enter']) + + <div class="h-full"> + <label data-field-wrapper class="block h-full rounded-2xl border border-ink-200 bg-white px-4 py-2.5 shadow-soft transition focus-within:border-brand-300 focus-within:ring-4 focus-within:ring-brand-100"> + <span class="block text-xs font-bold text-ink-400">{{ $label }}</span> + <textarea + name="{{ $name }}" + rows="{{ $rows }}" + placeholder="{{ $placeholder }}" + {{ $attributes->merge(['class' => 'mt-0.5 block w-full resize-none bg-transparent text-[15px] font-extrabold text-ink-900 outline-none placeholder:font-bold placeholder:text-ink-300']) }} + ></textarea> + </label> + <p data-field-error class="mt-1.5 hidden text-[11px] font-bold text-rose-600"></p> + </div>
Removed / Before Commit
Added / After Commit
+ <!doctype html> + <html> + <head> + <meta charset="utf-8"> + <title>Finance Records</title> + <style> + body { font-family: Helvetica, Arial, sans-serif; color: #1a1726; font-size: 11px; } + .header { margin-bottom: 18px; } + .header h1 { font-size: 18px; margin: 0 0 4px; color: #1a1726; } + .header p { margin: 0; color: #6b7280; font-size: 10px; } + table { width: 100%; border-collapse: collapse; margin-top: 12px; } + th { text-align: left; background: #f4f2fb; color: #4b4560; text-transform: uppercase; font-size: 9px; letter-spacing: 0.04em; padding: 8px 10px; border-bottom: 1px solid #e6e3f1; } + td { padding: 7px 10px; border-bottom: 1px solid #eeecf6; font-size: 10.5px; } + tr:nth-child(even) td { background: #fbfafe; } + .amount { font-weight: bold; } + .empty { text-align: center; padding: 24px; color: #9a95ab; } + </style> + </head>
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Approval Setup"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Approval Setup</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('orders.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Order</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Workflow</span> + </nav> + </div> + + <div class="flex shrink-0 items-center gap-2.5"> + <x-ui.button type="submit" form="approval-setup-form" variant="primary" icon="check" class="px-8">Submit</x-ui.button> + <a href="{{ route('settings.approval-workflow') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> + </div>
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Approval Workflows"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Settings</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('settings.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Settings</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Approval Workflows</span> + </nav> + </div> + + <a href="{{ route('settings.index') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> + + <section data-workflow-table class="reveal overflow-hidden rounded-3xl border border-ink-100 bg-white shadow-soft"> + <div class="flex flex-col gap-3 border-b border-ink-100 bg-gradient-to-b from-white to-ink-50/70 p-4 sm:flex-row sm:items-center sm:justify-between">
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Create Capacity"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Settings</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('settings.capacity') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Capacity</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Create</span> + </nav> + </div> + + <a href="{{ route('settings.capacity') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> + + <section class="reveal overflow-hidden rounded-3xl border border-ink-100 bg-white p-5 shadow-soft sm:p-8"> + <form data-capacity-create-form class="grid grid-cols-1 gap-4">
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Capacity"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Capacity</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('settings.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Settings</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Capacity</span> + </nav> + </div> + + <a href="{{ route('settings.index') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> + + <div class="reveal mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between"> + <label class="relative w-full max-w-[360px]">
Removed / Before Commit
- </div> - - <div class="mt-4 grid grid-cols-1 gap-4 xl:grid-cols-2"> - <x-ui.panel title="Company-wise Orders" subtitle="Top B2B accounts"> - <x-ui.chart :config="$companyOrdersChart" height="260px" /> - </x-ui.panel> - <x-ui.panel title="Plant Utilization" subtitle="Capacity, queue, inventory, and QC">
Added / After Commit
+ </div> + + <div class="mt-4 grid grid-cols-1 gap-4 xl:grid-cols-2"> + <x-ui.panel title="Vendor-wise Orders" subtitle="Top B2B accounts"> + <x-ui.chart :config="$companyOrdersChart" height="260px" /> + </x-ui.panel> + <x-ui.panel title="Plant Utilization" subtitle="Capacity, queue, inventory, and QC">
Removed / Before Commit
- <x-layout.app title="Finance"> - <x-ui.page-header eyebrow="Finance" title="Finance" subtitle="Invoices, payments, outstanding balances, credit notes, wallet, credit limit, and refunds."> - <x-slot:actions> - <x-ui.button variant="ghost" icon="file-down">Statement</x-ui.button> - <x-ui.button variant="primary" icon="download">Export</x-ui.button> - </x-slot:actions> - </x-ui.page-header> - - @endforeach - </div> - - <x-ui.tabs :items="$tabs" /> - - <div class="grid grid-cols-1 gap-4 xl:grid-cols-[1.3fr_.7fr]"> - <x-ui.table> - <x-slot:head> - <x-ui.th>Type</x-ui.th> - <x-ui.th>ID</x-ui.th>
Added / After Commit
+ @php + $exportParams = array_filter([ + 'start_date' => $filters['start_date'] ?? null, + 'end_date' => $filters['end_date'] ?? null, + ]); + @endphp + + <x-layout.app title="Finance"> + <x-ui.page-header eyebrow="Finance" title="Finance" subtitle="Invoices, payments, outstanding balances, credit notes, wallet, and refunds."> + <x-slot:actions> + <x-ui.button variant="ghost" icon="file-down">Statement</x-ui.button> + + <div class="relative" data-export-menu> + <x-ui.button variant="primary" icon="download" type="button" data-export-menu-trigger> + Export + <x-lucide-chevron-down class="h-3.5 w-3.5" /> + </x-ui.button> +
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Create Global Master"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Global Master</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('settings.global') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Global Master</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Create</span> + </nav> + </div> + + <a href="{{ route('settings.global') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> + + <section class="reveal overflow-hidden rounded-3xl border border-ink-100 bg-white p-5 shadow-soft sm:p-8"> + <form data-global-master-create-form class="grid grid-cols-1 gap-4">
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Global Master"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Global Master</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('settings.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Settings</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Global Master</span> + </nav> + </div> + + <a href="{{ route('settings.index') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> + + <div class="reveal mb-4 flex justify-end"> + <x-ui.button variant="primary" icon="plus" href="{{ route('settings.global.create') }}">Create New</x-ui.button>
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Create Inventory Record"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Settings</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('inventory.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Inventory</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Create</span> + </nav> + </div> + + <a href="{{ route('inventory.index') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> + + <section class="reveal overflow-hidden rounded-3xl border border-ink-100 bg-white p-5 shadow-soft sm:p-8"> + <form data-inventory-create-form class="grid grid-cols-1 gap-4">
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Inventory"> + <x-ui.page-header eyebrow="Vendor Management" title="Inventory" subtitle="Material stock levels, capacity, and reorder status for the selected batching plant."> + <x-slot:actions> + <x-ui.button variant="ghost" icon="file-down" data-inventory-export>Export</x-ui.button> + <x-ui.button variant="primary" icon="plus" href="{{ route('inventory.create', ['plant' => $selectedPlant['code']]) }}">Create</x-ui.button> + </x-slot:actions> + </x-ui.page-header> + + <form data-inventory-plant-form method="GET" action="{{ route('inventory.index') }}" class="reveal mb-5 flex flex-col gap-3 rounded-2xl border border-ink-100 bg-white p-4 shadow-soft"> + <div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4"> + <label for="inventory-search-mode" class="flex shrink-0 items-center gap-2 text-[13px] font-extrabold text-ink-800"> + <span class="grid h-9 w-9 place-items-center rounded-xl bg-brand-50 text-brand-600"><x-lucide-search class="h-4 w-4" /></span> + Search By + </label> + <select id="inventory-search-mode" data-inventory-search-mode class="h-11 w-full rounded-xl border border-ink-200 bg-white px-3 text-[13px] font-bold text-ink-800 shadow-soft outline-none transition focus:border-brand-300 focus:ring-4 focus:ring-brand-100 sm:max-w-[220px]"> + <option value="plant">Batching Plant</option> + <option value="location">Location</option> + </select>
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Create Location"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Vendor</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('plants.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Vendor</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <a href="{{ route('locations.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Location</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Create</span> + </nav> + </div> + + <a href="{{ route('locations.index') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> +
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Locations"> + <x-ui.page-header eyebrow="Vendor Management" title="Locations" subtitle="Vendor site locations, contact persons, and status."> + <x-slot:actions> + <x-ui.button variant="ghost" icon="file-down" data-location-export>Export</x-ui.button> + <x-ui.button variant="primary" icon="plus" href="{{ route('locations.create') }}">Create</x-ui.button> + </x-slot:actions> + </x-ui.page-header> + + <section data-location-table class="reveal overflow-hidden rounded-3xl border border-ink-100 bg-white shadow-soft"> + <div class="flex flex-col gap-3 border-b border-ink-100 bg-gradient-to-b from-white to-ink-50/70 p-4 sm:flex-row sm:items-center sm:justify-between"> + <label class="relative w-full max-w-[360px]"> + <span class="sr-only">Search locations</span> + <x-lucide-search class="pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-ink-400" /> + <input data-location-search type="search" placeholder="Search by company, code, name, contact…" class="h-10 w-full rounded-xl border border-ink-200 bg-white py-2 pl-9 pr-3 text-[13px] font-semibold text-ink-800 shadow-soft outline-none transition placeholder:text-ink-400 focus:border-brand-300 focus:ring-4 focus:ring-brand-100" /> + </label> + + <label class="sr-only" for="location-status-filter">Filters</label> + <select id="location-status-filter" data-location-filter-status class="h-10 shrink-0 rounded-xl border border-ink-200 bg-white px-3 text-[12px] font-bold text-ink-700 shadow-soft outline-none transition focus:border-brand-300 focus:ring-4 focus:ring-brand-100">
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Create Mix"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Vendor</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('plants.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Vendor</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <a href="{{ route('mixes.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Mix</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Create</span> + </nav> + </div> + + <a href="{{ route('mixes.index') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> +
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Create Mix Type"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Vendor</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('plants.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Vendor</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <a href="{{ route('mix-types.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Mix Type</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Create</span> + </nav> + </div> + + <a href="{{ route('mix-types.index') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> +
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Mix Types"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Vendor</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('plants.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Vendor</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Mix Type</span> + </nav> + </div> + + <a href="{{ route('plants.index') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> + + <section data-mixtype-table class="reveal overflow-hidden rounded-3xl border border-ink-100 bg-white shadow-soft"> + <div class="flex flex-col gap-3 border-b border-ink-100 bg-gradient-to-b from-white to-ink-50/70 p-4 sm:flex-row sm:items-center sm:justify-between">
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Mix Codes"> + <x-ui.page-header eyebrow="Vendor Management" title="Mix" subtitle="Approved concrete mix designs, mix codes, density, and usage."> + <x-slot:actions> + <x-ui.button variant="ghost" icon="file-down" data-mix-export>Export</x-ui.button> + <x-ui.button variant="primary" icon="plus" href="{{ route('mixes.create') }}">Create</x-ui.button> + </x-slot:actions> + </x-ui.page-header> + + <section data-mix-table class="reveal overflow-hidden rounded-3xl border border-ink-100 bg-white shadow-soft"> + <div class="flex flex-col gap-3 border-b border-ink-100 bg-gradient-to-b from-white to-ink-50/70 p-4 sm:flex-row sm:items-center sm:justify-between"> + <label class="relative w-full max-w-[360px]"> + <span class="sr-only">Search mixes</span> + <x-lucide-search class="pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-ink-400" /> + <input data-mix-search type="search" placeholder="Search by company, mix code, mix name…" class="h-10 w-full rounded-xl border border-ink-200 bg-white py-2 pl-9 pr-3 text-[13px] font-semibold text-ink-800 shadow-soft outline-none transition placeholder:text-ink-400 focus:border-brand-300 focus:ring-4 focus:ring-brand-100" /> + </label> + + <label class="sr-only" for="mix-status-filter">Filters</label> + <select id="mix-status-filter" data-mix-filter-status class="h-10 shrink-0 rounded-xl border border-ink-200 bg-white px-3 text-[12px] font-bold text-ink-700 shadow-soft outline-none transition focus:border-brand-300 focus:ring-4 focus:ring-brand-100">
Removed / Before Commit
Added / After Commit
+ @php + $paymentStatus = collect($paymentMeta)->firstWhere('label', 'Payment Status')['value'] ?? $row['payment']; + $grandTotal = collect($paymentLines)->firstWhere('label', 'Grand Total')['value'] ?? null; + $stateTone = [ + 'completed' => ['dot' => 'bg-aqua-500 text-white ring-aqua-100', 'line' => 'bg-aqua-200', 'badge' => 'bg-aqua-50 text-aqua-700 ring-aqua-100', 'icon' => 'check'], + 'current' => ['dot' => 'bg-brand-500 text-white ring-brand-100 shadow-glow', 'line' => 'bg-ink-200', 'badge' => 'bg-brand-50 text-brand-700 ring-brand-100', 'icon' => 'activity'], + 'pending' => ['dot' => 'bg-white text-ink-400 ring-ink-200', 'line' => 'bg-ink-200', 'badge' => 'bg-ink-100 text-ink-500 ring-ink-200', 'icon' => 'circle'], + ]; + $docTone = ['Ready' => 'bg-aqua-50 text-aqua-700 ring-aqua-100', 'Uploaded' => 'bg-brand-50 text-brand-700 ring-brand-100', 'Draft' => 'bg-amber-50 text-amber-700 ring-amber-100', 'Pending' => 'bg-ink-100 text-ink-500 ring-ink-200', '4 files' => 'bg-sky-50 text-sky-600 ring-sky-100']; + $infoGroups = [ + ['title' => 'Order Summary', 'subtitle' => 'Complete order information', 'icon' => 'clipboard-list', 'tone' => 'text-brand-500 ring-brand-100', 'items' => $orderSummary], + ['title' => 'Customer Details', 'subtitle' => $row['company'], 'icon' => 'user-circle', 'tone' => 'text-brand-500 ring-brand-100', 'items' => $customerDetails], + ['title' => 'Delivery Details', 'subtitle' => $row['delivery_date'], 'icon' => 'map-pinned', 'tone' => 'text-aqua-600 ring-aqua-100', 'items' => $deliveryDetails], + ['title' => 'Product Details', 'subtitle' => $row['product'] . ' / ' . $row['qty'], 'icon' => 'package', 'tone' => 'text-amber-600 ring-amber-100', 'items' => $productDetails], + ]; + $heroMetrics = [ + ['label' => 'Product', 'value' => $row['product'], 'card' => 'border-brand-100 bg-brand-50/60', 'labelClass' => 'text-brand-600'], + ['label' => 'Quantity', 'value' => $row['qty'], 'card' => 'border-aqua-100 bg-aqua-50/60', 'labelClass' => 'text-aqua-600'],
Removed / Before Commit
- <x-ui.td>{{ $row['driver'] }}</x-ui.td> - <x-ui.td><x-ui.status-badge :label="$row['status']" /></x-ui.td> - <x-ui.td><x-ui.status-badge :label="$row['payment']" /></x-ui.td> - <x-ui.td><x-ui.row-actions :icons="['eye', 'pencil', 'route', 'file-text']" /></x-ui.td> - </tr> - @endforeach - </x-ui.table>
Added / After Commit
+ <x-ui.td>{{ $row['driver'] }}</x-ui.td> + <x-ui.td><x-ui.status-badge :label="$row['status']" /></x-ui.td> + <x-ui.td><x-ui.status-badge :label="$row['payment']" /></x-ui.td> + <x-ui.td> + <div class="flex items-center justify-end gap-1.5"> + <a href="{{ route('orders.show', $row['id']) }}" title="View order" aria-label="View order {{ $row['id'] }}" class="grid h-8 w-8 place-items-center rounded-lg border border-ink-100 bg-white text-ink-500 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 hover:text-brand-600"> + <x-lucide-eye class="h-3.5 w-3.5" /> + </a> + @foreach (['pencil', 'route', 'file-text'] as $icon) + <button type="button" class="grid h-8 w-8 place-items-center rounded-lg border border-ink-100 bg-white text-ink-500 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 hover:text-brand-600"> + <x-dynamic-component :component="'lucide-' . $icon" class="h-3.5 w-3.5" /> + </button> + @endforeach + </div> + </x-ui.td> + </tr> + @endforeach + </x-ui.table>
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Create Batching Plant"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Vendor</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('plants.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Vendor</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Create</span> + </nav> + </div> + + <a href="{{ route('plants.index') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> + + <section class="reveal overflow-hidden rounded-3xl border border-ink-100 bg-white p-5 shadow-soft sm:p-8"> + <form data-plant-create-form class="grid grid-cols-1 gap-4">
Removed / Before Commit
- 'Out for Delivery' => ['badge' => 'bg-aqua-50 text-aqua-600 ring-aqua-100', 'dot' => 'bg-aqua-400'], - ]; - - $kyc = $vendor['kyc'] ?? []; - $kycStatuses = array_column($kyc, 'status'); - $verifiedCount = count(array_filter($kyc, fn ($item) => ($item['status'] ?? '') === 'Verified')); - <span class="inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[10.5px] font-extrabold ring-1 {{ $sTone['badge'] }}"><span class="h-1.5 w-1.5 rounded-full {{ $sTone['dot'] }}"></span>{{ $plant['status'] }}</span> - <span class="inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[10.5px] font-extrabold ring-1 {{ $connectionTone['badge'] }}"><span class="h-1.5 w-1.5 rounded-full {{ $connectionTone['dot'] }}"></span>{{ $plant['connection'] }}</span> - </div> - <h1 class="font-display text-[25px] font-extrabold leading-tight text-ink-900 lg:text-[30px]">{{ $plant['name'] }}</h1> - <div class="mt-3 grid gap-2 text-[12px] font-semibold text-ink-500 sm:grid-cols-2"> - <span class="flex min-w-0 items-center gap-2"><x-lucide-map-pin class="h-3.5 w-3.5 shrink-0 text-brand-400" /> <span class="truncate">{{ $plant['location'] }}</span></span> - <span class="flex min-w-0 items-center gap-2"><x-lucide-building-2 class="h-3.5 w-3.5 shrink-0 text-brand-400" /> <span class="truncate">{{ $vendor['company_name'] }}</span></span> - <span class="flex min-w-0 items-center gap-2"><x-lucide-user-circle class="h-3.5 w-3.5 shrink-0 text-brand-400" /> <span class="truncate">{{ $plant['contact_person'] }}</span></span> - <span class="flex min-w-0 items-center gap-2"><x-lucide-refresh-cw class="h-3.5 w-3.5 shrink-0 text-brand-400" /> <span class="truncate">Synced {{ $plant['last_updated'] }}</span></span> - </div> - @endforeach - </div>
Added / After Commit
+ 'Out for Delivery' => ['badge' => 'bg-aqua-50 text-aqua-600 ring-aqua-100', 'dot' => 'bg-aqua-400'], + ]; + + $siteStatusTone = [ + 'Active' => ['badge' => 'bg-aqua-50 text-aqua-700 ring-aqua-100', 'dot' => 'bg-aqua-500'], + 'On Hold' => ['badge' => 'bg-rose-50 text-rose-600 ring-rose-100', 'dot' => 'bg-rose-500'], + ]; + $truckAssignedStatusTone = [ + 'Loading' => ['badge' => 'bg-amber-50 text-amber-700 ring-amber-100', 'dot' => 'bg-amber-500'], + 'En Route' => ['badge' => 'bg-brand-50 text-brand-700 ring-brand-100', 'dot' => 'bg-brand-500'], + 'At Site' => ['badge' => 'bg-aqua-50 text-aqua-700 ring-aqua-100', 'dot' => 'bg-aqua-500'], + 'Returning' => ['badge' => 'bg-sky-50 text-sky-700 ring-sky-100', 'dot' => 'bg-sky-400'], + 'Idle' => ['badge' => 'bg-ink-100 text-ink-600 ring-ink-200', 'dot' => 'bg-ink-400'], + ]; + + $kyc = $vendor['kyc'] ?? []; + $kycStatuses = array_column($kyc, 'status'); + $verifiedCount = count(array_filter($kyc, fn ($item) => ($item['status'] ?? '') === 'Verified'));
Removed / Before Commit
- ]; - @endphp - - <x-layout.app title="Plant Management"> - <x-ui.page-header eyebrow="Plant Management" title="Plants" subtitle="Enterprise plant master data, capacity coverage, live order load, site availability, and operating status."> - <x-slot:actions> - <x-ui.button variant="ghost" icon="file-down" data-export="csv" form="plants-table-form">Export</x-ui.button> - <x-ui.button variant="primary" icon="plus">Add Plant</x-ui.button> - </x-slot:actions> - </x-ui.page-header> - - <form id="plants-table-form" class="border-b border-ink-100 bg-gradient-to-b from-white to-ink-50/70 p-4"> - <div class="flex flex-col gap-3"> - <div class="flex flex-col gap-3 xl:flex-row xl:items-center xl:justify-between"> - <label class="relative w-full min-w-[260px] xl:max-w-[440px]"> - <span class="sr-only">Search plants</span> - <x-lucide-search class="pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-ink-400" /> - <input data-plant-search type="search" placeholder="Search plant, code, vendor, city" class="h-10 w-full rounded-xl border border-ink-200 bg-white py-2 pl-9 pr-3 text-[13px] font-semibold text-ink-800 shadow-soft outline-none transition placeholder:text-ink-400 focus:border-brand-300 focus:ring-4 focus:ring-brand-100" />
Added / After Commit
+ ]; + @endphp + + <x-layout.app title="Vendor Management"> + <x-ui.page-header eyebrow="Vendor Management" title="Vendors" subtitle="Enterprise plant master data, capacity coverage, live order load, site availability, and operating status."> + <x-slot:actions> + <x-ui.button variant="ghost" icon="file-down" data-export="csv" form="plants-table-form">Export</x-ui.button> + <x-ui.button variant="primary" icon="plus" href="{{ route('vendors.create') }}">Create</x-ui.button> + </x-slot:actions> + </x-ui.page-header> + + <form id="plants-table-form" class="border-b border-ink-100 bg-gradient-to-b from-white to-ink-50/70 p-4"> + <div class="flex flex-col gap-3"> + <div class="flex flex-col gap-3 xl:flex-row xl:items-center xl:justify-between"> + <div class="flex w-full flex-col gap-2 sm:flex-row xl:max-w-[620px]"> + <label class="sr-only" for="plant-search-by">Search By</label> + <select id="plant-search-by" data-plant-search-by class="h-10 shrink-0 rounded-xl border border-ink-200 bg-white px-3 text-[12px] font-bold text-ink-700 shadow-soft outline-none transition focus:border-brand-300 focus:ring-4 focus:ring-brand-100 sm:w-[168px]"> + <option value="">Search By: All Fields</option>
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Create Project"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Project</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('customers.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Registered Customer</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Create New</span> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Add Projects</span> + </nav> + </div> + + <x-ui.button variant="ghost" icon="arrow-left" href="{{ route('projects.index') }}" class="shrink-0">Back</x-ui.button> + </div> + + <section class="reveal overflow-hidden rounded-3xl border border-ink-100 bg-white p-5 shadow-soft sm:p-8"> + <form id="project-create-form" data-project-create-form class="grid grid-cols-1 gap-6 xl:grid-cols-[1fr_300px]">
Removed / Before Commit
- <x-layout.app title="Project Management"> - <x-ui.page-header eyebrow="Project Management" title="Projects" subtitle="Company projects, project managers, locations, delivery sites, orders, and verification status."> - <x-slot:actions> - <x-ui.button variant="ghost" icon="map-pin">Map View</x-ui.button> - <x-ui.button variant="primary" icon="plus">New Project</x-ui.button> - </x-slot:actions> - </x-ui.page-header> - - <div class="mb-5 grid grid-cols-2 gap-3 lg:grid-cols-4"> - @foreach ($stats as $s) - <x-ui.stat-card :label="$s['label']" :value="$s['value']" :icon="$s['icon']" :trend="$s['trend']" :tone="$s['tone']" /> - @endforeach - </div> - - <div class="mb-4 grid grid-cols-1 gap-4 lg:grid-cols-[.8fr_1.2fr]"> - <x-ui.panel title="Project Hierarchy" subtitle="Company to project to tower/site"> - <div class="space-y-2.5"> - @foreach ($hierarchy as $item)
Added / After Commit
+ <x-layout.app title="Projects"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Projects</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('customers.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Customer</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Projects</span> + </nav> + </div> + </div> + + <section data-project-table class="reveal overflow-hidden rounded-3xl border border-ink-100 bg-white shadow-soft"> + <div class="flex flex-col gap-3 border-b border-ink-100 bg-gradient-to-b from-white to-ink-50/70 p-4 sm:flex-row sm:items-center sm:justify-between"> + <label class="relative w-full max-w-[360px]"> + <span class="sr-only">Search projects</span> + <x-lucide-search class="pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-ink-400" /> + <input data-project-search type="search" placeholder="Search By..." class="h-11 w-full rounded-full border border-ink-200 bg-white py-2 pl-9 pr-3 text-[13px] font-semibold text-ink-800 shadow-soft outline-none transition placeholder:text-ink-400 focus:border-brand-300 focus:ring-4 focus:ring-brand-100" />
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Create Pump"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Vendor</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('plants.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Vendor</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <a href="{{ route('pumps.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Pump</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Create</span> + </nav> + </div> + + <a href="{{ route('pumps.index') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> +
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Pumps"> + <x-ui.page-header eyebrow="Vendor Management" title="Pumps" subtitle="Concrete pump fleet, assigned operators, capacity, and operating status."> + <x-slot:actions> + <x-ui.button variant="ghost" icon="file-down" data-pump-export>Export</x-ui.button> + <x-ui.button variant="primary" icon="plus" href="{{ route('pumps.create') }}">Create</x-ui.button> + </x-slot:actions> + </x-ui.page-header> + + <section data-pump-table class="reveal overflow-hidden rounded-3xl border border-ink-100 bg-white shadow-soft"> + <div class="flex flex-col gap-3 border-b border-ink-100 bg-gradient-to-b from-white to-ink-50/70 p-4 sm:flex-row sm:items-center sm:justify-between"> + <label class="relative w-full max-w-[360px]"> + <span class="sr-only">Search pumps</span> + <x-lucide-search class="pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-ink-400" /> + <input data-pump-search type="search" placeholder="Search by company, name, type, operator…" class="h-10 w-full rounded-xl border border-ink-200 bg-white py-2 pl-9 pr-3 text-[13px] font-semibold text-ink-800 shadow-soft outline-none transition placeholder:text-ink-400 focus:border-brand-300 focus:ring-4 focus:ring-brand-100" /> + </label> + + <label class="sr-only" for="pump-status-filter">Filters</label> + <select id="pump-status-filter" data-pump-filter-status class="h-10 shrink-0 rounded-xl border border-ink-200 bg-white px-3 text-[12px] font-bold text-ink-700 shadow-soft outline-none transition focus:border-brand-300 focus:ring-4 focus:ring-brand-100">
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Create Driver"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Driver</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('settings.drivers') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Driver Details</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Create</span> + </nav> + </div> + + <a href="{{ route('settings.drivers') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> + + <section class="reveal overflow-hidden rounded-3xl border border-ink-100 bg-white p-5 shadow-soft sm:p-8"> + <form data-driver-create-form class="grid grid-cols-1 gap-6 xl:grid-cols-[1fr_300px]">
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Drivers"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Settings</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('settings.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Settings</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Drivers</span> + </nav> + </div> + + <a href="{{ route('settings.index') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> + + <section data-driver-table class="reveal overflow-hidden rounded-3xl border border-ink-100 bg-white shadow-soft"> + <div class="flex flex-col gap-3 border-b border-ink-100 bg-gradient-to-b from-white to-ink-50/70 p-4 sm:flex-row sm:items-center sm:justify-between">
Removed / Before Commit
Added / After Commit
+ <x-layout.app :title="$title"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Settings</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('settings.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Settings</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>{{ $title }}</span> + </nav> + </div> + + <a href="{{ route('settings.index') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> + + <section class="reveal flex flex-col items-center gap-4 overflow-hidden rounded-3xl border border-ink-100 bg-white p-10 text-center shadow-soft sm:p-16"> + <span class="grid h-16 w-16 place-items-center rounded-full bg-brand-50 text-brand-600">
Removed / Before Commit
- <x-layout.app title="Settings"> - <x-ui.page-header eyebrow="Configuration" title="Settings" subtitle="Company settings, app settings, notification templates, taxes, delivery charges, and service areas."> - <x-slot:actions> - <x-ui.button variant="primary" icon="check">Save Changes</x-ui.button> - </x-slot:actions> - </x-ui.page-header> - - <div class="grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3"> - @foreach ($groups as $group) - <x-ui.panel :title="$group['title']"> - <div class="space-y-2.5"> - @foreach ($group['fields'] as $f) - <x-ui.field :label="$f['label']" :value="$f['value']" /> - @endforeach - </div> - </x-ui.panel> - @endforeach - </div>
Added / After Commit
+ <x-layout.app title="Settings"> + <x-ui.page-header eyebrow="Configuration" title="Settings" subtitle="Manage master data and system-wide configuration across the platform." /> + + <div class="grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-4 xl:gap-5"> + @foreach ($sections as $section) + <a href="{{ route($section['route']) }}" class="card-hover reveal group relative flex flex-col items-center gap-4 overflow-hidden rounded-3xl border border-ink-100 bg-white px-5 py-9 text-center shadow-soft"> + <span class="absolute inset-x-0 top-0 h-[3px] origin-left scale-x-0 bg-gradient-to-r from-brand-500 via-brand-400 to-aqua-400 transition-transform duration-300 ease-out group-hover:scale-x-100"></span> + + <x-lucide-arrow-up-right class="absolute right-4 top-4 h-4 w-4 -translate-y-1 text-ink-300 opacity-0 transition duration-300 ease-out group-hover:translate-y-0 group-hover:text-brand-500 group-hover:opacity-100" /> + + <span class="grid h-16 w-16 shrink-0 place-items-center rounded-2xl bg-brand-50 text-brand-600 shadow-soft transition duration-300 ease-out group-hover:scale-110 group-hover:bg-gradient-to-br group-hover:from-brand-500 group-hover:to-brand-400 group-hover:text-white group-hover:shadow-glow"> + <x-dynamic-component :component="'lucide-' . $section['icon']" class="h-7 w-7" /> + </span> + + <span> + <span class="block font-display text-[14.5px] font-extrabold leading-tight text-ink-900">{{ $section['label'] }}</span> + <span class="mt-1 block text-[11.5px] font-semibold text-ink-400">{{ $section['description'] }}</span> + </span>
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Create Structure"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Settings</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('settings.structure') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Structure</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Create</span> + </nav> + </div> + + <a href="{{ route('settings.structure') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> + + <section class="reveal overflow-hidden rounded-3xl border border-ink-100 bg-white p-5 shadow-soft sm:p-8"> + <form data-structure-create-form class="grid grid-cols-1 gap-4">
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Structure"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Settings</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('settings.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Settings</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Structure</span> + </nav> + </div> + + <a href="{{ route('settings.index') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> + + <section data-structure-table class="reveal overflow-hidden rounded-3xl border border-ink-100 bg-white shadow-soft"> + <div class="flex flex-col gap-3 border-b border-ink-100 bg-gradient-to-b from-white to-ink-50/70 p-4 sm:flex-row sm:items-center sm:justify-between">
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Create Transit Mixer"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Vendor</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('plants.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Vendor</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <a href="{{ route('transit-mixers.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Transit Mixer</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Create</span> + </nav> + </div> + + <a href="{{ route('transit-mixers.index') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> +
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Transit Mixers"> + <x-ui.page-header eyebrow="Vendor Management" title="Transit Mixers" subtitle="Transit mixer fleet, assigned drivers, capacity, and operating status."> + <x-slot:actions> + <x-ui.button variant="ghost" icon="file-down" data-tm-export>Export</x-ui.button> + <x-ui.button variant="primary" icon="plus" href="{{ route('transit-mixers.create') }}">Create</x-ui.button> + </x-slot:actions> + </x-ui.page-header> + + <section data-transit-mixer-table class="reveal overflow-hidden rounded-3xl border border-ink-100 bg-white shadow-soft"> + <div class="flex flex-col gap-3 border-b border-ink-100 bg-gradient-to-b from-white to-ink-50/70 p-4 sm:flex-row sm:items-center sm:justify-between"> + <label class="relative w-full max-w-[360px]"> + <span class="sr-only">Search transit mixers</span> + <x-lucide-search class="pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-ink-400" /> + <input data-tm-search type="search" placeholder="Search by company, code, plate no, driver…" class="h-10 w-full rounded-xl border border-ink-200 bg-white py-2 pl-9 pr-3 text-[13px] font-semibold text-ink-800 shadow-soft outline-none transition placeholder:text-ink-400 focus:border-brand-300 focus:ring-4 focus:ring-brand-100" /> + </label> + + <label class="sr-only" for="tm-status-filter">Filters</label> + <select id="tm-status-filter" data-tm-filter-status class="h-10 shrink-0 rounded-xl border border-ink-200 bg-white px-3 text-[12px] font-bold text-ink-700 shadow-soft outline-none transition focus:border-brand-300 focus:ring-4 focus:ring-brand-100">
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Create User"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Settings</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('users.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">User</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Create</span> + </nav> + </div> + + <a href="{{ route('users.index') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> + + <section class="reveal overflow-hidden rounded-3xl border border-ink-100 bg-white p-5 shadow-soft sm:p-8"> + <form data-user-create-form class="grid grid-cols-1 gap-4">
Removed / Before Commit
- <x-layout.app title="Users"> - <x-ui.page-header eyebrow="Access control" title="Users" subtitle="Admin users, roles, permissions, and operational access."> - <x-slot:actions> - <x-ui.button variant="primary" icon="user-plus">Add User</x-ui.button> - </x-slot:actions> - </x-ui.page-header> - - <div class="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3"> - @foreach ($cards as $card) - <x-ui.feature-card :title="$card['name']" :subtitle="$card['sub']" :status="$card['status']"> - <div class="flex items-center gap-3"> - <x-ui.avatar :name="$card['name']" /> - <div class="flex-1"> - <x-ui.progress-bar :value="$card['progress']" /> - </div> - <span class="text-xs font-extrabold text-ink-500">{{ $card['progress'] }}%</span> - </div> - </x-ui.feature-card>
Added / After Commit
+ <x-layout.app title="Users"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Settings</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('settings.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Settings</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Users</span> + </nav> + </div> + + <a href="{{ route('settings.index') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> + + <section data-user-table class="reveal overflow-hidden rounded-3xl border border-ink-100 bg-white shadow-soft"> + <div class="flex flex-col gap-3 border-b border-ink-100 bg-gradient-to-b from-white to-ink-50/70 p-4 sm:flex-row sm:items-center sm:justify-between">
Removed / Before Commit
Added / After Commit
+ <x-layout.app title="Create Vendor"> + <div class="reveal mb-6 flex flex-wrap items-start justify-between gap-4"> + <div> + <h1 class="font-display text-[28px] font-extrabold leading-tight text-ink-900 sm:text-[32px]">Vendor</h1> + <nav class="mt-1.5 flex items-center gap-1.5 text-[13px] font-bold text-ink-400"> + <a href="{{ route('plants.index') }}" class="font-extrabold text-ink-800 transition hover:text-brand-600">Vendor</a> + <x-lucide-chevron-right class="h-3.5 w-3.5 text-ink-300" /> + <span>Create</span> + </nav> + </div> + + <a href="{{ route('plants.index') }}" class="inline-flex h-11 shrink-0 items-center gap-2 rounded-full border border-ink-200 bg-white px-5 text-[13px] font-bold text-ink-700 shadow-soft transition hover:-translate-y-0.5 hover:border-brand-200 active:scale-[0.97]"> + <x-lucide-arrow-left class="h-4 w-4" /> Back + </a> + </div> + + {{-- Step indicator — purely presentational, driven by the server-provided $step. --}} + <div class="reveal mb-6 flex items-center justify-center gap-3 sm:gap-6">
Removed / Before Commit
Added / After Commit
+ {{-- Existing Batching Plant form fields. Reused as-is (unchanged fields/validations) + by both the standalone "Create Batching Plant" page and the Create Vendor + wizard's Step 2. Expects $companies and $locations to be available in the + including view. Company Name and Location stay fixed; everything else is + wrapped in a repeatable "Set" section (see the including view's script for + the +Add/remove behavior, driven by the [data-repeatable-*] attributes). --}} + <div class="flex justify-end"> + <label class="inline-flex cursor-pointer select-none items-center gap-2.5"> + <input type="checkbox" name="active" checked class="peer sr-only"> + <span class="relative h-6 w-11 shrink-0 rounded-full bg-ink-200 transition-colors duration-200 peer-checked:bg-brand-500 after:absolute after:left-0.5 after:top-0.5 after:h-5 after:w-5 after:rounded-full after:bg-white after:shadow-soft after:transition-transform after:duration-200 after:content-[''] peer-checked:after:translate-x-5"></span> + <span class="text-sm font-extrabold text-ink-800">Active</span> + </label> + </div> + + <div class="grid grid-cols-1 gap-4 md:grid-cols-2"> + <x-ui.select-field label="Company Name" name="company" required> + @foreach ($companies as $company) + <option value="{{ $company }}" @selected($company === 'RMB Dubai')>{{ strtoupper($company) }}</option>
Removed / Before Commit
Added / After Commit
+ {{-- Existing Vendor Registration form fields. Reused as-is (unchanged fields/validations) + by both the standalone flow and the Create Vendor wizard's Step 1. Expects $locations + and $kycDocuments to be available in the including view. --}} + <div class="space-y-4"> + <section class="reveal overflow-hidden rounded-3xl border border-ink-100 bg-white p-5 shadow-soft sm:p-8"> + <div class="mb-5 flex flex-wrap items-center justify-between gap-3"> + <div class="flex items-center gap-3"> + <span class="grid h-9 w-9 place-items-center rounded-xl bg-brand-50 text-brand-600 ring-1 ring-brand-100"><x-lucide-building-2 class="h-[18px] w-[18px]" /></span> + <div> + <h2 class="text-[14px] font-extrabold text-ink-900">Company Details</h2> + <p class="text-[11px] font-semibold text-ink-400">Legal and registration information</p> + </div> + </div> + <label class="inline-flex cursor-pointer select-none items-center gap-2.5"> + <input type="checkbox" name="active" checked class="peer sr-only"> + <span class="relative h-6 w-11 shrink-0 rounded-full bg-ink-200 transition-colors duration-200 peer-checked:bg-brand-500 after:absolute after:left-0.5 after:top-0.5 after:h-5 after:w-5 after:rounded-full after:bg-white after:shadow-soft after:transition-transform after:duration-200 after:content-[''] peer-checked:after:translate-x-5"></span> + <span class="text-sm font-extrabold text-ink-800">Active</span> + </label>
Removed / Before Commit
- <?php - - use App\Http\Controllers\B2bPortalController; - use App\Http\Controllers\CompanyController; - use App\Http\Controllers\CustomerController; - use App\Http\Controllers\DashboardController; - use App\Http\Controllers\DeliveryController; - use App\Http\Controllers\DispatchController; - use App\Http\Controllers\DriverController; - use App\Http\Controllers\FinanceController; - use App\Http\Controllers\InvoiceController; - use App\Http\Controllers\NotificationController; - use App\Http\Controllers\OrderController; - use App\Http\Controllers\PaymentController; - use App\Http\Controllers\PlantController; - use App\Http\Controllers\PricingController; - use App\Http\Controllers\ProductController; - use App\Http\Controllers\ProjectController;
Added / After Commit
+ <?php + + use App\Http\Controllers\ApprovalWorkflowController; + use App\Http\Controllers\B2bPortalController; + use App\Http\Controllers\CapacityController; + use App\Http\Controllers\CompanyController; + use App\Http\Controllers\CustomerController; + use App\Http\Controllers\DashboardController; + use App\Http\Controllers\DeliveryController; + use App\Http\Controllers\DispatchController; + use App\Http\Controllers\DriverController; + use App\Http\Controllers\FinanceController; + use App\Http\Controllers\GlobalMasterController; + use App\Http\Controllers\InventoryController; + use App\Http\Controllers\InvoiceController; + use App\Http\Controllers\LocationController; + use App\Http\Controllers\MixController; + use App\Http\Controllers\MixTypeController;