From 1e7a35ad4f7e6ad260ca1248172c56dac315123a Mon Sep 17 00:00:00 2001 From: I-Fun Date: Sat, 4 Apr 2026 23:19:08 +0700 Subject: [PATCH] refactor: remove redundant dashboard widgets and clean up layout structure --- app/Http/Controllers/EventController.php | 1 + resources/views/dashboard.blade.php | 271 +++++------ resources/views/invoices/pdf.blade.php | 477 +++++++++++++------- resources/views/layouts/app.blade.php | 464 +++++++++---------- resources/views/rate-cards/public.blade.php | 368 +++++++++++---- 5 files changed, 955 insertions(+), 626 deletions(-) diff --git a/app/Http/Controllers/EventController.php b/app/Http/Controllers/EventController.php index 79a54a3..c05c48c 100644 --- a/app/Http/Controllers/EventController.php +++ b/app/Http/Controllers/EventController.php @@ -126,6 +126,7 @@ class EventController extends Controller 'status' => ContentStatus::Drafting, 'target_date' => $event->start_time->toDateString(), 'notes' => $event->notes, + 'body' => $event->description, ]); } diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index 8f3ba06..1652844 100644 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -6,153 +6,154 @@ @section('content') -{{-- ── Today's Schedule (TOP) ───────────────────────────────── --}} -
-
-

- 📅 Today's Schedule -

- View all → -
+ {{-- ── Today's Schedule (TOP) ───────────────────────────────── --}} +
+
+

+ 📅 Today's Schedule +

+ View all → +
- @forelse($todayActivities as $activity) -
-
-
-
- @if($activity['priority'])⭐@endif - {{ $activity['icon'] }} - {{ $activity['title'] }} - {{ $activity['label'] }} + @forelse($todayActivities as $activity) +
+
+
+
+ @if($activity['priority'])⭐@endif + {{ $activity['icon'] }} + {{ $activity['title'] }} + {{ $activity['label'] }} +
+
{{ $activity['subtitle'] }}
-
{{ $activity['subtitle'] }}
+ {{ $activity['badge'] }}
- {{ $activity['badge'] }} -
- @empty -
- 😸 -

No activities today — enjoy your day!

-
- Add event - · - Create invoice - · - New brief + @empty +
+ 😸 +

No activities today — enjoy your day!

+
+ Add event + · + Create invoice + · + New brief +
-
- @endforelse -
- -{{-- ── Stat Pills (BELOW schedule) ─────────────────────────── --}} - -{{-- ── Secondary Stats ──────────────────────────────────────── --}} - + {{-- ── Stat Pills (BELOW schedule) ─────────────────────────── --}} + -{{-- ── Bottom Row ───────────────────────────────────────────── --}} -
+ {{-- ── Secondary Stats ──────────────────────────────────────── --}} + - {{-- Social Stats --}} -
-

- 📱 Social Snapshot -

- @forelse($socialStats as $stat) -
-
- {{ $stat->platform_icon }} -
-
{{ ucfirst($stat->platform) }}
-
{{ $stat->handle ?? 'Not set' }}
+ {{-- ── Bottom Row ───────────────────────────────────────────── --}} +
+ + {{-- Recent Invoices --}} +
+
+

🧾 Recent Invoices

+ All →
- @empty -

- No stats yet. - Add stats → -

- @endforelse -
- - {{-- Recent Invoices --}} -
-
-

🧾 Recent Invoices

- All → + @forelse($latestInvoices as $invoice) +
+
+
{{ $invoice->invoice_number }}
+
{{ $invoice->client?->name ?? 'No client' }}
+
+
+
{{ $invoice->formatted_total }}
+ {{ $invoice->status->label() }} +
+
+ @empty +

No invoices yet.

+ @endforelse
- @forelse($latestInvoices as $invoice) -
-
-
{{ $invoice->invoice_number }}
-
{{ $invoice->client?->name ?? 'No client' }}
-
-
-
{{ $invoice->formatted_total }}
- {{ $invoice->status->label() }} -
+ + {{-- Content Progress --}} +
+
+

🎬 Content Pipeline

+ Board →
- @empty -

No invoices yet.

- @endforelse +
+ {{ $stats['content_in_progress'] }} + pieces currently in progress +
+ + New Brief +
- {{-- Content Progress --}} -
-
-

🎬 Content Pipeline

- Board → -
-
- {{ $stats['content_in_progress'] }} - pieces currently in progress -
- + New Brief -
-
- -@endsection +@endsection \ No newline at end of file diff --git a/resources/views/invoices/pdf.blade.php b/resources/views/invoices/pdf.blade.php index 0ef1762..7ef0f1c 100644 --- a/resources/views/invoices/pdf.blade.php +++ b/resources/views/invoices/pdf.blade.php @@ -1,197 +1,372 @@ + @php $accent = $invoiceSettings->accent_color ?? '#FFB7C5'; - $hex = ltrim($accent, '#'); + $hex = ltrim($accent, '#'); $r = hexdec(substr($hex, 0, 2)); $g = hexdec(substr($hex, 2, 2)); $b = hexdec(substr($hex, 4, 2)); // 92% white + 8% accent → very light tint - $tint = sprintf('#%02X%02X%02X', - (int)(255 * 0.92 + $r * 0.08), - (int)(255 * 0.92 + $g * 0.08), - (int)(255 * 0.92 + $b * 0.08) + $tint = sprintf( + '#%02X%02X%02X', + (int) (255 * 0.92 + $r * 0.08), + (int) (255 * 0.92 + $g * 0.08), + (int) (255 * 0.92 + $b * 0.08) ); // 80% white + 20% accent → medium-light tint (for borders) - $tintMid = sprintf('#%02X%02X%02X', - (int)(255 * 0.80 + $r * 0.20), - (int)(255 * 0.80 + $g * 0.20), - (int)(255 * 0.80 + $b * 0.20) + $tintMid = sprintf( + '#%02X%02X%02X', + (int) (255 * 0.80 + $r * 0.20), + (int) (255 * 0.80 + $g * 0.20), + (int) (255 * 0.80 + $b * 0.20) ); @endphp + -{{-- ── Header ─────────────────────────────────────────────────── --}} - - - - - -
- - - @if($invoiceSettings->header_logo && file_exists(storage_path('app/public/' . $invoiceSettings->header_logo))) - - @endif - - -
- Logo - -
{{ $invoiceSettings->header_name ?: 'Cathy' }}
-
{{ $invoiceSettings->header_title ?: 'Personal Talent Assistant' }}
-
-
-
{{ $invoice->invoice_number }}
-
- -{{-- ── Billing Info ─────────────────────────────────────────────── --}} - - - - - -
-
Bill To
- @if($invoice->client) -
{{ $invoice->client->name }}
- @if($invoice->client->company)
{{ $invoice->client->company }}
@endif - @if($invoice->client->email)
{{ $invoice->client->email }}
@endif - @if($invoice->client->full_address)
{{ $invoice->client->full_address }}
@endif - @else -
—
- @endif -
-
Invoice Details
- - - - @if($invoice->paid_date) - - @endif -
Issue Date{{ $invoice->issue_date->format('d M Y') }}
Due Date{{ $invoice->due_date->format('d M Y') }}
Paid Date{{ $invoice->paid_date->format('d M Y') }}
-
- -{{-- ── Line Items ───────────────────────────────────────────────── --}} - - + {{-- ── Header ─────────────────────────────────────────────────── --}} +
- - - - + + - - - @foreach($invoice->items as $item) +
DescriptionQtyUnit PriceTotal + + + @if($invoiceSettings->header_logo && file_exists(storage_path('app/public/' . $invoiceSettings->header_logo))) + + @endif + + +
+ Logo + +
{{ $invoiceSettings->header_name ?: 'Cathy' }}
+
{{ $invoiceSettings->header_title ?: 'Personal Talent Assistant' }} +
+
+
+
{{ $invoice->invoice_number }}
+
+ + {{-- ── Billing Info ─────────────────────────────────────────────── --}} + - - - - + - @endforeach - -
- {{ $item->description }} - @if(!$item->is_taxable) - Non-Taxable + +
Bill To
+ @if($invoice->client) +
{{ $invoice->client->name }}
+ @if($invoice->client->company) +
{{ $invoice->client->company }}
@endif + @if($invoice->client->email) +
{{ $invoice->client->email }}
@endif + @if($invoice->client->full_address) +
{{ $invoice->client->full_address }}
@endif + @else +
—
@endif
{{ $item->quantity }}Rp {{ number_format($item->unit_price, 0, ',', '.') }}Rp {{ number_format($item->total, 0, ',', '.') }} +
Invoice Details
+ + + + + + + + + + @if($invoice->paid_date) + + + + + @endif +
Issue Date{{ $invoice->issue_date->format('d M Y') }}
Due Date{{ $invoice->due_date->format('d M Y') }}
Paid Date{{ $invoice->paid_date->format('d M Y') }}
+
+ -{{-- ── Totals ───────────────────────────────────────────────────── --}} -
-
- + {{-- ── Line Items ───────────────────────────────────────────────── --}} +
+ - - + + + + - @if($invoice->tax_rate > 0) - - - - - @endif - - - - -
SubtotalRp {{ number_format($invoice->subtotal, 0, ',', '.') }}DescriptionQtyUnit PriceTotal
Tax ({{ $invoice->tax_rate }}% — paid by client)Rp {{ number_format($invoice->tax_amount, 0, ',', '.') }}
Grand Total{{ $invoice->formatted_total }}
+ + + @foreach($invoice->items as $item) + + + {{ $item->description }} + @if(!$item->is_taxable) + Non-Taxable + @endif + + {{ $item->quantity }} + Rp {{ number_format($item->unit_price, 0, ',', '.') }} + Rp {{ number_format($item->total, 0, ',', '.') }} + + @endforeach + + + + {{-- ── Totals ───────────────────────────────────────────────────── --}} +
+
+ + + + + + @if($invoice->tax_rate > 0) + + + + + @endif + + + + +
SubtotalRp {{ number_format($invoice->subtotal, 0, ',', '.') }}
Tax ({{ $invoice->tax_rate }}% — paid by client)Rp {{ number_format($invoice->tax_amount, 0, ',', '.') }} +
Grand Total{{ $invoice->formatted_total }}
+
-
-{{-- ── Payment Info ──────────────────────────────────────────────── --}} -@if($invoice->bank_name) -
-
Payment Information
-
- {{ $invoice->bank_name }} - @if($invoice->branch_name) · {{ $invoice->branch_name }} @endif - · {{ $invoice->bank_account }} · a/n {{ $invoice->bank_holder }} -
-
-@endif + {{-- ── Payment Info ──────────────────────────────────────────────── --}} + @if($invoice->bank_name) +
+
Payment Information
+
+ {{ $invoice->bank_name }} + @if($invoice->branch_name) · {{ $invoice->branch_name }} @endif + · {{ $invoice->bank_account }} · a/n {{ $invoice->bank_holder }} +
+
+ @endif -@if($invoice->notes) -
{{ $invoice->notes }}
-@endif + @if($invoice->notes) +
{{ $invoice->notes }}
+ @endif - + - + + \ No newline at end of file diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index e607606..b5bbf22 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -1,5 +1,6 @@ + @@ -15,301 +16,276 @@ @vite(['resources/css/app.css', 'resources/js/app.js']) + -{{-- ── Backdrop (mobile only) ─────────────────────────────────── --}} - + {{-- ── Backdrop (mobile only) ─────────────────────────────────── --}} + -{{-- ── Sidebar ─────────────────────────────────────────────────── --}} - + 🚪 Lock App + + + + -{{-- ── Main wrapper ─────────────────────────────────────────────── --}} -
+ {{-- ── Main wrapper ─────────────────────────────────────────────── --}} +
-
+
- {{-- ── Topbar ───────────────────────────────────────────── --}} -
+ {{-- ── Topbar ───────────────────────────────────────────── --}} +
- {{-- Hamburger (mobile) --}} - + {{-- Hamburger (mobile) --}} + - {{-- Page title (hidden when search open) --}} -
-

@yield('page-title', 'Dashboard')

- -
+ {{-- Page title (hidden when search open) --}} +
+

@yield('page-title', 'Dashboard') +

+ +
- {{-- ── Global Search bar ─────────────────────────── --}} - - {{-- Right actions --}} -
- {{-- Search toggle --}} - + {{-- Right actions --}} +
+ {{-- Search toggle --}} + - -
-
+
+ - {{-- ── Flash Messages ───────────────────────────────────── --}} - @if(session('success')) -
- ✅ - {{ session('success') }} -
- @endif + {{-- ── Flash Messages ───────────────────────────────────── --}} + @if(session('success')) +
+ ✅ + {{ session('success') }} +
+ @endif - @if(session('error')) -
- ❌ - {{ session('error') }} -
- @endif + @if(session('error')) +
+ ❌ + {{ session('error') }} +
+ @endif - {{-- ── Page Content ─────────────────────────────────────── --}} -
- @yield('content') -
+ {{-- ── Page Content ─────────────────────────────────────── --}} +
+ @yield('content') +
+
-
-@stack('scripts') + @stack('scripts') - + async doSearch() { + if (this.searchQuery.length < 2) { this.searchResults = []; return; } + this.searchLoading = true; + try { + const res = await fetch(`/search/quick?q=${encodeURIComponent(this.searchQuery)}`, { + headers: { 'X-Requested-With': 'XMLHttpRequest' } + }); + this.searchResults = await res.json(); + } catch { this.searchResults = []; } + this.searchLoading = false; + }, + }; + } + - + + \ No newline at end of file diff --git a/resources/views/rate-cards/public.blade.php b/resources/views/rate-cards/public.blade.php index 3340601..70ee7da 100644 --- a/resources/views/rate-cards/public.blade.php +++ b/resources/views/rate-cards/public.blade.php @@ -1,117 +1,293 @@ + Rate Card — {{ $profile->owner_name }} + -
-
- @if($profile->logo_path) - {{ $profile->owner_name }} - @else -
🐱
- @endif -
{{ $profile->owner_name }}
- @if($profile->tagline) -
{{ $profile->tagline }}
- @endif +
+
+ @if($profile->logo_path) + {{ $profile->owner_name }} + @else +
🐱
+ @endif +
{{ $profile->owner_name }}
+ @if($profile->tagline) +
{{ $profile->tagline }}
+ @endif -
- @if($profile->whatsappUrl) - 📱 WhatsApp - @endif - @if($profile->ig_handle) - 📸 {{ '@' . ltrim($profile->ig_handle, '@') }} - @endif - @if($profile->tiktok_handle) -🎵 {{ '@' . ltrim($profile->tiktok_handle, '@') }} - @endif - @if($profile->youtube_handle) - ▶️ {{ $profile->youtube_handle }} - @endif - @if($profile->email) - ✉️ {{ $profile->email }} - @endif -
-
- - @forelse($rateCards as $platform => $cards) -
-
- {{ $cards->first()->platform_icon }} - {{ ucfirst($platform) }} -
-
- @foreach($cards as $card) -
- @if($card->content_type) -
{{ $card->content_type }}
- @endif -
{{ $card->service_name }}
- @if($card->description) -
{{ $card->description }}
- @endif - @if($profile->show_prices) -
{{ $card->formatted_price }}
-
{{ str_replace('_', ' ', $card->price_unit) }}
- @else -
On Request
- @endif - @if($card->is_negotiable) -
✦ Negotiable
- @endif -
- @endforeach +
+ @if($profile->whatsappUrl) + 📱 WhatsApp + @endif + @if($profile->ig_handle) + 📸 {{ '@' . ltrim($profile->ig_handle, '@') }} + @endif + @if($profile->tiktok_handle) + 🎵 {{ '@' . ltrim($profile->tiktok_handle, '@') }} + @endif + @if($profile->youtube_handle) + ▶️ + {{ $profile->youtube_handle }} + @endif + @if($profile->email) + ✉️ {{ $profile->email }} + @endif
- @empty -

No rate cards published yet.

- @endforelse - -
- + + \ No newline at end of file