Browse Source

Changed Dashboard

pull/1/head
InKwon James Kim 5 years ago
parent
commit
5b7c5ca0f6
  1. 13
      GME Remit/Modules/Home/User Interface/View/Cell/HomeRemainingLimitTableViewCell.swift
  2. 80
      GME Remit/Modules/Home/User Interface/View/Home.storyboard
  3. 6
      GME Remit/Modules/ManageAgreement/User Interface/Wireframe/ManageAgreementWireframe.swift
  4. 1
      GME Remit/Modules/ManageAgreement/User Interface/Wireframe/ManageAgreementWireframeInput.swift
  5. 5
      GME Remit/Modules/RegisterModules/Register/User Interface/Wireframe/RegisterWireframe.swift
  6. 8
      GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Interactor/NewRegisterStep1Interactor.swift
  7. 12
      GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep3/Application Logic/Service/NewRegisterStep3Service.swift
  8. 8
      GME Remit/Modules/SplashScreen/User Interface/Wireframe/SplashScreenWireframe.swift

13
GME Remit/Modules/Home/User Interface/View/Cell/HomeRemainingLimitTableViewCell.swift

@ -25,14 +25,9 @@ class HomeRemainingLimitTableViewCell: UITableViewCell {
@IBOutlet weak var rewardTapGesture: UITapGestureRecognizer!
// @IBOutlet weak var withdrawButton: UIButton!
@IBOutlet weak var walletNumberTitleLabel: UILabel!
@IBOutlet weak var walletNumberLabel: UILabel!
@IBOutlet weak var walletBankCodeLabel: UILabel!
@IBOutlet weak var limitTitleLabel: UILabel!
@IBOutlet weak var limitLabel: UILabel!
var user: User?
weak var sideMenuDelegate: SideMenuDelegate?
@ -66,14 +61,8 @@ class HomeRemainingLimitTableViewCell: UITableViewCell {
pointContainerView.layer.cornerRadius = 5
pointBackgroundView.hero.id = "pointsView"
walletNumberTitleLabel.text = "gme_wallet_no_text".localized()
walletNumberLabel.text = GMEDB.shared.user.string(.walletNumber)
walletNumberLabel.text = GMEDB.shared.user.string(.walletNumber) ?? "N/A"
walletBankCodeLabel.text = GMEDB.shared.user.string(.primaryBankName)
limitTitleLabel.text = "remaining_limit_text".localized()
limitLabel.textColor = .themeRed
let yearlyLimit = GMEDB.shared.user.string(.yearlyLimit)
limitLabel.text = Utility.getCommaSeperatedString(numberString: yearlyLimit ?? "")
}
@objc

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

@ -89,54 +89,20 @@
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="HomeRemainingLimitTableViewCell" id="rcn-u6-1gx" customClass="HomeRemainingLimitTableViewCell" customModule="GME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="28" width="320" height="188"/>
<rect key="frame" x="0.0" y="28" width="320" height="132"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="rcn-u6-1gx" id="ekT-Zr-ohe">
<rect key="frame" x="0.0" y="0.0" width="320" height="188"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="132"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="A2Y-eS-2d3">
<rect key="frame" x="0.0" y="0.0" width="320" height="188"/>
<rect key="frame" x="0.0" y="0.0" width="320" height="132"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="15" translatesAutoresizingMaskIntoConstraints="NO" id="wLs-Rj-kxu">
<rect key="frame" x="20" y="10" width="280" height="168"/>
<rect key="frame" x="20" y="10" width="280" height="112"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="adq-zY-n7z">
<rect key="frame" x="0.0" y="0.0" width="280" height="41"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="UhN-hW-Uy5">
<rect key="frame" x="45" y="0.0" width="190" height="20.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="253" text="GME Wallet No." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PlM-0A-J0S">
<rect key="frame" x="0.0" y="2.5" width="92.5" height="15.5"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="13"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="N/A" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="szL-3w-HfO">
<rect key="frame" x="97.5" y="0.0" width="92.5" height="20.5"/>
<constraints>
<constraint firstAttribute="height" constant="20.5" id="61m-n5-e9D"/>
</constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="14"/>
<color key="textColor" name="ThemeRed"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="N/A" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4hR-Ej-a4h">
<rect key="frame" x="130" y="20.5" width="20.5" height="20.5"/>
<constraints>
<constraint firstAttribute="height" constant="20.5" id="xGW-Rc-wfd"/>
</constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hZu-KN-tcd">
<rect key="frame" x="0.0" y="56" width="280" height="60"/>
<rect key="frame" x="0.0" y="0.0" width="280" height="60"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="Ktu-2Y-ndo">
<rect key="frame" x="150.5" y="2.5" width="124.5" height="55.5"/>
@ -178,28 +144,19 @@
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="9Ft-mi-Ev0">
<rect key="frame" x="5" y="2.5" width="124.5" height="55.5"/>
<rect key="frame" x="5" y="10" width="124.5" height="40.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="253" text="Remaining Yearly Limit" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" minimumScaleFactor="0.84999999999999998" translatesAutoresizingMaskIntoConstraints="NO" id="IXG-rj-tyI">
<rect key="frame" x="28.5" y="0.0" width="68" height="30.5"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="253" ambiguous="YES" text="Kwangju(034)" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" minimumScaleFactor="0.84999999999999998" translatesAutoresizingMaskIntoConstraints="NO" id="IXG-rj-tyI">
<rect key="frame" x="23" y="0.0" width="79" height="15.5"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="13"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="jPc-HT-RBJ">
<rect key="frame" x="43" y="35.5" width="39" height="20"/>
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="jPc-HT-RBJ">
<rect key="frame" x="48" y="20.5" width="29" height="20"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="$" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NPb-J7-8vr">
<rect key="frame" x="0.0" y="0.0" width="8" height="20"/>
<constraints>
<constraint firstAttribute="width" constant="8" id="lGf-6z-59b"/>
</constraints>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/>
<color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="261" verticalHuggingPriority="251" text="N/A" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FSQ-xU-CsJ">
<rect key="frame" x="10" y="0.0" width="29" height="20"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="261" verticalHuggingPriority="251" ambiguous="YES" text="N/A" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FSQ-xU-CsJ">
<rect key="frame" x="0.0" y="0.0" width="29" height="20"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="17"/>
<color key="textColor" name="ThemeRed"/>
<nil key="highlightedColor"/>
@ -228,14 +185,14 @@
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4Ze-gK-s6z">
<rect key="frame" x="0.0" y="131" width="280" height="2"/>
<rect key="frame" x="0.0" y="75" width="280" height="2"/>
<color key="backgroundColor" name="ThemeSubBackground"/>
<constraints>
<constraint firstAttribute="height" constant="2" id="h7h-4F-Ddy"/>
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Peb-Sn-rcC">
<rect key="frame" x="0.0" y="148" width="280" height="20"/>
<rect key="frame" x="0.0" y="92" width="280" height="20"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="dzi-vM-GUm">
<rect key="frame" x="0.0" y="0.0" width="63" height="20"/>
@ -345,21 +302,18 @@
<connections>
<outlet property="amountLabel" destination="M1e-cc-M1d" id="4sb-KT-Tbo"/>
<outlet property="balaceTitleLabel" destination="xJH-zQ-Y2H" id="8Hm-fT-tRH"/>
<outlet property="limitLabel" destination="FSQ-xU-CsJ" id="UYu-85-zW4"/>
<outlet property="limitTitleLabel" destination="IXG-rj-tyI" id="mEC-qs-eLT"/>
<outlet property="pointBackgroundView" destination="aUP-ND-ctM" id="M9X-co-v60"/>
<outlet property="pointContainerView" destination="9M5-BJ-Q2C" id="B1j-hP-IOb"/>
<outlet property="pointTitleLabel" destination="Rt7-Pa-xst" id="NYO-sD-u2A"/>
<outlet property="rewardPointAmountLabel" destination="qFV-c8-8UI" id="YKL-6A-gRk"/>
<outlet property="rewardTapGesture" destination="ZRA-EC-6mr" id="xUI-l1-MLa"/>
<outlet property="userNameLabel" destination="HSv-Iz-JvY" id="aE5-dT-TQa"/>
<outlet property="walletBankCodeLabel" destination="4hR-Ej-a4h" id="XS6-XO-q6a"/>
<outlet property="walletNumberLabel" destination="szL-3w-HfO" id="GhT-HE-P5p"/>
<outlet property="walletNumberTitleLabel" destination="PlM-0A-J0S" id="JTD-kH-wQl"/>
<outlet property="walletBankCodeLabel" destination="IXG-rj-tyI" id="Oae-9x-4IS"/>
<outlet property="walletNumberLabel" destination="FSQ-xU-CsJ" id="0tr-AF-lYp"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="HomeCollectionTableViewCell" rowHeight="250" id="va0-Yj-PKZ" userLabel="CollectionTableCell" customClass="HomeCollectionTableViewCell" customModule="GME_Remit" customModuleProvider="target">
<rect key="frame" x="0.0" y="216" width="320" height="250"/>
<rect key="frame" x="0.0" y="160" width="320" height="250"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="va0-Yj-PKZ" id="UgU-Jo-DQf">
<rect key="frame" x="0.0" y="0.0" width="320" height="250"/>

6
GME Remit/Modules/ManageAgreement/User Interface/Wireframe/ManageAgreementWireframe.swift

@ -44,4 +44,10 @@ extension ManageAgreementWireframe: ManageAgreementWireframeInput {
let pdfVC = PDFViewController(nibName: "PDFViewController", bundle: nil)
view.navigationController?.pushViewController(pdfVC, animated: true)
}
func goNewRegistration() {
if let navigation = self.view.navigationController {
NewRegisterWireframe().pushMainView(in: navigation)
}
}
}

1
GME Remit/Modules/ManageAgreement/User Interface/Wireframe/ManageAgreementWireframeInput.swift

@ -10,4 +10,5 @@ import Foundation
protocol ManageAgreementWireframeInput: WireframeInput {
func goAgreementPDF(type: PDFType)
func goNewRegistration()
}

5
GME Remit/Modules/RegisterModules/Register/User Interface/Wireframe/RegisterWireframe.swift

@ -51,9 +51,6 @@ extension RegisterWireframe: RegisterWireframeInput {
func showKyc() {
// view.navigationController?.pushViewController(KycWireframe().getMainView(), animated: true)
if let navigation = self.view.navigationController {
NewRegisterWireframe().pushMainView(in: navigation)
}
ManageAgreementWireframe().pushWithNavigation(on: view)
}
}

8
GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/Application Logic/Interactor/NewRegisterStep1Interactor.swift

@ -47,10 +47,16 @@ extension NewRegisterStep1Interactor: NewRegisterStep1InteractorInput {
if model.type == 1 { // primary information
if let bankCode = model.primaryInformation?.bankID,
let bankAccount = model.primaryInformation?.bankAccount,
let bankName = model.primaryInformation?.bankName {
let bankName = model.primaryInformation?.bankName,
let storedAccount = KeyChain.shared.get(key: .bankAccount) {
KeyChain.shared.save(data: bankCode, key: .bankCode)
KeyChain.shared.save(data: bankAccount, key: .bankAccount)
KeyChain.shared.save(data: bankName, key: .bankName)
if storedAccount != bankAccount {
GMEDB.shared.user.set("0", .pennyTestStatusCode)
}
}
}

12
GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep3/Application Logic/Service/NewRegisterStep3Service.swift

@ -15,17 +15,17 @@ class NewRegisterStep3Service: NewRegisterStep3ServiceType {
success: @escaping (SuccessMessage) -> Void,
failure: @escaping (Error) -> Void
) {
// APIRouter.pennyTestSubmitAtRegister(
// accountNumber: account,
// certNumber: number
// ).json(success: success, failure: failure)
APIRouter.pennyTestSubmitAtRegister(
accountNumber: account,
certNumber: number
).json(success: success, failure: failure)
// FIXME: Test
let message = SuccessMessage()
// let message = SuccessMessage()
// FIXME: -success
success(message)
// success(message)
// FIXME: -failrue
// failure(NSError(domain: "error", code: 0, message: "ERROR!"))

8
GME Remit/Modules/SplashScreen/User Interface/Wireframe/SplashScreenWireframe.swift

@ -41,10 +41,8 @@ extension SplashScreenWireframe: SplashScreenWireframeInput {
}
func register() {
// if let navigation = self.view.navigationController {
// registerWireFrame.openRegistrationFromSplash(source: navigation)
// }
//FIXME: for agreement
ManageAgreementWireframe().pushWithNavigation(on: view)
if let navigation = self.view.navigationController {
registerWireFrame.openRegistrationFromSplash(source: navigation)
}
}
}
Loading…
Cancel
Save