-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: fixes for support of skip expense post import #1157
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request modifies the dashboard error section component across multiple files to introduce a new visibility condition. The changes involve adding two new input properties ( Changes
Sequence DiagramsequenceDiagram
participant QBODashboard as QBO Dashboard
participant ErrorSection as Dashboard Error Section
QBODashboard->>ErrorSection: Pass exportableExpenseGroupIds
QBODashboard->>ErrorSection: Pass accountingExportSummary
ErrorSection->>ErrorSection: Evaluate shouldShowErrorSection
alt Conditions Met
ErrorSection-->>QBODashboard: Display Error Section
else Conditions Not Met
ErrorSection-->>QBODashboard: Hide Error Section
end
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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: 1
🧹 Nitpick comments (1)
src/app/shared/components/dashboard/dashboard-error-section/dashboard-error-section.component.ts (1)
Line range hint
27-59
: Consider breaking down this component for better maintainability.The component has grown to handle multiple types of errors and contains numerous input properties. Consider splitting it into smaller, more focused components:
- MappingErrorSection
- AccountingErrorSection
- ErrorDialogComponent
This would:
- Improve code organization and maintainability
- Make testing easier
- Follow the Single Responsibility Principle
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/app/shared/components/dashboard/dashboard-error-section/dashboard-error-section.component.html
(1 hunks)src/app/shared/components/dashboard/dashboard-error-section/dashboard-error-section.component.ts
(2 hunks)
🔇 Additional comments (2)
src/app/shared/components/dashboard/dashboard-error-section/dashboard-error-section.component.ts (1)
120-122
: LGTM! Clean implementation of the visibility control.The getter effectively uses optional chaining and nullish coalescing operators to safely check conditions.
src/app/shared/components/dashboard/dashboard-error-section/dashboard-error-section.component.html (1)
2-2
: LGTM! Proper integration of the new visibility condition.The error section visibility is now correctly controlled by both the presence of errors and the new
shouldShowErrorSection
condition, aligning with the skip expense support feature.
...app/shared/components/dashboard/dashboard-error-section/dashboard-error-section.component.ts
Outdated
Show resolved
Hide resolved
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: 1
🧹 Nitpick comments (1)
src/app/integrations/qbo/qbo-main/qbo-dashboard/qbo-dashboard.component.html (1)
46-48
: UseshouldShowErrorSection
for component visibility.The current visibility condition checks for errors in various mappings, but the component now has a
shouldShowErrorSection
getter that encapsulates the visibility logic. Consider using it as the single source of truth:-<app-dashboard-error-section *ngIf="errors.EMPLOYEE_MAPPING.length || errors.CATEGORY_MAPPING.length || errors.ACCOUNTING_ERROR.length" +<app-dashboard-error-section *ngIf="errors && shouldShowErrorSection"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/app/integrations/qbo/qbo-main/qbo-dashboard/qbo-dashboard.component.html
(1 hunks)src/app/integrations/qbo/qbo-main/qbo-dashboard/qbo-dashboard.component.ts
(1 hunks)src/app/shared/components/dashboard/dashboard-error-section/dashboard-error-section.component.ts
(2 hunks)
🔇 Additional comments (1)
src/app/integrations/qbo/qbo-main/qbo-dashboard/qbo-dashboard.component.ts (1)
75-75
: Define a proper type forlastExportDetails
.Using
any
type bypasses TypeScript's type checking. Since this property is assignedaccountingExportSummary
, it should be typed asAccountingExportSummary
.- lastExportDetails: any; + lastExportDetails: AccountingExportSummary;
...app/shared/components/dashboard/dashboard-error-section/dashboard-error-section.component.ts
Outdated
Show resolved
Hide resolved
src/app/integrations/qbo/qbo-main/qbo-dashboard/qbo-dashboard.component.ts
Outdated
Show resolved
Hide resolved
...app/shared/components/dashboard/dashboard-error-section/dashboard-error-section.component.ts
Show resolved
Hide resolved
...app/shared/components/dashboard/dashboard-error-section/dashboard-error-section.component.ts
Outdated
Show resolved
Hide resolved
|
Description
Clickup
Summary by CodeRabbit
New Features
Bug Fixes