Commit 81cdfd87 authored by Mahmoud Aglan's avatar Mahmoud Aglan

fix: use select=* for profiles query and remove broken moduleJS refs

- getTargetPlayers now uses select=* (matches working players module)
- Removed moduleJS for compose/individual views (JS is inline)
- These views were referencing non-existent JS file paths causing 404s
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent fda3d634
......@@ -63,8 +63,7 @@ class NotificationsController
$pageTitle = 'إرسال إشعار';
$moduleCSS = 'notifications';
$moduleJS = 'notifications-compose';
View::render('notifications/compose', compact('templates', 'stats', 'pageTitle', 'moduleCSS', 'moduleJS'));
View::render('notifications/compose', compact('templates', 'stats', 'pageTitle', 'moduleCSS'));
}
public function previewCount(array $params, string $method): void
......@@ -177,8 +176,7 @@ class NotificationsController
$templates = $this->db->select('push_templates', ['is_active' => 'eq.true', 'order' => 'name.asc']);
$pageTitle = 'إرسال لفرد';
$moduleCSS = 'notifications';
$moduleJS = 'notifications-individual';
View::render('notifications/individual', compact('templates', 'pageTitle', 'moduleCSS', 'moduleJS'));
View::render('notifications/individual', compact('templates', 'pageTitle', 'moduleCSS'));
}
public function searchPlayers(array $params, string $method): void
......@@ -440,8 +438,8 @@ class NotificationsController
private function getTargetPlayers(string $targetType, array $filters): array
{
$queryParams = [
'select' => 'id,display_name',
'order' => 'last_seen.desc.nullslast',
'select' => '*',
'order' => 'created_at.desc',
];
if ($targetType !== 'broadcast') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment