Skip to content

Stage#8882

Merged
evereq merged 4 commits intostagefrom
develop
Mar 22, 2025
Merged

Stage#8882
evereq merged 4 commits intostagefrom
develop

Conversation

@evereq
Copy link
Copy Markdown
Member

@evereq evereq commented Mar 22, 2025

PR

Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.


mbabhaziSamuel and others added 4 commits March 20, 2025 08:24
* fix: UI Issue in Option Translations Modal

* feedback integration
…lates) (#8880)

* fix(accounting-template): resolve duplicate templates and incorrect language filtering

* Remove console log

* feedback integration

* Remove duplicated comment
* fix:Inventory Filters

* fix: remove filter by name

* feedback Integration
…o Assign Managers/Members in Project Creation (#8836)

* feat: allows employees to select others

* chore: add translations for SELECT_EMPLOYEE permission

* Fix: retrieved employees

* Integration of feedback

* Fix: remove CHANGE_SELECTED_EMPLOYEE permission

* Fix: Ensure both CHANGE_SELECTED_EMPLOYEE and SELECT_EMPLOYEE permissions are applied

---------

Co-authored-by: mbabhaziSamuel <mbabhazisamuel@gmail.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 22, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@evereq evereq merged commit 9322594 into stage Mar 22, 2025
18 of 21 checks passed
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR introduces significant changes to employee permissions and product filtering functionality across the Ever Gauzy platform, with extensive internationalization updates.

Key changes:

  • Added new SELECT_EMPLOYEE permission alongside CHANGE_SELECTED_EMPLOYEE in core services and controllers
  • Implemented product category and type filtering components with conditional label rendering
  • Added translations for SELECT_EMPLOYEE across 15+ language files
  • Enhanced AccountingTemplateService with new findOneByIdString method and language filtering
  • Modified employee filtering logic in EmployeeService to support both employee selection permissions

The changes appear well-structured but there are some potential issues:

  • Empty ngOnChanges hooks in new filter components need implementation or removal
  • TableFiltersModule has empty exports array, preventing component access
  • Some permission checks could be more robust for null/undefined cases

💡 (3/5) Reply to the bot's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!

33 file(s) reviewed, 11 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +299 to +320
async findOneByIdString(id: string): Promise<AccountingTemplate> {
const tenantId = RequestContext.currentTenantId();

const query = this.typeOrmRepository.createQueryBuilder('template');

query.where((qb: SelectQueryBuilder<AccountingTemplate>) => {
qb.andWhere(
new Brackets((bck: WhereExpressionBuilder) => {
bck.andWhere(p(`"${qb.alias}"."id" = :id`), { id });
bck.andWhere(p(`"${qb.alias}"."tenantId" = :tenantId`), { tenantId });
})
);

qb.orWhere(
new Brackets((bck: WhereExpressionBuilder) => {
bck.andWhere(p(`"${qb.alias}"."id" = :id`), { id });
bck.andWhere(p(`"${qb.alias}"."tenantId" IS NULL`));
})
);
});

return await query.getOne();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

logic: Missing organization scope check in findOneByIdString - should match getAccountTemplate's fallback pattern

<label class="label">
{{ 'INVENTORY_PAGE.PRODUCT_CATEGORY' | translate }}
<label class="label" *ngIf="label !== ''">
{{ label || 'INVENTORY_PAGE.PRODUCT_CATEGORY' | translate }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

logic: Using || operator here could cause issues if label is false or 0, should use nullish coalescing (??) instead

<span class="language-label">{{ ln.value }}</span>
<input
fullWidth
id="groupNameInput_{{ln.value}}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

logic: ID 'groupNameInput_{{ln.value}}' is duplicated from line 27 - should be unique for options, e.g. 'optionNameInput_{{ln.value}}'

Suggested change
id="groupNameInput_{{ln.value}}"
id="optionNameInput_{{ln.value}}"

Comment on lines +85 to +90
padding-left: 3.5rem;


&[nbInput] {
padding-left: 0.5rem;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

style: Inconsistent padding-left between default input (3.5rem) and nbInput (0.5rem) could cause alignment issues. Consider standardizing the padding values.

Comment on lines +150 to +153
border: none !important;
border-radius: 0 !important;
box-shadow: none !important;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

style: Multiple !important declarations should be avoided. Consider restructuring the CSS specificity instead of forcing overrides.

Comment on lines +2 to +3
<label class="label" *ngIf="label !== ''">
{{ label || 'INVENTORY_PAGE.PRODUCT_TYPE' | translate }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

logic: Empty string check will not catch undefined/null values for label property. Consider using a more robust check like label?.trim() to handle all falsy cases.

Comment on lines +12 to +13
export * from './product-category-filter.component';
export * from './product-type-filter.component';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

style: Consider maintaining alphabetical order by moving these exports between lines 5-6 to group with other product-related filters

*
* @param changes
*/
ngOnChanges(changes: SimpleChanges) {}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

logic: Empty lifecycle hook implementation. Either implement the hook or remove it if not needed.

Suggested change
ngOnChanges(changes: SimpleChanges) {}

*
* @param changes
*/
ngOnChanges(changes: SimpleChanges) {}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

style: Empty ngOnChanges method implementation - should be removed if not being used

Suggested change
ngOnChanges(changes: SimpleChanges) {}

Comment on lines +21 to +24
/**
*
* @param changes
*/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

style: Empty JSDoc comments should either be removed or filled with meaningful documentation

Suggested change
/**
*
* @param changes
*/

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Mar 22, 2025

View your CI Pipeline Execution ↗ for commit 9b8a443.

Command Status Duration Result
nx build desktop --base-href ./ ✅ Succeeded 1m 48s View ↗
nx build desktop-api --output-path=dist/apps/de... ✅ Succeeded 28s View ↗
nx run api:desktop-api ✅ Succeeded 1m 23s View ↗
nx build gauzy -c=production --prod --verbose ✅ Succeeded 4m 1s View ↗
nx run gauzy:desktop-ui --base-href ./ ✅ Succeeded 3m 51s View ↗
nx build desktop-ui-lib --configuration=develop... ✅ Succeeded 31s View ↗
nx build plugin-integration-wakatime ✅ Succeeded <1s View ↗
nx build api -c=production --prod ✅ Succeeded 1m 14s View ↗
Additional runs (57) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-03-22 12:39:23 UTC

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