Skip to content

Commit 9d251f5

Browse files
committed
Card labels
1 parent b223055 commit 9d251f5

File tree

8 files changed

+21
-20
lines changed

8 files changed

+21
-20
lines changed

resources/dist/flowforge.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/js/flowforge.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default function flowforge({state}) {
1111
const id = data[0].id;
1212
const column = data[0].column;
1313

14-
this.$dispatch('close-modal', { id: 'create-card-modal' });
14+
this.$dispatch('close-modal', { id: 'create-record-modal' });
1515

1616
// Highlight the new card
1717
setTimeout(() => {
@@ -33,7 +33,7 @@ export default function flowforge({state}) {
3333
})
3434
const id = data[0].id;
3535

36-
this.$dispatch('close-modal', { id: 'edit-card-modal' });
36+
this.$dispatch('close-modal', { id: 'edit-record-modal' });
3737

3838
// Highlight the updated card
3939
// setTimeout(() => {
@@ -51,7 +51,7 @@ export default function flowforge({state}) {
5151
this.$wire.$on('kanban-record-deleted', (data) => {
5252
const id = data[0].id;
5353

54-
this.$dispatch('close-modal', { id: 'edit-card-modal' });
54+
this.$dispatch('close-modal', { id: 'edit-record-modal' });
5555

5656
// Highlight the deleted card
5757
setTimeout(() => {

resources/views/livewire/card.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class="kanban-card mb-3 bg-white dark:bg-gray-800 rounded-lg shadow-sm border bo
55
x-sortable-handle
66
x-sortable-item="{{ $card['id'] }}"
77
wire:click="openEditForm('{{ $card['id'] }}', '{{ $columnId }}')"
8-
x-on:click="$dispatch('open-modal', { id: 'edit-card-modal' })"
8+
x-on:click="$dispatch('open-modal', { id: 'edit-record-modal' })"
99
>
1010
<div class="p-3">
1111
<h4 class="text-sm font-medium text-gray-900 dark:text-white">{{ $card['title'] }}</h4>

resources/views/livewire/column.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class="ml-2 px-2.5 py-0.5 rounded-full text-xs font-medium kanban-color-{{ $colu
1818
<button
1919
type="button"
2020
wire:click="openCreateForm('{{ $columnId }}')"
21-
x-on:click="$dispatch('open-modal', { id: 'create-card-modal' })"
21+
x-on:click="$dispatch('open-modal', { id: 'create-record-modal' })"
2222
class="text-gray-400 hover:text-primary-500 dark:text-gray-500 dark:hover:text-primary-400"
2323
>
2424
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class="w-full h-full flex flex-col relative"
99
state: {
1010
columns: @js($columns),
1111
columnField: '{{ $config->getColumnField() }}',
12-
cardLabel: '{{ $config->cardLabel ?? 'record' }}',
12+
cardLabel: '{{ $config->getCardLabel() ?? 'record' }}',
1313
pluralCardLabel: '{{ $config->pluralCardLabel ?? 'Records' }}'
1414
}
1515
})"
@@ -29,6 +29,6 @@ class="w-full h-full flex flex-col relative"
2929
</div>
3030
</div>
3131

32-
<x-flowforge::modals.create-card :permissions="$this->permissions" :config="$config" />
33-
<x-flowforge::modals.edit-card :permissions="$this->permissions" :config="$config" />
32+
<x-flowforge::modals.create-record :permissions="$this->permissions" :config="$config" />
33+
<x-flowforge::modals.edit-record :permissions="$this->permissions" :config="$config" />
3434
</div>

resources/views/livewire/modals/create-card.blade.php renamed to resources/views/livewire/modals/create-record.blade.php

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

3-
<x-filament::modal id="create-card-modal" :heading="__('Create New :cardLabel', ['cardLabel' => $config->cardLabel ?? 'Record'])"
4-
:description="__('Add a new :cardLabel to the board', ['cardLabel' => strtolower($config->cardLabel ?? 'record')])"
3+
<x-filament::modal id="create-record-modal"
4+
:heading="__('Create New :cardLabel', ['cardLabel' => $config->getCardLabel() ?? 'Record'])"
5+
:description="__('Add a new :cardLabel to the board', ['cardLabel' => strtolower($config->getCardLabel() ?? 'record')])"
56
>
67

78
{{ $this->createRecordForm }}
@@ -10,15 +11,15 @@
1011
<div class="flex justify-end gap-x-3">
1112
<x-filament::button
1213
color="gray"
13-
x-on:click="$dispatch('close-modal', { id: 'create-card-modal' })"
14+
x-on:click="$dispatch('close-modal', { id: 'create-record-modal' })"
1415
>
1516
{{ __('Cancel') }}
1617
</x-filament::button>
1718

1819
<x-filament::button
1920
wire:click="createRecord"
2021
>
21-
{{ __('Create :cardLabel', ['cardLabel' => $config->cardLabel ?? 'Record']) }}
22+
{{ __('Create :cardLabel', ['cardLabel' => $config->getCardLabel() ?? 'Record']) }}
2223
</x-filament::button>
2324
</div>
2425
</x-slot>

resources/views/livewire/modals/edit-card.blade.php renamed to resources/views/livewire/modals/edit-record.blade.php

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

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

66
<x-slot name="footer">
@@ -19,7 +19,7 @@
1919
<div class="flex gap-x-3">
2020
<x-filament::button
2121
color="gray"
22-
x-on:click="$dispatch('close-modal', { id: 'edit-card-modal' })"
22+
x-on:click="$dispatch('close-modal', { id: 'edit-record-modal' })"
2323
>
2424
{{ __('Cancel') }}
2525
</x-filament::button>

0 commit comments

Comments
 (0)