Skip to content

Commit b78646a

Browse files
committed
Enhance column display with status messages for item loading and pagination
1 parent d04f1e9 commit b78646a

File tree

3 files changed

+30
-16
lines changed

3 files changed

+30
-16
lines changed

resources/lang/en/flowforge.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77
'card_label' => 'Record',
88
'plural_card_label' => 'Records',
99
'cards_pagination' => ':current of :total :cards',
10+
'all_cards_loaded' => 'All :total :cards loaded',
1011
];

resources/lang/nl/flowforge.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77
'card_label' => 'Record',
88
'plural_card_label' => 'Records',
99
'cards_pagination' => ':current van :total :cards',
10+
'all_cards_loaded' => 'Alle :total :cards geladen',
1011
];

resources/views/livewire/column.blade.php

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -61,27 +61,39 @@ class="p-3 flex-1 overflow-y-auto overflow-x-hidden overscroll-contain kanban-ca
6161
/>
6262
@endforeach
6363

64-
@if(isset($column['total']) && $column['total'] > count($column['items']))
65-
<div
66-
x-intersect.margin.300px="handleSmoothScroll('{{ $columnId }}')"
67-
class="py-3 text-center">
64+
{{-- Always show status message at bottom --}}
65+
<div class="py-3 text-center">
66+
@if(isset($column['total']) && $column['total'] > count($column['items']))
67+
{{-- More items available --}}
68+
<div
69+
x-intersect.margin.300px="handleSmoothScroll('{{ $columnId }}')"
70+
class="w-full">
6871

69-
<div x-show="isLoadingColumn('{{ $columnId }}')"
70-
x-transition
71-
class="text-xs text-primary-600 dark:text-primary-400 flex items-center justify-center gap-2">
72-
{{ __('flowforge::flowforge.loading_more_cards') }}
73-
</div>
72+
<div x-show="isLoadingColumn('{{ $columnId }}')"
73+
x-transition
74+
class="text-xs text-primary-600 dark:text-primary-400 flex items-center justify-center gap-2">
75+
{{ __('flowforge::flowforge.loading_more_cards') }}
76+
</div>
7477

75-
<div x-show="!isLoadingColumn('{{ $columnId }}')"
76-
class="text-xs text-gray-500 dark:text-gray-400">
77-
{{ __('flowforge::flowforge.cards_pagination', [
78-
'current' => count($column['items']),
79-
'total' => $column['total'],
78+
<div x-show="!isLoadingColumn('{{ $columnId }}')"
79+
class="text-xs text-gray-500 dark:text-gray-400">
80+
{{ __('flowforge::flowforge.cards_pagination', [
81+
'current' => count($column['items']),
82+
'total' => $column['total'],
83+
'cards' => strtolower($config['pluralCardLabel'])
84+
]) }}
85+
</div>
86+
</div>
87+
@else
88+
{{-- All items loaded --}}
89+
<div class="text-xs text-green-600 dark:text-green-400">
90+
{{ __('flowforge::flowforge.all_cards_loaded', [
91+
'total' => $column['total'] ?? count($column['items']),
8092
'cards' => strtolower($config['pluralCardLabel'])
8193
]) }}
8294
</div>
83-
</div>
84-
@endif
95+
@endif
96+
</div>
8597
@else
8698
<x-flowforge::empty-column
8799
:columnId="$columnId"

0 commit comments

Comments
 (0)