Skip to content

Conversation

MozhganPeivandianSharbaf
Copy link
Contributor

@MozhganPeivandianSharbaf MozhganPeivandianSharbaf commented Sep 18, 2025

Description

  • Added theWarningButtomSheet and GetPaymentHintsEnabledUseCase for handling Warnings
  • Following classes are involved for the Integration of showing warning
    • AnalysisFragment
    • AnalysisScreenPresenter
    • AnalysisScreenContract
    • AnalysisFragmentImpl
    • GiniCapture

Notes for reviewer

I added a sdk and server Flag for PaymentHints Flag which is one flag for all warnings and for testing the branch you can use the invoice to see paid warning

Copy link

@Copilot 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

This pull request implements a payment hints feature that displays warnings when invoices are marked as paid. The feature introduces a new warning bottom sheet dialog that shows when the analyzed document contains a payment state indicating the invoice has already been paid.

  • Adds a new warning system with configurable payment hints to alert users about paid invoices
  • Implements a reusable bottom sheet dialog component for displaying warnings with cancel/proceed actions
  • Integrates payment state analysis from document extractions to trigger appropriate warnings

Reviewed Changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
capture-sdk/sdk/src/main/res/values/styles.xml Adds styles for bottom sheet dialog and circular warning icon background
capture-sdk/sdk/src/main/res/values/strings.xml Adds German localized strings for payment warning messages
capture-sdk/sdk/src/main/res/values-en/strings.xml Adds English localized strings for payment warning messages
capture-sdk/sdk/src/main/res/layout/gc_warning_bottom_sheet.xml Main layout for warning bottom sheet with icon, title, description, and action buttons
capture-sdk/sdk/src/main/res/layout-sw600dp/gc_warning_bottom_sheet.xml Tablet-optimized layout variant for warning bottom sheet
capture-sdk/sdk/src/main/res/layout-sw600dp-land/gc_warning_bottom_sheet.xml Tablet landscape layout variant for warning bottom sheet
capture-sdk/sdk/src/main/res/layout-land/gc_warning_bottom_sheet.xml Phone landscape layout variant with horizontal button arrangement
capture-sdk/sdk/src/main/res/drawable/gc_warning.xml SVG vector drawable for warning icon
capture-sdk/sdk/src/main/res/drawable/gc_bg_warning_circle.xml Circular background drawable for warning icon
capture-sdk/sdk/src/main/java/net/gini/android/capture/paymentHints/GetPaymentHintsEnabledUseCase.kt Use case for checking if payment hints feature is enabled
capture-sdk/sdk/src/main/java/net/gini/android/capture/analysis/warning/WarningType.java Enum defining warning types with associated string resources
capture-sdk/sdk/src/main/java/net/gini/android/capture/analysis/warning/WarningPaymentState.java Enum for parsing and handling payment states from document analysis
capture-sdk/sdk/src/main/java/net/gini/android/capture/analysis/warning/WarningBottomSheet.kt Bottom sheet dialog component for displaying warnings with adaptive layout
capture-sdk/sdk/src/main/java/net/gini/android/capture/analysis/AnalysisScreenPresenter.java Integrates payment state checking and warning display logic into analysis flow
capture-sdk/sdk/src/main/java/net/gini/android/capture/GiniCapture.java Adds payment hints configuration option to main SDK class
bank-sdk/sdk/src/main/java/net/gini/android/bank/sdk/capture/Configuration.kt Exposes payment hints configuration in bank SDK
bank-api-library/library/src/main/java/net/gini/android/bank/api/models/Configuration.kt Adds payment hints field to configuration model
Comments suppressed due to low confidence (3)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@obaidgini obaidgini requested a review from Copilot September 22, 2025 09:53
Copy link

@Copilot 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

Copilot reviewed 34 out of 34 changed files in this pull request and generated 6 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@obaidgini obaidgini self-requested a review September 22, 2025 10:04
Copy link
Contributor

@obaidgini obaidgini left a comment

Choose a reason for hiding this comment

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

@MozhganPeivandianSharbaf there are some comments from my side, and also there are some comments from co-pilot, Which are valid in my opinion as well, Can you please address those? also when you fix the comments of co-pilot please mark them resolve, of if some comment you think is not valid, please add the comment and then mark it as resolve. Thank you so much for great work! 👍

@obaidgini obaidgini self-requested a review September 22, 2025 11:58
Copy link
Contributor

@obaidgini obaidgini left a comment

Choose a reason for hiding this comment

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

[Request]: Can you please use the camelCase for EInvoiceModule as well in EInvoiceModule.kt ? Thanks.

@MozhganPeivandianSharbaf MozhganPeivandianSharbaf force-pushed the PP-1474-Invoice-marked-as-paid-Parse-the-new-payment-state-object branch from 2f4ee1f to 8f57b11 Compare September 22, 2025 14:00
@obaidgini obaidgini self-requested a review September 22, 2025 14:02
Copy link
Contributor

@obaidgini obaidgini left a comment

Choose a reason for hiding this comment

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

Looks good to me now, Thanks @MozhganPeivandianSharbaf . 👌

…or improved structure and responsiveness

PP-1474
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 New Blocker Issues (required ≤ 0)
1 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copy link
Contributor

@abolfazlimahdi abolfazlimahdi left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you!

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