Files
Kol-Manager/routes/web.php
I-Fun 22f03ccca7 Add contract management and invoice settings pages
- Created a new Blade view for managing brand contracts with forms for adding and editing contracts, including client and category selection.
- Implemented success message notifications for contract actions.
- Added a new Blade view for invoice settings, allowing customization of invoice number format, header branding, and default values for new invoices.
- Introduced a new PDF view for generating rate cards with customizable styles based on user profile settings.
- Developed a profile management page for rate cards, enabling users to update their identity, appearance, and visibility settings.
2026-04-01 21:47:34 +07:00

109 lines
6.1 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
declare(strict_types=1);
use App\Http\Controllers\BrandContractController;
use App\Http\Controllers\ClientCategoryController;
use App\Http\Controllers\ClientController;
use App\Http\Controllers\ContentBriefController;
use App\Http\Controllers\DashboardController;
use App\Http\Controllers\EventController;
use App\Http\Controllers\InvoiceController;
use App\Http\Controllers\InvoiceSettingsController;
use App\Http\Controllers\MediaFileController;
use App\Http\Controllers\NotificationSettingController;
use App\Http\Controllers\RateCardController;
use App\Http\Controllers\SearchController;
use App\Http\Controllers\SocialHubController;
use Illuminate\Support\Facades\Route;
Route::get('/', [DashboardController::class, 'index'])->name('dashboard');
// CRM – Clients
Route::resource('clients', ClientController::class);
// Client Categories
Route::prefix('client-categories')->name('client-categories.')->group(function (): void {
Route::get('/', [ClientCategoryController::class, 'index'])->name('index');
Route::post('/', [ClientCategoryController::class, 'store'])->name('store');
Route::put('/{category}', [ClientCategoryController::class, 'update'])->name('update');
Route::delete('/{category}', [ClientCategoryController::class, 'destroy'])->name('destroy');
});
// Brand Contracts
Route::prefix('contracts')->name('contracts.')->group(function (): void {
Route::get('/', [BrandContractController::class, 'index'])->name('index');
Route::post('/', [BrandContractController::class, 'store'])->name('store');
Route::put('/{contract}', [BrandContractController::class, 'update'])->name('update');
Route::delete('/{contract}', [BrandContractController::class, 'destroy'])->name('destroy');
Route::patch('/{contract}/toggle', [BrandContractController::class, 'toggle'])->name('toggle');
Route::get('/check', [BrandContractController::class, 'check'])->name('check');
});
// Schedule & Calendar
Route::prefix('schedule')->name('schedule.')->group(function (): void {
Route::get('/', [EventController::class, 'index'])->name('index');
Route::post('/', [EventController::class, 'store'])->name('store');
Route::get('/{event}/edit', [EventController::class, 'edit'])->name('edit');
Route::put('/{event}', [EventController::class, 'update'])->name('update');
Route::patch('/{event}/dates', [EventController::class, 'updateDates'])->name('update-dates');
Route::delete('/{event}', [EventController::class, 'destroy'])->name('destroy');
Route::get('/api/events', [EventController::class, 'apiList'])->name('api-events');
});
// Social Media Hub
Route::prefix('social-hub')->name('social-hub.')->group(function (): void {
Route::get('/', [SocialHubController::class, 'index'])->name('index');
Route::post('/stats', [SocialHubController::class, 'storeStats'])->name('store-stats');
});
// Financial – Invoices
Route::resource('invoices', InvoiceController::class);
Route::get('/invoices/{invoice}/pdf', [InvoiceController::class, 'pdf'])->name('invoices.pdf');
Route::get('/invoice-settings', [InvoiceSettingsController::class, 'edit'])->name('invoice-settings.edit');
Route::post('/invoice-settings', [InvoiceSettingsController::class, 'update'])->name('invoice-settings.update');
// Financial – Rate Cards
Route::get('/rate-cards/public', [RateCardController::class, 'public'])->name('rate-cards.public');
Route::get('/rate-cards/pdf', [RateCardController::class, 'pdf'])->name('rate-cards.pdf');
Route::get('/rate-cards/profile', [RateCardController::class, 'profilePage'])->name('rate-cards.profile');
Route::post('/rate-cards/profile', [RateCardController::class, 'profileUpdate'])->name('rate-cards.profile.update');
Route::get('/files/profile-logo', [RateCardController::class, 'serveProfileLogo'])->name('files.serve-profile-logo');
Route::resource('rate-cards', RateCardController::class)->except(['show']);
// Content Strategy – Kanban
Route::prefix('content')->name('content.')->group(function (): void {
Route::get('/', [ContentBriefController::class, 'index'])->name('index');
Route::get('/create', [ContentBriefController::class, 'create'])->name('create');
Route::post('/', [ContentBriefController::class, 'store'])->name('store');
Route::get('/{contentBrief}', [ContentBriefController::class, 'show'])->name('show');
Route::get('/{contentBrief}/edit', [ContentBriefController::class, 'edit'])->name('edit');
Route::put('/{contentBrief}', [ContentBriefController::class, 'update'])->name('update');
Route::delete('/{contentBrief}', [ContentBriefController::class, 'destroy'])->name('destroy');
Route::patch('/{contentBrief}/status', [ContentBriefController::class, 'updateStatus'])->name('update-status');
});
// File Management
Route::prefix('files')->name('files.')->group(function (): void {
Route::get('/', [MediaFileController::class, 'index'])->name('index');
Route::post('/', [MediaFileController::class, 'store'])->name('store');
Route::get('/{mediaFile}/serve', [MediaFileController::class, 'serve'])->name('serve');
Route::delete('/{mediaFile}', [MediaFileController::class, 'destroy'])->name('destroy');
});
// Global Search
Route::prefix('search')->name('search.')->group(function (): void {
Route::get('/', [SearchController::class, 'index'])->name('index');
Route::get('/quick', [SearchController::class, 'quick'])->name('quick');
});
// Settings
Route::prefix('settings')->name('settings.')->group(function (): void {
Route::get('/notifications', [NotificationSettingController::class, 'index'])->name('notifications');
Route::post('/notifications', [NotificationSettingController::class, 'store'])->name('notifications.store');
Route::put('/notifications/{setting}', [NotificationSettingController::class, 'update'])->name('notifications.update');
Route::delete('/notifications/{setting}', [NotificationSettingController::class, 'destroy'])->name('notifications.destroy');
Route::post('/notifications/{setting}/test', [NotificationSettingController::class, 'test'])->name('notifications.test');
Route::post('/notifications/{setting}/toggle', [NotificationSettingController::class, 'toggle'])->name('notifications.toggle');
});