Compare commits
2 Commits
ed9e7dc0fd
...
1c2c10d253
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c2c10d253 | ||
|
|
d6b10f725b |
@@ -1,11 +1,11 @@
|
|||||||
APP_NAME=Laravel
|
APP_NAME="KOL-Manager"
|
||||||
APP_ENV=local
|
APP_ENV=local
|
||||||
APP_KEY=
|
APP_KEY=
|
||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
APP_URL=http://localhost
|
APP_URL=http://localhost
|
||||||
|
|
||||||
# ── App Gate Password ─────────────────────────────────────────────────────────
|
# ── App Gate Password ─────────────────────────────────────────────────────────
|
||||||
APP_PASSWORD=
|
APP_PASSWORD=admin123
|
||||||
|
|
||||||
APP_LOCALE=en
|
APP_LOCALE=en
|
||||||
APP_FALLBACK_LOCALE=en
|
APP_FALLBACK_LOCALE=en
|
||||||
|
|||||||
@@ -92,12 +92,14 @@ RUN mkdir -p \
|
|||||||
storage/framework/cache \
|
storage/framework/cache \
|
||||||
storage/framework/sessions \
|
storage/framework/sessions \
|
||||||
storage/framework/views \
|
storage/framework/views \
|
||||||
|
storage \
|
||||||
bootstrap/cache \
|
bootstrap/cache \
|
||||||
database \
|
database \
|
||||||
&& chown -R www-data:www-data \
|
&& chown -R www-data:www-data \
|
||||||
storage \
|
storage \
|
||||||
bootstrap/cache \
|
bootstrap/cache \
|
||||||
database \
|
database \
|
||||||
|
/var/lib/nginx \
|
||||||
&& chmod -R 775 \
|
&& chmod -R 775 \
|
||||||
storage \
|
storage \
|
||||||
bootstrap/cache \
|
bootstrap/cache \
|
||||||
@@ -118,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,18 +32,18 @@ class InvoiceSettings extends Model
|
|||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'invoice_next_number' => 'integer',
|
'invoice_next_number' => 'integer',
|
||||||
'default_tax_rate' => 'decimal:2',
|
'default_tax_rate' => 'decimal:2',
|
||||||
];
|
];
|
||||||
|
|
||||||
/** Always return the single settings row, creating it if absent. */
|
/** Always return the single settings row, creating it if absent. */
|
||||||
public static function instance(): self
|
public static function instance(): self
|
||||||
{
|
{
|
||||||
return static::firstOrCreate([], [
|
return static::firstOrCreate([], [
|
||||||
'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',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,8 +51,8 @@ class InvoiceSettings extends Model
|
|||||||
public static function generateNumber(): string
|
public static function generateNumber(): string
|
||||||
{
|
{
|
||||||
$settings = static::instance();
|
$settings = static::instance();
|
||||||
$prefix = rtrim($settings->invoice_prefix, '-');
|
$prefix = rtrim($settings->invoice_prefix, '-');
|
||||||
$number = str_pad((string) $settings->invoice_next_number, 3, '0', STR_PAD_LEFT);
|
$number = str_pad((string) $settings->invoice_next_number, 3, '0', STR_PAD_LEFT);
|
||||||
$settings->increment('invoice_next_number');
|
$settings->increment('invoice_next_number');
|
||||||
return $prefix . '-' . $number;
|
return $prefix . '-' . $number;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -7,8 +7,8 @@ services:
|
|||||||
container_name: kol-manager
|
container_name: kol-manager
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
ports:
|
# ports:
|
||||||
- "${APP_PORT:-8080}:80"
|
# - "${APP_PORT:-8080}:80"
|
||||||
|
|
||||||
# Mount .env.docker as the runtime .env
|
# Mount .env.docker as the runtime .env
|
||||||
env_file:
|
env_file:
|
||||||
@@ -22,7 +22,7 @@ services:
|
|||||||
- kol_storage:/var/www/html/storage
|
- kol_storage:/var/www/html/storage
|
||||||
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost/up"]
|
test: [ "CMD", "curl", "-f", "http://localhost/up" ]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -18,9 +18,22 @@
|
|||||||
const fd = new FormData();
|
const fd = new FormData();
|
||||||
fd.append('avatar', input.files[0]);
|
fd.append('avatar', input.files[0]);
|
||||||
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
|
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
|
||||||
const res = await fetch('{{ route('clients.upload-avatar', $client) }}', { method: 'POST', body: fd });
|
try {
|
||||||
const data = await res.json();
|
const res = await fetch('{{ route('clients.upload-avatar', $client->id, false) }}', {
|
||||||
if (res.ok) this.avatarUrl = data.url + '?t=' + Date.now();
|
method: 'POST',
|
||||||
|
body: fd,
|
||||||
|
headers: { 'Accept': 'application/json' }
|
||||||
|
});
|
||||||
|
const data = await res.json();
|
||||||
|
if (res.ok) {
|
||||||
|
this.avatarUrl = data.url + '?t=' + Date.now();
|
||||||
|
} else {
|
||||||
|
alert(data.message || 'Upload failed');
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error('Avatar upload error:', err);
|
||||||
|
alert('Network Error. Could not upload.');
|
||||||
|
}
|
||||||
this.uploading = false;
|
this.uploading = false;
|
||||||
input.value = '';
|
input.value = '';
|
||||||
},
|
},
|
||||||
@@ -29,8 +42,16 @@
|
|||||||
const fd = new FormData();
|
const fd = new FormData();
|
||||||
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
|
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
|
||||||
fd.append('_method', 'DELETE');
|
fd.append('_method', 'DELETE');
|
||||||
await fetch('{{ route('clients.delete-avatar', $client) }}', { method: 'POST', body: fd });
|
try {
|
||||||
this.avatarUrl = '';
|
await fetch('{{ route('clients.delete-avatar', $client->id, false) }}', {
|
||||||
|
method: 'POST',
|
||||||
|
body: fd,
|
||||||
|
headers: { 'Accept': 'application/json' }
|
||||||
|
});
|
||||||
|
this.avatarUrl = '';
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}">
|
}">
|
||||||
<div class="flex items-start gap-4">
|
<div class="flex items-start gap-4">
|
||||||
@@ -55,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">
|
||||||
@@ -81,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>
|
||||||
|
|
||||||
@@ -181,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
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
@foreach(['instagram', 'tiktok', 'youtube'] as $p)
|
@foreach(['instagram', 'tiktok', 'youtube'] as $p)
|
||||||
<a href="{{ request()->fullUrlWithQuery(['platform' => $p]) }}"
|
<a href="{{ request()->fullUrlWithQuery(['platform' => $p]) }}"
|
||||||
class="px-3 py-1.5 rounded-full text-xs font-semibold transition-colors
|
class="px-3 py-1.5 rounded-full text-xs font-semibold transition-colors
|
||||||
{{ request('platform') === $p ? 'text-white' : 'bg-white text-gray-500 hover:bg-pink-50 border border-pink-100' }}"
|
{{ request('platform') === $p ? 'text-white' : 'bg-white text-gray-500 hover:bg-pink-50 border border-pink-100' }}"
|
||||||
style="{{ request('platform') === $p ? 'background:#FFB7C5' : '' }}">
|
style="{{ request('platform') === $p ? 'background:#FFB7C5' : '' }}">
|
||||||
{{ ['instagram' => '📸', 'tiktok' => '🎵', 'youtube' => '▶️'][$p] }} {{ ucfirst($p) }}
|
{{ ['instagram' => '📸', 'tiktok' => '🎵', 'youtube' => '▶️'][$p] }} {{ ucfirst($p) }}
|
||||||
</a>
|
</a>
|
||||||
@@ -50,105 +50,114 @@
|
|||||||
</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
|
||||||
cursor-grab active:cursor-grabbing hover:shadow-md transition-shadow kanban-item"
|
cursor-grab active:cursor-grabbing hover:shadow-md transition-shadow kanban-item"
|
||||||
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),
|
'status' => $brief->status->label(),
|
||||||
'status' => $brief->status->label(),
|
'client' => $brief->client?->name,
|
||||||
'client' => $brief->client?->name,
|
'target_date' => $brief->target_date?->format('d M Y'),
|
||||||
'target_date' => $brief->target_date?->format('d M Y'),
|
'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))"
|
||||||
]) }}"
|
class="font-semibold text-gray-800 text-xs leading-tight hover:text-pink-500 line-clamp-2 flex-1">
|
||||||
@click.prevent="openModal(JSON.parse($el.dataset.brief))"
|
{{ $brief->title }}
|
||||||
class="font-semibold text-gray-800 text-xs leading-tight hover:text-pink-500 line-clamp-2 flex-1">
|
</a>
|
||||||
{{ $brief->title }}
|
</div>
|
||||||
</a>
|
@if($brief->client)
|
||||||
</div>
|
<div class="text-xs text-gray-400 mb-1">👥 {{ $brief->client->name }}</div>
|
||||||
@if($brief->client)
|
@endif
|
||||||
<div class="text-xs text-gray-400 mb-1">👥 {{ $brief->client->name }}</div>
|
@if($brief->target_date)
|
||||||
@endif
|
<div
|
||||||
@if($brief->target_date)
|
class="text-xs {{ $brief->target_date->isPast() && $brief->status->value !== 'posted' ? 'text-red-400 font-bold' : 'text-gray-400' }}">
|
||||||
<div
|
📅 {{ $brief->target_date->format('d M') }}
|
||||||
class="text-xs {{ $brief->target_date->isPast() && $brief->status->value !== 'posted' ? 'text-red-400 font-bold' : 'text-gray-400' }}">
|
</div>
|
||||||
📅 {{ $brief->target_date->format('d M') }}
|
@endif
|
||||||
|
<div class="flex justify-end mt-1.5">
|
||||||
|
<a href="{{ route('content.edit', $brief) }}"
|
||||||
|
class="text-xs text-gray-400 hover:text-pink-500">Edit</a>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
|
||||||
<div class="flex justify-end mt-1.5">
|
|
||||||
<a href="{{ route('content.edit', $brief) }}"
|
|
||||||
class="text-xs text-gray-400 hover:text-pink-500">Edit</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- Add button --}}
|
{{-- Add button --}}
|
||||||
<a href="{{ route('content.create') }}?status={{ $status->value }}"
|
<a href="{{ route('content.create') }}?status={{ $status->value }}"
|
||||||
class="mt-3 text-xs text-gray-400 hover:text-pink-500 text-center py-2
|
class="mt-3 text-xs text-gray-400 hover:text-pink-500 text-center py-2
|
||||||
border-2 border-dashed border-pink-100 rounded-2xl hover:border-pink-300 transition-colors block">
|
border-2 border-dashed border-pink-100 rounded-2xl hover:border-pink-300 transition-colors block">
|
||||||
+ Add
|
+ Add
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@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>
|
||||||
|
|||||||
@@ -303,8 +303,8 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:50%;">Description</td>
|
<td style="width:50%;">Description</td>
|
||||||
<td class="td-center" style="width:10%;">Qty</td>
|
|
||||||
<td class="td-right" style="width:20%;">Unit Price</td>
|
<td class="td-right" style="width:20%;">Unit Price</td>
|
||||||
|
<td class="td-center" style="width:10%;">Qty</td>
|
||||||
<td class="td-right" style="width:20%;">Total</td>
|
<td class="td-right" style="width:20%;">Total</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -318,8 +318,8 @@
|
|||||||
style="margin-left:6px; font-size:10px; background:#F3F4F6; color:#6B7280; padding:2px 8px; border-radius:10px; font-weight:600;">Non-Taxable</span>
|
style="margin-left:6px; font-size:10px; background:#F3F4F6; color:#6B7280; padding:2px 8px; border-radius:10px; font-weight:600;">Non-Taxable</span>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="td-center">{{ $item->quantity }}</td>
|
|
||||||
<td class="td-right">Rp {{ number_format($item->unit_price, 0, ',', '.') }}</td>
|
<td class="td-right">Rp {{ number_format($item->unit_price, 0, ',', '.') }}</td>
|
||||||
|
<td class="td-center">{{ $item->quantity }}</td>
|
||||||
<td class="td-right" style="font-weight:600;">Rp {{ number_format($item->total, 0, ',', '.') }}</td>
|
<td class="td-right" style="font-weight:600;">Rp {{ number_format($item->total, 0, ',', '.') }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -361,17 +361,18 @@
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div style="margin-top: 40px;">
|
@if($invoice->notes)
|
||||||
@if($invoice->notes)
|
<div class="notes" style="margin-bottom: 24px;">{{ $invoice->notes }}</div>
|
||||||
<div class="notes" style="width: 50%; float: left; margin-top: 10px;">{{ $invoice->notes }}</div>
|
@endif
|
||||||
@endif
|
|
||||||
|
|
||||||
|
<div style="margin-top: 40px;">
|
||||||
@if($invoice->signature_image && file_exists(storage_path('app/public/' . $invoice->signature_image)))
|
@if($invoice->signature_image && file_exists(storage_path('app/public/' . $invoice->signature_image)))
|
||||||
<div style="width: 200px; float: right; text-align: center;">
|
<div style="width: 200px; float: right; text-align: center;">
|
||||||
<div style="font-size: 11px; color: #374151; margin-bottom: 12px;">
|
<div style="font-size: 11px; color: #374151; margin-bottom: 12px;">
|
||||||
Jakarta, {{ $invoice->issue_date->format('d F Y') }}
|
Jakarta, {{ $invoice->issue_date->format('d F Y') }}
|
||||||
</div>
|
</div>
|
||||||
<img src="{{ storage_path('app/public/' . $invoice->signature_image) }}" style="max-height: 80px; max-width: 180px; object-fit: contain; margin-bottom: 8px;">
|
<img src="{{ storage_path('app/public/' . $invoice->signature_image) }}"
|
||||||
|
style="max-height: 80px; max-width: 180px; object-fit: contain; margin-bottom: 8px;">
|
||||||
<div style="font-size: 12px; font-weight: 800; color: #111827; text-transform: uppercase;">
|
<div style="font-size: 12px; font-weight: 800; color: #111827; text-transform: uppercase;">
|
||||||
{{ $invoice->signer_name ?: ($invoiceSettings->signer_name ?: ($invoiceSettings->header_name ?: 'Signature')) }}
|
{{ $invoice->signer_name ?: ($invoiceSettings->signer_name ?: ($invoiceSettings->header_name ?: 'Signature')) }}
|
||||||
</div>
|
</div>
|
||||||
@@ -386,7 +387,7 @@
|
|||||||
<div style="clear: both;"></div>
|
<div style="clear: both;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footer">Thank you for the collaboration!</div>
|
<!-- <div class="footer">Thank you for the collaboration!</div> -->
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|||||||
@@ -72,14 +72,21 @@
|
|||||||
fd.append('header_logo', input.files[0]);
|
fd.append('header_logo', input.files[0]);
|
||||||
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
|
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
|
||||||
try {
|
try {
|
||||||
const res = await fetch('{{ route('invoice-settings.upload-logo', [], false) }}', { method: 'POST', body: fd });
|
const res = await fetch('{{ route('invoice-settings.upload-logo', [], false) }}', {
|
||||||
|
method: 'POST',
|
||||||
|
body: fd,
|
||||||
|
headers: {
|
||||||
|
'Accept': 'application/json'
|
||||||
|
}
|
||||||
|
});
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
this.logoUrl = data.url + '?t=' + Date.now();
|
this.logoUrl = data.url + '?t=' + Date.now();
|
||||||
} else {
|
} else {
|
||||||
this.errorMsg = data.message ?? 'Upload failed.';
|
this.errorMsg = data.message ?? 'Upload failed.';
|
||||||
}
|
}
|
||||||
} catch {
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
this.errorMsg = 'Network error. Please try again.';
|
this.errorMsg = 'Network error. Please try again.';
|
||||||
}
|
}
|
||||||
this.uploading = false;
|
this.uploading = false;
|
||||||
@@ -91,7 +98,11 @@
|
|||||||
const fd = new FormData();
|
const fd = new FormData();
|
||||||
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
|
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
|
||||||
fd.append('_method', 'DELETE');
|
fd.append('_method', 'DELETE');
|
||||||
await fetch('{{ route('invoice-settings.delete-logo', [], false) }}', { method: 'POST', body: fd });
|
await fetch('{{ route('invoice-settings.delete-logo', [], false) }}', {
|
||||||
|
method: 'POST',
|
||||||
|
body: fd,
|
||||||
|
headers: { 'Accept': 'application/json' }
|
||||||
|
});
|
||||||
this.logoUrl = '';
|
this.logoUrl = '';
|
||||||
}
|
}
|
||||||
}">
|
}">
|
||||||
@@ -234,14 +245,21 @@
|
|||||||
fd.append('signature_image', input.files[0]);
|
fd.append('signature_image', input.files[0]);
|
||||||
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
|
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
|
||||||
try {
|
try {
|
||||||
const res = await fetch('{{ route('invoice-settings.upload-signature', [], false) }}', { method: 'POST', body: fd });
|
const res = await fetch('{{ route('invoice-settings.upload-signature', [], false) }}', {
|
||||||
|
method: 'POST',
|
||||||
|
body: fd,
|
||||||
|
headers: {
|
||||||
|
'Accept': 'application/json'
|
||||||
|
}
|
||||||
|
});
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
this.signatureUrl = data.url + '?t=' + Date.now();
|
this.signatureUrl = data.url + '?t=' + Date.now();
|
||||||
} else {
|
} else {
|
||||||
this.errorMsg = data.message ?? 'Upload failed.';
|
this.errorMsg = data.message ?? 'Upload failed.';
|
||||||
}
|
}
|
||||||
} catch {
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
this.errorMsg = 'Network error. Please try again.';
|
this.errorMsg = 'Network error. Please try again.';
|
||||||
}
|
}
|
||||||
this.uploading = false;
|
this.uploading = false;
|
||||||
@@ -253,7 +271,11 @@
|
|||||||
const fd = new FormData();
|
const fd = new FormData();
|
||||||
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
|
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
|
||||||
fd.append('_method', 'DELETE');
|
fd.append('_method', 'DELETE');
|
||||||
await fetch('{{ route('invoice-settings.delete-signature', [], false) }}', { method: 'POST', body: fd });
|
await fetch('{{ route('invoice-settings.delete-signature', [], false) }}', {
|
||||||
|
method: 'POST',
|
||||||
|
body: fd,
|
||||||
|
headers: { 'Accept': 'application/json' }
|
||||||
|
});
|
||||||
this.signatureUrl = '';
|
this.signatureUrl = '';
|
||||||
}
|
}
|
||||||
}">
|
}">
|
||||||
|
|||||||
@@ -90,8 +90,8 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr class="text-xs text-gray-500 uppercase" style="background:{{ $tint }}">
|
<tr class="text-xs text-gray-500 uppercase" style="background:{{ $tint }}">
|
||||||
<th class="text-left py-3 px-4 rounded-l-2xl">Description</th>
|
<th class="text-left py-3 px-4 rounded-l-2xl">Description</th>
|
||||||
<th class="text-center py-3 px-4">Qty</th>
|
|
||||||
<th class="text-right py-3 px-4">Unit Price</th>
|
<th class="text-right py-3 px-4">Unit Price</th>
|
||||||
|
<th class="text-center py-3 px-4">Qty</th>
|
||||||
<th class="text-right py-3 px-4 rounded-r-2xl">Total</th>
|
<th class="text-right py-3 px-4 rounded-r-2xl">Total</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -105,9 +105,9 @@
|
|||||||
class="ml-1.5 text-xs bg-gray-100 text-gray-500 px-2 py-0.5 rounded-full font-medium">Non-Taxable</span>
|
class="ml-1.5 text-xs bg-gray-100 text-gray-500 px-2 py-0.5 rounded-full font-medium">Non-Taxable</span>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="py-3 px-4 text-sm text-center text-gray-600">{{ $item->quantity }}</td>
|
|
||||||
<td class="py-3 px-4 text-sm text-right text-gray-600">Rp
|
<td class="py-3 px-4 text-sm text-right text-gray-600">Rp
|
||||||
{{ number_format($item->unit_price, 0, ',', '.') }}</td>
|
{{ number_format($item->unit_price, 0, ',', '.') }}</td>
|
||||||
|
<td class="py-3 px-4 text-sm text-center text-gray-600">{{ $item->quantity }}</td>
|
||||||
<td class="py-3 px-4 text-sm text-right font-semibold text-gray-800">Rp
|
<td class="py-3 px-4 text-sm text-right font-semibold text-gray-800">Rp
|
||||||
{{ number_format($item->total, 0, ',', '.') }}</td>
|
{{ number_format($item->total, 0, ',', '.') }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -137,7 +137,7 @@
|
|||||||
|
|
||||||
{{-- Bank Info --}}
|
{{-- Bank Info --}}
|
||||||
@if($invoice->bank_name)
|
@if($invoice->bank_name)
|
||||||
<div class="rounded-2xl p-4 text-sm" style="background:{{ $tint }}">
|
<div class="rounded-2xl p-4 text-sm mb-4" style="background:{{ $tint }}">
|
||||||
<div class="font-semibold text-gray-700 mb-2">💳 Payment Info</div>
|
<div class="font-semibold text-gray-700 mb-2">💳 Payment Info</div>
|
||||||
<div class="text-gray-600">
|
<div class="text-gray-600">
|
||||||
{{ $invoice->bank_name }}
|
{{ $invoice->bank_name }}
|
||||||
@@ -147,12 +147,11 @@
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="flex flex-col sm:flex-row justify-between items-start mt-10 gap-6">
|
@if($invoice->notes)
|
||||||
<div class="flex-1 text-left">
|
<div class="text-sm text-gray-500 italic mb-8">{{ $invoice->notes }}</div>
|
||||||
@if($invoice->notes)
|
@endif
|
||||||
<div class="text-sm text-gray-500 italic">{{ $invoice->notes }}</div>
|
|
||||||
@endif
|
<div class="flex justify-end mt-10">
|
||||||
</div>
|
|
||||||
@if($invoice->signature_image)
|
@if($invoice->signature_image)
|
||||||
<div class="shrink-0 text-center w-full sm:w-auto">
|
<div class="shrink-0 text-center w-full sm:w-auto">
|
||||||
<div class="text-sm text-gray-500 mb-3">
|
<div class="text-sm text-gray-500 mb-3">
|
||||||
|
|||||||
@@ -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 ─────────────────────────────────
|
||||||
|
|||||||
@@ -6,137 +6,347 @@
|
|||||||
$ab = hexdec(substr($accent, 4, 2));
|
$ab = hexdec(substr($accent, 4, 2));
|
||||||
$accentRgb = "{$ar},{$ag},{$ab}";
|
$accentRgb = "{$ar},{$ag},{$ab}";
|
||||||
|
|
||||||
$bg = $profile->bg_color ?? '#FFFBFE';
|
$bg = $profile->bg_color ?? '#FFFBFE';
|
||||||
$text = $profile->text_color ?? '#374151';
|
$text = $profile->text_color ?? '#374151';
|
||||||
$accentHex = '#' . $accent;
|
$accentHex = '#' . $accent;
|
||||||
@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"
|
||||||
@endif
|
alt="{{ $profile->owner_name }}">
|
||||||
<div class="name">{{ $profile->owner_name }}</div>
|
@endif
|
||||||
@if($profile->tagline)
|
<div class="name">{{ $profile->owner_name }}</div>
|
||||||
<div class="tagline">{{ $profile->tagline }}</div>
|
@if($profile->tagline)
|
||||||
@endif
|
<div class="tagline">{{ $profile->tagline }}</div>
|
||||||
<div class="contacts">
|
@endif
|
||||||
@if($profile->email)<span>✉ {{ $profile->email }}</span>@endif
|
<div class="contacts">
|
||||||
@if($profile->whatsapp)<span>· {{ $profile->whatsapp }}</span>@endif
|
@if($profile->ig_handle)<span>· {{ '@' . ltrim($profile->ig_handle, '@') }}</span>@endif
|
||||||
@if($profile->ig_handle)<span>· @{{ $profile->ig_handle }}</span>@endif
|
@if($profile->tiktok_handle)<span>· {{ '@' . ltrim($profile->tiktok_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) }}
|
||||||
|
</div>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width:38%">Service</th>
|
||||||
|
<th style="width:37%">Description</th>
|
||||||
|
<th style="width:25%; text-align:right">Price</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach($cards as $card)
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div class="service-name">{{ $card->service_name }}</div>
|
||||||
|
@if($card->content_type)
|
||||||
|
<span class="content-type">{{ $card->content_type }}</span>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
@if($card->description)
|
||||||
|
<div class="desc">{{ $card->description }}</div>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
<td style="text-align:right">
|
||||||
|
@if($profile->show_prices)
|
||||||
|
<div class="price">{{ $card->formatted_price }}</div>
|
||||||
|
<div class="price-unit">{{ str_replace('_', ' ', $card->price_unit) }}</div>
|
||||||
|
@else
|
||||||
|
<div class="price" style="font-size:11px">On Request</div>
|
||||||
|
@endif
|
||||||
|
@if($card->is_negotiable)
|
||||||
|
<div class="negotiable">Negotiable</div>
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
@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.' }}
|
||||||
|
· Generated {{ now()->format('d M Y') }}
|
||||||
</div>
|
</div>
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th style="width:38%">Service</th>
|
|
||||||
<th style="width:37%">Description</th>
|
|
||||||
<th style="width:25%; text-align:right">Price</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
@foreach($cards as $card)
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div class="service-name">{{ $card->service_name }}</div>
|
|
||||||
@if($card->content_type)
|
|
||||||
<span class="content-type">{{ $card->content_type }}</span>
|
|
||||||
@endif
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
@if($card->description)
|
|
||||||
<div class="desc">{{ $card->description }}</div>
|
|
||||||
@endif
|
|
||||||
</td>
|
|
||||||
<td style="text-align:right">
|
|
||||||
@if($profile->show_prices)
|
|
||||||
<div class="price">{{ $card->formatted_price }}</div>
|
|
||||||
<div class="price-unit">{{ str_replace('_', ' ', $card->price_unit) }}</div>
|
|
||||||
@else
|
|
||||||
<div class="price" style="font-size:11px">On Request</div>
|
|
||||||
@endif
|
|
||||||
@if($card->is_negotiable)
|
|
||||||
<div class="negotiable">Negotiable</div>
|
|
||||||
@endif
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
@endforeach
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
@endforeach
|
|
||||||
|
|
||||||
<div class="footer">
|
|
||||||
{{ $profile->custom_footer ?: 'Prices may vary. Contact for custom packages.' }}
|
|
||||||
· Generated {{ now()->format('d M Y') }}
|
|
||||||
</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>
|
||||||
|
<button type="button" @click="removeLogo()"
|
||||||
|
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>
|
</div>
|
||||||
@endif
|
</template>
|
||||||
<input type="file" name="logo" accept="image/*" class="w-full text-sm text-gray-600
|
|
||||||
file:mr-3 file:py-2 file:px-4 file:rounded-full file:border-0
|
<div class="relative">
|
||||||
file:text-xs file:font-semibold file:bg-pink-50 file:text-pink-600
|
<input type="file" accept="image/*" @change="pickFile($event.target)" class="w-full text-sm text-gray-600
|
||||||
hover:file:bg-pink-100 cursor-pointer">
|
file:mr-3 file:py-2 file:px-4 file:rounded-full file:border-0
|
||||||
<p class="text-xs text-gray-400 mt-1">Max 2MB. PNG/JPG/WebP.</p>
|
file:text-xs file:font-semibold file:bg-pink-50 file:text-pink-600
|
||||||
|
hover:file:bg-pink-100 cursor-pointer" :disabled="uploading">
|
||||||
|
<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,22 +282,95 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- Actions --}}
|
</div>
|
||||||
<div class="flex flex-wrap items-center gap-3">
|
|
||||||
<button type="submit" class="btn-sakura px-6 py-2.5">💾 Save Profile</button>
|
{{-- Past Brands --}}
|
||||||
<a href="{{ route('rate-cards.public') }}" target="_blank"
|
<div class="cat-card overflow-hidden">
|
||||||
class="btn-sakura text-sm px-4 py-2.5 rounded-full border border-pink-200 text-pink-500 hover:bg-pink-50">
|
<div class="flex items-center gap-3 px-5 py-4 border-b border-pink-50">
|
||||||
👁️ Preview
|
<span class="text-xl"></span>
|
||||||
</a>
|
<h2 class="font-bold text-gray-700">Brand Collaborations Logo</h2>
|
||||||
<a href="{{ route('rate-cards.pdf') }}"
|
</div>
|
||||||
class="btn-sakura text-sm px-4 py-2.5 rounded-full border border-blue-200 text-blue-500 hover:bg-blue-50">
|
<div class="p-5" x-data="{
|
||||||
📄 Download PDF
|
uploading: false,
|
||||||
</a>
|
brands: {{ Illuminate\Support\Js::from($profile->past_brands ?? []) }},
|
||||||
<a href="{{ route('rate-cards.index') }}"
|
async pickBrand(input) {
|
||||||
class="btn-sakura text-sm px-4 py-2.5 rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
|
if (!input.files.length) return;
|
||||||
← Back
|
this.uploading = true;
|
||||||
</a>
|
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>
|
||||||
</form>
|
<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 --}}
|
||||||
|
<div class="flex flex-wrap items-center gap-3">
|
||||||
|
<button type="submit" class="btn-sakura px-6 py-2.5">💾 Save Profile</button>
|
||||||
|
<a href="{{ route('rate-cards.public') }}" target="_blank"
|
||||||
|
class="btn-sakura text-sm px-4 py-2.5 rounded-full border border-pink-200 text-pink-500 hover:bg-pink-50">
|
||||||
|
👁️ Preview
|
||||||
|
</a>
|
||||||
|
<a href="{{ route('rate-cards.pdf') }}"
|
||||||
|
class="btn-sakura text-sm px-4 py-2.5 rounded-full border border-blue-200 text-blue-500 hover:bg-blue-50">
|
||||||
|
📄 Download PDF
|
||||||
|
</a>
|
||||||
|
<a href="{{ route('rate-cards.index') }}"
|
||||||
|
class="btn-sakura text-sm px-4 py-2.5 rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
|
||||||
|
← Back
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
@@ -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') }}-->
|
||||||
|
|||||||
@@ -30,99 +30,99 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4" x-data="{
|
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4" x-data="{
|
||||||
isNew: false,
|
isNew: false,
|
||||||
saving: false,
|
saving: false,
|
||||||
newName: '', newEmail: '', newPhone: '', newCompany: '',
|
newName: '', newEmail: '', newPhone: '', newCompany: '',
|
||||||
errMsg: '',
|
errMsg: '',
|
||||||
isNewCat: false,
|
isNewCat: false,
|
||||||
savingCat: false,
|
savingCat: false,
|
||||||
newCatName: '',
|
newCatName: '',
|
||||||
catErrMsg: '',
|
catErrMsg: '',
|
||||||
onClientChange(e) {
|
onClientChange(e) {
|
||||||
this.isNew = (e.target.value === '__new__');
|
this.isNew = (e.target.value === '__new__');
|
||||||
if (!this.isNew) {
|
if (!this.isNew) {
|
||||||
this.clientId = e.target.value;
|
this.clientId = e.target.value;
|
||||||
$dispatch('contract-check');
|
$dispatch('contract-check');
|
||||||
}
|
|
||||||
},
|
|
||||||
async saveNewClient() {
|
|
||||||
if (!this.newName.trim()) { this.errMsg = 'Name is required.'; return; }
|
|
||||||
this.saving = true; this.errMsg = '';
|
|
||||||
const fd = new FormData();
|
|
||||||
fd.append('name', this.newName);
|
|
||||||
fd.append('email', this.newEmail);
|
|
||||||
fd.append('phone', this.newPhone);
|
|
||||||
fd.append('company', this.newCompany);
|
|
||||||
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
|
|
||||||
try {
|
|
||||||
const res = await fetch('{{ route('clients.quick-store', [], false) }}', {
|
|
||||||
method:'POST',
|
|
||||||
body: fd,
|
|
||||||
headers: {
|
|
||||||
'Accept': 'application/json',
|
|
||||||
'X-Requested-With': 'XMLHttpRequest'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
const data = await res.json();
|
|
||||||
if (res.ok) {
|
|
||||||
// Add new option & select it
|
|
||||||
const sel = document.getElementById('client-select');
|
|
||||||
const opt = new Option(data.name, data.id, true, true);
|
|
||||||
sel.add(opt, sel.options[1]);
|
|
||||||
sel.value = data.id;
|
|
||||||
sel.dispatchEvent(new Event('change'));
|
|
||||||
this.isNew = false;
|
|
||||||
this.newName = this.newEmail = this.newPhone = this.newCompany = '';
|
|
||||||
} else {
|
|
||||||
this.errMsg = data.message || 'Could not create client.';
|
|
||||||
}
|
}
|
||||||
} catch (err) {
|
},
|
||||||
this.errMsg = 'An unexpected error occurred.';
|
async saveNewClient() {
|
||||||
} finally {
|
if (!this.newName.trim()) { this.errMsg = 'Name is required.'; return; }
|
||||||
this.saving = false;
|
this.saving = true; this.errMsg = '';
|
||||||
}
|
const fd = new FormData();
|
||||||
},
|
fd.append('name', this.newName);
|
||||||
onCategoryChange(e) {
|
fd.append('email', this.newEmail);
|
||||||
this.isNewCat = (e.target.value === '__new__');
|
fd.append('phone', this.newPhone);
|
||||||
if (!this.isNewCat) {
|
fd.append('company', this.newCompany);
|
||||||
this.categoryId = e.target.value;
|
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
|
||||||
this.checkContract();
|
try {
|
||||||
}
|
const res = await fetch('{{ route('clients.quick-store', [], false) }}', {
|
||||||
},
|
method:'POST',
|
||||||
async saveNewCategory() {
|
body: fd,
|
||||||
if (!this.newCatName.trim()) { this.catErrMsg = 'Category name is required.'; return; }
|
headers: {
|
||||||
this.savingCat = true; this.catErrMsg = '';
|
'Accept': 'application/json',
|
||||||
const fd = new FormData();
|
'X-Requested-With': 'XMLHttpRequest'
|
||||||
fd.append('name', this.newCatName);
|
}
|
||||||
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
|
});
|
||||||
try {
|
const data = await res.json();
|
||||||
const res = await fetch('{{ route('client-categories.quick-store', [], false) }}', {
|
if (res.ok) {
|
||||||
method:'POST',
|
// Add new option & select it
|
||||||
body: fd,
|
const sel = document.getElementById('client-select');
|
||||||
headers: {
|
const opt = new Option(data.name, data.id, true, true);
|
||||||
'Accept': 'application/json',
|
sel.add(opt, sel.options[1]);
|
||||||
'X-Requested-With': 'XMLHttpRequest'
|
sel.value = data.id;
|
||||||
|
sel.dispatchEvent(new Event('change'));
|
||||||
|
this.isNew = false;
|
||||||
|
this.newName = this.newEmail = this.newPhone = this.newCompany = '';
|
||||||
|
} else {
|
||||||
|
this.errMsg = data.message || 'Could not create client.';
|
||||||
}
|
}
|
||||||
});
|
} catch (err) {
|
||||||
const data = await res.json();
|
this.errMsg = 'An unexpected error occurred.';
|
||||||
if (res.ok) {
|
} finally {
|
||||||
const sel = document.getElementById('category-select');
|
this.saving = false;
|
||||||
const opt = new Option(data.icon + ' ' + data.name, data.id, true, true);
|
}
|
||||||
sel.add(opt, sel.options[1]);
|
},
|
||||||
sel.value = data.id;
|
onCategoryChange(e) {
|
||||||
sel.dispatchEvent(new Event('change'));
|
this.isNewCat = (e.target.value === '__new__');
|
||||||
this.isNewCat = false;
|
if (!this.isNewCat) {
|
||||||
this.newCatName = '';
|
this.categoryId = e.target.value;
|
||||||
} else {
|
this.checkContract();
|
||||||
this.catErrMsg = data.message || 'Could not create category.';
|
}
|
||||||
|
},
|
||||||
|
async saveNewCategory() {
|
||||||
|
if (!this.newCatName.trim()) { this.catErrMsg = 'Category name is required.'; return; }
|
||||||
|
this.savingCat = true; this.catErrMsg = '';
|
||||||
|
const fd = new FormData();
|
||||||
|
fd.append('name', this.newCatName);
|
||||||
|
fd.append('_token', document.querySelector('meta[name=csrf-token]').content);
|
||||||
|
try {
|
||||||
|
const res = await fetch('{{ route('client-categories.quick-store', [], false) }}', {
|
||||||
|
method:'POST',
|
||||||
|
body: fd,
|
||||||
|
headers: {
|
||||||
|
'Accept': 'application/json',
|
||||||
|
'X-Requested-With': 'XMLHttpRequest'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const data = await res.json();
|
||||||
|
if (res.ok) {
|
||||||
|
const sel = document.getElementById('category-select');
|
||||||
|
const opt = new Option(data.icon + ' ' + data.name, data.id, true, true);
|
||||||
|
sel.add(opt, sel.options[1]);
|
||||||
|
sel.value = data.id;
|
||||||
|
sel.dispatchEvent(new Event('change'));
|
||||||
|
this.isNewCat = false;
|
||||||
|
this.newCatName = '';
|
||||||
|
} else {
|
||||||
|
this.catErrMsg = data.message || 'Could not create category.';
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
this.catErrMsg = 'An unexpected error occurred.';
|
||||||
|
} finally {
|
||||||
|
this.savingCat = false;
|
||||||
}
|
}
|
||||||
} catch (err) {
|
|
||||||
this.catErrMsg = 'An unexpected error occurred.';
|
|
||||||
} finally {
|
|
||||||
this.savingCat = false;
|
|
||||||
}
|
}
|
||||||
}
|
}">
|
||||||
}">
|
|
||||||
{{-- Type --}}
|
{{-- Type --}}
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-semibold text-gray-700 mb-1">Type</label>
|
<label class="block text-sm font-semibold text-gray-700 mb-1">Type</label>
|
||||||
@@ -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,57 +6,43 @@
|
|||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
<form method="GET" action="{{ route('search.index') }}" class="mb-6">
|
@if(!$q)
|
||||||
<div class="relative max-w-xl">
|
<div class="text-center py-20 text-gray-400">
|
||||||
<span class="absolute left-4 top-1/2 -translate-y-1/2 text-gray-400">🔍</span>
|
<span class="text-5xl block mb-3">🔍</span>
|
||||||
<input
|
<p class="text-base font-medium">Start typing to search across everything</p>
|
||||||
type="text"
|
<p class="text-sm mt-1">Clients, events, invoices, content briefs, rate cards</p>
|
||||||
name="q"
|
</div>
|
||||||
value="{{ e($q) }}"
|
@elseif(empty($results))
|
||||||
placeholder="Search clients, events, invoices, content…"
|
<div class="text-center py-20 text-gray-400">
|
||||||
class="input-soft pl-11 py-3 text-base w-full"
|
<span class="text-5xl block mb-3">😿</span>
|
||||||
autofocus
|
<p class="text-base font-medium">No results for "{{ e($q) }}"</p>
|
||||||
>
|
<p class="text-sm mt-1">Try a different keyword</p>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
@else
|
||||||
|
<div class="space-y-6">
|
||||||
@if(! $q)
|
@foreach($results as $group)
|
||||||
<div class="text-center py-20 text-gray-400">
|
<div class="cat-card overflow-hidden">
|
||||||
<span class="text-5xl block mb-3">🔍</span>
|
<div class="px-5 py-3 bg-pink-50/60 border-b border-pink-100">
|
||||||
<p class="text-base font-medium">Start typing to search across everything</p>
|
<h2 class="text-sm font-bold text-gray-600">{{ $group['label'] }}</h2>
|
||||||
<p class="text-sm mt-1">Clients, events, invoices, content briefs, rate cards</p>
|
</div>
|
||||||
</div>
|
<div class="divide-y divide-pink-50">
|
||||||
@elseif(empty($results))
|
@foreach($group['items'] as $item)
|
||||||
<div class="text-center py-20 text-gray-400">
|
<a href="{{ $item['url'] }}"
|
||||||
<span class="text-5xl block mb-3">😿</span>
|
class="flex items-center gap-4 px-5 py-3 hover:bg-pink-50/40 transition-colors">
|
||||||
<p class="text-base font-medium">No results for "{{ e($q) }}"</p>
|
<span class="text-2xl shrink-0">{{ $item['icon'] }}</span>
|
||||||
<p class="text-sm mt-1">Try a different keyword</p>
|
<div class="min-w-0">
|
||||||
</div>
|
<div class="font-semibold text-gray-800 text-sm truncate">{{ $item['title'] }}</div>
|
||||||
@else
|
@if($item['subtitle'])
|
||||||
<div class="space-y-6">
|
<div class="text-xs text-gray-400 truncate mt-0.5">{{ $item['subtitle'] }}</div>
|
||||||
@foreach($results as $group)
|
@endif
|
||||||
<div class="cat-card overflow-hidden">
|
</div>
|
||||||
<div class="px-5 py-3 bg-pink-50/60 border-b border-pink-100">
|
<span class="ml-auto text-gray-300 text-sm shrink-0">→</span>
|
||||||
<h2 class="text-sm font-bold text-gray-600">{{ $group['label'] }}</h2>
|
</a>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="divide-y divide-pink-50">
|
@endforeach
|
||||||
@foreach($group['items'] as $item)
|
</div>
|
||||||
<a href="{{ $item['url'] }}"
|
@endif
|
||||||
class="flex items-center gap-4 px-5 py-3 hover:bg-pink-50/40 transition-colors">
|
|
||||||
<span class="text-2xl shrink-0">{{ $item['icon'] }}</span>
|
|
||||||
<div class="min-w-0">
|
|
||||||
<div class="font-semibold text-gray-800 text-sm truncate">{{ $item['title'] }}</div>
|
|
||||||
@if($item['subtitle'])
|
|
||||||
<div class="text-xs text-gray-400 truncate mt-0.5">{{ $item['subtitle'] }}</div>
|
|
||||||
@endif
|
|
||||||
</div>
|
|
||||||
<span class="ml-auto text-gray-300 text-sm shrink-0">→</span>
|
|
||||||
</a>
|
|
||||||
@endforeach
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endforeach
|
|
||||||
</div>
|
|
||||||
@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