Skip to content
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: restrict JE modules to group by expense only #1113

Merged

Conversation

JustARatherRidiculouslyLongUsername
Copy link
Contributor

@JustARatherRidiculouslyLongUsername JustARatherRidiculouslyLongUsername commented Dec 11, 2024

Clickup

https://app.clickup.com/t/86cxaatt3

Summary by CodeRabbit

  • New Features

    • Conditional logic added to disable select fields based on export type in the export settings interface.
    • Enhanced responsiveness of the form to user selections regarding expense grouping.
    • Updated article links for QuickBooks Desktop integration in the onboarding resources.
    • New preview sections added to the advanced settings interface for better user guidance.
  • Bug Fixes

    • Improved handling of form control values related to expense grouping when specific export types are selected.
    • Streamlined error handling for file path validation in onboarding processes.

Copy link
Contributor

coderabbitai bot commented Dec 11, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The pull request introduces changes to the business-central-export-settings component, specifically in the HTML template and TypeScript logic. Modifications include the addition of conditional logic to disable certain select fields based on the values of reimbursableExportType and cccExportType. A new method, updateExpenseGroupingValues, is added to update form control values when specific export types are selected. These changes enhance the form's responsiveness and ensure users cannot select inappropriate options based on their choices.

Changes

File Change Summary
src/app/integrations/business-central/business-central-shared/business-central-export-settings/business-central-export-settings.component.html Added conditional logic to disable select fields based on reimbursableExportType and cccExportType.
src/app/integrations/business-central/business-central-shared/business-central-export-settings/business-central-export-settings.component.ts Introduced updateExpenseGroupingValues method to update form control values based on export type.
.gitignore Added commits.csv to the list of ignored files.
deploy_dump.sh Modified to check for command-line argument and output usage message if none is provided.
src/app/branding/c1-branding-config.ts Updated c1KbArticles structure, removing LANDING and SKIP_EXPORT, adding HELPER_ARTICLE.
src/app/branding/c1-contents-config.ts Enhanced c1Contents with new properties and updates in xero, intacct, and configuration.
src/app/branding/fyle-branding-config.ts Updated URLs in fyleKbArticles and fyleDemoVideoLinks for QuickBooks Desktop integration.
src/app/branding/fyle-contents-config.ts Modified fyleContents to enhance content structure for various integrations.
src/app/core/models/branding/content-configuration.model.ts Added properties to ContentConfiguration for xero and intacct branding configurations.
src/app/core/models/branding/kb-article.model.ts Removed fields from onboardingArticles for several branding identifiers.
src/app/core/models/business-central/business-central-configuration/business-central-export-setting.model.ts Added properties for default credit card account in BusinessCentralExportSetting.
src/app/core/models/common/advanced-settings.model.ts Updated getMemoOptions method to handle IntacctConfiguration.
src/app/core/models/enum/enum.model.ts Removed REIMBURSABLE_BANK_ACCOUNT and updated ACCOUNT to BANK_ACCOUNT in BCExportSettingDestinationOptionKey.
src/app/integrations/business-central/business-central-shared/business-central.fixture.ts Added properties for default credit card account to exportSettingsResponse.
src/app/integrations/intacct/intacct-shared/intacct-advanced-settings/intacct-advanced-settings.component.ts Modified defaultMemoFields to use model methods for dynamic configuration.
src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-dashboard/qbd-direct-dashboard.component.ts Updated setupPage method to conditionally assign chartOfAccounts.
src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-mapping/qbd-direct-base-mapping/qbd-direct-base-mapping.component.ts Modified logic for chartOfAccounts assignment based on import_account_as_category.
src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-connector/qbd-direct-onboarding-connector.component.ts Restructured triggerDownload method for file path validation and loading state handling.
src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-advanced-settings/qbd-direct-advanced-settings.component.html Added new bindings and sections for preview descriptions in the HTML template.
src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-advanced-settings/qbd-direct-advanced-settings.component.ts Introduced properties for memo previews and a watcher for topMemoStructure.
src/app/integrations/xero/xero-shared/xero-advanced-settings/xero-advanced-settings.component.html Updated labels and sub-labels to use brandingContent values for dynamic content.
src/app/shared/components/configuration/configuration-select-field/configuration-select-field.component.html Refined conditional rendering and dropdown handling in the HTML template.

Possibly related PRs

Suggested reviewers

  • ashwin1111

🐇 In the fields where data flows,
A rabbit hops where logic grows.
With selects that toggle, and values that change,
Our forms now dance, it's quite the range!
So here’s to the code, both clever and bright,
In Business Central, everything feels right! 🌟


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9d91a9b and 56db591.

📒 Files selected for processing (22)
  • .gitignore (1 hunks)
  • deploy_dump.sh (1 hunks)
  • src/app/branding/c1-branding-config.ts (0 hunks)
  • src/app/branding/c1-contents-config.ts (1 hunks)
  • src/app/branding/fyle-branding-config.ts (2 hunks)
  • src/app/branding/fyle-contents-config.ts (1 hunks)
  • src/app/core/models/branding/content-configuration.model.ts (1 hunks)
  • src/app/core/models/branding/kb-article.model.ts (0 hunks)
  • src/app/core/models/business-central/business-central-configuration/business-central-export-setting.model.ts (3 hunks)
  • src/app/core/models/common/advanced-settings.model.ts (2 hunks)
  • src/app/core/models/enum/enum.model.ts (1 hunks)
  • src/app/integrations/business-central/business-central-shared/business-central-export-settings/business-central-export-settings.component.html (4 hunks)
  • src/app/integrations/business-central/business-central-shared/business-central-export-settings/business-central-export-settings.component.ts (7 hunks)
  • src/app/integrations/business-central/business-central-shared/business-central.fixture.ts (1 hunks)
  • src/app/integrations/intacct/intacct-shared/intacct-advanced-settings/intacct-advanced-settings.component.ts (2 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-dashboard/qbd-direct-dashboard.component.ts (2 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-mapping/qbd-direct-base-mapping/qbd-direct-base-mapping.component.ts (2 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-connector/qbd-direct-onboarding-connector.component.ts (1 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-advanced-settings/qbd-direct-advanced-settings.component.html (3 hunks)
  • src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-advanced-settings/qbd-direct-advanced-settings.component.ts (4 hunks)
  • src/app/integrations/xero/xero-shared/xero-advanced-settings/xero-advanced-settings.component.html (1 hunks)
  • src/app/shared/components/configuration/configuration-select-field/configuration-select-field.component.html (1 hunks)

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?

❤️ 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. (Experiment)
  • @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.

* fix: remove validation temporarily (#1111)

* fix: add a default bank account field for CCC expenses

* fix: add missing options to bank accounts on page init

* fix: dynamic content for xero customize settings (#1112)

* fix: update sublabel key to avoid build fail (#1116)

* fix: Prod fixes of QBD direct (#1118)

* fix bugs (#1119)

* refactor: capitalization

* fix: only ccc exports not being saved (#1121)

---------

Co-authored-by: Ashwin Thanaraj <[email protected]>
Co-authored-by: Nilesh Pant <[email protected]>
Co-authored-by: Dhaarani <[email protected]>
Co-authored-by: Anish Kr Singh <[email protected]>
@github-actions github-actions bot added size/M Medium PR and removed size/XS Extra Small PR labels Dec 12, 2024
@JustARatherRidiculouslyLongUsername JustARatherRidiculouslyLongUsername merged commit 5721b93 into bc-beta-bugfixes Dec 12, 2024
4 checks passed
Copy link

Unit Test Coverage % values
Statements 34.05% ( 4206 / 12351 )
Branches 27.69% ( 1214 / 4384 )
Functions 26.7% ( 924 / 3460 )
Lines 34.21% ( 4138 / 12093 )

JustARatherRidiculouslyLongUsername added a commit that referenced this pull request Dec 12, 2024
* fix: initialize chart of accounts multiselect when there is no api response (#1110)

* fix: remove the posted at date option for ccc expenses grouped by report (#1105)

* fix: update login error flow and fix redirect url (#1117)

* fix: restrict JE modules to group by expense only (#1113)

* fix: restrict JE modules to group by expense only

* fix: add a default bank account field for CCC expenses (#1114)

* fix: remove validation temporarily (#1111)

* fix: add a default bank account field for CCC expenses

* fix: add missing options to bank accounts on page init

* fix: dynamic content for xero customize settings (#1112)

* fix: update sublabel key to avoid build fail (#1116)

* fix: Prod fixes of QBD direct (#1118)

* fix bugs (#1119)

* refactor: capitalization

* fix: only ccc exports not being saved (#1121)

---------

Co-authored-by: Ashwin Thanaraj <[email protected]>
Co-authored-by: Nilesh Pant <[email protected]>
Co-authored-by: Dhaarani <[email protected]>
Co-authored-by: Anish Kr Singh <[email protected]>

---------

Co-authored-by: Ashwin Thanaraj <[email protected]>
Co-authored-by: Nilesh Pant <[email protected]>
Co-authored-by: Dhaarani <[email protected]>
Co-authored-by: Anish Kr Singh <[email protected]>

---------

Co-authored-by: Ashwin Thanaraj <[email protected]>
Co-authored-by: Nilesh Pant <[email protected]>
Co-authored-by: Dhaarani <[email protected]>
Co-authored-by: Anish Kr Singh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Medium PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants