Conversation
✅ Deploy Preview for cutetix-admin ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR migrates the tickets and ticket_groups services from a manual HttpClient + RxJS Subject pattern to Angular's httpResource API for more declarative data fetching with built-in loading and error state management.
Changes:
- Replaced manual HTTP calls and Subject-based observables with
httpResourcefor tickets and ticket groups - Removed
ngOnInitlifecycle hooks where they only called resource reloads (httpResource auto-loads) - Added consistent error handling UI patterns across list and form components
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tickets.service.ts | Migrated to httpResource with tickets list resource and ticketByIdResource factory method |
| ticket_groups.service.ts | Migrated to httpResource with ticketGroups and activeSum resources, plus ticketGroupByIdResource factory |
| tickets-new.component.ts/html | Uses ticketGroups resource with loading/error states; added groups() and loadErrorText() helpers |
| tickets-list.component.ts/html | Uses tickets resource reactively; removed manual loading state management |
| ticket_groups-new.component.ts | Removed unnecessary ngOnInit; httpResource auto-loads |
| ticket_groups-list.component.ts/html | Uses ticketGroups resource reactively; added loadErrorText() helper |
| ticket_groups edit component | Uses signals and effects for reactive ID-based resource loading; added error handling |
| administration.module.ts | Added FormsModule import (appears unused) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/app/administration/ticket_groups/list/ticket_groups-list.component.ts
Show resolved
Hide resolved
| FontAwesomeModule, | ||
| BrowserAnimationsModule, | ||
| ToastrModule.forRoot(), | ||
| FormsModule, |
There was a problem hiding this comment.
FormsModule is imported but doesn't appear to be used in any of the administration module's components. All forms in this module use ReactiveFormsModule (formControlName, formGroup), not template-driven forms. Unless this is needed for a future change or another reason, this import can be removed to keep dependencies minimal.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.