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:
I-Fun
2026-04-01 21:47:34 +07:00
parent d3c35ad730
commit 22f03ccca7
48 changed files with 2415 additions and 296 deletions

View File

@@ -18,9 +18,19 @@
<div class="cat-card p-8">
{{-- Invoice Header --}}
<div class="flex justify-between items-start mb-8">
<div>
<div class="text-2xl font-extrabold text-pink-500 flex items-center gap-2">🐱 KOL Manager</div>
<div class="text-sm text-gray-400 mt-1">Personal Talent Assistant</div>
<div class="flex items-center gap-3">
@if($invoiceSettings->header_logo)
<img src="{{ asset('storage/' . $invoiceSettings->header_logo) }}"
alt="Logo" class="h-14 w-14 object-cover rounded-2xl border border-pink-100 shrink-0">
@endif
<div>
<div class="text-xl font-extrabold text-pink-500">
{{ $invoiceSettings->header_name ?: '🐱 KOL Manager' }}
</div>
<div class="text-sm text-gray-400 mt-0.5">
{{ $invoiceSettings->header_title ?: 'Personal Talent Assistant' }}
</div>
</div>
</div>
<div class="text-right">
<div class="text-2xl font-bold text-gray-800">{{ $invoice->invoice_number }}</div>
@@ -75,15 +85,18 @@
{{-- Totals --}}
<div class="flex justify-end mb-8">
<div class="w-64 space-y-2 text-sm">
<div class="w-72 space-y-2 text-sm">
<div class="flex justify-between text-gray-500">
<span>Subtotal</span><span class="font-medium">Rp {{ number_format($invoice->subtotal, 0, ',', '.') }}</span>
</div>
<div class="flex justify-between text-gray-500">
<span>Tax ({{ $invoice->tax_rate }}%)</span><span class="font-medium">Rp {{ number_format($invoice->tax_amount, 0, ',', '.') }}</span>
@if($invoice->tax_rate > 0)
<div class="flex justify-between text-amber-600">
<span>Tax ({{ $invoice->tax_rate }}% — paid by client)</span>
<span class="font-medium">Rp {{ number_format($invoice->tax_amount, 0, ',', '.') }}</span>
</div>
@endif
<div class="flex justify-between text-base font-bold text-pink-600 pt-2 border-t border-pink-200">
<span>Total</span><span>{{ $invoice->formatted_total }}</span>
<span>Total (you receive)</span><span>{{ $invoice->formatted_total }}</span>
</div>
</div>
</div>
@@ -92,7 +105,11 @@
@if($invoice->bank_name)
<div class="bg-pink-50 rounded-2xl p-4 text-sm">
<div class="font-semibold text-gray-700 mb-2">💳 Payment Info</div>
<div class="text-gray-600">{{ $invoice->bank_name }} · {{ $invoice->bank_account }} · {{ $invoice->bank_holder }}</div>
<div class="text-gray-600">
{{ $invoice->bank_name }}
@if($invoice->branch_name) · {{ $invoice->branch_name }} @endif
· {{ $invoice->bank_account }} · a/n {{ $invoice->bank_holder }}
</div>
</div>
@endif