Files
Mark Gregory 412e8134a1 Builder administration area
* Page builder foundation
* Form builder document type
* Dashboard builder document type
* Report builder document type
* Menu builder document type
* Email builder document type
* Query builder document type
* Workflow builder document type
* Reusable component registry
* Form-field registry
* Dashboard-widget registry
* Hero, heading, and rich-content components
* JSON document schema
* Saved builder documents
* Draft, published, and archived states
* Document version history
* Reusable builder templates
* Component rendering service
* Extensible BuilderComponent contract
* Authenticated Builder REST endpoints
* Administration navigation
* Builder permissions
* Module registration and test
2026-07-24 13:29:58 +01:00

11 lines
2.4 KiB
PHP

<x-layouts.app :title="__('Builder Editor')">
<div class="flex h-full w-full flex-1 flex-col gap-5 rounded-xl">
<div><flux:heading size="xl">{{ $document->exists ? 'Edit' : 'Create' }} Builder Document</flux:heading><flux:subheading>Use the component palette and JSON document canvas. Visual drag-and-drop clients can use the component API.</flux:subheading></div>
<form method="POST" action="{{ $document->exists ? route('administration.builder.update',$document) : route('administration.builder.store') }}" class="space-y-5">@csrf @if($document->exists) @method('PUT') @endif
<div class="grid gap-4 md:grid-cols-3"><flux:input name="name" label="Name" value="{{ old('name',$document->name) }}" required/><flux:select name="type" label="Builder type">@foreach(config('builder.allowed_types') as $type)<option value="{{ $type }}" @selected(old('type',$document->type)===$type)>{{ str($type)->headline() }}</option>@endforeach</flux:select><flux:select name="status" label="Status"><option value="draft" @selected(old('status',$document->status)==='draft')>Draft</option><option value="published" @selected(old('status',$document->status)==='published')>Published</option><option value="archived" @selected(old('status',$document->status)==='archived')>Archived</option></flux:select></div>
<flux:input name="slug" label="Slug" value="{{ old('slug',$document->slug) }}"/>
<div class="grid gap-5 xl:grid-cols-[260px_1fr]"><aside class="rounded-xl border p-4"><div class="mb-3 font-semibold">Components</div>@foreach($components as $component)<div class="mb-2 rounded-lg border p-3"><div class="font-medium">{{ $component['label'] }}</div><div class="text-xs text-zinc-500">{{ $component['category'] }} · {{ $component['type'] }}</div></div>@endforeach</aside><div class="space-y-4"><flux:textarea name="document_json" label="Document JSON" rows="22" required>{{ old('document_json',json_encode($document->document ?: ['nodes'=>[]],JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES)) }}</flux:textarea><flux:textarea name="settings_json" label="Settings JSON" rows="6">{{ old('settings_json',json_encode($document->settings ?: new stdClass(),JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES)) }}</flux:textarea></div></div>
<div class="flex gap-3"><flux:button type="submit" variant="primary">Save</flux:button><flux:button :href="route('administration.builder.index')" wire:navigate>Cancel</flux:button></div>
</form>
</div></x-layouts.app>