feat: per-subscriber Mailwizz sync button on admin list
Add POST route and form request to queue SyncSubscriberToMailwizz for one subscriber when the page has Mailwizz configured. Include Dutch strings and feature tests for auth and edge cases. Made-with: Cursor
This commit is contained in:
@@ -82,21 +82,39 @@
|
||||
</td>
|
||||
<td class="whitespace-nowrap px-4 py-3 text-right">
|
||||
@can('update', $page)
|
||||
<form
|
||||
method="post"
|
||||
action="{{ route('admin.pages.subscribers.destroy', [$page, $subscriber]) }}"
|
||||
class="inline"
|
||||
onsubmit="return confirm(@js(__('Delete this subscriber? This cannot be undone.')));"
|
||||
>
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button
|
||||
type="submit"
|
||||
class="rounded-lg border border-red-200 bg-white px-2.5 py-1 text-xs font-semibold text-red-700 hover:bg-red-50"
|
||||
<div class="inline-flex flex-wrap items-center justify-end gap-1.5">
|
||||
@if ($page->mailwizzConfig !== null)
|
||||
<form
|
||||
method="post"
|
||||
action="{{ route('admin.pages.subscribers.sync-mailwizz', [$page, $subscriber]) }}"
|
||||
class="inline"
|
||||
onsubmit="return confirm(@js(__('Queue a Mailwizz sync for this subscriber? The tag and coupon code will be sent when the queue worker runs.')));"
|
||||
>
|
||||
@csrf
|
||||
<button
|
||||
type="submit"
|
||||
class="rounded-lg border border-indigo-200 bg-white px-2.5 py-1 text-xs font-semibold text-indigo-700 hover:bg-indigo-50"
|
||||
>
|
||||
{{ __('Sync Mailwizz') }}
|
||||
</button>
|
||||
</form>
|
||||
@endif
|
||||
<form
|
||||
method="post"
|
||||
action="{{ route('admin.pages.subscribers.destroy', [$page, $subscriber]) }}"
|
||||
class="inline"
|
||||
onsubmit="return confirm(@js(__('Delete this subscriber? This cannot be undone.')));"
|
||||
>
|
||||
{{ __('Remove') }}
|
||||
</button>
|
||||
</form>
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button
|
||||
type="submit"
|
||||
class="rounded-lg border border-red-200 bg-white px-2.5 py-1 text-xs font-semibold text-red-700 hover:bg-red-50"
|
||||
>
|
||||
{{ __('Remove') }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user