Browse Source

added slip upload feature

v0.17
Yajan 2 years ago
parent
commit
3c1042480a
  1. 16
      GME Remit.xcodeproj/project.pbxproj
  2. 10
      GME Remit/APIs/Router/APIRouter.swift
  3. 25
      GME Remit/Modules/Home/User Interface/View/Cell/HomeCollectionCollectionViewCell.swift
  4. 5
      GME Remit/Modules/Home/User Interface/View/Cell/HomeCollectionTableViewCell.swift
  5. 15
      GME Remit/Modules/Home/User Interface/View/HomeViewController.swift
  6. 12
      GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyParent/User Interface/View/SendMoneyParent.storyboard
  7. 72
      GME Remit/Modules/SideMenu/SideMenu.storyboard
  8. 6
      GME Remit/Modules/SideMenu/SideMenuViewController.swift
  9. 306
      GME Remit/Modules/SlipUpload/SlipUpload.storyboard
  10. 230
      GME Remit/Modules/SlipUpload/SlipUploadViewController.swift
  11. 2
      GME Remit/MultiLanguages/bn.lproj/Localizable.strings
  12. 1
      GME Remit/MultiLanguages/en.lproj/Localizable.strings
  13. 1
      GME Remit/MultiLanguages/en_PH.lproj/Localizable.strings
  14. 2
      GME Remit/MultiLanguages/ja.lproj/Localizable.strings
  15. 6
      GME Remit/Supported Files/Assets.xcassets/CreditCard/Contents.json
  16. 21
      GME Remit/Supported Files/Assets.xcassets/deposit_slip.imageset/Contents.json
  17. BIN
      GME Remit/Supported Files/Assets.xcassets/deposit_slip.imageset/download.jpg
  18. 24
      GME Remit/Supported Files/Assets.xcassets/slip-upload.imageset/Contents.json
  19. BIN
      GME Remit/Supported Files/Assets.xcassets/slip-upload.imageset/upload-file.png
  20. 2
      Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/IQTextView/IQTextView.swift

16
GME Remit.xcodeproj/project.pbxproj

@ -684,6 +684,8 @@
D9DC108421639E56008F3C51 /* SuccessMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9DC108321639E56008F3C51 /* SuccessMessage.swift */; };
D9E57945212E938D00D47AC0 /* ExchangeRateDetailModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9E57944212E938D00D47AC0 /* ExchangeRateDetailModel.swift */; };
E75AB629FDC719B0F67B42D2 /* Pods_GMERemittanceTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A9E44076D1B2365E6CD5606C /* Pods_GMERemittanceTests.framework */; };
EC2D9C212826C67600996921 /* SlipUpload.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EC2D9C202826C67600996921 /* SlipUpload.storyboard */; };
EC2D9C232826C68E00996921 /* SlipUploadViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC2D9C222826C68E00996921 /* SlipUploadViewController.swift */; };
FF29296C212B8DFE00FF5BAC /* ExchangeRateCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF29296B212B8DFE00FF5BAC /* ExchangeRateCollectionViewCell.swift */; };
FF6E7D8E21BF951D00A003B9 /* AppUpdateInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF6E7D7C21BF951D00A003B9 /* AppUpdateInteractor.swift */; };
FF6E7D8F21BF951D00A003B9 /* AppUpdateInteractorIO.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF6E7D7D21BF951D00A003B9 /* AppUpdateInteractorIO.swift */; };
@ -1429,6 +1431,8 @@
D9DC107721639077008F3C51 /* MessageCompose.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = MessageCompose.storyboard; sourceTree = "<group>"; };
D9DC108321639E56008F3C51 /* SuccessMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SuccessMessage.swift; sourceTree = "<group>"; };
D9E57944212E938D00D47AC0 /* ExchangeRateDetailModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExchangeRateDetailModel.swift; sourceTree = "<group>"; };
EC2D9C202826C67600996921 /* SlipUpload.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = SlipUpload.storyboard; sourceTree = "<group>"; };
EC2D9C222826C68E00996921 /* SlipUploadViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SlipUploadViewController.swift; sourceTree = "<group>"; };
FF29296B212B8DFE00FF5BAC /* ExchangeRateCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExchangeRateCollectionViewCell.swift; sourceTree = "<group>"; };
FF6E7D7C21BF951D00A003B9 /* AppUpdateInteractor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppUpdateInteractor.swift; sourceTree = "<group>"; };
FF6E7D7D21BF951D00A003B9 /* AppUpdateInteractorIO.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppUpdateInteractorIO.swift; sourceTree = "<group>"; };
@ -5034,6 +5038,7 @@
D9B7ADDB2130048E009B0564 /* ExchangeRates */,
D9031127214786EA00AD5BA9 /* ForgotPassword */,
D95B5E2421311056000C0B33 /* GmeContacts */,
EC2D9C1F2826C65A00996921 /* SlipUpload */,
D950BEBC21549242008367A1 /* Home */,
73149F4E22E5AF8000D66B26 /* LauncherScreen */,
D946718021426DFB003924DB /* Login */,
@ -5977,6 +5982,15 @@
path = Pods;
sourceTree = "<group>";
};
EC2D9C1F2826C65A00996921 /* SlipUpload */ = {
isa = PBXGroup;
children = (
EC2D9C202826C67600996921 /* SlipUpload.storyboard */,
EC2D9C222826C68E00996921 /* SlipUploadViewController.swift */,
);
path = SlipUpload;
sourceTree = "<group>";
};
FF29296A212B8DE600FF5BAC /* Cell */ = {
isa = PBXGroup;
children = (
@ -6247,6 +6261,7 @@
736C417B273794600055C9E9 /* PasswordConfirmation.storyboard in Resources */,
9FD261021FD00458007A511D /* LaunchScreen.storyboard in Resources */,
7EDBFBE124B2C5DA00AD5D4D /* RedeemCashPickUp.storyboard in Resources */,
EC2D9C212826C67600996921 /* SlipUpload.storyboard in Resources */,
7312F6492281488C00172BDD /* ConfirmViewController.xib in Resources */,
5565FF1E1FE275E5002934E9 /* SanFranciscoText-RegularItalic.otf in Resources */,
73D3F3E4270C65B5006C3F97 /* CDDIViewController.storyboard in Resources */,
@ -7269,6 +7284,7 @@
D95B7047213FB5F10053CC3D /* WebLinksViewController.swift in Sources */,
738714BB237CE86E0038FCB1 /* InboundReceiptViewController.swift in Sources */,
73168A2322F3D01A00878038 /* TablePresenterProtocol.swift in Sources */,
EC2D9C232826C68E00996921 /* SlipUploadViewController.swift in Sources */,
7327567F23B0456400BF66C5 /* ManageAgreementServiceType.swift in Sources */,
D950BEDE215496F6008367A1 /* HomeRemainingLimitTableViewCell.swift in Sources */,
7388821922CDF20F00592960 /* UITextField+Ext.swift in Sources */,

10
GME Remit/APIs/Router/APIRouter.swift

@ -33,6 +33,7 @@ enum APIRouter {
//MARK: - RenewID
case submitRenewID
case slipUpload(amount: String)
// MARK: - Register
case requestOTP(mobileNumber: String)
@ -486,6 +487,8 @@ extension APIRouter {
return "\(baseUrlWithoutVersion)v1/mobile/RegisterKycExistingCustomer"
case .submitRenewID:
return "\(baseUrlWithoutVersion)v1/mobile/RenewID"
case .slipUpload:
return "\(baseUrlWithoutVersion)v1/mobile/DepositSlip"
case .requestPennyTestAtRegister(let resend):
let userID = GMEDB.shared.user.string(.userId) ?? ""
return "\(baseUrl)/mobile/pennytest/start/\(userID)?reSendCode=\(resend)"
@ -606,6 +609,8 @@ extension APIRouter {
return .post
case .submitExistingCustomerKYC:
return .post
case .slipUpload:
return .post
case .submitRenewID:
return .post
case .requestPennyTestAtRegister:
@ -988,6 +993,11 @@ extension APIRouter {
return [
"userId": GMEDB.shared.user.string(.userId) ?? ""
]
case .slipUpload(let amount):
return [
"userId": GMEDB.shared.user.string(.userId) ?? "",
"amount": amount
]
case .pennyTestSubmitAtRegister(let accountNumber, let certNumber):

25
GME Remit/Modules/Home/User Interface/View/Cell/HomeCollectionCollectionViewCell.swift

@ -14,13 +14,20 @@ class HomeCollectionCollectionViewCell: UICollectionViewCell {
@IBOutlet weak var dragButton: UIImageView!
var model: HomeCollectionModel?
func setup() {
let image = model?.icon?.withRenderingMode(.alwaysOriginal)
self.imageview.image = image
self.titleLabel.text = model?.title
self.dragButton.isHidden = true
self.layer.applyCornerRadiusShadow(cornerRadiusValue: 24)
}
func setup() {
let image = model?.icon?.withRenderingMode(.alwaysOriginal)
self.imageview.image = image
if model?.title == "Slip Upload" {
let image = model?.icon?.withRenderingMode(.alwaysTemplate)
self.imageview.tintColor = .lightGray
self.imageview.image = image
}
self.titleLabel.text = model?.title
self.dragButton.isHidden = true
self.layer.applyCornerRadiusShadow(cornerRadiusValue: 24)
}
}

5
GME Remit/Modules/Home/User Interface/View/Cell/HomeCollectionTableViewCell.swift

@ -101,8 +101,9 @@ class HomeCollectionTableViewCell: UITableViewCell, UICollectionViewDelegateFlow
let trackTransferMenu = HomeCollectionModel()
trackTransferMenu.index = 3
trackTransferMenu.title = "jme_account_statement_text".localized()
let walletImage = UIImage.init(named: "jme_wallet")
trackTransferMenu.title = "jme_slip_upload_text".localized()
let walletImage = UIImage.init(named: "slip-upload")
trackTransferMenu.icon = walletImage
let noticeMenu = HomeCollectionModel()

15
GME Remit/Modules/Home/User Interface/View/HomeViewController.swift

@ -563,7 +563,14 @@ extension HomeViewController {
@objc private func showTrackYourTransfer() {
Utility.isVerifiedUser() ? (presenter?.openTrackYourTransfer()) : (self.showUnVerifiedMessage())
guard let viewController = UIStoryboard(name: "SlipUpload", bundle: nil)
.instantiateViewController(withIdentifier: "SlipUploadViewController") as? SlipUploadViewController else {
return
}
self.push(viewController, animated: true)
// Utility.isVerifiedUser() ? (presenter?.openTrackYourTransfer()) : (self.showUnVerifiedMessage())
}
@ -580,6 +587,10 @@ extension HomeViewController {
self.push(viewController, animated: true)
}
private func showAccountStatement() {
Utility.isVerifiedUser() ? (presenter?.openTrackYourTransfer()) : (self.showUnVerifiedMessage())
}
private func showSideMenuSetting() {
guard let viewController = UIStoryboard(name: "Setting", bundle: nil)
.instantiateViewController(withIdentifier: "SettingViewController") as? SettingViewController else {
@ -782,6 +793,8 @@ extension HomeViewController: SideMenuDelegate {
switch didSelectMenu {
case .about:
showSideMenuAboutGme()
case .accountStatement:
showAccountStatement()
case .setting:
showSideMenuSetting()
case .notice:

12
GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyParent/User Interface/View/SendMoneyParent.storyboard

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="HSb-ou-7T5">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="HSb-ou-7T5">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@ -147,19 +147,19 @@
</constraints>
</stackView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Amount Detail" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gQB-Gu-fSy">
<rect key="frame" x="11.5" y="60" width="69.5" height="13"/>
<rect key="frame" x="12.5" y="60" width="67" height="13.5"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="11"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="CDDI" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1gz-xl-Xyi">
<rect key="frame" x="131" y="60" width="26.5" height="13"/>
<rect key="frame" x="132.5" y="60" width="23.5" height="13.5"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="11"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="B84-DY-jVm">
<rect key="frame" x="305" y="60" width="48" height="26"/>
<rect key="frame" x="306" y="60" width="46.5" height="26.5"/>
<string key="text">Terms &amp;
Condition</string>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="11"/>
@ -167,7 +167,7 @@ Condition</string>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Verification" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hhi-Fm-aQu">
<rect key="frame" x="215" y="60" width="54" height="13"/>
<rect key="frame" x="215" y="60" width="54" height="13.5"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="11"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>

72
GME Remit/Modules/SideMenu/SideMenu.storyboard

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19529" 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="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina5_5" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@ -153,7 +153,7 @@
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="BLa-d5-Z4p">
<rect key="frame" x="0.0" y="131" width="334" height="145"/>
<rect key="frame" x="0.0" y="131" width="334" height="195"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="zdy-H8-A2J" userLabel="AboutStackView">
<rect key="frame" x="0.0" y="0.0" width="334" height="45"/>
@ -215,8 +215,68 @@
<constraint firstAttribute="height" relation="lessThanOrEqual" constant="60" id="zlW-MU-Ygn"/>
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="4oZ-AQ-PlP" userLabel="SettingStack View">
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="JLJ-cE-fDN" userLabel="AboutStackView">
<rect key="frame" x="0.0" y="50" width="334" height="45"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="hLs-XR-a6M">
<rect key="frame" x="0.0" y="0.0" width="334" height="45"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillProportionally" translatesAutoresizingMaskIntoConstraints="NO" id="XIX-zB-JVm">
<rect key="frame" x="0.0" y="0.0" width="15" height="45"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jRR-bE-vSo">
<rect key="frame" x="0.0" y="0.0" width="15" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="about_JME" translatesAutoresizingMaskIntoConstraints="NO" id="SgL-gy-eRu">
<rect key="frame" x="0.0" y="15" width="15" height="15"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="15" id="L1p-S0-gnc"/>
<constraint firstAttribute="height" constant="15" id="j8V-TL-F0n"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QcM-2a-CSh">
<rect key="frame" x="0.0" y="30" width="15" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="QcM-2a-CSh" firstAttribute="height" secondItem="jRR-bE-vSo" secondAttribute="height" id="L3d-J1-xry"/>
</constraints>
</stackView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jde-0G-gXq">
<rect key="frame" x="30" y="0.0" width="304" height="45"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" name="SanFranciscoText-Regular" family="San Francisco Text" pointSize="14"/>
<state key="normal" title="Account Statement">
<color key="titleColor" name="ThemeText"/>
</state>
<connections>
<action selector="accountStatementAction:" destination="XQF-oH-rUR" eventType="touchUpInside" id="Jda-fT-OFV"/>
</connections>
</button>
</subviews>
</stackView>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gAe-hP-kyz" userLabel="AboutGmeSeperator">
<rect key="frame" x="0.0" y="0.0" width="334" height="0.66666666666666663"/>
<color key="backgroundColor" name="ThemeSeparate"/>
<constraints>
<constraint firstAttribute="height" constant="0.5" id="RjC-n2-NYv"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="45" id="tCD-lr-OhX"/>
<constraint firstAttribute="height" relation="lessThanOrEqual" constant="60" id="wlb-2h-JrJ"/>
</constraints>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="4oZ-AQ-PlP" userLabel="SettingStack View">
<rect key="frame" x="0.0" y="100" width="334" height="45"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="WQs-jK-tRN">
<rect key="frame" x="0.0" y="0.0" width="334" height="45"/>
@ -272,7 +332,7 @@
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="giG-3U-czb" userLabel="LogOutStackView">
<rect key="frame" x="0.0" y="100" width="334" height="45"/>
<rect key="frame" x="0.0" y="150" width="334" height="45"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="EEp-Ts-pi0">
<rect key="frame" x="0.0" y="0.0" width="334" height="45"/>
@ -324,7 +384,7 @@
</subviews>
</stackView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="249" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EKL-KH-blC">
<rect key="frame" x="0.0" y="286" width="334" height="383"/>
<rect key="frame" x="0.0" y="336" width="334" height="333"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>

6
GME Remit/Modules/SideMenu/SideMenuViewController.swift

@ -46,6 +46,7 @@ class SideMenuViewController: UIViewController {
enum MenuType {
case about
case accountStatement
case setting
case notice
}
@ -136,6 +137,11 @@ class SideMenuViewController: UIViewController {
aboutIconImageView.tintColor = .themeWhite
}
@IBAction func accountStatementAction(_ sender: Any) {
self.sideMenuController?.hideLeftView()
sideMenuDelegate?.didSelectMenu(self, didSelectMenu: .accountStatement)
}
@IBAction func aboutGme(_ sender: UIButton) {
self.sideMenuController?.hideLeftView()
sideMenuDelegate?.didSelectMenu(self, didSelectMenu: .about)

306
GME Remit/Modules/SlipUpload/SlipUpload.storyboard

@ -0,0 +1,306 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<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"/>
</dependencies>
<customFonts key="customFonts">
<array key="SanFranciscoDisplay-Medium.otf">
<string>SanFranciscoDisplay-Medium</string>
</array>
<array key="SanFranciscoDisplay-Regular.otf">
<string>SanFranciscoDisplay-Regular</string>
</array>
<array key="SanFranciscoDisplay-Semibold.otf">
<string>SanFranciscoDisplay-Semibold</string>
</array>
</customFonts>
<scenes>
<!--Slip Upload View Controller-->
<scene sceneID="s0d-6b-0kx">
<objects>
<viewController storyboardIdentifier="SlipUploadViewController" id="Y6W-OH-hqX" customClass="SlipUploadViewController" customModule="JME_Remit" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="5EZ-qb-Rvc">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="30" translatesAutoresizingMaskIntoConstraints="NO" id="rn8-Ik-CI7">
<rect key="frame" x="20" y="84" width="374" height="422"/>
<subviews>
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7TA-sf-psf" userLabel="ViewFront">
<rect key="frame" x="0.0" y="0.0" width="374" height="134"/>
<subviews>
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sJt-9E-s2K">
<rect key="frame" x="2" y="10" width="98" height="114"/>
<subviews>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="POg-bw-zVr">
<rect key="frame" x="0.0" y="0.0" width="98" height="114"/>
<state key="normal" image="passport_new"/>
</button>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FdO-XZ-38j">
<rect key="frame" x="96" y="8" width="2" height="98"/>
<color key="backgroundColor" name="ThemeSeparate"/>
<constraints>
<constraint firstAttribute="width" constant="2" id="2rJ-Fs-SaN"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="FdO-XZ-38j" secondAttribute="bottom" constant="8" id="31P-7c-wKb"/>
<constraint firstItem="POg-bw-zVr" firstAttribute="top" secondItem="sJt-9E-s2K" secondAttribute="top" id="5Jb-t7-769"/>
<constraint firstAttribute="trailing" secondItem="FdO-XZ-38j" secondAttribute="trailing" id="SNf-Ne-3p1"/>
<constraint firstAttribute="trailing" secondItem="POg-bw-zVr" secondAttribute="trailing" id="Xmq-QT-M7S"/>
<constraint firstItem="POg-bw-zVr" firstAttribute="leading" secondItem="sJt-9E-s2K" secondAttribute="leading" id="eRN-ky-apd"/>
<constraint firstAttribute="bottom" secondItem="POg-bw-zVr" secondAttribute="bottom" id="gOI-8T-pye"/>
<constraint firstItem="FdO-XZ-38j" firstAttribute="top" secondItem="sJt-9E-s2K" secondAttribute="top" constant="8" id="nm5-AI-24o"/>
<constraint firstAttribute="width" constant="98" id="oNc-X1-cU0"/>
</constraints>
</view>
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="a9O-yo-tt7">
<rect key="frame" x="110" y="8" width="262" height="116"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Upload Deposit Slip" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="30V-tZ-sKM">
<rect key="frame" x="50.5" y="5" width="111.5" height="16"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="13"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HPn-oR-fwN">
<rect key="frame" x="197" y="86" width="55" height="24"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="10"/>
<state key="normal" title="View Sample">
<color key="titleColor" name="ThemeBlue"/>
</state>
<connections>
<action selector="viewSampleAction:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="QKf-d2-K0n"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="30V-tZ-sKM" firstAttribute="centerX" secondItem="a9O-yo-tt7" secondAttribute="centerX" constant="-25" id="FEL-Pe-YPY"/>
<constraint firstAttribute="bottom" secondItem="HPn-oR-fwN" secondAttribute="bottom" constant="6" id="HjH-ZS-Fyd"/>
<constraint firstAttribute="trailing" secondItem="HPn-oR-fwN" secondAttribute="trailing" constant="10" id="UWg-Ky-pFk"/>
<constraint firstItem="30V-tZ-sKM" firstAttribute="top" secondItem="a9O-yo-tt7" secondAttribute="top" constant="5" id="bbW-oM-Kin"/>
</constraints>
</view>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iCF-sg-O3f">
<rect key="frame" x="16" y="104" width="350" height="18"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="18" id="HRL-wJ-bFn"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="iCF-sg-O3f" firstAttribute="leading" secondItem="7TA-sf-psf" secondAttribute="leadingMargin" constant="8" id="4KY-8D-8qP"/>
<constraint firstItem="sJt-9E-s2K" firstAttribute="top" secondItem="a9O-yo-tt7" secondAttribute="top" constant="2" id="5Ra-ef-FHh"/>
<constraint firstItem="a9O-yo-tt7" firstAttribute="top" secondItem="7TA-sf-psf" secondAttribute="top" constant="8" id="HWf-ib-XMV"/>
<constraint firstItem="a9O-yo-tt7" firstAttribute="leading" secondItem="sJt-9E-s2K" secondAttribute="trailing" constant="10" id="Q5f-O9-f43"/>
<constraint firstAttribute="bottom" secondItem="iCF-sg-O3f" secondAttribute="bottom" constant="12" id="Q5u-IP-jLc"/>
<constraint firstItem="a9O-yo-tt7" firstAttribute="bottom" secondItem="sJt-9E-s2K" secondAttribute="bottom" id="WW2-kv-9V6"/>
<constraint firstItem="sJt-9E-s2K" firstAttribute="leading" secondItem="7TA-sf-psf" secondAttribute="leading" constant="2" id="fbi-Aj-Nrm"/>
<constraint firstItem="iCF-sg-O3f" firstAttribute="trailing" secondItem="7TA-sf-psf" secondAttribute="trailingMargin" id="jlV-s5-D4q"/>
<constraint firstAttribute="height" constant="134" id="q4g-Q2-rNF"/>
<constraint firstAttribute="trailing" secondItem="a9O-yo-tt7" secondAttribute="trailing" constant="2" id="sS6-A4-taW"/>
<constraint firstItem="sJt-9E-s2K" firstAttribute="centerY" secondItem="7TA-sf-psf" secondAttribute="centerY" id="tZ3-LS-abt"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="5"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<view hidden="YES" opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nPG-R0-gIK" userLabel="ViewSide">
<rect key="frame" x="0.0" y="149" width="374" height="134"/>
<subviews>
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Nc7-9W-deG">
<rect key="frame" x="2" y="10" width="98" height="90"/>
<subviews>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8LA-21-S8y">
<rect key="frame" x="0.0" y="0.0" width="98" height="90"/>
<state key="normal" image="ic_passport_picture"/>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="i37-t7-haw">
<rect key="frame" x="96" y="8" width="2" height="74"/>
<color key="backgroundColor" name="ThemeSeparate"/>
<constraints>
<constraint firstAttribute="width" constant="2" id="9AU-0B-7q2"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="8LA-21-S8y" secondAttribute="bottom" id="AAl-Ab-YdT"/>
<constraint firstItem="8LA-21-S8y" firstAttribute="leading" secondItem="Nc7-9W-deG" secondAttribute="leading" id="IGq-g2-Xy6"/>
<constraint firstItem="i37-t7-haw" firstAttribute="top" secondItem="Nc7-9W-deG" secondAttribute="top" constant="8" id="Xbj-Nv-jdz"/>
<constraint firstAttribute="trailing" secondItem="i37-t7-haw" secondAttribute="trailing" id="aaR-cl-Q6v"/>
<constraint firstAttribute="width" constant="98" id="jp5-7W-yxZ"/>
<constraint firstAttribute="bottom" secondItem="i37-t7-haw" secondAttribute="bottom" constant="8" id="uze-Vm-8Sg"/>
<constraint firstItem="8LA-21-S8y" firstAttribute="top" secondItem="Nc7-9W-deG" secondAttribute="top" id="y3n-ud-j2E"/>
<constraint firstAttribute="trailing" secondItem="8LA-21-S8y" secondAttribute="trailing" id="yTl-CN-atI"/>
</constraints>
</view>
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Gp3-V6-GbW">
<rect key="frame" x="110" y="8" width="262" height="92"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="11" translatesAutoresizingMaskIntoConstraints="NO" id="M3F-L2-4xc">
<rect key="frame" x="0.0" y="19.5" width="262" height="53"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Side ID" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3pe-jb-ec2">
<rect key="frame" x="0.0" y="0.0" width="45.5" height="18"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="15"/>
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="AE2-x0-tVK">
<rect key="frame" x="0.0" y="29" width="55" height="24"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="10"/>
<state key="normal" title="View Sample">
<color key="titleColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</state>
</button>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="M3F-L2-4xc" firstAttribute="leading" secondItem="Gp3-V6-GbW" secondAttribute="leading" id="97g-H4-9Ao"/>
<constraint firstItem="M3F-L2-4xc" firstAttribute="centerY" secondItem="Gp3-V6-GbW" secondAttribute="centerY" id="FxS-Xn-a1Q"/>
<constraint firstItem="M3F-L2-4xc" firstAttribute="centerX" secondItem="Gp3-V6-GbW" secondAttribute="centerX" id="dHN-dm-mzl"/>
<constraint firstAttribute="trailing" secondItem="M3F-L2-4xc" secondAttribute="trailing" id="fOz-y3-Uja"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Please provide the side facing id card photo." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QCx-1g-YyR">
<rect key="frame" x="16" y="104" width="350" height="18"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="18" id="gm8-Is-5E7"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="Gp3-V6-GbW" firstAttribute="top" secondItem="nPG-R0-gIK" secondAttribute="top" constant="8" id="1Ub-e7-H3b"/>
<constraint firstItem="QCx-1g-YyR" firstAttribute="top" secondItem="Nc7-9W-deG" secondAttribute="bottom" constant="4" id="Ahl-dm-1FK"/>
<constraint firstItem="Gp3-V6-GbW" firstAttribute="leading" secondItem="Nc7-9W-deG" secondAttribute="trailing" constant="10" id="NKN-DU-aGm"/>
<constraint firstItem="Gp3-V6-GbW" firstAttribute="bottom" secondItem="Nc7-9W-deG" secondAttribute="bottom" id="ORZ-Ye-YML"/>
<constraint firstAttribute="bottom" secondItem="QCx-1g-YyR" secondAttribute="bottom" constant="12" id="Pfx-Iu-5fc"/>
<constraint firstItem="QCx-1g-YyR" firstAttribute="trailing" secondItem="nPG-R0-gIK" secondAttribute="trailingMargin" id="YuY-br-6QC"/>
<constraint firstItem="QCx-1g-YyR" firstAttribute="leading" secondItem="nPG-R0-gIK" secondAttribute="leadingMargin" constant="8" id="Zkb-Zk-7UL"/>
<constraint firstAttribute="trailing" secondItem="Gp3-V6-GbW" secondAttribute="trailing" constant="2" id="aSu-ne-eBR"/>
<constraint firstAttribute="height" constant="134" id="fgX-id-WQ3"/>
<constraint firstItem="Nc7-9W-deG" firstAttribute="top" secondItem="Gp3-V6-GbW" secondAttribute="top" constant="2" id="wZw-OU-wy3"/>
<constraint firstItem="Nc7-9W-deG" firstAttribute="leading" secondItem="nPG-R0-gIK" secondAttribute="leading" constant="2" id="xwf-3M-1ml"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="5"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Enter middle name" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="mty-ff-7Mb" customClass="ValidationTextField" customModule="JME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="164" width="374" height="48"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="iQA-GK-QCV"/>
</constraints>
<color key="textColor" name="ThemeText"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="17"/>
<textInputTraits key="textInputTraits" autocapitalizationType="words" keyboardType="alphabet" textContentType="additional-name"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="titleText" value="Amount"/>
<userDefinedRuntimeAttribute type="boolean" keyPath="isShowTitle" value="NO"/>
</userDefinedRuntimeAttributes>
</textField>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="PFz-G7-wHj" customClass="IQTextView" customModule="IQKeyboardManagerSwift">
<rect key="frame" x="0.0" y="242" width="374" height="100"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="100" id="coG-Kf-SAF"/>
</constraints>
<color key="textColor" systemColor="labelColor"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="placeholder" value="Message to JME (optional)"/>
<userDefinedRuntimeAttribute type="color" keyPath="placeholderTextColor">
<color key="value" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aGO-xn-Muw">
<rect key="frame" x="0.0" y="372" width="374" height="50"/>
<color key="backgroundColor" red="0.60553294833760074" green="0.63537097494677897" blue="0.70501660163869562" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="pgf-2H-udf"/>
</constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Semibold" family="San Francisco Display" pointSize="18"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="Save">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="saveAction:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="MUF-6g-JvH"/>
</connections>
</button>
</subviews>
</stackView>
</subviews>
<viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="rn8-Ik-CI7" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" constant="20" id="csu-G9-AEx"/>
<constraint firstItem="rn8-Ik-CI7" firstAttribute="top" secondItem="vDu-zF-Fre" secondAttribute="top" constant="40" id="dKP-Cx-R5s"/>
<constraint firstItem="vDu-zF-Fre" firstAttribute="trailing" secondItem="rn8-Ik-CI7" secondAttribute="trailing" constant="20" id="xea-PP-oAQ"/>
</constraints>
</view>
<connections>
<outlet property="amountField" destination="mty-ff-7Mb" id="A62-fP-7yA"/>
<outlet property="frontIdImageButton" destination="POg-bw-zVr" id="Jt0-0R-fbH"/>
<outlet property="frontIdView" destination="7TA-sf-psf" id="hSq-mj-p5r"/>
<outlet property="saveBtn" destination="aGO-xn-Muw" id="da3-cr-MCe"/>
<outlet property="textField" destination="PFz-G7-wHj" id="Xlr-An-aiC"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="35" y="99"/>
</scene>
</scenes>
<designables>
<designable name="mty-ff-7Mb">
<size key="intrinsicContentSize" width="168.5" height="34"/>
</designable>
</designables>
<resources>
<image name="ic_passport_picture" width="256" height="256"/>
<image name="passport_new" width="80" height="72"/>
<namedColor name="ThemeBlue">
<color red="0.047058823529411764" green="0.12941176470588237" blue="0.41176470588235292" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="ThemeSeparate">
<color red="0.82352941176470584" green="0.82352941176470584" blue="0.82352941176470584" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="ThemeText">
<color red="0.5490196078431373" green="0.58823529411764708" blue="0.62745098039215685" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<systemColor name="labelColor">
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

230
GME Remit/Modules/SlipUpload/SlipUploadViewController.swift

@ -0,0 +1,230 @@
//
// SlipUploadViewController.swift
// GME Remit
//
// Created by Yajan on 07/05/2022.
// Copyright © 2022 Gobal Money Express Co. Ltd. All rights reserved.
//
import UIKit
import IQKeyboardManagerSwift
import PMAlertController
import RxSwift
import RxCocoa
class SlipUploadViewController: UIViewController {
private let frontIDImageTrigger = BehaviorSubject<String?>(value: nil)
private let frontImageBase64 = BehaviorSubject<String?>(value: nil)
private var multiMediaManager: MultiMediaManager?
private let disposeBag = DisposeBag()
private var imageCropper: ImageCroper?
@IBOutlet weak var saveBtn: UIButton!
@IBOutlet weak var frontIdImageButton: UIButton!
@IBOutlet weak var textField: IQTextView!
@IBOutlet weak var amountField: ValidationTextField!
@IBOutlet weak var frontIdView: UIView!
var imgData: String?
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
setup()
self.setupUIBinding()
// Do any additional setup after loading the view.
}
func setupUI() {
self.validate()
saveBtn.layer.cornerRadius = 6
textField.layer.cornerRadius = 6
textField.layer.borderWidth = 1
textField.layer.borderColor = UIColor.themeSeparate.cgColor
self.title = "Slip Upload"
textField.placeholder = "Message to JME (optional)"
amountField.placeholder = "amount_text".localized()
frontIdView.layer.cornerRadius = 12
frontIdView.layer.borderWidth = 1
frontIdView.layer.borderColor = UIColor.themeSeparate.cgColor
}
func setup() {
amountField.addTarget(self, action: #selector(textChange(_:)), for: .editingChanged)
multiMediaManager = MultiMediaManager(presenter: self)
multiMediaManager?.delegate = self
imageCropper = ImageCroper(presentingViewController: self)
imageCropper?.delegate = self
}
@objc func textChange(_ sender: ValidationTextField) {
self.validate()
}
func validate() {
if let img = self.imgData {
self.saveBtn.isEnabled = self.amountField.text != ""
} else {
self.saveBtn.isEnabled = false
}
}
@IBAction func saveAction(_ sender: Any) {
self.showProgressHud()
self.saveKycInfo(image: self.imgData,amount: self.amountField.text, success: { msg in
self.hideProgressHud()
self.alertWithOk(type: .normal, message: msg, title: nil, okTitle: "OK", okAction: {
self.navigationController?.popViewController(animated: true)
})
}, failure: { error in
self.hideProgressHud()
self.alert(message: error.localizedDescription)
})
}
func setupUIBinding() {
frontIdImageButton.rx.tap.bind {[weak self] in
self?.multiMediaManager?.openPicker(mode: UIImagePickerController.CameraCaptureMode.photo)
// self?.multiMediaManager?.openCameraPicker()
}.disposed(by: disposeBag)
frontIDImageTrigger
.asDriverOnErrorJustComplete()
.drive(onNext: {[weak self] in
if let imageData = $0 {
if let dataDecoded = Data(base64Encoded: imageData, options: .ignoreUnknownCharacters) {
DispatchQueue.main.async {
self?.imgData = imageData
self?.frontIdImageButton.setImage(UIImage(data: dataDecoded), for: .normal)
self?.frontIdImageButton.addBlur()
self?.hideBorder(view: self?.frontIdView)
self?.validate()
}
} else if let url = URL(string: imageData) {
DispatchQueue.main.async {
self?.showProgressHud()
self?.frontIdImageButton.kf.setImage(with: url, for: .normal) { result in
self?.hideProgressHud()
switch result {
case .success(let value):
self?.frontImageBase64.onNext(value.image.toBase64())
case .failure(let error):
print("Job failed: \(error.localizedDescription)")
}
}
self?.frontIdImageButton.addBlur()
self?.hideBorder(view: self?.frontIdView)
}
}
} else {
self?.frontImageBase64.onNext(nil)
self?.frontIdImageButton.setImage(UIImage(named: "passport_new"), for: .normal)
}
}).disposed(by: disposeBag)
}
private func showSample() {
let image = UIImage(named: "deposit_slip")
let alertVC = PMAlertController(title: "", description: "", image: image, style: .alert)
alertVC.alertView.layer.cornerRadius = 5
let action = PMAlertAction(title: "ok_text".localized(), style: .cancel)
alertVC.addAction(action)
alertVC.modalPresentationStyle = .overFullScreen
self.present(alertVC, animated: true, completion: nil)
}
@IBAction func viewSampleAction(_ sender: Any) {
self.showSample()
}
func saveKycInfo(image: String?, amount: String?,
success: @escaping (String) -> Void,
failure: @escaping (Error) -> Void
) {
APIRouter.slipUpload(amount: amount ?? "")
.requestMultipart(
images: getImageParams(model: image),
needsAuthorization: true,
success: { (response: KYCResponseContainer) in
if (response.errorCode ?? "") == "1" {
let error = NSError(
domain: "Network",
code: 0,
userInfo: [NSLocalizedDescriptionKey : response.message ?? ""]
)
failure(error)
} else {
guard let message = response.message else {
return
}
success(message)
}
},
failure: failure)
}
private func getCompressedImage(base64: String) -> Data? {
guard let imageData = Data(base64Encoded: base64) else { return nil }
return UIImage(data: imageData)?.jpegData(compressionQuality: 0.6)
}
private func getImageParams(model: String?) -> [String: Data] {
var images: [String: Data] = [:]
// frontIDPicture
if let image = model {
if let data = getCompressedImage(base64: image) {
print("frontIdPic:\(data)")
images["DepositSlip"] = data
}
}
return images
}
}
extension SlipUploadViewController: MultimediaPresenterProtocol {
func presenting() -> UIViewController {
return self
}
}
// MARK: MultiMediaManagerDelegate
extension SlipUploadViewController: MultiMediaManagerDelegate {
func didFinishPickingWithImage(image: UIImage) {
self.imageCropper?.cropImage(image: image)
}
func didFinishPickingWithError(error: String) {
self.alert(type: .error, message: error)
}
func hideBorder(view: UIView?) {
view?.layer.borderWidth = 0
view?.layer.addShadow(with: .clear)
}
}
// MARK: ImageCropperDelegate
extension SlipUploadViewController: ImageCropperDelegate {
func didCropWith(image: UIImage) {
frontIDImageTrigger.onNext(image.toBase64())
}
func didFailedCropWith(error: Error) {
self.alert(type: .error, message: error.localizedDescription)
}
}

2
GME Remit/MultiLanguages/bn.lproj/Localizable.strings

@ -889,6 +889,8 @@
"todays_rate_text"="আজকের রেট";
"transaction_report_text"="লেনদেন রিপোর্ট";
"jme_account_statement_text"="একাউন্ট বিবৃতি সমূহ";
"jme_slip_upload_text" = "Slip Upload";
"jme_slip_upload_text" = "Slip Upload";
"notice_text"="নোটিশ";
"home_text"="বাসা";
"branch_text"="শাখা";

1
GME Remit/MultiLanguages/en.lproj/Localizable.strings

@ -73,6 +73,7 @@
"todays_rate_text" = "Today's Rate";
"transaction_report_text" = "Transaction Report";
"jme_account_statement_text" = "Account Statement";
"jme_slip_upload_text" = "Slip Upload";
"home_text" = "Home";
"notice_text" = "Notice";
"branch_text" = "Branch";

1
GME Remit/MultiLanguages/en_PH.lproj/Localizable.strings

@ -81,6 +81,7 @@
"todays_rate_text"="Ang palitan sa araw na ito";
"transaction_report_text"="Ulat sa Transaksyon";
"jme_account_statement_text"="Pahayag ng Account";
"jme_slip_upload_text" = "Slip Upload";
"notice_text"="Paunawa";
"home_text"="Home";
"branch_text"="Sangay";

2
GME Remit/MultiLanguages/ja.lproj/Localizable.strings

@ -16,7 +16,7 @@
"login_register_here_text" = "登録はこちら";
"user_id_empty_error" = "ユーザーIDは空欄には出来ません。";
"jme_slip_upload_text" = "Slip Upload";
"default_currency_text" = "日本円";
//Existing User Registration

6
GME Remit/Supported Files/Assets.xcassets/CreditCard/Contents.json

@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}

21
GME Remit/Supported Files/Assets.xcassets/deposit_slip.imageset/Contents.json

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "download.jpg",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

BIN
GME Remit/Supported Files/Assets.xcassets/deposit_slip.imageset/download.jpg

After

Width: 193  |  Height: 261  |  Size: 7.4 KiB

24
GME Remit/Supported Files/Assets.xcassets/slip-upload.imageset/Contents.json

@ -0,0 +1,24 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "upload-file.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}

BIN
GME Remit/Supported Files/Assets.xcassets/slip-upload.imageset/upload-file.png

After

Width: 476  |  Height: 512  |  Size: 2.6 KiB

2
Pods/IQKeyboardManagerSwift/IQKeyboardManagerSwift/IQTextView/IQTextView.swift

@ -68,7 +68,7 @@ open class IQTextView: UITextView {
}
private var placeholderInsets: UIEdgeInsets {
return UIEdgeInsets(top: self.textContainerInset.top, left: self.textContainerInset.left + self.textContainer.lineFragmentPadding, bottom: self.textContainerInset.bottom, right: self.textContainerInset.right + self.textContainer.lineFragmentPadding)
return UIEdgeInsets(top: self.textContainerInset.top, left: self.textContainerInset.left + self.textContainer.lineFragmentPadding + 4, bottom: self.textContainerInset.bottom, right: self.textContainerInset.right + self.textContainer.lineFragmentPadding + 4)
}
private var placeholderExpectedFrame: CGRect {

Loading…
Cancel
Save