name('login'); Route::post('/login', [AuthController::class, 'login']); Route::get('/receptionist', [AuthController::class, 'showReceptionistLogin']); Route::post('/receptionist/login', [AuthController::class, 'receptionistLogin']); Route::post('/logout', [AuthController::class, 'logout'])->name('logout'); Route::get('/api/profile', [AuthController::class, 'profile']); // Placeholder for protected routes Route::middleware(['auth:web,receptionist'])->group(function () { Route::get('/owner/dashboard', [OwnerController::class, 'index'])->name('owner.dashboard'); Route::get('/owner/branches', [OwnerController::class, 'index']); Route::get('/owner/branches/{id}', [OwnerController::class, 'index']); Route::get('/owner/staff', [OwnerController::class, 'index']); Route::get('/owner/staff/add', [OwnerController::class, 'index']); Route::get('/owner/staff/edit/{id}', [OwnerController::class, 'index']); Route::get('/owner/staff/view/{id}', [OwnerController::class, 'index']); Route::get('/owner/investors', [OwnerController::class, 'index']); Route::get('/owner/investors/add', [OwnerController::class, 'index']); Route::get('/owner/investors/edit/{id}', [OwnerController::class, 'index']); Route::get('/owner/investors/view/{id}', [OwnerController::class, 'index']); Route::get('/owner/accounts', [OwnerController::class, 'index']); Route::get('/owner/expenses', [OwnerController::class, 'index']); Route::get('/owner/collections', [OwnerController::class, 'index']); Route::get('/owner/inventory', [OwnerController::class, 'index']); Route::get('/owner/reports', [OwnerController::class, 'index']); Route::get('/owner/pos', [OwnerController::class, 'index']); // API Routes Route::prefix('api/branches')->group(function () { Route::get('/', [BranchController::class, 'index']); Route::post('/', [BranchController::class, 'store']); Route::get('/{id}', [BranchController::class, 'show']); Route::get('/{id}/active-staff', [BranchController::class, 'activeStaff']); Route::put('/{id}', [BranchController::class, 'update']); Route::delete('/{id}', [BranchController::class, 'destroy']); }); Route::get('api/staff/pending-salaries', [StaffController::class, 'getAllPendingSalaries']); Route::post('api/staff/bulk-settle', [StaffController::class, 'bulkSettleSalaries']); Route::apiResource('api/staff', StaffController::class); Route::get('api/staff/{id}/payments', [StaffController::class, 'getPayments']); Route::get('/api/staff/{id}/commission-history', [StaffController::class, 'getCommissionHistory']); Route::get('/api/staff/{id}/advance-history', [StaffController::class, 'getAdvanceHistory']); Route::get('/api/staff/{id}/payroll-status', [StaffController::class, 'getPayrollStatus']); Route::get('/api/staff/{id}/settlement', [StaffController::class, 'getSettlementDetails']); Route::post('/api/staff/{id}/settle', [StaffController::class, 'settleSalary']); Route::post('api/staff/{id}/payments', [StaffController::class, 'storePayment']); Route::get('api/investors/pending-roi', [InvestorController::class, 'getAllPendingROIs']); Route::apiResource('api/investors', InvestorController::class); Route::get('api/investors/{id}/payouts', [InvestorController::class, 'getPayouts']); Route::get('api/investors/{id}/roi-status', [InvestorController::class, 'getROIPayoutStatus']); Route::post('api/investors/{id}/payouts', [InvestorController::class, 'storePayout']); Route::post('api/investors/{id}/settle-roi', [InvestorController::class, 'settleROIPayout']); Route::get('/api/accounts', [AccountController::class, 'index']); // Expenses Route::get('/api/expenses', [ExpenseController::class, 'index']); Route::get('/api/expenses/salary-history', [ExpenseController::class, 'getSalaryHistory']); Route::post('/api/expenses', [ExpenseController::class, 'store']); Route::get('/api/expense-categories', [ExpenseController::class, 'getCategories']); Route::get('/api/expense-branches', [ExpenseController::class, 'getBranches']); // Inventory Route::get('/api/inventory/products', [InventoryController::class, 'getProducts']); Route::post('/api/inventory/products', [InventoryController::class, 'storeProduct']); Route::post('/api/inventory/products/{id}/adjust', [InventoryController::class, 'adjustStock']); Route::get('/api/inventory/products/{id}/history', [InventoryController::class, 'getStockHistory']); Route::get('/api/inventory/sales', [InventoryController::class, 'getSales']); Route::post('/api/inventory/sales', [InventoryController::class, 'storeSale']); Route::get('/api/inventory/categories', [InventoryController::class, 'getCategories']); Route::get('/api/inventory/movements', [InventoryController::class, 'getAllMovements']); // Branch Receptionist Management Route::get('/api/branches/{branch}/receptionist', [BranchReceptionistController::class, 'show']); Route::post('/api/branches/{branch}/receptionist', [BranchReceptionistController::class, 'store']); Route::delete('/api/branches/{branch}/receptionist', [BranchReceptionistController::class, 'destroy']); // Collections Route::get('/api/collections', [CollectionController::class, 'index']); Route::post('/api/collections', [CollectionController::class, 'store']); Route::get('/api/collections/{id}', [CollectionController::class, 'show']); // Reports Route::get('/api/reports/profit', [\App\Http\Controllers\ReportController::class, 'getProfitReport']); Route::get('/api/reports/expiry-reminders', [\App\Http\Controllers\ReportController::class, 'getExpiryReminders']); Route::get('/api/reports/investments', [\App\Http\Controllers\ReportController::class, 'getInvestmentReport']); Route::get('/owner/masters', [OwnerController::class, 'index']); Route::prefix('api/masters')->group(function () { Route::get('/{type}', [\App\Http\Controllers\MasterController::class, 'index']); Route::post('/{type}', [\App\Http\Controllers\MasterController::class, 'store']); Route::put('/{type}/{id}', [\App\Http\Controllers\MasterController::class, 'update']); Route::delete('/{type}/{id}', [\App\Http\Controllers\MasterController::class, 'destroy']); }); Route::get('/receptionist/dashboard', [OwnerController::class, 'index']); Route::get('/receptionist/pos', [OwnerController::class, 'index']); Route::get('/receptionist/collections', [OwnerController::class, 'index']); Route::get('/receptionist/expenses', [OwnerController::class, 'index']); Route::get('/receptionist/inventory', [OwnerController::class, 'index']); Route::get('/receptionist/staff', [OwnerController::class, 'index']); Route::get('/receptionist/staff/add', [OwnerController::class, 'index']); Route::get('/receptionist/staff/edit/{id}', [OwnerController::class, 'index']); Route::get('/receptionist/staff/view/{id}', [OwnerController::class, 'index']); Route::get('/receptionist/reports', [OwnerController::class, 'index']); });