Conversation
Signed-off-by: Sameh16 <sameh_mohamed16@hotmail.com>
…ation Signed-off-by: Sameh16 <sameh_mohamed16@hotmail.com>
…nsights project components Signed-off-by: Sameh16 <sameh_mohamed16@hotmail.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the Insights Projects admin UI to use TanStack Vue Query for data fetching and caching, replacing manual load more and loading states with useInfiniteQuery/useMutation.
- Refactored service methods to return typed promises and support query functions.
- Migrated page and add-project component to use Vue Query hooks for listing, creating, updating, and deleting.
- Introduced
InsightsProjectRequestinterface and updated helper for strong typing.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/modules/admin/modules/insights-projects/services/insights-projects.service.ts | Refactored HTTP methods into typed instance methods for Vue Query usage. |
| frontend/src/modules/admin/modules/insights-projects/pages/insights-projects.page.vue | Replaced manual fetch/loading with useInfiniteQuery, updated bindings. |
| frontend/src/modules/admin/modules/insights-projects/models/insights-project.model.ts | Added InsightsProjectRequest to define request payload shape. |
| frontend/src/modules/admin/modules/insights-projects/insight-project-helper.ts | Added explicit return type to buildRequest. |
| frontend/src/modules/admin/modules/insights-projects/components/lf-insights-project-add.vue | Replaced manual service calls with useQuery and useMutation. |
| frontend/src/modules/admin/modules/collections/pages/collection.page.vue | Fixed total rows fallback to use `total |
Comments suppressed due to low confidence (2)
frontend/src/modules/admin/modules/insights-projects/pages/insights-projects.page.vue:12
- The search input was unbound after removing
@update:model-value. Addv-model:model-value="search"(or the equivalent prop/event bindings) so thesearchref updates and debounced queries run.
@update:model-value="searchProjects()"
frontend/src/modules/admin/modules/insights-projects/services/insights-projects.service.ts:42
- [nitpick] The
deletemethod name shadows the built-in delete operator and may confuse readers; consider renaming it todeleteProjectorremovefor clarity.
delete(id: string) {
gaspergrom
approved these changes
May 19, 2025
mbani01
pushed a commit
that referenced
this pull request
May 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed ✍️
What
copilot:summary
copilot:poem
Why
How
copilot:walkthrough
Checklist ✅
Feature,Improvement, orBug.