File tree Expand file tree Collapse file tree 7 files changed +13
-265
lines changed
Expand file tree Collapse file tree 7 files changed +13
-265
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ class="w-full h-full flex flex-col relative"
88 x-data =" flowforge({
99 state: {
1010 columns: @js ($columns ),
11- titleField: '{{ $config -> getTitleField () } } ',
12- columnField: '{{ $config -> getColumnField () } } ',
13- cardLabel: '{{ $config -> getSingularCardLabel () } } ',
14- pluralCardLabel: '{{ $config -> getPluralCardLabel () } } '
11+ titleField: '{{ $config [ ' recordTitleAttribute ' ] } } ',
12+ columnField: '{{ $config [ ' columnIdentifierAttribute ' ] } } ',
13+ cardLabel: '{{ $config [ ' cardLabel ' ] } } ',
14+ pluralCardLabel: '{{ $config [ ' pluralCardLabel ' ] } } ',
1515 }
1616 })"
1717>
Original file line number Diff line number Diff line change 1- @props ([' config ' , ' columnId' , ' record' ] )
1+ @props ([' columnId' , ' record' ] )
22
33@php
44 $processedRecordActions = $this -> getCardActionsForRecord ($record );
Original file line number Diff line number Diff line change @@ -84,14 +84,14 @@ class="text-xs text-primary-600 dark:text-primary-400">
8484 <div wire:loading.remove wire:target =" loadMoreItems('{{ $columnId } } ')"
8585 class =" text-xs text-gray-400" >
8686 {{ count ($column [' items' ]) } }
87- / {{ $column [' total' ] } } {{ $config -> getPluralCardLabel () } }
87+ / {{ $column [' total' ] } } {{ $config [ ' pluralCardLabel ' ] } }
8888 </div >
8989 </div >
9090 @endif
9191 @else
9292 <x-flowforge::empty-column
9393 :columnId =" $columnId"
94- :pluralCardLabel =" $config->getPluralCardLabel() "
94+ :pluralCardLabel =" $config['pluralCardLabel'] "
9595 />
9696 @endif
9797 </div >
Original file line number Diff line number Diff line change @@ -61,35 +61,6 @@ protected function setUp(): void
6161 */
6262 public function getViewData (): array
6363 {
64- // Direct delegation to Livewire component (no adapter)
65- $ livewire = $ this ->getLivewire ();
66-
67- // Create simple config object
68- $ config = new class ($ this )
69- {
70- public function __construct (private Board $ board ) {}
71-
72- public function getTitleField (): string
73- {
74- return $ this ->board ->getRecordTitleAttribute ();
75- }
76-
77- public function getColumnField (): string
78- {
79- return $ this ->board ->getColumnIdentifierAttribute () ?? 'status ' ;
80- }
81-
82- public function getSingularCardLabel (): string
83- {
84- return 'Card ' ;
85- }
86-
87- public function getPluralCardLabel (): string
88- {
89- return 'Cards ' ;
90- }
91- };
92-
9364 // Build columns data using new concerns
9465 $ columns = [];
9566 foreach ($ this ->getColumns () as $ column ) {
@@ -110,7 +81,12 @@ public function getPluralCardLabel(): string
11081
11182 return [
11283 'columns ' => $ columns ,
113- 'config ' => $ config ,
84+ 'config ' => [
85+ 'recordTitleAttribute ' => $ this ->getRecordTitleAttribute (),
86+ 'columnIdentifierAttribute ' => $ this ->getColumnIdentifierAttribute (),
87+ 'cardLabel ' => 'Record ' ,
88+ 'pluralCardLabel ' => 'Records ' ,
89+ ]
11490 ];
11591 }
11692
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments