Compare commits
2 Commits
5656dc1f3a
...
64092d3abc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
64092d3abc | ||
|
|
8b5992b7ce |
@@ -70,7 +70,15 @@ class EventController extends Controller
|
|||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return view('schedule.index', compact('events', 'clients', 'calendarEvents', 'categoryTree'));
|
$holidays = \Illuminate\Support\Facades\Cache::remember('indonesian_holidays', 86400, function() {
|
||||||
|
$url = "https://libur.deno.dev/api";
|
||||||
|
$response = @file_get_contents($url);
|
||||||
|
if ($response === false) return [];
|
||||||
|
$data = json_decode($response, true);
|
||||||
|
return is_array($data) ? $data : [];
|
||||||
|
});
|
||||||
|
|
||||||
|
return view('schedule.index', compact('events', 'clients', 'calendarEvents', 'categoryTree', 'holidays'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function store(Request $request): RedirectResponse
|
public function store(Request $request): RedirectResponse
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
@section('title', 'Categories')
|
@section('title', 'Categories')
|
||||||
@section('page-title', '🏷️ Category Management')
|
@section('page-title', 'Category Management 🏷️')
|
||||||
@section('page-subtitle', 'Organise clients, schedules & content by category')
|
@section('page-subtitle', 'Organise clients, schedules & content by category')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="max-w-4xl mx-auto space-y-5">
|
<div class="max-w-4xl mx-auto space-y-5">
|
||||||
|
|
||||||
@if(session('success'))
|
@if(session('success'))
|
||||||
<div x-data="{ show: true }" x-show="show" x-init="setTimeout(() => show = false, 4000)"
|
<div x-data="{ show: true }" x-show="show" x-init="setTimeout(() => show = false, 4000)"
|
||||||
@@ -17,9 +17,8 @@
|
|||||||
{{-- Add form --}}
|
{{-- Add form --}}
|
||||||
<div class="cat-card overflow-hidden" x-data="{ open: {{ $errors->any() ? 'true' : 'false' }} }">
|
<div class="cat-card overflow-hidden" x-data="{ open: {{ $errors->any() ? 'true' : 'false' }} }">
|
||||||
<div class="flex items-center gap-3 px-5 py-4 border-b border-pink-50">
|
<div class="flex items-center gap-3 px-5 py-4 border-b border-pink-50">
|
||||||
<button type="button" @click="open = !open"
|
<button type="button" @click="open = !open" class="btn-sakura text-xs"
|
||||||
class="btn-sakura text-xs"
|
x-text="open ? '✕ Close' : '+ Add Category'">
|
||||||
x-text="open ? '✕ Close' : '+ Add New Category'">
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -28,9 +27,9 @@
|
|||||||
class="p-5 grid grid-cols-2 sm:grid-cols-4 gap-3 items-end border-b border-pink-50">
|
class="p-5 grid grid-cols-2 sm:grid-cols-4 gap-3 items-end border-b border-pink-50">
|
||||||
@csrf
|
@csrf
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Name <span class="text-pink-400">*</span></label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Name <span
|
||||||
<input type="text" name="name" required maxlength="100"
|
class="text-pink-400">*</span></label>
|
||||||
placeholder="e.g. Susu Formula"
|
<input type="text" name="name" required maxlength="100" placeholder="e.g. Susu Formula"
|
||||||
class="input-soft" value="{{ old('name') }}">
|
class="input-soft" value="{{ old('name') }}">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -46,8 +45,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Icon (emoji)</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Icon (emoji)</label>
|
||||||
<input type="text" name="icon" maxlength="10" placeholder="🏷️"
|
<input type="text" name="icon" maxlength="10" placeholder="🏷️" class="input-soft"
|
||||||
class="input-soft" value="{{ old('icon') }}">
|
value="{{ old('icon') }}">
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-end gap-2">
|
<div class="flex items-end gap-2">
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
@@ -84,7 +83,8 @@
|
|||||||
@endif
|
@endif
|
||||||
<div class="flex-1 min-w-0">
|
<div class="flex-1 min-w-0">
|
||||||
<div class="font-semibold text-gray-700 text-sm">{{ $root->name }}</div>
|
<div class="font-semibold text-gray-700 text-sm">{{ $root->name }}</div>
|
||||||
<div class="text-xs text-gray-400">{{ $root->children->count() }} sub · {{ $root->clients_count }} client(s)</div>
|
<div class="text-xs text-gray-400">{{ $root->children->count() }} sub · {{ $root->clients_count }}
|
||||||
|
client(s)</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex gap-2 shrink-0">
|
<div class="flex gap-2 shrink-0">
|
||||||
<button @click="editing = !editing"
|
<button @click="editing = !editing"
|
||||||
@@ -95,7 +95,8 @@
|
|||||||
<form action="{{ route('client-categories.destroy', $root) }}" method="POST"
|
<form action="{{ route('client-categories.destroy', $root) }}" method="POST"
|
||||||
onsubmit="return confirm('Remove this category? Its children will be promoted.')">
|
onsubmit="return confirm('Remove this category? Its children will be promoted.')">
|
||||||
@csrf @method('DELETE')
|
@csrf @method('DELETE')
|
||||||
<button class="text-xs px-3 py-1.5 rounded-full border border-red-100 text-red-400 hover:bg-red-50">
|
<button
|
||||||
|
class="text-xs px-3 py-1.5 rounded-full border border-red-100 text-red-400 hover:bg-red-50">
|
||||||
🗑️
|
🗑️
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
@@ -144,7 +145,8 @@
|
|||||||
{{-- Children --}}
|
{{-- Children --}}
|
||||||
@foreach($root->children as $child)
|
@foreach($root->children as $child)
|
||||||
<div x-data="{ editingC: false }">
|
<div x-data="{ editingC: false }">
|
||||||
<div class="flex items-center gap-3 px-5 py-2.5 pl-12 border-t border-pink-50/60 hover:bg-pink-50/20 transition-colors">
|
<div
|
||||||
|
class="flex items-center gap-3 px-5 py-2.5 pl-12 border-t border-pink-50/60 hover:bg-pink-50/20 transition-colors">
|
||||||
<span class="text-base w-6 text-center shrink-0">{{ $child->icon ?: '↳' }}</span>
|
<span class="text-base w-6 text-center shrink-0">{{ $child->icon ?: '↳' }}</span>
|
||||||
@if($child->color)
|
@if($child->color)
|
||||||
<span class="w-2.5 h-2.5 rounded-full shrink-0" style="background:{{ $child->color }}"></span>
|
<span class="w-2.5 h-2.5 rounded-full shrink-0" style="background:{{ $child->color }}"></span>
|
||||||
@@ -162,7 +164,8 @@
|
|||||||
<form action="{{ route('client-categories.destroy', $child) }}" method="POST"
|
<form action="{{ route('client-categories.destroy', $child) }}" method="POST"
|
||||||
onsubmit="return confirm('Remove subcategory?')">
|
onsubmit="return confirm('Remove subcategory?')">
|
||||||
@csrf @method('DELETE')
|
@csrf @method('DELETE')
|
||||||
<button class="text-xs px-2.5 py-1 rounded-full border border-red-100 text-red-400 hover:bg-red-50">
|
<button
|
||||||
|
class="text-xs px-2.5 py-1 rounded-full border border-red-100 text-red-400 hover:bg-red-50">
|
||||||
🗑️
|
🗑️
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
@@ -215,5 +218,5 @@
|
|||||||
</div>
|
</div>
|
||||||
@endforelse
|
@endforelse
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<div class="flex items-center justify-between gap-2 mb-3">
|
<div class="flex items-center justify-between gap-2 mb-3">
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<a href="{{ route('clients.create') }}" class="btn-sakura text-sm">+ Add</a>
|
<a href="{{ route('clients.create') }}" class="btn-sakura text-sm">+ Add Client</a>
|
||||||
@if(request('category') || request('status'))
|
@if(request('category') || request('status'))
|
||||||
<a href="{{ route('clients.index') }}"
|
<a href="{{ route('clients.index') }}"
|
||||||
class="text-xs px-3 py-2 rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50 flex items-center gap-1">
|
class="text-xs px-3 py-2 rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50 flex items-center gap-1">
|
||||||
@@ -37,17 +37,17 @@
|
|||||||
<div x-show="open" x-transition.duration.150ms>
|
<div x-show="open" x-transition.duration.150ms>
|
||||||
<form method="GET" action="{{ route('clients.index') }}" id="filter-form" class="cat-card p-3 mb-4">
|
<form method="GET" action="{{ route('clients.index') }}" id="filter-form" class="cat-card p-3 mb-4">
|
||||||
{{-- Row 1: search + dropdowns --}}
|
{{-- Row 1: search + dropdowns --}}
|
||||||
<div class="flex flex-col sm:flex-row sm:items-center gap-2">
|
<div class="grid grid-cols-1 sm:grid-cols-12 gap-3 items-center">
|
||||||
{{-- Search (fills remaining space on desktop) --}}
|
{{-- Search --}}
|
||||||
<div class="relative flex-1 min-w-0">
|
<div class="relative sm:col-span-5 lg:col-span-6 w-full">
|
||||||
<span
|
<span class="absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 text-sm pointer-events-none"></span>
|
||||||
class="absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 text-sm pointer-events-none">🔍</span>
|
<input type="text" placeholder="🔍 Filter by name…" class="input-soft pl-9 text-sm py-2 w-full"
|
||||||
<input type="text" placeholder="Filter by name…" class="input-soft pl-9 text-sm py-2 w-full"
|
|
||||||
oninput="filterClients(this.value)" id="search-input">
|
oninput="filterClients(this.value)" id="search-input">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- Category dropdown --}}
|
{{-- Category dropdown --}}
|
||||||
<select name="category" class="input-soft text-sm py-2 sm:w-48 shrink-0" onchange="this.form.submit()">
|
<div class="sm:col-span-4 lg:col-span-3 w-full">
|
||||||
|
<select name="category" class="input-soft text-sm py-2 w-full" onchange="this.form.submit()">
|
||||||
<option value="">All Categories</option>
|
<option value="">All Categories</option>
|
||||||
@foreach($categories as $parent)
|
@foreach($categories as $parent)
|
||||||
<option value="{{ $parent->id }}" {{ request('category') == $parent->id ? 'selected' : '' }}>
|
<option value="{{ $parent->id }}" {{ request('category') == $parent->id ? 'selected' : '' }}>
|
||||||
@@ -60,9 +60,11 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{-- Status dropdown --}}
|
{{-- Status dropdown --}}
|
||||||
<select name="status" class="input-soft text-sm py-2 sm:w-36 shrink-0" onchange="this.form.submit()">
|
<div class="sm:col-span-3 lg:col-span-3 w-full">
|
||||||
|
<select name="status" class="input-soft text-sm py-2 w-full" onchange="this.form.submit()">
|
||||||
<option value="">All Statuses</option>
|
<option value="">All Statuses</option>
|
||||||
@foreach($statuses as $s)
|
@foreach($statuses as $s)
|
||||||
<option value="{{ $s->value }}" {{ request('status') === $s->value ? 'selected' : '' }}>
|
<option value="{{ $s->value }}" {{ request('status') === $s->value ? 'selected' : '' }}>
|
||||||
@@ -71,6 +73,7 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,31 +5,33 @@
|
|||||||
@section('page-subtitle', 'Drag cards between columns to update status')
|
@section('page-subtitle', 'Drag cards between columns to update status')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-3 mb-5">
|
<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-3 mb-5">
|
||||||
<div class="flex gap-2 flex-wrap">
|
<div class="flex gap-2 flex-wrap">
|
||||||
@foreach(['instagram','tiktok','youtube'] as $p)
|
<a href="{{ route('content.create') }}" class="btn-sakura text-sm shrink-0">+ New Brief</a>
|
||||||
|
@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>
|
||||||
@endforeach
|
@endforeach
|
||||||
@if(request('platform'))
|
@if(request('platform'))
|
||||||
<a href="{{ route('content.index') }}" class="px-3 py-1.5 rounded-full text-xs text-gray-400 hover:text-gray-600 border border-gray-200 bg-white">✕ Clear</a>
|
<a href="{{ route('content.index') }}"
|
||||||
|
class="px-3 py-1.5 rounded-full text-xs text-gray-400 hover:text-gray-600 border border-gray-200 bg-white">✕
|
||||||
|
Clear</a>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<a href="{{ route('content.create') }}" class="btn-sakura text-sm shrink-0">+ New Brief</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{--
|
</div>
|
||||||
|
|
||||||
|
{{--
|
||||||
Mobile : grid grid-cols-1 → columns stack vertically, each full width
|
Mobile : grid grid-cols-1 → columns stack vertically, each full width
|
||||||
Desktop : flex flex-nowrap → columns in a single horizontal row, each flex-1
|
Desktop : flex flex-nowrap → columns in a single horizontal row, each flex-1
|
||||||
x-sort:group is on the INNER items div (not the column div) to avoid
|
x-sort:group is on the INNER items div (not the column div) to avoid
|
||||||
SortableJS mutating the outer layout container.
|
SortableJS mutating the outer layout container.
|
||||||
--}}
|
--}}
|
||||||
<div class="grid grid-cols-1 gap-4 lg:flex lg:flex-nowrap lg:gap-4"
|
<div class="grid grid-cols-1 gap-4 lg:flex lg:flex-nowrap lg:gap-4" x-data="kanban()">
|
||||||
x-data="kanban()">
|
|
||||||
@foreach($columns as $col)
|
@foreach($columns as $col)
|
||||||
@php $status = $col['status']; @endphp
|
@php $status = $col['status']; @endphp
|
||||||
|
|
||||||
@@ -43,23 +45,33 @@
|
|||||||
<span class="text-base">{{ $status->icon() }}</span>
|
<span class="text-base">{{ $status->icon() }}</span>
|
||||||
<span class="font-bold text-gray-700 text-sm">{{ $status->label() }}</span>
|
<span class="font-bold text-gray-700 text-sm">{{ $status->label() }}</span>
|
||||||
</div>
|
</div>
|
||||||
<span class="text-xs bg-white rounded-full px-2 py-0.5 font-bold text-gray-500 shadow-sm">{{ count($col['items']) }}</span>
|
<span
|
||||||
|
class="text-xs bg-white rounded-full px-2 py-0.5 font-bold text-gray-500 shadow-sm">{{ count($col['items']) }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- Sortable items container --}}
|
{{-- Sortable items container --}}
|
||||||
<div class="flex flex-col gap-2 flex-1 min-h-12"
|
<div class="flex flex-col gap-2 flex-1 min-h-12 kanban-column"
|
||||||
x-sort:group="kanban"
|
|
||||||
@sort="moved($event, '{{ $status->value }}')"
|
|
||||||
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"
|
cursor-grab active:cursor-grabbing hover:shadow-md transition-shadow kanban-item"
|
||||||
x-sort:item="{{ $brief->id }}"
|
|
||||||
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="{{ route('content.show', $brief) }}"
|
<a href="#"
|
||||||
|
data-brief="{{ json_encode([
|
||||||
|
'id' => $brief->id,
|
||||||
|
'title' => $brief->title,
|
||||||
|
'platform' => $brief->platform_icon . ' ' . ucfirst($brief->platform),
|
||||||
|
'status' => $brief->status->label(),
|
||||||
|
'client' => $brief->client?->name,
|
||||||
|
'target_date' => $brief->target_date?->format('d M Y'),
|
||||||
|
'hook' => $brief->hook,
|
||||||
|
'body' => $brief->body,
|
||||||
|
'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">
|
class="font-semibold text-gray-800 text-xs leading-tight hover:text-pink-500 line-clamp-2 flex-1">
|
||||||
{{ $brief->title }}
|
{{ $brief->title }}
|
||||||
</a>
|
</a>
|
||||||
@@ -68,12 +80,14 @@
|
|||||||
<div class="text-xs text-gray-400 mb-1">👥 {{ $brief->client->name }}</div>
|
<div class="text-xs text-gray-400 mb-1">👥 {{ $brief->client->name }}</div>
|
||||||
@endif
|
@endif
|
||||||
@if($brief->target_date)
|
@if($brief->target_date)
|
||||||
<div class="text-xs {{ $brief->target_date->isPast() && $brief->status->value !== 'posted' ? 'text-red-400 font-bold' : 'text-gray-400' }}">
|
<div
|
||||||
|
class="text-xs {{ $brief->target_date->isPast() && $brief->status->value !== 'posted' ? 'text-red-400 font-bold' : 'text-gray-400' }}">
|
||||||
📅 {{ $brief->target_date->format('d M') }}
|
📅 {{ $brief->target_date->format('d M') }}
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
<div class="flex justify-end mt-1.5">
|
<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>
|
<a href="{{ route('content.edit', $brief) }}"
|
||||||
|
class="text-xs text-gray-400 hover:text-pink-500">Edit</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -87,26 +101,108 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
|
||||||
|
|
||||||
@push('scripts')
|
{{-- Content Detail Request Modal --}}
|
||||||
<script>
|
<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>
|
||||||
function kanban() {
|
<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"
|
||||||
|
x-transition:enter="transition ease-out duration-300"
|
||||||
|
x-transition:enter-start="opacity-0 translate-y-4"
|
||||||
|
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-end="opacity-0 translate-y-4">
|
||||||
|
<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>
|
||||||
|
<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 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">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">
|
||||||
|
<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 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>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template x-if="activeBrief?.hook">
|
||||||
|
<div class="flex flex-col gap-1 mt-4">
|
||||||
|
<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>
|
||||||
|
</template>
|
||||||
|
<template x-if="activeBrief?.body">
|
||||||
|
<div class="flex flex-col gap-1 mt-4">
|
||||||
|
<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>
|
||||||
|
</template>
|
||||||
|
<template x-if="activeBrief?.notes">
|
||||||
|
<div class="flex flex-col gap-1 mt-4">
|
||||||
|
<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>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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}`" 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>
|
||||||
|
|
||||||
|
@push('scripts')
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/sortablejs@1.15.2/Sortable.min.js"></script>
|
||||||
|
<script>
|
||||||
|
function kanban() {
|
||||||
return {
|
return {
|
||||||
moved(event, targetStatus) {
|
modalOpen: false,
|
||||||
const id = event.item?.dataset?.id;
|
activeBrief: null,
|
||||||
if (!id) return;
|
init() {
|
||||||
|
// Start Sortable once script loads
|
||||||
|
const initSort = () => {
|
||||||
|
if (typeof Sortable !== 'undefined') {
|
||||||
|
document.querySelectorAll('.kanban-column').forEach(el => {
|
||||||
|
Sortable.create(el, {
|
||||||
|
group: 'kanban-board',
|
||||||
|
animation: 150,
|
||||||
|
onEnd: (evt) => {
|
||||||
|
const id = evt.item.dataset.id;
|
||||||
|
const targetCol = evt.to.dataset.colStatus;
|
||||||
|
if (!id || !targetCol) return;
|
||||||
|
|
||||||
|
// If dropped in same column identically, skip fetch
|
||||||
|
if (evt.from === evt.to && evt.oldIndex === evt.newIndex) return;
|
||||||
|
|
||||||
fetch(`/content/${id}/status`, {
|
fetch(`/content/${id}/status`, {
|
||||||
method: 'PATCH',
|
method: 'PATCH',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').content,
|
'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').content,
|
||||||
},
|
},
|
||||||
body: JSON.stringify({ status: targetStatus }),
|
body: JSON.stringify({ status: targetCol }),
|
||||||
}).then(r => { if (r.ok) window.KolManager.notify('Status updated! 🎬'); });
|
}).then(r => {
|
||||||
},
|
if (r.ok) window.KolManager.notify('Status updated! 🎬');
|
||||||
|
else window.KolManager.notify('❌ Failed to update status');
|
||||||
|
}).catch(() => window.KolManager.notify('❌ Network error!'));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setTimeout(initSort, 100);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
initSort();
|
||||||
</script>
|
},
|
||||||
@endpush
|
openModal(brief) {
|
||||||
|
this.activeBrief = brief;
|
||||||
|
this.modalOpen = true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
@endpush
|
||||||
@endsection
|
@endsection
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
@section('title', 'Brand Contracts')
|
@section('title', 'Brand Contracts')
|
||||||
@section('page-title', '📋 Brand Contracts')
|
@section('page-title', 'Brand Contracts 📋')
|
||||||
@section('page-subtitle', 'Manage exclusive brand agreements per category')
|
@section('page-subtitle', 'Manage exclusive brand agreements per category')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
<div class="flex items-center gap-3 px-5 py-4 border-b border-pink-50">
|
<div class="flex items-center gap-3 px-5 py-4 border-b border-pink-50">
|
||||||
<button type="button" @click="open = !open"
|
<button type="button" @click="open = !open"
|
||||||
class="btn-sakura text-xs"
|
class="btn-sakura text-xs"
|
||||||
x-text="open ? '✕ Close' : '+ Add New Contract'">
|
x-text="open ? '✕ Close' : '+ Add Contract'">
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -209,6 +209,7 @@
|
|||||||
<li>🔒 When a contract is <strong>Active</strong>, creating schedules or content for a competing brand in the same category will show a warning.</li>
|
<li>🔒 When a contract is <strong>Active</strong>, creating schedules or content for a competing brand in the same category will show a warning.</li>
|
||||||
<li>✅ The contracted brand itself is always allowed — no warning shown.</li>
|
<li>✅ The contracted brand itself is always allowed — no warning shown.</li>
|
||||||
<li>🏷️ Blocking a <strong>parent category</strong> also blocks all its subcategories.</li>
|
<li>🏷️ Blocking a <strong>parent category</strong> also blocks all its subcategories.</li>
|
||||||
|
<li>🏷️ Blocking a <strong>child category</strong> does not block the parent category.</li>
|
||||||
<li>📅 Contracts only block during their active date range. Expired contracts are ignored automatically.</li>
|
<li>📅 Contracts only block during their active date range. Expired contracts are ignored automatically.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -156,4 +156,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@include('layouts.fab')
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
@@ -5,19 +5,19 @@
|
|||||||
@section('page-subtitle', 'Manage your brand deal payments')
|
@section('page-subtitle', 'Manage your brand deal payments')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-3 mb-5">
|
<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-3 mb-5">
|
||||||
|
|
||||||
<div class="flex gap-2 shrink-0">
|
<div class="flex gap-2 shrink-0">
|
||||||
|
<a href="{{ route('invoices.create') }}" class="btn-sakura text-sm">+ New Invoice</a>
|
||||||
<a href="{{ route('invoice-settings.edit') }}"
|
<a href="{{ route('invoice-settings.edit') }}"
|
||||||
class="text-xs px-3 py-2 rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50 flex items-center gap-1">
|
class="btn-sakura text-sm px-3 py-2 rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50 flex items-center gap-1">
|
||||||
⚙️ Settings
|
⚙️ Settings
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ route('invoices.create') }}" class="btn-sakura text-sm">+ New Invoice</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- Mobile card list --}}
|
{{-- Mobile card list --}}
|
||||||
<div class="flex flex-col gap-3 sm:hidden">
|
<div class="flex flex-col gap-3 sm:hidden">
|
||||||
@forelse($invoices as $invoice)
|
@forelse($invoices as $invoice)
|
||||||
<div class="cat-card p-4">
|
<div class="cat-card p-4">
|
||||||
<div class="flex items-start justify-between gap-2 mb-2">
|
<div class="flex items-start justify-between gap-2 mb-2">
|
||||||
@@ -33,22 +33,26 @@
|
|||||||
<span class="font-bold text-gray-800">{{ $invoice->formatted_total }}</span>
|
<span class="font-bold text-gray-800">{{ $invoice->formatted_total }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex gap-2 mt-3 pt-3 border-t border-pink-50">
|
<div class="flex gap-2 mt-3 pt-3 border-t border-pink-50">
|
||||||
<a href="{{ route('invoices.show', $invoice) }}" class="flex-1 text-center text-xs py-1.5 px-3 rounded-full border border-pink-200 text-pink-600 hover:bg-pink-50">View</a>
|
<a href="{{ route('invoices.show', $invoice) }}"
|
||||||
<a href="{{ route('invoices.pdf', $invoice) }}" target="_blank" class="flex-1 text-center text-xs py-1.5 px-3 rounded-full border border-pink-200 text-pink-600 hover:bg-pink-50">PDF</a>
|
class="flex-1 text-center text-xs py-1.5 px-3 rounded-full border border-pink-200 text-pink-600 hover:bg-pink-50">View</a>
|
||||||
<a href="{{ route('invoices.edit', $invoice) }}" class="flex-1 text-center text-xs py-1.5 px-3 rounded-full border border-pink-200 text-gray-600 hover:bg-pink-50">Edit</a>
|
<a href="{{ route('invoices.pdf', $invoice) }}" target="_blank"
|
||||||
|
class="flex-1 text-center text-xs py-1.5 px-3 rounded-full border border-pink-200 text-pink-600 hover:bg-pink-50">PDF</a>
|
||||||
|
<a href="{{ route('invoices.edit', $invoice) }}"
|
||||||
|
class="flex-1 text-center text-xs py-1.5 px-3 rounded-full border border-pink-200 text-gray-600 hover:bg-pink-50">Edit</a>
|
||||||
{{-- Share button disabled --}}
|
{{-- Share button disabled --}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@empty
|
@empty
|
||||||
<div class="text-center py-16 text-gray-400">
|
<div class="text-center py-16 text-gray-400">
|
||||||
<span class="text-5xl block mb-2">🧾</span>
|
<span class="text-5xl block mb-2">🧾</span>
|
||||||
<p>No invoices yet. <a href="{{ route('invoices.create') }}" class="text-pink-500 hover:underline">Create one!</a></p>
|
<p>No invoices yet. <a href="{{ route('invoices.create') }}" class="text-pink-500 hover:underline">Create
|
||||||
|
one!</a></p>
|
||||||
</div>
|
</div>
|
||||||
@endforelse
|
@endforelse
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- Desktop table --}}
|
{{-- Desktop table --}}
|
||||||
<div class="cat-card overflow-hidden hidden sm:block">
|
<div class="cat-card overflow-hidden hidden sm:block">
|
||||||
<div class="overflow-x-auto">
|
<div class="overflow-x-auto">
|
||||||
<table class="table w-full">
|
<table class="table w-full">
|
||||||
<thead class="bg-pink-50">
|
<thead class="bg-pink-50">
|
||||||
@@ -65,7 +69,8 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
@forelse($invoices as $invoice)
|
@forelse($invoices as $invoice)
|
||||||
<tr class="border-b border-pink-50 hover:bg-pink-50/50 transition-colors">
|
<tr class="border-b border-pink-50 hover:bg-pink-50/50 transition-colors">
|
||||||
<td class="px-5 py-4 font-mono text-sm font-semibold text-gray-700">{{ $invoice->invoice_number }}</td>
|
<td class="px-5 py-4 font-mono text-sm font-semibold text-gray-700">{{ $invoice->invoice_number }}
|
||||||
|
</td>
|
||||||
<td class="px-5 py-4 text-sm text-gray-600">{{ $invoice->client?->name ?? '—' }}</td>
|
<td class="px-5 py-4 text-sm text-gray-600">{{ $invoice->client?->name ?? '—' }}</td>
|
||||||
<td class="px-5 py-4 text-sm text-gray-700 max-w-xs truncate">{{ $invoice->title }}</td>
|
<td class="px-5 py-4 text-sm text-gray-700 max-w-xs truncate">{{ $invoice->title }}</td>
|
||||||
<td class="px-5 py-4 font-bold text-gray-800 text-sm">{{ $invoice->formatted_total }}</td>
|
<td class="px-5 py-4 font-bold text-gray-800 text-sm">{{ $invoice->formatted_total }}</td>
|
||||||
@@ -75,27 +80,34 @@
|
|||||||
<span class="text-red-400 text-xs block">Overdue!</span>
|
<span class="text-red-400 text-xs block">Overdue!</span>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td class="px-5 py-4"><span class="badge {{ $invoice->status->badgeClass() }}">{{ $invoice->status->label() }}</span></td>
|
<td class="px-5 py-4"><span
|
||||||
|
class="badge {{ $invoice->status->badgeClass() }}">{{ $invoice->status->label() }}</span>
|
||||||
|
</td>
|
||||||
<td class="px-5 py-4">
|
<td class="px-5 py-4">
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<a href="{{ route('invoices.show', $invoice) }}" class="text-xs text-pink-500 hover:underline">View</a>
|
<a href="{{ route('invoices.show', $invoice) }}"
|
||||||
<a href="{{ route('invoices.pdf', $invoice) }}" class="text-xs text-pink-500 hover:underline" target="_blank">PDF</a>
|
class="text-xs text-pink-500 hover:underline">View</a>
|
||||||
<a href="{{ route('invoices.edit', $invoice) }}" class="text-xs text-gray-500 hover:underline">Edit</a>
|
<a href="{{ route('invoices.pdf', $invoice) }}"
|
||||||
|
class="text-xs text-pink-500 hover:underline" target="_blank">PDF</a>
|
||||||
|
<a href="{{ route('invoices.edit', $invoice) }}"
|
||||||
|
class="text-xs text-gray-500 hover:underline">Edit</a>
|
||||||
{{-- Share button disabled --}}
|
{{-- Share button disabled --}}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@empty
|
@empty
|
||||||
<tr><td colspan="7" class="text-center py-16 text-gray-400">
|
<tr>
|
||||||
|
<td colspan="7" class="text-center py-16 text-gray-400">
|
||||||
<span class="text-4xl block mb-2">🧾</span>
|
<span class="text-4xl block mb-2">🧾</span>
|
||||||
No invoices yet.
|
No invoices yet.
|
||||||
</td></tr>
|
</td>
|
||||||
|
</tr>
|
||||||
@endforelse
|
@endforelse
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-4">{{ $invoices->links() }}</div>
|
<div class="mt-4">{{ $invoices->links() }}</div>
|
||||||
{{-- Share scripts disabled --}}
|
{{-- Share scripts disabled --}}
|
||||||
@endsection
|
@endsection
|
||||||
@@ -5,10 +5,10 @@
|
|||||||
@section('page-subtitle', 'Customize number format, header, and invoice defaults')
|
@section('page-subtitle', 'Customize number format, header, and invoice defaults')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="max-w-2xl mx-auto">
|
<div class="max-w-2xl mx-auto">
|
||||||
<div class="flex items-center gap-3 mb-5">
|
<div class="flex items-center gap-3 mb-5">
|
||||||
<a href="{{ route('invoices.index') }}"
|
<a href="{{ route('invoices.index') }}"
|
||||||
class="text-xs px-3 py-2 rounded-full border border-pink-200 text-gray-500 hover:bg-pink-50">
|
class="btn-sakura text-sm px-3 py-2 rounded-full border border-pink-200 text-gray-500 hover:bg-pink-50">
|
||||||
← Back to Invoices
|
← Back to Invoices
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -21,8 +21,7 @@
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<form action="{{ route('invoice-settings.update') }}" method="POST" enctype="multipart/form-data"
|
<form action="{{ route('invoice-settings.update') }}" method="POST" enctype="multipart/form-data" class="space-y-5">
|
||||||
class="space-y-5">
|
|
||||||
@csrf
|
@csrf
|
||||||
|
|
||||||
{{-- Number Format --}}
|
{{-- Number Format --}}
|
||||||
@@ -34,9 +33,8 @@
|
|||||||
Prefix <span class="text-pink-400">*</span>
|
Prefix <span class="text-pink-400">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" name="invoice_prefix"
|
<input type="text" name="invoice_prefix"
|
||||||
value="{{ old('invoice_prefix', $settings->invoice_prefix) }}"
|
value="{{ old('invoice_prefix', $settings->invoice_prefix) }}" class="input-soft text-sm"
|
||||||
class="input-soft text-sm" placeholder="INV-EA" required
|
placeholder="INV-EA" required id="prefix-input" oninput="updatePreview()">
|
||||||
id="prefix-input" oninput="updatePreview()">
|
|
||||||
<p class="text-xs text-gray-400 mt-1">e.g. <code>INV-EA</code> → <strong>INV-EA-001</strong></p>
|
<p class="text-xs text-gray-400 mt-1">e.g. <code>INV-EA</code> → <strong>INV-EA-001</strong></p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -45,8 +43,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<input type="number" name="invoice_next_number"
|
<input type="number" name="invoice_next_number"
|
||||||
value="{{ old('invoice_next_number', $settings->invoice_next_number) }}"
|
value="{{ old('invoice_next_number', $settings->invoice_next_number) }}"
|
||||||
class="input-soft text-sm" min="1" required
|
class="input-soft text-sm" min="1" required id="number-input" oninput="updatePreview()">
|
||||||
id="number-input" oninput="updatePreview()">
|
|
||||||
<p class="text-xs text-gray-400 mt-1">Used for the next new invoice</p>
|
<p class="text-xs text-gray-400 mt-1">Used for the next new invoice</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -62,8 +59,7 @@
|
|||||||
<h2 class="text-sm font-bold text-gray-700 mb-4 flex items-center gap-2">🎨 Invoice Header</h2>
|
<h2 class="text-sm font-bold text-gray-700 mb-4 flex items-center gap-2">🎨 Invoice Header</h2>
|
||||||
|
|
||||||
{{-- Logo auto-upload (independent of main Save form) --}}
|
{{-- Logo auto-upload (independent of main Save form) --}}
|
||||||
<div class="mb-4"
|
<div class="mb-4" x-data="{
|
||||||
x-data="{
|
|
||||||
uploading: false,
|
uploading: false,
|
||||||
errorMsg: '',
|
errorMsg: '',
|
||||||
logoUrl: '{{ $settings->header_logo ? asset('storage/' . $settings->header_logo) : '' }}',
|
logoUrl: '{{ $settings->header_logo ? asset('storage/' . $settings->header_logo) : '' }}',
|
||||||
@@ -118,15 +114,12 @@
|
|||||||
|
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Logo / Profile Picture</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Logo / Profile Picture</label>
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<input type="file" accept="image/*"
|
<input type="file" accept="image/*" @change="pickFile($event.target)" class="w-full text-sm text-gray-600
|
||||||
@change="pickFile($event.target)"
|
|
||||||
class="w-full text-sm text-gray-600
|
|
||||||
file:mr-3 file:py-1.5 file:px-4
|
file:mr-3 file:py-1.5 file:px-4
|
||||||
file:rounded-full file:border-0
|
file:rounded-full file:border-0
|
||||||
file:text-xs file:font-semibold
|
file:text-xs file:font-semibold
|
||||||
file:bg-pink-50 file:text-pink-600
|
file:bg-pink-50 file:text-pink-600
|
||||||
hover:file:bg-pink-100 cursor-pointer"
|
hover:file:bg-pink-100 cursor-pointer" :disabled="uploading">
|
||||||
:disabled="uploading">
|
|
||||||
<span x-show="uploading" class="text-xs text-pink-500 mt-1 block">Uploading…</span>
|
<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>
|
<span x-show="errorMsg" x-text="errorMsg" class="text-xs text-red-500 mt-1 block"></span>
|
||||||
</div>
|
</div>
|
||||||
@@ -136,14 +129,12 @@
|
|||||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Talent / Business Name</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Talent / Business Name</label>
|
||||||
<input type="text" name="header_name"
|
<input type="text" name="header_name" value="{{ old('header_name', $settings->header_name) }}"
|
||||||
value="{{ old('header_name', $settings->header_name) }}"
|
|
||||||
class="input-soft text-sm" placeholder="Your name or brand">
|
class="input-soft text-sm" placeholder="Your name or brand">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Title / Tagline</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Title / Tagline</label>
|
||||||
<input type="text" name="header_title"
|
<input type="text" name="header_title" value="{{ old('header_title', $settings->header_title) }}"
|
||||||
value="{{ old('header_title', $settings->header_title) }}"
|
|
||||||
class="input-soft text-sm" placeholder="Content Creator · KOL">
|
class="input-soft text-sm" placeholder="Content Creator · KOL">
|
||||||
</div>
|
</div>
|
||||||
<div x-data="{ color: '{{ old('accent_color', $settings->accent_color ?? '#FFB7C5') }}' }">
|
<div x-data="{ color: '{{ old('accent_color', $settings->accent_color ?? '#FFB7C5') }}' }">
|
||||||
@@ -188,8 +179,8 @@
|
|||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Default Bank Name</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Default Bank Name</label>
|
||||||
<input type="text" name="default_bank_name"
|
<input type="text" name="default_bank_name"
|
||||||
value="{{ old('default_bank_name', $settings->default_bank_name) }}"
|
value="{{ old('default_bank_name', $settings->default_bank_name) }}" class="input-soft text-sm"
|
||||||
class="input-soft text-sm" placeholder="BCA, Mandiri…">
|
placeholder="BCA, Mandiri…">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Default Branch Name</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Default Branch Name</label>
|
||||||
@@ -219,15 +210,15 @@
|
|||||||
|
|
||||||
<button type="submit" class="btn-sakura w-full py-3">💾 Save Settings</button>
|
<button type="submit" class="btn-sakura w-full py-3">💾 Save Settings</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script>
|
<script>
|
||||||
function updatePreview() {
|
function updatePreview() {
|
||||||
const prefix = document.getElementById('prefix-input').value.replace(/-+$/, '') || 'INV';
|
const prefix = document.getElementById('prefix-input').value.replace(/-+$/, '') || 'INV';
|
||||||
const num = parseInt(document.getElementById('number-input').value) || 1;
|
const num = parseInt(document.getElementById('number-input').value) || 1;
|
||||||
document.getElementById('number-preview').textContent = prefix + '-' + String(num).padStart(3, '0');
|
document.getElementById('number-preview').textContent = prefix + '-' + String(num).padStart(3, '0');
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
@endsection
|
@endsection
|
||||||
@@ -5,13 +5,17 @@
|
|||||||
@section('page-subtitle', $invoice->title)
|
@section('page-subtitle', $invoice->title)
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="max-w-3xl mx-auto">
|
<div class="max-w-3xl mx-auto">
|
||||||
<div class="flex gap-3 mb-6">
|
<div class="flex gap-3 mb-6">
|
||||||
<a href="{{ route('invoices.edit', $invoice) }}" class="btn-sakura">Edit</a>
|
<a href="{{ route('invoices.edit', $invoice) }}" class="btn-sakura">Edit</a>
|
||||||
<a href="{{ route('invoices.pdf', $invoice) }}" target="_blank" class="btn btn-outline rounded-full text-pink-500 border-pink-300">📥 Download PDF</a>
|
<a href="{{ route('invoices.pdf', $invoice) }}" target="_blank"
|
||||||
<form action="{{ route('invoices.destroy', $invoice) }}" method="POST" onsubmit="return confirm('Delete this invoice?')">
|
class="btn-sakura text-sm px-4 py-2.5 rounded-full border border-pink-200 text-pink-500 hover:bg-pink-50">📥
|
||||||
|
Download PDF</a>
|
||||||
|
<form action="{{ route('invoices.destroy', $invoice) }}" method="POST"
|
||||||
|
onsubmit="return confirm('Delete this invoice?')">
|
||||||
@csrf @method('DELETE')
|
@csrf @method('DELETE')
|
||||||
<button class="btn btn-ghost rounded-full text-error">Delete</button>
|
<button
|
||||||
|
class="btn-sakura text-sm px-4 py-2.5 rounded-full border border-red-200 text-red-500 hover:bg-red-50">Delete</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -20,12 +24,11 @@
|
|||||||
<div class="flex justify-between items-start mb-8">
|
<div class="flex justify-between items-start mb-8">
|
||||||
<div class="flex items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
@if($invoiceSettings->header_logo)
|
@if($invoiceSettings->header_logo)
|
||||||
<img src="{{ asset('storage/' . $invoiceSettings->header_logo) }}"
|
<img src="{{ asset('storage/' . $invoiceSettings->header_logo) }}" alt="Logo"
|
||||||
alt="Logo" class="h-14 w-14 object-cover rounded-2xl border border-pink-100 shrink-0">
|
class="h-14 w-14 object-cover rounded-2xl border border-pink-100 shrink-0">
|
||||||
@endif
|
@endif
|
||||||
<div>
|
<div>
|
||||||
<div class="text-xl font-extrabold"
|
<div class="text-xl font-extrabold" style="color:{{ $invoiceSettings->accent_color ?? '#FFB7C5' }}">
|
||||||
style="color:{{ $invoiceSettings->accent_color ?? '#FFB7C5' }}">
|
|
||||||
{{ $invoiceSettings->header_name ?: '🐱 Cathy' }}
|
{{ $invoiceSettings->header_name ?: '🐱 Cathy' }}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-sm text-gray-400 mt-0.5">
|
<div class="text-sm text-gray-400 mt-0.5">
|
||||||
@@ -45,9 +48,12 @@
|
|||||||
<h4 class="text-xs font-bold text-gray-400 uppercase mb-2">Bill To</h4>
|
<h4 class="text-xs font-bold text-gray-400 uppercase mb-2">Bill To</h4>
|
||||||
@if($invoice->client)
|
@if($invoice->client)
|
||||||
<div class="font-semibold text-gray-800">{{ $invoice->client->name }}</div>
|
<div class="font-semibold text-gray-800">{{ $invoice->client->name }}</div>
|
||||||
@if($invoice->client->company) <div class="text-sm text-gray-500">{{ $invoice->client->company }}</div> @endif
|
@if($invoice->client->company)
|
||||||
@if($invoice->client->email) <div class="text-sm text-gray-500">{{ $invoice->client->email }}</div> @endif
|
<div class="text-sm text-gray-500">{{ $invoice->client->company }}</div> @endif
|
||||||
@if($invoice->client->full_address) <div class="text-sm text-gray-400">{{ $invoice->client->full_address }}</div> @endif
|
@if($invoice->client->email)
|
||||||
|
<div class="text-sm text-gray-500">{{ $invoice->client->email }}</div> @endif
|
||||||
|
@if($invoice->client->full_address)
|
||||||
|
<div class="text-sm text-gray-400">{{ $invoice->client->full_address }}</div> @endif
|
||||||
@else
|
@else
|
||||||
<div class="text-gray-500 text-sm">No client</div>
|
<div class="text-gray-500 text-sm">No client</div>
|
||||||
@endif
|
@endif
|
||||||
@@ -56,8 +62,12 @@
|
|||||||
<div class="text-xs font-bold text-gray-400 uppercase mb-2">Invoice Details</div>
|
<div class="text-xs font-bold text-gray-400 uppercase mb-2">Invoice Details</div>
|
||||||
<div class="text-sm space-y-1">
|
<div class="text-sm space-y-1">
|
||||||
<div><span class="text-gray-400">Issue:</span> {{ $invoice->issue_date->format('d M Y') }}</div>
|
<div><span class="text-gray-400">Issue:</span> {{ $invoice->issue_date->format('d M Y') }}</div>
|
||||||
<div><span class="text-gray-400">Due:</span> <span class="{{ $invoice->due_date->isPast() && $invoice->status->value !== 'paid' ? 'text-red-500 font-bold' : '' }}">{{ $invoice->due_date->format('d M Y') }}</span></div>
|
<div><span class="text-gray-400">Due:</span> <span
|
||||||
@if($invoice->paid_date) <div><span class="text-gray-400">Paid:</span> {{ $invoice->paid_date->format('d M Y') }}</div> @endif
|
class="{{ $invoice->due_date->isPast() && $invoice->status->value !== 'paid' ? 'text-red-500 font-bold' : '' }}">{{ $invoice->due_date->format('d M Y') }}</span>
|
||||||
|
</div>
|
||||||
|
@if($invoice->paid_date)
|
||||||
|
<div><span class="text-gray-400">Paid:</span> {{ $invoice->paid_date->format('d M Y') }}</div>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -69,10 +79,11 @@
|
|||||||
$r = hexdec(substr($hex, 0, 2));
|
$r = hexdec(substr($hex, 0, 2));
|
||||||
$g = hexdec(substr($hex, 2, 2));
|
$g = hexdec(substr($hex, 2, 2));
|
||||||
$b = hexdec(substr($hex, 4, 2));
|
$b = hexdec(substr($hex, 4, 2));
|
||||||
$tint = sprintf('#%02X%02X%02X',
|
$tint = sprintf(
|
||||||
(int)(255 * 0.92 + $r * 0.08),
|
'#%02X%02X%02X',
|
||||||
(int)(255 * 0.92 + $g * 0.08),
|
(int) (255 * 0.92 + $r * 0.08),
|
||||||
(int)(255 * 0.92 + $b * 0.08)
|
(int) (255 * 0.92 + $g * 0.08),
|
||||||
|
(int) (255 * 0.92 + $b * 0.08)
|
||||||
);
|
);
|
||||||
@endphp
|
@endphp
|
||||||
<table class="w-full mb-6">
|
<table class="w-full mb-6">
|
||||||
@@ -90,12 +101,15 @@
|
|||||||
<td class="py-3 px-4 text-sm text-gray-700">
|
<td class="py-3 px-4 text-sm text-gray-700">
|
||||||
{{ $item->description }}
|
{{ $item->description }}
|
||||||
@if(!$item->is_taxable)
|
@if(!$item->is_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>
|
<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-center text-gray-600">{{ $item->quantity }}</td>
|
||||||
<td class="py-3 px-4 text-sm text-right text-gray-600">Rp {{ number_format($item->unit_price, 0, ',', '.') }}</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 font-semibold text-gray-800">Rp {{ number_format($item->total, 0, ',', '.') }}</td>
|
{{ number_format($item->unit_price, 0, ',', '.') }}</td>
|
||||||
|
<td class="py-3 px-4 text-sm text-right font-semibold text-gray-800">Rp
|
||||||
|
{{ number_format($item->total, 0, ',', '.') }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -105,7 +119,8 @@
|
|||||||
<div class="flex justify-end mb-8">
|
<div class="flex justify-end mb-8">
|
||||||
<div class="w-72 space-y-2 text-sm">
|
<div class="w-72 space-y-2 text-sm">
|
||||||
<div class="flex justify-between text-gray-500">
|
<div class="flex justify-between text-gray-500">
|
||||||
<span>Subtotal</span><span class="font-medium">Rp {{ number_format($invoice->subtotal, 0, ',', '.') }}</span>
|
<span>Subtotal</span><span class="font-medium">Rp
|
||||||
|
{{ number_format($invoice->subtotal, 0, ',', '.') }}</span>
|
||||||
</div>
|
</div>
|
||||||
@if($invoice->tax_rate > 0)
|
@if($invoice->tax_rate > 0)
|
||||||
<div class="flex justify-between text-amber-600">
|
<div class="flex justify-between text-amber-600">
|
||||||
@@ -136,5 +151,5 @@
|
|||||||
<div class="mt-4 text-sm text-gray-500 italic">{{ $invoice->notes }}</div>
|
<div class="mt-4 text-sm text-gray-500 italic">{{ $invoice->notes }}</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
<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> Brand Contracts
|
<span class="text-lg shrink-0">📋</span> Contracts
|
||||||
</a>
|
</a>
|
||||||
<!--
|
<!--
|
||||||
<a href="{{ route('social-hub.index') }}"
|
<a href="{{ route('social-hub.index') }}"
|
||||||
|
|||||||
57
resources/views/layouts/fab.blade.php
Normal file
57
resources/views/layouts/fab.blade.php
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
<div x-data="{ open: false }" class="fixed bottom-6 right-6 z-50 flex flex-col items-end">
|
||||||
|
{{-- Menu items (hidden by default) --}}
|
||||||
|
<div x-show="open" x-transition:enter="transition ease-out duration-200"
|
||||||
|
x-transition:enter-start="opacity-0 translate-y-4 scale-95"
|
||||||
|
x-transition:enter-end="opacity-100 translate-y-0 scale-100"
|
||||||
|
x-transition:leave="transition ease-in duration-150"
|
||||||
|
x-transition:leave-start="opacity-100 translate-y-0 scale-100"
|
||||||
|
x-transition:leave-end="opacity-0 translate-y-4 scale-95"
|
||||||
|
@click.away="open = false"
|
||||||
|
class="flex flex-col items-end gap-3 mb-4" style="display: none;">
|
||||||
|
|
||||||
|
<a href="{{ route('files.index') }}" class="flex items-center gap-3 group">
|
||||||
|
<span class="bg-gray-800 text-white font-medium text-xs px-3 py-2 rounded-lg shadow-xl min-w-max hidden lg:block opacity-0 translate-x-4 group-hover:opacity-100 group-hover:translate-x-0 transition-all duration-300 ease-out">Upload File</span>
|
||||||
|
<div class="w-12 h-12 rounded-full bg-teal-500 text-white flex items-center justify-center shadow hover:scale-110 transition-transform duration-200 text-lg">📁</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="{{ route('notes.index') }}" class="flex items-center gap-3 group">
|
||||||
|
<span class="bg-gray-800 text-white font-medium text-xs px-3 py-2 rounded-lg shadow-xl min-w-max hidden lg:block opacity-0 translate-x-4 group-hover:opacity-100 group-hover:translate-x-0 transition-all duration-300 ease-out">Add Notes</span>
|
||||||
|
<div class="w-12 h-12 rounded-full bg-yellow-400 text-white flex items-center justify-center shadow hover:scale-110 transition-transform duration-200 text-lg">📝</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="{{ route('content.create') }}" class="flex items-center gap-3 group">
|
||||||
|
<span class="bg-gray-800 text-white font-medium text-xs px-3 py-2 rounded-lg shadow-xl min-w-max hidden lg:block opacity-0 translate-x-4 group-hover:opacity-100 group-hover:translate-x-0 transition-all duration-300 ease-out">New Board</span>
|
||||||
|
<div class="w-12 h-12 rounded-full bg-purple-500 text-white flex items-center justify-center shadow hover:scale-110 transition-transform duration-200 text-lg">🎬</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="{{ route('contracts.index') }}" class="flex items-center gap-3 group">
|
||||||
|
<span class="bg-gray-800 text-white font-medium text-xs px-3 py-2 rounded-lg shadow-xl min-w-max hidden lg:block opacity-0 translate-x-4 group-hover:opacity-100 group-hover:translate-x-0 transition-all duration-300 ease-out">New Contract</span>
|
||||||
|
<div class="w-12 h-12 rounded-full bg-rose-500 text-white flex items-center justify-center shadow hover:scale-110 transition-transform duration-200 text-lg">📄</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="{{ route('invoices.create') }}" class="flex items-center gap-3 group">
|
||||||
|
<span class="bg-gray-800 text-white font-medium text-xs px-3 py-2 rounded-lg shadow-xl min-w-max hidden lg:block opacity-0 translate-x-4 group-hover:opacity-100 group-hover:translate-x-0 transition-all duration-300 ease-out">New Invoice</span>
|
||||||
|
<div class="w-12 h-12 rounded-full bg-amber-500 text-white flex items-center justify-center shadow hover:scale-110 transition-transform duration-200 text-lg">🧾</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="{{ route('clients.create') }}" class="flex items-center gap-3 group">
|
||||||
|
<span class="bg-gray-800 text-white font-medium text-xs px-3 py-2 rounded-lg shadow-xl min-w-max hidden lg:block opacity-0 translate-x-4 group-hover:opacity-100 group-hover:translate-x-0 transition-all duration-300 ease-out">Add Client</span>
|
||||||
|
<div class="w-12 h-12 rounded-full bg-emerald-500 text-white flex items-center justify-center shadow hover:scale-110 transition-transform duration-200 text-lg">👥</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="{{ route('schedule.create') }}" class="flex items-center gap-3 group">
|
||||||
|
<span class="bg-gray-800 text-white font-medium text-xs px-3 py-2 rounded-lg shadow-xl min-w-max hidden lg:block opacity-0 translate-x-4 group-hover:opacity-100 group-hover:translate-x-0 transition-all duration-300 ease-out">Add Event</span>
|
||||||
|
<div class="w-12 h-12 rounded-full bg-blue-500 text-white flex items-center justify-center shadow hover:scale-110 transition-transform duration-200 text-lg">📅</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Main FAB button --}}
|
||||||
|
<button @click="open = !open"
|
||||||
|
class="w-16 h-16 rounded-full bg-pink-500 hover:bg-pink-600 text-white flex items-center justify-center shadow-lg shadow-pink-500/40 hover:shadow-2xl hover:shadow-pink-500/50 transition-all duration-300 hover:-translate-y-1 hover:scale-105 active:scale-95 z-50 transform"
|
||||||
|
:class="{'rotate-45 bg-pink-600': open}">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 transition-transform duration-300" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="3">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" d="M12 4v16m8-8H4" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
@@ -1,17 +1,16 @@
|
|||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
|
||||||
@section('title', 'Notes')
|
@section('title', 'Notes')
|
||||||
@section('page-title', '📝 Notes')
|
@section('page-title', 'Notes Management 📝')
|
||||||
@section('page-subtitle', 'Quick notes, checklists & reminders')
|
@section('page-subtitle', 'Quick notes, checklists & reminders')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
<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 gap-2 mb-4">
|
||||||
<button @click="openNew()"
|
<button @click="openNew()" class="btn-sakura text-sm px-4 py-2 flex items-center gap-1.5 shrink-0">
|
||||||
class="btn-sakura text-sm px-4 py-2 flex items-center gap-1.5 shrink-0">
|
|
||||||
+ New Note
|
+ New Note
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@@ -37,11 +36,12 @@
|
|||||||
<template x-for="note in filteredPinned" :key="note.id">
|
<template x-for="note in filteredPinned" :key="note.id">
|
||||||
<div class="rounded-3xl p-4 flex flex-col gap-2 shadow-sm border border-black/5 cursor-pointer
|
<div class="rounded-3xl p-4 flex flex-col gap-2 shadow-sm border border-black/5 cursor-pointer
|
||||||
hover:shadow-md transition-shadow duration-200 group relative"
|
hover:shadow-md transition-shadow duration-200 group relative"
|
||||||
:style="`background:${note.color || '#FFFFFF'}`"
|
:style="`background:${note.color || '#FFFFFF'}`" @click="openEdit(note)">
|
||||||
@click="openEdit(note)">
|
|
||||||
|
|
||||||
{{-- Pin badge --}}
|
{{-- Pin badge --}}
|
||||||
<div class="absolute top-2.5 right-2.5 text-xs text-amber-400 opacity-60 group-hover:opacity-100">📌</div>
|
<div
|
||||||
|
class="absolute top-2.5 right-2.5 text-xs text-amber-400 opacity-60 group-hover:opacity-100">
|
||||||
|
📌</div>
|
||||||
|
|
||||||
{{-- Title --}}
|
{{-- Title --}}
|
||||||
<p class="font-bold text-gray-800 text-sm leading-snug pr-5 line-clamp-2"
|
<p class="font-bold text-gray-800 text-sm leading-snug pr-5 line-clamp-2"
|
||||||
@@ -86,8 +86,7 @@
|
|||||||
<template x-for="note in filteredUnpinned" :key="note.id">
|
<template x-for="note in filteredUnpinned" :key="note.id">
|
||||||
<div class="rounded-3xl p-4 flex flex-col gap-2 shadow-sm border border-black/5 cursor-pointer
|
<div class="rounded-3xl p-4 flex flex-col gap-2 shadow-sm border border-black/5 cursor-pointer
|
||||||
hover:shadow-md transition-shadow duration-200 group"
|
hover:shadow-md transition-shadow duration-200 group"
|
||||||
:style="`background:${note.color || '#FFFFFF'}`"
|
:style="`background:${note.color || '#FFFFFF'}`" @click="openEdit(note)">
|
||||||
@click="openEdit(note)">
|
|
||||||
|
|
||||||
{{-- Title --}}
|
{{-- Title --}}
|
||||||
<p class="font-bold text-gray-800 text-sm leading-snug line-clamp-2"
|
<p class="font-bold text-gray-800 text-sm leading-snug line-clamp-2"
|
||||||
@@ -142,21 +141,14 @@
|
|||||||
{{-- ════════════════════════════════════════════════════════════
|
{{-- ════════════════════════════════════════════════════════════
|
||||||
Note Editor Modal
|
Note Editor Modal
|
||||||
════════════════════════════════════════════════════════════ --}}
|
════════════════════════════════════════════════════════════ --}}
|
||||||
<div x-show="showModal"
|
<div x-show="showModal" x-transition:enter="transition ease-out duration-200" x-transition:enter-start="opacity-0"
|
||||||
x-transition:enter="transition ease-out duration-200"
|
x-transition:enter-end="opacity-100" x-transition:leave="transition ease-in duration-150"
|
||||||
x-transition:enter-start="opacity-0"
|
x-transition:leave-start="opacity-100" x-transition:leave-end="opacity-0"
|
||||||
x-transition:enter-end="opacity-100"
|
|
||||||
x-transition:leave="transition ease-in duration-150"
|
|
||||||
x-transition:leave-start="opacity-100"
|
|
||||||
x-transition:leave-end="opacity-0"
|
|
||||||
class="fixed inset-0 z-50 flex items-end sm:items-center justify-center bg-black/40 px-0 sm:px-4"
|
class="fixed inset-0 z-50 flex items-end sm:items-center justify-center bg-black/40 px-0 sm:px-4"
|
||||||
style="display:none"
|
style="display:none" @keydown.escape.window="showModal = false">
|
||||||
@keydown.escape.window="showModal = false">
|
|
||||||
|
|
||||||
<div class="w-full sm:max-w-lg rounded-t-3xl sm:rounded-3xl shadow-2xl flex flex-col overflow-hidden"
|
<div class="w-full sm:max-w-lg rounded-t-3xl sm:rounded-3xl shadow-2xl flex flex-col overflow-hidden"
|
||||||
:style="`background:${editorColor || '#FFFFFF'}`"
|
:style="`background:${editorColor || '#FFFFFF'}`" style="max-height:90vh" @click.stop>
|
||||||
style="max-height:90vh"
|
|
||||||
@click.stop>
|
|
||||||
|
|
||||||
{{-- ── Modal Header ─────────────────────────────── --}}
|
{{-- ── Modal Header ─────────────────────────────── --}}
|
||||||
<div class="flex items-center gap-2 px-4 pt-4 pb-3 border-b border-black/5 shrink-0">
|
<div class="flex items-center gap-2 px-4 pt-4 pb-3 border-b border-black/5 shrink-0">
|
||||||
@@ -188,8 +180,7 @@
|
|||||||
<div class="flex-1 overflow-y-auto px-4 py-3 space-y-1">
|
<div class="flex-1 overflow-y-auto px-4 py-3 space-y-1">
|
||||||
|
|
||||||
{{-- Title --}}
|
{{-- Title --}}
|
||||||
<input type="text" x-model="editorTitle" x-ref="titleInput"
|
<input type="text" x-model="editorTitle" x-ref="titleInput" placeholder="Note title…"
|
||||||
placeholder="Note title…"
|
|
||||||
class="w-full bg-transparent border-none outline-none font-bold text-gray-800 text-lg placeholder-gray-300 mb-2"
|
class="w-full bg-transparent border-none outline-none font-bold text-gray-800 text-lg placeholder-gray-300 mb-2"
|
||||||
@keydown.enter.prevent="focusFirstBlock()">
|
@keydown.enter.prevent="focusFirstBlock()">
|
||||||
|
|
||||||
@@ -203,21 +194,18 @@
|
|||||||
</template>
|
</template>
|
||||||
<template x-if="block.type === 'checkbox'">
|
<template x-if="block.type === 'checkbox'">
|
||||||
<input type="checkbox" x-model="block.checked"
|
<input type="checkbox" x-model="block.checked"
|
||||||
class="w-4 h-4 accent-pink-400 shrink-0 cursor-pointer mt-px"
|
class="w-4 h-4 accent-pink-400 shrink-0 cursor-pointer mt-px" @click.stop>
|
||||||
@click.stop>
|
|
||||||
</template>
|
</template>
|
||||||
<template x-if="block.type === 'paragraph'">
|
<template x-if="block.type === 'paragraph'">
|
||||||
<span class="w-4 shrink-0"></span>
|
<span class="w-4 shrink-0"></span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
{{-- Text input --}}
|
{{-- Text input --}}
|
||||||
<input type="text"
|
<input type="text" x-model="block.text"
|
||||||
x-model="block.text"
|
|
||||||
:placeholder="block.type === 'paragraph' ? 'Add text…' : block.type === 'bullet' ? 'List item…' : 'To-do item…'"
|
:placeholder="block.type === 'paragraph' ? 'Add text…' : block.type === 'bullet' ? 'List item…' : 'To-do item…'"
|
||||||
:class="block.type === 'checkbox' && block.checked ? 'line-through text-gray-400' : 'text-gray-700'"
|
:class="block.type === 'checkbox' && block.checked ? 'line-through text-gray-400' : 'text-gray-700'"
|
||||||
class="flex-1 bg-transparent border-none outline-none text-sm placeholder-gray-300 py-0.5"
|
class="flex-1 bg-transparent border-none outline-none text-sm placeholder-gray-300 py-0.5"
|
||||||
:data-block-id="block.id"
|
:data-block-id="block.id" @keydown.enter.prevent="insertBlockAfter(idx)"
|
||||||
@keydown.enter.prevent="insertBlockAfter(idx)"
|
|
||||||
@keydown.backspace="handleBackspace($event, block, idx)">
|
@keydown.backspace="handleBackspace($event, block, idx)">
|
||||||
|
|
||||||
{{-- Block type switcher (hover) --}}
|
{{-- Block type switcher (hover) --}}
|
||||||
@@ -232,7 +220,8 @@
|
|||||||
:class="block.type === 'checkbox' ? 'text-pink-500' : 'text-gray-300 hover:text-gray-500'"
|
:class="block.type === 'checkbox' ? 'text-pink-500' : 'text-gray-300 hover:text-gray-500'"
|
||||||
class="text-xs px-1 leading-none" title="Checkbox">☐</button>
|
class="text-xs px-1 leading-none" title="Checkbox">☐</button>
|
||||||
<button @click.stop="removeBlock(idx)" type="button"
|
<button @click.stop="removeBlock(idx)" type="button"
|
||||||
class="text-xs px-1 leading-none text-gray-300 hover:text-red-400 ml-1" title="Remove">✕</button>
|
class="text-xs px-1 leading-none text-gray-300 hover:text-red-400 ml-1"
|
||||||
|
title="Remove">✕</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -257,10 +246,10 @@
|
|||||||
{{-- ── Modal Footer ─────────────────────────────── --}}
|
{{-- ── Modal Footer ─────────────────────────────── --}}
|
||||||
<div class="flex gap-2 px-4 pb-5 pt-3 border-t border-black/5 shrink-0">
|
<div class="flex gap-2 px-4 pb-5 pt-3 border-t border-black/5 shrink-0">
|
||||||
<button @click="saveNote()" type="button"
|
<button @click="saveNote()" type="button"
|
||||||
class="btn-sakura flex-1 py-2.5 text-sm flex items-center justify-center gap-2"
|
class="btn-sakura flex-1 py-2.5 text-sm flex items-center justify-center gap-2" :disabled="saving">
|
||||||
:disabled="saving">
|
|
||||||
<span x-show="!saving">💾 Save Note</span>
|
<span x-show="!saving">💾 Save Note</span>
|
||||||
<span x-show="saving" class="flex items-center gap-1.5"><span class="animate-spin inline-block">🐾</span> Saving…</span>
|
<span x-show="saving" class="flex items-center gap-1.5"><span
|
||||||
|
class="animate-spin inline-block">🐾</span> Saving…</span>
|
||||||
</button>
|
</button>
|
||||||
<button @click="showModal = false" type="button"
|
<button @click="showModal = false" type="button"
|
||||||
class="flex-1 py-2.5 rounded-full border border-pink-200 text-gray-600 text-sm hover:bg-pink-50 transition-colors">
|
class="flex-1 py-2.5 rounded-full border border-pink-200 text-gray-600 text-sm hover:bg-pink-50 transition-colors">
|
||||||
@@ -270,11 +259,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>{{-- end x-data --}}
|
</div>{{-- end x-data --}}
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script>
|
<script>
|
||||||
function notesApp(initialNotes) {
|
function notesApp(initialNotes) {
|
||||||
return {
|
return {
|
||||||
notes: initialNotes,
|
notes: initialNotes,
|
||||||
showModal: false,
|
showModal: false,
|
||||||
@@ -476,8 +465,8 @@ function notesApp(initialNotes) {
|
|||||||
return d.toLocaleDateString('en-GB', { day: 'numeric', month: 'short' });
|
return d.toLocaleDateString('en-GB', { day: 'numeric', month: 'short' });
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
@@ -5,30 +5,30 @@
|
|||||||
@section('page-subtitle', 'Manage your service pricing')
|
@section('page-subtitle', 'Manage your service pricing')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="flex flex-wrap items-center justify-between gap-3 mb-5">
|
<div class="flex flex-wrap items-center justify-between gap-3 mb-5">
|
||||||
<div class="flex flex-wrap items-center gap-2">
|
<div class="flex flex-wrap items-center gap-2">
|
||||||
|
<a href="{{ route('rate-cards.create') }}" class="btn-sakura text-sm shrink-0">+ Add Service</a>
|
||||||
<a href="{{ route('rate-cards.public') }}" target="_blank"
|
<a href="{{ route('rate-cards.public') }}" target="_blank"
|
||||||
class="text-xs px-3 py-2 rounded-full border border-pink-200 text-pink-500 hover:bg-pink-50 flex items-center gap-1">
|
class="btn-sakura text-sm px-3 py-2 rounded-full border border-pink-200 text-pink-500 hover:bg-pink-50 flex items-center gap-1">
|
||||||
🔗 Public Page
|
🔗 Public Page
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ route('rate-cards.pdf') }}"
|
<a href="{{ route('rate-cards.pdf') }}"
|
||||||
class="text-xs px-3 py-2 rounded-full border border-blue-200 text-blue-500 hover:bg-blue-50 flex items-center gap-1">
|
class="btn-sakura text-sm px-3 py-2 rounded-full border border-blue-200 text-blue-500 hover:bg-blue-50 flex items-center gap-1">
|
||||||
📄 PDF
|
📄 PDF
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ route('rate-cards.profile') }}"
|
<a href="{{ route('rate-cards.profile') }}"
|
||||||
class="text-xs px-3 py-2 rounded-full border border-purple-200 text-purple-500 hover:bg-purple-50 flex items-center gap-1">
|
class="btn-sakura text-sm px-3 py-2 rounded-full border border-purple-200 text-purple-500 hover:bg-purple-50 flex items-center gap-1">
|
||||||
🎨 Profile
|
🎨 Profile
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<a href="{{ route('rate-cards.create') }}" class="btn-sakura text-sm shrink-0">+ Add Service</a>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
@php
|
@php
|
||||||
$grouped = $rateCards->groupBy('platform');
|
$grouped = $rateCards->groupBy('platform');
|
||||||
$platformOrder = ['general', 'instagram', 'tiktok', 'youtube'];
|
$platformOrder = ['general', 'instagram', 'tiktok', 'youtube'];
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@foreach($platformOrder as $platform)
|
@foreach($platformOrder as $platform)
|
||||||
@if($grouped->has($platform))
|
@if($grouped->has($platform))
|
||||||
<div class="mb-6">
|
<div class="mb-6">
|
||||||
<h2 class="text-sm font-bold text-gray-700 mb-3 flex items-center gap-2">
|
<h2 class="text-sm font-bold text-gray-700 mb-3 flex items-center gap-2">
|
||||||
@@ -43,10 +43,12 @@
|
|||||||
<div class="min-w-0">
|
<div class="min-w-0">
|
||||||
<h3 class="font-bold text-gray-800 text-sm leading-tight">{{ $card->service_name }}</h3>
|
<h3 class="font-bold text-gray-800 text-sm leading-tight">{{ $card->service_name }}</h3>
|
||||||
@if($card->content_type)
|
@if($card->content_type)
|
||||||
<span class="text-xs bg-pink-50 text-pink-600 px-2 py-0.5 rounded-full inline-block mt-1">{{ $card->content_type }}</span>
|
<span
|
||||||
|
class="text-xs bg-pink-50 text-pink-600 px-2 py-0.5 rounded-full inline-block mt-1">{{ $card->content_type }}</span>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<span class="text-xs px-2 py-1 rounded-full shrink-0
|
<span
|
||||||
|
class="text-xs px-2 py-1 rounded-full shrink-0
|
||||||
{{ $card->is_active ? 'bg-green-100 text-green-600' : 'bg-gray-100 text-gray-400' }}">
|
{{ $card->is_active ? 'bg-green-100 text-green-600' : 'bg-gray-100 text-gray-400' }}">
|
||||||
{{ $card->is_active ? 'Active' : 'Hidden' }}
|
{{ $card->is_active ? 'Active' : 'Hidden' }}
|
||||||
</span>
|
</span>
|
||||||
@@ -81,14 +83,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
@if($rateCards->isEmpty())
|
@if($rateCards->isEmpty())
|
||||||
<div class="text-center py-20 text-gray-400">
|
<div class="text-center py-20 text-gray-400">
|
||||||
<span class="text-5xl block mb-3">💰</span>
|
<span class="text-5xl block mb-3">💰</span>
|
||||||
<p class="text-sm">No rate cards yet.</p>
|
<p class="text-sm">No rate cards yet.</p>
|
||||||
<a href="{{ route('rate-cards.create') }}" class="btn-sakura mt-4 inline-block">Add your first service!</a>
|
<a href="{{ route('rate-cards.create') }}" class="btn-sakura mt-4 inline-block">Add your first service!</a>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
{{-- Share scripts disabled --}}
|
{{-- Share scripts disabled --}}
|
||||||
@endsection
|
@endsection
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
@section('page-subtitle', 'Customise your public rate card page')
|
@section('page-subtitle', 'Customise your public rate card page')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<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'))
|
||||||
<div x-data="{ show: true }" x-show="show" x-init="setTimeout(() => show = false, 4000)"
|
<div x-data="{ show: true }" x-show="show" x-init="setTimeout(() => show = false, 4000)"
|
||||||
@@ -26,52 +26,50 @@
|
|||||||
</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>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Display Name <span class="text-pink-400">*</span></label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Display Name <span
|
||||||
<input type="text" name="owner_name" required
|
class="text-pink-400">*</span></label>
|
||||||
value="{{ old('owner_name', $profile->owner_name) }}"
|
<input type="text" name="owner_name" required value="{{ old('owner_name', $profile->owner_name) }}"
|
||||||
class="input-soft" placeholder="e.g. Sakura KOL">
|
class="input-soft" placeholder="e.g. Sakura KOL">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Tagline</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Tagline</label>
|
||||||
<input type="text" name="tagline"
|
<input type="text" name="tagline" value="{{ old('tagline', $profile->tagline) }}" class="input-soft"
|
||||||
value="{{ old('tagline', $profile->tagline) }}"
|
placeholder="e.g. Lifestyle & Beauty Creator">
|
||||||
class="input-soft" placeholder="e.g. Lifestyle & Beauty Creator">
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Email</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Email</label>
|
||||||
<input type="email" name="email"
|
<input type="email" name="email" value="{{ old('email', $profile->email) }}" class="input-soft"
|
||||||
value="{{ old('email', $profile->email) }}"
|
placeholder="hi@example.com">
|
||||||
class="input-soft" placeholder="hi@example.com">
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">WhatsApp Number</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">WhatsApp Number</label>
|
||||||
<input type="text" name="whatsapp"
|
<input type="text" name="whatsapp" value="{{ old('whatsapp', $profile->whatsapp) }}"
|
||||||
value="{{ old('whatsapp', $profile->whatsapp) }}"
|
|
||||||
class="input-soft" placeholder="+6012-345-6789">
|
class="input-soft" placeholder="+6012-345-6789">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Instagram Handle</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Instagram Handle</label>
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<span class="absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 text-sm pointer-events-none"></span>
|
<span
|
||||||
<input type="text" name="ig_handle"
|
class="absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 text-sm pointer-events-none"></span>
|
||||||
value="{{ old('ig_handle', $profile->ig_handle) }}"
|
<input type="text" name="ig_handle" value="{{ old('ig_handle', $profile->ig_handle) }}"
|
||||||
class="input-soft pl-7" placeholder="@yourhandle">
|
class="input-soft pl-7" placeholder="@yourhandle">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">TikTok Handle</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">TikTok Handle</label>
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<span class="absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 text-sm pointer-events-none"></span>
|
<span
|
||||||
|
class="absolute left-3 top-1/2 -translate-y-1/2 text-gray-400 text-sm pointer-events-none"></span>
|
||||||
<input type="text" name="tiktok_handle"
|
<input type="text" name="tiktok_handle"
|
||||||
value="{{ old('tiktok_handle', $profile->tiktok_handle) }}"
|
value="{{ old('tiktok_handle', $profile->tiktok_handle) }}" class="input-soft pl-7"
|
||||||
class="input-soft pl-7" placeholder="@yourhandle">
|
placeholder="@yourhandle">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sm:col-span-2">
|
<div class="sm:col-span-2">
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">YouTube Handle / Channel</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">YouTube Handle / Channel</label>
|
||||||
<input type="text" name="youtube_handle"
|
<input type="text" name="youtube_handle"
|
||||||
value="{{ old('youtube_handle', $profile->youtube_handle) }}"
|
value="{{ old('youtube_handle', $profile->youtube_handle) }}" class="input-soft"
|
||||||
class="input-soft" placeholder="@yourchannel">
|
placeholder="@yourchannel">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -92,8 +90,7 @@
|
|||||||
<span class="text-xs text-gray-400">Current logo</span>
|
<span class="text-xs text-gray-400">Current logo</span>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
<input type="file" name="logo" accept="image/*"
|
<input type="file" name="logo" accept="image/*" class="w-full text-sm text-gray-600
|
||||||
class="w-full text-sm text-gray-600
|
|
||||||
file:mr-3 file:py-2 file:px-4 file:rounded-full file:border-0
|
file:mr-3 file:py-2 file:px-4 file:rounded-full file:border-0
|
||||||
file:text-xs file:font-semibold file:bg-pink-50 file:text-pink-600
|
file:text-xs file:font-semibold file:bg-pink-50 file:text-pink-600
|
||||||
hover:file:bg-pink-100 cursor-pointer">
|
hover:file:bg-pink-100 cursor-pointer">
|
||||||
@@ -113,7 +110,8 @@
|
|||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Accent Color</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Accent Color</label>
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<input type="color" name="accent_color" value="{{ old('accent_color', $profile->accent_color) }}"
|
<input type="color" name="accent_color"
|
||||||
|
value="{{ old('accent_color', $profile->accent_color) }}"
|
||||||
class="h-10 w-16 rounded-2xl border border-pink-200 cursor-pointer p-1 bg-white shrink-0"
|
class="h-10 w-16 rounded-2xl border border-pink-200 cursor-pointer p-1 bg-white shrink-0"
|
||||||
oninput="document.getElementById('accent_text').value=this.value">
|
oninput="document.getElementById('accent_text').value=this.value">
|
||||||
<input type="text" id="accent_text" value="{{ old('accent_color', $profile->accent_color) }}"
|
<input type="text" id="accent_text" value="{{ old('accent_color', $profile->accent_color) }}"
|
||||||
@@ -132,16 +130,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<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"
|
<input type="text" name="custom_footer" value="{{ old('custom_footer', $profile->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">
|
|
||||||
</div>
|
</div>
|
||||||
<div class="sm:col-span-2">
|
<div class="sm:col-span-2">
|
||||||
<label class="flex items-start gap-3 cursor-pointer">
|
<label class="flex items-start gap-3 cursor-pointer">
|
||||||
<input type="checkbox" name="show_prices" value="1"
|
<input type="checkbox" name="show_prices" value="1"
|
||||||
class="w-4 h-4 accent-pink-400 mt-0.5 shrink-0"
|
class="w-4 h-4 accent-pink-400 mt-0.5 shrink-0" {{ old('show_prices', $profile->show_prices) ? 'checked' : '' }}>
|
||||||
{{ old('show_prices', $profile->show_prices) ? 'checked' : '' }}>
|
|
||||||
<div>
|
<div>
|
||||||
<span class="text-sm font-medium text-gray-700">Show prices publicly</span>
|
<span class="text-sm font-medium text-gray-700">Show prices publicly</span>
|
||||||
<p class="text-xs text-gray-400">Uncheck to show "On Request" instead of actual prices</p>
|
<p class="text-xs text-gray-400">Uncheck to show "On Request" instead of actual prices</p>
|
||||||
@@ -155,18 +150,18 @@
|
|||||||
<div class="flex flex-wrap items-center gap-3">
|
<div class="flex flex-wrap items-center gap-3">
|
||||||
<button type="submit" class="btn-sakura px-6 py-2.5">💾 Save Profile</button>
|
<button type="submit" class="btn-sakura px-6 py-2.5">💾 Save Profile</button>
|
||||||
<a href="{{ route('rate-cards.public') }}" target="_blank"
|
<a href="{{ route('rate-cards.public') }}" target="_blank"
|
||||||
class="text-xs px-4 py-2.5 rounded-full border border-pink-200 text-pink-500 hover:bg-pink-50">
|
class="btn-sakura text-sm px-4 py-2.5 rounded-full border border-pink-200 text-pink-500 hover:bg-pink-50">
|
||||||
👁️ Preview Public Page
|
👁️ Preview
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ route('rate-cards.pdf') }}"
|
<a href="{{ route('rate-cards.pdf') }}"
|
||||||
class="text-xs px-4 py-2.5 rounded-full border border-blue-200 text-blue-500 hover:bg-blue-50">
|
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
|
📄 Download PDF
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ route('rate-cards.index') }}"
|
<a href="{{ route('rate-cards.index') }}"
|
||||||
class="text-xs px-4 py-2.5 rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
|
class="btn-sakura text-sm px-4 py-2.5 rounded-full border border-gray-200 text-gray-500 hover:bg-gray-50">
|
||||||
← Back to Rate Cards
|
← Back
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
@@ -5,18 +5,16 @@
|
|||||||
@section('page-subtitle', 'Schedule a new task, meeting, or posting')
|
@section('page-subtitle', 'Schedule a new task, meeting, or posting')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="max-w-2xl mx-auto">
|
<div class="max-w-2xl mx-auto">
|
||||||
<div class="flex items-center gap-3 mb-5">
|
<div class="flex items-center gap-3 mb-5">
|
||||||
<a href="{{ route('schedule.index') }}"
|
<a href="{{ route('schedule.index') }}" class="btn-sakura text-sm px-5 py-2">
|
||||||
class="text-xs px-3 py-2 rounded-full border border-pink-200 text-gray-500 hover:bg-pink-50">
|
|
||||||
← Back to Schedule
|
← Back to Schedule
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cat-card p-4 lg:p-8">
|
<div class="cat-card p-4 lg:p-8">
|
||||||
<form action="{{ route('schedule.store') }}" method="POST" id="create-event-form"
|
<form action="{{ route('schedule.store') }}" method="POST" id="create-event-form"
|
||||||
x-data="contractCheck('{{ route('contracts.check', [], false) }}')"
|
x-data="contractCheck('{{ route('contracts.check', [], false) }}')" class="space-y-5">
|
||||||
class="space-y-5">
|
|
||||||
@csrf
|
@csrf
|
||||||
<input type="hidden" name="start_time" id="start_time_hidden">
|
<input type="hidden" name="start_time" id="start_time_hidden">
|
||||||
<input type="hidden" name="end_time" id="end_time_hidden">
|
<input type="hidden" name="end_time" id="end_time_hidden">
|
||||||
@@ -26,8 +24,8 @@
|
|||||||
<label class="block text-sm font-semibold text-gray-700 mb-1">
|
<label class="block text-sm font-semibold text-gray-700 mb-1">
|
||||||
Title <span class="text-pink-400">*</span>
|
Title <span class="text-pink-400">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input type="text" name="title" value="{{ old('title') }}"
|
<input type="text" name="title" value="{{ old('title') }}" class="input-soft" placeholder="Event title"
|
||||||
class="input-soft" placeholder="Event title" required>
|
required>
|
||||||
@error('title') <p class="text-xs text-red-500 mt-1">{{ $message }}</p> @enderror
|
@error('title') <p class="text-xs text-red-500 mt-1">{{ $message }}</p> @enderror
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -140,8 +138,7 @@
|
|||||||
{{-- Client --}}
|
{{-- Client --}}
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-semibold text-gray-700 mb-1">Client</label>
|
<label class="block text-sm font-semibold text-gray-700 mb-1">Client</label>
|
||||||
<select name="client_id" id="client-select" class="input-soft"
|
<select name="client_id" id="client-select" class="input-soft" x-model="clientId"
|
||||||
x-model="clientId"
|
|
||||||
@change="onClientChange($event); if($event.target.value !== '__new__') checkContract()">
|
@change="onClientChange($event); if($event.target.value !== '__new__') checkContract()">
|
||||||
<option value="">— None —</option>
|
<option value="">— None —</option>
|
||||||
<option value="__new__" class="font-semibold text-pink-600">+ Create New Client…</option>
|
<option value="__new__" class="font-semibold text-pink-600">+ Create New Client…</option>
|
||||||
@@ -159,16 +156,20 @@
|
|||||||
<p class="text-xs font-bold text-purple-700">🐱 New Client Basic Info</p>
|
<p class="text-xs font-bold text-purple-700">🐱 New Client Basic Info</p>
|
||||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3">
|
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3">
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Name <span class="text-pink-400">*</span></label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Name <span
|
||||||
<input type="text" x-model="newName" class="input-soft text-sm" placeholder="Client / brand name">
|
class="text-pink-400">*</span></label>
|
||||||
|
<input type="text" x-model="newName" class="input-soft text-sm"
|
||||||
|
placeholder="Client / brand name">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Company</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Company</label>
|
||||||
<input type="text" x-model="newCompany" class="input-soft text-sm" placeholder="Company name">
|
<input type="text" x-model="newCompany" class="input-soft text-sm"
|
||||||
|
placeholder="Company name">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Email</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Email</label>
|
||||||
<input type="email" x-model="newEmail" class="input-soft text-sm" placeholder="contact@brand.com">
|
<input type="email" x-model="newEmail" class="input-soft text-sm"
|
||||||
|
placeholder="contact@brand.com">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Phone</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Phone</label>
|
||||||
@@ -178,8 +179,10 @@
|
|||||||
<p x-show="errMsg" x-text="errMsg" class="text-xs text-red-500"></p>
|
<p x-show="errMsg" x-text="errMsg" class="text-xs text-red-500"></p>
|
||||||
<div class="flex gap-2 pt-1">
|
<div class="flex gap-2 pt-1">
|
||||||
<button type="button" @click="saveNewClient()" :disabled="saving"
|
<button type="button" @click="saveNewClient()" :disabled="saving"
|
||||||
class="btn-sakura text-sm px-4 py-2" x-text="saving ? 'Saving…' : '✓ Add & Select'"></button>
|
class="btn-sakura text-sm px-4 py-2"
|
||||||
<button type="button" @click="isNew = false; document.getElementById('client-select').value = ''"
|
x-text="saving ? 'Saving…' : '✓ Add & Select'"></button>
|
||||||
|
<button type="button"
|
||||||
|
@click="isNew = false; document.getElementById('client-select').value = ''"
|
||||||
class="text-sm px-4 py-2 rounded-full border border-pink-200 text-gray-500 hover:bg-pink-50">
|
class="text-sm px-4 py-2 rounded-full border border-pink-200 text-gray-500 hover:bg-pink-50">
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
@@ -190,7 +193,8 @@
|
|||||||
{{-- Category --}}
|
{{-- Category --}}
|
||||||
<div class="sm:col-span-2">
|
<div class="sm:col-span-2">
|
||||||
<label class="block text-sm font-semibold text-gray-700 mb-1">Category</label>
|
<label class="block text-sm font-semibold text-gray-700 mb-1">Category</label>
|
||||||
<select name="category_id" id="category-select" class="input-soft" x-model="categoryId" @change="onCategoryChange($event)">
|
<select name="category_id" id="category-select" class="input-soft" x-model="categoryId"
|
||||||
|
@change="onCategoryChange($event)">
|
||||||
<option value="">— None —</option>
|
<option value="">— None —</option>
|
||||||
<option value="__new__" class="font-semibold text-pink-600">+ Create New Category…</option>
|
<option value="__new__" class="font-semibold text-pink-600">+ Create New Category…</option>
|
||||||
@foreach($categoryTree as $parent)
|
@foreach($categoryTree as $parent)
|
||||||
@@ -211,14 +215,18 @@
|
|||||||
class="sm:col-span-2 bg-pink-50 rounded-2xl p-4 space-y-3 border border-pink-100">
|
class="sm:col-span-2 bg-pink-50 rounded-2xl p-4 space-y-3 border border-pink-100">
|
||||||
<p class="text-xs font-bold text-pink-700">🏷️ New Category</p>
|
<p class="text-xs font-bold text-pink-700">🏷️ New Category</p>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Category Name <span class="text-pink-400">*</span></label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Category Name <span
|
||||||
<input type="text" x-model="newCatName" class="input-soft text-sm" placeholder="e.g. Sponsored Post">
|
class="text-pink-400">*</span></label>
|
||||||
|
<input type="text" x-model="newCatName" class="input-soft text-sm"
|
||||||
|
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">
|
||||||
<button type="button" @click="saveNewCategory()" :disabled="savingCat"
|
<button type="button" @click="saveNewCategory()" :disabled="savingCat"
|
||||||
class="btn-sakura text-sm px-4 py-2" x-text="savingCat ? 'Saving…' : '✓ Add & Select'"></button>
|
class="btn-sakura text-sm px-4 py-2"
|
||||||
<button type="button" @click="isNewCat = false; document.getElementById('category-select').value = ''"
|
x-text="savingCat ? 'Saving…' : '✓ Add & Select'"></button>
|
||||||
|
<button type="button"
|
||||||
|
@click="isNewCat = false; document.getElementById('category-select').value = ''"
|
||||||
class="text-sm px-4 py-2 rounded-full border border-pink-200 text-gray-500 hover:bg-pink-50">
|
class="text-sm px-4 py-2 rounded-full border border-pink-200 text-gray-500 hover:bg-pink-50">
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
@@ -238,8 +246,8 @@
|
|||||||
<label class="block text-sm font-semibold text-gray-700 mb-1">
|
<label class="block text-sm font-semibold text-gray-700 mb-1">
|
||||||
Start Date <span class="text-pink-400">*</span>
|
Start Date <span class="text-pink-400">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input type="date" id="start_date" class="input-soft"
|
<input type="date" id="start_date" class="input-soft" value="{{ old('_start_date') }}" required
|
||||||
value="{{ old('_start_date') }}" required @change="checkContract()">
|
@change="checkContract()">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-semibold text-gray-700 mb-1">Start Time</label>
|
<label class="block text-sm font-semibold text-gray-700 mb-1">Start Time</label>
|
||||||
@@ -259,8 +267,8 @@
|
|||||||
{{-- Location --}}
|
{{-- Location --}}
|
||||||
<div class="sm:col-span-2">
|
<div class="sm:col-span-2">
|
||||||
<label class="block text-sm font-semibold text-gray-700 mb-1">Location</label>
|
<label class="block text-sm font-semibold text-gray-700 mb-1">Location</label>
|
||||||
<input type="text" name="location" value="{{ old('location') }}"
|
<input type="text" name="location" value="{{ old('location') }}" class="input-soft"
|
||||||
class="input-soft" placeholder="Online / venue address">
|
placeholder="Online / venue address">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -284,8 +292,7 @@
|
|||||||
|
|
||||||
{{-- Priority --}}
|
{{-- Priority --}}
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<input type="checkbox" name="is_priority" value="1" id="priority"
|
<input type="checkbox" name="is_priority" value="1" id="priority" class="w-4 h-4 accent-pink-400" {{ old('is_priority') ? 'checked' : '' }}>
|
||||||
class="w-4 h-4 accent-pink-400" {{ old('is_priority') ? 'checked' : '' }}>
|
|
||||||
<label for="priority" class="text-sm text-gray-600 cursor-pointer">⭐ Mark as Priority</label>
|
<label for="priority" class="text-sm text-gray-600 cursor-pointer">⭐ Mark as Priority</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -310,19 +317,26 @@
|
|||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Platform</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Platform</label>
|
||||||
<select name="content_platform" class="input-soft text-sm">
|
<select name="content_platform" class="input-soft text-sm">
|
||||||
<option value="instagram" {{ old('content_platform') === 'instagram' ? 'selected' : '' }}>📸 Instagram</option>
|
<option value="instagram" {{ old('content_platform') === 'instagram' ? 'selected' : '' }}>📸
|
||||||
<option value="tiktok" {{ old('content_platform') === 'tiktok' ? 'selected' : '' }}>🎵 TikTok</option>
|
Instagram</option>
|
||||||
<option value="youtube" {{ old('content_platform') === 'youtube' ? 'selected' : '' }}>▶️ YouTube</option>
|
<option value="tiktok" {{ old('content_platform') === 'tiktok' ? 'selected' : '' }}>🎵 TikTok
|
||||||
<option value="other" {{ old('content_platform') === 'other' ? 'selected' : '' }}>📱 Other</option>
|
</option>
|
||||||
|
<option value="youtube" {{ old('content_platform') === 'youtube' ? 'selected' : '' }}>▶️
|
||||||
|
YouTube</option>
|
||||||
|
<option value="other" {{ old('content_platform') === 'other' ? 'selected' : '' }}>📱 Other
|
||||||
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Content Type</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Content Type</label>
|
||||||
<select name="content_type" class="input-soft text-sm">
|
<select name="content_type" class="input-soft text-sm">
|
||||||
<option value="post" {{ old('content_type') === 'post' ? 'selected' : '' }}>Post / Feed</option>
|
<option value="post" {{ old('content_type') === 'post' ? 'selected' : '' }}>Post / Feed
|
||||||
<option value="reel" {{ old('content_type') === 'reel' ? 'selected' : '' }}>Reel / Short</option>
|
</option>
|
||||||
|
<option value="reel" {{ old('content_type') === 'reel' ? 'selected' : '' }}>Reel / Short
|
||||||
|
</option>
|
||||||
<option value="story" {{ old('content_type') === 'story' ? 'selected' : '' }}>Story</option>
|
<option value="story" {{ old('content_type') === 'story' ? 'selected' : '' }}>Story</option>
|
||||||
<option value="video" {{ old('content_type') === 'video' ? 'selected' : '' }}>Long Video</option>
|
<option value="video" {{ old('content_type') === 'video' ? 'selected' : '' }}>Long Video
|
||||||
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<p class="sm:col-span-2 text-xs text-purple-500">
|
<p class="sm:col-span-2 text-xs text-purple-500">
|
||||||
@@ -345,8 +359,7 @@
|
|||||||
<div class="sm:col-span-2">
|
<div class="sm:col-span-2">
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Contract Title</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Contract Title</label>
|
||||||
<input type="text" name="contract_title" class="input-soft text-sm"
|
<input type="text" name="contract_title" class="input-soft text-sm"
|
||||||
placeholder="e.g. Exclusive Posting Contract — BrandX"
|
placeholder="e.g. Exclusive Posting Contract — BrandX" value="{{ old('contract_title') }}">
|
||||||
value="{{ old('contract_title') }}">
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-xs font-semibold text-gray-600 mb-1">Contract Start</label>
|
<label class="block text-xs font-semibold text-gray-600 mb-1">Contract Start</label>
|
||||||
@@ -363,8 +376,7 @@
|
|||||||
|
|
||||||
<div class="flex flex-col sm:flex-row gap-3 pt-1">
|
<div class="flex flex-col sm:flex-row gap-3 pt-1">
|
||||||
<button type="submit" class="btn-sakura flex-1 py-3"
|
<button type="submit" class="btn-sakura flex-1 py-3"
|
||||||
:class="{ 'opacity-50 cursor-not-allowed': contractWarning }"
|
:class="{ 'opacity-50 cursor-not-allowed': contractWarning }" :disabled="contractWarning">
|
||||||
:disabled="contractWarning">
|
|
||||||
🐾 Schedule It!
|
🐾 Schedule It!
|
||||||
</button>
|
</button>
|
||||||
<a href="{{ route('schedule.index') }}"
|
<a href="{{ route('schedule.index') }}"
|
||||||
@@ -374,11 +386,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script>
|
<script>
|
||||||
function contractCheck(checkUrl) {
|
function contractCheck(checkUrl) {
|
||||||
return {
|
return {
|
||||||
categoryId: '',
|
categoryId: '',
|
||||||
clientId: '',
|
clientId: '',
|
||||||
@@ -417,9 +429,9 @@ function contractCheck(checkUrl) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById('create-event-form').addEventListener('submit', function (e) {
|
document.getElementById('create-event-form').addEventListener('submit', function (e) {
|
||||||
const startDate = document.getElementById('start_date').value;
|
const startDate = document.getElementById('start_date').value;
|
||||||
const startTime = document.getElementById('start_time_input').value || '00:00';
|
const startTime = document.getElementById('start_time_input').value || '00:00';
|
||||||
const endDate = document.getElementById('end_date').value;
|
const endDate = document.getElementById('end_date').value;
|
||||||
@@ -435,7 +447,7 @@ document.getElementById('create-event-form').addEventListener('submit', function
|
|||||||
if (endDate) {
|
if (endDate) {
|
||||||
document.getElementById('end_time_hidden').value = endDate + 'T' + endTime;
|
document.getElementById('end_time_hidden').value = endDate + 'T' + endTime;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
@endsection
|
@endsection
|
||||||
@@ -104,6 +104,43 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
dayCellDidMount(info) {
|
||||||
|
const holidays = @json($holidays ?? []);
|
||||||
|
const holidayMap = {};
|
||||||
|
holidays.forEach(h => holidayMap[h.date] = h.name);
|
||||||
|
|
||||||
|
const year = info.date.getFullYear();
|
||||||
|
const month = String(info.date.getMonth() + 1).padStart(2, '0');
|
||||||
|
const day = String(info.date.getDate()).padStart(2, '0');
|
||||||
|
const dateStr = `${year}-${month}-${day}`;
|
||||||
|
|
||||||
|
if (holidayMap[dateStr]) {
|
||||||
|
const frame = info.el.querySelector('.fc-daygrid-day-frame');
|
||||||
|
if (frame) {
|
||||||
|
// Update background color for the highlighted box
|
||||||
|
frame.style.backgroundColor = '#fff0f0'; // Light red highlighted box
|
||||||
|
frame.style.position = 'relative'; // Required for absolute positioning of text
|
||||||
|
|
||||||
|
// Add the holiday text to the top-left corner
|
||||||
|
const holidayEl = document.createElement('div');
|
||||||
|
holidayEl.textContent = holidayMap[dateStr];
|
||||||
|
holidayEl.style.position = 'absolute';
|
||||||
|
holidayEl.style.top = '4px';
|
||||||
|
holidayEl.style.left = '4px';
|
||||||
|
holidayEl.style.color = '#ef4444'; // Red text
|
||||||
|
holidayEl.style.fontSize = '0.70rem'; // Small text
|
||||||
|
holidayEl.style.fontWeight = '600';
|
||||||
|
holidayEl.style.whiteSpace = 'nowrap';
|
||||||
|
holidayEl.style.overflow = 'hidden';
|
||||||
|
holidayEl.style.textOverflow = 'ellipsis';
|
||||||
|
holidayEl.style.maxWidth = '75%'; // Prevent it from overlapping with the date number (usually on right)
|
||||||
|
holidayEl.style.zIndex = '1';
|
||||||
|
|
||||||
|
frame.appendChild(holidayEl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
eventDrop(info) {
|
eventDrop(info) {
|
||||||
fetch(`/schedule/${info.event.id}/dates`, {
|
fetch(`/schedule/${info.event.id}/dates`, {
|
||||||
method: 'PATCH',
|
method: 'PATCH',
|
||||||
@@ -136,8 +173,8 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
${p.location ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Location</span><span>${p.location}</span></div>` : ''}
|
${p.location ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Location</span><span>${p.location}</span></div>` : ''}
|
||||||
<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Start</span><span>${e.start?.toLocaleString()}</span></div>
|
<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Start</span><span>${e.start?.toLocaleString()}</span></div>
|
||||||
${e.end ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">End</span><span>${e.end.toLocaleString()}</span></div>` : ''}
|
${e.end ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">End</span><span>${e.end.toLocaleString()}</span></div>` : ''}
|
||||||
${p.description ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Description</span><span class="break-words">${p.description}</span></div>` : ''}
|
${p.description ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Description</span><div class="flex-1 break-words whitespace-pre-wrap overflow-y-auto max-h-20 pr-1">${p.description}</div></div>` : ''}
|
||||||
${p.notes ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Notes</span><span class="break-words">${p.notes}</span></div>` : ''}
|
${p.notes ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Notes</span><div class="flex-1 break-words whitespace-pre-wrap overflow-y-auto max-h-20 pr-1">${p.notes}</div></div>` : ''}
|
||||||
${p.has_contract ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Contract</span><span class="text-pink-500 font-semibold">Yes</span></div>` : ''}
|
${p.has_contract ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Contract</span><span class="text-pink-500 font-semibold">Yes</span></div>` : ''}
|
||||||
${p.has_content ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Content Bd</span><span class="text-pink-500 font-semibold">Yes</span></div>` : ''}
|
${p.has_content ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Content Bd</span><span class="text-pink-500 font-semibold">Yes</span></div>` : ''}
|
||||||
`;
|
`;
|
||||||
@@ -176,8 +213,8 @@ function openAlertEventModal(e) {
|
|||||||
${e.location ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Location</span><span>${e.location}</span></div>` : ''}
|
${e.location ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Location</span><span>${e.location}</span></div>` : ''}
|
||||||
<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Start</span><span>${startStr}</span></div>
|
<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Start</span><span>${startStr}</span></div>
|
||||||
${endStr ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">End</span><span>${endStr}</span></div>` : ''}
|
${endStr ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">End</span><span>${endStr}</span></div>` : ''}
|
||||||
${e.description ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Description</span><span class="break-words">${e.description}</span></div>` : ''}
|
${e.description ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Description</span><div class="flex-1 break-words whitespace-pre-wrap overflow-y-auto max-h-20 pr-1">${e.description}</div></div>` : ''}
|
||||||
${e.notes ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Notes</span><span class="break-words">${e.notes}</span></div>` : ''}
|
${e.notes ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Notes</span><div class="flex-1 break-words whitespace-pre-wrap overflow-y-auto max-h-20 pr-1">${e.notes}</div></div>` : ''}
|
||||||
${e.has_contract ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Contract</span><span class="text-pink-500 font-semibold">Yes</span></div>` : ''}
|
${e.has_contract ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Contract</span><span class="text-pink-500 font-semibold">Yes</span></div>` : ''}
|
||||||
${e.has_content ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Content Bd</span><span class="text-pink-500 font-semibold">Yes</span></div>` : ''}
|
${e.has_content ? `<div class="flex gap-2"><span class="text-gray-400 w-24 shrink-0">Content Bd</span><span class="text-pink-500 font-semibold">Yes</span></div>` : ''}
|
||||||
`;
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user