Skip to content

Commit

Permalink
Fix issue with table actions after upgrade.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaeljorhult committed Sep 8, 2023
1 parent aff0db8 commit 1aa31b6
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 33 deletions.
8 changes: 4 additions & 4 deletions resources/views/livewire/approvals-table.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-30
form="approveform-{{ $item->id }}"
type="submit"
title="Approve"
wire:click.prevent="$dispatch('approve', {{ $item->id }})"
wire:click.prevent="$dispatch('approve', { id: {{ $item->id }} })"
wire:loading.attr="disabled"
><x-heroicon-m-check class="w-4 h-4 fill-current" /></button>

<button
class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-300 text-gray-700 rounded hover:text-red-700 hover:border-red-700"
type="submit"
title="Reject"
wire:click.prevent="$dispatch('reject', {{ $item->id }})"
wire:click.prevent="$dispatch('reject', { id: {{ $item->id }} })"
wire:loading.attr="disabled"
><x-heroicon-m-x-mark class="w-4 h-4 fill-current" /></button>
@endif
Expand Down Expand Up @@ -84,14 +84,14 @@ class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-30
<form>
<x-forms.button-link
x-bind:disabled="selectedRows.length === 0"
wire:click.prevent="$dispatch('approve', false, true)"
wire:click.prevent="$dispatch('approve', { id: false, multiple: true })"
>Approve</x-forms.button-link>
</form>

<form>
<x-forms.button-link
x-bind:disabled="selectedRows.length === 0"
wire:click.prevent="$dispatch('reject', false, true)"
wire:click.prevent="$dispatch('reject', { id: false, multiple: true })"
>Reject</x-forms.button-link>
</form>
</div>
Expand Down
22 changes: 11 additions & 11 deletions resources/views/livewire/bookings-table.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div
x-data="itemsTable({ selectedRows: @entangle('selectedRows') })"
x-on:qrcoderead.window="$dispatch('selectIdentifier', $event.detail)"
x-on:qrcoderead.window="$dispatch('selectIdentifier', { identifier: $event.detail })"
>
<table class="table">
@include('livewire.partials.table-header')
Expand Down Expand Up @@ -91,7 +91,7 @@ class="text-red-500"

@if(count($item->resource->buckets) > 0)
<button
wire:click.prevent="$dispatch('switch', {{ $item->id }})"
wire:click.prevent="$dispatch('switch', { id: {{ $item->id }} })"
><x-heroicon-m-arrow-path class="w-4 text-gray-600 fill-current" /></button>
@endif
</td>
Expand All @@ -114,7 +114,7 @@ class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-30
form="checkoutform-{{ $item->id }}"
type="submit"
title="Check out"
wire:click.prevent="$dispatch('checkout', {{ $item->id }})"
wire:click.prevent="$dispatch('checkout', { id: {{ $item->id }} })"
wire:loading.attr="disabled"
>
<x-heroicon-m-arrow-up-tray class="w-4 h-4 fill-current" />
Expand All @@ -127,7 +127,7 @@ class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-30
form="checkinform-{{ $item->id }}"
type="submit"
title="Check in"
wire:click.prevent="$dispatch('checkin', {{ $item->id }})"
wire:click.prevent="$dispatch('checkin', { id: {{ $item->id }} })"
wire:loading.attr="disabled"
><x-heroicon-m-arrow-down-tray class="w-4 h-4 fill-current" /></button>
@endif
Expand All @@ -143,15 +143,15 @@ class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-30
class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-300 text-gray-500 rounded hover:text-red-700 hover:border-red-700"
href="{{ route('bookings.edit', $item) }}"
title="Edit"
wire:click.prevent="$dispatch('edit', {{ $item->id }})"
wire:click.prevent="$dispatch('edit', { id: {{ $item->id }} })"
><x-heroicon-m-pencil class="w-4 h-4 fill-current" /></a>

<button
class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-300 text-gray-500 rounded hover:text-red-700 hover:border-red-700"
form="deleteform-{{ $item->id }}"
type="submit"
title="Delete"
wire:click.prevent="$dispatch('delete', {{ $item->id }})"
wire:click.prevent="$dispatch('delete', { id: {{ $item->id }} })"
wire:loading.attr="disabled"
><x-heroicon-m-x-mark class="w-4 h-4 fill-current" /></button>

Expand Down Expand Up @@ -198,37 +198,37 @@ class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-30
<form>
<x-forms.button-link
x-bind:disabled="selectedRows.length === 0"
wire:click.prevent="$dispatch('checkout', false, true)"
wire:click.prevent="$dispatch('checkout', { id: false, multiple: true })"
>Check out</x-forms.button-link>
</form>

<form>
<x-forms.button-link
x-bind:disabled="selectedRows.length === 0"
wire:click.prevent="$dispatch('checkin', false, true)"
wire:click.prevent="$dispatch('checkin', { id: false, multiple: true })"
>Check in</x-forms.button-link>
</form>

@if(config('hydrofon.require_approval') !== 'none')
<form>
<x-forms.button-link
x-bind:disabled="selectedRows.length === 0"
wire:click.prevent="$dispatch('approve', false, true)"
wire:click.prevent="$dispatch('approve', { id: false, true })"
>Approve</x-forms.button-link>
</form>

<form>
<x-forms.button-link
x-bind:disabled="selectedRows.length === 0"
wire:click.prevent="$dispatch('reject', false, true)"
wire:click.prevent="$dispatch('reject', { id: false, true })"
>Reject</x-forms.button-link>
</form>
@endif

<form>
<x-forms.button-link
x-bind:disabled="selectedRows.length === 0"
wire:click.prevent="$dispatch('delete', false, true)"
wire:click.prevent="$dispatch('delete', { id: false, true })"
>Delete</x-forms.button-link>
</form>
</div>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/livewire/buckets-table.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ class="text-red-500"
class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-300 text-gray-500 rounded hover:text-red-700 hover:border-red-700"
href="{{ route('buckets.edit', $item) }}"
title="Edit"
wire:click.prevent="$dispatch('edit', {{ $item->id }})"
wire:click.prevent="$dispatch('edit', { id: {{ $item->id }} })"
><x-heroicon-m-pencil class="w-4 h-4 fill-current" /></a>

<button
class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-300 text-gray-500 rounded hover:text-red-700 hover:border-red-700"
form="deleteform-{{ $item->id }}"
type="submit"
title="Delete"
wire:click.prevent="$dispatch('delete', {{ $item->id }})"
wire:click.prevent="$dispatch('delete', { id: {{ $item->id }} })"
wire:loading.attr="disabled"
><x-heroicon-m-x-mark class="w-4 h-4 fill-current" /></button>

Expand All @@ -102,7 +102,7 @@ class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-30
<form>
<x-forms.button-link
x-bind:disabled="selectedRows.length === 0"
wire:click.prevent="$dispatch('delete', false, true)"
wire:click.prevent="$dispatch('delete', { id: false, multiple: true })"
>Delete</x-forms.button-link>
</form>
</div>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/livewire/categories-table.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ class="text-red-500"
class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-300 text-gray-500 rounded hover:text-red-700 hover:border-red-700"
href="{{ route('categories.edit', $item) }}"
title="Edit"
wire:click.prevent="$dispatch('edit', {{ $item->id }})"
wire:click.prevent="$dispatch('edit', { id: {{ $item->id }} })"
><x-heroicon-m-pencil class="w-4 h-4 fill-current" /></a>

<button
class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-300 text-gray-500 rounded hover:text-red-700 hover:border-red-700"
form="deleteform-{{ $item->id }}"
type="submit"
title="Delete"
wire:click.prevent="$dispatch('delete', {{ $item->id }})"
wire:click.prevent="$dispatch('delete', { id: {{ $item->id }} })"
wire:loading.attr="disabled"
><x-heroicon-m-x-mark class="w-4 h-4 fill-current" /></button>

Expand All @@ -119,7 +119,7 @@ class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-30
<form>
<x-forms.button-link
x-bind:disabled="selectedRows.length === 0"
wire:click.prevent="$dispatch('delete', false, true)"
wire:click.prevent="$dispatch('delete', { id: false, multiple: true })"
>Delete</x-forms.button-link>
</form>
</div>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/livewire/groups-table.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ class="text-red-500"
class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-300 text-gray-500 rounded hover:text-red-700 hover:border-red-700"
href="{{ route('groups.edit', $item) }}"
title="Edit"
wire:click.prevent="$dispatch('edit', {{ $item->id }})"
wire:click.prevent="$dispatch('edit', { id: {{ $item->id }} })"
><x-heroicon-m-pencil class="w-4 h-4 fill-current" /></a>

<button
class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-300 text-gray-500 rounded hover:text-red-700 hover:border-red-700"
form="deleteform-{{ $item->id }}"
type="submit"
title="Delete"
wire:click.prevent="$dispatch('delete', {{ $item->id }})"
wire:click.prevent="$dispatch('delete', { id: {{ $item->id }} })"
wire:loading.attr="disabled"
><x-heroicon-m-x-mark class="w-4 h-4 fill-current" /></button>

Expand All @@ -105,7 +105,7 @@ class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-30
<form>
<x-forms.button-link
x-bind:disabled="selectedRows.length === 0"
wire:click.prevent="$dispatch('delete', false, true)"
wire:click.prevent="$dispatch('delete', { id: false, multiple: true })"
>Delete</x-forms.button-link>
</form>
</div>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/livewire/profile-bookings-table.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-30
class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-300 text-gray-500 rounded hover:text-red-700 hover:border-red-700"
href="{{ route('bookings.edit', $item) }}"
title="Edit"
wire:click.prevent="$dispatch('edit', {{ $item->id }})"
wire:click.prevent="$dispatch('edit', { id: {{ $item->id }} })"
><x-heroicon-m-pencil class="w-4 h-4 fill-current" /></a>

<button
class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-300 text-gray-500 rounded hover:text-red-700 hover:border-red-700"
form="deleteform-{{ $item->id }}"
type="submit"
title="Delete"
wire:click.prevent="$dispatch('delete', {{ $item->id }})"
wire:click.prevent="$dispatch('delete', { id: {{ $item->id }} })"
wire:loading.attr="disabled"
><x-heroicon-m-x-mark class="w-4 h-4 fill-current" /></button>

Expand Down Expand Up @@ -142,7 +142,7 @@ class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-30
<form>
<x-forms.button-link
x-bind:disabled="selectedRows.length === 0"
wire:click.prevent="$dispatch('delete', false, true)"
wire:click.prevent="$dispatch('delete', { id: false, multiple: true })"
>Delete</x-forms.button-link>
</form>
</div>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/livewire/resources-table.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@ class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-30
class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-300 text-gray-500 rounded hover:text-red-700 hover:border-red-700"
href="{{ route('resources.edit', $item) }}"
title="Edit"
wire:click.prevent="$dispatch('edit', {{ $item->id }})"
wire:click.prevent="$dispatch('edit', { id: {{ $item->id }} })"
><x-heroicon-m-pencil class="w-4 h-4 fill-current" /></a>

<button
class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-300 text-gray-500 rounded hover:text-red-700 hover:border-red-700"
form="deleteform-{{ $item->id }}"
type="submit"
title="Delete"
wire:click.prevent="$dispatch('delete', {{ $item->id }})"
wire:click.prevent="$dispatch('delete', { id: {{ $item->id }} })"
wire:loading.attr="disabled"
><x-heroicon-m-x-mark class="w-4 h-4 fill-current" /></button>

Expand All @@ -165,7 +165,7 @@ class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-30
<form>
<x-forms.button-link
x-bind:disabled="selectedRows.length === 0"
wire:click.prevent="$dispatch('delete', false, true)"
wire:click.prevent="$dispatch('delete', { id: false, multiple: true })"
>Delete</x-forms.button-link>
</form>
</div>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/livewire/users-table.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-30
class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-300 text-gray-500 rounded hover:text-red-700 hover:border-red-700"
href="{{ route('users.edit', $item) }}"
title="Edit"
wire:click.prevent="$dispatch('edit', {{ $item->id }})"
wire:click.prevent="$dispatch('edit', { id: {{ $item->id }} })"
><x-heroicon-m-pencil class="w-4 h-4 fill-current" /></a>

<button
class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-300 text-gray-500 rounded hover:text-red-700 hover:border-red-700"
form="deleteform-{{ $item->id }}"
type="submit"
title="Delete"
wire:click.prevent="$dispatch('delete', {{ $item->id }})"
wire:click.prevent="$dispatch('delete', { id: {{ $item->id }} })"
wire:loading.attr="disabled"
><x-heroicon-m-x-mark class="w-4 h-4 fill-current" /></button>

Expand Down Expand Up @@ -157,7 +157,7 @@ class="invisible group-hover:visible ml-2 p-1 border border-solid border-gray-30
<form>
<x-forms.button-link
x-bind:disabled="selectedRows.length === 0"
wire:click.prevent="$dispatch('delete', false, true)"
wire:click.prevent="$dispatch('delete', { id: false, multiple: true })"
>Delete</x-forms.button-link>
</form>
</div>
Expand Down

0 comments on commit 1aa31b6

Please sign in to comment.