Browse Source

clear another id type information

pull/1/head
InKwon James Kim 5 years ago
parent
commit
b2fbcf6422
  1. 2
      GME Remit/APIs/Router/APIRouter.swift
  2. 14
      GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/User Interface/View/NewRegisterStep1.storyboard
  3. 13
      GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/User Interface/View/NewRegisterStep1ViewController.swift

2
GME Remit/APIs/Router/APIRouter.swift

@ -902,7 +902,7 @@ extension APIRouter {
"passportNumber": model.primaryInformation?.passportNumber ?? "", "passportNumber": model.primaryInformation?.passportNumber ?? "",
"passportIssueDate": model.primaryInformation?.passportIssueDate ?? "", "passportIssueDate": model.primaryInformation?.passportIssueDate ?? "",
"passportExpiryDate": model.primaryInformation?.passportExpiryDate ?? "", "passportExpiryDate": model.primaryInformation?.passportExpiryDate ?? "",
"anotherIDTypeId": model.primaryInformation?.anotherIDType ?? "",
"anotherIDType": model.primaryInformation?.anotherIDType ?? "",
"anotherIDNumber": model.primaryInformation?.anotherIDNumber ?? "", "anotherIDNumber": model.primaryInformation?.anotherIDNumber ?? "",
"anotherIDIssueDate": model.primaryInformation?.anotherIDIssueDate ?? "", "anotherIDIssueDate": model.primaryInformation?.anotherIDIssueDate ?? "",
"anotherIDExpiryDate": model.primaryInformation?.anotherIDExpiryDate ?? "", "anotherIDExpiryDate": model.primaryInformation?.anotherIDExpiryDate ?? "",

14
GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/User Interface/View/NewRegisterStep1.storyboard

@ -401,7 +401,7 @@
</constraints> </constraints>
</imageView> </imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="Another ID (Optional)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Knm-yY-Ukr"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="Another ID (Optional)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Knm-yY-Ukr">
<rect key="frame" x="30" y="0.0" width="174.5" height="25"/>
<rect key="frame" x="30" y="0.0" width="177.5" height="25"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="25" id="WnD-h7-H27"/> <constraint firstAttribute="height" constant="25" id="WnD-h7-H27"/>
</constraints> </constraints>
@ -410,7 +410,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iy7-W8-jRs"> <button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iy7-W8-jRs">
<rect key="frame" x="209.5" y="0.0" width="105.5" height="25"/>
<rect key="frame" x="212.5" y="0.0" width="102.5" height="25"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="25" id="08I-N0-npb"/> <constraint firstAttribute="height" constant="25" id="08I-N0-npb"/>
</constraints> </constraints>
@ -634,16 +634,16 @@
<rect key="frame" x="110" y="2" width="203" height="90"/> <rect key="frame" x="110" y="2" width="203" height="90"/>
<subviews> <subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="11" translatesAutoresizingMaskIntoConstraints="NO" id="5uj-mo-5FF"> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="11" translatesAutoresizingMaskIntoConstraints="NO" id="5uj-mo-5FF">
<rect key="frame" x="0.0" y="18.5" width="203" height="53"/>
<rect key="frame" x="0.0" y="19" width="203" height="52.5"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Passport" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cZ9-FO-Ycz"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Passport" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="cZ9-FO-Ycz">
<rect key="frame" x="0.0" y="0.0" width="59" height="18"/>
<rect key="frame" x="0.0" y="0.0" width="60" height="17.5"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="15"/> <fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="15"/>
<color key="textColor" name="ThemeText"/> <color key="textColor" name="ThemeText"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5bW-bG-7tS"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5bW-bG-7tS">
<rect key="frame" x="0.0" y="29" width="55" height="24"/>
<rect key="frame" x="0.0" y="28.5" width="58" height="24"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="10"/> <fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="10"/>
<state key="normal" title="View Sample"> <state key="normal" title="View Sample">
<color key="titleColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/> <color key="titleColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>
@ -708,7 +708,7 @@
<rect key="frame" x="0.0" y="14.5" width="203" height="61"/> <rect key="frame" x="0.0" y="14.5" width="203" height="61"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Another ID (Optional)" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OEE-Gl-1fp"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Another ID (Optional)" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OEE-Gl-1fp">
<rect key="frame" x="0.0" y="0.0" width="138" height="35"/>
<rect key="frame" x="0.0" y="0.0" width="140.5" height="35"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="35" id="RZl-BX-uz4"/> <constraint firstAttribute="height" constant="35" id="RZl-BX-uz4"/>
</constraints> </constraints>
@ -717,7 +717,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button opaque="NO" tag="1" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0l3-Xp-kqb"> <button opaque="NO" tag="1" contentMode="scaleToFill" contentHorizontalAlignment="right" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0l3-Xp-kqb">
<rect key="frame" x="0.0" y="37" width="55" height="24"/>
<rect key="frame" x="0.0" y="37" width="58" height="24"/>
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="10"/> <fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="10"/>
<state key="normal" title="View Sample"> <state key="normal" title="View Sample">
<color key="titleColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/> <color key="titleColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>

13
GME Remit/Modules/RegisterModules/UserAuthentication/NewRegisterStep1/User Interface/View/NewRegisterStep1ViewController.swift

@ -259,10 +259,11 @@ extension NewRegisterStep1ViewController {
self?.idIssueDateTextField.isHidden = true self?.idIssueDateTextField.isHidden = true
self?.idExpiryDateTextField.isHidden = true self?.idExpiryDateTextField.isHidden = true
guard let idType = $0 else {
self?.idNumberTextField.validCondition = { _ in true } self?.idNumberTextField.validCondition = { _ in true }
self?.idIssueDateTextField.validCondition = { _ in true } self?.idIssueDateTextField.validCondition = { _ in true }
self?.idExpiryDateTextField.validCondition = { _ in true } self?.idExpiryDateTextField.validCondition = { _ in true }
guard let idType = $0 else {
return return
} }
@ -305,7 +306,7 @@ extension NewRegisterStep1ViewController {
self?.passportImageButton.addBlur() self?.passportImageButton.addBlur()
self?.hideBorder(view: self?.passportImageContainerView) self?.hideBorder(view: self?.passportImageContainerView)
} else if let url = URL(string: imageData) { } else if let url = URL(string: imageData) {
self?.passportImageButton.imageView?.kf.setImage(with: url)
self?.passportImageButton.kf.setImage(with: url, for: .normal)
self?.passportImageButton.addBlur() self?.passportImageButton.addBlur()
self?.hideBorder(view: self?.passportImageContainerView) self?.hideBorder(view: self?.passportImageContainerView)
} }
@ -324,7 +325,7 @@ extension NewRegisterStep1ViewController {
self?.anotherIDImageButton.addBlur() self?.anotherIDImageButton.addBlur()
self?.hideBorder(view: self?.anotherIDImageContainerView) self?.hideBorder(view: self?.anotherIDImageContainerView)
} else if let url = URL(string: imageData) { } else if let url = URL(string: imageData) {
self?.anotherIDImageButton.imageView?.kf.setImage(with: url)
self?.anotherIDImageButton.kf.setImage(with: url, for: .normal)
self?.anotherIDImageButton.addBlur() self?.anotherIDImageButton.addBlur()
self?.hideBorder(view: self?.anotherIDImageContainerView) self?.hideBorder(view: self?.anotherIDImageContainerView)
} }
@ -337,8 +338,14 @@ extension NewRegisterStep1ViewController {
.drive(onNext: {[weak self] in .drive(onNext: {[weak self] in
self?.idTypeTextField.didSelect(item: nil) self?.idTypeTextField.didSelect(item: nil)
self?.idNumberTextField.text = "" self?.idNumberTextField.text = ""
self?.idNumberTextField.sendActions(for: .editingChanged)
self?.idIssueDateTextField.text = "" self?.idIssueDateTextField.text = ""
self?.idIssueDateTextField.sendActions(for: .editingChanged)
self?.idExpiryDateTextField.text = "" self?.idExpiryDateTextField.text = ""
self?.idExpiryDateTextField.sendActions(for: .editingChanged)
self?.anotherIDImageTrigger.onNext(nil) self?.anotherIDImageTrigger.onNext(nil)
}).disposed(by: disposeBag) }).disposed(by: disposeBag)

Loading…
Cancel
Save