feat: extend rate card profiles with brands, terms, and custom HTML, and remove search bar from search index view

This commit is contained in:
I-Fun
2026-04-05 18:28:48 +07:00
parent d6b10f725b
commit 1c2c10d253
22 changed files with 1024 additions and 388 deletions

View File

@@ -76,6 +76,13 @@
<span x-show="uploading" class="text-white text-xs">…</span>
<input type="file" accept="image/*" class="hidden" @change="pickAvatar($event.target)">
</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 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">
🧾 New Invoice
</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>
@@ -202,5 +205,29 @@
</div>
</div>
@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>
@endsection