@@ -34,87 +34,12 @@ class="absolute inset-0 bg-white/40 dark:bg-gray-900/40 z-10 backdrop-blur-sm fl
3434 <div class =" flex-1 overflow-hidden" >
3535 <div class =" flex flex-row h-full overflow-x-auto overflow-y-hidden py-4 px-2 gap-5 kanban-board pb-4" >
3636 @foreach ($columns as $columnId => $column )
37- <div class =" kanban-column w-[300px] min-w-[300px] flex-shrink-0 bg-kanban-column-bg dark:bg-kanban-column-bg border border-kanban-column-border dark:border-gray-700 shadow-kanban-column dark:shadow-md rounded-xl flex flex-col max-h-full overflow-hidden" >
38- <!-- Column Header -->
39- <div class =" kanban-column-header flex items-center justify-between py-3 px-4 border-b border-gray-200 dark:border-gray-700" >
40- <div class =" flex items-center" >
41- <h3 class =" text-sm font-medium text-kanban-column-header dark:text-kanban-column-header" >
42- {{ $column [' name' ] } }
43- </h3 >
44- <div class =" ml-2 px-2.5 py-0.5 rounded-full text-xs font-medium kanban-status-{{ str_replace (' _' , ' -' , $columnId ) } }" >
45- {{ $column [' total' ] ?? count ($column [' items' ]) } }
46- </div >
47- </div >
48- <button
49- type =" button"
50- wire:click =" openCreateForm('{{ $columnId } } ')"
51- x-on:click =" $dispatch('open-modal', { id: 'create-card-modal' })"
52- class =" text-gray-400 hover:text-primary-500 dark:text-gray-500 dark:hover:text-primary-400"
53- >
54- <svg class =" w-5 h-5" fill =" none" stroke =" currentColor" viewBox =" 0 0 24 24" xmlns =" http://www.w3.org/2000/svg" >
55- <path stroke-linecap =" round" stroke-linejoin =" round" stroke-width =" 2" d =" M12 6v6m0 0v6m0-6h6m-6 0H6" ></path >
56- </svg >
57- </button >
58- </div >
59-
60- <!-- Column Content -->
61- <div
62- x-sortable
63- x-sortable-group =" cards"
64- data-column-id =" {{ $columnId } }"
65- @end .stop =" $wire.updateColumnCards($event.to.getAttribute('data-column-id'), $event.to.sortable.toArray())"
66- class =" p-3 flex-1 overflow-y-auto overflow-x-hidden"
67- style =" max-height : calc (100vh - 13rem );"
68- >
69- @if (count ($column [' items' ]) > 0 )
70- @foreach ($column [' items' ] as $card )
71- <div
72- class =" kanban-card mb-3 bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden cursor-pointer transition-all duration-150 hover:shadow-md"
73- x-sortable-item =" {{ $card [' id' ] } }"
74- wire:click =" openEditForm('{{ $card [' id' ] } } ', '{{ $columnId } } ')"
75- x-on:click =" $dispatch('open-modal', { id: 'edit-card-modal' })"
76- >
77- <div class =" p-3" >
78- <h4 class =" text-sm font-medium text-gray-900 dark:text-white" >{{ $card [' title' ] } } </h4 >
79-
80- @if (isset ($card [' description' ]) && ! empty ($card [' description' ]) )
81- <p class =" mt-1 text-xs text-gray-500 dark:text-gray-400 line-clamp-2" >{{ $card [' description' ] } } </p >
82- @endif
83-
84- @if (! empty ($config [' cardAttributes' ]) )
85- <div class =" mt-2 flex flex-wrap gap-2" >
86- @foreach ($config [' cardAttributes' ] as $attribute => $label )
87- @if (isset ($card [$attribute ]) && ! empty ($card [$attribute ]) )
88- <div class =" inline-flex items-center px-2 py-1 rounded-full text-xs bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300" >
89- <span class =" font-medium mr-1" >{{ $label } } :</span >
90- <span >{{ $card [$attribute ] } } </span >
91- </div >
92- @endif
93- @endforeach
94- </div >
95- @endif
96- </div >
97- </div >
98- @endforeach
99-
100- @if ($column [' total' ] > count ($column [' items' ]) )
101- <button
102- wire:click =" loadMoreItems('{{ $columnId } } ')"
103- class =" w-full py-2 text-xs text-center text-primary-600 dark:text-primary-400 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors duration-150 rounded"
104- >
105- {{ __ (' Load more' ) } } ({{ count ($column [' items' ]) } } / {{ $column [' total' ] } } )
106- </button >
107- @endif
108- @else
109- <div class =" kanban-empty-column h-24 border-2 border-dashed border-gray-200 dark:border-gray-700 rounded-lg flex flex-col items-center justify-center text-gray-400 dark:text-gray-500 text-sm" >
110- <svg class =" w-5 h-5 mb-1" fill =" none" stroke =" currentColor" viewBox =" 0 0 24 24" xmlns =" http://www.w3.org/2000/svg" >
111- <path stroke-linecap =" round" stroke-linejoin =" round" stroke-width =" 2" d =" M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" ></path >
112- </svg >
113- <span >No items</span >
114- </div >
115- @endif
116- </div >
117- </div >
37+ <x-flowforge::column
38+ :columnId =" $columnId"
39+ :column =" $column"
40+ :config =" $config"
41+ wire:key =" column-{{ $columnId } }"
42+ />
11843 @endforeach
11944 </div >
12045 </div >
@@ -123,9 +48,9 @@ class="w-full py-2 text-xs text-center text-primary-600 dark:text-primary-400 ho
12348 <x-filament::modal .description >
12449 {{ __ (' Add a new :recordLabel to the board' , [' recordLabel' => strtolower ($config [' recordLabel' ] ?? ' card' )]) } }
12550 </x-filament::modal .description >
126-
51+
12752 {{ $this -> createForm } }
128-
53+
12954 <x-slot name =" footer" >
13055 <div class =" flex justify-end gap-x-3" >
13156 <x-filament::button
@@ -146,7 +71,7 @@ class="w-full py-2 text-xs text-center text-primary-600 dark:text-primary-400 ho
14671
14772 <x-filament::modal id =" edit-card-modal" :heading =" __('Edit :recordLabel', ['recordLabel' => $config['recordLabel'] ?? 'Card'])" >
14873 {{ $this -> editForm } }
149-
74+
15075 <x-slot name =" footer" >
15176 <div class =" flex items-center justify-between" >
15277 <x-filament::button
0 commit comments