Skip to content

Use httpResource#176

Draft
lukynmatuska wants to merge 2 commits intomasterfrom
174-use-httpresource
Draft

Use httpResource#176
lukynmatuska wants to merge 2 commits intomasterfrom
174-use-httpresource

Conversation

@lukynmatuska
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings February 20, 2026 18:53
@lukynmatuska lukynmatuska linked an issue Feb 20, 2026 that may be closed by this pull request
@netlify
Copy link

netlify bot commented Feb 20, 2026

Deploy Preview for cutetix-admin ready!

Name Link
🔨 Latest commit e4641a8
🔍 Latest deploy log https://app.netlify.com/projects/cutetix-admin/deploys/6998b79900722e000811c415
😎 Deploy Preview https://deploy-preview-176--cutetix-admin.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 httpResource for tickets and ticket groups
  • Removed ngOnInit lifecycle 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.

FontAwesomeModule,
BrowserAnimationsModule,
ToastrModule.forRoot(),
FormsModule,
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove it.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@lukynmatuska lukynmatuska marked this pull request as draft March 9, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use httpResource

2 participants