Replace native browser confirms with Ladill confirm dialogs.
Deploy Ladill Meet / deploy (push) Successful in 41s
Deploy Ladill Meet / deploy (push) Successful in 41s
Cancel meeting and remove member now use the shared modal UI. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -12,10 +12,10 @@
|
|||||||
@php
|
@php
|
||||||
$confirmBtnClass = $variant === 'danger'
|
$confirmBtnClass = $variant === 'danger'
|
||||||
? 'bg-red-600 hover:bg-red-700'
|
? 'bg-red-600 hover:bg-red-700'
|
||||||
: 'bg-violet-600 hover:bg-violet-700';
|
: 'bg-indigo-600 hover:bg-indigo-700';
|
||||||
$iconWrapClass = $variant === 'danger'
|
$iconWrapClass = $variant === 'danger'
|
||||||
? 'bg-red-100 text-red-600'
|
? 'bg-red-100 text-red-600'
|
||||||
: 'bg-violet-100 text-violet-600';
|
: 'bg-indigo-100 text-indigo-600';
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@if(isset($trigger))
|
@if(isset($trigger))
|
||||||
@@ -57,11 +57,11 @@
|
|||||||
@endisset
|
@endisset
|
||||||
<button type="button"
|
<button type="button"
|
||||||
@click="$dispatch('close-modal', {{ Js::from($name) }})"
|
@click="$dispatch('close-modal', {{ Js::from($name) }})"
|
||||||
class="btn-secondary btn-secondary-sm">
|
class="rounded-xl border border-slate-200 bg-white px-4 py-2.5 text-sm font-semibold text-slate-700 transition hover:bg-slate-50">
|
||||||
{{ $cancelLabel }}
|
{{ $cancelLabel }}
|
||||||
</button>
|
</button>
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
@class(['rounded-full px-4 py-2 text-sm font-semibold text-white transition', $confirmBtnClass])>
|
@class(['rounded-xl px-4 py-2.5 text-sm font-semibold text-white transition', $confirmBtnClass])>
|
||||||
{{ $confirmLabel }}
|
{{ $confirmLabel }}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -22,10 +22,18 @@
|
|||||||
<td class="px-4 py-3">{{ $member->branch?->name ?? 'All branches' }}</td>
|
<td class="px-4 py-3">{{ $member->branch?->name ?? 'All branches' }}</td>
|
||||||
<td class="px-4 py-3 text-right">
|
<td class="px-4 py-3 text-right">
|
||||||
@if ($member->user_ref !== auth()->user()->public_id)
|
@if ($member->user_ref !== auth()->user()->public_id)
|
||||||
<form method="POST" action="{{ route('meet.members.destroy', $member) }}" class="inline" onsubmit="return confirm('Remove this member?')">
|
<x-confirm-dialog
|
||||||
@csrf @method('DELETE')
|
:name="'remove-member-'.$member->id"
|
||||||
<button type="submit" class="text-red-600">Remove</button>
|
title="Remove this member?"
|
||||||
</form>
|
message="They will lose access to this Meet organization."
|
||||||
|
:action="route('meet.members.destroy', $member)"
|
||||||
|
method="DELETE"
|
||||||
|
confirm-label="Remove member"
|
||||||
|
>
|
||||||
|
<x-slot:trigger>
|
||||||
|
<x-btn type="button" variant="danger" size="sm">Remove</x-btn>
|
||||||
|
</x-slot:trigger>
|
||||||
|
</x-confirm-dialog>
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -125,10 +125,19 @@
|
|||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($room->status === 'scheduled')
|
@if ($room->status === 'scheduled')
|
||||||
<form method="POST" action="{{ route('meet.rooms.cancel', $room) }}" class="mt-6" onsubmit="return confirm('Cancel this meeting?')">
|
<div class="mt-6">
|
||||||
@csrf
|
<x-confirm-dialog
|
||||||
<x-btn type="submit" variant="danger">Cancel meeting</x-btn>
|
:name="'cancel-meeting-'.$room->id"
|
||||||
</form>
|
title="Cancel this meeting?"
|
||||||
|
message="The meeting will be cancelled and invitees will no longer be able to join."
|
||||||
|
:action="route('meet.rooms.cancel', $room)"
|
||||||
|
confirm-label="Cancel meeting"
|
||||||
|
>
|
||||||
|
<x-slot:trigger>
|
||||||
|
<x-btn type="button" variant="danger">Cancel meeting</x-btn>
|
||||||
|
</x-slot:trigger>
|
||||||
|
</x-confirm-dialog>
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</x-app-layout>
|
</x-app-layout>
|
||||||
|
|||||||
Reference in New Issue
Block a user