-
Notifications
You must be signed in to change notification settings - Fork 581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix]: Favorite Entity type use global Entity Enum #8408
Conversation
WalkthroughThe pull request introduces several modifications across multiple files to replace the previously used Changes
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (16)
packages/core/src/core/decorators/is-favoritable.ts (1)
1-7
: Summary: Good refactoring, but verify broader impact.The changes in this file are part of a larger effort to replace
FavoriteEntityEnum
with a more generalEntityEnum
. While the modifications here are straightforward and consistent, they may have implications for other parts of the codebase.Consider the following:
- Ensure all imports of
FavoriteEntityEnum
across the project have been updated toEntityEnum
.- Verify that all usages of
FavoriteService
decorator are updated to use validEntityEnum
values.- Update any documentation or comments that may reference
FavoriteEntityEnum
.- If there are unit tests for this decorator or related functionality, make sure they are updated and still pass with these changes.
packages/core/src/tasks/views/view.service.ts (1)
Line range hint
1-22
: Overall impact: Verify related components and update documentation.The changes in this file are part of a larger refactoring effort to consolidate entity enums. While the syntactic changes are correct, the semantic change from
OrganizationTeam
toTaskView
for theTaskViewService
could have broader implications:
- Ensure that all components or services interacting with
TaskViewService
are updated to expectTaskView
related functionality instead ofOrganizationTeam
.- Update any relevant documentation or comments that describe the purpose and behavior of
TaskViewService
.- Verify that this change doesn't introduce any inconsistencies in the application's domain model or business logic.
Consider running integration tests and reviewing the overall architecture to ensure this change aligns with the intended system design.
packages/core/src/favorite/global-favorite-service.service.ts (1)
Line range hint
1-62
: Summary: Consistent replacement ofFavoriteEntityEnum
withEntityEnum
.The changes in this file are part of a larger refactoring effort to use a more general
EntityEnum
instead of a specificFavoriteEntityEnum
. This update affects theserviceMap
,extractTypeFromProvider
,getService
, andcallMethod
methods. The changes are consistent and well-implemented within this file.However, it's important to note that this refactoring might have implications for other parts of the codebase that are not visible in this file. Please ensure that:
- All usages of
FavoriteEntityEnum
across the project have been updated toEntityEnum
.- Any code that depends on the specific values of
FavoriteEntityEnum
has been adjusted to work with the potentially broader set of values inEntityEnum
.- Documentation and comments related to these types have been updated accordingly.
Consider adding a brief comment in this file explaining the rationale behind the switch from
FavoriteEntityEnum
toEntityEnum
, as it might not be immediately clear to other developers why this change was made.packages/contracts/src/base-entity.model.ts (1)
Line range hint
1-90
: Summary:EntityEnum
expanded with new entity typesThe changes in this file are focused on expanding the
EntityEnum
with four new entity types:Currency
,Language
,OrganizationVendor
, andTaskView
. These additions align with the PR's objective of using a global Entity Enum and potentially enable new functionalities in the system.While the changes themselves look good, it's important to ensure that:
- These new enum values are used consistently throughout the codebase where needed.
- Any existing code that relies on
EntityEnum
is updated to handle these new types if necessary.- Documentation is updated to reflect these new entity types, if applicable.
Consider reviewing the system's architecture to ensure that it can accommodate these new entity types smoothly, particularly in areas like data persistence, API endpoints, and any business logic that operates on entities.
packages/core/src/organization-sprint/organization-sprint.service.ts (3)
Line range hint
55-72
: LGTM: Improved role handling in create method.The changes in the
create
method enhance the handling of employee roles and member assignments. The new check for the current employee's role before adding them as a manager is a good improvement.Consider improving the error handling in the role check:
try { // Check if the current role is EMPLOYEE await this._roleService.findOneByIdString(currentRoleId, { where: { name: RolesEnum.EMPLOYEE } }); // Add the current employee to the managerIds if they have the EMPLOYEE role and are not already included. if (!managerIds.includes(employeeId)) { // If not included, add the employeeId to the managerIds array. managerIds.push(employeeId); } -} catch (error) {} +} catch (error) { + // Log the error or handle it appropriately + console.error('Error checking employee role:', error); +}
Line range hint
134-206
: LGTM: Improved member handling and activity logging in update method.The changes in the
update
method enhance the handling of sprint member updates and provide more comprehensive activity logging. The separation of logic for removing, updating, and adding members is clearer and more maintainable.Consider improving the error handling by providing more specific error messages:
} catch (error) { // Handle errors and return an appropriate error response - throw new HttpException(`Failed to update organization sprint: ${error.message}`, HttpStatus.BAD_REQUEST); + throw new HttpException(`Failed to update organization sprint: ${error.message}. Details: ${JSON.stringify(error)}`, HttpStatus.BAD_REQUEST); }
Line range hint
234-308
: LGTM: Improved member management in updateOrganizationSprintMembers method.The changes in the
updateOrganizationSprintMembers
method significantly enhance the efficiency and clarity of member management. The use of Set and Map for member lookup is a good optimization, and the separation of logic for different operations (remove, update, add) improves maintainability.Consider adding error handling to catch and log any errors that might occur during the member update process:
// 3. Add new members to the sprint if (newMembers.length) { const newSprintMembers = newMembers.map( (employee) => new OrganizationSprintEmployee({ organizationSprintId, employeeId: employee.id, tenantId, organizationId, isManager: managerIds.includes(employee.id), roleId: managerIds.includes(employee.id) ? managerRole.id : null }) ); - await this.typeOrmOrganizationSprintEmployeeRepository.save(newSprintMembers); + try { + await this.typeOrmOrganizationSprintEmployeeRepository.save(newSprintMembers); + } catch (error) { + console.error('Error adding new sprint members:', error); + throw new HttpException('Failed to add new sprint members', HttpStatus.INTERNAL_SERVER_ERROR); + } }packages/core/src/organization-project/organization-project.service.ts (9)
Line range hint
70-72
: Avoid empty catch blocks to prevent swallowing exceptionsAn empty
catch
block suppresses errors and can make debugging difficult. If the error can be safely ignored, consider adding a comment explaining why. Otherwise, handle the error appropriately by logging or rethrowing the error.Apply this diff to log the error:
} catch (error) {} + Logger.error('Error verifying employee role', error); }
Ensure that
Logger
is imported from@nestjs/common
:+ import { Logger } from '@nestjs/common';
Line range hint
102-104
: Avoid exposing internal error details in HTTP exceptionsIncluding
error.message
in the HTTP response can unintentionally expose sensitive information. Consider returning a generic error message to the client and logging the detailed error internally.[security]
Apply this diff to modify the error message:
- throw new HttpException(`Failed to create organization project: ${error.message}`, HttpStatus.BAD_REQUEST); + throw new HttpException('Failed to create organization project', HttpStatus.BAD_REQUEST); + Logger.error('Failed to create organization project', error);Ensure that
Logger
is imported from@nestjs/common
if not already imported.
Line range hint
155-157
: Consistent error handling without exposing sensitive informationSimilar to the
create
method, avoid includingerror.message
in the HTTP response in theupdate
method to prevent potential information leakage.[security]
Apply this diff:
- throw new HttpException(`Failed to update organization project: ${error.message}`, HttpStatus.BAD_REQUEST); + throw new HttpException('Failed to update organization project', HttpStatus.BAD_REQUEST); + Logger.error('Failed to update organization project', error);
Line range hint
393-393
: Use NestJSLogger
instead ofconsole.log
for error loggingUsing
console.log
is not recommended for logging errors in production applications. Replace it withLogger.error
for better log management and consistency.Apply this diff to update the logging:
- console.log('Error while updating project by employee:', error); + Logger.error('Error while updating project by employee', error);Ensure that
Logger
is imported from@nestjs/common
:+ import { Logger } from '@nestjs/common';
Line range hint
225-269
: Consider wrapping database operations in a transactionThe
updateOrganizationProjectMembers
method performs multiple database operations (removing, updating, and adding members). To ensure data consistency and atomicity, especially in case of errors during any of these operations, consider using a transaction.Example implementation:
await this.typeOrmRepository.manager.transaction(async (manager) => { // Use the transaction manager for database operations // 1. Remove members // 2. Update existing members // 3. Add new members });
Line range hint
99-101
: Avoid usingsuper.create
in theupdate
methodUsing
super.create
in theupdate
method might lead to unintended behavior, as it may attempt to create a new record instead of updating an existing one. Consider usingsuper.update
or the repository'ssave
method to ensure proper updating of the record.Apply this diff to use
super.update
:- return await super.create({ + return await super.update(organizationProjectId, { ...input, organizationId, tenantId, - id: organizationProjectId });
Line range hint
84-85
: Handle case when manager role is not foundIn the
create
method, if the manager role is not found,managerRole
could beundefined
, which may lead to errors when assigning roles to members. Ensure thatmanagerRole
exists before proceeding, or handle the scenario where it might beundefined
.Add a check after finding the manager role:
if (!managerRole) { throw new Error('Manager role not found'); }
Line range hint
312-314
: Optimize query by removing unnecessary joinsIn the
findByEmployee
method, the left join withproject_team
might not be necessary unless filtering byorganizationTeamId
. Consider adding this join conditionally to optimize the query performance.Apply this diff:
query.innerJoin(`${query.alias}.members`, 'project_members') - .leftJoin(`${query.alias}.teams`, 'project_team'); + if (isNotEmpty(organizationTeamId)) { + query.leftJoin(`${query.alias}.teams`, 'project_team'); + }
Line range hint
387-388
: Consistent usage ofemployeeId
vsmember.id
In the
updateByEmployee
method, ensure consistent usage ofmember.employeeId
andmember.id
to prevent potential mismatches or errors.Verify and update the property accesses for consistency:
await this.typeOrmOrganizationProjectEmployeeRepository.delete({ organizationProjectId: In(removedProjectIds), - employeeId: member.employeeId + employeeId: member.id });
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (10)
- packages/contracts/src/base-entity.model.ts (2 hunks)
- packages/contracts/src/favorite.model.ts (1 hunks)
- packages/core/src/core/decorators/is-favoritable.ts (1 hunks)
- packages/core/src/favorite/favorite.entity.ts (2 hunks)
- packages/core/src/favorite/favorite.service.ts (2 hunks)
- packages/core/src/favorite/global-favorite-service.service.ts (2 hunks)
- packages/core/src/organization-project/organization-project.service.ts (1 hunks)
- packages/core/src/organization-sprint/organization-sprint.service.ts (1 hunks)
- packages/core/src/organization-team/organization-team.service.ts (2 hunks)
- packages/core/src/tasks/views/view.service.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/core/src/organization-team/organization-team.service.ts
🧰 Additional context used
🔇 Additional comments (19)
packages/core/src/core/decorators/is-favoritable.ts (2)
1-1
: LGTM! Verify the impact of this change across the codebase.The change from
FavoriteEntityEnum
toEntityEnum
aligns with the PR objectives. This appears to be part of a broader refactoring to use a more general enumeration.To ensure this change doesn't introduce any issues, please run the following script to check for any remaining usages of
FavoriteEntityEnum
:✅ Verification successful
Update the Shell Script with the Correct Type Identifier
The previous
rg
command did not recognize thetypescript
file type. Please usets
to correctly identify TypeScript files.
Verified: No remaining usages of
FavoriteEntityEnum
found.The change from
FavoriteEntityEnum
toEntityEnum
has been successfully applied across the codebase with no remaining references toFavoriteEntityEnum
.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining usages of FavoriteEntityEnum # Test: Search for FavoriteEntityEnum in all TypeScript files rg --type typescript 'FavoriteEntityEnum'Length of output: 76
Script:
# #!/bin/bash # Description: Check for any remaining usages of FavoriteEntityEnum # Test: Search for FavoriteEntityEnum in all TypeScript files using the correct file type rg --type ts 'FavoriteEntityEnum'Length of output: 33
7-7
: LGTM! Ensure all usages of FavoriteService are updated.The change in the
FavoriteService
function signature is consistent with the import modification. This allows the decorator to work with a broader range of entity types.To ensure all usages of
FavoriteService
have been updated to use the newEntityEnum
, please run the following script:Please review the results to confirm that all
FavoriteService
calls use validEntityEnum
values.✅ Verification successful
Verified! All usages of
FavoriteService
have been updated to useEntityEnum
.The
FavoriteService
decorator now consistently usesEntityEnum
across all instances, ensuring broader compatibility without impacting functionality.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for usages of FavoriteService and verify they use EntityEnum # Test: Search for FavoriteService usages rg --type typescript 'FavoriteService\(' -A 3Length of output: 82
Script:
#!/bin/bash # Description: Check for usages of FavoriteService and verify they use EntityEnum # Test: Search for FavoriteService usages in TypeScript files rg --glob '*.ts' 'FavoriteService\(' -A 3Length of output: 1695
packages/contracts/src/favorite.model.ts (3)
1-1
: LGTM: Import statement updated correctlyThe import statement has been properly updated to include
EntityEnum
from the base entity model. This change aligns with the PR objective of using a global Entity Enum.
Line range hint
1-11
: Consider updating related documentation and verifying codebase compatibilityThe removal of
FavoriteEntityEnum
and the shift to using the globalEntityEnum
is a significant change. While the modifications in this file look good, consider the following actions:
- Update any documentation that references
FavoriteEntityEnum
to reflect the new usage ofEntityEnum
.- Verify that all other files using
IFavorite
or previously usingFavoriteEntityEnum
have been updated accordingly.- Ensure that the new
EntityEnum
includes all the necessary entity types that were previously inFavoriteEntityEnum
.To help with this verification, you can run the following script:
#!/bin/bash # Description: Find files that might need updates due to FavoriteEntityEnum removal # Test: Search for files importing or using FavoriteEntityEnum rg --type typescript "import.*FavoriteEntityEnum|FavoriteEntityEnum\." # Test: List all values in the new EntityEnum ast-grep --lang typescript --pattern 'enum EntityEnum { $$$ }' packages/contracts/src/base-entity.model.tsThis will help identify areas that might need attention due to this architectural change.
5-5
: LGTM: Entity type updated, verify impact on codebaseThe
entity
property type has been correctly updated to use the globalEntityEnum
. This change is consistent with the PR objective and maintains type safety while potentially expanding the range of entities that can be marked as favorites.To ensure this change doesn't introduce any unintended consequences, please run the following script to check for any usage of the old
FavoriteEntityEnum
in the codebase:This will help identify any areas that might need updates due to this change.
packages/core/src/tasks/views/view.service.ts (2)
3-3
: LGTM: Import statement updated correctly.The change from
FavoriteEntityEnum
toEntityEnum
suggests a consolidation of entity enums. This is likely part of a larger refactoring effort to improve code organization and reduce duplication.
10-10
: Verify the entity type change in the FavoriteService decorator.The decorator has been updated correctly to use the new
EntityEnum
. However, the entity type has changed fromOrganizationTeam
toTaskView
. Please confirm that this semantic change is intentional and aligns with the expected behavior of theTaskViewService
.To ensure this change is consistent across the codebase, please run the following script:
✅ Verification successful
Entity type change in
FavoriteService
decorator verified.All instances have been updated to use
EntityEnum.TaskView
, and there are no remaining usages ofFavoriteEntityEnum.OrganizationTeam
.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining usages of FavoriteEntityEnum.OrganizationTeam # and verify that TaskViewService is consistently using EntityEnum.TaskView # Search for any remaining usages of FavoriteEntityEnum.OrganizationTeam echo "Searching for remaining usages of FavoriteEntityEnum.OrganizationTeam:" rg "FavoriteEntityEnum\.OrganizationTeam" --type ts # Check for consistent usage of EntityEnum.TaskView with TaskViewService echo "Checking for consistent usage of EntityEnum.TaskView with TaskViewService:" rg "class TaskViewService" -A 5 --type tsLength of output: 913
packages/core/src/favorite/favorite.entity.ts (3)
5-5
: LGTM: Import statement updated correctlyThe import statement has been correctly updated to include
EntityEnum
instead ofFavoriteEntityEnum
. This change aligns with the broader scope of entity types mentioned in the AI-generated summary.
15-20
: LGTM: Entity property and decorators updated correctlyThe
entity
property and its associated decorators have been properly updated to useEntityEnum
:
- The
@ApiProperty
decorator now correctly referencesEntityEnum
.- The
@IsEnum
decorator has been updated to validate againstEntityEnum
.- The type of the
entity
property has been changed toEntityEnum
.These changes ensure type safety, maintain proper API documentation, and are consistent with the broader changes described in the AI-generated summary.
Line range hint
5-20
: Verify consistency of EntityEnum usage across the codebaseThe changes in this file align well with the AI-generated summary, which mentions replacing
FavoriteEntityEnum
with a newly expandedEntityEnum
. To ensure consistency, it's important to verify that similar changes have been made in other relevant files across the codebase.Run the following script to check for any remaining usage of
FavoriteEntityEnum
and verify the consistent use ofEntityEnum
:packages/core/src/favorite/global-favorite-service.service.ts (4)
4-4
: LGTM: Import statement added forEntityEnum
.The addition of the import statement for
EntityEnum
from '@gauzy/contracts' is consistent with the changes made throughout the file. This import supports the transition fromFavoriteEntityEnum
toEntityEnum
.
47-47
: LGTM: Updated parameter types ingetService
andcallMethod
to useEntityEnum
.The changes from
FavoriteEntityEnum
toEntityEnum
in the parameter types ofgetService
andcallMethod
are consistent with the overall transition. The method implementations remain unchanged, which is appropriate given that only the type has changed.To ensure that all calls to these methods have been updated accordingly, please run the following script:
#!/bin/bash # Description: Verify the usage of getService and callMethod with EntityEnum # Test: Search for calls to getService and callMethod rg --type typescript "getService\(.*EntityEnum" -A 3 rg --type typescript "callMethod\(.*EntityEnum" -A 3Also applies to: 51-51
9-9
: LGTM: UpdatedserviceMap
type to useEntityEnum
.The change from
Map<FavoriteEntityEnum, any>
toMap<EntityEnum, any>
is consistent with the transition toEntityEnum
. This update maintains the structure of the map while using the new enum type.To ensure consistency across the codebase, please run the following script to verify the usage of
EntityEnum
:✅ Verification successful
Verified: Updated
serviceMap
type to useEntityEnum
successfully. No remaining instances ofFavoriteEntityEnum
found in the codebase.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of EntityEnum across the codebase # Test: Search for any remaining instances of FavoriteEntityEnum rg --type typescript "FavoriteEntityEnum" # Test: Confirm the usage of EntityEnum in relation to favorites rg --type typescript "EntityEnum.*favorite"Length of output: 333
Script:
#!/bin/bash # Description: Verify the usage of EntityEnum across the codebase # Test: Search for any remaining instances of FavoriteEntityEnum in .ts files rg --glob "*.ts" "FavoriteEntityEnum" # Test: Confirm the usage of EntityEnum in relation to favorites in .ts files rg --glob "*.ts" "EntityEnum.*favorite"Length of output: 79
42-42
: LGTM: Updated return type ofextractTypeFromProvider
toEntityEnum | null
.The change from
FavoriteEntityEnum | null
toEntityEnum | null
as the return type is consistent with the transition toEntityEnum
. The method's implementation remains unchanged, which suggests that theFAVORITABLE_TYPE
metadata now returns anEntityEnum
value.To ensure consistency, please verify that the
FAVORITABLE_TYPE
metadata is correctly updated to useEntityEnum
. Run the following script:✅ Verification successful
To proceed with verifying the
FAVORITABLE_TYPE
metadata, please run the following script:
To further verify the
FAVORITABLE_TYPE
metadata, please run the following script to locate all instances and understand its usage:
Verified:
extractTypeFromProvider
now correctly returnsEntityEnum | null
.The
FAVORITABLE_TYPE
metadata is properly associated withEntityEnum
inis-favoritable.ts
.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of FAVORITABLE_TYPE metadata with EntityEnum # Test: Search for the definition and usage of FAVORITABLE_TYPE rg --type typescript "FAVORITABLE_TYPE.*EntityEnum"Length of output: 333
Script:
# #!/bin/bash # Description: Verify the usage of FAVORITABLE_TYPE metadata with EntityEnum in TypeScript files # Test: Search for the definition and usage of FAVORITABLE_TYPE with EntityEnum rg -g '*.ts' "FAVORITABLE_TYPE.*EntityEnum"Length of output: 45
Script:
# #!/bin/bash # Description: Search for all occurrences of FAVORITABLE_TYPE in TypeScript files rg -g '*.ts' "FAVORITABLE_TYPE"Length of output: 666
packages/contracts/src/base-entity.model.ts (1)
71-71
: LGTM! New entity types added toEntityEnum
.The additions of
Currency
,Language
,OrganizationVendor
, andTaskView
toEntityEnum
look good. These new entity types expand the system's capabilities and align with the PR's objective of using a global Entity Enum.To ensure these changes are properly integrated, please verify their usage across the codebase:
Also applies to: 77-77, 86-86, 88-88
✅ Verification successful
Verified: New
EntityEnum
values are correctly added and integrated.
- Found usage of
EntityEnum.TaskView
inpackages/core/src/tasks/views/view.service.ts
.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for usage of new EntityEnum values # Test: Search for usage of new EntityEnum values echo "Searching for usage of new EntityEnum values:" rg --type typescript "EntityEnum\.(Currency|Language|OrganizationVendor|TaskView)" # Test: Check for any TODO comments related to these new enum values echo "Checking for related TODO comments:" rg --type typescript "TODO.*EntityEnum\.(Currency|Language|OrganizationVendor|TaskView)"Length of output: 427
Script:
#!/bin/bash # Description: Check for usage of new EntityEnum values in TypeScript files # Test: Search for usage of new EntityEnum values in .ts and .tsx files echo "Searching for usage of new EntityEnum values in .ts and .tsx files:" rg "EntityEnum\.(Currency|Language|OrganizationVendor|TaskView)" --glob "*.ts" --glob "*.tsx" # Test: Check for any TODO comments related to these new enum values in .ts and .tsx files echo "Checking for related TODO comments in .ts and .tsx files:" rg "TODO.*EntityEnum\.(Currency|Language|OrganizationVendor|TaskView)" --glob "*.ts" --glob "*.tsx"Length of output: 551
packages/core/src/favorite/favorite.service.ts (1)
3-3
: LGTM! Verify handling of all EntityEnum values.The change from
FavoriteEntityEnum
toEntityEnum
aligns with the PR objectives. This consolidation of entity enums improves consistency across the codebase.To ensure all
EntityEnum
values are handled correctly in thegetFavoriteDetails
method, please run the following script:This script will help identify if there are any
EntityEnum
values that might not be properly handled in thegetFavoriteDetails
method.packages/core/src/organization-sprint/organization-sprint.service.ts (2)
Line range hint
209-222
: LGTM: Efficient member deletion method added.The new
deleteMemberByIds
method is a good addition. It efficiently handles the deletion of multiple sprint members concurrently usingPromise.all
, which is a good practice for performance optimization.
34-34
: LGTM: Enum update looks good.The change from
FavoriteEntityEnum.OrganizationSprint
toEntityEnum.OrganizationSprint
in the@FavoriteService
decorator is correct and aligns with the PR objective of using a global Entity Enum.To ensure consistency across the codebase, please run the following script to verify that all occurrences of
FavoriteEntityEnum.OrganizationSprint
have been updated:packages/core/src/organization-project/organization-project.service.ts (1)
39-39
: Updated decorator to useEntityEnum.OrganizationProject
The change to use
EntityEnum.OrganizationProject
in the@FavoriteService
decorator is appropriate and aligns with the expanded enumeration.
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 35ffe19. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution
✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
PR
Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.
Summary by CodeRabbit
New Features
Currency
,Language
,OrganizationVendor
, andTaskView
, enhancing the range of entity types available.Bug Fixes
FavoriteEntityEnum
with the newEntityEnum
, ensuring consistent entity type usage across the application.Refactor