From 18932a7d9e4661112fc0e860193a76da98543418 Mon Sep 17 00:00:00 2001 From: "stepie.ub" Date: Mon, 12 Jun 2023 11:21:45 +0545 Subject: [PATCH] home, branch issue fixed --- GME Remit.xcodeproj/project.pbxproj | 1 + .../View/Custom/HomeExchangeRateView.swift | 65 +++++++++---------- .../View/SetupRecipientViewController.swift | 2 +- .../SendMoneyVerificationInteractor.swift | 2 +- .../TermsAndConditionInteractor.swift | 2 +- 5 files changed, 34 insertions(+), 38 deletions(-) diff --git a/GME Remit.xcodeproj/project.pbxproj b/GME Remit.xcodeproj/project.pbxproj index 3a9acc6b..aefc8ff0 100644 --- a/GME Remit.xcodeproj/project.pbxproj +++ b/GME Remit.xcodeproj/project.pbxproj @@ -8884,6 +8884,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + "EXCLUDED_ARCHS[sdk=*]" = arm64; FRAMEWORK_SEARCH_PATHS = ""; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; diff --git a/GME Remit/Modules/Home/User Interface/View/Custom/HomeExchangeRateView.swift b/GME Remit/Modules/Home/User Interface/View/Custom/HomeExchangeRateView.swift index 7e7ecae9..a95c0364 100644 --- a/GME Remit/Modules/Home/User Interface/View/Custom/HomeExchangeRateView.swift +++ b/GME Remit/Modules/Home/User Interface/View/Custom/HomeExchangeRateView.swift @@ -32,13 +32,15 @@ class HomeExchangeRateView: UIView { flowlayout.collectionView?.showsHorizontalScrollIndicator = false flowlayout.collectionView?.showsVerticalScrollIndicator = false - let view = UICollectionView(frame: CGRect.zero, collectionViewLayout: flowlayout) - view.translatesAutoresizingMaskIntoConstraints = false - view.register(HomeExchangeRateCollectionViewCell.self, forCellWithReuseIdentifier: HomeExchangeRateCollectionViewCell.identifier) - view.backgroundColor = .white - view.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 8, right: 0) - view.showsHorizontalScrollIndicator = false - return view + let colView = UICollectionView(frame: CGRect.zero, collectionViewLayout: flowlayout) + colView.translatesAutoresizingMaskIntoConstraints = false + + + colView.register(HomeExchangeRateCollectionViewCell.self, forCellWithReuseIdentifier: "HomeExchangeRateCollectionViewCell") + colView.backgroundColor = .white + colView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 8, right: 0) + colView.showsHorizontalScrollIndicator = false + return colView }() private let transferFeeIncludedImageView: UIImageView = { @@ -361,9 +363,9 @@ class HomeExchangeRateView: UIView { recivedMoneyView.updatedText = defaultAmount.likeCommaMoney() calculateExchangeRate() -// DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { + DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { self.collectionView.reloadData() -// } + } } @objc func calculateExchangeRate() { @@ -380,6 +382,9 @@ class HomeExchangeRateView: UIView { .elementAt(index: selectedPaymentModeIndex)?.id ?? "", calcBy: calcBy ) + DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { + self.collectionView.reloadData() + } self.tappedCalculateExchangeRate?(model) } @@ -425,12 +430,10 @@ extension HomeExchangeRateView: UICollectionViewDelegate, collectionView: UICollectionView, indexPath: IndexPath ) -> UICollectionViewCell { - guard let cell = collectionView.dequeueReusableCell( - withReuseIdentifier: HomeExchangeRateCollectionViewCell.identifier, + let cell = collectionView.dequeueReusableCell( + withReuseIdentifier: "HomeExchangeRateCollectionViewCell", for: indexPath - ) as? HomeExchangeRateCollectionViewCell else { - return UICollectionViewCell() - } + ) as! HomeExchangeRateCollectionViewCell cell.paymentServiceMethod = self.selectedExchangeRateModel?.availableServices?.elementAt( index: indexPath.row @@ -445,13 +448,11 @@ extension HomeExchangeRateView: UICollectionViewDelegate, collectionView: UICollectionView, indexPath: IndexPath ) -> UICollectionViewCell { - guard let cell = collectionView.dequeueReusableCell( - withReuseIdentifier: HomeExchangeRateCollectionViewCell.identifier, + let cell = collectionView.dequeueReusableCell( + withReuseIdentifier: "HomeExchangeRateCollectionViewCell", for: indexPath - ) as? HomeExchangeRateCollectionViewCell else { - return UICollectionViewCell() - } - + ) as! HomeExchangeRateCollectionViewCell + cell.paymentServiceMethod = self.selectedExchangeRateModel?.availableServices?.elementAt( index: indexPath.row ) @@ -465,12 +466,10 @@ extension HomeExchangeRateView: UICollectionViewDelegate, collectionView: UICollectionView, indexPath: IndexPath ) -> UICollectionViewCell { - guard let cell = collectionView.dequeueReusableCell( - withReuseIdentifier: HomeExchangeRateCollectionViewCell.identifier, + let cell = collectionView.dequeueReusableCell( + withReuseIdentifier: "HomeExchangeRateCollectionViewCell", for: indexPath - ) as? HomeExchangeRateCollectionViewCell else { - return UICollectionViewCell() - } + ) as! HomeExchangeRateCollectionViewCell cell.paymentServiceMethod = self.selectedExchangeRateModel?.availableServices?.elementAt( index: indexPath.row @@ -485,12 +484,10 @@ extension HomeExchangeRateView: UICollectionViewDelegate, collectionView: UICollectionView, indexPath: IndexPath ) -> UICollectionViewCell { - guard let cell = collectionView.dequeueReusableCell( - withReuseIdentifier: HomeExchangeRateCollectionViewCell.identifier, + let cell = collectionView.dequeueReusableCell( + withReuseIdentifier: "HomeExchangeRateCollectionViewCell", for: indexPath - ) as? HomeExchangeRateCollectionViewCell else { - return UICollectionViewCell() - } + ) as! HomeExchangeRateCollectionViewCell cell.paymentServiceMethod = self.selectedExchangeRateModel?.availableServices?.elementAt( index: indexPath.row @@ -504,12 +501,10 @@ extension HomeExchangeRateView: UICollectionViewDelegate, collectionView: UICollectionView, indexPath: IndexPath ) -> UICollectionViewCell { - guard let cell = collectionView.dequeueReusableCell( - withReuseIdentifier: HomeExchangeRateCollectionViewCell.identifier, + let cell = collectionView.dequeueReusableCell( + withReuseIdentifier: "HomeExchangeRateCollectionViewCell", for: indexPath - ) as? HomeExchangeRateCollectionViewCell else { - return UICollectionViewCell() - } + ) as! HomeExchangeRateCollectionViewCell cell.paymentServiceMethod = self.selectedExchangeRateModel?.availableServices?.elementAt( index: indexPath.row ) diff --git a/GME Remit/Modules/RecipientModules/SetupRecipient/User Interface/View/SetupRecipientViewController.swift b/GME Remit/Modules/RecipientModules/SetupRecipient/User Interface/View/SetupRecipientViewController.swift index 284fdf9f..2c4d63c1 100644 --- a/GME Remit/Modules/RecipientModules/SetupRecipient/User Interface/View/SetupRecipientViewController.swift +++ b/GME Remit/Modules/RecipientModules/SetupRecipient/User Interface/View/SetupRecipientViewController.swift @@ -416,7 +416,7 @@ extension SetupRecipientViewController { okAction: { [weak self] in guard let `self` = self else { return } self.sendReciptent?(successObject.data) if let nav = self.navigationController, let recipient = successObject.data, var paymentMethod = successObject.data?.paymentMethod { - if paymentMethod.receiverId == "" { + if (paymentMethod.receiverId == "" || paymentMethod.receiverId == nil) { paymentMethod.receiverId = recipient.receiverID } self.viewModel?.presenter?.gotoSendMoney(recipient, paymentMethod) diff --git a/GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyVerification/Application Logic/Interactor/SendMoneyVerificationInteractor.swift b/GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyVerification/Application Logic/Interactor/SendMoneyVerificationInteractor.swift index 6ff3a079..ef78a631 100644 --- a/GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyVerification/Application Logic/Interactor/SendMoneyVerificationInteractor.swift +++ b/GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyVerification/Application Logic/Interactor/SendMoneyVerificationInteractor.swift @@ -85,7 +85,7 @@ extension SendMoneyVerificationInteractor: SendMoneyVerificationInteractorInput "SenderId": senderId ?? "", "ReceiverId": recieverId ?? "", "DeliveryMethodId": model.paymemtMode?.id ?? "", - "PBranch": model.branch?.id ?? "", + "PBranch": reciepient.paymentMethod?.agent?.id ?? "", "PAgent": model.bank?.id ?? "", "PaymentType": "wallet", "PCurr": model.exchangeRateDetail?.reciepientCurrency ?? "", diff --git a/GME Remit/Modules/RemittanceModules/OverseasModules/TermsAndCondition/Application Logic/Interactor/TermsAndConditionInteractor.swift b/GME Remit/Modules/RemittanceModules/OverseasModules/TermsAndCondition/Application Logic/Interactor/TermsAndConditionInteractor.swift index 3e0bad0d..f6a8ecaf 100644 --- a/GME Remit/Modules/RemittanceModules/OverseasModules/TermsAndCondition/Application Logic/Interactor/TermsAndConditionInteractor.swift +++ b/GME Remit/Modules/RemittanceModules/OverseasModules/TermsAndCondition/Application Logic/Interactor/TermsAndConditionInteractor.swift @@ -119,7 +119,7 @@ extension TermsAndConditionInteractor: TermsAndConditionInteractorInput { "SenderId": senderId ?? "", "ReceiverId": receiverID, "DeliveryMethodId": paymentModel?.id ?? "", - "PBranch": model.branch?.id ?? "", + "PBranch": paymentModel?.agent?.id ?? reciepient.agent?.id ?? "", "PAgent": paymentModel?.agent?.id ?? reciepient.agent?.id ?? "", "PaymentType": "wallet", "PCurr": paymentModel?.currency?.first ?? "",