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.
This commit is contained in:
@@ -4,10 +4,13 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Models\BrandContract;
|
||||
use App\Models\Client;
|
||||
use App\Models\ClientCategory;
|
||||
use App\Models\ContentBrief;
|
||||
use App\Models\Event;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\MediaFile;
|
||||
use App\Models\SocialStat;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
@@ -21,7 +24,12 @@ final class DashboardService
|
||||
'upcoming_events' => Event::upcoming(24 * 90)->count(), // 3 months
|
||||
'pending_invoices' => Invoice::where('status', 'sent')->count(),
|
||||
'total_revenue' => Invoice::where('status', 'paid')->sum('total'),
|
||||
'content_in_progress' => ContentBrief::whereNotIn('status', ['posted', 'archived'])->count(),
|
||||
'content_in_progress' => ContentBrief::whereNotIn('status', ['posted', 'archived'])->count(),
|
||||
'total_categories' => ClientCategory::whereNull('parent_id')->count(),
|
||||
'total_subcategories' => ClientCategory::whereNotNull('parent_id')->count(),
|
||||
'total_files' => MediaFile::count(),
|
||||
'active_contracts' => BrandContract::where('is_active', true)->where('end_date', '>=', today())->count(),
|
||||
'total_contracts' => BrandContract::count(),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user