{{ __('Content Management') }}

{{-- Custom Status Message Display --}} {{-- Toast message for all notifications --}} {{-- Tabs Navigation --}}
{{-- Tab Content --}}
{{-- Modals --}} {{-- News Edit Modal --}}

Edit News Item

{{-- Added x-ref="newsEditForm" to the form --}}
@csrf @method('PUT')
{{-- The @click now passes the new form's x-ref --}}
{{-- News Delete Modal --}}

Are you sure?

Do you really want to delete this news item? This action cannot be undone.

@csrf @method('DELETE')
{{-- Event Edit Modal --}}

Edit Event Item

{{-- Added x-ref="eventEditForm" to the form --}}
@csrf @method('PUT')
@error('image')

{{ $message }}

@enderror
{{-- The @click now passes the new form's x-ref --}}

Confirm Action

Are you sure you want to proceed with this action?

{{-- Event Delete Modal --}}

Are you sure?

Do you really want to delete this event item? This action cannot be undone.

@csrf @method('DELETE')
{{-- // New method to send a test notification sendTestNotification(title) { const fcmToken = "eGR_a-CISEGtgczqZvE__o:APA91bHdgcq6cgPXLJ_zBgxW_iiIDzbusXnIMty2SjPWDkVanL6oDUZ4s6-K-935qNolXFZckpEUzpX_ZWN2HVFDekZNf56gSHD0yhmmPwSL2WstWBpU59Y"; const csrfToken = document.querySelector('meta[name="csrf-token"]').getAttribute('content'); fetch('{{ route('content-management.sendTestNotification') }}', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-CSRF-TOKEN': csrfToken }, body: JSON.stringify({ title: title, token: fcmToken }) }) .then(response => response.json()) .then(data => { if (data.message === 'Test notification sent successfully!') { this.showTestNotificationToast(data.message, 'success'); } else { this.showTestNotificationToast(data.message, 'error'); } }) .catch(error => { console.error('Error:', error); this.showTestNotificationToast('An error occurred while sending the test notification.', 'error'); }); }, showTestNotificationToast(message, type) { this.testNotificationToastMessage = message; this.testNotificationToastType = type; this.isTestNotificationToastOpen = true; setTimeout(() => this.isTestNotificationToastOpen = false, 5000); }, --}}