Skip to content

Commit

Permalink
Merge branch 'main' into brand-ingredient-configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancapra committed Feb 10, 2025
2 parents d31c3a5 + bca4d95 commit c7e92cf
Show file tree
Hide file tree
Showing 16 changed files with 38 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/bank-sdk.publish.example.app.firebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
id: extract_jira_ticket
run: |
commit_message=$(git log -1 --pretty=%B)
jira_ticket=$(echo "$commit_message" | sed -n '2p')
jira_ticket=$(echo "$commit_message" | awk 'NR > 1 && $0 != "" { print $0; exit }')
echo "JIRA_TICKET_NAME=${jira_ticket}" >> $GITHUB_ENV
- name: Login to jira
Expand All @@ -159,4 +159,4 @@ jobs:
uses: atlassian/gajira-comment@v3
with:
issue: ${{ env.JIRA_TICKET_NAME }}
comment: Build bank example app ${{ steps.distribute.outputs.FIREBASE_CONSOLE_URI }}
comment: Build bank example app ${{ steps.distribute.outputs.FIREBASE_CONSOLE_URI }} and app tester build can be downloaded from here ${{ steps.distribute.outputs.TESTING_URI }}
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
id: extract_jira_ticket
run: |
commit_message=$(git log -1 --pretty=%B)
jira_ticket=$(echo "$commit_message" | sed -n '2p')
jira_ticket=$(echo "$commit_message" | awk 'NR > 1 && $0 != "" { print $0; exit }')
echo "JIRA_TICKET_NAME=${jira_ticket}" >> $GITHUB_ENV
- name: Login to jira
Expand All @@ -153,4 +153,4 @@ jobs:
uses: atlassian/gajira-comment@v3
with:
issue: ${{ env.JIRA_TICKET_NAME }}
comment: Build health example app ${{ steps.distribute.outputs.FIREBASE_CONSOLE_URI }}
comment: Build health example app ${{ steps.distribute.outputs.FIREBASE_CONSOLE_URI }} and app tester build can be downloaded from here ${{ steps.distribute.outputs.TESTING_URI }}
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
id: extract_jira_ticket
run: |
commit_message=$(git log -1 --pretty=%B)
jira_ticket=$(echo "$commit_message" | sed -n '2p')
jira_ticket=$(echo "$commit_message" | awk 'NR > 1 && $0 != "" { print $0; exit }')
echo "JIRA_TICKET_NAME=${jira_ticket}" >> $GITHUB_ENV
- name: Login to jira
Expand All @@ -153,7 +153,7 @@ jobs:
uses: atlassian/gajira-comment@v3
with:
issue: ${{ env.JIRA_TICKET_NAME }}
comment: Build merchant example app ${{ steps.distribute.outputs.FIREBASE_CONSOLE_URI }}
comment: Build merchant example app ${{ steps.distribute.outputs.FIREBASE_CONSOLE_URI }} and app tester build can be downloaded from here ${{ steps.distribute.outputs.TESTING_URI }}



Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23094" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina5_9" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
Expand All @@ -12,7 +12,7 @@
<!--Digital Invoice Onboarding View Controller-->
<scene sceneID="jcM-d7-3Dk">
<objects>
<viewController storyboardIdentifier="digitalInvoiceOnboardingViewController" useStoryboardIdentifierAsRestorationIdentifier="YES" id="bsW-Wu-97S" customClass="DigitalInvoiceOnboardingViewController" customModule="GiniBankSDK" sceneMemberID="viewController">
<viewController storyboardIdentifier="digitalInvoiceOnboardingViewController" modalPresentationStyle="pageSheet" useStoryboardIdentifierAsRestorationIdentifier="YES" id="bsW-Wu-97S" customClass="DigitalInvoiceOnboardingViewController" customModule="GiniBankSDK" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="sZ4-c8-lTq">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ final class GalleryCoordinator: NSObject, Coordinator {
lazy fileprivate(set) var containerNavigationController: ContainerNavigationController = {
let container = ContainerNavigationController(rootViewController: self.galleryNavigator,
giniConfiguration: self.giniConfiguration)
container.modalPresentationStyle = .pageSheet
return container
}()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ final class ReviewZoomViewController: UIViewController {
init(page: GiniCapturePage) {
self.page = page
super.init(nibName: nil, bundle: nil)
modalPresentationStyle = .pageSheet
}

@available(*, unavailable)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let package = Package(
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(name: "GiniHealthAPILibrary", url: "https://github.com/gini/health-api-library-ios.git", .exact("5.0.0")),
.package(name: "GiniUtilites", url: "https://github.com/gini/utilites-ios.git", .exact("2.0.0")),
.package(name: "GiniUtilites", url: "https://github.com/gini/utilites-ios.git", .exact("2.0.1")),
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
//


public let GiniInternalPaymentSDKVersion = "1.1.0"
public let GiniInternalPaymentSDKVersion = "2.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
// Copyright © 2024 Gini GmbH. All rights reserved.
//

public let GiniUtilitesVersion = "2.0.0"
public let GiniUtilitesVersion = "2.0.1"
11 changes: 10 additions & 1 deletion GiniComponents/GiniUtilites/Sources/GiniUtilites/Price.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,18 @@ import Foundation

public struct Price {
// Decimal value
public var value: Decimal
public var value: Decimal {
didSet {
if value > Price.maxValue {
value = Price.maxValue
}
}
}
// Currency code
let currencyCode: String

// Maximum allowed value
private static let maxValue: Decimal = 99999.99

/**
Returns a price structure with decimal value and currency code from extraction string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Once you have your Swift package set up, adding `GiniHealthSDK` as a dependency

```swift
dependencies: [
.package(url: "https://github.com/gini/health-sdk-ios.git", .exact("5.0.2"))
.package(url: "https://github.com/gini/health-sdk-ios.git", .exact("5.1.0"))
]
```
4 changes: 2 additions & 2 deletions HealthSDK/GiniHealthSDK/Package-release.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ let package = Package(
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(name: "GiniHealthAPILibrary", url: "https://github.com/gini/health-api-library-ios.git", .exact("5.0.0")),
.package(name: "GiniInternalPaymentSDK", url: "https://github.com/gini/internal-payment-sdk-ios", .exact("1.1.0")),
.package(name: "GiniUtilites", url: "https://github.com/gini/utilites-ios.git", .exact("2.0.0")),
.package(name: "GiniInternalPaymentSDK", url: "https://github.com/gini/internal-payment-sdk-ios", .exact("2.0.0")),
.package(name: "GiniUtilites", url: "https://github.com/gini/utilites-ios.git", .exact("2.0.1")),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ extension PaymentComponentsController {
It also increments the onboarding count for the selected payment provider.

- Parameter qrCodeData: A qrCode data information for the document associated payment request generated by the payment details.
- Parameter paymentRequestId:The payment request id from generated from the payment info extracted from the invoice
- Parameter paymentRequestId: The payment request id from generated from the payment info extracted from the invoice
- Returns: A configured `BottomSheetViewController` for sharing invoices.
*/
public func shareInvoiceBottomSheet(qrCodeData: Data, paymentRequestId: String) -> BottomSheetViewController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
// Copyright © 2024 Gini GmbH. All rights reserved.
//

public let GiniHealthSDKVersion = "5.0.2"
public let GiniHealthSDKVersion = "5.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ extension OrderDetailView: UITextFieldDelegate {
*/
func updateAmoutToPayWithCurrencyFormat() {
let textField = Self.amountTextField
if textField.hasText, let text = textField.text {
if textField.hasText, let text = textField.text?.replacingOccurrences(of: ".", with: "") {
if let priceValue = text.decimal(),
var price = order?.price {
price.value = priceValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,14 @@ final class OrderDetailViewController: UIViewController {
order.recipient = textFields[NSLocalizedString(Fields.recipient.rawValue, comment: "")]?.text ?? ""
order.purpose = textFields[NSLocalizedString(Fields.purpose.rawValue, comment: "")]?.text ?? ""

var text = textFields[NSLocalizedString(Fields.amountToPay.rawValue, comment: "")]?.text ?? ""
text = text.replacingOccurrences(of: ",", with: ".")
if let decimalAmount = Decimal(string: text) {
var price = Price(extractionString: order.amountToPay) ?? Price(value: decimalAmount, currencyCode: "")
price.value = decimalAmount

order.amountToPay = price.extractionString
} else {
order.amountToPay = Price(value: .zero, currencyCode: "").extractionString
let text = textFields[NSLocalizedString(Fields.amountToPay.rawValue, comment: "")]?.text ?? ""
if let priceValue = text.decimal() {
let price = Price(value: priceValue, currencyCode: "")
if priceValue > 0 {
order.amountToPay = price.extractionString
} else {
order.amountToPay = Price(value: .zero, currencyCode: "").extractionString
}
}
}

Expand Down

0 comments on commit c7e92cf

Please sign in to comment.