Browse Source

Merge remote-tracking branch 'origin/dev-swift-d-4-19' into dev-swift-d

v0.17
Dibya 1 year ago
parent
commit
42f056d6a7
  1. 6
      GME Remit/Modules/BeneficiaryDetail/Module Interface/BeneficiaryDetailModuleInterface.swift
  2. 15
      GME Remit/Modules/BeneficiaryDetail/User Interface/Presenter/BeneficiaryDetailPresenter.swift
  3. 83
      GME Remit/Modules/BeneficiaryDetail/User Interface/View/BeneficiaryDetail.storyboard
  4. 11
      GME Remit/Modules/BeneficiaryDetail/User Interface/View/BeneficiaryDetailHeaderView.swift
  5. 38
      GME Remit/Modules/BeneficiaryDetail/User Interface/View/BeneficiaryDetailHeaderView.xib
  6. 32
      GME Remit/Modules/BeneficiaryDetail/User Interface/View/BeneficiaryDetailViewController.swift
  7. 12
      GME Remit/Modules/BeneficiaryDetail/User Interface/View/BeneficiaryTableViewCell.swift
  8. 28
      GME Remit/Modules/BeneficiaryDetail/User Interface/Wireframe/BeneficiaryDetailWireframe.swift
  9. 5
      GME Remit/Modules/BeneficiaryDetail/User Interface/Wireframe/BeneficiaryDetailWireframeInput.swift
  10. 1
      GME Remit/Modules/Home/User Interface/View/Custom/HomeCarouselView.swift
  11. 110
      GME Remit/Modules/Home/User Interface/View/Home.storyboard
  12. 47
      GME Remit/Modules/Home/User Interface/View/HomeViewController.swift
  13. 7
      GME Remit/Modules/RecipientModules/Recipients/Application Logic/Model/Recipient/PaymentMethodModel.swift
  14. 17
      GME Remit/Modules/RecipientModules/SetupRecipient/User Interface/Wireframe/SetupRecipientWireframe.swift
  15. 4
      GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyParent/Application Logic/Interactor/SendMoneyParentInteractor.swift
  16. 4
      GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyParent/User Interface/Wireframe/SendMoneyParentWireframe.swift
  17. 8
      GME Remit/Utilities/CustomUI/CustomPageControl.swift

6
GME Remit/Modules/BeneficiaryDetail/Module Interface/BeneficiaryDetailModuleInterface.swift

@ -6,6 +6,10 @@
//Copyright © 2023 Gobal Money Express Co. Ltd. All rights reserved.
//
protocol BeneficiaryDetailModuleInterface: class {
protocol BeneficiaryDetailModuleInterface: AnyObject {
func makeApiRequest()
func didPressBack()
func gotoSendMoney(_ reciptent: Recipient?,
_ paymentMethod: PaymentMethodModel?)
func openEditRecipient(who recipient: Recipient)
}

15
GME Remit/Modules/BeneficiaryDetail/User Interface/Presenter/BeneficiaryDetailPresenter.swift

@ -26,6 +26,21 @@ extension BeneficiaryDetailPresenter: BeneficiaryDetailModuleInterface {
self.view?.showLoading()
self.interactor?.makeApiRequest()
}
func didPressBack() {
wireframe?.back()
}
func gotoSendMoney(_ reciptent: Recipient?,
_ paymentMethod: PaymentMethodModel?) {
wireframe?.gotoSendMoney(reciptent,
paymentMethod)
}
func openEditRecipient(who recipient: Recipient) {
wireframe?.openEditRecipient(who: recipient)
}
}
// MARK: BeneficiaryDetail interactor output interface

83
GME Remit/Modules/BeneficiaryDetail/User Interface/View/BeneficiaryDetail.storyboard

@ -59,42 +59,8 @@
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="nhb-o1-ekZ">
<rect key="frame" x="20" y="70" width="335" height="630"/>
<rect key="frame" x="20" y="70" width="335" height="486"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<view key="tableFooterView" contentMode="scaleToFill" id="bfe-KV-1bh">
<rect key="frame" x="0.0" y="281" width="335" height="89"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="D0P-MT-gyH">
<rect key="frame" x="16" y="0.0" width="303" height="73"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="View JME Remit Policies and your payment method rights" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7Ix-yU-Ptr">
<rect key="frame" x="0.0" y="0.0" width="303" height="13"/>
<fontDescription key="fontDescription" name="FONTSPRINGDEMO-VolteSemiboldRegular" family="FONTSPRING DEMO - Volte Semibold" pointSize="10"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="forceRightToLeft" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" reversesTitleShadowWhenHighlighted="YES" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jac-30-JTB">
<rect key="frame" x="0.0" y="25" width="303" height="48"/>
<color key="backgroundColor" red="0.1803921568627451" green="0.53725490196078429" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="Y4A-kf-84t"/>
</constraints>
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" image="arrow.forward" catalog="system" title="Continue "/>
</button>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="D0P-MT-gyH" secondAttribute="bottom" constant="16" id="7UP-kH-wBg"/>
<constraint firstItem="D0P-MT-gyH" firstAttribute="leading" secondItem="bfe-KV-1bh" secondAttribute="leading" constant="16" id="Kq6-4j-XYF"/>
<constraint firstAttribute="trailing" secondItem="D0P-MT-gyH" secondAttribute="trailing" constant="16" id="LPb-dQ-oMr"/>
<constraint firstItem="D0P-MT-gyH" firstAttribute="top" secondItem="bfe-KV-1bh" secondAttribute="top" id="lvz-Mg-ou2"/>
</constraints>
</view>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="BeneficiaryTableViewCell" rowHeight="203" id="Zvf-x1-Wi5" customClass="BeneficiaryTableViewCell" customModule="JME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="50" width="335" height="203"/>
@ -109,9 +75,9 @@
<constraint firstAttribute="width" constant="20" id="O9G-yu-DCz"/>
<constraint firstAttribute="height" constant="20" id="Waa-yT-1im"/>
</constraints>
<color key="tintColor" red="0.0" green="0.80000000000000004" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="tintColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" image="circle.fill" catalog="system"/>
<buttonConfiguration key="configuration" style="plain" image="circle" catalog="system"/>
</button>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="D67-SU-D0Q">
<rect key="frame" x="70" y="0.0" width="265" height="195"/>
@ -204,17 +170,56 @@
</tableViewCell>
</prototypes>
</tableView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ezs-Qx-vNy">
<rect key="frame" x="16" y="556" width="343" height="128"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="D0P-MT-gyH">
<rect key="frame" x="0.0" y="27" width="343" height="70"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="View JME Remit Policies and your payment method rights" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7Ix-yU-Ptr">
<rect key="frame" x="0.0" y="0.0" width="343" height="10"/>
<fontDescription key="fontDescription" name="FONTSPRINGDEMO-VolteSemiboldRegular" family="FONTSPRING DEMO - Volte Semibold" pointSize="10"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="forceRightToLeft" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" reversesTitleShadowWhenHighlighted="YES" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jac-30-JTB">
<rect key="frame" x="0.0" y="22" width="343" height="48"/>
<color key="backgroundColor" red="0.1803921568627451" green="0.53725490196078429" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="Y4A-kf-84t"/>
</constraints>
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" image="arrow.forward" catalog="system" title="Continue "/>
<connections>
<action selector="didPressContinueButton:" destination="HSb-ou-7T5" eventType="touchUpInside" id="Egh-gp-A6v"/>
</connections>
</button>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="D0P-MT-gyH" firstAttribute="top" secondItem="ezs-Qx-vNy" secondAttribute="top" constant="27" id="IiQ-mc-HrP"/>
<constraint firstAttribute="bottom" secondItem="D0P-MT-gyH" secondAttribute="bottom" constant="31" id="TYc-CL-51T"/>
<constraint firstItem="D0P-MT-gyH" firstAttribute="leading" secondItem="ezs-Qx-vNy" secondAttribute="leading" id="bjQ-O3-xr4"/>
<constraint firstAttribute="trailing" secondItem="D0P-MT-gyH" secondAttribute="trailing" id="dbr-Zv-gKB"/>
</constraints>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="93B-7y-U8z"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="nhb-o1-ekZ" firstAttribute="top" secondItem="Msg-ak-twI" secondAttribute="bottom" id="2RT-CE-MJT"/>
<constraint firstItem="93B-7y-U8z" firstAttribute="bottom" secondItem="nhb-o1-ekZ" secondAttribute="bottom" id="3Ug-Pm-YXc"/>
<constraint firstItem="Msg-ak-twI" firstAttribute="leading" secondItem="93B-7y-U8z" secondAttribute="leading" id="7ni-2u-uVL"/>
<constraint firstItem="Msg-ak-twI" firstAttribute="top" secondItem="93B-7y-U8z" secondAttribute="top" id="JAR-Nf-npW"/>
<constraint firstItem="93B-7y-U8z" firstAttribute="trailing" secondItem="nhb-o1-ekZ" secondAttribute="trailing" constant="20" id="QOl-bd-eHQ"/>
<constraint firstItem="93B-7y-U8z" firstAttribute="bottom" secondItem="ezs-Qx-vNy" secondAttribute="bottom" constant="16" id="UeP-W0-z47"/>
<constraint firstItem="Msg-ak-twI" firstAttribute="trailing" secondItem="93B-7y-U8z" secondAttribute="trailing" id="baj-pm-Nbw"/>
<constraint firstItem="93B-7y-U8z" firstAttribute="trailing" secondItem="ezs-Qx-vNy" secondAttribute="trailing" constant="16" id="jRp-Ch-od6"/>
<constraint firstItem="nhb-o1-ekZ" firstAttribute="leading" secondItem="93B-7y-U8z" secondAttribute="leading" constant="20" id="o9y-fh-flB"/>
<constraint firstItem="ezs-Qx-vNy" firstAttribute="leading" secondItem="93B-7y-U8z" secondAttribute="leading" constant="16" id="qPG-ua-QWk"/>
<constraint firstItem="ezs-Qx-vNy" firstAttribute="top" secondItem="nhb-o1-ekZ" secondAttribute="bottom" id="tvv-At-DIi"/>
</constraints>
</view>
<size key="freeformSize" width="375" height="700"/>
@ -233,7 +238,7 @@
<image name="arrow.forward" catalog="system" width="128" height="95"/>
<image name="backIconBlack" width="21" height="16"/>
<image name="bank_deposit" width="54" height="54"/>
<image name="circle.fill" catalog="system" width="128" height="123"/>
<image name="circle" catalog="system" width="128" height="123"/>
<namedColor name="ThemeBlack">
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</namedColor>

11
GME Remit/Modules/BeneficiaryDetail/User Interface/View/BeneficiaryDetailHeaderView.swift

@ -1,9 +1,11 @@
//
import UIKit
import SDWebImage
class BeneficiaryDetailHeaderView: UITableViewHeaderFooterView {
var didPressUpdate: (() -> Void)?
static var identifier: String {
return String(describing: self)
}
@ -17,6 +19,7 @@ class BeneficiaryDetailHeaderView: UITableViewHeaderFooterView {
@IBOutlet weak var relationshipValueLabel: UILabel!
@IBOutlet weak var locationTitleLabel: UILabel!
@IBOutlet weak var locationValueLabel: UILabel!
@IBOutlet weak var profileImage: UIImageView!
/*
// Only override draw() if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
@ -26,8 +29,16 @@ class BeneficiaryDetailHeaderView: UITableViewHeaderFooterView {
*/
func commonSetup() {
let imagePath = GMEDB.shared.user.string(.profileImage)
let url = URL(string: imagePath ?? "")
profileImage.sd_setImage(with: url, placeholderImage: UIImage(named: "profile-1"))
updateButton.set(cornerRadius: 10)
updateButton.set(borderWidth: 2, of: .init(hex: "#2E89FF"))
updateButton.setTitleColor(.init(hex: "#2E89FF"), for: .normal)
}
@IBAction func didPressUpdateButton(_ sender: Any) {
didPressUpdate?()
}
}

38
GME Remit/Modules/BeneficiaryDetail/User Interface/View/BeneficiaryDetailHeaderView.xib

@ -4,6 +4,7 @@
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21678"/>
<capability name="Image references" minToolsVersion="12.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"/>
@ -24,7 +25,7 @@
<rect key="frame" x="0.0" y="0.0" width="583" height="456"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" alignment="top" spacing="32" translatesAutoresizingMaskIntoConstraints="NO" id="aDS-Ur-z6j">
<rect key="frame" x="0.0" y="0.0" width="583" height="456"/>
<rect key="frame" x="0.0" y="0.0" width="583" height="392"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="dRH-kU-ofV">
<rect key="frame" x="0.0" y="0.0" width="96" height="147"/>
@ -44,6 +45,9 @@
<color key="tintColor" red="0.18039215689999999" green="0.53725490200000003" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" title="Update"/>
<connections>
<action selector="didPressUpdateButton:" destination="-1" eventType="touchUpInside" id="J4C-vU-fUp"/>
</connections>
</button>
</subviews>
</stackView>
@ -53,12 +57,14 @@
<stackView opaque="NO" contentMode="scaleToFill" alignment="top" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="CCk-EB-IRl">
<rect key="frame" x="0.0" y="0.0" width="455" height="28"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="avatar" translatesAutoresizingMaskIntoConstraints="NO" id="h3i-Ff-cvM">
<rect key="frame" x="0.0" y="0.0" width="24" height="24"/>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="h3i-Ff-cvM">
<rect key="frame" x="0.0" y="1.9999999999999982" width="24" height="20.666666666666664"/>
<color key="tintColor" systemColor="systemBlueColor"/>
<constraints>
<constraint firstAttribute="width" constant="24" id="4GE-0k-q3Q"/>
<constraint firstAttribute="height" constant="24" id="8xJ-lv-h86"/>
</constraints>
<imageReference key="image" image="person.fill" catalog="system" symbolScale="medium"/>
</imageView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="lVO-cb-12f">
<rect key="frame" x="32" y="0.0" width="423" height="28"/>
@ -82,8 +88,9 @@
<stackView opaque="NO" contentMode="scaleToFill" alignment="top" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="nLI-6r-icB">
<rect key="frame" x="0.0" y="36" width="455" height="28"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="avatar" translatesAutoresizingMaskIntoConstraints="NO" id="dgU-AV-hy1">
<rect key="frame" x="0.0" y="0.0" width="24" height="24"/>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="phone.fill" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="dgU-AV-hy1">
<rect key="frame" x="0.0" y="1.6666666666666661" width="24" height="21.333333333333336"/>
<color key="tintColor" systemColor="systemBlueColor"/>
<constraints>
<constraint firstAttribute="width" constant="24" id="8px-TN-DFx"/>
<constraint firstAttribute="height" constant="24" id="WGz-4r-arI"/>
@ -111,8 +118,9 @@
<stackView opaque="NO" contentMode="scaleToFill" alignment="top" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="WAL-nn-fmB">
<rect key="frame" x="0.0" y="72" width="455" height="28"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="avatar" translatesAutoresizingMaskIntoConstraints="NO" id="0e3-j0-Rkg">
<rect key="frame" x="0.0" y="0.0" width="24" height="24"/>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="person.2.fill" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="0e3-j0-Rkg">
<rect key="frame" x="0.0" y="1.9999999999999982" width="24" height="20.666666666666664"/>
<color key="tintColor" systemColor="systemBlueColor"/>
<constraints>
<constraint firstAttribute="height" constant="24" id="4rG-wR-cHd"/>
<constraint firstAttribute="width" constant="24" id="cLd-Pp-AXF"/>
@ -140,8 +148,9 @@
<stackView opaque="NO" contentMode="scaleToFill" alignment="top" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="NUo-GK-jR6">
<rect key="frame" x="0.0" y="108" width="455" height="28"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="avatar" translatesAutoresizingMaskIntoConstraints="NO" id="sMg-xb-OHS">
<rect key="frame" x="0.0" y="0.0" width="24" height="24"/>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="location.circle.fill" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="sMg-xb-OHS">
<rect key="frame" x="0.0" y="0.99999999999999822" width="24" height="22.666666666666664"/>
<color key="tintColor" systemColor="systemBlueColor"/>
<constraints>
<constraint firstAttribute="width" constant="24" id="Ggd-4P-fj4"/>
<constraint firstAttribute="height" constant="24" id="v1l-6n-RmD"/>
@ -175,7 +184,7 @@
<constraints>
<constraint firstItem="aDS-Ur-z6j" firstAttribute="top" secondItem="HTO-pZ-QWG" secondAttribute="top" id="Abd-zh-uDT"/>
<constraint firstAttribute="trailing" secondItem="aDS-Ur-z6j" secondAttribute="trailing" id="Nsc-WY-1jQ"/>
<constraint firstAttribute="bottom" secondItem="aDS-Ur-z6j" secondAttribute="bottom" id="Zjb-eW-UL4"/>
<constraint firstAttribute="bottom" secondItem="aDS-Ur-z6j" secondAttribute="bottom" constant="64" id="Zjb-eW-UL4"/>
<constraint firstItem="aDS-Ur-z6j" firstAttribute="leading" secondItem="HTO-pZ-QWG" secondAttribute="leading" id="b0G-zz-yfF"/>
</constraints>
</view>
@ -196,6 +205,7 @@
<outlet property="mobileValueLabel" destination="eC0-je-pC7" id="AR1-Hd-mgb"/>
<outlet property="nameTitleLabel" destination="5JV-mF-sfQ" id="3AN-YZ-hCa"/>
<outlet property="nameValueLabel" destination="Mve-d1-oe2" id="Dbi-Sf-SUF"/>
<outlet property="profileImage" destination="LrN-sh-VUv" id="A8D-mX-cv1"/>
<outlet property="relationshipTitleLabel" destination="jRQ-jY-rgv" id="I1B-BW-xjX"/>
<outlet property="relationshipValueLabel" destination="l7P-Wg-OyY" id="HOr-uh-pWS"/>
<outlet property="updateButton" destination="oWf-Ce-WX4" id="D4V-MB-D2n"/>
@ -204,10 +214,16 @@
</view>
</objects>
<resources>
<image name="avatar" width="57" height="55"/>
<image name="location.circle.fill" catalog="system" width="128" height="123"/>
<image name="person.2.fill" catalog="system" width="128" height="81"/>
<image name="person.fill" catalog="system" width="128" height="120"/>
<image name="phone.fill" catalog="system" width="128" height="114"/>
<image name="user_image" width="96" height="96"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
<systemColor name="systemBlueColor">
<color red="0.0" green="0.47843137254901963" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>

32
GME Remit/Modules/BeneficiaryDetail/User Interface/View/BeneficiaryDetailViewController.swift

@ -14,6 +14,7 @@ class BeneficiaryDetailViewController: UIViewController {
var presenter: BeneficiaryDetailModuleInterface?
var reciptent: Recipient?
var selectedPayments: PaymentMethodModel?
// MARK: IBOutlets
@ -21,9 +22,6 @@ class BeneficiaryDetailViewController: UIViewController {
@IBOutlet weak var continueButton: UIButton!
//@IBOutlet weak var updateButton: UIButton!
@IBAction func backButton(_ sender: UIButton) {
self.navigationController?.popViewController(animated: true)
}
// MARK: VC's Life cycle
override func viewDidLoad() {
@ -45,6 +43,21 @@ class BeneficiaryDetailViewController: UIViewController {
// MARK: IBActions
@IBAction func backButton(_ sender: UIButton) {
presenter?.didPressBack()
}
@IBAction func didPressContinueButton(_ sender: Any) {
guard let selectedPayments = selectedPayments else {
self.alertWithOk(message: "Please select Payment Method")
return
}
presenter?.gotoSendMoney(self.reciptent, selectedPayments)
}
// MARK: Other Functions
private func setup() {
@ -55,6 +68,8 @@ class BeneficiaryDetailViewController: UIViewController {
//updateButton.set(cornerRadius: 10)
//updateButton.set(borderWidth: 2, of: .init(hex: "#2E89FF"))
}
}
extension BeneficiaryDetailViewController: UITableViewDataSource, UITableViewDelegate {
@ -65,6 +80,8 @@ extension BeneficiaryDetailViewController: UITableViewDataSource, UITableViewDel
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: BeneficiaryTableViewCell.identifier, for: indexPath) as! BeneficiaryTableViewCell
let status = (selectedPayments == reciptent?.paymentMethods?.elementAt(index: indexPath.row))
cell.isSelected(status)
cell.commonSetup(reciptent?.paymentMethods?.elementAt(index: indexPath.row))
return cell
}
@ -80,6 +97,10 @@ extension BeneficiaryDetailViewController: UITableViewDataSource, UITableViewDel
headerView.relationshipValueLabel.text = reciptent?.relationship
headerView.mobileValueLabel.text = reciptent?.mobile
headerView.locationValueLabel.text = reciptent?.address
headerView.didPressUpdate = { [weak self] in
guard let reciptent = self?.reciptent else { return }
self?.presenter?.openEditRecipient(who: reciptent)
}
// headerView.sectionTitleLabel.text = "TableView Heder \(section)"
return headerView
@ -93,6 +114,11 @@ extension BeneficiaryDetailViewController: UITableViewDataSource, UITableViewDel
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
selectedPayments = reciptent?.paymentMethods?.elementAt(index: indexPath.row)
self.tableView.reloadSections(IndexSet(integer: 0), with: .none)
}
}
// MARK: BeneficiaryDetailViewInterface

12
GME Remit/Modules/BeneficiaryDetail/User Interface/View/BeneficiaryTableViewCell.swift

@ -58,11 +58,15 @@ class BeneficiaryTableViewCell: UITableViewCell {
} else {
idNumberLabel.isHidden = true
}
if let isSelected = info?.isSelected, isSelected == true {
}
func isSelected(_ status:Bool) {
if status{
indicatorButton.tintColor = .themeRed
indicatorButton.setImage(UIImage(systemName: "largecircle.fill.circle"), for: .normal)
} else {
indicatorButton.tintColor = .themeGray1
indicatorButton.setImage(UIImage(systemName: "circle"), for: .normal)
}
}

28
GME Remit/Modules/BeneficiaryDetail/User Interface/Wireframe/BeneficiaryDetailWireframe.swift

@ -32,4 +32,32 @@ extension BeneficiaryDetailWireframe: BeneficiaryDetailWireframeInput {
self.view = viewController
return viewController
}
func back() {
self.view.navigationController?.popViewController(animated: true)
}
func gotoSendMoney(_ reciptent: Recipient?,
_ paymentMethod: PaymentMethodModel?) {
guard let navigationVC = view.navigationController else {
return
}
guard let reciptented = reciptent else {
return
}
let wireframe = SendMoneyParentWireframe()
wireframe.paymentMethod = paymentMethod
wireframe.open(for: reciptented, in: navigationVC)
}
func openEditRecipient(who recipient: Recipient) {
SetupRecipientWireframe().openEditFromBeneficeris(using: recipient, on: view) {
//self.output?.openedSetupRecipient()
}
}
}

5
GME Remit/Modules/BeneficiaryDetail/User Interface/Wireframe/BeneficiaryDetailWireframeInput.swift

@ -9,5 +9,8 @@
import Foundation
protocol BeneficiaryDetailWireframeInput: WireframeInput {
func back()
func gotoSendMoney(_ reciptent: Recipient?,
_ paymentMethod: PaymentMethodModel?)
func openEditRecipient(who recipient: Recipient)
}

1
GME Remit/Modules/Home/User Interface/View/Custom/HomeCarouselView.swift

@ -25,6 +25,7 @@ class HomeCarouselView: UIView {
private let pageControl: CustomPageControl = {
let view = CustomPageControl(frame: .zero)
view.backgroundColor = .themeWhite
view.currentPageIndicatorTintColor = .themeBlack
view.pageIndicatorTintColor = .themeGray2
view.translatesAutoresizingMaskIntoConstraints = false

110
GME Remit/Modules/Home/User Interface/View/Home.storyboard

@ -29,7 +29,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="alB-Pe-T92">
<rect key="frame" x="0.0" y="64" width="400" height="100"/>
<rect key="frame" x="0.0" y="96" width="400" height="100"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Documents" translatesAutoresizingMaskIntoConstraints="NO" id="UD8-ap-8xD">
<rect key="frame" x="24" y="14" width="67" height="72"/>
@ -79,7 +79,7 @@
</connections>
</view>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rYg-o8-m3E">
<rect key="frame" x="0.0" y="164" width="400" height="787"/>
<rect key="frame" x="0.0" y="196" width="400" height="755"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="32" translatesAutoresizingMaskIntoConstraints="NO" id="fsQ-oi-9f5">
<rect key="frame" x="0.0" y="0.0" width="400" height="134.5"/>
@ -108,11 +108,15 @@
<constraint firstAttribute="width" constant="13" id="PY1-YE-0vx"/>
<constraint firstAttribute="height" constant="17" id="a2I-Sr-5OW"/>
</constraints>
<color key="tintColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<inset key="contentEdgeInsets" minX="16" minY="3" maxX="16" maxY="5"/>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" image="addAccount9">
<buttonConfiguration key="configuration" style="plain" image="cir">
<directionalEdgeInsets key="contentInsets" top="0.0" leading="0.0" bottom="0.0" trailing="0.0"/>
</buttonConfiguration>
<connections>
<action selector="didPressCopyButton:" destination="HSb-ou-7T5" eventType="touchUpInside" id="4dp-Sp-d93"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="JPY 10,000" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OeT-9p-3lL">
<rect key="frame" x="16" y="81.5" width="79" height="16"/>
@ -133,7 +137,7 @@
<constraint firstAttribute="width" constant="140" id="glh-UA-irf"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="UPLOAD SLIP" image="addAccount9">
<state key="normal" title="UPLOAD SLIP" image="doc.badge.arrow.up.fill" catalog="system">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
@ -173,37 +177,81 @@
<constraint firstAttribute="bottom" secondItem="fsQ-oi-9f5" secondAttribute="bottom" id="ybz-wo-8X5"/>
</constraints>
</scrollView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="cmV-f6-xVu">
<rect key="frame" x="16" y="64" width="368" height="32"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="VwJ-3I-NPc">
<rect key="frame" x="0.0" y="0.0" width="368" height="32"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="frG-CG-zlO">
<rect key="frame" x="0.0" y="0.0" width="304" height="32"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_image" translatesAutoresizingMaskIntoConstraints="NO" id="uWJ-LO-XOz">
<rect key="frame" x="0.0" y="0.0" width="32" height="32"/>
<constraints>
<constraint firstAttribute="height" constant="32" id="ObI-hY-fPi"/>
<constraint firstAttribute="width" constant="32" id="jTI-YW-UaI"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="HI Rabin" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uZf-8n-nLc">
<rect key="frame" x="40" y="6" width="264" height="20"/>
<fontDescription key="fontDescription" name="FONTSPRINGDEMO-VolteSemiboldRegular" family="FONTSPRING DEMO - Volte Semibold" pointSize="20"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="LYH-A7-Ye8">
<rect key="frame" x="304" y="0.0" width="64" height="32"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vsZ-HA-Os6">
<rect key="frame" x="0.0" y="2" width="28" height="28"/>
<constraints>
<constraint firstAttribute="width" constant="28" id="F0T-mh-DXH"/>
<constraint firstAttribute="height" constant="28" id="uek-nj-eHS"/>
</constraints>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" image="notification_bell_new"/>
<connections>
<action selector="notificationItemClicked:" destination="HSb-ou-7T5" eventType="touchUpInside" id="cGA-hZ-DXO"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Wgk-V4-aEA">
<rect key="frame" x="36" y="2" width="28" height="28"/>
<constraints>
<constraint firstAttribute="width" constant="28" id="Ydk-Ag-koa"/>
<constraint firstAttribute="height" constant="28" id="kPk-gI-wE6"/>
</constraints>
<state key="normal" title="Button"/>
<buttonConfiguration key="configuration" style="plain" image="customer_support_new"/>
<connections>
<action selector="customerSupport:" destination="HSb-ou-7T5" eventType="touchUpInside" id="2yE-FV-SsB"/>
</connections>
</button>
</subviews>
</stackView>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</stackView>
</subviews>
<viewLayoutGuide key="safeArea" id="0Kl-lY-qUa"/>
<color key="backgroundColor" name="ThemeMainBackground"/>
<constraints>
<constraint firstItem="cmV-f6-xVu" firstAttribute="leading" secondItem="0Kl-lY-qUa" secondAttribute="leading" constant="16" id="1G6-n7-SuM"/>
<constraint firstItem="rYg-o8-m3E" firstAttribute="leading" secondItem="0Kl-lY-qUa" secondAttribute="leading" id="23C-K1-6aA"/>
<constraint firstItem="rYg-o8-m3E" firstAttribute="top" secondItem="alB-Pe-T92" secondAttribute="bottom" id="2jX-nq-TG2"/>
<constraint firstItem="0Kl-lY-qUa" firstAttribute="trailing" secondItem="cmV-f6-xVu" secondAttribute="trailing" constant="16" id="40z-hf-RLA"/>
<constraint firstItem="0Kl-lY-qUa" firstAttribute="trailing" secondItem="alB-Pe-T92" secondAttribute="trailing" id="44c-9q-5Zy"/>
<constraint firstItem="cmV-f6-xVu" firstAttribute="top" secondItem="0Kl-lY-qUa" secondAttribute="top" id="DzD-H9-XaU"/>
<constraint firstItem="alB-Pe-T92" firstAttribute="top" secondItem="cmV-f6-xVu" secondAttribute="bottom" id="RNX-i7-9Wk"/>
<constraint firstItem="alB-Pe-T92" firstAttribute="leading" secondItem="0Kl-lY-qUa" secondAttribute="leading" id="Req-1D-gfY"/>
<constraint firstItem="0Kl-lY-qUa" firstAttribute="bottom" secondItem="rYg-o8-m3E" secondAttribute="bottom" id="VSd-Q1-BEU"/>
<constraint firstItem="0Kl-lY-qUa" firstAttribute="trailing" secondItem="rYg-o8-m3E" secondAttribute="trailing" id="nbe-WI-gaa"/>
<constraint firstItem="alB-Pe-T92" firstAttribute="top" secondItem="0Kl-lY-qUa" secondAttribute="top" id="u2K-G9-1E9"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="JSG-8j-YZS">
<leftBarButtonItems>
<barButtonItem image="camera" id="QET-jC-Ccs"/>
<barButtonItem title="HI TESTER" width="100" id="lAD-0d-rna"/>
</leftBarButtonItems>
<rightBarButtonItems>
<barButtonItem image="notification_bell_new" id="V5p-kc-03o">
<connections>
<action selector="notificationItemClicked:" destination="HSb-ou-7T5" id="Uvk-sq-iHq"/>
</connections>
</barButtonItem>
<barButtonItem id="FVP-ju-TEK">
<connections>
<action selector="customerSupport:" destination="HSb-ou-7T5" id="txd-0O-g0j"/>
</connections>
</barButtonItem>
</rightBarButtonItems>
</navigationItem>
<navigationItem key="navigationItem" id="JSG-8j-YZS"/>
<simulatedTabBarMetrics key="simulatedBottomBarMetrics"/>
<size key="freeformSize" width="400" height="1000"/>
<connections>
@ -218,15 +266,15 @@
<outlet property="messageTitleLabel" destination="pcY-xj-hQb" id="TA6-79-Fl5"/>
<outlet property="messageView" destination="alB-Pe-T92" id="1Di-cQ-gdP"/>
<outlet property="messageViewHeightConstraint" destination="VxG-Dr-LRY" id="80H-Oh-yg2"/>
<outlet property="notificationItem" destination="V5p-kc-03o" id="CXv-cK-M0u"/>
<outlet property="profileImageButton" destination="QET-jC-Ccs" id="qDt-bU-RG4"/>
<outlet property="notificationItem" destination="vsZ-HA-Os6" id="GVh-Vr-SAy"/>
<outlet property="profileImage" destination="uWJ-LO-XOz" id="ofT-DO-cxg"/>
<outlet property="scrollView" destination="rYg-o8-m3E" id="M62-MC-gnY"/>
<outlet property="seperatorView" destination="17X-fv-KyB" id="dCf-y3-EMS"/>
<outlet property="stackView" destination="fsQ-oi-9f5" id="27r-gp-6Ah"/>
<outlet property="supportBarButton" destination="FVP-ju-TEK" id="Kpo-MA-q0M"/>
<outlet property="supportBarButton" destination="Wgk-V4-aEA" id="gVK-co-wjr"/>
<outlet property="tapMessageViewGestrueRecognizer" destination="G3V-VT-9Qm" id="XVK-LS-nug"/>
<outlet property="uploadSlipButton" destination="JYo-k5-OO8" id="W8d-uJ-vQn"/>
<outlet property="userName" destination="lAD-0d-rna" id="YCX-bo-C9X"/>
<outlet property="userName" destination="uZf-8n-nLc" id="Ynl-jo-FH0"/>
<outlet property="walletNumberLabel" destination="2D3-BA-yV3" id="jJz-yk-e3C"/>
</connections>
</viewController>
@ -242,7 +290,7 @@
<tabBarItem key="tabBarItem" title="Home" image="branch" id="If6-UM-LN6"/>
<toolbarItems/>
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="NbY-y6-481">
<rect key="frame" x="0.0" y="20" width="320" height="44"/>
<rect key="frame" x="0.0" y="20" width="320" height="50"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<nil name="viewControllers"/>
@ -258,10 +306,12 @@
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<resources>
<image name="Documents" width="201" height="216"/>
<image name="addAccount9" width="24" height="24"/>
<image name="branch" width="22" height="26"/>
<image name="camera" width="33" height="27"/>
<image name="cir" width="128" height="128"/>
<image name="customer_support_new" width="24" height="24"/>
<image name="doc.badge.arrow.up.fill" catalog="system" width="120" height="128"/>
<image name="notification_bell_new" width="24" height="24"/>
<image name="user_image" width="96" height="96"/>
<namedColor name="ThemeMainBackground">
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>

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

@ -10,6 +10,7 @@ import UIKit
import Localize_Swift
import LGSideMenuController
import SafariServices
import SDWebImage
#if DEBUG
import FLEX
@ -55,14 +56,13 @@ class HomeViewController: UIViewController {
return view
}()
@IBOutlet weak var accountDetailView: UIView!
@IBOutlet weak var notificationItem: UIBarButtonItem!
@IBOutlet weak var profileImageButton: UIBarButtonItem!
@IBOutlet weak var userName: UIBarButtonItem!
@IBOutlet weak var notificationItem: UIButton!
@IBOutlet weak var profileImage: UIImageView!
@IBOutlet weak var userName: UILabel!
@IBOutlet weak var scrollView: UIScrollView!
// MARK: IBOutlets
@IBOutlet private weak var supportBarButton: UIBarButtonItem!
@IBOutlet private weak var supportBarButton: UIButton!
//@IBOutlet private weak var tableView: UITableView!
@IBOutlet private weak var messageViewHeightConstraint: NSLayoutConstraint!
@ -258,11 +258,9 @@ class HomeViewController: UIViewController {
self.setup()
let sideMenuVC = (MainWireframe.shared?.window?.rootViewController as? LGSideMenuController)?
.leftViewController as? SideMenuViewController
presenter?.viewIsReady()
sideMenuVC?.sideMenuDelegate = self
setupNotificationBadge()
let supportImage = UIImage(named: "customer_support_new")?.withRenderingMode(.alwaysOriginal)
supportBarButton.image = supportImage
NotificationCenter.default.addObserver(
self,
selector: #selector(self.getYearlyLimitNotificationName),
@ -280,8 +278,9 @@ class HomeViewController: UIViewController {
name: NSNotification.Name(LCLLanguageChangeNotification),
object: nil
)
self.navigationController?.isNavigationBarHidden = true;
setNavBar(isUseMenu: false)
presenter?.viewIsReady()
if user?.redirectTo == "EKYC" {
self.initializeSDK()
}
@ -299,6 +298,7 @@ class HomeViewController: UIViewController {
blobView.removeFromSuperview()
MainWireframe.shared?.isUseSwipeGesture = false
navigationController?.interactivePopGestureRecognizer?.isEnabled = true
self.navigationController?.isNavigationBarHidden = false;
}
override func viewDidAppear(_ animated: Bool) {
@ -317,15 +317,13 @@ class HomeViewController: UIViewController {
setupDelegates()
setupNotifications()
addRefreshControlTableView()
userName.setTitleTextAttributes([
NSAttributedString.Key.font : UIFont.sanfrancisco(.bold, size: 20),
NSAttributedString.Key.foregroundColor : UIColor.themeBlack,
], for: .normal)
}
private func setupHierachy() {
notificationItem.setTitle("", for: .normal)
supportBarButton.setTitle("", for: .normal)
accountDetailView.setupCornerRadius(20,maskedCorners: [.layerMinXMaxYCorner, .layerMaxXMaxYCorner])
accountDetailView.layer.addShadow(with: UIColor.gray, shadowRadius: 10.0, shadowOffset: CGSize(width: 0, height: 1))
@ -364,8 +362,6 @@ class HomeViewController: UIViewController {
func setupNotificationBadge() {
//var badgeAppearance = BadgeAppearance()
//badgeAppearance.textColor = UIColor.red
let notificationImage = UIImage(named: "ic_notification_dot_new")?.withRenderingMode(.alwaysOriginal)
notificationItem.image = notificationImage
// notificationItem.badge(text: "\(notificationCount)", appearance: badgeAppearance)
}
@ -459,11 +455,9 @@ class HomeViewController: UIViewController {
walletNumberLabel.text = walletNumber == "" ? "N/A" : walletNumber
copyButton.setTitle("", for: .normal)
mainContainerView.setupCornerRadius(20,maskedCorners: [.layerMinXMaxYCorner, .layerMaxXMaxYCorner])
if let user = GMEDB.shared.user.string(.userId) , user.count > 9 {
userName.title = "\(user.prefix(9)).."
} else {
userName.title = "HI" + " " + (GMEDB.shared.user.string(.userId) ?? "")
}
userName.text = "HI" + " " + (GMEDB.shared.user.string(.userId) ?? "")
let url = URL(string: GMEDB.shared.user.string(.profileImage) ?? "")
profileImage.sd_setImage(with: url, placeholderImage: UIImage(named: "profile-1"))
self.homeCarouselView.update(bannerImage)
}
@ -479,10 +473,10 @@ class HomeViewController: UIViewController {
presenter?.openNotification()
}
@IBAction func customerSupport(_ sender: UIBarButtonItem) {
@IBAction func customerSupport(_ sender: Any) {
let actionArray = [ActionSheetElement(title: "Facebook", id: "https://www.facebook.com/jmeremit/", icon: "Facebook"), ActionSheetElement(title: "03-5475-3913", id: "tel://0354753913", icon: "contact")]
if UIDevice.current.userInterfaceIdiom == .pad {
ActionSheetHelper.shared.openWith(parentVc: self, button: self.supportBarButton, title: "help_you_text".localized(), values: actionArray) { (element) in
ActionSheetHelper.shared.openWith(parentVc: self, button: nil, title: "help_you_text".localized(), values: actionArray) { (element) in
UIApplication.tryURL(url: element.id)
}
} else {
@ -492,6 +486,13 @@ class HomeViewController: UIViewController {
}
}
@IBAction func didPressCopyButton(_ sender: Any) {
let copyString = "Account number: \(walletNumberLabel.text ?? "")"
UIPasteboard.general.string = copyString
self.alertWithOk(message: "Account Number Copied")
}
@objc private func refresh() {
presenter?.refreshData()
}

7
GME Remit/Modules/RecipientModules/Recipients/Application Logic/Model/Recipient/PaymentMethodModel.swift

@ -8,7 +8,7 @@
import ObjectMapper
struct PaymentMethodModel: Mappable, RecipientCommonType {
struct PaymentMethodModel: Equatable, Mappable, RecipientCommonType {
var id: String?
var name: String?
var currency: [String]?
@ -28,6 +28,11 @@ struct PaymentMethodModel: Mappable, RecipientCommonType {
self.name = name
self.localizedName = localizedName
}
static func == (lhs: PaymentMethodModel, rhs: PaymentMethodModel) -> Bool {
return (lhs.receiverId == rhs.receiverId
&& lhs.id == rhs.id)
}
init?(map: Map) {}

17
GME Remit/Modules/RecipientModules/SetupRecipient/User Interface/Wireframe/SetupRecipientWireframe.swift

@ -59,6 +59,23 @@ extension SetupRecipientWireframe: SetupRecipientWireframeInput {
navigationController.modalPresentationStyle = .overFullScreen
base.present(navigationController, animated: true, completion: completion)
}
func openEditFromBeneficeris(
using model: Recipient,
on base: UIViewController,
completion: (() -> Void)? = nil
) {
recipient = model
let viewcontroller = getMainView()
let navigationController = UINavigationController(
rootViewController: viewcontroller
)
navigationController.hero.isEnabled = true
navigationController.modalPresentationStyle = .overFullScreen
base.present(navigationController, animated: true, completion: completion)
}
func openNew(
with delegate: SetupRecipientDelegate,

4
GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyParent/Application Logic/Interactor/SendMoneyParentInteractor.swift

@ -15,10 +15,12 @@ class SendMoneyParentInteractor {
weak var output: SendMoneyParentInteractorOutput?
private let service: SendMoneyParentServiceType
var reciepient: Recipient?
var paymentMethod: PaymentMethodModel?
// MARK: Initialization
init(service: SendMoneyParentServiceType, reciepient: Recipient?) {
init(service: SendMoneyParentServiceType, reciepient: Recipient?, paymentMethod: PaymentMethodModel?) {
self.paymentMethod = paymentMethod
self.service = service
self.reciepient = reciepient
}

4
GME Remit/Modules/RemittanceModules/OverseasModules/SendMoneyParent/User Interface/Wireframe/SendMoneyParentWireframe.swift

@ -11,6 +11,7 @@ import UIKit
class SendMoneyParentWireframe {
weak var view: UIViewController!
var reciepient: Recipient?
var paymentMethod: PaymentMethodModel?
}
extension SendMoneyParentWireframe: SendMoneyParentWireframeInput {
@ -21,7 +22,8 @@ extension SendMoneyParentWireframe: SendMoneyParentWireframeInput {
let service = SendMoneyParentService()
let interactor = SendMoneyParentInteractor(
service: service,
reciepient: reciepient
reciepient: reciepient,
paymentMethod: paymentMethod
)
let presenter = SendMoneyParentPresenter()

8
GME Remit/Utilities/CustomUI/CustomPageControl.swift

@ -115,10 +115,10 @@ class CustomPageControl: UIControl {
//MARK: Helper methods...
private func getDotView() -> UIView {
let dot = UIView()
self.setupDotAppearance(dot: dot)
dot.translatesAutoresizingMaskIntoConstraints = false
return dot
let dot = UIView()
dot.translatesAutoresizingMaskIntoConstraints = false
self.setupDotAppearance(dot: dot)
return dot
}
private func setupDotAppearance(dot: UIView) {

Loading…
Cancel
Save