- Created a new Blade view for managing brand contracts with forms for adding and editing contracts, including client and category selection. - Implemented success message notifications for contract actions. - Added a new Blade view for invoice settings, allowing customization of invoice number format, header branding, and default values for new invoices. - Introduced a new PDF view for generating rate cards with customizable styles based on user profile settings. - Developed a profile management page for rate cards, enabling users to update their identity, appearance, and visibility settings.
120 lines
6.8 KiB
PHP
120 lines
6.8 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('title', 'Edit Brief')
|
|
@section('page-title', 'Edit Content Brief 🎬')
|
|
|
|
@section('content')
|
|
<div class="max-w-2xl mx-auto">
|
|
<div class="cat-card p-4 lg:p-8">
|
|
<form action="{{ route('content.update', $brief) }}" method="POST" class="space-y-4">
|
|
@csrf @method('PUT')
|
|
|
|
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3">
|
|
<div class="sm:col-span-2">
|
|
<label class="block text-sm font-semibold text-gray-700 mb-1">Title</label>
|
|
<input type="text" name="title" value="{{ old('title', $brief->title) }}" class="input-soft" required>
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-semibold text-gray-700 mb-1">Platform</label>
|
|
<select name="platform" class="input-soft">
|
|
@foreach(['instagram','tiktok','youtube'] as $p)
|
|
<option value="{{ $p }}" {{ old('platform', $brief->platform) === $p ? 'selected' : '' }}>{{ ucfirst($p) }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-semibold text-gray-700 mb-1">Content Type</label>
|
|
<input type="text" name="content_type" value="{{ old('content_type', $brief->content_type) }}" class="input-soft">
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-semibold text-gray-700 mb-1">Status</label>
|
|
<select name="status" class="input-soft">
|
|
@foreach($statuses as $s)
|
|
<option value="{{ $s->value }}" {{ old('status', $brief->status->value) === $s->value ? 'selected' : '' }}>{{ $s->icon() }} {{ $s->label() }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-semibold text-gray-700 mb-1">Client</label>
|
|
<select name="client_id" class="input-soft">
|
|
<option value="">— None —</option>
|
|
@foreach($clients as $client)
|
|
<option value="{{ $client->id }}" {{ old('client_id', $brief->client_id) == $client->id ? 'selected' : '' }}>{{ $client->name }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-semibold text-gray-700 mb-1">Category</label>
|
|
<select name="category_id" class="input-soft">
|
|
<option value="">— None —</option>
|
|
@foreach($categoryTree as $parent)
|
|
<option value="{{ $parent->id }}" {{ old('category_id', $brief->category_id) == $parent->id ? 'selected' : '' }}>
|
|
{{ $parent->icon }} {{ $parent->name }}
|
|
</option>
|
|
@foreach($parent->children as $child)
|
|
<option value="{{ $child->id }}" {{ old('category_id', $brief->category_id) == $child->id ? 'selected' : '' }}>
|
|
↳ {{ $child->name }}
|
|
</option>
|
|
@endforeach
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-semibold text-gray-700 mb-1">Target Date</label>
|
|
<input type="date" name="target_date" value="{{ old('target_date', $brief->target_date?->toDateString()) }}" class="input-soft">
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-semibold text-gray-700 mb-1">Posted Date</label>
|
|
<input type="date" name="posted_date" value="{{ old('posted_date', $brief->posted_date?->toDateString()) }}" class="input-soft">
|
|
</div>
|
|
<div class="sm:col-span-2">
|
|
<label class="block text-sm font-semibold text-gray-700 mb-1">Posted URL</label>
|
|
<input type="url" name="posted_url" value="{{ old('posted_url', $brief->posted_url) }}" class="input-soft" placeholder="https://...">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bg-pink-50 rounded-2xl p-4 space-y-3">
|
|
<h3 class="font-bold text-gray-700 text-sm">✍️ Storyline</h3>
|
|
<div>
|
|
<label class="text-xs font-semibold text-pink-600 mb-1 block">🎣 Hook</label>
|
|
<textarea name="hook" rows="2" class="input-soft text-sm resize-none bg-white">{{ old('hook', $brief->hook) }}</textarea>
|
|
</div>
|
|
<div>
|
|
<label class="text-xs font-semibold text-pink-600 mb-1 block">📖 Body</label>
|
|
<textarea name="body" rows="3" class="input-soft text-sm resize-none bg-white">{{ old('body', $brief->body) }}</textarea>
|
|
</div>
|
|
<div>
|
|
<label class="text-xs font-semibold text-pink-600 mb-1 block">📣 CTA</label>
|
|
<textarea name="cta" rows="2" class="input-soft text-sm resize-none bg-white">{{ old('cta', $brief->cta) }}</textarea>
|
|
</div>
|
|
<div>
|
|
<label class="text-xs font-semibold text-gray-500 mb-1 block">📝 Script</label>
|
|
<textarea name="script" rows="4" class="input-soft text-sm resize-none bg-white">{{ old('script', $brief->script) }}</textarea>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<label class="block text-sm font-semibold text-gray-700 mb-1">Caption</label>
|
|
<textarea name="caption" rows="3" class="input-soft resize-none">{{ old('caption', $brief->caption) }}</textarea>
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-semibold text-gray-700 mb-1">Hashtags</label>
|
|
<input type="text" name="hashtags" value="{{ old('hashtags', $brief->hashtags) }}" class="input-soft">
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-semibold text-gray-700 mb-1">Notes</label>
|
|
<textarea name="notes" rows="2" class="input-soft resize-none">{{ old('notes', $brief->notes) }}</textarea>
|
|
</div>
|
|
|
|
<div class="flex flex-col sm:flex-row gap-3 pt-1">
|
|
<button type="submit" class="btn-sakura flex-1 py-3">💾 Save Changes</button>
|
|
<a href="{{ route('content.show', $brief) }}"
|
|
class="flex-1 py-3 text-center rounded-full border border-pink-200 text-gray-600 hover:bg-pink-50 font-semibold text-sm">
|
|
Cancel
|
|
</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
@endsection
|