diff --git a/GME Remit.xcodeproj/project.pbxproj b/GME Remit.xcodeproj/project.pbxproj index ac11033a..177f5e85 100644 --- a/GME Remit.xcodeproj/project.pbxproj +++ b/GME Remit.xcodeproj/project.pbxproj @@ -52,6 +52,17 @@ 24A4502229B83A710049CE29 /* HomeExchangeRateCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24A4502129B83A710049CE29 /* HomeExchangeRateCollectionViewCell.swift */; }; 24A4502429B8473B0049CE29 /* ExchangeRateCustomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24A4502329B8473B0049CE29 /* ExchangeRateCustomView.swift */; }; 24A4502629B849920049CE29 /* CurrencyTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24A4502529B849920049CE29 /* CurrencyTextField.swift */; }; + 24BBCCE329CD7C430081F4A6 /* BeneficiaryDetailModuleInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24BBCCD029CD7C430081F4A6 /* BeneficiaryDetailModuleInterface.swift */; }; + 24BBCCE429CD7C430081F4A6 /* BeneficiaryDetailServiceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24BBCCD329CD7C430081F4A6 /* BeneficiaryDetailServiceType.swift */; }; + 24BBCCE529CD7C430081F4A6 /* BeneficiaryDetailService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24BBCCD429CD7C430081F4A6 /* BeneficiaryDetailService.swift */; }; + 24BBCCE629CD7C430081F4A6 /* BeneficiaryDetailInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24BBCCD629CD7C430081F4A6 /* BeneficiaryDetailInteractor.swift */; }; + 24BBCCE729CD7C430081F4A6 /* BeneficiaryDetailInteractorIO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24BBCCD729CD7C430081F4A6 /* BeneficiaryDetailInteractorIO.swift */; }; + 24BBCCE829CD7C430081F4A6 /* BeneficiaryDetailPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24BBCCDA29CD7C430081F4A6 /* BeneficiaryDetailPresenter.swift */; }; + 24BBCCE929CD7C430081F4A6 /* BeneficiaryDetailWireframe.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24BBCCDC29CD7C430081F4A6 /* BeneficiaryDetailWireframe.swift */; }; + 24BBCCEA29CD7C430081F4A6 /* BeneficiaryDetailWireframeInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24BBCCDD29CD7C430081F4A6 /* BeneficiaryDetailWireframeInput.swift */; }; + 24BBCCEB29CD7C430081F4A6 /* BeneficiaryDetail.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 24BBCCE029CD7C430081F4A6 /* BeneficiaryDetail.storyboard */; }; + 24BBCCEC29CD7C430081F4A6 /* BeneficiaryDetailViewInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24BBCCE129CD7C430081F4A6 /* BeneficiaryDetailViewInterface.swift */; }; + 24BBCCED29CD7C430081F4A6 /* BeneficiaryDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24BBCCE229CD7C430081F4A6 /* BeneficiaryDetailViewController.swift */; }; 281EF60028ACCC4D0092E5E6 /* HowToDepositModuleInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 281EF5ED28ACCC4D0092E5E6 /* HowToDepositModuleInterface.swift */; }; 281EF60128ACCC4D0092E5E6 /* HowToDepositService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 281EF5F028ACCC4D0092E5E6 /* HowToDepositService.swift */; }; 281EF60228ACCC4D0092E5E6 /* HowToDepositServiceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 281EF5F128ACCC4D0092E5E6 /* HowToDepositServiceType.swift */; }; @@ -902,6 +913,17 @@ 24A4502129B83A710049CE29 /* HomeExchangeRateCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeExchangeRateCollectionViewCell.swift; sourceTree = ""; }; 24A4502329B8473B0049CE29 /* ExchangeRateCustomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExchangeRateCustomView.swift; sourceTree = ""; }; 24A4502529B849920049CE29 /* CurrencyTextField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CurrencyTextField.swift; sourceTree = ""; }; + 24BBCCD029CD7C430081F4A6 /* BeneficiaryDetailModuleInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BeneficiaryDetailModuleInterface.swift; sourceTree = ""; }; + 24BBCCD329CD7C430081F4A6 /* BeneficiaryDetailServiceType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BeneficiaryDetailServiceType.swift; sourceTree = ""; }; + 24BBCCD429CD7C430081F4A6 /* BeneficiaryDetailService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BeneficiaryDetailService.swift; sourceTree = ""; }; + 24BBCCD629CD7C430081F4A6 /* BeneficiaryDetailInteractor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BeneficiaryDetailInteractor.swift; sourceTree = ""; }; + 24BBCCD729CD7C430081F4A6 /* BeneficiaryDetailInteractorIO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BeneficiaryDetailInteractorIO.swift; sourceTree = ""; }; + 24BBCCDA29CD7C430081F4A6 /* BeneficiaryDetailPresenter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BeneficiaryDetailPresenter.swift; sourceTree = ""; }; + 24BBCCDC29CD7C430081F4A6 /* BeneficiaryDetailWireframe.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BeneficiaryDetailWireframe.swift; sourceTree = ""; }; + 24BBCCDD29CD7C430081F4A6 /* BeneficiaryDetailWireframeInput.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BeneficiaryDetailWireframeInput.swift; sourceTree = ""; }; + 24BBCCE029CD7C430081F4A6 /* BeneficiaryDetail.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = BeneficiaryDetail.storyboard; sourceTree = ""; }; + 24BBCCE129CD7C430081F4A6 /* BeneficiaryDetailViewInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BeneficiaryDetailViewInterface.swift; sourceTree = ""; }; + 24BBCCE229CD7C430081F4A6 /* BeneficiaryDetailViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BeneficiaryDetailViewController.swift; sourceTree = ""; }; 281EF5ED28ACCC4D0092E5E6 /* HowToDepositModuleInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HowToDepositModuleInterface.swift; sourceTree = ""; }; 281EF5F028ACCC4D0092E5E6 /* HowToDepositService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HowToDepositService.swift; sourceTree = ""; }; 281EF5F128ACCC4D0092E5E6 /* HowToDepositServiceType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HowToDepositServiceType.swift; sourceTree = ""; }; @@ -1901,6 +1923,96 @@ path = Volte; sourceTree = ""; }; + 24BBCCCE29CD7C430081F4A6 /* BeneficiaryDetail */ = { + isa = PBXGroup; + children = ( + 24BBCCCF29CD7C430081F4A6 /* Module Interface */, + 24BBCCD129CD7C430081F4A6 /* Application Logic */, + 24BBCCD829CD7C430081F4A6 /* User Interface */, + ); + path = BeneficiaryDetail; + sourceTree = ""; + }; + 24BBCCCF29CD7C430081F4A6 /* Module Interface */ = { + isa = PBXGroup; + children = ( + 24BBCCD029CD7C430081F4A6 /* BeneficiaryDetailModuleInterface.swift */, + ); + path = "Module Interface"; + sourceTree = ""; + }; + 24BBCCD129CD7C430081F4A6 /* Application Logic */ = { + isa = PBXGroup; + children = ( + 24BBCCD229CD7C430081F4A6 /* Service */, + 24BBCCD529CD7C430081F4A6 /* Interactor */, + ); + path = "Application Logic"; + sourceTree = ""; + }; + 24BBCCD229CD7C430081F4A6 /* Service */ = { + isa = PBXGroup; + children = ( + 24BBCCD329CD7C430081F4A6 /* BeneficiaryDetailServiceType.swift */, + 24BBCCD429CD7C430081F4A6 /* BeneficiaryDetailService.swift */, + ); + path = Service; + sourceTree = ""; + }; + 24BBCCD529CD7C430081F4A6 /* Interactor */ = { + isa = PBXGroup; + children = ( + 24BBCCD629CD7C430081F4A6 /* BeneficiaryDetailInteractor.swift */, + 24BBCCD729CD7C430081F4A6 /* BeneficiaryDetailInteractorIO.swift */, + ); + path = Interactor; + sourceTree = ""; + }; + 24BBCCD829CD7C430081F4A6 /* User Interface */ = { + isa = PBXGroup; + children = ( + 24BBCCD929CD7C430081F4A6 /* Presenter */, + 24BBCCDB29CD7C430081F4A6 /* Wireframe */, + 24BBCCDE29CD7C430081F4A6 /* View */, + ); + path = "User Interface"; + sourceTree = ""; + }; + 24BBCCD929CD7C430081F4A6 /* Presenter */ = { + isa = PBXGroup; + children = ( + 24BBCCDA29CD7C430081F4A6 /* BeneficiaryDetailPresenter.swift */, + ); + path = Presenter; + sourceTree = ""; + }; + 24BBCCDB29CD7C430081F4A6 /* Wireframe */ = { + isa = PBXGroup; + children = ( + 24BBCCDC29CD7C430081F4A6 /* BeneficiaryDetailWireframe.swift */, + 24BBCCDD29CD7C430081F4A6 /* BeneficiaryDetailWireframeInput.swift */, + ); + path = Wireframe; + sourceTree = ""; + }; + 24BBCCDE29CD7C430081F4A6 /* View */ = { + isa = PBXGroup; + children = ( + 24BBCCDF29CD7C430081F4A6 /* ViewModels */, + 24BBCCE029CD7C430081F4A6 /* BeneficiaryDetail.storyboard */, + 24BBCCE129CD7C430081F4A6 /* BeneficiaryDetailViewInterface.swift */, + 24BBCCE229CD7C430081F4A6 /* BeneficiaryDetailViewController.swift */, + ); + path = View; + sourceTree = ""; + }; + 24BBCCDF29CD7C430081F4A6 /* ViewModels */ = { + isa = PBXGroup; + children = ( + ); + path = ViewModels; + sourceTree = ""; + }; 281EF5EB28ACCC4D0092E5E6 /* HowToDeposit */ = { isa = PBXGroup; children = ( @@ -5911,6 +6023,7 @@ D96A4FBF21460B4900CFD507 /* SplashScreen */, 7EDBFBC324B2C5DA00AD5D4D /* RedeemCashPickUp */, D96BD100216479E200DFE7D8 /* WalletStatement */, + 24BBCCCE29CD7C430081F4A6 /* BeneficiaryDetail */, 7EDBFC0B24B3090700AD5D4D /* Withdraw */, ); path = Modules; @@ -7210,6 +7323,7 @@ 2454866B29BA2AE60065E1DD /* volte-regular.otf in Resources */, D931E22A216DCC2A008A8CD1 /* MessageCompose.storyboard in Resources */, 7327568623B0456400BF66C5 /* ManageAgreement.storyboard in Resources */, + 24BBCCEB29CD7C430081F4A6 /* BeneficiaryDetail.storyboard in Resources */, 7E364CEC24A4455A007D6E02 /* PasswordInputViewController.xib in Resources */, 5565FF2C1FE275E5002934E9 /* SanFranciscoText-Medium.otf in Resources */, 5565FF311FE275E5002934E9 /* SanFranciscoDisplay-Medium.otf in Resources */, @@ -7877,6 +7991,7 @@ 41F06FB729B712A2008E9E5D /* TransferListWireframeInput.swift in Sources */, 89739E3624459A630016251B /* SendMoneyReceiptModuleInterface.swift in Sources */, 405718D124D932AE0022CDDE /* NewUserRegisterViewInterface.swift in Sources */, + 24BBCCE529CD7C430081F4A6 /* BeneficiaryDetailService.swift in Sources */, 736A8C452277EB2A00337A50 /* BiometricNotificationPresenter.swift in Sources */, 89739E3924459A630016251B /* SendMoneyReceiptInteractor.swift in Sources */, 2882C6F428D2FCE000589E33 /* ValidateReferralCodeModel.swift in Sources */, @@ -7927,6 +8042,7 @@ 73FBBF2823F231A8009D7627 /* DetailNotificationPresenter.swift in Sources */, D95B5E4021311057000C0B33 /* GmeContactsWireframe.swift in Sources */, BEC9B005224FC49C00A2DA06 /* BiometricAuthenticationViewController.swift in Sources */, + 24BBCCE929CD7C430081F4A6 /* BeneficiaryDetailWireframe.swift in Sources */, 0496B84E1FE7DFCD0044810E /* UIViewController+Ext.swift in Sources */, BEC9AFFD224FC49C00A2DA06 /* BiometricAuthenticationService.swift in Sources */, 5EC4637C28AA2611006B5FDC /* NotificationListWireframeInput.swift in Sources */, @@ -8005,6 +8121,7 @@ 7303E5732344A1F000472407 /* StoreReviewHelper.swift in Sources */, 89739E2A24459A630016251B /* SendMoneyParentModuleInterface.swift in Sources */, 89EA0D8C243EC1C6003ACCC8 /* ChangePersonalInformationViewController.swift in Sources */, + 24BBCCEA29CD7C430081F4A6 /* BeneficiaryDetailWireframeInput.swift in Sources */, 4122BA7029BE073D0009E074 /* TransferListCollectionViewCell.swift in Sources */, D950BED121549242008367A1 /* HomeModuleInterface.swift in Sources */, 89EA0D74243EC1C5003ACCC8 /* CityModel.swift in Sources */, @@ -8019,6 +8136,7 @@ 405718EE24D93EB40022CDDE /* VerifyIDNumberInteractorIO.swift in Sources */, 0496B8481FE7DFA20044810E /* RestApiManager.swift in Sources */, 24A4502629B849920049CE29 /* CurrencyTextField.swift in Sources */, + 24BBCCED29CD7C430081F4A6 /* BeneficiaryDetailViewController.swift in Sources */, 73FBBF2523F231A8009D7627 /* DetailNotificationServiceType.swift in Sources */, 73AEFF702334A13100A967FB /* TransactionHistoryGroupModuleInterface.swift in Sources */, 4060B97624DBBA0300E90F8C /* KYCVerifyStep1Presenter.swift in Sources */, @@ -8071,6 +8189,7 @@ 9488313928B2A9E600D22A15 /* ReferralModel.swift in Sources */, 40B9B0A324EC4ED1002C258C /* ExistingUserKycInteractor.swift in Sources */, 4060B97324DBBA0300E90F8C /* KYCVerifyStep1ServiceType.swift in Sources */, + 24BBCCE429CD7C430081F4A6 /* BeneficiaryDetailServiceType.swift in Sources */, 73551A5A26E5B1290030B302 /* OtpVerificationServiceType.swift in Sources */, 73157B9E22DC1EEC009B836F /* PopupNotificationInteractor.swift in Sources */, 4099AF0125235C45003FA012 /* CircleBorderedView.swift in Sources */, @@ -8110,6 +8229,7 @@ D977859E215DC55F00754079 /* TransactionHistoryService.swift in Sources */, 241796E029B3931C005D8219 /* CustomItemTabView.swift in Sources */, D95B5E3A21311057000C0B33 /* GmeContactsService.swift in Sources */, + 24BBCCEC29CD7C430081F4A6 /* BeneficiaryDetailViewInterface.swift in Sources */, D95B5E3F21311057000C0B33 /* GmeContactsWireframeInput.swift in Sources */, 405718D024D932AE0022CDDE /* NewUserRegisterWireframeInput.swift in Sources */, 28AB139828E552C200191695 /* NotificationDetailWireframe.swift in Sources */, @@ -8195,6 +8315,7 @@ D9B7ADF82130048E009B0564 /* ExchangeRatesViewController.swift in Sources */, 89739E3124459A630016251B /* SendMoneyParentWireframeInput.swift in Sources */, 405AA0EF2541B32B00508420 /* PropertyUtility.swift in Sources */, + 24BBCCE829CD7C430081F4A6 /* BeneficiaryDetailPresenter.swift in Sources */, D950BED321549242008367A1 /* HomeService.swift in Sources */, 244C69B729B7A01600D7B69A /* HomeAccountDetailView.swift in Sources */, 7EDBFBDF24B2C5DA00AD5D4D /* RedeemCashPickUpWireframeInput.swift in Sources */, @@ -8204,6 +8325,7 @@ FF29296C212B8DFE00FF5BAC /* ExchangeRateCollectionViewCell.swift in Sources */, 73185352230EACA400BA9AE3 /* SendMoneyProvinceViewModel.swift in Sources */, 73AEFF772334A13100A967FB /* TransactionHistoryGroupWireframe.swift in Sources */, + 24BBCCE729CD7C430081F4A6 /* BeneficiaryDetailInteractorIO.swift in Sources */, 7EDBFBD824B2C5DA00AD5D4D /* RedeemCashPickUpModuleInterface.swift in Sources */, 89EA0D34243EC0D2003ACCC8 /* ProfileChangePasswordViewController.swift in Sources */, 73149F6A22E5AF8000D66B26 /* LauncherScreenWireframe.swift in Sources */, @@ -8260,6 +8382,7 @@ 739F8187234AFF13003ABCF3 /* DebugManager.swift in Sources */, 40218EF724D2B1940047FBF5 /* UserRegistrationModuleInterface.swift in Sources */, 7E364CEF24A46D27007D6E02 /* BalanceModel.swift in Sources */, + 24BBCCE329CD7C430081F4A6 /* BeneficiaryDetailModuleInterface.swift in Sources */, 24A4502229B83A710049CE29 /* HomeExchangeRateCollectionViewCell.swift in Sources */, D96BD11B216479E200DFE7D8 /* WalletStatementWireframe.swift in Sources */, D96BD116216479E200DFE7D8 /* WalletStatementServiceType.swift in Sources */, @@ -8295,6 +8418,7 @@ 7EDBFC2624B3098E00AD5D4D /* WithdrawFromWalletDetailInteractor.swift in Sources */, 28AB139328E552C200191695 /* NotificationDetailServiceType.swift in Sources */, 738FD4842303D1FD008B144D /* VerifyAccountRequestModel.swift in Sources */, + 24BBCCE629CD7C430081F4A6 /* BeneficiaryDetailInteractor.swift in Sources */, 7327568423B0456400BF66C5 /* ManageAgreementWireframeInput.swift in Sources */, 73684456237BD23B00796620 /* InboundTransactionCell.swift in Sources */, D957DC6C213D05E700FA812D /* SendMoneySubmitResponse.swift in Sources */, diff --git a/GME Remit/Modules/BeneficiaryDetail/Application Logic/Interactor/BeneficiaryDetailInteractor.swift b/GME Remit/Modules/BeneficiaryDetail/Application Logic/Interactor/BeneficiaryDetailInteractor.swift new file mode 100644 index 00000000..e01eaa68 --- /dev/null +++ b/GME Remit/Modules/BeneficiaryDetail/Application Logic/Interactor/BeneficiaryDetailInteractor.swift @@ -0,0 +1,37 @@ +// +// BeneficiaryDetailInteractor.swift +// GME Remit +// +// Created by Manish Adhikari on 24/03/2023. +//Copyright © 2023 Gobal Money Express Co. Ltd. All rights reserved. +// + +import Foundation + +class BeneficiaryDetailInteractor { + + // MARK: Properties + + weak var output: BeneficiaryDetailInteractorOutput? + private let service: BeneficiaryDetailServiceType + + // MARK: Initialization + + init(service: BeneficiaryDetailServiceType) { + self.service = service + } + + // MARK: Converting entities +} + +// MARK: BeneficiaryDetail interactor input interface + +extension BeneficiaryDetailInteractor: BeneficiaryDetailInteractorInput { + func makeApiRequest() { + self.service.makeApiRequest(success: { (message) in + self.output?.success(message: message ?? "") + }) { (error) in + self.output?.show(error: error) + } + } +} diff --git a/GME Remit/Modules/BeneficiaryDetail/Application Logic/Interactor/BeneficiaryDetailInteractorIO.swift b/GME Remit/Modules/BeneficiaryDetail/Application Logic/Interactor/BeneficiaryDetailInteractorIO.swift new file mode 100644 index 00000000..976dba8b --- /dev/null +++ b/GME Remit/Modules/BeneficiaryDetail/Application Logic/Interactor/BeneficiaryDetailInteractorIO.swift @@ -0,0 +1,16 @@ +// +// BeneficiaryDetailInteractorIO.swift +// GME Remit +// +// Created by Manish Adhikari on 24/03/2023. +//Copyright © 2023 Gobal Money Express Co. Ltd. All rights reserved. +// + +protocol BeneficiaryDetailInteractorInput: class { + func makeApiRequest() +} + +protocol BeneficiaryDetailInteractorOutput: class { + func show(error: Error) + func success(message: String) +} diff --git a/GME Remit/Modules/BeneficiaryDetail/Application Logic/Service/BeneficiaryDetailService.swift b/GME Remit/Modules/BeneficiaryDetail/Application Logic/Service/BeneficiaryDetailService.swift new file mode 100644 index 00000000..197c8f32 --- /dev/null +++ b/GME Remit/Modules/BeneficiaryDetail/Application Logic/Service/BeneficiaryDetailService.swift @@ -0,0 +1,31 @@ +// +// BeneficiaryDetailService.swift +// GME Remit +// +// Created by Manish Adhikari on 24/03/2023. +//Copyright © 2023 Gobal Money Express Co. Ltd. All rights reserved. +// + +import Foundation + +class BeneficiaryDetailService: BeneficiaryDetailServiceType { + func makeApiRequest( + success: @escaping (String?) -> Void, + failure: @escaping (Error) -> Void + ){ + APIRouter +// .requestOTP(mobileNumber: mobile) + .request( + needsAuthorization: false, + success: {(response: ResponseMessage) in + if (response.errorCode ?? "") == "1" { + let error = NSError(domain: "Network", code: 0, message: response.message ?? "") + failure(error) + } else { + success(response.message ?? "") + } + }, + failure: {failure($0)} + ) + } +} diff --git a/GME Remit/Modules/BeneficiaryDetail/Application Logic/Service/BeneficiaryDetailServiceType.swift b/GME Remit/Modules/BeneficiaryDetail/Application Logic/Service/BeneficiaryDetailServiceType.swift new file mode 100644 index 00000000..71d4c321 --- /dev/null +++ b/GME Remit/Modules/BeneficiaryDetail/Application Logic/Service/BeneficiaryDetailServiceType.swift @@ -0,0 +1,16 @@ +// +// BeneficiaryDetailServiceType.swift +// GME Remit +// +// Created by Manish Adhikari on 24/03/2023. +//Copyright © 2023 Gobal Money Express Co. Ltd. All rights reserved. +// + +import Foundation + +protocol BeneficiaryDetailServiceType: class { + func makeApiRequest( + success: @escaping (String?) -> Void, + failure: @escaping (Error) -> Void + ) +} diff --git a/GME Remit/Modules/BeneficiaryDetail/Module Interface/BeneficiaryDetailModuleInterface.swift b/GME Remit/Modules/BeneficiaryDetail/Module Interface/BeneficiaryDetailModuleInterface.swift new file mode 100644 index 00000000..fc854c50 --- /dev/null +++ b/GME Remit/Modules/BeneficiaryDetail/Module Interface/BeneficiaryDetailModuleInterface.swift @@ -0,0 +1,11 @@ +// +// BeneficiaryDetailModuleInterface.swift +// GME Remit +// +// Created by Manish Adhikari on 24/03/2023. +//Copyright © 2023 Gobal Money Express Co. Ltd. All rights reserved. +// + +protocol BeneficiaryDetailModuleInterface: class { + func makeApiRequest() +} diff --git a/GME Remit/Modules/BeneficiaryDetail/User Interface/Presenter/BeneficiaryDetailPresenter.swift b/GME Remit/Modules/BeneficiaryDetail/User Interface/Presenter/BeneficiaryDetailPresenter.swift new file mode 100644 index 00000000..90caa856 --- /dev/null +++ b/GME Remit/Modules/BeneficiaryDetail/User Interface/Presenter/BeneficiaryDetailPresenter.swift @@ -0,0 +1,43 @@ +// +// BeneficiaryDetailPresenter.swift +// GME Remit +// +// Created by Manish Adhikari on 24/03/2023. +//Copyright © 2023 Gobal Money Express Co. Ltd. All rights reserved. +// + +import Foundation + +class BeneficiaryDetailPresenter { + + // MARK: Properties + + weak var view: BeneficiaryDetailViewInterface? + var interactor: BeneficiaryDetailInteractorInput? + var wireframe: BeneficiaryDetailWireframeInput? + + // MARK: Converting entities +} + + // MARK: BeneficiaryDetail module interface + +extension BeneficiaryDetailPresenter: BeneficiaryDetailModuleInterface { + func makeApiRequest(){ + self.view?.showLoading() + self.interactor?.makeApiRequest() + } +} + +// MARK: BeneficiaryDetail interactor output interface + +extension BeneficiaryDetailPresenter: BeneficiaryDetailInteractorOutput { + func show(error: Error) { + self.view?.hideLoading() + self.view?.show(error: error.localizedDescription) + } + + func success(message: String) { + self.view?.hideLoading() + self.view?.show(message: message) + } +} diff --git a/GME Remit/Modules/BeneficiaryDetail/User Interface/View/BeneficiaryDetail.storyboard b/GME Remit/Modules/BeneficiaryDetail/User Interface/View/BeneficiaryDetail.storyboard new file mode 100644 index 00000000..1193eb82 --- /dev/null +++ b/GME Remit/Modules/BeneficiaryDetail/User Interface/View/BeneficiaryDetail.storyboard @@ -0,0 +1,387 @@ + + + + + + + + + + + + + + FONTSPRINGDEMO-VolteSemiboldRegular + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GME Remit/Modules/BeneficiaryDetail/User Interface/View/BeneficiaryDetailViewController.swift b/GME Remit/Modules/BeneficiaryDetail/User Interface/View/BeneficiaryDetailViewController.swift new file mode 100644 index 00000000..ef58d7e7 --- /dev/null +++ b/GME Remit/Modules/BeneficiaryDetail/User Interface/View/BeneficiaryDetailViewController.swift @@ -0,0 +1,58 @@ +// +// BeneficiaryDetailViewController.swift +// GME Remit +// +// Created by Manish Adhikari on 24/03/2023. +//Copyright © 2023 Gobal Money Express Co. Ltd. All rights reserved. +// + +import UIKit + +class BeneficiaryDetailViewController: UIViewController { + + // MARK: Properties + + var presenter: BeneficiaryDetailModuleInterface? + + // MARK: IBOutlets + + // MARK: VC's Life cycle + + override func viewDidLoad() { + super.viewDidLoad() + self.setup() + } + + // MARK: IBActions + + // MARK: Other Functions + + private func setup() { + // all setup should be done here + } +} + +// MARK: BeneficiaryDetailViewInterface +extension BeneficiaryDetailViewController: BeneficiaryDetailViewInterface { + func showLoading() { + self.showProgressHud() + } + + func hideLoading() { + self.hideProgressHud() + } + + func show(error: String) { + self.alert(type: .error, message: error) + } + + func show(message: String) { + self.alertWithOk( + type: .success, + message: message, + title: "Success", + okTitle: "Ok" + ) { + } + } +} diff --git a/GME Remit/Modules/BeneficiaryDetail/User Interface/View/BeneficiaryDetailViewInterface.swift b/GME Remit/Modules/BeneficiaryDetail/User Interface/View/BeneficiaryDetailViewInterface.swift new file mode 100644 index 00000000..371f0c79 --- /dev/null +++ b/GME Remit/Modules/BeneficiaryDetail/User Interface/View/BeneficiaryDetailViewInterface.swift @@ -0,0 +1,14 @@ +// +// BeneficiaryDetailViewInterface.swift +// GME Remit +// +// Created by Manish Adhikari on 24/03/2023. +//Copyright © 2023 Gobal Money Express Co. Ltd. All rights reserved. +// + +protocol BeneficiaryDetailViewInterface: class { + func showLoading() + func hideLoading() + func show(error: String) + func show(message: String) +} diff --git a/GME Remit/Modules/BeneficiaryDetail/User Interface/Wireframe/BeneficiaryDetailWireframe.swift b/GME Remit/Modules/BeneficiaryDetail/User Interface/Wireframe/BeneficiaryDetailWireframe.swift new file mode 100644 index 00000000..09219a8a --- /dev/null +++ b/GME Remit/Modules/BeneficiaryDetail/User Interface/Wireframe/BeneficiaryDetailWireframe.swift @@ -0,0 +1,34 @@ +// +// BeneficiaryDetailWireframe.swift +// GME Remit +// +// Created by Manish Adhikari on 24/03/2023. +//Copyright © 2023 Gobal Money Express Co. Ltd. All rights reserved. +// + +import UIKit + +class BeneficiaryDetailWireframe { + weak var view: UIViewController! +} + +extension BeneficiaryDetailWireframe: BeneficiaryDetailWireframeInput { + + var storyboardName: String {return "BeneficiaryDetail"} + + func getMainView() -> UIViewController { + let service = BeneficiaryDetailService() + let interactor = BeneficiaryDetailInteractor(service: service) + let presenter = BeneficiaryDetailPresenter() + let viewController = viewControllerFromStoryboard(of: BeneficiaryDetailViewController.self) + + viewController.presenter = presenter + interactor.output = presenter + presenter.interactor = interactor + presenter.wireframe = self + presenter.view = viewController + + self.view = viewController + return viewController + } +} diff --git a/GME Remit/Modules/BeneficiaryDetail/User Interface/Wireframe/BeneficiaryDetailWireframeInput.swift b/GME Remit/Modules/BeneficiaryDetail/User Interface/Wireframe/BeneficiaryDetailWireframeInput.swift new file mode 100644 index 00000000..fecceda2 --- /dev/null +++ b/GME Remit/Modules/BeneficiaryDetail/User Interface/Wireframe/BeneficiaryDetailWireframeInput.swift @@ -0,0 +1,13 @@ +// +// BeneficiaryDetailWireframeInput.swift +// GME Remit +// +// Created by Manish Adhikari on 24/03/2023. +//Copyright © 2023 Gobal Money Express Co. Ltd. All rights reserved. +// + +import Foundation + +protocol BeneficiaryDetailWireframeInput: WireframeInput { + +} diff --git a/GME Remit/Modules/Home/User Interface/View/HomeViewController.swift b/GME Remit/Modules/Home/User Interface/View/HomeViewController.swift index 118b76b2..282c0ede 100644 --- a/GME Remit/Modules/Home/User Interface/View/HomeViewController.swift +++ b/GME Remit/Modules/Home/User Interface/View/HomeViewController.swift @@ -258,8 +258,6 @@ class HomeViewController: UIViewController { .leftViewController as? SideMenuViewController sideMenuVC?.sideMenuDelegate = self - - setupNotificationBadge() let supportImage = UIImage(named: "customer_support_new")?.withRenderingMode(.alwaysOriginal) supportBarButton.image = supportImage @@ -269,9 +267,6 @@ class HomeViewController: UIViewController { name: self.getYearlyLimitNotificationName(), object: nil ) - - self.navigationController?.navigationBar.setValue(true, forKey: "hidesShadow") - } override func viewWillAppear(_ animated: Bool) { @@ -292,6 +287,7 @@ class HomeViewController: UIViewController { override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() + self.navigationController?.navigationBar.setValue(true, forKey: "hidesShadow") } override func viewWillDisappear(_ animated: Bool) { diff --git a/GME Remit/Modules/RecipientModules/Recipients/User Interface/View/Recipients.storyboard b/GME Remit/Modules/RecipientModules/Recipients/User Interface/View/Recipients.storyboard index 32e8fb15..c8809dce 100644 --- a/GME Remit/Modules/RecipientModules/Recipients/User Interface/View/Recipients.storyboard +++ b/GME Remit/Modules/RecipientModules/Recipients/User Interface/View/Recipients.storyboard @@ -331,8 +331,8 @@ -