import preset from '../../../../vendor/filament/filament/tailwind.config.preset'import forms from '@tailwindcss/forms'import typography from '@tailwindcss/typography' export default { presets: [preset], content: [ './app/Filament/**/*.php', './resources/views/**/*.blade.php', './vendor/filament/**/*.blade.php', ], plugins: [ forms, typography, ],}
@import '../../../../vendor/filament/filament/resources/css/theme.css';@config './tailwind.config.js';.fi-sidebar { @apply border-r border-blue-100;}
<x-filament-panels::page> <div> <div class="w-full text-right"> <x-filament::button @click="$dispatch('open-modal', { id: 'add-item' })"> New item </x-filament::button> </div> <x-filament::modal width="5xl" id="add-item"> <x-slot name="heading"> Add an item </x-slot> <livewire:create-item-form :$project /> </x-filament::modal> <ul class="divide-y divide-gray-100"> @foreach ($items as $item) <x-item-planning :item="$item" :order="$loop->iteration"> <ul wire:sortable wire:end.stop="reorderItems($event.target.sortable.toArray())" class="w-full pl-12"> @foreach ($item->children()->orderBy('order')->get() as $child) <x-item-planning :key="$child->id" :item="$child" :order="$loop->iteration" :parent-order="$loop->parent->iteration" /> @endforeach </ul> </x-item-planning> @endforeach </ul> </div></x-filament-panels::page>
<ul wire:sortable wire:end.stop="updateTaskOrder($event.target.sortable.toArray())">
class Planning extends Page{ protected static ?string $navigationIcon = 'heroicon-o-document-text'; protected static string $view = 'filament.pages.projects.planning'; protected static ?string $title = 'Custom Page Title'; public ?Project $project; public $items = []; protected static function shouldRegisterNavigation(): bool { return false; } public function mount(Project $project) { $this->project = $project; $project->load('items'); self::$title = 'Edit planning for project ' . $project->name; $this->items = $project->items()->orderBy('order')->get(); }}