Browse Source

Merge branch 'refreshKFTC'

Conflicts:
	GME Remit.xcodeproj/project.pbxproj
	GMERemittance/Module/Home/User Interface/View/HomeViewController.swift
pull/1/head
InKwon James Kim 5 years ago
parent
commit
93baeb2977
  1. 8
      GME Remit.xcodeproj/project.pbxproj
  2. 10
      GME Remit.xcodeproj/xcshareddata/xcschemes/GME Remit.xcscheme
  3. 6
      GMERemittance/Assets.xcassets/addAccount/Contents.json
  4. 21
      GMERemittance/Assets.xcassets/addAccount/addAccount.imageset/Contents.json
  5. BIN
      GMERemittance/Assets.xcassets/addAccount/addAccount.imageset/addAccount.png
  6. 21
      GMERemittance/Assets.xcassets/addAccount/addAccount10.imageset/Contents.json
  7. BIN
      GMERemittance/Assets.xcassets/addAccount/addAccount10.imageset/addAccount10.png
  8. 21
      GMERemittance/Assets.xcassets/addAccount/addAccount2.imageset/Contents.json
  9. BIN
      GMERemittance/Assets.xcassets/addAccount/addAccount2.imageset/addAccount2.png
  10. 21
      GMERemittance/Assets.xcassets/addAccount/addAccount3.imageset/Contents.json
  11. BIN
      GMERemittance/Assets.xcassets/addAccount/addAccount3.imageset/addAccount3.png
  12. 21
      GMERemittance/Assets.xcassets/addAccount/addAccount4.imageset/Contents.json
  13. BIN
      GMERemittance/Assets.xcassets/addAccount/addAccount4.imageset/addAccount4.png
  14. 21
      GMERemittance/Assets.xcassets/addAccount/addAccount5.imageset/Contents.json
  15. BIN
      GMERemittance/Assets.xcassets/addAccount/addAccount5.imageset/addAccount5.png
  16. 21
      GMERemittance/Assets.xcassets/addAccount/addAccount6.imageset/Contents.json
  17. BIN
      GMERemittance/Assets.xcassets/addAccount/addAccount6.imageset/addAccount6.png
  18. 21
      GMERemittance/Assets.xcassets/addAccount/addAccount7.imageset/Contents.json
  19. BIN
      GMERemittance/Assets.xcassets/addAccount/addAccount7.imageset/addAccount7.png
  20. 21
      GMERemittance/Assets.xcassets/addAccount/addAccount8.imageset/Contents.json
  21. BIN
      GMERemittance/Assets.xcassets/addAccount/addAccount8.imageset/addAccount8.png
  22. 21
      GMERemittance/Assets.xcassets/addAccount/addAccount9.imageset/Contents.json
  23. BIN
      GMERemittance/Assets.xcassets/addAccount/addAccount9.imageset/addAccount9.png
  24. 21
      GMERemittance/Assets.xcassets/addAccount/renewal.imageset/Contents.json
  25. BIN
      GMERemittance/Assets.xcassets/addAccount/renewal.imageset/renewal.png
  26. 7
      GMERemittance/Library/WebLinks/WkWebView/WkWebViewController.swift
  27. 7
      GMERemittance/Model/User.swift
  28. 102
      GMERemittance/Module/AutoDebitModules/AutoDebit/User Interface/View/AutoDebit.storyboard
  29. 11
      GMERemittance/Module/AutoDebitModules/AutoDebit/User Interface/View/AutoDebitTableViewCell.swift
  30. 71
      GMERemittance/Module/AutoDebitModules/AutoDebit/User Interface/View/AutoDebitViewController.swift
  31. 8
      GMERemittance/Module/ExchangeRates/User Interface/View/ExchangeRates.storyboard
  32. 4
      GMERemittance/Module/ExchangeRates/User Interface/View/ExchangeRatesViewController.swift
  33. 2
      GMERemittance/Module/Home/Application Logic/Service/HomeServiceType.swift
  34. 34
      GMERemittance/Module/Home/User Interface/View/HomeViewController.swift
  35. 12
      GMERemittance/Module/SendMoneyModules/ResendExchange/User Interface/View/ResendExchange.storyboard
  36. 8
      GMERemittance/Module/SendMoneyModules/ResendExchange/User Interface/View/ResendExchangeViewController.swift
  37. 26
      GMERemittance/Module/SendMoneyModules/SendMoneyExchangeRate/User Interface/View/SendMoneyExchangeRate.storyboard
  38. 8
      GMERemittance/Module/SendMoneyModules/SendMoneyExchangeRate/User Interface/View/SendMoneyExchangeRateViewController.swift
  39. 11
      GMERemittance/Module/SideMenu/Auto refund/AutoRefundsViewController.swift
  40. 6
      GMERemittance/Module/SideMenu/Auto refund/autoRefund.storyboard
  41. 34
      GMERemittance/Utility/AppConstants.swift
  42. 22
      GMERemittance/Utility/GMEAlert/GMEAlertViewController.xib
  43. 36
      GMERemittance/Utility/GMENumberTextField.swift
  44. 22
      GMERemittanceTests/FunctionTest.swift
  45. 8
      en.lproj/Localizable.strings

8
GME Remit.xcodeproj/project.pbxproj

@ -212,6 +212,7 @@
7389601422C2F208003FEA90 /* TablePresenterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7389600922C2F208003FEA90 /* TablePresenterViewController.swift */; };
7389601722C2F558003FEA90 /* TablePresenterProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7389601622C2F558003FEA90 /* TablePresenterProtocol.swift */; };
7389601922C2FADD003FEA90 /* TableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7389601822C2FADD003FEA90 /* TableCell.swift */; };
738DEC1B22D429AB00936C2C /* FunctionTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 738DEC1A22D429AB00936C2C /* FunctionTest.swift */; };
739A7781228BB2B40018A1A9 /* DetailOrderModuleInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 739A776E228BB2B30018A1A9 /* DetailOrderModuleInterface.swift */; };
739A7782228BB2B40018A1A9 /* DetailOrderService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 739A7772228BB2B40018A1A9 /* DetailOrderService.swift */; };
739A7783228BB2B40018A1A9 /* DetailOrderServiceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 739A7773228BB2B40018A1A9 /* DetailOrderServiceType.swift */; };
@ -253,6 +254,7 @@
73BCCDD7228993040057B161 /* RewardGroup.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 73BCCDCC228993030057B161 /* RewardGroup.storyboard */; };
73BCCDD8228993040057B161 /* RewardGroupViewInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73BCCDCD228993030057B161 /* RewardGroupViewInterface.swift */; };
73BCCDD9228993040057B161 /* RewardGroupViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73BCCDCE228993030057B161 /* RewardGroupViewController.swift */; };
73BE702C22D33E6800E87DD2 /* GMENumberTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73BE702B22D33E6800E87DD2 /* GMENumberTextField.swift */; };
73FDCE1D225C167700CC6912 /* KeyChain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73FDCE1C225C167700CC6912 /* KeyChain.swift */; };
73FE8837228A4A8C00A5EB56 /* OrderHistoryModuleInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73FE8824228A4A8C00A5EB56 /* OrderHistoryModuleInterface.swift */; };
73FE8838228A4A8C00A5EB56 /* OrderHistoryService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73FE8828228A4A8C00A5EB56 /* OrderHistoryService.swift */; };
@ -2379,6 +2381,7 @@
7389600922C2F208003FEA90 /* TablePresenterViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TablePresenterViewController.swift; sourceTree = "<group>"; };
7389601622C2F558003FEA90 /* TablePresenterProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TablePresenterProtocol.swift; path = "GMERemittance/Utility/TablePresenter/Application Logic/Interactor/TablePresenterProtocol.swift"; sourceTree = SOURCE_ROOT; };
7389601822C2FADD003FEA90 /* TableCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableCell.swift; sourceTree = "<group>"; };
738DEC1A22D429AB00936C2C /* FunctionTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FunctionTest.swift; sourceTree = "<group>"; };
739A776E228BB2B30018A1A9 /* DetailOrderModuleInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DetailOrderModuleInterface.swift; sourceTree = "<group>"; };
739A7772228BB2B40018A1A9 /* DetailOrderService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DetailOrderService.swift; sourceTree = "<group>"; };
739A7773228BB2B40018A1A9 /* DetailOrderServiceType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DetailOrderServiceType.swift; sourceTree = "<group>"; };
@ -2420,6 +2423,7 @@
73BCCDCC228993030057B161 /* RewardGroup.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = RewardGroup.storyboard; sourceTree = "<group>"; };
73BCCDCD228993030057B161 /* RewardGroupViewInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RewardGroupViewInterface.swift; sourceTree = "<group>"; };
73BCCDCE228993030057B161 /* RewardGroupViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RewardGroupViewController.swift; sourceTree = "<group>"; };
73BE702B22D33E6800E87DD2 /* GMENumberTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GMENumberTextField.swift; sourceTree = "<group>"; };
73FDCE1C225C167700CC6912 /* KeyChain.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyChain.swift; sourceTree = "<group>"; };
73FE8824228A4A8C00A5EB56 /* OrderHistoryModuleInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OrderHistoryModuleInterface.swift; sourceTree = "<group>"; };
73FE8828228A4A8C00A5EB56 /* OrderHistoryService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OrderHistoryService.swift; sourceTree = "<group>"; };
@ -6195,6 +6199,7 @@
731154CB227C178A00FEBF7F /* APITest.swift */,
7310475B226960E70025D77D /* KeychainTest.swift */,
9FD2610E1FD00458007A511D /* Info.plist */,
738DEC1A22D429AB00936C2C /* FunctionTest.swift */,
);
path = GMERemittanceTests;
sourceTree = "<group>";
@ -10392,6 +10397,7 @@
73FDCE1C225C167700CC6912 /* KeyChain.swift */,
D96A4FBB2146079600CFD507 /* AppConstants.swift */,
BEF000C6226757D600AB5663 /* SecureKeypad.swift */,
73BE702B22D33E6800E87DD2 /* GMENumberTextField.swift */,
73A6E20622CF2E2500E9BC68 /* CopyableLabel.swift */,
);
path = Utility;
@ -13791,6 +13797,7 @@
D946719A21426DFB003924DB /* LoginPresenter.swift in Sources */,
D92B802C2140C3CB00A25B26 /* MainWireframe.swift in Sources */,
D922D9222134DCF000D43053 /* EditReciepientWireframeInput.swift in Sources */,
73BE702C22D33E6800E87DD2 /* GMENumberTextField.swift in Sources */,
D96A4FD921460B4A00CFD507 /* SplashScreenPresenter.swift in Sources */,
D9768C88213BAE92009E01BC /* User.swift in Sources */,
7301979022535135001954AB /* KycPresenter.swift in Sources */,
@ -14063,6 +14070,7 @@
files = (
731154CC227C178A00FEBF7F /* APITest.swift in Sources */,
7310475C226960E70025D77D /* KeychainTest.swift in Sources */,
738DEC1B22D429AB00936C2C /* FunctionTest.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

10
GME Remit.xcodeproj/xcshareddata/xcschemes/GME Remit.xcscheme

@ -28,6 +28,16 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "9FD261071FD00458007A511D"
BuildableName = "GMERemittanceTests.xctest"
BlueprintName = "GMERemittanceTests"
ReferencedContainer = "container:GME Remit.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference

6
GMERemittance/Assets.xcassets/addAccount/Contents.json

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

21
GMERemittance/Assets.xcassets/addAccount/addAccount.imageset/Contents.json

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

BIN
GMERemittance/Assets.xcassets/addAccount/addAccount.imageset/addAccount.png

After

Width: 48  |  Height: 48  |  Size: 1.2 KiB

21
GMERemittance/Assets.xcassets/addAccount/addAccount10.imageset/Contents.json

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

BIN
GMERemittance/Assets.xcassets/addAccount/addAccount10.imageset/addAccount10.png

After

Width: 48  |  Height: 48  |  Size: 1.4 KiB

21
GMERemittance/Assets.xcassets/addAccount/addAccount2.imageset/Contents.json

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

BIN
GMERemittance/Assets.xcassets/addAccount/addAccount2.imageset/addAccount2.png

After

Width: 48  |  Height: 48  |  Size: 343 B

21
GMERemittance/Assets.xcassets/addAccount/addAccount3.imageset/Contents.json

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

BIN
GMERemittance/Assets.xcassets/addAccount/addAccount3.imageset/addAccount3.png

After

Width: 48  |  Height: 48  |  Size: 1.0 KiB

21
GMERemittance/Assets.xcassets/addAccount/addAccount4.imageset/Contents.json

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

BIN
GMERemittance/Assets.xcassets/addAccount/addAccount4.imageset/addAccount4.png

After

Width: 48  |  Height: 48  |  Size: 252 B

21
GMERemittance/Assets.xcassets/addAccount/addAccount5.imageset/Contents.json

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

BIN
GMERemittance/Assets.xcassets/addAccount/addAccount5.imageset/addAccount5.png

After

Width: 48  |  Height: 48  |  Size: 332 B

21
GMERemittance/Assets.xcassets/addAccount/addAccount6.imageset/Contents.json

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

BIN
GMERemittance/Assets.xcassets/addAccount/addAccount6.imageset/addAccount6.png

After

Width: 48  |  Height: 48  |  Size: 1.4 KiB

21
GMERemittance/Assets.xcassets/addAccount/addAccount7.imageset/Contents.json

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

BIN
GMERemittance/Assets.xcassets/addAccount/addAccount7.imageset/addAccount7.png

After

Width: 48  |  Height: 48  |  Size: 1.4 KiB

21
GMERemittance/Assets.xcassets/addAccount/addAccount8.imageset/Contents.json

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

BIN
GMERemittance/Assets.xcassets/addAccount/addAccount8.imageset/addAccount8.png

After

Width: 48  |  Height: 48  |  Size: 1.4 KiB

21
GMERemittance/Assets.xcassets/addAccount/addAccount9.imageset/Contents.json

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

BIN
GMERemittance/Assets.xcassets/addAccount/addAccount9.imageset/addAccount9.png

After

Width: 48  |  Height: 48  |  Size: 1.4 KiB

21
GMERemittance/Assets.xcassets/addAccount/renewal.imageset/Contents.json

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

BIN
GMERemittance/Assets.xcassets/addAccount/renewal.imageset/renewal.png

After

Width: 64  |  Height: 64  |  Size: 2.6 KiB

7
GMERemittance/Library/WebLinks/WkWebView/WkWebViewController.swift

@ -94,9 +94,10 @@ extension WkWebViewController: WKScriptMessageHandler {
func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
print(message.name)
if let body = message.body as? String {
self.alert(message: body) {
self.dismiss(animated: true, completion: nil)
}
self.alertWithOk(
message: body,
title: "Success",
okAction: { self.dismiss(animated: true, completion: nil) })
}
}
}

7
GMERemittance/Model/User.swift

@ -50,6 +50,7 @@ struct UserKeys {
static let Id = "Id"
static let Data = "Data"
static let isUseBiometricAuth = "com.gmeremit.isUseBiometricAuth"
static let remindKFTCTokenDay = "remindKFTCTokenDay"
}
class UserContainer: Mappable {
@ -109,6 +110,9 @@ class User: Mappable {
var Data: String?
var platforms: [Platform] = []
var accessTokenRegTime: String?
var accessTokenExpTime: String?
required init?(map: Map) {
}
@ -150,6 +154,9 @@ class User: Mappable {
Data <- map["Data"]
kftcClientId <- map["kftcClientId"]
pennyTestStatus <- map["pennyTestStatus"]
accessTokenRegTime <- map["accessTokenRegTime"]
accessTokenExpTime <- map["accessTokenExpTime"]
}
}

102
GMERemittance/Module/AutoDebitModules/AutoDebit/User Interface/View/AutoDebit.storyboard

@ -27,12 +27,12 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="7" translatesAutoresizingMaskIntoConstraints="NO" id="pqf-bC-K46">
<rect key="frame" x="10" y="64" width="355" height="598"/>
<rect key="frame" x="10" y="84" width="355" height="101.5"/>
<subviews>
<view hidden="YES" opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="L6q-bk-mo5">
<rect key="frame" x="0.0" y="-80" width="355" height="80"/>
<view opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="L6q-bk-mo5">
<rect key="frame" x="0.0" y="0.0" width="355" height="80"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_add_account" translatesAutoresizingMaskIntoConstraints="NO" id="bme-6F-zQd">
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="renewal" translatesAutoresizingMaskIntoConstraints="NO" id="bme-6F-zQd">
<rect key="frame" x="20" y="20" width="40" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="qOk-gU-8oz"/>
@ -40,8 +40,8 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Add Auto Debit Account" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3RL-rJ-PRr">
<rect key="frame" x="77" y="30" width="173" height="20.5"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="17"/>
<rect key="frame" x="77" y="30" width="177" height="20.5"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="17"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
@ -62,41 +62,55 @@
</connections>
</view>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DMZ-o5-axc">
<rect key="frame" x="0.0" y="0.0" width="355" height="15"/>
<rect key="frame" x="0.0" y="87" width="355" height="14.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VRu-gs-I8D">
<rect key="frame" x="0.0" y="0.0" width="8" height="15"/>
<constraints>
<constraint firstAttribute="width" constant="8" id="cIR-pO-RSR"/>
</constraints>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="1000" text="Swipe left to Edit or Delete account." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0mw-Yn-hpm">
<rect key="frame" x="0.0" y="0.0" width="355" height="14.5"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="1000" text="Swipe left to “Edit” or “Delete” account." lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0mw-Yn-hpm">
<rect key="frame" x="8" y="0.0" width="347" height="15"/>
</subviews>
</stackView>
</subviews>
</stackView>
<tableView opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="LTI-ab-Zaj">
<rect key="frame" x="10" y="192.5" width="355" height="464.5"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<view key="tableFooterView" contentMode="scaleToFill" id="qfm-5F-dVx">
<rect key="frame" x="0.0" y="110" width="355" height="70"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iKW-nd-Zel">
<rect key="frame" x="157.5" y="15" width="40" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="qB1-5W-lcn"/>
<constraint firstAttribute="width" constant="40" id="nzP-kK-1ss"/>
<constraint firstAttribute="height" constant="40" id="oEA-1t-qWn"/>
</constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<state key="normal" image="addAccount9">
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="touchAddAccountCellButton:" destination="EV3-Yh-COv" eventType="touchUpInside" id="RIx-xa-qXW"/>
</connections>
</button>
</subviews>
</stackView>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="LTI-ab-Zaj">
<rect key="frame" x="0.0" y="22" width="355" height="576"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="iKW-nd-Zel" firstAttribute="centerX" secondItem="qfm-5F-dVx" secondAttribute="centerX" id="JtP-il-Dp1"/>
<constraint firstItem="iKW-nd-Zel" firstAttribute="centerY" secondItem="qfm-5F-dVx" secondAttribute="centerY" id="rul-8U-ycX"/>
</constraints>
</view>
<prototypes>
<tableViewCell opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="AutoDebitTableViewCell" rowHeight="90" id="zqt-r5-jIP" customClass="AutoDebitTableViewCell" customModule="GME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="28" width="355" height="90"/>
<tableViewCell opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="AutoDebitTableViewCell" rowHeight="82" id="zqt-r5-jIP" customClass="AutoDebitTableViewCell" customModule="GME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="28" width="355" height="82"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="zqt-r5-jIP" id="Sk5-JJ-2iK">
<rect key="frame" x="0.0" y="0.0" width="355" height="90"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" ambiguous="YES" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="zqt-r5-jIP" id="Sk5-JJ-2iK">
<rect key="frame" x="0.0" y="0.0" width="355" height="82"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FIK-OV-SBT">
<rect key="frame" x="10" y="5" width="335" height="80"/>
<rect key="frame" x="0.0" y="0.0" width="355" height="80"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M7t-0u-gH4">
<rect key="frame" x="20" y="20" width="40" height="40"/>
@ -109,16 +123,16 @@
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillProportionally" translatesAutoresizingMaskIntoConstraints="NO" id="eUe-lZ-JIJ">
<rect key="frame" x="80" y="10" width="250" height="60"/>
<rect key="frame" x="80" y="10" width="270" height="60"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Bank Alias" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="4" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pti-fz-pDe">
<rect key="frame" x="0.0" y="0.0" width="250" height="31"/>
<rect key="frame" x="0.0" y="0.0" width="270" height="31"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="17"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Bank Account" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="4" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BvO-gw-4zj">
<rect key="frame" x="0.0" y="31" width="250" height="29"/>
<rect key="frame" x="0.0" y="31" width="270" height="29"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="16"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
@ -149,13 +163,13 @@
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="FIK-OV-SBT" firstAttribute="top" secondItem="Sk5-JJ-2iK" secondAttribute="top" constant="5" id="BsS-h5-9TY"/>
<constraint firstAttribute="bottom" secondItem="FIK-OV-SBT" secondAttribute="bottom" constant="5" id="Mht-yE-bkc"/>
<constraint firstAttribute="trailing" secondItem="FIK-OV-SBT" secondAttribute="trailing" constant="10" id="lkH-qo-4rt"/>
<constraint firstItem="FIK-OV-SBT" firstAttribute="leading" secondItem="Sk5-JJ-2iK" secondAttribute="leading" constant="10" id="yJC-co-1ac"/>
<constraint firstItem="FIK-OV-SBT" firstAttribute="top" secondItem="Sk5-JJ-2iK" secondAttribute="top" id="BsS-h5-9TY"/>
<constraint firstAttribute="bottom" secondItem="FIK-OV-SBT" secondAttribute="bottom" id="Mht-yE-bkc"/>
<constraint firstAttribute="trailing" secondItem="FIK-OV-SBT" secondAttribute="trailing" id="lkH-qo-4rt"/>
<constraint firstItem="FIK-OV-SBT" firstAttribute="leading" secondItem="Sk5-JJ-2iK" secondAttribute="leading" id="yJC-co-1ac"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="accountNumnerLabel" destination="BvO-gw-4zj" id="z36-D4-PKA"/>
<outlet property="labelRecipientName" destination="pti-fz-pDe" id="44v-fR-PsD"/>
@ -165,26 +179,27 @@
</prototypes>
</tableView>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="backgroundColor" red="0.90588235289999997" green="0.92941176469999998" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="PXQ-gX-mza" firstAttribute="trailing" secondItem="pqf-bC-K46" secondAttribute="trailing" constant="10" id="2Ka-da-LIo"/>
<constraint firstItem="pqf-bC-K46" firstAttribute="top" secondItem="PXQ-gX-mza" secondAttribute="top" id="hdI-YY-NWf"/>
<constraint firstAttribute="bottom" secondItem="pqf-bC-K46" secondAttribute="bottom" constant="5" id="spe-by-yzQ"/>
<constraint firstItem="LTI-ab-Zaj" firstAttribute="leading" secondItem="PXQ-gX-mza" secondAttribute="leading" constant="10" id="BuZ-Ge-9DE"/>
<constraint firstAttribute="bottom" secondItem="LTI-ab-Zaj" secondAttribute="bottom" constant="10" id="YaJ-Q1-ETL"/>
<constraint firstItem="PXQ-gX-mza" firstAttribute="trailing" secondItem="LTI-ab-Zaj" secondAttribute="trailing" constant="10" id="bRy-kF-L0z"/>
<constraint firstItem="LTI-ab-Zaj" firstAttribute="top" secondItem="pqf-bC-K46" secondAttribute="bottom" constant="7" id="cad-83-5fw"/>
<constraint firstItem="pqf-bC-K46" firstAttribute="top" secondItem="PXQ-gX-mza" secondAttribute="top" constant="20" id="hdI-YY-NWf"/>
<constraint firstItem="pqf-bC-K46" firstAttribute="leading" secondItem="PXQ-gX-mza" secondAttribute="leading" constant="10" id="wZ9-xX-4sr"/>
</constraints>
<viewLayoutGuide key="safeArea" id="PXQ-gX-mza"/>
</view>
<navigationItem key="navigationItem" id="HBF-cT-CMV">
<rightBarButtonItems>
<barButtonItem title="Add" id="AY7-S2-Bzm">
<barButtonItem id="AY7-S2-Bzm">
<color key="tintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<action selector="touchAddAccountButton:" destination="EV3-Yh-COv" id="mz9-su-fSp"/>
</connections>
</barButtonItem>
<barButtonItem systemItem="refresh" id="TOA-TZ-bfD">
<barButtonItem style="plain" id="TOA-TZ-bfD">
<color key="tintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<action selector="touchRefreshAccountButton:" destination="EV3-Yh-COv" id="uuU-cW-GYI"/>
@ -244,8 +259,9 @@
</scene>
</scenes>
<resources>
<image name="ic_add_account" width="63" height="63"/>
<image name="addAccount9" width="48" height="48"/>
<image name="ic_bank" width="51" height="51"/>
<image name="renewal" width="64" height="64"/>
</resources>
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</document>

11
GMERemittance/Module/AutoDebitModules/AutoDebit/User Interface/View/AutoDebitTableViewCell.swift

@ -17,9 +17,14 @@ class AutoDebitTableViewCell: UITableViewCell {
let name = model?.bankName
labelRecipientName.text = name
accountNumnerLabel.text = model?.accountNumMasked
mainView.layer.borderColor = UIColor(red:0.91, green:0.93, blue:0.95, alpha:1.0).cgColor
mainView.layer.borderWidth = 1
mainView.layer.cornerRadius = 10
// mainView.layer.borderColor = UIColor(red:0.91, green:0.93, blue:0.95, alpha:1.0).cgColor
// mainView.layer.borderWidth = 1
// mainView.layer.cornerRadius = 10
layer.borderColor = UIColor(red:0.91, green:0.93, blue:0.95, alpha:1.0).cgColor
layer.borderWidth = 1
layer.cornerRadius = 10
}

71
GMERemittance/Module/AutoDebitModules/AutoDebit/User Interface/View/AutoDebitViewController.swift

@ -38,12 +38,9 @@ class AutoDebitViewController: UIViewController {
var languages: [String] = ["--- Select Language ---"]
lazy var languageTextField = UITextField(frame: .zero)
var selectedLanguage: KftcLanguage? {
didSet {
// print("\(selectedLanguage?.value ?? "undefined")")
// presenter?.goRefreshToken(selectedLanguage: selectedLanguage)
}
}
var selectedLanguage: KftcLanguage?
private lazy var refreshControl = UIRefreshControl()
private var kftcDetail: KFTCModel? {
didSet {
@ -66,6 +63,9 @@ class AutoDebitViewController: UIViewController {
else {
refreshAccountButton.isEnabled = false
refreshAccountButton.tintColor = .clear
labelSwipeInfo.isHidden = true
viewAddAccount.isHidden = true
return
}
@ -74,6 +74,8 @@ class AutoDebitViewController: UIViewController {
refreshAccountButton.isEnabled = true
refreshAccountButton.tintColor = .black
labelSwipeInfo.isHidden = false
viewAddAccount.isHidden = false
}
}
@ -83,7 +85,7 @@ class AutoDebitViewController: UIViewController {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
setLargeTitle()
// setLargeTitle()
setupNormalNavigation()
navigationItem.title = multiLanguages.navigationTitle
@ -97,7 +99,7 @@ class AutoDebitViewController: UIViewController {
setupDelegates()
viewAddAccount.layer.cornerRadius = 10
navigationController?.navigationBar.shadowImage = UIImage()
// navigationController?.navigationBar.shadowImage = UIImage()
// tabBarController?.tabBar.shadowImage = UIImage()
}
@ -107,15 +109,18 @@ class AutoDebitViewController: UIViewController {
view.endEditing(true)
if #available(iOS 11.0, *) {
navigationController?.navigationBar.prefersLargeTitles = false
}
// if #available(iOS 11.0, *) {
// navigationController?.navigationBar.prefersLargeTitles = false
// }
}
// MARK:- IBAction
@IBAction func touchAddAccountButton(_ sender: UIBarButtonItem) {
addNewAccount(UITapGestureRecognizer())
presenter?.goAddAccount(model: kftcDetail)
}
@IBAction func touchAddAccountCellButton(_ sender: UIButton) {
presenter?.goAddAccount(model: kftcDetail)
}
@IBAction func touchRefreshAccountButton(_ sender: UIBarButtonItem) {
@ -137,8 +142,19 @@ class AutoDebitViewController: UIViewController {
self.languageTextField.becomeFirstResponder()
self.languageTextField.keyboardToolbar.doneBarButton.setTarget(self, action: #selector(self.editingDidEnd(_:)))
DispatchQueue.main.asyncAfter(deadline: .now()){[weak self] in
guard let `self` = self else {return}
self.tableView.refreshControl?.endRefreshing()
}
},
cancelAction: nil
cancelAction: {
DispatchQueue.main.asyncAfter(deadline: .now()){[weak self] in
guard let `self` = self else {return}
self.tableView.refreshControl?.endRefreshing()
}
}
)
}
@ -148,7 +164,8 @@ class AutoDebitViewController: UIViewController {
@IBAction
private func addNewAccount(_ sender: UITapGestureRecognizer) {
presenter?.goAddAccount(model: kftcDetail)
// presenter?.goAddAccount(model: kftcDetail)
touchRefreshAccountButton(UIBarButtonItem())
}
// MARK:- other functions
@ -159,6 +176,9 @@ class AutoDebitViewController: UIViewController {
configureText()
view.addSubview(languageTextField)
// addRefreshControlTableView()
}
private func configureText() {
@ -172,7 +192,7 @@ class AutoDebitViewController: UIViewController {
extension AutoDebitViewController: UITableViewDataSource {
func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat {
return 90
return 82
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
@ -296,3 +316,24 @@ extension AutoDebitViewController: UIPickerViewDataSource {
}
extension AutoDebitViewController {
private func addRefreshControlTableView() {
let colorOption = [NSAttributedStringKey.foregroundColor : AppConstants.themWhiteColor];
let title = NSAttributedString(string: "Token Renewal", attributes: colorOption)
refreshControl.attributedTitle = title
refreshControl.backgroundColor = AppConstants.themeBlueColor
refreshControl.tintColor = AppConstants.themWhiteColor
refreshControl.addTarget(self, action: #selector(refresh), for: .valueChanged)
tableView.refreshControl = refreshControl
}
@objc
private func refresh() {
touchRefreshAccountButton(UIBarButtonItem())
}
}

8
GMERemittance/Module/ExchangeRates/User Interface/View/ExchangeRates.storyboard

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@ -162,7 +162,7 @@
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="100,000" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="g3K-Yw-9MX">
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="100,000" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="g3K-Yw-9MX" customClass="GMENumberTextField" customModule="GME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="20" width="222" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="zxw-hb-bmw"/>
@ -282,7 +282,7 @@
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="100,000" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="dTw-1k-6zQ">
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="100,000" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="dTw-1k-6zQ" customClass="GMENumberTextField" customModule="GME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="20" width="222" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="trM-sN-aGf"/>

4
GMERemittance/Module/ExchangeRates/User Interface/View/ExchangeRatesViewController.swift

@ -67,8 +67,8 @@ class ExchangeRatesViewController: UIViewController {
@IBOutlet weak var paymentModeStackViewConstraint: NSLayoutConstraint!
@IBOutlet weak var paymentModeStackView: UIStackView!
@IBOutlet weak var senderTextField: UITextField!
@IBOutlet weak var reciepientTextField: UITextField!
@IBOutlet weak var senderTextField: GMENumberTextField!
@IBOutlet weak var reciepientTextField: GMENumberTextField!
@IBOutlet weak var transferFeeInfoLabel: UILabel!
@IBOutlet weak var exchangeRateInfoLabel: UILabel!

2
GMERemittance/Module/Home/Application Logic/Service/HomeServiceType.swift

@ -30,7 +30,7 @@ extension UserInfoService {
if let model = response.data {
success(model)
}else {
let error = NSError.init(domain: "UserInfoService", code: AppConstants.emergencyLogoutErrorCode, userInfo: [NSLocalizedDescriptionKey : response.message])
let error = NSError.init(domain: "UserInfoService", code: AppConstants.emergencyLogoutErrorCode, userInfo: [NSLocalizedDescriptionKey : response.message ?? ""])
failure(error)
}

34
GMERemittance/Module/Home/User Interface/View/HomeViewController.swift

@ -96,6 +96,7 @@ class HomeViewController: UIViewController, UICollectionViewDelegateFlowLayout {
var userHotLine: HotLine?
var isShowTokenRenewAlert = false
override func viewDidLoad() {
super.viewDidLoad()
@ -773,6 +774,36 @@ extension HomeViewController {
func save(user: User?) {
Utility.save(user: user)
}
private func checkKFTCToken() {
if !isShowTokenRenewAlert {
// TODO: Show Alert for token refresh (navigation push)
guard
let remind = UserDefaults.standard.string(forKey: UserKeys.remindKFTCTokenDay),
let remindDay = Int(remind) else { return }
if remindDay <= 30 {
let expiredMessage = "Your auto debit token has already expired.\nFor use auto debit, you have to renew token."
let defaultMessage = "Your auto debit token expires after \(remindDay) days."
alertWithOkCancel(
message: remindDay > 0 ? defaultMessage : expiredMessage,
title: "Would you like to renew your token now?",
okTitle: "Renewal",
cancelTitle: "Later",
okAction: {
AutoDebitWireframe().pushMainView(on: self)
self.isShowTokenRenewAlert = true
},
cancelAction : {
self.isShowTokenRenewAlert = true
}
)
}
}
}
}
// MARK: - Channel IO
@ -785,13 +816,12 @@ extension HomeViewController {
let profile = Profile()
guard let username = UserDefaults.standard.string(forKey: UserKeys.fullName) else {
return
}
guard let username = UserDefaults.standard.string(forKey: UserKeys.fullName) else {
profile.set(name: username)
ChannelIO.delegate = self
ChannelIO.boot(with:settings, profile: profile) {(_, _) in
ChannelIO.open(animated: true)
// For push notification of ChannelIO
// ChannelIO.track(eventName:"HomeVisit")
}

12
GMERemittance/Module/SendMoneyModules/ResendExchange/User Interface/View/ResendExchange.storyboard

@ -68,7 +68,7 @@
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="10,000,000" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="RrL-Ia-5PK">
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="10,000,000" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="RrL-Ia-5PK" customClass="GMENumberTextField" customModule="GME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="20" width="222" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="w3x-rA-gte"/>
@ -212,7 +212,7 @@
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="10,00,000" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="3yD-t0-8ha">
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="10,00,000" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="3yD-t0-8ha" customClass="GMENumberTextField" customModule="GME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="20" width="222" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="bLT-gY-yAB"/>
@ -367,16 +367,16 @@
<rect key="frame" x="8" y="0.0" width="339" height="50"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GP2-vg-WQf">
<rect key="frame" x="0.0" y="0.0" width="211.5" height="50"/>
<rect key="frame" x="0.0" y="0.0" width="206" height="50"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="Applied Amount" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="INg-pM-FwI">
<rect key="frame" x="0.0" y="15" width="211.5" height="20.5"/>
<rect key="frame" x="0.0" y="15" width="206" height="20.5"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Bold" family="San Francisco Display" pointSize="17"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YmV-df-l8K">
<rect key="frame" x="0.0" y="30.5" width="211.5" height="5"/>
<rect key="frame" x="0.0" y="30.5" width="206" height="5"/>
<color key="backgroundColor" red="0.0" green="0.58980089430000004" blue="1" alpha="0.36601027400000002" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="5" id="KJb-A3-7kk"/>
@ -394,7 +394,7 @@
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1,000,000" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3sE-za-2Ju">
<rect key="frame" x="216.5" y="0.0" width="83.5" height="50"/>
<rect key="frame" x="211" y="0.0" width="89" height="50"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="20"/>
<color key="textColor" red="0.92941176469999998" green="0.1137254902" blue="0.1960784314" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>

8
GMERemittance/Module/SendMoneyModules/ResendExchange/User Interface/View/ResendExchangeViewController.swift

@ -23,8 +23,8 @@ class ResendExchangeViewController: UIViewController {
@IBOutlet weak var continueButton: UIButton!
@IBOutlet weak var senderTextField: UITextField!
@IBOutlet weak var reciepientTextField: UITextField!
@IBOutlet weak var senderTextField: GMENumberTextField!
@IBOutlet weak var reciepientTextField: GMENumberTextField!
@IBOutlet weak var transferFeeInfoLabel: UILabel!
@IBOutlet weak var exchangeRateLabel: UILabel!
@ -60,6 +60,10 @@ class ResendExchangeViewController: UIViewController {
guard let reciever = resendInfoModel?.receiver else {return}
self.reciepient = self.convertReciepient(model: reciever)
self.setCountryFlag(countryCode: self.resendInfoModel?.receiver?.rCountryCode ?? "")
senderTextField.receiverNativeCountry = reciever.rCountryCode ?? ""
reciepientTextField.receiverNativeCountry = reciever.rCountryCode ?? ""
}
}

26
GMERemittance/Module/SendMoneyModules/SendMoneyExchangeRate/User Interface/View/SendMoneyExchangeRate.storyboard

@ -68,14 +68,14 @@
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="10,000,000" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="bIP-Bh-GBC">
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="10,000,000" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="bIP-Bh-GBC" customClass="GMENumberTextField" customModule="GME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="20" width="222" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="kAI-1o-NdR"/>
</constraints>
<color key="textColor" red="0.92941176469999998" green="0.1137254902" blue="0.1960784314" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Semibold" family="San Francisco Display" pointSize="33"/>
<textInputTraits key="textInputTraits" keyboardType="decimalPad"/>
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
</textField>
</subviews>
</stackView>
@ -83,7 +83,7 @@
<rect key="frame" x="222" y="0.0" width="125" height="70"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="D8a-kf-6NY">
<rect key="frame" x="25.5" y="22" width="74" height="26"/>
<rect key="frame" x="24" y="22" width="77" height="26"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Korea" translatesAutoresizingMaskIntoConstraints="NO" id="8MB-bv-CXz">
<rect key="frame" x="0.0" y="0.0" width="26" height="26"/>
@ -93,7 +93,7 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="KRW" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hzZ-jw-i2t">
<rect key="frame" x="36" y="0.0" width="38" height="26"/>
<rect key="frame" x="36" y="0.0" width="41" height="26"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Bold" family="San Francisco Display" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
@ -207,14 +207,14 @@
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="10,00,000" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="GQa-1w-7Uz">
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="10,000,000" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="GQa-1w-7Uz" customClass="GMENumberTextField" customModule="GME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="20" width="222" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="PBJ-ZP-E9h"/>
</constraints>
<color key="textColor" red="0.92941176469999998" green="0.1137254902" blue="0.1960784314" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Semibold" family="San Francisco Display" pointSize="33"/>
<textInputTraits key="textInputTraits" keyboardType="decimalPad"/>
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
</textField>
</subviews>
</stackView>
@ -225,7 +225,7 @@
<rect key="frame" x="0.0" y="0.0" width="125" height="70"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="tjZ-9f-eMI">
<rect key="frame" x="7.5" y="22" width="110" height="26"/>
<rect key="frame" x="6" y="22" width="113" height="26"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Korea" translatesAutoresizingMaskIntoConstraints="NO" id="PqL-FQ-Cs6">
<rect key="frame" x="0.0" y="0.0" width="26" height="26"/>
@ -235,13 +235,13 @@
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="KRW" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MCZ-I5-c8K">
<rect key="frame" x="36" y="0.0" width="38" height="26"/>
<rect key="frame" x="36" y="0.0" width="41" height="26"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Bold" family="San Francisco Display" pointSize="18"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_dropdownSmall" translatesAutoresizingMaskIntoConstraints="NO" id="yse-tN-0lF">
<rect key="frame" x="84" y="0.0" width="26" height="26"/>
<rect key="frame" x="87" y="0.0" width="26" height="26"/>
<color key="tintColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" constant="26" id="fUc-3j-NnB"/>
@ -390,16 +390,16 @@
<rect key="frame" x="8" y="0.0" width="339" height="50"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nmo-k2-h9i">
<rect key="frame" x="0.0" y="0.0" width="211.5" height="50"/>
<rect key="frame" x="0.0" y="0.0" width="206" height="50"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="Applied Amount" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9ZA-HW-AyA">
<rect key="frame" x="0.0" y="15" width="211.5" height="20.5"/>
<rect key="frame" x="0.0" y="15" width="206" height="20"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Bold" family="San Francisco Display" pointSize="17"/>
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Khd-5b-Meu">
<rect key="frame" x="0.0" y="30.5" width="211.5" height="5"/>
<rect key="frame" x="0.0" y="30" width="206" height="5"/>
<color key="backgroundColor" red="0.0" green="0.58980089430000004" blue="1" alpha="0.36601027397260272" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="5" id="Mlb-jF-KYK"/>
@ -417,7 +417,7 @@
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1,000,000" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AKo-3T-zDY">
<rect key="frame" x="216.5" y="0.0" width="83.5" height="50"/>
<rect key="frame" x="211" y="0.0" width="89" height="50"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="20"/>
<color key="textColor" red="0.92941176470588238" green="0.11372549019607843" blue="0.19607843137254902" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>

8
GMERemittance/Module/SendMoneyModules/SendMoneyExchangeRate/User Interface/View/SendMoneyExchangeRateViewController.swift

@ -43,8 +43,8 @@ class SendMoneyExchangeRateViewController: UIViewController {
@IBOutlet private weak var continueButton: UIButton!
@IBOutlet private weak var senderTextField: UITextField!
@IBOutlet private weak var reciepientTextField: UITextField!
@IBOutlet private weak var senderTextField: GMENumberTextField!
@IBOutlet private weak var reciepientTextField: GMENumberTextField!
@IBOutlet private weak var transferFeeInfoLabel: UILabel!
@IBOutlet private weak var exchangeRateLabel: UILabel!
@ -167,6 +167,10 @@ class SendMoneyExchangeRateViewController: UIViewController {
super.viewWillAppear(animated)
configureViews()
action = ActionBehaviour.calculate
senderTextField.receiverNativeCountry = reciepient?.countryCode ?? ""
reciepientTextField.receiverNativeCountry = reciepient?.countryCode ?? ""
}
// MARK: IBActions

11
GMERemittance/Module/SideMenu/Auto refund/AutoRefundsViewController.swift

@ -31,7 +31,7 @@ class AutoRefundsViewController: UIViewController {
@IBOutlet weak var availableBalanceLabel: UILabel!
@IBOutlet weak var refundChargeLabel: UILabel!
@IBOutlet weak var amountTextfield: UITextField!
@IBOutlet weak var amountTextfield: GMENumberTextField!
var autorefund: AutoRefund? {
didSet {
@ -56,6 +56,12 @@ class AutoRefundsViewController: UIViewController {
self.backgroundView.layer.cornerRadius = 6
self.countryBackgroundView.layer.cornerRadius = 6
configureText()
amountTextfield.addTarget(self, action: #selector(editingChanged(_:)), for: .editingChanged)
}
@objc private func editingChanged(_ sender: UITextField) {
amountTextfield.text = Utility.getCommaSeperatedString(numberString: amountTextfield.text!)
}
private func configureText() {
@ -88,7 +94,8 @@ class AutoRefundsViewController: UIViewController {
@IBAction func refund(_ sender: Any) {
let amount = self.amountTextfield.text!
guard let amount = self.amountTextfield.text?.stringRemovingComma() else { return }
let minAmnt = self.autorefund?.minAmount ?? "0"
if amount.isEmpty {self.show(error: "add refund amount"); return}

6
GMERemittance/Module/SideMenu/Auto refund/autoRefund.storyboard

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" 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="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina5_5" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@ -144,7 +144,7 @@
<color key="textColor" red="0.2901960784" green="0.2901960784" blue="0.2901960784" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="100,000" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ArH-OD-ene">
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="100,000" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ArH-OD-ene" customClass="GMENumberTextField" customModule="GME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="20" width="261" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="iNj-at-9tv"/>

34
GMERemittance/Utility/AppConstants.swift

@ -30,6 +30,9 @@ class AppConstants {
static let yearlyLimitNotification = "Yearly LImit"
static let firstTimeLanguageIsSet = "firstTimeLanguageIsSet"
static let currentLanguage = "currentLanguage"
static let selectedReceiverCountryCode = "receiverCountryCode"
static let accessTokenRegTime = "accessTokenRegTime"
static let accessTokenExpTime = "accessTokenExpTime"
}
enum Devices {
@ -387,6 +390,13 @@ class Utility {
save(value: user?.dateOfBirth, forKey: UserKeys.dateOfBirth)
save(value: user?.pennyTestStatus, forKey: AppConstants.pennyTestStatusCode)
save(value: user?.accessTokenRegTime, forKey: AppConstants.accessTokenRegTime)
save(value: user?.accessTokenExpTime, forKey: AppConstants.accessTokenExpTime)
// save remind day of KFTC Token
let remindDay = calculateDDay(registDate: user?.accessTokenRegTime)
save(value: remindDay, forKey: UserKeys.remindKFTCTokenDay)
guard let encryptedPassword = password else { return }
let email = UserDefaults.standard.string(forKey: UserKeys.email) ?? ""
@ -400,16 +410,36 @@ class Utility {
KeyChain.shared.save(data: "1", key: .login)
}
static func calculateDDay(registDate: String?) -> String? {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "M/d/yyyy h:mm:ss a"
dateFormatter.timeZone = NSTimeZone(name: "UTC") as TimeZone?
var dateComponent = DateComponents()
dateComponent.year = 1
guard
let resigstDate = registDate,
let date = dateFormatter.date(from: resigstDate),
let expireDate = Calendar.current.date(byAdding: dateComponent, to: date) else {return nil}
let now = Date()
let interval = expireDate.timeIntervalSince(now)
return "\(Int(interval / 86400))"
}
static func numberWithoutprecedingZero(str: String) -> String {
let formatter = NumberFormatter()
let number = formatter.number(from: str)
return "\(number ?? 0)" ?? ""
return "\(number ?? 0)"
}
static func getAppVersion () -> String? {
let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String
print(version)
return version
}

22
GMERemittance/Utility/GMEAlert/GMEAlertViewController.xib

@ -38,26 +38,28 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<subviews>
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bog-Yc-fSF">
<rect key="frame" x="37.5" y="225.5" width="300" height="216"/>
<rect key="frame" x="37.5" y="221" width="300" height="225"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="ivh-OD-kSD">
<rect key="frame" x="0.0" y="0.0" width="300" height="216"/>
<rect key="frame" x="0.0" y="0.0" width="300" height="225"/>
<subviews>
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dwd-4A-fUB">
<rect key="frame" x="0.0" y="0.0" width="300" height="158"/>
<rect key="frame" x="0.0" y="0.0" width="300" height="167"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="61r-PG-8gH">
<rect key="frame" x="20" y="20" width="260" height="118"/>
<rect key="frame" x="20" y="20" width="260" height="127"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Alert" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rfn-wg-MBE">
<rect key="frame" x="0.0" y="0.0" width="260" height="46"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Would you like to renew your token now?" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rfn-wg-MBE">
<rect key="frame" x="0.0" y="0.0" width="260" height="55"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="18"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="5" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vZn-aC-Kup">
<rect key="frame" x="0.0" y="51" width="260" height="67"/>
<string key="text">Welcome to the Swift community. Together we are working to build a programming language to empower everyone to turn their ideas into apps on any platform.</string>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vZn-aC-Kup">
<rect key="frame" x="0.0" y="60" width="260" height="67"/>
<string key="text">Your auto debit token expires after 30 days.
(If don't renew until 30 days then you can't use auto-debit)</string>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
@ -74,7 +76,7 @@
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TJL-Yy-ccg">
<rect key="frame" x="0.0" y="166" width="300" height="50"/>
<rect key="frame" x="0.0" y="175" width="300" height="50"/>
<subviews>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JWT-7G-nWP">
<rect key="frame" x="0.0" y="0.0" width="120" height="50"/>

36
GMERemittance/Utility/GMENumberTextField.swift

@ -0,0 +1,36 @@
//
// GMETextField.swift
// GME Remit
//
// Created by InKwon Devik Kim on 08/07/2019.
// Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved.
//
import UIKit
class GMENumberTextField: UITextField {
private var customerNativeCountry: String?
var receiverNativeCountry: String = "" {
didSet {
selectKeyboardType()
}
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
keyboardType = .numberPad
customerNativeCountry = UserDefaults.standard.string(forKey: UserKeys.countryCode)
selectKeyboardType()
}
private func selectKeyboardType() {
guard let customerNativeCountry = customerNativeCountry else { return }
if customerNativeCountry == "KH" || receiverNativeCountry == "KH" {
keyboardType = .asciiCapable
} else {
keyboardType = .numberPad
}
}
}

22
GMERemittanceTests/FunctionTest.swift

@ -0,0 +1,22 @@
//
// FunctionTest.swift
// GMERemittanceTests
//
// Created by InKwon Devik Kim on 09/07/2019.
// Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved.
//
import XCTest
@testable import GME_Remit
class FunctionTest: XCTestCase {
func testExpireDate() {
guard let remindDay = Utility.calculateDDay(registDate: "7/8/2019 4:19:37 PM")
else {
XCTAssert(false)
return
}
XCTAssert(remindDay == "365")
}
}

8
en.lproj/Localizable.strings

@ -365,11 +365,15 @@
"auto_debit_title_text" = "Manage Auto Debit Account";
"are_you_sure_text" = "Are you sure?";
"auto_debit_delete_confirm_description" = "You want to delete Auto-Debit Account?";
"add_auto_debit_account_text" = "Add Auto Debit Account";
//"add_auto_debit_account_text" = "Add Auto Debit Account";
"add_auto_debit_account_text" = "Token Renewal";
"delete_auto_debit_account_hint_text" = "Hold to Delete the account";
"no_languages_available_text" = "No Languages Available";
"swift_to_delete_account_text" = "Swipe left to Edit or Delete account.";
"swift_to_delete_account_text" = "Swipe left to Edit or Delete account.";
//"swift_to_delete_account_text" = "Drag down to Auto Debit Token renewal.";
"language_text" = "Language";

Loading…
Cancel
Save