feat(frontend-filter): optimize location filter with search caching, debounce, and RxJS refactor#284
feat(frontend-filter): optimize location filter with search caching, debounce, and RxJS refactor#284siervo-jallaine merged 9 commits intodevelopfrom
Conversation
…debounce, and RxJS refactor
|
|
||
| return ResponseEntity.ok(paginatedResponse); | ||
| } | ||
| private final CopyOnWriteArrayList<SseEmitter> emitters = new CopyOnWriteArrayList<>(); |
There was a problem hiding this comment.
📏 Style Violation: Line exceeds 80 characters
(Current: 89). Please break this line.
| User authenticatedUser = (User) authentication.getPrincipal(); | ||
| int userId = authenticatedUser.getUserId(); | ||
|
|
||
| Map<String, Object> paginatedResponse = service.listByUserId(userId, page, size, status); |
There was a problem hiding this comment.
📏 Style Violation: Line exceeds 80 characters
(Current: 93). Please break this line.
| List<Notification> findByUserId(@Param("userId") int userId, | ||
| Pageable pageable); | ||
|
|
||
| @Query("SELECT n FROM Notification n WHERE n.user_id = :userId AND n.status = :status " + |
There was a problem hiding this comment.
📏 Style Violation: Line exceeds 80 characters
(Current: 91). Please break this line.
| @Query("SELECT COUNT(n) FROM Notification n WHERE n.user_id = :userId") | ||
| int countByUserId(@Param("userId") int userId); | ||
|
|
||
| @Query("SELECT COUNT(n) FROM Notification n WHERE n.user_id = :userId AND n.status = :status") |
There was a problem hiding this comment.
📏 Style Violation: Line exceeds 80 characters
(Current: 96). Please break this line.
| int countByUserId(@Param("userId") int userId); | ||
|
|
||
| @Query("SELECT COUNT(n) FROM Notification n WHERE n.user_id = :userId AND n.status = :status") | ||
| int countByUserIdAndStatus(@Param("userId") int userId, @Param("status") String status); |
There was a problem hiding this comment.
📏 Style Violation: Line exceeds 80 characters
(Current: 90). Please break this line.
| List<Notification> notifications; | ||
| int totalItems; | ||
|
|
||
| if (status != null && !status.isEmpty() && !status.equalsIgnoreCase("all")) { |
There was a problem hiding this comment.
📏 Style Violation: Line exceeds 80 characters
(Current: 81). Please break this line.
| return locations | ||
| .filter(option => option.toLowerCase().includes(filterValue)) | ||
| .slice(0, 5); | ||
| switchMap(([value, locations]: [string | null, string[]]): Observable<string[]> => { |
There was a problem hiding this comment.
📏 Style Violation: Line exceeds 80 characters
(Current: 92). Please break this line.
| import { adminGuard } from './core/auth/admin-guard'; | ||
|
|
||
| import { HeaderNFooterOnly | ||
| import { HeaderNFooterOnly |
There was a problem hiding this comment.
🤖 AI Review: This line appears to be incomplete. Please ensure all import statements are fully written.
import { HeaderNFooterOnly| return this.http.put(`${this.API_BASE_URL}/notifications/${id}/read`, {}); | ||
| } | ||
|
|
||
| markAllAsRead(): Observable<any> { |
There was a problem hiding this comment.
🤖 AI Review: Strict Typing: Avoid using the 'any' type. Please specify a more precise return type for this Observable.
markAllAsRead(): Observable<any> {| class="filter-link">All</span> | ||
| • | ||
| <span (click)="setFilter('unread')" | ||
| [class.active]="currentFilter === 'unread'" |
There was a problem hiding this comment.
🤖 AI Review: This line appears to be incomplete or syntactically incorrect. Please ensure the Angular binding expression is complete and valid.
[class.active]="currentFilter === 'unread'
No description provided.