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
|
||||
$confirmBtnClass = $variant === 'danger'
|
||||
? 'bg-red-600 hover:bg-red-700'
|
||||
: 'bg-violet-600 hover:bg-violet-700';
|
||||
: 'bg-indigo-600 hover:bg-indigo-700';
|
||||
$iconWrapClass = $variant === 'danger'
|
||||
? 'bg-red-100 text-red-600'
|
||||
: 'bg-violet-100 text-violet-600';
|
||||
: 'bg-indigo-100 text-indigo-600';
|
||||
@endphp
|
||||
|
||||
@if(isset($trigger))
|
||||
@@ -57,11 +57,11 @@
|
||||
@endisset
|
||||
<button type="button"
|
||||
@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 }}
|
||||
</button>
|
||||
<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 }}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
@@ -22,10 +22,18 @@
|
||||
<td class="px-4 py-3">{{ $member->branch?->name ?? 'All branches' }}</td>
|
||||
<td class="px-4 py-3 text-right">
|
||||
@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?')">
|
||||
@csrf @method('DELETE')
|
||||
<button type="submit" class="text-red-600">Remove</button>
|
||||
</form>
|
||||
<x-confirm-dialog
|
||||
:name="'remove-member-'.$member->id"
|
||||
title="Remove this member?"
|
||||
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
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -125,10 +125,19 @@
|
||||
@endif
|
||||
|
||||
@if ($room->status === 'scheduled')
|
||||
<form method="POST" action="{{ route('meet.rooms.cancel', $room) }}" class="mt-6" onsubmit="return confirm('Cancel this meeting?')">
|
||||
@csrf
|
||||
<x-btn type="submit" variant="danger">Cancel meeting</x-btn>
|
||||
</form>
|
||||
<div class="mt-6">
|
||||
<x-confirm-dialog
|
||||
:name="'cancel-meeting-'.$room->id"
|
||||
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
|
||||
</div>
|
||||
</x-app-layout>
|
||||
|
||||
Reference in New Issue
Block a user