Browse Source

My transfers UI updated

v0.17
Dibya 1 year ago
parent
commit
658a33afaf
  1. BIN
      .DS_Store
  2. 4
      GME Remit.xcodeproj/project.pbxproj
  3. 20
      GME Remit/APIs/Router/APIRouter.swift
  4. 9
      GME Remit/Extensions/DataRequest+Ext.swift
  5. 25
      GME Remit/Modules/RecipientModules/Recipients/User Interface/View/Cell/RecipientsCollectionViewCell.swift
  6. 5
      GME Remit/Modules/RecipientModules/Recipients/User Interface/View/Cell/TransferListCollectionViewCell.swift
  7. 4
      GME Remit/Modules/RecipientModules/Recipients/User Interface/View/Cell/TransferListTableViewCell.swift
  8. 101
      GME Remit/Modules/RecipientModules/Recipients/User Interface/View/Recipients.storyboard
  9. 24
      GME Remit/Modules/RecipientModules/Recipients/User Interface/View/RecipientsViewController.swift
  10. 4
      GME Remit/Modules/RecipientModules/Recipients/User Interface/View/ViewModel/RecipientsViewModel.swift

BIN
.DS_Store

4
GME Remit.xcodeproj/project.pbxproj

@ -179,6 +179,7 @@
40B9B0AA24EC4ED1002C258C /* ExistingUserKycViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40B9B09F24EC4ED1002C258C /* ExistingUserKycViewController.swift */; };
40CB8F5824D980D500E1E64E /* NewRegisterRequestModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40CB8F5724D980D400E1E64E /* NewRegisterRequestModel.swift */; };
40D0D35124D2FEB900CEF6B4 /* OldUserRegisterRequestModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40D0D35024D2FEB900CEF6B4 /* OldUserRegisterRequestModel.swift */; };
41073C8E29EAB20100354CD0 /* RecipientsCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41073C8D29EAB20100354CD0 /* RecipientsCollectionViewCell.swift */; };
4122BA6E29BE062B0009E074 /* TransferListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4122BA6D29BE062B0009E074 /* TransferListTableViewCell.swift */; };
4122BA7029BE073D0009E074 /* TransferListCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4122BA6F29BE073D0009E074 /* TransferListCollectionViewCell.swift */; };
41F06FB129B712A2008E9E5D /* TransferListModuleInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41F06F9F29B712A2008E9E5D /* TransferListModuleInterface.swift */; };
@ -1056,6 +1057,7 @@
40CB8F5724D980D400E1E64E /* NewRegisterRequestModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewRegisterRequestModel.swift; sourceTree = "<group>"; };
40D0D35024D2FEB900CEF6B4 /* OldUserRegisterRequestModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OldUserRegisterRequestModel.swift; sourceTree = "<group>"; };
40DCDD5825426BD60010FC6A /* en_PH */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en_PH; path = en_PH.lproj/Localizable.strings; sourceTree = "<group>"; };
41073C8D29EAB20100354CD0 /* RecipientsCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecipientsCollectionViewCell.swift; sourceTree = "<group>"; };
4122BA6D29BE062B0009E074 /* TransferListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransferListTableViewCell.swift; sourceTree = "<group>"; };
4122BA6F29BE073D0009E074 /* TransferListCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TransferListCollectionViewCell.swift; sourceTree = "<group>"; };
41F06F9F29B712A2008E9E5D /* TransferListModuleInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransferListModuleInterface.swift; sourceTree = "<group>"; };
@ -3458,6 +3460,7 @@
4122BA6D29BE062B0009E074 /* TransferListTableViewCell.swift */,
4122BA6F29BE073D0009E074 /* TransferListCollectionViewCell.swift */,
73210DB422FC01C200715D6C /* RecipientCell.swift */,
41073C8D29EAB20100354CD0 /* RecipientsCollectionViewCell.swift */,
);
path = Cell;
sourceTree = "<group>";
@ -7999,6 +8002,7 @@
244C69B429B780A000D7B69A /* HomeViewControllerNew.swift in Sources */,
89EA0D8B243EC1C6003ACCC8 /* ChangePersonalInformationViewInterface.swift in Sources */,
41F06FB729B712A2008E9E5D /* TransferListWireframeInput.swift in Sources */,
41073C8E29EAB20100354CD0 /* RecipientsCollectionViewCell.swift in Sources */,
89739E3624459A630016251B /* SendMoneyReceiptModuleInterface.swift in Sources */,
405718D124D932AE0022CDDE /* NewUserRegisterViewInterface.swift in Sources */,
24BBCCE529CD7C430081F4A6 /* BeneficiaryDetailService.swift in Sources */,

20
GME Remit/APIs/Router/APIRouter.swift

@ -211,13 +211,14 @@ extension APIRouter: ApiServiceType {
return failure(error)
}
manager.request(
self.endpoint,
method: self.method,
parameters: self.parameters,
encoding: encoding,
headers: needsAuthorization ? afterLoginHeader : beforeLoginHeader
).handle(
).debugLog().handle(
success: { (response: ResponseContainer<Void>) in
if (response.errorCode ?? "") != "0" {
let code = Int(response.errorCode ?? "1") ?? 1
@ -248,13 +249,14 @@ extension APIRouter: ApiServiceType {
return failure(error)
}
manager.request(
self.endpoint,
method: self.method,
parameters: self.parameters,
encoding: encoding,
headers: needsAuthorization ? afterLoginHeader : beforeLoginHeader
).handle(
).debugLog().handle(
success: { (response: ResponseContainer<Element>) in
if (response.errorCode ?? "") != "0" {
let code = Int(response.errorCode ?? "1") ?? 1
@ -290,13 +292,14 @@ extension APIRouter: ApiServiceType {
return failure(error)
}
manager.request(
self.endpoint,
method: self.method,
parameters: self.parameters,
encoding: encoding,
headers: needsAuthorization ? afterLoginHeader : beforeLoginHeader
)
).debugLog()
.handle(
success: { (response: ResponseContainerObject<Element>) in
if (response.errorCode ?? "") != "0" {
@ -333,13 +336,14 @@ extension APIRouter: ApiServiceType {
return failure(error)
}
manager.request(
self.endpoint,
method: self.method,
parameters: self.parameters,
encoding: encoding,
headers: needsAuthorization ? afterLoginHeader : beforeLoginHeader
)
).debugLog()
.handle(
success: { (response: ResponseContainerArray<Element>) in
if (response.errorCode ?? "") != "0" {
@ -376,13 +380,14 @@ extension APIRouter: ApiServiceType {
return failure(error)
}
manager.request(
self.endpoint,
method: self.method,
parameters: self.parameters,
encoding: encoding,
headers: needsAuthorization ? afterLoginHeader : beforeLoginHeader
).handle(success: success, failure: failure)
).debugLog().handle(success: success, failure: failure)
}
func kftcRequest<T: Mappable>(
@ -402,13 +407,14 @@ extension APIRouter: ApiServiceType {
return failure(error)
}
manager.request(
self.endpoint,
method: self.method,
parameters: self.parameters,
encoding: encoding,
headers: header
).handle(success: success, failure: failure)
).debugLog().handle(success: success, failure: failure)
}
@ -429,7 +435,7 @@ extension APIRouter: ApiServiceType {
)
return failure(error)
}
manager.upload(
multipartFormData: { multipartFormData in
if !images.isEmpty {

9
GME Remit/Extensions/DataRequest+Ext.swift

@ -63,3 +63,12 @@ extension DataRequest {
return NSError.init(domain: "Network", code: code, userInfo: errorInfo)
}
}
extension Request {
public func debugLog() -> Self {
#if DEBUG
debugPrint(self)
#endif
return self
}
}

25
GME Remit/Modules/RecipientModules/Recipients/User Interface/View/Cell/RecipientsCollectionViewCell.swift

@ -0,0 +1,25 @@
//
import UIKit
class RecipientsCollectionViewCell: UICollectionViewCell {
@IBOutlet weak var initalsLabel: UILabel!
@IBOutlet weak var nameLabel: UILabel!
// MARK: Initializer
override func awakeFromNib() {
super.awakeFromNib()
setUp()
}
func setUp() {
initalsLabel.layer.masksToBounds = true
// initalsLabel.clipsToBounds = true
initalsLabel.layer.cornerRadius = self.initalsLabel.frame.width/2
}
func setUp(model: Recipient?) {
self.nameLabel.text = model?.firstName ?? ""
}
}

5
GME Remit/Modules/RecipientModules/Recipients/User Interface/View/Cell/TransferListCollectionViewCell.swift

@ -6,6 +6,11 @@ class TransferListCollectionViewCell: UICollectionViewCell {
@IBOutlet weak var imageView: UIImageView!
@IBOutlet weak var nameLabel: UILabel!
override class func awakeFromNib() {
super.awakeFromNib()
}
}

4
GME Remit/Modules/RecipientModules/Recipients/User Interface/View/Cell/TransferListTableViewCell.swift

@ -14,6 +14,7 @@ class TransferListTableViewCell: UITableViewCell {
@IBOutlet weak var dateLabel: UILabel!
@IBOutlet weak var statusLabel: UIButton!
@IBOutlet weak var containerView: UIView!
@IBOutlet weak var initialsLabel: UILabel!
private var model: Recipient?
@ -25,7 +26,8 @@ class TransferListTableViewCell: UITableViewCell {
editButton.layer.borderColor = UIColor(r: 46, g: 137, b: 255).cgColor
resendButton.layer.cornerRadius = 8
initialsLabel.clipsToBounds = true
initialsLabel.layer.cornerRadius = self.initialsLabel.frame.height/2
statusLabel.layer.cornerRadius = 10
}

101
GME Remit/Modules/RecipientModules/Recipients/User Interface/View/Recipients.storyboard

@ -350,7 +350,7 @@
<color key="titleColor" systemColor="systemBlueColor"/>
</state>
</button>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="h3h-DK-LWz">
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="h3h-DK-LWz">
<rect key="frame" x="0.0" y="37.5" width="375" height="85.5"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="10" minimumInteritemSpacing="10" id="HWe-os-f6e">
@ -360,7 +360,7 @@
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="contactsCell" id="ehg-vx-OZe" customClass="TransferListCollectionViewCell" customModule="JME_Remit" customModuleProvider="target">
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" tag="1" contentMode="center" reuseIdentifier="contactsCell" id="ehg-vx-OZe" customClass="TransferListCollectionViewCell" customModule="JME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="1.5" width="77" height="83"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<collectionViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="NQ6-Ag-Qjf">
@ -371,10 +371,13 @@
<rect key="frame" x="0.0" y="0.0" width="77" height="83"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="add-user" translatesAutoresizingMaskIntoConstraints="NO" id="MkN-z5-LXu">
<rect key="frame" x="0.0" y="0.0" width="77" height="52.5"/>
<rect key="frame" x="0.0" y="0.0" width="77" height="54"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Add New" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jj9-2F-O1e">
<rect key="frame" x="0.0" y="56.5" width="77" height="26.5"/>
<rect key="frame" x="0.0" y="58" width="77" height="25"/>
<constraints>
<constraint firstAttribute="height" constant="25" id="0BT-Db-gWN"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="12"/>
<color key="textColor" red="0.1803921568627451" green="0.53725490196078429" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
@ -395,6 +398,64 @@
<outlet property="nameLabel" destination="jj9-2F-O1e" id="uGT-xl-r0w"/>
</connections>
</collectionViewCell>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" tag="2" contentMode="center" reuseIdentifier="recipientCell" id="F5G-qF-M10" customClass="RecipientsCollectionViewCell" customModule="JME_Remit" customModuleProvider="target">
<rect key="frame" x="87" y="1.5" width="77" height="83"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<collectionViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="gYI-vc-EYg">
<rect key="frame" x="0.0" y="0.0" width="77" height="83"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillProportionally" spacing="4" translatesAutoresizingMaskIntoConstraints="NO" id="0o8-h2-gLc">
<rect key="frame" x="0.0" y="0.0" width="77" height="83"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FXi-ID-CS9">
<rect key="frame" x="0.0" y="0.0" width="77" height="54"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="RS" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="79V-Td-IQG">
<rect key="frame" x="11.5" y="0.0" width="54" height="54"/>
<color key="backgroundColor" red="0.1803921568627451" green="0.53725490196078429" blue="1" alpha="0.23999999999999999" colorSpace="custom" customColorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="54" id="8Fo-hv-8VS"/>
<constraint firstAttribute="width" constant="54" id="zCJ-wV-WcG"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.1803921568627451" green="0.53725490196078429" blue="1" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="79V-Td-IQG" firstAttribute="centerX" secondItem="FXi-ID-CS9" secondAttribute="centerX" id="DG1-kR-Dok"/>
<constraint firstItem="79V-Td-IQG" firstAttribute="centerY" secondItem="FXi-ID-CS9" secondAttribute="centerY" id="cGP-Dt-2RS"/>
<constraint firstAttribute="bottom" secondItem="79V-Td-IQG" secondAttribute="bottom" id="hkX-RD-kC4"/>
<constraint firstItem="79V-Td-IQG" firstAttribute="top" secondItem="FXi-ID-CS9" secondAttribute="top" id="rVp-5e-N2k"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Riju" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Z7L-DK-ZVR">
<rect key="frame" x="0.0" y="58" width="77" height="25"/>
<constraints>
<constraint firstAttribute="height" constant="25" id="4f9-og-Klv"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="12"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.87" colorSpace="custom" customColorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
<constraints>
<constraint firstItem="0o8-h2-gLc" firstAttribute="leading" secondItem="gYI-vc-EYg" secondAttribute="leading" id="Ihb-3W-8v7"/>
<constraint firstAttribute="bottom" secondItem="0o8-h2-gLc" secondAttribute="bottom" id="Mu9-iL-WgD"/>
<constraint firstAttribute="trailing" secondItem="0o8-h2-gLc" secondAttribute="trailing" id="VC3-BJ-XLg"/>
<constraint firstItem="0o8-h2-gLc" firstAttribute="top" secondItem="gYI-vc-EYg" secondAttribute="top" id="ZHW-C5-fse"/>
</constraints>
</collectionViewCellContentView>
<size key="customSize" width="77" height="83"/>
<connections>
<outlet property="initalsLabel" destination="79V-Td-IQG" id="t6Q-3L-d3d"/>
<outlet property="nameLabel" destination="Z7L-DK-ZVR" id="z5A-aP-626"/>
</connections>
</collectionViewCell>
</cells>
<connections>
<outlet property="dataSource" destination="hHp-2v-bDH" id="AYa-on-OoP"/>
@ -441,13 +502,27 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4Vx-uv-NNh">
<rect key="frame" x="4" y="4" width="327" height="153"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="avatar" translatesAutoresizingMaskIntoConstraints="NO" id="tga-oN-osM">
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Z73-2g-juM">
<rect key="frame" x="16" y="24" width="36" height="36"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="RS" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jmU-1a-y6d">
<rect key="frame" x="0.0" y="0.0" width="36" height="36"/>
<color key="backgroundColor" red="0.1803921568627451" green="0.53725490196078429" blue="1" alpha="0.23999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
<color key="textColor" red="0.1803921568627451" green="0.53725490196078429" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="36" id="B4z-6t-Qqh"/>
<constraint firstAttribute="width" constant="36" id="xYE-XO-Q3a"/>
<constraint firstAttribute="height" constant="36" id="NaL-K2-8Dm"/>
<constraint firstAttribute="bottom" secondItem="jmU-1a-y6d" secondAttribute="bottom" id="UTA-QG-d0r"/>
<constraint firstItem="jmU-1a-y6d" firstAttribute="top" secondItem="Z73-2g-juM" secondAttribute="top" id="bc5-MD-D3C"/>
<constraint firstItem="jmU-1a-y6d" firstAttribute="leading" secondItem="Z73-2g-juM" secondAttribute="leading" id="dfJ-eg-le1"/>
<constraint firstAttribute="width" constant="36" id="gQM-UN-piT"/>
<constraint firstAttribute="trailing" secondItem="jmU-1a-y6d" secondAttribute="trailing" id="n3a-CJ-Ox7"/>
</constraints>
</imageView>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9gK-1B-KjZ">
<rect key="frame" x="236" y="15" width="83" height="24"/>
<color key="backgroundColor" red="1" green="0.23137254900000001" blue="0.18823529410000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@ -509,17 +584,17 @@
</subviews>
<color key="backgroundColor" red="0.18039215689999999" green="0.53725490200000003" blue="1" alpha="0.040000000000000001" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="iXY-Av-XFB" firstAttribute="leading" secondItem="Z73-2g-juM" secondAttribute="trailing" constant="9" id="0iw-bb-Nmg"/>
<constraint firstItem="iXY-Av-XFB" firstAttribute="top" secondItem="4Vx-uv-NNh" secondAttribute="top" constant="24" id="4EF-wB-UCm"/>
<constraint firstItem="jnX-kl-zkA" firstAttribute="top" secondItem="eoe-x2-QPv" secondAttribute="bottom" constant="8" id="5yn-90-T3Y"/>
<constraint firstItem="9gK-1B-KjZ" firstAttribute="leading" secondItem="iXY-Av-XFB" secondAttribute="trailing" constant="8" symbolic="YES" id="FMU-o0-HXf"/>
<constraint firstAttribute="bottom" secondItem="5n0-KR-313" secondAttribute="bottom" constant="16" id="Gc6-0d-QKf"/>
<constraint firstItem="tga-oN-osM" firstAttribute="top" secondItem="4Vx-uv-NNh" secondAttribute="top" constant="24" id="Jf4-RR-Lrp"/>
<constraint firstItem="5n0-KR-313" firstAttribute="top" secondItem="jnX-kl-zkA" secondAttribute="bottom" constant="20" id="Od2-kf-5cz"/>
<constraint firstItem="9gK-1B-KjZ" firstAttribute="top" secondItem="4Vx-uv-NNh" secondAttribute="top" constant="15" id="QTl-AQ-gb3"/>
<constraint firstItem="eoe-x2-QPv" firstAttribute="leading" secondItem="tga-oN-osM" secondAttribute="trailing" constant="9" id="RW9-sb-hK4"/>
<constraint firstItem="eoe-x2-QPv" firstAttribute="top" secondItem="9gK-1B-KjZ" secondAttribute="bottom" constant="10" id="TwR-tr-lac"/>
<constraint firstAttribute="trailing" secondItem="5n0-KR-313" secondAttribute="trailing" constant="16" id="UjI-TC-Zay"/>
<constraint firstItem="iXY-Av-XFB" firstAttribute="leading" secondItem="tga-oN-osM" secondAttribute="trailing" constant="9" id="ZZ3-fN-XLT"/>
<constraint firstItem="Z73-2g-juM" firstAttribute="leading" secondItem="4Vx-uv-NNh" secondAttribute="leading" constant="16" id="VPX-X3-vDW"/>
<constraint firstItem="Z73-2g-juM" firstAttribute="top" secondItem="4Vx-uv-NNh" secondAttribute="top" constant="24" id="Zlr-Mc-HPv"/>
<constraint firstItem="jnX-kl-zkA" firstAttribute="leading" secondItem="eoe-x2-QPv" secondAttribute="leading" id="dfK-Fg-Ze3"/>
<constraint firstAttribute="trailing" secondItem="eoe-x2-QPv" secondAttribute="trailing" constant="8" id="fWH-ft-eCs"/>
<constraint firstItem="eoe-x2-QPv" firstAttribute="top" secondItem="iXY-Av-XFB" secondAttribute="bottom" constant="8" id="iBn-EZ-bKz"/>
@ -527,7 +602,7 @@
<constraint firstItem="e0Z-oA-9sX" firstAttribute="top" secondItem="eoe-x2-QPv" secondAttribute="bottom" constant="8" id="oOk-T1-Woz"/>
<constraint firstItem="5n0-KR-313" firstAttribute="leading" secondItem="4Vx-uv-NNh" secondAttribute="leading" constant="16" id="vRj-gh-T8o"/>
<constraint firstItem="e0Z-oA-9sX" firstAttribute="leading" secondItem="jnX-kl-zkA" secondAttribute="trailing" constant="16" id="vd0-fK-j2S"/>
<constraint firstItem="tga-oN-osM" firstAttribute="leading" secondItem="4Vx-uv-NNh" secondAttribute="leading" constant="16" id="vuL-3o-LZ3"/>
<constraint firstItem="eoe-x2-QPv" firstAttribute="leading" secondItem="Z73-2g-juM" secondAttribute="trailing" constant="9" id="zmS-Al-dTA"/>
</constraints>
</view>
</subviews>
@ -544,6 +619,7 @@
<outlet property="containerView" destination="4Vx-uv-NNh" id="B5V-gF-jk8"/>
<outlet property="dateLabel" destination="eoe-x2-QPv" id="KMD-4f-JxD"/>
<outlet property="editButton" destination="S6N-R0-I6w" id="YNN-Z6-WH7"/>
<outlet property="initialsLabel" destination="jmU-1a-y6d" id="eDG-Kw-g8b"/>
<outlet property="nameLabel" destination="iXY-Av-XFB" id="19G-Ip-D2H"/>
<outlet property="resendButton" destination="V4Y-CS-dqf" id="9R3-D7-s8W"/>
<outlet property="statusLabel" destination="9gK-1B-KjZ" id="Mq7-vU-3kt"/>
@ -613,7 +689,6 @@
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<resources>
<image name="add-user" width="32" height="32"/>
<image name="avatar" width="57" height="55"/>
<image name="flag_south_korea" width="512" height="512"/>
<image name="ic_cancel" width="12" height="12"/>
<image name="ic_delete" width="48" height="48"/>

24
GME Remit/Modules/RecipientModules/Recipients/User Interface/View/RecipientsViewController.swift

@ -176,6 +176,7 @@ extension RecipientsViewController {
self.viewWillLayoutSubviews()
}
self.tableView.reloadData()
self.collectionView.reloadData()
}
).disposed(by: disposeBag)
@ -281,12 +282,18 @@ extension RecipientsViewController: RecipientCellDelegate {
extension RecipientsViewController: UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return 10
return self.model?.count ?? 0 + 1
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "contactsCell", for: indexPath) as? TransferListCollectionViewCell else { return UICollectionViewCell() }
return cell
if indexPath.row == 0 {
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "contactsCell", for: indexPath) as? TransferListCollectionViewCell else { return UICollectionViewCell() }
return cell
} else {
guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "recipientCell", for: indexPath) as? RecipientsCollectionViewCell else { return UICollectionViewCell() }
cell.setUp(model: self.model?[indexPath.row])
return cell
}
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
@ -301,8 +308,15 @@ extension RecipientsViewController: UICollectionViewDelegate, UICollectionViewDa
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
if let navVC = self.navigationController {
navVC.push(BeneficiaryDetailWireframe().getMainView(), animated: true)
if indexPath.row == 0 {
self.viewModel.addRecipient()
} else {
if let navVC = self.navigationController {
navVC.push(BeneficiaryDetailWireframe().getMainView(), animated: true)
}
}
}
}

4
GME Remit/Modules/RecipientModules/Recipients/User Interface/View/ViewModel/RecipientsViewModel.swift

@ -149,6 +149,10 @@ class RecipientsViewModel: ViewModelType {
isProgress: progressLinker.asDriverOnErrorJustComplete()
)
}
func addRecipient() {
self.presenter?.openAddRecipient(with: self)
}
}
// MARK: - RecipientsViewModelInterface

Loading…
Cancel
Save