feat: extend rate card profiles with brands, terms, and custom HTML, and remove search bar from search index view
This commit is contained in:
@@ -120,8 +120,8 @@ RUN { \
|
|||||||
} > /usr/local/etc/php/conf.d/opcache.ini
|
} > /usr/local/etc/php/conf.d/opcache.ini
|
||||||
|
|
||||||
RUN { \
|
RUN { \
|
||||||
echo "upload_max_filesize = 200M"; \
|
echo "upload_max_filesize = 500M"; \
|
||||||
echo "post_max_size = 200M"; \
|
echo "post_max_size = 500M"; \
|
||||||
echo "memory_limit = 512M"; \
|
echo "memory_limit = 512M"; \
|
||||||
echo "max_execution_time = 300"; \
|
echo "max_execution_time = 300"; \
|
||||||
} > /usr/local/etc/php/conf.d/uploads.ini
|
} > /usr/local/etc/php/conf.d/uploads.ini
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class ClientController extends Controller
|
|||||||
public function index(Request $request): View
|
public function index(Request $request): View
|
||||||
{
|
{
|
||||||
$query = Client::with('category')
|
$query = Client::with('category')
|
||||||
->withCount(['invoices', 'events', 'contentBriefs'])
|
->withCount(['invoices', 'events', 'contentBriefs', 'mediaFiles'])
|
||||||
->latest();
|
->latest();
|
||||||
|
|
||||||
if ($request->filled('category')) {
|
if ($request->filled('category')) {
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ class MediaFileController extends Controller
|
|||||||
$this->fileService->uploadAsset(
|
$this->fileService->uploadAsset(
|
||||||
$request->file('file'),
|
$request->file('file'),
|
||||||
$request->input('folder'),
|
$request->input('folder'),
|
||||||
$request->input('client_id')
|
$request->filled('client_id') ? (int) $request->input('client_id') : null
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($request->expectsJson() || $request->ajax()) {
|
if ($request->expectsJson() || $request->ajax()) {
|
||||||
|
|||||||
@@ -119,8 +119,11 @@ class RateCardController extends Controller
|
|||||||
'bg_color' => 'nullable|string|max:20',
|
'bg_color' => 'nullable|string|max:20',
|
||||||
'accent_color' => 'nullable|string|max:20',
|
'accent_color' => 'nullable|string|max:20',
|
||||||
'text_color' => 'nullable|string|max:20',
|
'text_color' => 'nullable|string|max:20',
|
||||||
'custom_footer' => 'nullable|string|max:500',
|
'custom_footer' => 'nullable|string|max:255',
|
||||||
'show_prices' => 'boolean',
|
'show_prices' => 'nullable|boolean',
|
||||||
|
'terms_and_conditions' => 'nullable|string',
|
||||||
|
'brand_logo_size' => 'nullable|in:small,medium,large',
|
||||||
|
'contact_person_html' => 'nullable|string',
|
||||||
'logo' => 'nullable|image|max:2048',
|
'logo' => 'nullable|image|max:2048',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -131,7 +134,7 @@ class RateCardController extends Controller
|
|||||||
$validated['logo_path'] = $path;
|
$validated['logo_path'] = $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
$validated['show_prices'] = $request->boolean('show_prices');
|
$validated['show_prices'] = $request->has('show_prices');
|
||||||
unset($validated['logo']);
|
unset($validated['logo']);
|
||||||
|
|
||||||
$profile->update($validated);
|
$profile->update($validated);
|
||||||
@@ -139,6 +142,69 @@ class RateCardController extends Controller
|
|||||||
return back()->with('success', '🎨 Profile updated!');
|
return back()->with('success', '🎨 Profile updated!');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function uploadLogo(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate([
|
||||||
|
'logo' => 'required|image|max:2048',
|
||||||
|
]);
|
||||||
|
|
||||||
|
$profile = RateCardProfile::getSingleton();
|
||||||
|
|
||||||
|
if ($profile->logo_path) {
|
||||||
|
\Storage::disk('private')->delete($profile->logo_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
$path = $request->file('logo')->store('profile', 'private');
|
||||||
|
$profile->update(['logo_path' => $path]);
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'url' => route('files.serve-profile-logo'),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function deleteLogo()
|
||||||
|
{
|
||||||
|
$profile = RateCardProfile::getSingleton();
|
||||||
|
|
||||||
|
if ($profile->logo_path) {
|
||||||
|
\Storage::disk('private')->delete($profile->logo_path);
|
||||||
|
$profile->update(['logo_path' => null]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return response()->json(['success' => true]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function uploadBrandLogo(Request $request)
|
||||||
|
{
|
||||||
|
$request->validate(['logo' => 'required|image|max:2048']);
|
||||||
|
$profile = RateCardProfile::getSingleton();
|
||||||
|
$path = $request->file('logo')->store('brands', 'public');
|
||||||
|
|
||||||
|
$brands = $profile->past_brands ?? [];
|
||||||
|
$brands[] = $path;
|
||||||
|
$profile->update(['past_brands' => $brands]);
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'path' => $path,
|
||||||
|
'url' => asset('storage/' . $path)
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function deleteBrandLogo(Request $request)
|
||||||
|
{
|
||||||
|
$path = $request->input('path');
|
||||||
|
$profile = RateCardProfile::getSingleton();
|
||||||
|
$brands = $profile->past_brands ?? [];
|
||||||
|
|
||||||
|
if (($key = array_search($path, $brands)) !== false) {
|
||||||
|
unset($brands[$key]);
|
||||||
|
$profile->update(['past_brands' => array_values($brands)]);
|
||||||
|
Storage::disk('public')->delete($path);
|
||||||
|
}
|
||||||
|
|
||||||
|
return response()->json(['success' => true]);
|
||||||
|
}
|
||||||
|
|
||||||
public function serveProfileLogo(): Response
|
public function serveProfileLogo(): Response
|
||||||
{
|
{
|
||||||
$profile = RateCardProfile::getSingleton();
|
$profile = RateCardProfile::getSingleton();
|
||||||
@@ -165,7 +231,7 @@ class RateCardController extends Controller
|
|||||||
->groupBy('platform');
|
->groupBy('platform');
|
||||||
|
|
||||||
$pdf = Pdf::loadView('rate-cards.pdf', compact('rateCards', 'profile'))
|
$pdf = Pdf::loadView('rate-cards.pdf', compact('rateCards', 'profile'))
|
||||||
->setPaper('a4', 'portrait');
|
->setPaper('a4', 'landscape');
|
||||||
|
|
||||||
$filename = 'rate-card-' . now()->format('Y-m-d') . '.pdf';
|
$filename = 'rate-card-' . now()->format('Y-m-d') . '.pdf';
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class SearchController extends Controller
|
|||||||
{
|
{
|
||||||
public function index(Request $request): View
|
public function index(Request $request): View
|
||||||
{
|
{
|
||||||
$q = trim($request->get('q', ''));
|
$q = trim((string) $request->get('q', ''));
|
||||||
$results = $q ? $this->search($q) : [];
|
$results = $q ? $this->search($q) : [];
|
||||||
|
|
||||||
return view('search.index', compact('q', 'results'));
|
return view('search.index', compact('q', 'results'));
|
||||||
@@ -26,7 +26,7 @@ class SearchController extends Controller
|
|||||||
/** Quick AJAX endpoint — returns grouped results for the dropdown */
|
/** Quick AJAX endpoint — returns grouped results for the dropdown */
|
||||||
public function quick(Request $request): JsonResponse
|
public function quick(Request $request): JsonResponse
|
||||||
{
|
{
|
||||||
$q = trim($request->get('q', ''));
|
$q = trim((string) $request->get('q', ''));
|
||||||
|
|
||||||
if (strlen($q) < 2) {
|
if (strlen($q) < 2) {
|
||||||
return response()->json([]);
|
return response()->json([]);
|
||||||
@@ -138,6 +138,24 @@ class SearchController extends Controller
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ── Notes ───────────────────────────────────────────
|
||||||
|
$notes = \App\Models\Note::where('title', 'LIKE', $like)
|
||||||
|
->orWhere('content', 'LIKE', $like)
|
||||||
|
->limit($limit)->get();
|
||||||
|
|
||||||
|
if ($notes->isNotEmpty()) {
|
||||||
|
$groups[] = [
|
||||||
|
'type' => 'notes',
|
||||||
|
'label' => '📝 Notes',
|
||||||
|
'items' => $notes->map(fn ($n) => [
|
||||||
|
'icon' => '📝',
|
||||||
|
'title' => $n->title ?: 'Untitled',
|
||||||
|
'subtitle' => 'Notes Management',
|
||||||
|
'url' => route('notes.index'),
|
||||||
|
])->values()->all(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
return $groups;
|
return $groups;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class InvoiceSettings extends Model
|
|||||||
'invoice_prefix' => 'INV',
|
'invoice_prefix' => 'INV',
|
||||||
'invoice_next_number' => 1,
|
'invoice_next_number' => 1,
|
||||||
'accent_color' => '#FFB7C5',
|
'accent_color' => '#FFB7C5',
|
||||||
'default_tax_rate' => 11,
|
'default_tax_rate' => 2.5,
|
||||||
'default_currency' => 'IDR',
|
'default_currency' => 'IDR',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,10 +13,15 @@ class RateCardProfile extends Model
|
|||||||
'ig_handle', 'tiktok_handle', 'youtube_handle', 'email',
|
'ig_handle', 'tiktok_handle', 'youtube_handle', 'email',
|
||||||
'logo_path', 'bg_color', 'accent_color', 'text_color',
|
'logo_path', 'bg_color', 'accent_color', 'text_color',
|
||||||
'custom_footer', 'show_prices', 'access_token',
|
'custom_footer', 'show_prices', 'access_token',
|
||||||
|
'terms_and_conditions',
|
||||||
|
'past_brands',
|
||||||
|
'brand_logo_size',
|
||||||
|
'contact_person_html',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'show_prices' => 'boolean',
|
'show_prices' => 'boolean',
|
||||||
|
'past_brands' => 'array',
|
||||||
];
|
];
|
||||||
|
|
||||||
/** Get the singleton profile, creating defaults if needed */
|
/** Get the singleton profile, creating defaults if needed */
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('rate_card_profiles', function (Blueprint $table) {
|
||||||
|
$table->text('terms_and_conditions')->nullable();
|
||||||
|
$table->json('past_brands')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('rate_card_profiles', function (Blueprint $table) {
|
||||||
|
$table->dropColumn(['terms_and_conditions', 'past_brands']);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('rate_card_profiles', function (Blueprint $table) {
|
||||||
|
$table->text('contact_person_html')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('rate_card_profiles', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('contact_person_html');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('rate_card_profiles', function (Blueprint $table) {
|
||||||
|
$table->string('brand_logo_size')->default('medium')->after('past_brands');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('rate_card_profiles', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('brand_logo_size');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -24,7 +24,7 @@ http {
|
|||||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml;
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml;
|
||||||
|
|
||||||
# Upload size limit (matches file uploads in the app)
|
# Upload size limit (matches file uploads in the app)
|
||||||
client_max_body_size 64M;
|
client_max_body_size 500M;
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
|
|||||||
@@ -138,6 +138,7 @@
|
|||||||
<span>📅 {{ $client->events_count }}</span>
|
<span>📅 {{ $client->events_count }}</span>
|
||||||
<span>🧾 {{ $client->invoices_count }}</span>
|
<span>🧾 {{ $client->invoices_count }}</span>
|
||||||
<span>🎬 {{ $client->content_briefs_count }}</span>
|
<span>🎬 {{ $client->content_briefs_count }}</span>
|
||||||
|
<span>📁 {{ $client->media_files_count ?? 0 }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if($client->email || $client->city)
|
@if($client->email || $client->city)
|
||||||
|
|||||||
@@ -76,6 +76,13 @@
|
|||||||
<span x-show="uploading" class="text-white text-xs">…</span>
|
<span x-show="uploading" class="text-white text-xs">…</span>
|
||||||
<input type="file" accept="image/*" class="hidden" @change="pickAvatar($event.target)">
|
<input type="file" accept="image/*" class="hidden" @change="pickAvatar($event.target)">
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
{{-- Remove Photo Button (Top Left) --}}
|
||||||
|
<button x-show="avatarUrl" @click.prevent="removeAvatar()"
|
||||||
|
class="absolute -top-2 -left-2 bg-red-100 text-red-500 rounded-full w-6 h-6 flex items-center justify-center hover:bg-red-200 shadow text-xs z-10 border border-white"
|
||||||
|
title="Remove Photo">
|
||||||
|
✕
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-1 min-w-0">
|
<div class="flex-1 min-w-0">
|
||||||
@@ -102,10 +109,6 @@
|
|||||||
class="text-sm px-4 py-2 rounded-full border border-pink-200 text-gray-600 hover:bg-pink-50 font-semibold">
|
class="text-sm px-4 py-2 rounded-full border border-pink-200 text-gray-600 hover:bg-pink-50 font-semibold">
|
||||||
🧾 New Invoice
|
🧾 New Invoice
|
||||||
</a>
|
</a>
|
||||||
<button x-show="avatarUrl" @click="removeAvatar()"
|
|
||||||
class="text-sm px-4 py-2 rounded-full border border-red-200 text-red-400 hover:bg-red-50 font-semibold">
|
|
||||||
🗑️ Remove Photo
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -202,5 +205,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
{{-- Uploaded Files --}}
|
||||||
|
@if($client->mediaFiles->isNotEmpty())
|
||||||
|
<div class="cat-card p-4 mt-4">
|
||||||
|
<div class="flex items-center justify-between mb-3">
|
||||||
|
<h3 class="font-bold text-gray-700 text-sm flex items-center gap-2">📁 Files</h3>
|
||||||
|
<a href="{{ route('files.index') }}?client_id={{ $client->id }}" class="text-xs text-pink-500">All Files →</a>
|
||||||
|
</div>
|
||||||
|
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3">
|
||||||
|
@foreach($client->mediaFiles as $file)
|
||||||
|
<a href="{{ route('files.serve', $file) }}" target="_blank"
|
||||||
|
class="bg-blue-50 rounded-2xl p-3 hover:bg-blue-100 transition-colors flex items-center gap-3">
|
||||||
|
<div class="shrink-0 text-xl border border-blue-200 rounded-lg w-10 h-10 flex items-center justify-center bg-white">
|
||||||
|
📄
|
||||||
|
</div>
|
||||||
|
<div class="min-w-0 flex-1">
|
||||||
|
<div class="font-semibold text-gray-700 text-sm truncate" title="{{ $file->name }}">{{ $file->name }}</div>
|
||||||
|
<div class="text-xs text-gray-400 mt-0.5">{{ number_format($file->size / 1024, 1) }} KB</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -50,8 +50,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- Sortable items container --}}
|
{{-- Sortable items container --}}
|
||||||
<div class="flex flex-col gap-2 flex-1 min-h-12 kanban-column"
|
<div class="flex flex-col gap-2 flex-1 min-h-12 kanban-column" data-col-status="{{ $status->value }}">
|
||||||
data-col-status="{{ $status->value }}">
|
|
||||||
|
|
||||||
@foreach($col['items'] as $brief)
|
@foreach($col['items'] as $brief)
|
||||||
<div class="bg-white rounded-2xl p-3 shadow-sm border border-pink-50 select-none
|
<div class="bg-white rounded-2xl p-3 shadow-sm border border-pink-50 select-none
|
||||||
@@ -59,8 +58,7 @@
|
|||||||
data-id="{{ $brief->id }}">
|
data-id="{{ $brief->id }}">
|
||||||
<div class="flex items-start gap-2 mb-1.5">
|
<div class="flex items-start gap-2 mb-1.5">
|
||||||
<span class="text-sm shrink-0">{{ $brief->platform_icon }}</span>
|
<span class="text-sm shrink-0">{{ $brief->platform_icon }}</span>
|
||||||
<a href="#"
|
<a href="#" data-brief="{{ json_encode([
|
||||||
data-brief="{{ json_encode([
|
|
||||||
'id' => $brief->id,
|
'id' => $brief->id,
|
||||||
'title' => $brief->title,
|
'title' => $brief->title,
|
||||||
'platform' => $brief->platform_icon . ' ' . ucfirst($brief->platform),
|
'platform' => $brief->platform_icon . ' ' . ucfirst($brief->platform),
|
||||||
@@ -70,8 +68,7 @@
|
|||||||
'hook' => $brief->hook,
|
'hook' => $brief->hook,
|
||||||
'body' => $brief->body,
|
'body' => $brief->body,
|
||||||
'notes' => $brief->notes
|
'notes' => $brief->notes
|
||||||
]) }}"
|
]) }}" @click.prevent="openModal(JSON.parse($el.dataset.brief))"
|
||||||
@click.prevent="openModal(JSON.parse($el.dataset.brief))"
|
|
||||||
class="font-semibold text-gray-800 text-xs leading-tight hover:text-pink-500 line-clamp-2 flex-1">
|
class="font-semibold text-gray-800 text-xs leading-tight hover:text-pink-500 line-clamp-2 flex-1">
|
||||||
{{ $brief->title }}
|
{{ $brief->title }}
|
||||||
</a>
|
</a>
|
||||||
@@ -103,52 +100,64 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
{{-- Content Detail Request Modal --}}
|
{{-- Content Detail Request Modal --}}
|
||||||
<div x-show="modalOpen" class="fixed inset-0 z-[60] flex items-center justify-center bg-black/40 backdrop-blur-sm" style="display: none;" x-transition>
|
<div x-show="modalOpen" class="fixed inset-0 z-[60] flex items-center justify-center bg-black/40 backdrop-blur-sm"
|
||||||
<div @click.outside="modalOpen = false" class="bg-white p-5 w-full max-w-lg rounded-3xl shadow-xl mx-4 max-h-[90vh] flex flex-col relative"
|
style="display: none;" x-transition>
|
||||||
x-transition:enter="transition ease-out duration-300"
|
<div @click.outside="modalOpen = false"
|
||||||
x-transition:enter-start="opacity-0 translate-y-4"
|
class="bg-white p-5 w-full max-w-lg rounded-3xl shadow-xl mx-4 max-h-[90vh] flex flex-col relative"
|
||||||
x-transition:enter-end="opacity-100 translate-y-0"
|
x-transition:enter="transition ease-out duration-300" x-transition:enter-start="opacity-0 translate-y-4"
|
||||||
x-transition:leave="transition ease-in duration-200"
|
x-transition:enter-end="opacity-100 translate-y-0" x-transition:leave="transition ease-in duration-200"
|
||||||
x-transition:leave-start="opacity-100 translate-y-0"
|
x-transition:leave-start="opacity-100 translate-y-0" x-transition:leave-end="opacity-0 translate-y-4">
|
||||||
x-transition:leave-end="opacity-0 translate-y-4">
|
|
||||||
<div class="flex items-center justify-between mb-4 border-b border-pink-50 pb-3 shrink-0">
|
<div class="flex items-center justify-between mb-4 border-b border-pink-50 pb-3 shrink-0">
|
||||||
<h3 class="font-extrabold text-gray-800 text-xl truncate pr-4" x-text="activeBrief?.title"></h3>
|
<h3 class="font-extrabold text-gray-800 text-xl truncate pr-4" x-text="activeBrief?.title"></h3>
|
||||||
<button @click="modalOpen = false" class="text-gray-400 hover:text-pink-500 hover:bg-pink-50 w-8 h-8 rounded-full flex items-center justify-center transition-colors">✕</button>
|
<button @click="modalOpen = false"
|
||||||
|
class="text-gray-400 hover:text-pink-500 hover:bg-pink-50 w-8 h-8 rounded-full flex items-center justify-center transition-colors">✕</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-sm text-gray-600 space-y-4 flex-1 overflow-y-auto pr-2 custom-scrollbar">
|
<div class="text-sm text-gray-600 space-y-4 flex-1 overflow-y-auto pr-2 custom-scrollbar">
|
||||||
<div class="flex gap-3"><span class="text-gray-400 w-20 shrink-0 font-medium">Platform</span><span class="font-bold text-gray-800" x-text="activeBrief?.platform"></span></div>
|
<div class="flex gap-3"><span class="text-gray-400 w-20 shrink-0 font-medium">Platform</span><span
|
||||||
<div class="flex gap-3"><span class="text-gray-400 w-20 shrink-0 font-medium">Status</span><span class="font-bold badge bg-pink-100 text-pink-700 rounded-full px-2 py-0.5" x-text="activeBrief?.status"></span></div>
|
class="font-bold text-gray-800" x-text="activeBrief?.platform"></span></div>
|
||||||
|
<div class="flex gap-3"><span class="text-gray-400 w-20 shrink-0 font-medium">Status</span><span
|
||||||
|
class="font-bold badge bg-pink-100 text-pink-700 rounded-full px-2 py-0.5"
|
||||||
|
x-text="activeBrief?.status"></span></div>
|
||||||
<template x-if="activeBrief?.client">
|
<template x-if="activeBrief?.client">
|
||||||
<div class="flex gap-3 items-center"><span class="text-gray-400 w-20 shrink-0 font-medium">Client</span><span class="font-semibold text-pink-500" x-text="activeBrief?.client"></span></div>
|
<div class="flex gap-3 items-center"><span
|
||||||
|
class="text-gray-400 w-20 shrink-0 font-medium">Client</span><span
|
||||||
|
class="font-semibold text-pink-500" x-text="activeBrief?.client"></span></div>
|
||||||
</template>
|
</template>
|
||||||
<template x-if="activeBrief?.target_date">
|
<template x-if="activeBrief?.target_date">
|
||||||
<div class="flex gap-3"><span class="text-gray-400 w-20 shrink-0 font-medium">Target</span><span class="font-medium" x-text="activeBrief?.target_date"></span></div>
|
<div class="flex gap-3"><span class="text-gray-400 w-20 shrink-0 font-medium">Target</span><span
|
||||||
|
class="font-medium" x-text="activeBrief?.target_date"></span></div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template x-if="activeBrief?.hook">
|
<template x-if="activeBrief?.hook">
|
||||||
<div class="flex flex-col gap-1 mt-4">
|
<div class="flex flex-col gap-1 mt-4">
|
||||||
<span class="text-gray-400 font-medium">🎣 Hook</span>
|
<span class="text-gray-400 font-medium">🎣 Hook</span>
|
||||||
<div class="whitespace-pre-wrap bg-pink-50/50 border border-pink-100 p-3 rounded-2xl text-gray-700 leading-relaxed" x-text="activeBrief?.hook"></div>
|
<div class="whitespace-pre-wrap bg-pink-50/50 border border-pink-100 p-3 rounded-2xl text-gray-700 leading-relaxed"
|
||||||
|
x-text="activeBrief?.hook"></div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template x-if="activeBrief?.body">
|
<template x-if="activeBrief?.body">
|
||||||
<div class="flex flex-col gap-1 mt-4">
|
<div class="flex flex-col gap-1 mt-4">
|
||||||
<span class="text-gray-400 font-medium">📖 Body</span>
|
<span class="text-gray-400 font-medium">📖 Body</span>
|
||||||
<div class="whitespace-pre-wrap bg-gray-50 border border-gray-100 p-3 rounded-2xl text-gray-700 leading-relaxed" x-text="activeBrief?.body"></div>
|
<div class="whitespace-pre-wrap bg-gray-50 border border-gray-100 p-3 rounded-2xl text-gray-700 leading-relaxed"
|
||||||
|
x-text="activeBrief?.body"></div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template x-if="activeBrief?.notes">
|
<template x-if="activeBrief?.notes">
|
||||||
<div class="flex flex-col gap-1 mt-4">
|
<div class="flex flex-col gap-1 mt-4">
|
||||||
<span class="text-gray-400 font-medium">📝 Notes</span>
|
<span class="text-gray-400 font-medium">📝 Notes</span>
|
||||||
<div class="whitespace-pre-wrap bg-yellow-50/50 border border-yellow-100 p-3 rounded-2xl text-gray-700 leading-relaxed" x-text="activeBrief?.notes"></div>
|
<div class="whitespace-pre-wrap bg-yellow-50/50 border border-yellow-100 p-3 rounded-2xl text-gray-700 leading-relaxed"
|
||||||
|
x-text="activeBrief?.notes"></div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex gap-3 mt-5 pt-4 border-t border-pink-50 shrink-0">
|
<div class="flex gap-3 mt-5 pt-4 border-t border-pink-50 shrink-0">
|
||||||
<a :href="`/content/${activeBrief?.id}/edit`" class="btn-sakura text-sm flex-1 text-center py-2.5">Edit Brief</a>
|
<a :href="`/content/${activeBrief?.id}/edit`" class="btn-sakura text-sm flex-1 text-center py-2.5">Edit
|
||||||
<a :href="`/content/${activeBrief?.id}`" class="py-2.5 rounded-full border border-pink-200 text-pink-500 text-sm hover:bg-pink-50 flex-1 text-center font-bold bg-white transition-colors">Details Page</a>
|
Brief</a>
|
||||||
|
<a :href="`/content/${activeBrief?.id}`"
|
||||||
|
class="py-2.5 rounded-full border border-pink-200 text-pink-500 text-sm hover:bg-pink-50 flex-1 text-center font-bold bg-white transition-colors">Details
|
||||||
|
Page</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -65,11 +65,6 @@
|
|||||||
<span class="text-lg shrink-0">👥</span> Clients
|
<span class="text-lg shrink-0">👥</span> Clients
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="{{ route('client-categories.index') }}" @click="sidebarOpen = false"
|
|
||||||
class="nav-item {{ request()->routeIs('client-categories.*') ? 'active' : '' }}">
|
|
||||||
<span class="text-lg shrink-0">🏷️</span> Categories
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<a href="{{ route('contracts.index') }}" @click="sidebarOpen = false"
|
<a href="{{ route('contracts.index') }}" @click="sidebarOpen = false"
|
||||||
class="nav-item {{ request()->routeIs('contracts.*') ? 'active' : '' }}">
|
class="nav-item {{ request()->routeIs('contracts.*') ? 'active' : '' }}">
|
||||||
<span class="text-lg shrink-0">📋</span> Contracts
|
<span class="text-lg shrink-0">📋</span> Contracts
|
||||||
@@ -112,6 +107,11 @@
|
|||||||
|
|
||||||
<div class="text-xs font-bold text-gray-400 uppercase tracking-wider mt-4 mb-1 px-2">Settings</div>
|
<div class="text-xs font-bold text-gray-400 uppercase tracking-wider mt-4 mb-1 px-2">Settings</div>
|
||||||
|
|
||||||
|
<a href="{{ route('client-categories.index') }}" @click="sidebarOpen = false"
|
||||||
|
class="nav-item {{ request()->routeIs('client-categories.*') ? 'active' : '' }}">
|
||||||
|
<span class="text-lg shrink-0">🏷️</span> Categories
|
||||||
|
</a>
|
||||||
|
|
||||||
<a href="{{ route('settings.notifications') }}" @click="sidebarOpen = false"
|
<a href="{{ route('settings.notifications') }}" @click="sidebarOpen = false"
|
||||||
class="nav-item {{ request()->routeIs('settings.*') ? 'active' : '' }}">
|
class="nav-item {{ request()->routeIs('settings.*') ? 'active' : '' }}">
|
||||||
<span class="text-lg shrink-0">🔔</span> Notifications
|
<span class="text-lg shrink-0">🔔</span> Notifications
|
||||||
@@ -191,9 +191,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="border-t border-pink-50 px-4 py-2">
|
<div class="border-t border-pink-50 px-4 py-2">
|
||||||
<a :href="'/search?q=' + encodeURIComponent(searchQuery)"
|
<a :href="`/search?q=${encodeURIComponent(searchQuery)}`"
|
||||||
class="text-xs text-pink-500 hover:text-pink-700 font-medium flex items-center gap-1"
|
class="text-xs text-pink-500 hover:text-pink-700 font-medium flex items-center gap-1">
|
||||||
@click="closeSearch()">
|
|
||||||
🔍 See all results for "<span x-text="searchQuery"></span>"
|
🔍 See all results for "<span x-text="searchQuery"></span>"
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -9,20 +9,13 @@
|
|||||||
<div x-data="notesApp({{ json_encode($notes) }})" x-cloak>
|
<div x-data="notesApp({{ json_encode($notes) }})" x-cloak>
|
||||||
|
|
||||||
{{-- ── Toolbar ──────────────────────────────────────────────── --}}
|
{{-- ── Toolbar ──────────────────────────────────────────────── --}}
|
||||||
<div class="flex items-center gap-2 mb-4">
|
<div class="flex items-center justify-between mb-4">
|
||||||
<button @click="openNew()" class="btn-sakura text-sm px-4 py-2 flex items-center gap-1.5 shrink-0">
|
<button @click="openNew()" class="btn-sakura text-sm px-4 py-2 flex items-center gap-1.5 shrink-0">
|
||||||
+ New Note
|
+ New Note
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{{-- Search --}}
|
|
||||||
<div class="relative flex-1 max-w-xs">
|
|
||||||
<span class="absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 text-sm pointer-events-none"></span>
|
|
||||||
<input type="text" x-model="searchQuery" placeholder="🔍Search notes…"
|
|
||||||
class="input-soft pl-9 text-sm py-2 w-full">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{-- Count --}}
|
{{-- Count --}}
|
||||||
<span class="ml-auto text-xs text-gray-400 shrink-0"
|
<span class="text-xs text-gray-400 shrink-0"
|
||||||
x-text="notes.length + ' note' + (notes.length !== 1 ? 's' : '')"></span>
|
x-text="notes.length + ' note' + (notes.length !== 1 ? 's' : '')"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -121,7 +114,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
{{-- ── Empty state ──────────────────────────────────────────── --}}
|
{{-- Empty state is only when NO notes exist --}}
|
||||||
<template x-if="notes.length === 0">
|
<template x-if="notes.length === 0">
|
||||||
<div class="text-center py-20 text-gray-400">
|
<div class="text-center py-20 text-gray-400">
|
||||||
<span class="text-5xl block mb-3">📝</span>
|
<span class="text-5xl block mb-3">📝</span>
|
||||||
@@ -130,13 +123,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template x-if="notes.length > 0 && filteredPinned.length === 0 && filteredUnpinned.length === 0">
|
|
||||||
<div class="text-center py-12 text-gray-400">
|
|
||||||
<span class="text-3xl block mb-2">🔍</span>
|
|
||||||
<p class="text-sm">No notes match "<span x-text="searchQuery"></span>"</p>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
|
|
||||||
{{-- ════════════════════════════════════════════════════════════
|
{{-- ════════════════════════════════════════════════════════════
|
||||||
Note Editor Modal
|
Note Editor Modal
|
||||||
@@ -285,20 +271,11 @@
|
|||||||
|
|
||||||
// ── Computed / Filtered ───────────────────────────────
|
// ── Computed / Filtered ───────────────────────────────
|
||||||
get filteredPinned() {
|
get filteredPinned() {
|
||||||
return this.filterNotes(this.notes.filter(n => n.is_pinned));
|
return this.notes.filter(n => n.is_pinned);
|
||||||
},
|
},
|
||||||
|
|
||||||
get filteredUnpinned() {
|
get filteredUnpinned() {
|
||||||
return this.filterNotes(this.notes.filter(n => !n.is_pinned));
|
return this.notes.filter(n => !n.is_pinned);
|
||||||
},
|
|
||||||
|
|
||||||
filterNotes(list) {
|
|
||||||
const q = this.searchQuery.trim().toLowerCase();
|
|
||||||
if (!q) return list;
|
|
||||||
return list.filter(n =>
|
|
||||||
(n.title || '').toLowerCase().includes(q) ||
|
|
||||||
(n.content || []).some(b => (b.text || '').toLowerCase().includes(q))
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// ── Modal open/close ─────────────────────────────────
|
// ── Modal open/close ─────────────────────────────────
|
||||||
|
|||||||
@@ -12,83 +12,225 @@
|
|||||||
@endphp
|
@endphp
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Rate Card — {{ $profile->owner_name }}</title>
|
<title>Rate Card — {{ $profile->owner_name }}</title>
|
||||||
<style>
|
<style>
|
||||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: 'DejaVu Sans', sans-serif;
|
font-family: 'DejaVu Sans', sans-serif;
|
||||||
background: {{ $bg }};
|
background:
|
||||||
color: {{ $text }};
|
{{ $bg }}
|
||||||
|
;
|
||||||
|
color:
|
||||||
|
{{ $text }}
|
||||||
|
;
|
||||||
padding: 36px 32px;
|
padding: 36px 32px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
margin-top: 40px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 11px;
|
||||||
|
color: #D1D5DB;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Quill WYSIWYG Compatibility */
|
||||||
|
.ql-align-center {
|
||||||
|
text-align: center !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ql-align-right {
|
||||||
|
text-align: right !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ql-align-justify {
|
||||||
|
text-align: justify !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ql-size-small {
|
||||||
|
font-size: 0.75em !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ql-size-large {
|
||||||
|
font-size: 1.5em !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ql-size-huge {
|
||||||
|
font-size: 2.5em !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contact-person-page,
|
||||||
|
.terms-and-conditions-page {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
border-bottom: 2px solid {{ $accentHex }};
|
border-bottom: 2px solid
|
||||||
|
{{ $accentHex }}
|
||||||
|
;
|
||||||
}
|
}
|
||||||
.logo-img { max-height: 72px; max-width: 140px; margin: 0 auto 10px; display: block; }
|
|
||||||
.name { font-size: 24px; font-weight: 700; color: {{ $accentHex }}; }
|
.logo-img {
|
||||||
.tagline { color: #9CA3AF; margin-top: 4px; font-size: 11px; }
|
max-height: 72px;
|
||||||
.contacts { margin-top: 10px; font-size: 10px; color: #6B7280; }
|
max-width: 140px;
|
||||||
.contacts span { margin: 0 6px; }
|
margin: 0 auto 10px;
|
||||||
.platform-section { margin-bottom: 22px; }
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.name {
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: 700;
|
||||||
|
color:
|
||||||
|
{{ $accentHex }}
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tagline {
|
||||||
|
color: #9CA3AF;
|
||||||
|
margin-top: 4px;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contacts {
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 10px;
|
||||||
|
color: #6B7280;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contacts span {
|
||||||
|
margin: 0 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.platform-section {
|
||||||
|
margin-bottom: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
.platform-title {
|
.platform-title {
|
||||||
font-size: 13px; font-weight: 700;
|
font-size: 13px;
|
||||||
color: {{ $text }};
|
font-weight: 700;
|
||||||
|
color:
|
||||||
|
{{ $text }}
|
||||||
|
;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
background-color: rgba({{ $accentRgb }}, 0.1);
|
background-color: rgba({{ $accentRgb }}, 0.1);
|
||||||
border-left: 4px solid {{ $accentHex }};
|
border-left: 4px solid
|
||||||
|
{{ $accentHex }}
|
||||||
|
;
|
||||||
}
|
}
|
||||||
table { width: 100%; border-collapse: collapse; }
|
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
th {
|
th {
|
||||||
text-align: left; padding: 7px 10px;
|
text-align: left;
|
||||||
|
padding: 7px 10px;
|
||||||
background-color: rgba({{ $accentRgb }}, 0.08);
|
background-color: rgba({{ $accentRgb }}, 0.08);
|
||||||
color: #6B7280; font-size: 9px;
|
color: #6B7280;
|
||||||
text-transform: uppercase; letter-spacing: 0.05em;
|
font-size: 9px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
border-bottom: 1px solid rgba({{ $accentRgb }}, 0.25);
|
border-bottom: 1px solid rgba({{ $accentRgb }}, 0.25);
|
||||||
}
|
}
|
||||||
td { padding: 8px 10px; border-bottom: 1px solid #F3F4F6; vertical-align: top; }
|
|
||||||
tr:last-child td { border-bottom: none; }
|
td {
|
||||||
.service-name { font-weight: 600; color: {{ $text }}; }
|
padding: 8px 10px;
|
||||||
.content-type {
|
border-bottom: 1px solid #F3F4F6;
|
||||||
display: inline-block; font-size: 9px;
|
vertical-align: top;
|
||||||
background-color: rgba({{ $accentRgb }}, 0.1);
|
}
|
||||||
color: {{ $accentHex }};
|
|
||||||
padding: 1px 7px; border-radius: 10px; margin-top: 2px;
|
tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.service-name {
|
||||||
|
font-weight: 600;
|
||||||
|
color:
|
||||||
|
{{ $text }}
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-type {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 9px;
|
||||||
|
background-color: rgba({{ $accentRgb }}, 0.1);
|
||||||
|
color:
|
||||||
|
{{ $accentHex }}
|
||||||
|
;
|
||||||
|
padding: 1px 7px;
|
||||||
|
border-radius: 10px;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.desc {
|
||||||
|
color: #9CA3AF;
|
||||||
|
font-size: 10px;
|
||||||
|
margin-top: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
font-weight: 700;
|
||||||
|
color:
|
||||||
|
{{ $accentHex }}
|
||||||
|
;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.price-unit {
|
||||||
|
color: #9CA3AF;
|
||||||
|
font-size: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.negotiable {
|
||||||
|
color: #F59E0B;
|
||||||
|
font-size: 9px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 36px;
|
||||||
|
color: #D1D5DB;
|
||||||
|
font-size: 9px;
|
||||||
|
border-top: 1px solid #F3F4F6;
|
||||||
|
padding-top: 14px;
|
||||||
}
|
}
|
||||||
.desc { color: #9CA3AF; font-size: 10px; margin-top: 3px; }
|
|
||||||
.price { font-weight: 700; color: {{ $accentHex }}; font-size: 13px; }
|
|
||||||
.price-unit { color: #9CA3AF; font-size: 9px; }
|
|
||||||
.negotiable { color: #F59E0B; font-size: 9px; font-weight: 600; }
|
|
||||||
.footer { text-align: center; margin-top: 36px; color: #D1D5DB; font-size: 9px; border-top: 1px solid #F3F4F6; padding-top: 14px; }
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="header">
|
<div class="header">
|
||||||
@if($profile->logo_path && file_exists(storage_path('app/private/' . $profile->logo_path)))
|
@if($profile->logo_path && file_exists(storage_path('app/private/' . $profile->logo_path)))
|
||||||
<img src="{{ storage_path('app/private/' . $profile->logo_path) }}" class="logo-img" alt="{{ $profile->owner_name }}">
|
<img src="{{ storage_path('app/private/' . $profile->logo_path) }}" class="logo-img"
|
||||||
|
alt="{{ $profile->owner_name }}">
|
||||||
@endif
|
@endif
|
||||||
<div class="name">{{ $profile->owner_name }}</div>
|
<div class="name">{{ $profile->owner_name }}</div>
|
||||||
@if($profile->tagline)
|
@if($profile->tagline)
|
||||||
<div class="tagline">{{ $profile->tagline }}</div>
|
<div class="tagline">{{ $profile->tagline }}</div>
|
||||||
@endif
|
@endif
|
||||||
<div class="contacts">
|
<div class="contacts">
|
||||||
@if($profile->email)<span>✉ {{ $profile->email }}</span>@endif
|
@if($profile->ig_handle)<span>· {{ '@' . ltrim($profile->ig_handle, '@') }}</span>@endif
|
||||||
@if($profile->whatsapp)<span>· {{ $profile->whatsapp }}</span>@endif
|
@if($profile->tiktok_handle)<span>· {{ '@' . ltrim($profile->tiktok_handle, '@') }}</span>@endif
|
||||||
@if($profile->ig_handle)<span>· @{{ $profile->ig_handle }}</span>@endif
|
|
||||||
@if($profile->tiktok_handle)<span>· @{{ $profile->tiktok_handle }}</span>@endif
|
|
||||||
@if($profile->youtube_handle)<span>· {{ $profile->youtube_handle }}</span>@endif
|
@if($profile->youtube_handle)<span>· {{ $profile->youtube_handle }}</span>@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@foreach($rateCards as $platform => $cards)
|
@foreach($rateCards as $platform => $cards)
|
||||||
<div class="platform-section">
|
<div class="platform-section">
|
||||||
<div class="platform-title">
|
<div class="platform-title">
|
||||||
@php $icons = ['instagram' => 'Instagram', 'tiktok' => 'TikTok', 'youtube' => 'YouTube', 'general' => 'General']; @endphp
|
@php $icons = ['instagram' => 'Instagram', 'tiktok' => 'TikTok', 'youtube' => 'YouTube', 'general' => 'General']; @endphp
|
||||||
{{ $icons[$platform] ?? ucfirst($platform) }}
|
{{ $icons[$platform] ?? ucfirst($platform) }}
|
||||||
@@ -130,13 +272,81 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
</div>
|
||||||
|
@endforeach
|
||||||
|
|
||||||
<div class="footer">
|
@if(!empty($profile->past_brands))
|
||||||
|
@php
|
||||||
|
$logoSizesPdf = [
|
||||||
|
'small' => 'max-height:30px; max-width:60px;',
|
||||||
|
'medium' => 'max-height:45px; max-width:90px;',
|
||||||
|
'large' => 'max-height:65px; max-width:130px;',
|
||||||
|
];
|
||||||
|
$sizeStylePdf = $logoSizesPdf[$profile->brand_logo_size ?? 'medium'] ?? $logoSizesPdf['medium'];
|
||||||
|
@endphp
|
||||||
|
<div style="page-break-before: always;"></div>
|
||||||
|
<div class="platform-section" style="margin-top:20px; page-break-inside:avoid;">
|
||||||
|
<div class="platform-title" style="text-align:center;">Brand Collaborations</div>
|
||||||
|
<div style="text-align:center; padding-top:10px;">
|
||||||
|
@foreach($profile->past_brands as $brandPath)
|
||||||
|
@if(file_exists(storage_path('app/public/' . $brandPath)))
|
||||||
|
<img src="{{ storage_path('app/public/' . $brandPath) }}"
|
||||||
|
style="{{ $sizeStylePdf }} object-fit:contain; margin:0 10px; display:inline-block; vertical-align:middle;">
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if($profile->terms_and_conditions)
|
||||||
|
<div style="page-break-before: always;"></div>
|
||||||
|
<div class="platform-section" style="margin-top:20px; page-break-inside:avoid;">
|
||||||
|
<div class="platform-title">Terms & Conditions</div>
|
||||||
|
<div style="font-size:10px; color:#6B7280; line-height:1.5; padding:0 10px;">
|
||||||
|
{!! $profile->terms_and_conditions !!}</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<div style="page-break-before: always;"></div>
|
||||||
|
@if($profile->contact_person_html)
|
||||||
|
<div class="contact-person-page">
|
||||||
|
{!! $profile->contact_person_html !!}
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
<div style="text-align: center; margin-top: 40px;">
|
||||||
|
<h1
|
||||||
|
style="font-family: 'Comic Sans MS', sans-serif; font-size: 32px; font-weight: 900; letter-spacing: 4px; color: #111827; margin-bottom: 30px; text-transform: uppercase;">
|
||||||
|
CONTACT PERSON</h1>
|
||||||
|
@if($profile->whatsapp)
|
||||||
|
<div
|
||||||
|
style="font-family: 'Comic Sans MS', sans-serif; font-size: 36px; font-weight: 900; color: #14b8a6; margin-bottom: 5px;">
|
||||||
|
{{ $profile->whatsapp }}</div>
|
||||||
|
<div
|
||||||
|
style="font-family: 'Comic Sans MS', sans-serif; font-size: 20px; font-weight: 800; color: #14b8a6; margin-bottom: 30px; letter-spacing: 2px;">
|
||||||
|
(WHATS APP)</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if($profile->email)
|
||||||
|
<div
|
||||||
|
style="font-family: 'Comic Sans MS', sans-serif; font-size: 14px; font-weight: 800; color: #f97316; margin-bottom: 10px; letter-spacing: 2px;">
|
||||||
|
EMAIL</div>
|
||||||
|
<div
|
||||||
|
style="font-family: 'Comic Sans MS', sans-serif; font-size: 32px; font-weight: 900; color: #ef4444; margin-bottom: 40px; letter-spacing: 2px;">
|
||||||
|
{{ strtoupper($profile->email) }}</div>
|
||||||
|
@endif
|
||||||
|
<div
|
||||||
|
style="font-size: 11px; font-weight: 900; color: #111827; line-height: 1.5; max-width: 80%; margin: 0 auto; text-transform: uppercase;">
|
||||||
|
Kami tidak bertanggung jawab atas segala bentuk kerjasama yg timbul dengan pihak selain dari kontak diatas
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<div class="footer">
|
||||||
{{ $profile->custom_footer ?: 'Prices may vary. Contact for custom packages.' }}
|
{{ $profile->custom_footer ?: 'Prices may vary. Contact for custom packages.' }}
|
||||||
· Generated {{ now()->format('d M Y') }}
|
· Generated {{ now()->format('d M Y') }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -4,6 +4,8 @@
|
|||||||
@section('page-subtitle', 'Customise your public rate card page')
|
@section('page-subtitle', 'Customise your public rate card page')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
<link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
|
||||||
|
<script src="https://cdn.quilljs.com/1.3.6/quill.min.js"></script>
|
||||||
<div class="max-w-3xl mx-auto space-y-5">
|
<div class="max-w-3xl mx-auto space-y-5">
|
||||||
|
|
||||||
@if(session('success'))
|
@if(session('success'))
|
||||||
@@ -81,20 +83,79 @@
|
|||||||
<h2 class="font-bold text-gray-700">Appearance</h2>
|
<h2 class="font-bold text-gray-700">Appearance</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-5 grid grid-cols-1 sm:grid-cols-2 gap-4">
|
<div class="p-5 grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||||
<div class="sm:col-span-2">
|
<div class="sm:col-span-2" x-data="{
|
||||||
|
uploading: false,
|
||||||
|
errorMsg: '',
|
||||||
|
logoUrl: '{{ $profile->logo_path ? route('files.serve-profile-logo') : '' }}',
|
||||||
|
|
||||||
|
async pickFile(input) {
|
||||||
|
if (!input.files.length) return;
|
||||||
|
this.uploading = true;
|
||||||
|
this.errorMsg = '';
|
||||||
|
const fd = new FormData();
|
||||||
|
fd.append('logo', input.files[0]);
|
||||||
|
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
|
||||||
|
try {
|
||||||
|
const res = await fetch('{{ route('rate-cards.profile.upload-logo', [], false) }}', {
|
||||||
|
method: 'POST',
|
||||||
|
body: fd,
|
||||||
|
headers: {
|
||||||
|
'Accept': 'application/json'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const data = await res.json();
|
||||||
|
if (res.ok) {
|
||||||
|
this.logoUrl = data.url + '?t=' + Date.now();
|
||||||
|
} else {
|
||||||
|
this.errorMsg = data.message ?? 'Upload failed.';
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
this.errorMsg = 'Network error. Please try again.';
|
||||||
|
}
|
||||||
|
this.uploading = false;
|
||||||
|
input.value = '';
|
||||||
|
},
|
||||||
|
|
||||||
|
async removeLogo() {
|
||||||
|
if (!confirm('Remove this logo?')) return;
|
||||||
|
const fd = new FormData();
|
||||||
|
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
|
||||||
|
fd.append('_method', 'DELETE');
|
||||||
|
await fetch('{{ route('rate-cards.profile.delete-logo', [], false) }}', {
|
||||||
|
method: 'POST',
|
||||||
|
body: fd,
|
||||||
|
headers: { 'Accept': 'application/json' }
|
||||||
|
});
|
||||||
|
this.logoUrl = '';
|
||||||
|
}
|
||||||
|
}">
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Logo / Profile Image</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Logo / Profile Image</label>
|
||||||
@if($profile->logo_path)
|
|
||||||
<div class="flex items-center gap-3 mb-2">
|
<template x-if="logoUrl">
|
||||||
<img src="{{ route('files.serve-profile-logo') }}" alt="Logo"
|
<div class="flex items-center gap-3 mb-3">
|
||||||
class="w-16 h-16 object-cover rounded-2xl border border-pink-100">
|
<img :src="logoUrl" alt="Logo"
|
||||||
<span class="text-xs text-gray-400">Current logo</span>
|
class="w-16 h-16 object-cover rounded-2xl border border-pink-100 shrink-0">
|
||||||
|
<div class="flex-1 min-w-0">
|
||||||
|
<p class="text-xs font-semibold text-gray-600">Current Logo</p>
|
||||||
|
<p class="text-xs text-gray-400 mt-0.5">Choose a new file to replace it</p>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
<button type="button" @click="removeLogo()"
|
||||||
<input type="file" name="logo" accept="image/*" class="w-full text-sm text-gray-600
|
class="text-xs px-3 py-1.5 rounded-full border border-red-200 text-red-400 hover:bg-red-50 shrink-0">
|
||||||
|
🗑️ Remove
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<div class="relative">
|
||||||
|
<input type="file" accept="image/*" @change="pickFile($event.target)" class="w-full text-sm text-gray-600
|
||||||
file:mr-3 file:py-2 file:px-4 file:rounded-full file:border-0
|
file:mr-3 file:py-2 file:px-4 file:rounded-full file:border-0
|
||||||
file:text-xs file:font-semibold file:bg-pink-50 file:text-pink-600
|
file:text-xs file:font-semibold file:bg-pink-50 file:text-pink-600
|
||||||
hover:file:bg-pink-100 cursor-pointer">
|
hover:file:bg-pink-100 cursor-pointer" :disabled="uploading">
|
||||||
<p class="text-xs text-gray-400 mt-1">Max 2MB. PNG/JPG/WebP.</p>
|
<span x-show="uploading" class="text-xs text-pink-500 mt-1 block">Uploading…</span>
|
||||||
|
<span x-show="errorMsg" x-text="errorMsg" class="text-xs text-red-500 mt-1 block"></span>
|
||||||
|
</div>
|
||||||
|
<p class="text-xs text-gray-400 mt-1">Max 2MB. Uploads immediately on file selection.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -128,7 +189,82 @@
|
|||||||
class="input-soft text-sm flex-1" readonly>
|
class="input-soft text-sm flex-1" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="sm:col-span-2" x-data="{
|
||||||
|
init() {
|
||||||
|
var quill = new Quill(this.$refs.editor, {
|
||||||
|
theme: 'snow',
|
||||||
|
placeholder: 'e.g. 1. 50% down payment required. 2. Rates valid for 30 days.',
|
||||||
|
modules: {
|
||||||
|
toolbar: [
|
||||||
|
[{ 'size': ['small', false, 'large', 'huge'] }],
|
||||||
|
['bold', 'italic', 'underline', 'strike'],
|
||||||
|
[{ 'color': [] }, { 'background': [] }],
|
||||||
|
[{ 'list': 'ordered'}, { 'list': 'bullet' }],
|
||||||
|
['clean']
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
quill.on('text-change', () => {
|
||||||
|
this.$refs.input.value = quill.root.innerHTML;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}">
|
||||||
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Terms & Conditions</label>
|
||||||
|
<input type="hidden" name="terms_and_conditions" x-ref="input"
|
||||||
|
value="{{ old('terms_and_conditions', $profile->terms_and_conditions) }}">
|
||||||
|
<div class="bg-white rounded-lg border border-pink-200">
|
||||||
|
<div x-ref="editor" style="min-height: 120px;">
|
||||||
|
{!! old('terms_and_conditions', $profile->terms_and_conditions) !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="sm:col-span-2" x-data="{
|
||||||
|
init() {
|
||||||
|
var quill = new Quill(this.$refs.editor, {
|
||||||
|
theme: 'snow',
|
||||||
|
placeholder: 'Customize your Contact Person Page formatting...',
|
||||||
|
modules: {
|
||||||
|
toolbar: [
|
||||||
|
[{ 'size': ['small', false, 'large', 'huge'] }],
|
||||||
|
['bold', 'italic', 'underline', 'strike'],
|
||||||
|
[{ 'color': [] }, { 'background': [] }],
|
||||||
|
[{ 'align': [] }],
|
||||||
|
['clean']
|
||||||
|
]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
quill.on('text-change', () => {
|
||||||
|
this.$refs.input.value = quill.root.innerHTML;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}">
|
||||||
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Contact Person Page (PDF)</label>
|
||||||
|
@php
|
||||||
|
$defaultContactHtml = '<div style="text-align: center; margin-top: 40px;">
|
||||||
|
<h1 style="font-family: \'Comic Sans MS\', sans-serif; font-size: 32px; font-weight: 900; letter-spacing: 4px; color: #111827; margin-bottom: 30px; text-transform: uppercase;">CONTACT PERSON</h1>';
|
||||||
|
if ($profile->whatsapp) {
|
||||||
|
$defaultContactHtml .= '<div style="font-family: \'Comic Sans MS\', sans-serif; font-size: 36px; font-weight: 900; color: #14b8a6; margin-bottom: 5px;">' . $profile->whatsapp . '</div>
|
||||||
|
<div style="font-family: \'Comic Sans MS\', sans-serif; font-size: 20px; font-weight: 800; color: #14b8a6; margin-bottom: 30px; letter-spacing: 2px;">(WHATS APP)</div>';
|
||||||
|
}
|
||||||
|
if ($profile->email) {
|
||||||
|
$defaultContactHtml .= '<div style="font-family: \'Comic Sans MS\', sans-serif; font-size: 14px; font-weight: 800; color: #f97316; margin-bottom: 10px; letter-spacing: 2px;">EMAIL</div>
|
||||||
|
<div style="font-family: \'Comic Sans MS\', sans-serif; font-size: 32px; font-weight: 900; color: #ef4444; margin-bottom: 40px; letter-spacing: 2px;">' . strtoupper($profile->email) . '</div>';
|
||||||
|
}
|
||||||
|
$defaultContactHtml .= '<div style="font-size: 11px; font-weight: 900; color: #111827; line-height: 1.5; max-width: 80%; margin: 0 auto; text-transform: uppercase;">
|
||||||
|
Kami tidak bertanggung jawab atas segala bentuk kerjasama yg timbul dengan pihak selain dari kontak diatas
|
||||||
|
</div>
|
||||||
|
</div>';
|
||||||
|
@endphp
|
||||||
|
<input type="hidden" name="contact_person_html" x-ref="input"
|
||||||
|
value="{{ old('contact_person_html', $profile->contact_person_html) }}">
|
||||||
|
<div class="bg-white rounded-lg border border-pink-200">
|
||||||
|
<div x-ref="editor" style="min-height: 120px;">
|
||||||
|
{!! old('contact_person_html', $profile->contact_person_html ?: $defaultContactHtml) !!}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sm:col-span-2">
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Custom Footer</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Custom Footer</label>
|
||||||
<input type="text" name="custom_footer" value="{{ old('custom_footer', $profile->custom_footer) }}"
|
<input type="text" name="custom_footer" value="{{ old('custom_footer', $profile->custom_footer) }}"
|
||||||
class="input-soft" placeholder="e.g. Prices valid until Dec 2025 · DM for bundles">
|
class="input-soft" placeholder="e.g. Prices valid until Dec 2025 · DM for bundles">
|
||||||
@@ -146,6 +282,79 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Past Brands --}}
|
||||||
|
<div class="cat-card overflow-hidden">
|
||||||
|
<div class="flex items-center gap-3 px-5 py-4 border-b border-pink-50">
|
||||||
|
<span class="text-xl"></span>
|
||||||
|
<h2 class="font-bold text-gray-700">Brand Collaborations Logo</h2>
|
||||||
|
</div>
|
||||||
|
<div class="p-5" x-data="{
|
||||||
|
uploading: false,
|
||||||
|
brands: {{ Illuminate\Support\Js::from($profile->past_brands ?? []) }},
|
||||||
|
async pickBrand(input) {
|
||||||
|
if (!input.files.length) return;
|
||||||
|
this.uploading = true;
|
||||||
|
const fd = new FormData();
|
||||||
|
for (let i = 0; i < input.files.length; i++) {
|
||||||
|
fd.set('logo', input.files[i]);
|
||||||
|
fd.set('_token', document.querySelector('meta[name=csrf-token]').content);
|
||||||
|
try {
|
||||||
|
const res = await fetch('{{ route('rate-cards.profile.upload-brand-logo', [], false) }}', { method: 'POST', body: fd, headers: { 'Accept': 'application/json' } });
|
||||||
|
const data = await res.json();
|
||||||
|
if (res.ok) this.brands.push(data.path);
|
||||||
|
} catch (e) { console.error(e); }
|
||||||
|
}
|
||||||
|
this.uploading = false;
|
||||||
|
input.value = '';
|
||||||
|
},
|
||||||
|
async removeBrand(path, index) {
|
||||||
|
if(!confirm('Remove this brand?')) return;
|
||||||
|
const fd = new FormData();
|
||||||
|
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
|
||||||
|
fd.append('_method', 'DELETE');
|
||||||
|
fd.append('path', path);
|
||||||
|
await fetch('{{ route('rate-cards.profile.delete-brand-logo', [], false) }}', { method: 'POST', body: fd, headers: {'Accept': 'application/json'} });
|
||||||
|
this.brands.splice(index, 1);
|
||||||
|
}
|
||||||
|
}">
|
||||||
|
<div class="flex items-center justify-between mb-2">
|
||||||
|
<label class="block text-xs font-semibold text-gray-600">Brand Logos</label>
|
||||||
|
<div class="flex items-center gap-2">
|
||||||
|
<span class="text-[10px] text-gray-500 uppercase tracking-widest font-semibold">Display Size on PDF:</span>
|
||||||
|
<select name="brand_logo_size" class="text-xs border-pink-200 rounded-md py-1 pr-8 pl-2 focus:ring-pink-500 focus:border-pink-500 bg-white">
|
||||||
|
<option value="small" {{ old('brand_logo_size', $profile->brand_logo_size ?? 'medium') == 'small' ? 'selected' : '' }}>Small</option>
|
||||||
|
<option value="medium" {{ old('brand_logo_size', $profile->brand_logo_size ?? 'medium') == 'medium' ? 'selected' : '' }}>Medium</option>
|
||||||
|
<option value="large" {{ old('brand_logo_size', $profile->brand_logo_size ?? 'medium') == 'large' ? 'selected' : '' }}>Large</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-wrap gap-4 mb-3">
|
||||||
|
<template x-for="(path, index) in brands" :key="index">
|
||||||
|
<div
|
||||||
|
class="relative rounded-2xl border border-pink-100 p-2 flex items-center justify-center bg-white group shrink-0"
|
||||||
|
style="width: 100px; height: 100px;">
|
||||||
|
<img :src="'/storage/' + path" class="max-w-full max-h-full object-contain">
|
||||||
|
<button type="button" @click="removeBrand(path, index)"
|
||||||
|
class="absolute -bottom-2 -right-2 bg-red-100 text-red-500 rounded-full w-6 h-6 flex items-center justify-center hover:bg-red-200 shadow text-[10px] z-10 transition-colors">🗑️</button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<label
|
||||||
|
class="rounded-2xl border-2 border-dashed border-pink-200 flex items-center justify-center text-pink-300 hover:bg-pink-50 hover:text-pink-400 cursor-pointer transition-colors shrink-0"
|
||||||
|
style="width: 100px; height: 100px;"
|
||||||
|
:class="{'opacity-50 pointer-events-none': uploading}">
|
||||||
|
<span x-show="!uploading" class="text-2xl">+</span>
|
||||||
|
<span x-show="uploading" class="text-xs">...</span>
|
||||||
|
<input type="file" multiple accept="image/*" class="hidden" @change="pickBrand($event.target)">
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<p class="text-xs text-gray-400 mt-1">Upload brand logos you've worked with. They will be displayed on your rate
|
||||||
|
cards.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{-- Actions --}}
|
{{-- Actions --}}
|
||||||
<div class="flex flex-wrap items-center gap-3">
|
<div class="flex flex-wrap items-center gap-3">
|
||||||
<button type="submit" class="btn-sakura px-6 py-2.5">💾 Save Profile</button>
|
<button type="submit" class="btn-sakura px-6 py-2.5">💾 Save Profile</button>
|
||||||
|
|||||||
@@ -171,10 +171,35 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
|
margin-top: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 60px;
|
|
||||||
color: #D1D5DB;
|
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
color: #D1D5DB;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Quill WYSIWYG Compatibility */
|
||||||
|
.ql-align-center {
|
||||||
|
text-align: center !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ql-align-right {
|
||||||
|
text-align: right !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ql-align-justify {
|
||||||
|
text-align: justify !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ql-size-small {
|
||||||
|
font-size: 0.75em !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ql-size-large {
|
||||||
|
font-size: 1.5em !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ql-size-huge {
|
||||||
|
font-size: 2.5em !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pdf-btn {
|
.pdf-btn {
|
||||||
@@ -283,6 +308,34 @@
|
|||||||
<p style="text-align:center; color:#9CA3AF; padding: 60px 0;">No rate cards published yet.</p>
|
<p style="text-align:center; color:#9CA3AF; padding: 60px 0;">No rate cards published yet.</p>
|
||||||
@endforelse
|
@endforelse
|
||||||
|
|
||||||
|
@if(!empty($profile->past_brands))
|
||||||
|
@php
|
||||||
|
$logoSizesPublic = [
|
||||||
|
'small' => 'max-height:45px; max-width:90px;',
|
||||||
|
'medium' => 'max-height:60px; max-width:120px;',
|
||||||
|
'large' => 'max-height:80px; max-width:160px;',
|
||||||
|
];
|
||||||
|
$sizeStylePublic = $logoSizesPublic[$profile->brand_logo_size ?? 'medium'] ?? $logoSizesPublic['medium'];
|
||||||
|
@endphp
|
||||||
|
<div class="platform-section" style="margin-top:40px;">
|
||||||
|
<div class="platform-title" style="justify-content:center;">Brand Collaborations</div>
|
||||||
|
<div style="display:flex; flex-wrap:wrap; justify-content:center; gap:24px; margin-top:20px;">
|
||||||
|
@foreach($profile->past_brands as $brandPath)
|
||||||
|
<img src="{{ asset('storage/' . $brandPath) }}"
|
||||||
|
style="{{ $sizeStylePublic }} object-fit:contain; border-radius:8px;">
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if($profile->terms_and_conditions)
|
||||||
|
<div class="platform-section" style="margin-top:40px;">
|
||||||
|
<div class="platform-title">Terms & Conditions</div>
|
||||||
|
<div class="card" style="font-size:13px; color:#6B7280; line-height:1.6;">
|
||||||
|
{!! $profile->terms_and_conditions !!}</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
{{ $profile->custom_footer ?: 'Prices may vary. Contact for custom packages.' }}
|
{{ $profile->custom_footer ?: 'Prices may vary. Contact for custom packages.' }}
|
||||||
<!--<br>Generated by Cathy's App · {{ now()->format('Y-M-D') }}-->
|
<!--<br>Generated by Cathy's App · {{ now()->format('Y-M-D') }}-->
|
||||||
|
|||||||
@@ -217,8 +217,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Category Name <span
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Category Name <span
|
||||||
class="text-pink-400">*</span></label>
|
class="text-pink-400">*</span></label>
|
||||||
<input type="text" x-model="newCatName" class="input-soft text-sm"
|
<input type="text" x-model="newCatName" class="input-soft text-sm" placeholder="e.g. Susu UHT">
|
||||||
placeholder="e.g. Sponsored Post">
|
|
||||||
</div>
|
</div>
|
||||||
<p x-show="catErrMsg" x-text="catErrMsg" class="text-xs text-red-500"></p>
|
<p x-show="catErrMsg" x-text="catErrMsg" class="text-xs text-red-500"></p>
|
||||||
<div class="flex gap-2 pt-1">
|
<div class="flex gap-2 pt-1">
|
||||||
|
|||||||
@@ -6,33 +6,19 @@
|
|||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
<form method="GET" action="{{ route('search.index') }}" class="mb-6">
|
@if(!$q)
|
||||||
<div class="relative max-w-xl">
|
|
||||||
<span class="absolute left-4 top-1/2 -translate-y-1/2 text-gray-400">🔍</span>
|
|
||||||
<input
|
|
||||||
type="text"
|
|
||||||
name="q"
|
|
||||||
value="{{ e($q) }}"
|
|
||||||
placeholder="Search clients, events, invoices, content…"
|
|
||||||
class="input-soft pl-11 py-3 text-base w-full"
|
|
||||||
autofocus
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
@if(! $q)
|
|
||||||
<div class="text-center py-20 text-gray-400">
|
<div class="text-center py-20 text-gray-400">
|
||||||
<span class="text-5xl block mb-3">🔍</span>
|
<span class="text-5xl block mb-3">🔍</span>
|
||||||
<p class="text-base font-medium">Start typing to search across everything</p>
|
<p class="text-base font-medium">Start typing to search across everything</p>
|
||||||
<p class="text-sm mt-1">Clients, events, invoices, content briefs, rate cards</p>
|
<p class="text-sm mt-1">Clients, events, invoices, content briefs, rate cards</p>
|
||||||
</div>
|
</div>
|
||||||
@elseif(empty($results))
|
@elseif(empty($results))
|
||||||
<div class="text-center py-20 text-gray-400">
|
<div class="text-center py-20 text-gray-400">
|
||||||
<span class="text-5xl block mb-3">😿</span>
|
<span class="text-5xl block mb-3">😿</span>
|
||||||
<p class="text-base font-medium">No results for "{{ e($q) }}"</p>
|
<p class="text-base font-medium">No results for "{{ e($q) }}"</p>
|
||||||
<p class="text-sm mt-1">Try a different keyword</p>
|
<p class="text-sm mt-1">Try a different keyword</p>
|
||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
<div class="space-y-6">
|
<div class="space-y-6">
|
||||||
@foreach($results as $group)
|
@foreach($results as $group)
|
||||||
<div class="cat-card overflow-hidden">
|
<div class="cat-card overflow-hidden">
|
||||||
@@ -57,6 +43,6 @@
|
|||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
@@ -84,6 +84,10 @@ Route::get('/rate-cards/public', [RateCardController::class, 'public'])->name('r
|
|||||||
Route::get('/rate-cards/pdf', [RateCardController::class, 'pdf'])->name('rate-cards.pdf');
|
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::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::post('/rate-cards/profile', [RateCardController::class, 'profileUpdate'])->name('rate-cards.profile.update');
|
||||||
|
Route::post('/rate-cards/profile/logo', [RateCardController::class, 'uploadLogo'])->name('rate-cards.profile.upload-logo');
|
||||||
|
Route::delete('/rate-cards/profile/logo', [RateCardController::class, 'deleteLogo'])->name('rate-cards.profile.delete-logo');
|
||||||
|
Route::post('/rate-cards/profile/brand-logo', [RateCardController::class, 'uploadBrandLogo'])->name('rate-cards.profile.upload-brand-logo');
|
||||||
|
Route::delete('/rate-cards/profile/brand-logo', [RateCardController::class, 'deleteBrandLogo'])->name('rate-cards.profile.delete-brand-logo');
|
||||||
Route::get('/files/profile-logo', [RateCardController::class, 'serveProfileLogo'])->name('files.serve-profile-logo');
|
Route::get('/files/profile-logo', [RateCardController::class, 'serveProfileLogo'])->name('files.serve-profile-logo');
|
||||||
Route::resource('rate-cards', RateCardController::class)->except(['show']);
|
Route::resource('rate-cards', RateCardController::class)->except(['show']);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user