Once clicked the second click is blocked

This commit is contained in:
Merve Karaman 2023-08-03 11:21:43 +03:00
parent c4c1e7489e
commit bfc6578ed6

View File

@ -28,7 +28,9 @@
@if (! $hideMarkSent) @if (! $hideMarkSent)
@can($permissionUpdate) @can($permissionUpdate)
@if ($document->status == 'draft') @if ($document->status == 'draft')
<x-link id="show-slider-actions-mark-sent-{{ $document->type }}" href="{{ route($markSentRoute, $document->id) }}" @click="e => e.target.classList.add('disabled')"> <x-link
x-data="{ clicked: false }" x-on:click="clicked = true" x-bind:class="{ 'pointer-events-none cursor-default': clicked }" x-bind:disabled="clicked"
id="show-slider-actions-mark-sent-{{ $document->type }}" href="{{ route($markSentRoute, $document->id) }}" @click="e => e.target.classList.add('disabled')">
{{ trans($textMarkSent) }} {{ trans($textMarkSent) }}
</x-link> </x-link>
@else @else