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 ...@@ -63,8 +63,7 @@ class NotificationsController
$pageTitle = 'إرسال إشعار'; $pageTitle = 'إرسال إشعار';
$moduleCSS = 'notifications'; $moduleCSS = 'notifications';
$moduleJS = 'notifications-compose'; View::render('notifications/compose', compact('templates', 'stats', 'pageTitle', 'moduleCSS'));
View::render('notifications/compose', compact('templates', 'stats', 'pageTitle', 'moduleCSS', 'moduleJS'));
} }
public function previewCount(array $params, string $method): void public function previewCount(array $params, string $method): void
...@@ -177,8 +176,7 @@ class NotificationsController ...@@ -177,8 +176,7 @@ class NotificationsController
$templates = $this->db->select('push_templates', ['is_active' => 'eq.true', 'order' => 'name.asc']); $templates = $this->db->select('push_templates', ['is_active' => 'eq.true', 'order' => 'name.asc']);
$pageTitle = 'إرسال لفرد'; $pageTitle = 'إرسال لفرد';
$moduleCSS = 'notifications'; $moduleCSS = 'notifications';
$moduleJS = 'notifications-individual'; View::render('notifications/individual', compact('templates', 'pageTitle', 'moduleCSS'));
View::render('notifications/individual', compact('templates', 'pageTitle', 'moduleCSS', 'moduleJS'));
} }
public function searchPlayers(array $params, string $method): void public function searchPlayers(array $params, string $method): void
...@@ -440,8 +438,8 @@ class NotificationsController ...@@ -440,8 +438,8 @@ class NotificationsController
private function getTargetPlayers(string $targetType, array $filters): array private function getTargetPlayers(string $targetType, array $filters): array
{ {
$queryParams = [ $queryParams = [
'select' => 'id,display_name', 'select' => '*',
'order' => 'last_seen.desc.nullslast', 'order' => 'created_at.desc',
]; ];
if ($targetType !== 'broadcast') { 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