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 · 8e5cecee
The commit adds new controller methods and demo data to support project and driver settings, including UI views for creating projects and drivers. While it introduces useful functionality, there is minimal validation and no security checks evident, and some hardcoded data could reduce maintainability. The commit message is not descriptive which reduces tracking and clarity.
Quality
?
75%
Security
?
45%
Business Value
?
70%
Maintainability
?
68%
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 more descriptive and meaningful commit message explaining what was changed and why
Code Style And Maintainability
Where
app/Http/Controllers/ProjectController.php:14-23
Issue / Evidence
code style and maintainability
Suggested Fix
consider adding input validation and error handling in controller methods
Security Issue
Where
app/Http/Controllers/SettingsDriverController.php:14-24
Issue / Evidence
security
Suggested Fix
add authentication/authorization checks to prevent unauthorized access
Missing Validation
Where
resources/views/pages/project-create.blade.php:22-24
Issue / Evidence
UX and validation
Suggested Fix
implement client-side validation and clearer state management for the active toggle
Bug Risk
Where
resources/views/pages/project-create.blade.php:93-95
Issue / Evidence
bug risk
Suggested Fix
add prevention for duplicate submissions and better error handling on form submit
Maintainability
Where
app/Support/Demo/DemoData.php:1471-1484
Issue / Evidence
maintainability
Suggested Fix
avoid hardcoded demo data by externalizing or documenting it clearly
Code Clarity
Where
resources/views/pages/approval-setup.blade.php:64-141
Issue / Evidence
code clarity
Suggested Fix
add comments or break complex blocks into smaller functions to improve readability
Code Change Preview · app/Http/Controllers/ProjectController.php
?
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 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
- public static function projects(): array - { - return [ - 'stats' => [ - ['label' => 'Active Projects', 'value' => '268', 'icon' => 'briefcase', 'trend' => 'Live', 'tone' => 'live'], - ['label' => 'Delivery Sites', 'value' => '712', 'icon' => 'map-pin', 'trend' => 'Across UAE', 'tone' => 'neutral'], - ['label' => 'Orders Linked', 'value' => '1,284', 'icon' => 'clipboard-list', 'trend' => '+12%', 'tone' => 'up'], - ['label' => 'Need Verification', 'value' => '18', 'icon' => 'shield-alert', 'trend' => 'Site docs', 'tone' => 'warn'], - ], - 'hierarchy' => [['level' => 'Company', 'name' => 'ABC Construction'], ['level' => 'Project', 'name' => 'Marina Project'], ['level' => 'Zones', 'name' => 'Tower A, Tower B, Tower C']], - 'cards' => [ - ['name' => 'Creek Edge Podium', 'company' => 'Block Group Contracting', 'manager' => 'Rashid Khan', 'location' => 'Dubai Creek', 'sites' => '5 delivery sites', 'orders' => '14 active', 'volume' => '2,480 m3', 'status' => 'Active'], - ['name' => 'Marina Tower Phase 2', 'company' => 'Marina Tower LLC', 'manager' => 'Huda Sami', 'location' => 'Dubai Marina', 'sites' => '3 delivery sites', 'orders' => '8 active', 'volume' => '1,120 m3', 'status' => 'On Hold'], - ['name' => 'Al Khail Mall Extension', 'company' => 'Al Khail Builders', 'manager' => 'Yasir Noor', 'location' => 'Al Quoz', 'sites' => '4 delivery sites', 'orders' => '6 active', 'volume' => '890 m3', 'status' => 'Under Review'], - ['name' => 'JVC Residential Cluster', 'company' => 'Zayd Development', 'manager' => 'Sara Mansour', 'location' => 'JVC', 'sites' => '2 delivery sites', 'orders' => '4 active', 'volume' => '610 m3', 'status' => 'Active'], - ], - 'deliverySites' => [ - ['site' => 'Tower A Basement Ramp', 'address' => 'Dubai Creek, Gate 4', 'gps' => '25.2031, 55.3421', 'contact' => 'Site Engineer Omar', 'hours' => '08AM-06PM'],
Added / After Commit
+ public static function projects(): array + { + return [ + 'customers' => ['COMBO ROOF INSULATION', 'A AND M INTERNATIONAL GENERAL CONTRACTING LLC', 'AFE CONTRACTING LLC', 'AL NAURAS AL LAMEA CONTRACTING AND GENERAL'], + 'projectTypes' => ['Residential', 'Commercial'], + 'rows' => [ + ['customer' => 'COMBO ROOF INSULATION', 'code' => 'RMBNP119', 'name' => 'PRIVATE VILLA PLOT 95 Z 19 MBZ', 'type' => 'Residential', 'contractor' => 'EMAAR', 'started_on' => '2025-01-15', 'etc' => '2027-09-08', 'status' => 'Active'], + ['customer' => 'COMBO ROOF INSULATION', 'code' => '231', 'name' => '12', 'type' => 'Commercial', 'contractor' => 'hi', 'started_on' => '2025-12-17', 'etc' => '2027-03-23', 'status' => 'Active'], + ['customer' => 'COMBO ROOF INSULATION', 'code' => 'faridabad', 'name' => 'faridaad', 'type' => 'Residential', 'contractor' => 'fariabad', 'started_on' => '2026-01-21', 'etc' => '2027-08-25', 'status' => 'Active'], + ['customer' => 'A AND M INTERNATIONAL GENERAL CONTRACTING LLC', 'code' => 'RMB101', 'name' => 'ROYAL PARK F09 & F10 ( NEW RESIDENTIAL BUILDING 2B+GF+8F+RF). MASDAR CITY', 'type' => 'Commercial', 'contractor' => 'A', 'started_on' => '2025-03-03', 'etc' => '2029-07-30', 'status' => 'Active'], + ['customer' => 'AFE CONTRACTING LLC', 'code' => 'RMB102', 'name' => 'SERVICE BUILDING PROJECT - EGA', 'type' => 'Commercial', 'contractor' => 'AFE', 'started_on' => '2025-02-18', 'etc' => '2028-02-01', 'status' => 'Active'], + ['customer' => 'AFE CONTRACTING LLC', 'code' => 'RMBPR102', 'name' => 'EX PILOT PROJECT - EGA', 'type' => 'Commercial', 'contractor' => 'AFE', 'started_on' => '2025-03-23', 'etc' => '2026-06-29', 'status' => 'Active'], + ['customer' => 'AL NAURAS AL LAMEA CONTRACTING AND GENERAL', 'code' => 'RMB103', 'name' => 'VILLA NADIA ALNUAIMI SH 35 PLOT 522 SHAMKHA', 'type' => 'Commercial', 'contractor' => 'AL', 'started_on' => '2025-02-03', 'etc' => '2026-07-25', 'status' => 'Active'], + ], + ]; + } + return ['rows' => [['name' => 'Omar Hassan', 'initials' => 'OH', 'deliveries' => '4 today', 'status' => 'Loading', 'contact' => '+971 52 222 9081', 'truck' => 'T-18'], ['name' => 'Fahad Ali', 'initials' => 'FA', 'deliveries' => '3 today', 'status' => 'Out for Delivery', 'contact' => '+971 55 311 0912', 'truck' => 'T-07'], ['name' => 'Sara Nadeem', 'initials' => 'SN', 'deliveries' => '2 today', 'status' => 'Available', 'contact' => '+971 56 600 2217', 'truck' => 'T-11']]]; + }
Removed / Before Commit
- - <div data-approval-levels-builder class="mt-3 hidden space-y-3"> - <div data-approval-levels-list class="space-y-3"></div> - - <button type="button" data-approval-add-level class="inline-flex h-10 items-center gap-2 rounded-xl border border-dashed border-brand-200 bg-brand-50/40 px-4 text-[12.5px] font-extrabold text-brand-600 transition hover:border-brand-300 hover:bg-brand-50"> - <x-lucide-plus class="h-4 w-4" /> Add Level - </button> - </div> - </div> - </form> - </section> - - <template data-approval-level-template> - <div class="flex items-center gap-3 rounded-2xl border border-ink-100 bg-white p-3 shadow-soft" data-approval-level-row> - <span class="grid h-9 w-9 shrink-0 place-items-center rounded-xl bg-brand-50 text-[12px] font-extrabold text-brand-600" data-approval-level-number>1</span> - <div class="flex-1"> - <label class="block rounded-xl border border-ink-200 bg-white px-3 py-2 transition focus-within:border-brand-300 focus-within:ring-4 focus-within:ring-brand-100"> - <span class="block text-[11px] font-bold text-ink-400">Approver</span>
Added / After Commit
+ + <div data-approval-levels-builder class="mt-3 hidden space-y-3"> + <div data-approval-levels-list class="space-y-3"></div> + </div> + </div> + </form> + </section> + + <template data-approval-level-template> + <div class="flex flex-wrap items-center gap-3 rounded-2xl border border-ink-100 bg-white p-3 shadow-soft" data-approval-level-row> + <span class="grid h-9 w-9 shrink-0 place-items-center rounded-xl bg-brand-50 text-[12px] font-extrabold text-brand-600" data-approval-level-number>1</span> + + <div class="min-w-[160px] flex-1"> + <label class="block rounded-xl border border-ink-200 bg-white px-3 py-2 transition focus-within:border-brand-300 focus-within:ring-4 focus-within:ring-brand-100"> + <span class="block text-[11px] font-bold text-ink-400">Users</span> + <select name="levels[][user]" class="mt-0.5 block w-full appearance-none bg-transparent text-[13px] font-extrabold text-ink-900 outline-none"> + @foreach ($approverRoles as $role) + <option value="{{ $role }}">{{ $role }}</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 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
- use App\Http\Controllers\ReportController; - use App\Http\Controllers\RoleController; - use App\Http\Controllers\SettingController; - use App\Http\Controllers\StructureController; - use App\Http\Controllers\TransitMixerController; - use App\Http\Controllers\TruckController; - Route::get('/customers/{slug}', [CustomerController::class, 'show'])->name('customers.show'); - Route::get('/companies', [CompanyController::class, 'index'])->name('companies.index'); - Route::get('/projects', [ProjectController::class, 'index'])->name('projects.index'); - Route::get('/orders', [OrderController::class, 'index'])->name('orders.index'); - Route::get('/orders/{id}', [OrderController::class, 'show'])->name('orders.show'); - Route::get('/dispatch', [DispatchController::class, 'index'])->name('dispatch.index'); - Route::get('/users', [UserController::class, 'index'])->name('users.index'); - Route::get('/users/create', [UserController::class, 'create'])->name('users.create'); - Route::get('/settings', [SettingController::class, 'index'])->name('settings.index'); - Route::get('/settings/approval-workflow', [ApprovalWorkflowController::class, 'index'])->name('settings.approval-workflow'); - Route::get('/settings/approval-workflow/create', [ApprovalWorkflowController::class, 'create'])->name('settings.approval-workflow.create'); - Route::get('/settings/structure', [StructureController::class, 'index'])->name('settings.structure');
Added / After Commit
+ use App\Http\Controllers\ReportController; + use App\Http\Controllers\RoleController; + use App\Http\Controllers\SettingController; + use App\Http\Controllers\SettingsDriverController; + use App\Http\Controllers\StructureController; + use App\Http\Controllers\TransitMixerController; + use App\Http\Controllers\TruckController; + Route::get('/customers/{slug}', [CustomerController::class, 'show'])->name('customers.show'); + Route::get('/companies', [CompanyController::class, 'index'])->name('companies.index'); + Route::get('/projects', [ProjectController::class, 'index'])->name('projects.index'); + Route::get('/projects/create', [ProjectController::class, 'create'])->name('projects.create'); + Route::get('/orders', [OrderController::class, 'index'])->name('orders.index'); + Route::get('/orders/{id}', [OrderController::class, 'show'])->name('orders.show'); + Route::get('/dispatch', [DispatchController::class, 'index'])->name('dispatch.index'); + Route::get('/users', [UserController::class, 'index'])->name('users.index'); + Route::get('/users/create', [UserController::class, 'create'])->name('users.create'); + Route::get('/settings', [SettingController::class, 'index'])->name('settings.index'); + Route::get('/settings/drivers', [SettingsDriverController::class, 'index'])->name('settings.drivers');