Skip to content

Commit

Permalink
Merge pull request #3020 from CihanSenturk/mobile-delete-component-issue
Browse files Browse the repository at this point in the history
Fixed mobile delete action issue
  • Loading branch information
cuneytsenturk committed Aug 11, 2023
2 parents a30ebc3 + 9f3100e commit 7066f5e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions resources/views/components/table/actions-mobile.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ class="modal w-full h-full fixed flex top-0 left-0 right-0 justify-center items-

@case('delete')
@php
$text = $action['text'] ?? null;
$title = $action['title'] ?? null;
$modelId = ! empty($action['model-id']) ? $action['model-id'] : 'id';
$modelName = ! empty($action['model-name']) ? $action['model-name'] : 'name';
@endphp

<x-delete-button :model="$action['model']" :route="$action['route']" :text="$title" :model-id="$modelId" :model-name="$modelName" />
<x-delete-button :model="$action['model']" :route="$action['route']" :title="$title" :text="$text" :model-id="$modelId" :model-name="$modelName" />
@break

@default
Expand Down Expand Up @@ -114,11 +115,13 @@ class="modal w-full h-full fixed flex top-0 left-0 right-0 justify-center items-
@php $divider = false; @endphp

@php
$text = $action['text'] ?? null;
$title = $action['title'] ?? null;
$modelId = ! empty($action['model-id']) ? $action['model-id'] : 'id';
$modelName = ! empty($action['model-name']) ? $action['model-name'] : 'name';
@endphp
<x-delete-link :model="$action['model']" :route="$action['route']" :text="$title" :model-id="$modelId" :model-name="$modelName" />

<x-delete-link :model="$action['model']" :route="$action['route']" :title="$title" :text="$text" :model-id="$modelId" :model-name="$modelName" />
@break

@case('divider')
Expand Down

0 comments on commit 7066f5e

Please sign in to comment.