Skip to content

Commit 2789bd3

Browse files
committed
UP
1 parent 7951bd1 commit 2789bd3

File tree

8 files changed

+26
-26
lines changed

8 files changed

+26
-26
lines changed

resources/js/flowforge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default function flowforge({state}) {
1111
// Listen for card creation
1212
this.$wire.$on('kanban-card-created', (data) => {
1313
const id = data[0].id;
14-
const status = data[0].status;
14+
const column = data[0].column;
1515

1616
this.$dispatch('close-modal', { id: 'create-card-modal' });
1717

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
@props(['label' => null, 'value', 'color' => 'gray', 'icon' => null])
1+
@props(['label', 'value', 'color' => 'gray', 'icon' => null])
22

3-
<div
4-
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">
5-
<span class="font-medium mr-1">{{ $label }}:</span>
6-
<span>{{ $value }}</span>
3+
<div class="inline-flex items-center rounded-full bg-{{ $color }}-100 dark:bg-{{ $color }}-900 px-2 py-1 text-xs font-medium text-{{ $color }}-700 dark:text-{{ $color }}-300 ring-1 ring-inset ring-{{ $color }}-400/20 dark:ring-{{ $color }}-800/50">
4+
@if($icon)
5+
<x-dynamic-component :component="$icon" class="w-3 h-3 mr-1" />
6+
@endif
7+
<span>{{ $label }}: {{ $value }}</span>
78
</div>

resources/views/livewire/card.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ class="kanban-card mb-3 bg-white dark:bg-gray-800 rounded-lg shadow-sm border bo
1717
@if(!empty($config['cardAttributes']))
1818
<div class="mt-2 flex flex-wrap gap-2">
1919
@foreach($config['cardAttributes'] as $attribute => $label)
20-
@if(isset($card[$attribute]) && !empty($card[$attribute]))
20+
@if(isset($card['attributes'][$attribute]) && !empty($card['attributes'][$attribute]['value']))
2121
<x-flowforge::card-badge
22-
:label="$label"
23-
:value="$card[$attribute]"
22+
:label="$card['attributes'][$attribute]['label']"
23+
:value="$card['attributes'][$attribute]['value']"
2424
:color="$config['cardAttributeColors'][$attribute] ?? 'gray'"
2525
:icon="$config['cardAttributeIcons'][$attribute] ?? null"
2626
/>

resources/views/livewire/column.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ class="kanban-column w-[300px] min-w-[300px] flex-shrink-0 border border-kanban-
77
class="kanban-column-header flex items-center justify-between py-3 px-4 border-b border-gray-200 dark:border-gray-700">
88
<div class="flex items-center">
99
<h3 class="text-sm font-medium text-kanban-column-header dark:text-kanban-column-header">
10-
{{ $column['name'] }}
10+
{{ $column['label'] }}
1111
</h3>
1212
<div
13-
class="ml-2 px-2.5 py-0.5 rounded-full text-xs font-medium {{ $config['statusColors'][$columnId] ?? 'kanban-status-' . str_replace('_', '-', $columnId) }}">
13+
class="ml-2 px-2.5 py-0.5 rounded-full text-xs font-medium {{ $config['columnColors'][$columnId] ?? 'kanban-column-' . str_replace('_', '-', $columnId) }}">
1414
{{ $column['total'] ?? count($column['items']) }}
1515
</div>
1616
</div>
@@ -33,7 +33,7 @@ class="text-gray-400 hover:text-primary-500 dark:text-gray-500 dark:hover:text-p
3333
x-sortable
3434
x-sortable-group="cards"
3535
data-column-id="{{ $columnId }}"
36-
@end.stop="$wire.updateColumnCards($event.to.getAttribute('data-column-id'), $event.to.sortable.toArray())"
36+
@end.stop="$wire.reorderCardsInColumn($event.to.getAttribute('data-column-id'), $event.to.sortable.toArray())"
3737
class="p-3 flex-1 overflow-y-auto overflow-x-hidden"
3838
style="max-height: calc(100vh - 13rem);"
3939
>
@@ -67,7 +67,7 @@ class="py-3 text-center"
6767
</div>
6868
</div>
6969
<div wire:loading.remove wire:target="loadMoreItems('{{ $columnId }}')" class="text-xs text-gray-400">
70-
{{ count($column['items']) }} / {{ $column['total'] }} {{ $config['pluralRecordLabel'] }}
70+
{{ count($column['items']) }} / {{ $column['total'] }} {{ $config['pluralCardLabel'] }}
7171
</div>
7272
</div>
7373
@endif
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
@props(['columnId'])
22

3-
<div
4-
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">
5-
<svg class="w-5 h-5 mb-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"
6-
xmlns="http://www.w3.org/2000/svg">
7-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
8-
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>
3+
<div class="p-3 flex flex-col items-center justify-center h-full min-h-[150px] rounded-lg border-2 border-dashed border-gray-200 dark:border-gray-800">
4+
<svg class="w-10 h-10 text-gray-400 dark:text-gray-600 mb-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
5+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10"></path>
96
</svg>
10-
<span>No items</span>
7+
<p class="text-sm text-gray-500 dark:text-gray-400">
8+
{{ __('No cards in this column') }}
9+
</p>
1110
</div>

resources/views/livewire/kanban-board.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ class="w-full h-full flex flex-col relative"
99
state: {
1010
columns: @js($columns),
1111
columnField: '{{ $config['columnField'] }}',
12-
recordLabel: '{{ $config['recordLabel'] ?? 'Card' }}',
13-
pluralRecordLabel: '{{ $config['pluralRecordLabel'] ?? 'Cards' }}'
12+
cardLabel: '{{ $config['cardLabel'] ?? 'Card' }}',
13+
pluralCardLabel: '{{ $config['pluralCardLabel'] ?? 'Cards' }}'
1414
}
1515
})"
1616
>

resources/views/livewire/modals/create-card.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@props(['config'])
22

3-
<x-filament::modal id="create-card-modal" :heading="__('Create New :recordLabel', ['recordLabel' => $config['recordLabel'] ?? 'Card'])"
4-
:description="__('Add a new :recordLabel to the board', ['recordLabel' => strtolower($config['recordLabel'] ?? 'card')])"
3+
<x-filament::modal id="create-card-modal" :heading="__('Create New :cardLabel', ['cardLabel' => $config['cardLabel'] ?? 'Card'])"
4+
:description="__('Add a new :cardLabel to the board', ['cardLabel' => strtolower($config['cardLabel'] ?? 'card')])"
55
>
66

77
{{ $this->createForm }}
@@ -18,7 +18,7 @@
1818
<x-filament::button
1919
wire:click="createCard"
2020
>
21-
{{ __('Create :recordLabel', ['recordLabel' => $config['recordLabel'] ?? 'Card']) }}
21+
{{ __('Create :cardLabel', ['cardLabel' => $config['cardLabel'] ?? 'Card']) }}
2222
</x-filament::button>
2323
</div>
2424
</x-slot>

resources/views/livewire/modals/edit-card.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@props(['config'])
22

3-
<x-filament::modal id="edit-card-modal" :heading="__('Edit :recordLabel', ['recordLabel' => $config['recordLabel'] ?? 'Card'])">
3+
<x-filament::modal id="edit-card-modal" :heading="__('Edit :cardLabel', ['cardLabel' => $config['cardLabel'] ?? 'Card'])">
44
{{ $this->editForm }}
55

66
<x-slot name="footer">

0 commit comments

Comments
 (0)