Skip to content

Commit 976717d

Browse files
committed
UP
1 parent 3b387b1 commit 976717d

File tree

3 files changed

+3
-51
lines changed

3 files changed

+3
-51
lines changed

resources/views/livewire/column.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class="kanban-column-header flex items-center justify-between py-3 px-4 border-b
1010
{{ $column['label'] }}
1111
</h3>
1212
<div
13-
class="ml-2 px-2.5 py-0.5 rounded-full text-xs font-medium {{ $config['columnColors'][$columnId] ?? 'kanban-column-' . str_replace('_', '-', $columnId) }}">
13+
class="ml-2 px-2.5 py-0.5 rounded-full text-xs font-medium kanban-color-{{ $config['columnColors'][$columnId] }}">
1414
{{ $column['total'] ?? (isset($column['items']) ? count($column['items']) : 0) }}
1515
</div>
1616
</div>

src/Adapters/AbstractKanbanAdapter.php

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace Relaticle\Flowforge\Adapters;
66

7+
use App\Models\Task;
78
use Filament\Forms\Form;
89
use Illuminate\Database\Eloquent\Model;
910
use Illuminate\Support\Collection;
@@ -160,53 +161,4 @@ public function moveCardToColumn(Model $card, string|int $columnId): bool
160161

161162
return $card->save();
162163
}
163-
164-
/**
165-
* Convert the adapter to a Livewire-compatible array.
166-
*
167-
* @return array<string, mixed>
168-
*/
169-
public function toLivewire(): array
170-
{
171-
return [
172-
'config' => [
173-
'columnField' => $this->config->getColumnField(),
174-
'columnValues' => $this->config->getColumnValues(),
175-
'columnColors' => $this->config->getColumnColors(),
176-
'titleField' => $this->config->getTitleField(),
177-
'descriptionField' => $this->config->getDescriptionField(),
178-
'cardAttributes' => $this->config->getCardAttributes(),
179-
'orderField' => $this->config->getOrderField(),
180-
'cardLabel' => $this->config->getCardLabel(),
181-
'pluralCardLabel' => $this->config->getPluralCardLabel(),
182-
// Note: createFormCallback cannot be serialized and must be reattached
183-
],
184-
];
185-
}
186-
187-
/**
188-
* Create a new adapter instance from a Livewire-compatible array.
189-
*
190-
* @param array<string, mixed> $value The Livewire-compatible array
191-
* @return static
192-
*/
193-
public static function fromLivewire($value): static
194-
{
195-
$configData = $value['config'];
196-
197-
$config = new KanbanConfig(
198-
columnField: $configData['columnField'],
199-
columnValues: $configData['columnValues'],
200-
columnColors: $configData['columnColors'],
201-
titleField: $configData['titleField'],
202-
descriptionField: $configData['descriptionField'],
203-
cardAttributes: $configData['cardAttributes'],
204-
orderField: $configData['orderField'],
205-
cardLabel: $configData['cardLabel'],
206-
pluralCardLabel: $configData['pluralCardLabel'],
207-
// Note: createFormCallback is not serializable and must be reattached
208-
);
209-
210-
return new static($config);
211-
}
212164
}

src/Adapters/EloquentQueryAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public function deleteCard(Model $card): bool
168168
return $card->delete();
169169
}
170170

171-
/**
171+
/**
172172
* Convert the adapter to a Livewire-compatible array.
173173
*
174174
* @return array<string, mixed>

0 commit comments

Comments
 (0)