feat: add Projects settings with sub-locations and cascading dropdowns in purchase request modal
- Migration: add project_id FK to settings_locations - Models: ProjectSetting hasMany Location, Location belongsTo ProjectSetting - Settings: /settings/projects page — manage projects and their sub-locations (two-panel UI) - Sidebar: Projects nav item under Settings group - Routes: 7 new settings/projects routes (Admin only) - Modal: project_name and location fields now cascading dropdowns populated from settings_projects/settings_locations Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
1 parent
75e4890a08
commit
7f8ae898d5
9 files changed
+696
-4
No files matched your search
@@ -27,6 +27,8 @@ use App\Http\Controllers\Sales\PaymentReceiptController;
|
||||
use App\Http\Controllers\Sales\SalesInvoiceController;
|
||||
use App\Http\Controllers\Sales\SalesOrderController;
|
||||
use App\Http\Controllers\SettingsController;
|
||||
use App\Http\Controllers\Settings\ProjectSettingController;
|
||||
use App\Models\Settings\Location;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('/', function () {
|
||||
@@ -120,6 +122,15 @@ Route::middleware(['auth', 'verified'])->group(function () {
|
||||
Route::get('settings/integrations', [SettingsController::class, 'integrations'])->name('settings.integrations');
|
||||
Route::post('settings/integrations/whatsapp', [SettingsController::class, 'updateWhatsapp'])->name('settings.integrations.whatsapp');
|
||||
Route::post('settings/integrations/test-whatsapp', [SettingsController::class, 'testWhatsappConnection'])->name('settings.integrations.test-whatsapp');
|
||||
|
||||
// Projects settings
|
||||
Route::get('settings/projects', [ProjectSettingController::class, 'index'])->name('settings.projects.index');
|
||||
Route::post('settings/projects', [ProjectSettingController::class, 'store'])->name('settings.projects.store');
|
||||
Route::patch('settings/projects/{project}', [ProjectSettingController::class, 'update'])->name('settings.projects.update');
|
||||
Route::delete('settings/projects/{project}', [ProjectSettingController::class, 'destroy'])->name('settings.projects.destroy');
|
||||
Route::post('settings/projects/{project}/locations', [ProjectSettingController::class, 'storeLocation'])->name('settings.projects.locations.store');
|
||||
Route::patch('settings/projects/{project}/locations/{location}', [ProjectSettingController::class, 'updateLocation'])->name('settings.projects.locations.update');
|
||||
Route::delete('settings/projects/{project}/locations/{location}', [ProjectSettingController::class, 'destroyLocation'])->name('settings.projects.locations.destroy');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user