Skip to content

feat: project type filter in resource view #889

Open
wreckage0907 wants to merge 3 commits intodevelopfrom
feat/project-type-filter
Open

feat: project type filter in resource view #889
wreckage0907 wants to merge 3 commits intodevelopfrom
feat/project-type-filter

Conversation

@wreckage0907
Copy link
Copy Markdown
Contributor

Description

resource management filtering capabilities by adding support for filtering by project type across the team and timeline contexts

Relevant Technical Choices

  • Added projectType as a filter option in ResourceTeamFilters, OptionalResourceTeamFilters, and ResourceAllocationTimeLineFilterProps, enabling users to filter resources and allocations by project type.
  • Updated the ResourceTeamHeaderSection component to read and apply the project-type query parameter, ensuring the UI supports project type filtering. )
  • Updated the header logic to use lodash's omit for cleaner filter extraction, and ensured that project type and other filters are correctly handled when saving or updating views. (ESLINT REACT FLAGGED THE ISSUE SO FIXED)
  • formatting changes done by pre-commit

Testing Instructions

Additional Information:

Screenshot/Screencast

Screen.Recording.2026-03-12.at.4.37.07.PM.mov

Checklist

  • I have carefully reviewed the code before submitting it for review.
  • This code is adequately covered by unit tests to validate its functionality.
  • I have conducted thorough testing to ensure it functions as intended.
  • A member of the QA team has reviewed and tested this PR (To be checked by QA or code reviewer)

Fixes #2692

@niraj2477
Copy link
Copy Markdown
Collaborator

@wreckage0907 resolve conflicts

Copy link
Copy Markdown
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

Adds project type as a first-class filter in Resource Management Team and Timeline views, wiring it through the frontend filter state/query params and into the backend allocation queries.

Changes:

  • Backend: accept project_type on get_resource_management_team_view_data and apply it while fetching resource allocations.
  • Frontend: add projectType to filter models/state, add a “Project Type” header filter, and include project_type in API request bodies.
  • Types/state: extend shared TS types and context defaults to carry projectType.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
next_pms/resource_management/api/utils/query.py Adds project-type-based filtering for allocation queries (via resolving Project names and applying a project condition).
next_pms/resource_management/api/team.py Plumbs project_type into team-view allocation retrieval.
frontend/packages/app/src/types/resource_management.ts Extends allocation type to optionally include project_type.
frontend/packages/app/src/app/pages/resource-management/timeline/utils.ts Includes projectType in Timeline view filter serialization.
frontend/packages/app/src/app/pages/resource-management/timeline/types.ts Adds projectType to timeline filter props and project_type to the API body type.
frontend/packages/app/src/app/pages/resource-management/timeline/components/header/resourceTimLineHeaderSection.tsx Adds “Project Type” filter UI + query param handling in Timeline header.
frontend/packages/app/src/app/pages/resource-management/timeline/ resourceTimeLine.tsx Sends project_type in Timeline API calls and keeps allocations refreshed under the new filter.
frontend/packages/app/src/app/pages/resource-management/team/utils.ts Includes projectType in Team view filter serialization.
frontend/packages/app/src/app/pages/resource-management/team/index.tsx Sends project_type in Team API calls (including refresh-after-edit flow).
frontend/packages/app/src/app/pages/resource-management/team/components/table/resourceTeamTableBody.tsx Formatting-only changes in table body component.
frontend/packages/app/src/app/pages/resource-management/team/components/header.tsx Adds “Project Type” filter UI + includes it in saved view filters logic.
frontend/packages/app/src/app/pages/resource-management/store/types.ts Adds projectType to Team filter types.
frontend/packages/app/src/app/pages/resource-management/store/timeLineContext.tsx Initializes Timeline context filters with projectType and updates formatting.
frontend/packages/app/src/app/pages/resource-management/store/teamContext.tsx Initializes Team default filters with projectType and minor refactor/formatting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@wreckage0907
Copy link
Copy Markdown
Contributor Author

@wreckage0907 resolve conflicts

@Siddhantsingh1230 @niraj2477 done

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.

3 participants