Amrit Giri
4 years ago
72 changed files with 27 additions and 5560 deletions
-
684GME Remit.xcodeproj/project.pbxproj
-
33GME Remit/Modules/RewardModules/DetailOrder/Application Logic/Interactor/DetailOrderInteractor.swift
-
15GME Remit/Modules/RewardModules/DetailOrder/Application Logic/Interactor/DetailOrderInteractorIO.swift
-
13GME Remit/Modules/RewardModules/DetailOrder/Application Logic/Service/DetailOrderService.swift
-
11GME Remit/Modules/RewardModules/DetailOrder/Application Logic/Service/DetailOrderServiceType.swift
-
11GME Remit/Modules/RewardModules/DetailOrder/Module Interface/DetailOrderModuleInterface.swift
-
35GME Remit/Modules/RewardModules/DetailOrder/User Interface/Presenter/DetailOrderPresenter.swift
-
509GME Remit/Modules/RewardModules/DetailOrder/User Interface/View/DetailOrder.storyboard
-
145GME Remit/Modules/RewardModules/DetailOrder/User Interface/View/DetailOrderViewController.swift
-
11GME Remit/Modules/RewardModules/DetailOrder/User Interface/View/DetailOrderViewInterface.swift
-
42GME Remit/Modules/RewardModules/DetailOrder/User Interface/Wireframe/DetailOrderWireframe.swift
-
14GME Remit/Modules/RewardModules/DetailOrder/User Interface/Wireframe/DetailOrderWireframeInput.swift
-
81GME Remit/Modules/RewardModules/OrderHistory/Application Logic/Interactor/OrderHistoryInteractor.swift
-
37GME Remit/Modules/RewardModules/OrderHistory/Application Logic/Interactor/OrderHistoryInteractorIO.swift
-
73GME Remit/Modules/RewardModules/OrderHistory/Application Logic/Model/Order.swift
-
31GME Remit/Modules/RewardModules/OrderHistory/Application Logic/Model/OrderContainer.swift
-
BINGME Remit/Modules/RewardModules/OrderHistory/Application Logic/Service/.DS_Store
-
59GME Remit/Modules/RewardModules/OrderHistory/Application Logic/Service/OrderHistoryService.swift
-
25GME Remit/Modules/RewardModules/OrderHistory/Application Logic/Service/OrderHistoryServiceType.swift
-
32GME Remit/Modules/RewardModules/OrderHistory/Module Interface/OrderHistoryModuleInterface.swift
-
56GME Remit/Modules/RewardModules/OrderHistory/User Interface/Presenter/OrderHistoryPresenter.swift
-
BINGME Remit/Modules/RewardModules/OrderHistory/User Interface/View/.DS_Store
-
102GME Remit/Modules/RewardModules/OrderHistory/User Interface/View/Cell/OrderCell.swift
-
367GME Remit/Modules/RewardModules/OrderHistory/User Interface/View/OrderHistory.storyboard
-
258GME Remit/Modules/RewardModules/OrderHistory/User Interface/View/OrderHistoryViewController.swift
-
27GME Remit/Modules/RewardModules/OrderHistory/User Interface/View/OrderHistoryViewInterface.swift
-
51GME Remit/Modules/RewardModules/OrderHistory/User Interface/Wireframe/OrderHistoryWireframe.swift
-
23GME Remit/Modules/RewardModules/OrderHistory/User Interface/Wireframe/OrderHistoryWireframeInput.swift
-
68GME Remit/Modules/RewardModules/Redeem/Application Logic/Interactor/RedeemInteractor.swift
-
26GME Remit/Modules/RewardModules/Redeem/Application Logic/Interactor/RedeemInteractorIO.swift
-
23GME Remit/Modules/RewardModules/Redeem/Application Logic/Model/Redeem.swift
-
BINGME Remit/Modules/RewardModules/Redeem/Application Logic/Service/.DS_Store
-
107GME Remit/Modules/RewardModules/Redeem/Application Logic/Service/RedeemService.swift
-
26GME Remit/Modules/RewardModules/Redeem/Application Logic/Service/RedeemServiceType.swift
-
18GME Remit/Modules/RewardModules/Redeem/Module Interface/RedeemModuleInterface.swift
-
102GME Remit/Modules/RewardModules/Redeem/User Interface/Presenter/RedeemPresenter.swift
-
BINGME Remit/Modules/RewardModules/Redeem/User Interface/View/.DS_Store
-
382GME Remit/Modules/RewardModules/Redeem/User Interface/View/Redeem.storyboard
-
509GME Remit/Modules/RewardModules/Redeem/User Interface/View/RedeemViewController.swift
-
22GME Remit/Modules/RewardModules/Redeem/User Interface/View/RedeemViewInterface.swift
-
63GME Remit/Modules/RewardModules/Redeem/User Interface/Wireframe/RedeemWireframe.swift
-
17GME Remit/Modules/RewardModules/Redeem/User Interface/Wireframe/RedeemWireframeInput.swift
-
63GME Remit/Modules/RewardModules/Reward/Application Logic/Interactor/RewardInteractor.swift
-
25GME Remit/Modules/RewardModules/Reward/Application Logic/Interactor/RewardInteractorIO.swift
-
33GME Remit/Modules/RewardModules/Reward/Application Logic/Model/RewardProductContainer.swift
-
115GME Remit/Modules/RewardModules/Reward/Application Logic/Service/RewardService.swift
-
26GME Remit/Modules/RewardModules/Reward/Application Logic/Service/RewardServiceType.swift
-
16GME Remit/Modules/RewardModules/Reward/Module Interface/RewardModuleInterface.swift
-
82GME Remit/Modules/RewardModules/Reward/User Interface/Presenter/RewardPresenter.swift
-
BINGME Remit/Modules/RewardModules/Reward/User Interface/View/.DS_Store
-
BINGME Remit/Modules/RewardModules/Reward/User Interface/View/Cell/.DS_Store
-
73GME Remit/Modules/RewardModules/Reward/User Interface/View/Cell/RewardItemCollectionViewCell.swift
-
290GME Remit/Modules/RewardModules/Reward/User Interface/View/Reward.storyboard
-
287GME Remit/Modules/RewardModules/Reward/User Interface/View/RewardViewController.swift
-
23GME Remit/Modules/RewardModules/Reward/User Interface/View/RewardViewInterface.swift
-
46GME Remit/Modules/RewardModules/Reward/User Interface/Wireframe/RewardWireframe.swift
-
14GME Remit/Modules/RewardModules/Reward/User Interface/Wireframe/RewardWireframeInput.swift
-
30GME Remit/Modules/RewardModules/RewardGroup/Application Logic/Interactor/RewardGroupInteractor.swift
-
15GME Remit/Modules/RewardModules/RewardGroup/Application Logic/Interactor/RewardGroupInteractorIO.swift
-
13GME Remit/Modules/RewardModules/RewardGroup/Application Logic/Service/RewardGroupService.swift
-
11GME Remit/Modules/RewardModules/RewardGroup/Application Logic/Service/RewardGroupServiceType.swift
-
11GME Remit/Modules/RewardModules/RewardGroup/Module Interface/RewardGroupModuleInterface.swift
-
31GME Remit/Modules/RewardModules/RewardGroup/User Interface/Presenter/RewardGroupPresenter.swift
-
BINGME Remit/Modules/RewardModules/RewardGroup/User Interface/View/.DS_Store
-
97GME Remit/Modules/RewardModules/RewardGroup/User Interface/View/RewardGroup.storyboard
-
106GME Remit/Modules/RewardModules/RewardGroup/User Interface/View/RewardGroupViewController.swift
-
11GME Remit/Modules/RewardModules/RewardGroup/User Interface/View/RewardGroupViewInterface.swift
-
35GME Remit/Modules/RewardModules/RewardGroup/User Interface/Wireframe/RewardGroupWireframe.swift
-
13GME Remit/Modules/RewardModules/RewardGroup/User Interface/Wireframe/RewardGroupWireframeInput.swift
-
5GME Remit/Shared/Models/Branch.swift
-
4GME Remit/Shared/Models/BranchContainer.swift
-
4GME Remit/Shared/Models/RewardProduct.swift
684
GME Remit.xcodeproj/project.pbxproj
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,33 +0,0 @@ |
|||
// |
|||
// DetailOrderInteractor.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 15/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class DetailOrderInteractor { |
|||
|
|||
// MARK: Properties |
|||
|
|||
weak var output: DetailOrderInteractorOutput? |
|||
private let service: DetailOrderServiceType |
|||
private let order: Order? |
|||
// MARK: Initialization |
|||
|
|||
init(service: DetailOrderServiceType, order: Order?) { |
|||
self.service = service |
|||
self.order = order |
|||
} |
|||
|
|||
} |
|||
|
|||
// MARK: DetailOrder interactor input interface |
|||
|
|||
extension DetailOrderInteractor: DetailOrderInteractorInput { |
|||
func fetchOrder() { |
|||
output?.setOrder(order) |
|||
} |
|||
} |
@ -1,15 +0,0 @@ |
|||
// |
|||
// DetailOrderInteractorIO.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 15/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol DetailOrderInteractorInput: class { |
|||
func fetchOrder() |
|||
} |
|||
|
|||
protocol DetailOrderInteractorOutput: class { |
|||
func setOrder(_ order: Order?) |
|||
} |
@ -1,13 +0,0 @@ |
|||
// |
|||
// DetailOrderService.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 15/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class DetailOrderService: DetailOrderServiceType { |
|||
|
|||
} |
@ -1,11 +0,0 @@ |
|||
// |
|||
// DetailOrderServiceType.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 15/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol DetailOrderServiceType: class { |
|||
|
|||
} |
@ -1,11 +0,0 @@ |
|||
// |
|||
// DetailOrderModuleInterface.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 15/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol DetailOrderModuleInterface: class { |
|||
func fetchOrder() |
|||
} |
@ -1,35 +0,0 @@ |
|||
// |
|||
// DetailOrderPresenter.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 15/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class DetailOrderPresenter { |
|||
|
|||
// MARK: Properties |
|||
|
|||
weak var view: DetailOrderViewInterface? |
|||
var interactor: DetailOrderInteractorInput? |
|||
var wireframe: DetailOrderWireframeInput? |
|||
|
|||
} |
|||
|
|||
// MARK: DetailOrder module interface |
|||
|
|||
extension DetailOrderPresenter: DetailOrderModuleInterface { |
|||
func fetchOrder() { |
|||
interactor?.fetchOrder() |
|||
} |
|||
} |
|||
|
|||
// MARK: DetailOrder interactor output interface |
|||
|
|||
extension DetailOrderPresenter: DetailOrderInteractorOutput { |
|||
func setOrder(_ order: Order?) { |
|||
view?.setOrder(order) |
|||
} |
|||
} |
@ -1,509 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="HSb-ou-7T5"> |
|||
<device id="retina6_1" orientation="portrait" appearance="light"/> |
|||
<dependencies> |
|||
<deployment identifier="iOS"/> |
|||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/> |
|||
<capability name="Named colors" minToolsVersion="9.0"/> |
|||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> |
|||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
|||
</dependencies> |
|||
<customFonts key="customFonts"> |
|||
<array key="SanFranciscoDisplay-Bold.otf"> |
|||
<string>SanFranciscoDisplay-Bold</string> |
|||
</array> |
|||
<array key="SanFranciscoText-Bold.otf"> |
|||
<string>SanFranciscoText-Bold</string> |
|||
</array> |
|||
<array key="SanFranciscoText-Regular.otf"> |
|||
<string>SanFranciscoText-Regular</string> |
|||
</array> |
|||
</customFonts> |
|||
<scenes> |
|||
<!--DetailOrder--> |
|||
<scene sceneID="R60-Pu-Hpy"> |
|||
<objects> |
|||
<viewController storyboardIdentifier="DetailOrderViewController" title="DetailOrder" id="HSb-ou-7T5" customClass="DetailOrderViewController" customModule="GME_Remit" sceneMemberID="viewController"> |
|||
<view key="view" contentMode="scaleToFill" id="9Uc-9s-KgO"> |
|||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> |
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
|||
<subviews> |
|||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NrY-Y4-WbX"> |
|||
<rect key="frame" x="0.0" y="44" width="414" height="818"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" placeholderIntrinsicWidth="375" placeholderIntrinsicHeight="667" translatesAutoresizingMaskIntoConstraints="NO" id="OVJ-Ev-gIB"> |
|||
<rect key="frame" x="0.0" y="0.0" width="414" height="607"/> |
|||
<subviews> |
|||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hkI-6C-D3U" userLabel="Summary"> |
|||
<rect key="frame" x="10" y="10" width="394" height="143"/> |
|||
<subviews> |
|||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_recipient_bg" translatesAutoresizingMaskIntoConstraints="NO" id="5TK-AP-lxB"> |
|||
<rect key="frame" x="0.0" y="0.0" width="394" height="143"/> |
|||
</imageView> |
|||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_gme_logo" translatesAutoresizingMaskIntoConstraints="NO" id="6fD-2H-6LM"> |
|||
<rect key="frame" x="177" y="20" width="40" height="40"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="40" id="nkj-f8-d8n"/> |
|||
<constraint firstAttribute="width" constant="40" id="ot2-KX-ecp"/> |
|||
</constraints> |
|||
</imageView> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Xbg-Rb-ZZm"> |
|||
<rect key="frame" x="10" y="63" width="374" height="60"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="60" id="DQf-wE-kdy"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Bold" family="San Francisco Display" pointSize="22"/> |
|||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
<color key="backgroundColor" red="0.90588235289999997" green="0.92941176469999998" blue="0.94901960780000005" alpha="1" colorSpace="calibratedRGB"/> |
|||
<constraints> |
|||
<constraint firstItem="5TK-AP-lxB" firstAttribute="leading" secondItem="hkI-6C-D3U" secondAttribute="leading" id="4Be-EI-BAa"/> |
|||
<constraint firstAttribute="bottom" secondItem="5TK-AP-lxB" secondAttribute="bottom" id="7wN-h4-Gny"/> |
|||
<constraint firstAttribute="bottom" secondItem="Xbg-Rb-ZZm" secondAttribute="bottom" constant="20" id="An5-0f-DHq"/> |
|||
<constraint firstItem="6fD-2H-6LM" firstAttribute="top" secondItem="hkI-6C-D3U" secondAttribute="top" constant="20" id="COq-t6-8DC"/> |
|||
<constraint firstItem="Xbg-Rb-ZZm" firstAttribute="top" secondItem="6fD-2H-6LM" secondAttribute="bottom" constant="3.1000000000000001" id="DSs-mR-N3F"/> |
|||
<constraint firstAttribute="trailing" secondItem="Xbg-Rb-ZZm" secondAttribute="trailing" constant="10" id="IO7-EG-K0v"/> |
|||
<constraint firstItem="6fD-2H-6LM" firstAttribute="centerX" secondItem="hkI-6C-D3U" secondAttribute="centerX" id="Img-d1-Vs0"/> |
|||
<constraint firstItem="Xbg-Rb-ZZm" firstAttribute="centerX" secondItem="hkI-6C-D3U" secondAttribute="centerX" id="UQ0-zx-qSJ"/> |
|||
<constraint firstItem="Xbg-Rb-ZZm" firstAttribute="leading" secondItem="hkI-6C-D3U" secondAttribute="leading" constant="10" id="VvW-lQ-UZv"/> |
|||
<constraint firstAttribute="trailing" secondItem="5TK-AP-lxB" secondAttribute="trailing" id="Z12-P8-QhM"/> |
|||
<constraint firstItem="5TK-AP-lxB" firstAttribute="top" secondItem="hkI-6C-D3U" secondAttribute="top" id="ZVu-xE-Aou"/> |
|||
</constraints> |
|||
</view> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Tsm-xj-I5h" customClass="ShadowView" customModule="GME_Remit" customModuleProvider="target"> |
|||
<rect key="frame" x="10" y="163" width="394" height="419"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="Q9c-BU-l5C"> |
|||
<rect key="frame" x="5" y="5" width="384" height="409"/> |
|||
<subviews> |
|||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DOP-Ff-ESW" userLabel="Receiver Info"> |
|||
<rect key="frame" x="0.0" y="0.0" width="384" height="123"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="1.5" translatesAutoresizingMaskIntoConstraints="NO" id="cRq-El-s62"> |
|||
<rect key="frame" x="0.0" y="0.0" width="384" height="123"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mEr-od-RxI" userLabel="Receiver"> |
|||
<rect key="frame" x="0.0" y="0.0" width="384" height="40"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="gVt-JT-tuB"> |
|||
<rect key="frame" x="13" y="0.0" width="358" height="40"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="253" verticalHuggingPriority="251" text="Receiver" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="I30-Tk-FYo" userLabel="Email"> |
|||
<rect key="frame" x="0.0" y="0.0" width="54.5" height="40"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoText-Regular" family="San Francisco Text" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Cxg-sM-Zip"> |
|||
<rect key="frame" x="56.5" y="0.0" width="301.5" height="40"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="40" id="8f6-b8-8NP"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoText-Bold" family="San Francisco Text" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="gVt-JT-tuB" firstAttribute="leading" secondItem="mEr-od-RxI" secondAttribute="leading" constant="13" id="GpS-Wz-s2I"/> |
|||
<constraint firstAttribute="trailing" secondItem="gVt-JT-tuB" secondAttribute="trailing" constant="13" id="J1X-RN-iGY"/> |
|||
<constraint firstAttribute="bottom" secondItem="gVt-JT-tuB" secondAttribute="bottom" id="T7x-YV-A1G"/> |
|||
<constraint firstItem="gVt-JT-tuB" firstAttribute="top" secondItem="mEr-od-RxI" secondAttribute="top" id="vSW-27-XDt"/> |
|||
</constraints> |
|||
</view> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IrK-Nw-HLt" userLabel="Mobile No."> |
|||
<rect key="frame" x="0.0" y="41.5" width="384" height="40"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="CSC-sz-7gY"> |
|||
<rect key="frame" x="13" y="0.0" width="358" height="40"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Mobile No." lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NtE-oz-TL8" userLabel="Mobile"> |
|||
<rect key="frame" x="0.0" y="0.0" width="68.5" height="40"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoText-Regular" family="San Francisco Text" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rHn-4a-Asj"> |
|||
<rect key="frame" x="70.5" y="0.0" width="287.5" height="40"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoText-Bold" family="San Francisco Text" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="bottom" secondItem="CSC-sz-7gY" secondAttribute="bottom" id="msk-ct-pII"/> |
|||
<constraint firstAttribute="trailing" secondItem="CSC-sz-7gY" secondAttribute="trailing" constant="13" id="nNh-9j-XcK"/> |
|||
<constraint firstItem="CSC-sz-7gY" firstAttribute="top" secondItem="IrK-Nw-HLt" secondAttribute="top" id="sGI-lB-YKf"/> |
|||
<constraint firstItem="CSC-sz-7gY" firstAttribute="leading" secondItem="IrK-Nw-HLt" secondAttribute="leading" constant="13" id="xRm-Y1-g8i"/> |
|||
</constraints> |
|||
</view> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BpF-7A-UVl" userLabel="Pickup Branch"> |
|||
<rect key="frame" x="0.0" y="83" width="384" height="40"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="PiN-7d-nFh"> |
|||
<rect key="frame" x="13" y="0.0" width="358" height="40"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="Pickup Branch" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2yg-MJ-B9e" userLabel="Agent"> |
|||
<rect key="frame" x="0.0" y="0.0" width="178" height="40"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoText-Regular" family="San Francisco Text" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="4" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="We4-IZ-Gvg"> |
|||
<rect key="frame" x="180" y="0.0" width="178" height="40"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoText-Bold" family="San Francisco Text" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="PiN-7d-nFh" firstAttribute="top" secondItem="BpF-7A-UVl" secondAttribute="top" id="1Y2-20-kCx"/> |
|||
<constraint firstAttribute="bottom" secondItem="PiN-7d-nFh" secondAttribute="bottom" id="2hj-bT-K3u"/> |
|||
<constraint firstItem="PiN-7d-nFh" firstAttribute="leading" secondItem="BpF-7A-UVl" secondAttribute="leading" constant="13" id="TkA-1E-zll"/> |
|||
<constraint firstAttribute="trailing" secondItem="PiN-7d-nFh" secondAttribute="trailing" constant="13" id="Xg3-sO-RIo"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<constraints> |
|||
<constraint firstItem="IrK-Nw-HLt" firstAttribute="height" secondItem="mEr-od-RxI" secondAttribute="height" id="uv5-Rk-cCw"/> |
|||
</constraints> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="cRq-El-s62" firstAttribute="top" secondItem="DOP-Ff-ESW" secondAttribute="top" id="VGV-Uq-efX"/> |
|||
<constraint firstItem="cRq-El-s62" firstAttribute="leading" secondItem="DOP-Ff-ESW" secondAttribute="leading" id="Y8F-04-LTX"/> |
|||
<constraint firstAttribute="trailing" secondItem="cRq-El-s62" secondAttribute="trailing" id="cae-IK-VM8"/> |
|||
<constraint firstAttribute="bottom" secondItem="cRq-El-s62" secondAttribute="bottom" id="r1A-rR-d5j"/> |
|||
</constraints> |
|||
<userDefinedRuntimeAttributes> |
|||
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> |
|||
<integer key="value" value="10"/> |
|||
</userDefinedRuntimeAttribute> |
|||
</userDefinedRuntimeAttributes> |
|||
</view> |
|||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JxA-g4-fRU" userLabel="Product Info"> |
|||
<rect key="frame" x="0.0" y="143" width="384" height="81.5"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="1.5" translatesAutoresizingMaskIntoConstraints="NO" id="gDn-Ex-JmC"> |
|||
<rect key="frame" x="0.0" y="0.0" width="384" height="81.5"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="q8q-du-qPk" userLabel="Product Name"> |
|||
<rect key="frame" x="0.0" y="0.0" width="384" height="40"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="LhO-Sg-A7j"> |
|||
<rect key="frame" x="13" y="0.0" width="358" height="40"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="Product Name" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1PZ-cv-Df1" userLabel="Mobile"> |
|||
<rect key="frame" x="0.0" y="0.0" width="91" height="40"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoText-Regular" family="San Francisco Text" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qa3-bO-tDx"> |
|||
<rect key="frame" x="93" y="0.0" width="265" height="40"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="40" id="NFA-zc-UrA"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoText-Bold" family="San Francisco Text" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="trailing" secondItem="LhO-Sg-A7j" secondAttribute="trailing" constant="13" id="UGg-g3-zQm"/> |
|||
<constraint firstAttribute="bottom" secondItem="LhO-Sg-A7j" secondAttribute="bottom" id="kSA-hu-VgP"/> |
|||
<constraint firstItem="LhO-Sg-A7j" firstAttribute="top" secondItem="q8q-du-qPk" secondAttribute="top" id="q4W-0Z-yBu"/> |
|||
<constraint firstItem="LhO-Sg-A7j" firstAttribute="leading" secondItem="q8q-du-qPk" secondAttribute="leading" constant="13" id="y6p-nz-Lbf"/> |
|||
</constraints> |
|||
</view> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="MRr-Fq-a86" userLabel="Product Point"> |
|||
<rect key="frame" x="0.0" y="41.5" width="384" height="40"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="lNz-qf-prM"> |
|||
<rect key="frame" x="13" y="0.0" width="358" height="40"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="Product Point" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aaG-Qq-KUc" userLabel="Mobile"> |
|||
<rect key="frame" x="0.0" y="0.0" width="86" height="40"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoText-Regular" family="San Francisco Text" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="B9a-u8-BrE"> |
|||
<rect key="frame" x="88" y="0.0" width="270" height="40"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoText-Bold" family="San Francisco Text" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="trailing" secondItem="lNz-qf-prM" secondAttribute="trailing" constant="13" id="23N-Ca-5VL"/> |
|||
<constraint firstItem="lNz-qf-prM" firstAttribute="leading" secondItem="MRr-Fq-a86" secondAttribute="leading" constant="13" id="CTL-Ha-Ls6"/> |
|||
<constraint firstItem="lNz-qf-prM" firstAttribute="top" secondItem="MRr-Fq-a86" secondAttribute="top" id="wqL-Mu-7Ml"/> |
|||
<constraint firstAttribute="bottom" secondItem="lNz-qf-prM" secondAttribute="bottom" id="yzB-OG-gov"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="gDn-Ex-JmC" firstAttribute="leading" secondItem="JxA-g4-fRU" secondAttribute="leading" id="9k6-br-mu5"/> |
|||
<constraint firstAttribute="bottom" secondItem="gDn-Ex-JmC" secondAttribute="bottom" id="n9N-Tj-EM4"/> |
|||
<constraint firstItem="gDn-Ex-JmC" firstAttribute="top" secondItem="JxA-g4-fRU" secondAttribute="top" id="qTw-vQ-pFw"/> |
|||
<constraint firstAttribute="trailing" secondItem="gDn-Ex-JmC" secondAttribute="trailing" id="xr8-LX-z1A"/> |
|||
</constraints> |
|||
<userDefinedRuntimeAttributes> |
|||
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> |
|||
<integer key="value" value="10"/> |
|||
</userDefinedRuntimeAttribute> |
|||
</userDefinedRuntimeAttributes> |
|||
</view> |
|||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BQN-9Y-23F" userLabel="Order Info"> |
|||
<rect key="frame" x="0.0" y="244.5" width="384" height="164.5"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="1.5" translatesAutoresizingMaskIntoConstraints="NO" id="7Gx-Dh-oQy"> |
|||
<rect key="frame" x="0.0" y="0.0" width="384" height="164.5"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JfA-HA-ytc" userLabel="Order No."> |
|||
<rect key="frame" x="0.0" y="0.0" width="384" height="40"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="43a-gu-QZu"> |
|||
<rect key="frame" x="13" y="0.0" width="358" height="40"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Order No." lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dj8-c4-oq0"> |
|||
<rect key="frame" x="0.0" y="0.0" width="61.5" height="40"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoText-Regular" family="San Francisco Text" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mCO-PG-L20"> |
|||
<rect key="frame" x="63.5" y="0.0" width="294.5" height="40"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="40" id="LEP-IG-E5Z"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoText-Bold" family="San Francisco Text" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="bottom" secondItem="43a-gu-QZu" secondAttribute="bottom" id="PSv-Hi-rXS"/> |
|||
<constraint firstAttribute="trailing" secondItem="43a-gu-QZu" secondAttribute="trailing" constant="13" id="ZeG-HO-kmv"/> |
|||
<constraint firstItem="43a-gu-QZu" firstAttribute="leading" secondItem="JfA-HA-ytc" secondAttribute="leading" constant="13" id="lnr-1l-ryR"/> |
|||
<constraint firstItem="43a-gu-QZu" firstAttribute="top" secondItem="JfA-HA-ytc" secondAttribute="top" id="yjx-up-3B7"/> |
|||
</constraints> |
|||
</view> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uWu-RU-Mvk" userLabel="Order Date"> |
|||
<rect key="frame" x="0.0" y="41.5" width="384" height="40"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="tTs-OY-lJA"> |
|||
<rect key="frame" x="13" y="0.0" width="358" height="40"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Order Date" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PvS-wW-06Y"> |
|||
<rect key="frame" x="0.0" y="0.0" width="69" height="40"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoText-Regular" family="San Francisco Text" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yWp-Py-0S3"> |
|||
<rect key="frame" x="71" y="0.0" width="287" height="40"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="40" id="8sp-k4-Kew"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoText-Bold" family="San Francisco Text" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="tTs-OY-lJA" firstAttribute="leading" secondItem="uWu-RU-Mvk" secondAttribute="leading" constant="13" id="6Q8-In-3qf"/> |
|||
<constraint firstAttribute="trailing" secondItem="tTs-OY-lJA" secondAttribute="trailing" constant="13" id="TT0-aZ-uD8"/> |
|||
<constraint firstItem="tTs-OY-lJA" firstAttribute="top" secondItem="uWu-RU-Mvk" secondAttribute="top" id="Zqc-8D-jA4"/> |
|||
<constraint firstAttribute="bottom" secondItem="tTs-OY-lJA" secondAttribute="bottom" id="ozO-xP-cda"/> |
|||
</constraints> |
|||
</view> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Qud-0h-mhp" userLabel="Order Receive Date"> |
|||
<rect key="frame" x="0.0" y="83" width="384" height="40"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="ySv-lS-Q6F"> |
|||
<rect key="frame" x="13" y="0.0" width="358" height="40"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Order Receive Date" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rBX-wE-UOT" userLabel="Order Receive Date"> |
|||
<rect key="frame" x="0.0" y="0.0" width="295.5" height="40"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoText-Regular" family="San Francisco Text" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="N/A" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="j1v-xx-a3s"> |
|||
<rect key="frame" x="297.5" y="0.0" width="60.5" height="40"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="40" id="yTi-Bf-xL5"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoText-Bold" family="San Francisco Text" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="ySv-lS-Q6F" firstAttribute="top" secondItem="Qud-0h-mhp" secondAttribute="top" id="2s4-jj-ds4"/> |
|||
<constraint firstAttribute="bottom" secondItem="ySv-lS-Q6F" secondAttribute="bottom" id="PjZ-mN-FXl"/> |
|||
<constraint firstAttribute="trailing" secondItem="ySv-lS-Q6F" secondAttribute="trailing" constant="13" id="Se6-sT-yEh"/> |
|||
<constraint firstItem="ySv-lS-Q6F" firstAttribute="leading" secondItem="Qud-0h-mhp" secondAttribute="leading" constant="13" id="vLG-tf-DcY"/> |
|||
</constraints> |
|||
</view> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZyX-gQ-cw7" userLabel="Order Type"> |
|||
<rect key="frame" x="0.0" y="124.5" width="384" height="40"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="jdf-fT-3uh"> |
|||
<rect key="frame" x="13" y="0.0" width="358" height="40"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="Order Type" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rFr-Yw-gZz"> |
|||
<rect key="frame" x="0.0" y="0.0" width="69" height="40"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoText-Regular" family="San Francisco Text" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VAI-hR-ZHd"> |
|||
<rect key="frame" x="71" y="0.0" width="287" height="40"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoText-Bold" family="San Francisco Text" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="bottom" secondItem="jdf-fT-3uh" secondAttribute="bottom" id="Mzy-z3-p7x"/> |
|||
<constraint firstAttribute="trailing" secondItem="jdf-fT-3uh" secondAttribute="trailing" constant="13" id="P23-X7-OVY"/> |
|||
<constraint firstItem="jdf-fT-3uh" firstAttribute="leading" secondItem="ZyX-gQ-cw7" secondAttribute="leading" constant="13" id="Vrr-NV-uvv"/> |
|||
<constraint firstItem="jdf-fT-3uh" firstAttribute="top" secondItem="ZyX-gQ-cw7" secondAttribute="top" id="enK-Eq-HpD"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="7Gx-Dh-oQy" firstAttribute="leading" secondItem="BQN-9Y-23F" secondAttribute="leading" id="5t8-en-z3p"/> |
|||
<constraint firstAttribute="trailing" secondItem="7Gx-Dh-oQy" secondAttribute="trailing" id="9kC-8K-e36"/> |
|||
<constraint firstAttribute="bottom" secondItem="7Gx-Dh-oQy" secondAttribute="bottom" id="k9I-z1-9pT"/> |
|||
<constraint firstItem="7Gx-Dh-oQy" firstAttribute="top" secondItem="BQN-9Y-23F" secondAttribute="top" id="y86-AT-veF"/> |
|||
</constraints> |
|||
<userDefinedRuntimeAttributes> |
|||
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius"> |
|||
<integer key="value" value="10"/> |
|||
</userDefinedRuntimeAttribute> |
|||
</userDefinedRuntimeAttributes> |
|||
</view> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="Q9c-BU-l5C" firstAttribute="top" secondItem="Tsm-xj-I5h" secondAttribute="top" constant="5" id="AKf-a5-ZjC"/> |
|||
<constraint firstAttribute="bottom" secondItem="Q9c-BU-l5C" secondAttribute="bottom" constant="5" id="O2d-pC-MQV"/> |
|||
<constraint firstItem="Q9c-BU-l5C" firstAttribute="leading" secondItem="Tsm-xj-I5h" secondAttribute="leading" constant="5" id="SZO-W7-irZ"/> |
|||
<constraint firstAttribute="trailing" secondItem="Q9c-BU-l5C" secondAttribute="trailing" constant="5" id="o6v-CF-x2Y"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="Tsm-xj-I5h" firstAttribute="top" secondItem="hkI-6C-D3U" secondAttribute="bottom" constant="10" id="6YO-rG-xVD"/> |
|||
<constraint firstItem="Tsm-xj-I5h" firstAttribute="leading" secondItem="OVJ-Ev-gIB" secondAttribute="leading" constant="10" id="7KN-uZ-VWB"/> |
|||
<constraint firstItem="hkI-6C-D3U" firstAttribute="leading" secondItem="OVJ-Ev-gIB" secondAttribute="leading" constant="10" id="FMM-le-P4L"/> |
|||
<constraint firstAttribute="trailing" secondItem="Tsm-xj-I5h" secondAttribute="trailing" constant="10" id="L9m-pF-RAx"/> |
|||
<constraint firstAttribute="trailing" secondItem="hkI-6C-D3U" secondAttribute="trailing" constant="10" id="NJJ-V3-0KR"/> |
|||
<constraint firstItem="hkI-6C-D3U" firstAttribute="top" secondItem="OVJ-Ev-gIB" secondAttribute="top" constant="10" id="dfd-Ko-aPX"/> |
|||
<constraint firstAttribute="bottom" secondItem="Tsm-xj-I5h" secondAttribute="bottom" constant="25" id="quw-hE-d1t"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="OVJ-Ev-gIB" firstAttribute="top" secondItem="NrY-Y4-WbX" secondAttribute="top" id="MTO-r8-6ot"/> |
|||
<constraint firstAttribute="trailing" secondItem="OVJ-Ev-gIB" secondAttribute="trailing" id="gOG-er-IxB"/> |
|||
<constraint firstAttribute="bottom" secondItem="OVJ-Ev-gIB" secondAttribute="bottom" id="oTq-Eq-I2J"/> |
|||
<constraint firstItem="OVJ-Ev-gIB" firstAttribute="leading" secondItem="NrY-Y4-WbX" secondAttribute="leading" id="qfs-BR-GAg"/> |
|||
<constraint firstItem="OVJ-Ev-gIB" firstAttribute="width" secondItem="NrY-Y4-WbX" secondAttribute="width" id="rjq-g3-22q"/> |
|||
</constraints> |
|||
</scrollView> |
|||
</subviews> |
|||
<color key="backgroundColor" name="ThemeMainBackground"/> |
|||
<constraints> |
|||
<constraint firstItem="NrY-Y4-WbX" firstAttribute="trailing" secondItem="PLA-Jv-EU8" secondAttribute="trailing" id="6WB-2p-jdB"/> |
|||
<constraint firstItem="NrY-Y4-WbX" firstAttribute="top" secondItem="PLA-Jv-EU8" secondAttribute="top" id="7yf-Ey-Kvf"/> |
|||
<constraint firstItem="NrY-Y4-WbX" firstAttribute="bottom" secondItem="PLA-Jv-EU8" secondAttribute="bottom" id="Nva-fN-XtY"/> |
|||
<constraint firstItem="NrY-Y4-WbX" firstAttribute="leading" secondItem="PLA-Jv-EU8" secondAttribute="leading" id="ehH-6Y-3P2"/> |
|||
</constraints> |
|||
<viewLayoutGuide key="safeArea" id="PLA-Jv-EU8"/> |
|||
</view> |
|||
<connections> |
|||
<outlet property="mobileNumberLabel" destination="rHn-4a-Asj" id="4KC-kR-fF6"/> |
|||
<outlet property="mobileNumberTitleLabel" destination="NtE-oz-TL8" id="wbN-fN-w2U"/> |
|||
<outlet property="orderDateLabel" destination="yWp-Py-0S3" id="Ln5-FN-Avl"/> |
|||
<outlet property="orderDateTitleLabel" destination="PvS-wW-06Y" id="1ux-vS-3Mf"/> |
|||
<outlet property="orderDetailContentView" destination="OVJ-Ev-gIB" id="xGX-yQ-5Y4"/> |
|||
<outlet property="orderIDNumberLabel" destination="mCO-PG-L20" id="JVy-Wr-T5x"/> |
|||
<outlet property="orderIDNumberTitleLabel" destination="dj8-c4-oq0" id="4L8-wT-5Ur"/> |
|||
<outlet property="orderStatusDateLabel" destination="j1v-xx-a3s" id="LIl-lR-VuC"/> |
|||
<outlet property="orderStatusDateTitleLabel" destination="rBX-wE-UOT" id="XjM-RS-s8S"/> |
|||
<outlet property="orderStatusLabel" destination="Xbg-Rb-ZZm" id="XiT-ih-I61"/> |
|||
<outlet property="orderTypeLabel" destination="VAI-hR-ZHd" id="8GB-Q0-H4w"/> |
|||
<outlet property="orderTypeTitleLabel" destination="rFr-Yw-gZz" id="zIf-6N-en1"/> |
|||
<outlet property="pickupBranchLabel" destination="We4-IZ-Gvg" id="sPT-o6-zdI"/> |
|||
<outlet property="pickupBranchTitleLabel" destination="2yg-MJ-B9e" id="vN3-Sb-XC0"/> |
|||
<outlet property="productNameLabel" destination="qa3-bO-tDx" id="poc-1L-9OA"/> |
|||
<outlet property="productNameTitleLabel" destination="1PZ-cv-Df1" id="2n3-Bk-hon"/> |
|||
<outlet property="productPointLabel" destination="B9a-u8-BrE" id="WlN-3h-ydU"/> |
|||
<outlet property="productPointTitleLabel" destination="aaG-Qq-KUc" id="zeH-hk-gjA"/> |
|||
<outlet property="receiverNameLabel" destination="Cxg-sM-Zip" id="QdP-iK-y71"/> |
|||
<outlet property="receiverNameTitleLabel" destination="I30-Tk-FYo" id="icE-WA-HMa"/> |
|||
<outlet property="summaryView" destination="hkI-6C-D3U" id="34L-UB-M3b"/> |
|||
</connections> |
|||
</viewController> |
|||
<placeholder placeholderIdentifier="IBFirstResponder" id="8je-5K-XuW" userLabel="First Responder" sceneMemberID="firstResponder"/> |
|||
</objects> |
|||
<point key="canvasLocation" x="-92" y="232.08395802098951"/> |
|||
</scene> |
|||
</scenes> |
|||
<resources> |
|||
<image name="ic_gme_logo" width="40" height="40"/> |
|||
<image name="ic_recipient_bg" width="355" height="226"/> |
|||
<namedColor name="ThemeMainBackground"> |
|||
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
<namedColor name="ThemeText"> |
|||
<color red="0.28999999165534973" green="0.28999999165534973" blue="0.28999999165534973" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
</resources> |
|||
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</document> |
@ -1,145 +0,0 @@ |
|||
// |
|||
// DetailOrderViewController.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 15/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
|
|||
class DetailOrderViewController: UIViewController { |
|||
|
|||
// MARK: Properties |
|||
|
|||
var presenter: DetailOrderModuleInterface? |
|||
|
|||
// MARK: Computed Properties |
|||
|
|||
private var order: Order? { |
|||
didSet { |
|||
guard |
|||
let order = order, |
|||
let statusCode = order.orderStatus, |
|||
let status = OrderCell.Status(rawValue: statusCode) |
|||
else { return } |
|||
|
|||
receiverNameLabel.text = order.recvName |
|||
mobileNumberLabel.text = order.recvPhoneNumber |
|||
pickupBranchLabel.text = order.branchName |
|||
|
|||
productNameLabel.text = order.productName |
|||
productPointLabel.text = order.usePoint?.likeCommaMoney() |
|||
|
|||
orderStatusLabel.text = status.message |
|||
orderDateLabel.text = order.createdDate |
|||
orderIDNumberLabel.text = order.orderID |
|||
orderTypeLabel.text = order.orderType == "9" ? |
|||
"canceled_text".localized() : "pickup_from_branch_text".localized() |
|||
|
|||
switch order.orderStatus { |
|||
case "9" : |
|||
orderStatusDateLabel.text = order.modifiedDate |
|||
orderStatusDateTitleLabel.text = "order_canceled_date_text".localized() |
|||
default : |
|||
orderStatusDateLabel.text = order.recvDate |
|||
orderStatusDateTitleLabel.text = "order_receive_date_text".localized() |
|||
} |
|||
} |
|||
} |
|||
|
|||
// MARK: IBOutlets - value Label |
|||
@IBOutlet weak var orderStatusLabel: UILabel! |
|||
@IBOutlet weak var orderDetailContentView: UIView! |
|||
|
|||
@IBOutlet weak var receiverNameLabel: UILabel! |
|||
@IBOutlet weak var pickupBranchLabel: UILabel! |
|||
@IBOutlet weak var mobileNumberLabel: UILabel! |
|||
|
|||
@IBOutlet weak var productNameLabel: UILabel! |
|||
@IBOutlet weak var productPointLabel: UILabel! |
|||
|
|||
@IBOutlet weak var orderDateLabel: UILabel! |
|||
@IBOutlet weak var orderStatusDateLabel: UILabel! |
|||
@IBOutlet weak var orderIDNumberLabel: UILabel! |
|||
@IBOutlet weak var orderTypeLabel: UILabel! |
|||
|
|||
// MARK: IBOutlets - Title Label |
|||
@IBOutlet weak var receiverNameTitleLabel: UILabel! |
|||
@IBOutlet weak var pickupBranchTitleLabel: UILabel! |
|||
@IBOutlet weak var mobileNumberTitleLabel: UILabel! |
|||
|
|||
@IBOutlet weak var productNameTitleLabel: UILabel! |
|||
@IBOutlet weak var productPointTitleLabel: UILabel! |
|||
|
|||
@IBOutlet weak var orderDateTitleLabel: UILabel! |
|||
@IBOutlet weak var orderStatusDateTitleLabel: UILabel! |
|||
@IBOutlet weak var orderIDNumberTitleLabel: UILabel! |
|||
@IBOutlet weak var orderTypeTitleLabel: UILabel! |
|||
|
|||
@IBOutlet weak var summaryView: UIView! |
|||
// MARK: VC's Life cycle |
|||
|
|||
override func viewDidLoad() { |
|||
super.viewDidLoad() |
|||
setup() |
|||
setMultiLanguage() |
|||
} |
|||
|
|||
override func viewWillAppear(_ animated: Bool) { |
|||
super.viewWillAppear(animated) |
|||
|
|||
title = "detail_order_title_text".localized() |
|||
} |
|||
|
|||
override func viewWillDisappear(_ animated: Bool) { |
|||
super.viewWillDisappear(animated) |
|||
|
|||
title = "" |
|||
} |
|||
|
|||
// MARK: IBActions |
|||
|
|||
} |
|||
|
|||
// MARK: DetailOrderViewInterface |
|||
extension DetailOrderViewController: DetailOrderViewInterface { |
|||
func setOrder(_ order: Order?) { |
|||
self.order = order |
|||
} |
|||
} |
|||
|
|||
// MARK: Other Functions |
|||
extension DetailOrderViewController { |
|||
private func setup() { |
|||
// all setup should be done here |
|||
presenter?.fetchOrder() |
|||
|
|||
summaryView.layer.cornerRadius = 5 |
|||
|
|||
navigationController?.interactivePopGestureRecognizer?.delegate = self |
|||
navigationController?.interactivePopGestureRecognizer?.isEnabled = true |
|||
} |
|||
|
|||
private func setMultiLanguage() { |
|||
receiverNameTitleLabel.text = "receiver_text".localized() |
|||
mobileNumberTitleLabel.text = "mobile_number_text".localized() |
|||
pickupBranchTitleLabel.text = "pickup_banch_text".localized() |
|||
productNameTitleLabel.text = "product_name_text".localized() |
|||
productPointTitleLabel.text = "product_point_text".localized() |
|||
orderIDNumberTitleLabel.text = "order_no_text".localized() |
|||
orderDateTitleLabel.text = "order_date_text".localized() |
|||
orderTypeTitleLabel.text = "order_type_text".localized() |
|||
|
|||
} |
|||
} |
|||
|
|||
// MARK: - UIGestureRecognizerDelegate |
|||
extension DetailOrderViewController: UIGestureRecognizerDelegate { |
|||
func gestureRecognizer( |
|||
_ gestureRecognizer: UIGestureRecognizer, |
|||
shouldBeRequiredToFailBy otherGestureRecognizer: UIGestureRecognizer |
|||
) -> Bool { |
|||
return true |
|||
} |
|||
} |
@ -1,11 +0,0 @@ |
|||
// |
|||
// DetailOrderViewInterface.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 15/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol DetailOrderViewInterface: class { |
|||
func setOrder(_ order: Order?) |
|||
} |
@ -1,42 +0,0 @@ |
|||
// |
|||
// DetailOrderWireframe.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 15/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
|
|||
class DetailOrderWireframe { |
|||
weak var view: UIViewController! |
|||
private var order: Order? |
|||
} |
|||
|
|||
extension DetailOrderWireframe: DetailOrderWireframeInput { |
|||
|
|||
var storyboardName: String {return "DetailOrder"} |
|||
|
|||
func getMainView() -> UIViewController { |
|||
let service = DetailOrderService() |
|||
let interactor = DetailOrderInteractor(service: service, order: order) |
|||
let presenter = DetailOrderPresenter() |
|||
let viewController = viewControllerFromStoryboard(of: DetailOrderViewController.self) |
|||
|
|||
viewController.presenter = presenter |
|||
interactor.output = presenter |
|||
presenter.interactor = interactor |
|||
presenter.wireframe = self |
|||
presenter.view = viewController |
|||
|
|||
view = viewController |
|||
return viewController |
|||
} |
|||
|
|||
func pushMainView(on source: UIViewController, order: Order?) { |
|||
self.order = order |
|||
|
|||
let mainView = self.getMainView() |
|||
source.navigationController?.pushViewController(mainView, animated: true) |
|||
} |
|||
} |
@ -1,14 +0,0 @@ |
|||
// |
|||
// DetailOrderWireframeInput.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 15/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
import UIKit |
|||
|
|||
protocol DetailOrderWireframeInput: WireframeInput { |
|||
func pushMainView(on source: UIViewController, order: Order?) |
|||
} |
@ -1,81 +0,0 @@ |
|||
// |
|||
// OrderHistoryInteractor.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 14/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class OrderHistoryInteractor { |
|||
|
|||
// MARK: Properties |
|||
|
|||
weak var output: OrderHistoryInteractorOutput? |
|||
private let service: OrderHistoryServiceType |
|||
|
|||
private var orders: [Order]? |
|||
|
|||
// MARK: Initialization |
|||
|
|||
init(service: OrderHistoryServiceType) { |
|||
self.service = service |
|||
} |
|||
|
|||
} |
|||
|
|||
// MARK: OrderHistory interactor input interface |
|||
|
|||
extension OrderHistoryInteractor: OrderHistoryInteractorInput { |
|||
func fetchOrderHistory(from startDate: String, to endDate: String) { |
|||
service.fetchOrderHistory( |
|||
from: startDate, |
|||
to: endDate, |
|||
success: {[weak self] in |
|||
guard let `self` = self else { |
|||
return |
|||
} |
|||
if self.orders != $0 { |
|||
self.orders = $0 |
|||
} |
|||
|
|||
self.output?.setOrderHistoryModel(with: self.orders) |
|||
}, |
|||
failure: {[weak self] in |
|||
guard let `self` = self else { |
|||
return |
|||
} |
|||
self.output?.didFailFetchOrderHistory(with: $0) |
|||
} |
|||
) |
|||
} |
|||
|
|||
func fetchFilteredOrders(by searchText: String) { |
|||
if searchText == "" { |
|||
self.output?.setOrderHistoryModel(with: orders) |
|||
return |
|||
} |
|||
|
|||
let filterdOrder = orders?.filter { |
|||
guard |
|||
let productName = $0.productName, |
|||
let receiverName = $0.recvName, |
|||
let createDate = $0.createdDate, |
|||
let orderID = $0.orderID, |
|||
let mobileNumber = $0.recvPhoneNumber |
|||
else { |
|||
return false |
|||
} |
|||
|
|||
return productName.lowercased().contains(searchText.lowercased()) || |
|||
receiverName.lowercased().contains(searchText.lowercased()) || |
|||
createDate.lowercased().contains(searchText.lowercased()) || |
|||
orderID.lowercased().contains(searchText.lowercased()) || |
|||
mobileNumber.lowercased().contains(searchText.lowercased()) |
|||
} |
|||
|
|||
self.output?.setOrderHistoryModel(with: filterdOrder) |
|||
} |
|||
|
|||
} |
@ -1,37 +0,0 @@ |
|||
// |
|||
// OrderHistoryInteractorIO.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 14/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol OrderHistoryInteractorInput: class { |
|||
|
|||
/// Fetch order history using OrderHistoryService |
|||
/// |
|||
/// - Parameters: |
|||
/// - starDate: Inquiry start date |
|||
/// - endDate: Inquiry end date |
|||
func fetchOrderHistory(from startDate: String, to endDate: String) |
|||
|
|||
/// Fetch orders history as filterd from searchText |
|||
/// |
|||
/// - Parameter searchText: search text |
|||
func fetchFilteredOrders(by searchText: String) |
|||
|
|||
} |
|||
|
|||
protocol OrderHistoryInteractorOutput: class { |
|||
|
|||
/// If success fetch order history, send model to presenter |
|||
/// |
|||
/// - Parameter model: order history |
|||
func setOrderHistoryModel(with model: [Order]?) |
|||
|
|||
/// If fail fetch order history, send error to presenter |
|||
/// |
|||
/// - Parameter error: error |
|||
func didFailFetchOrderHistory(with error: Error) |
|||
|
|||
} |
@ -1,73 +0,0 @@ |
|||
// |
|||
// Order.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 14/05/2019. |
|||
// Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
import ObjectMapper |
|||
|
|||
struct Order: Mappable { |
|||
var orderID: String? |
|||
var productCode: String? |
|||
var productName: String? |
|||
var usePoint: String? |
|||
var orderType: String? |
|||
var recvType: String? |
|||
var branchCode: String? |
|||
var recvAddress: String? |
|||
var recvZipCode: String? |
|||
var recvPhoneNumber: String? |
|||
var recvName: String? |
|||
var orderStatus: String? |
|||
var createdDate: String? |
|||
var modifiedDate: String? |
|||
var branchName: String? |
|||
var recvDate: String? |
|||
|
|||
init?(map: Map) { } |
|||
|
|||
mutating func mapping(map: Map) { |
|||
orderID <- map["orderId"] |
|||
productCode <- map["productCode"] |
|||
productName <- map["productName"] |
|||
usePoint <- map["usePoint"] |
|||
orderType <- map["orderType"] |
|||
recvType <- map["recvType"] |
|||
branchCode <- map["branchCode"] |
|||
recvAddress <- map["recvAddress"] |
|||
recvZipCode <- map["recvZipCode"] |
|||
recvPhoneNumber <- map["recvPhoneNumber"] |
|||
recvName <- map["recvName"] |
|||
orderStatus <- map["orderStatus"] |
|||
createdDate <- map["createdDate"] |
|||
modifiedDate <- map["modifiedDate"] |
|||
recvDate <- map["recvDate"] |
|||
branchName <- map["branchName"] |
|||
|
|||
} |
|||
|
|||
} |
|||
|
|||
extension Order: Equatable { |
|||
static func == (lhs: Order, rhs: Order) -> Bool { |
|||
return lhs.orderID == rhs.orderID && |
|||
lhs.productCode == rhs.productCode && |
|||
lhs.productName == rhs.productName && |
|||
lhs.usePoint == rhs.usePoint && |
|||
lhs.orderType == rhs.orderType && |
|||
lhs.recvType == rhs.recvType && |
|||
lhs.branchCode == rhs.branchCode && |
|||
lhs.recvAddress == rhs.recvAddress && |
|||
lhs.recvZipCode == rhs.recvZipCode && |
|||
lhs.recvPhoneNumber == rhs.recvPhoneNumber && |
|||
lhs.recvName == rhs.recvName && |
|||
lhs.orderStatus == rhs.orderStatus && |
|||
lhs.createdDate == rhs.createdDate && |
|||
lhs.modifiedDate == rhs.modifiedDate && |
|||
lhs.recvDate == rhs.recvDate && |
|||
lhs.branchName == rhs.branchName |
|||
} |
|||
} |
@ -1,31 +0,0 @@ |
|||
// |
|||
// OrderContainer.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 14/05/2019. |
|||
// Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
import ObjectMapper |
|||
|
|||
struct OrderContainer: Mappable { |
|||
var errorCode: String? |
|||
var message: String? |
|||
var id: String? |
|||
var extra: String? |
|||
var extra2: String? |
|||
var data: [Order]? |
|||
|
|||
init?(map: Map) { } |
|||
|
|||
mutating func mapping(map: Map) { |
|||
errorCode <- map["ErrorCode"] |
|||
message <- map["Msg"] |
|||
id <- map["Id"] |
|||
extra <- map["Extra"] |
|||
extra2 <- map["Extra2"] |
|||
data <- map["Data"] |
|||
} |
|||
|
|||
} |
@ -1,59 +0,0 @@ |
|||
// |
|||
// OrderHistoryService.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 14/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class OrderHistoryService: OrderHistoryServiceType { |
|||
func fetchOrderHistory( |
|||
from startDate: String, |
|||
to endDate: String, |
|||
success: @escaping([Order]?) -> Void, |
|||
failure: @escaping(Error) -> Void |
|||
) { |
|||
|
|||
guard let userId = GMEDB.shared.user.string(.userId) else { |
|||
let error = NSError.init( |
|||
domain: "Network", |
|||
code: 0, |
|||
userInfo: [NSLocalizedDescriptionKey : "no exist email"]) |
|||
failure(error) |
|||
|
|||
return |
|||
} |
|||
|
|||
let parameter = [ |
|||
"userId": userId, |
|||
"startDate": startDate, |
|||
"endDate": endDate |
|||
] |
|||
|
|||
let url = baseUrlWithoutVersion + "v2/reward/productOrderedList" |
|||
// let url = baseUrlWithoutVersion + "v2/reward/productOrderd" |
|||
auth.request( |
|||
method: .post, |
|||
url: url, |
|||
params: parameter, |
|||
success: { (response: OrderContainer) in |
|||
if (response.errorCode ?? "") == "1" { |
|||
let error = NSError.init( |
|||
domain: "Network", |
|||
code: 0, |
|||
userInfo: [NSLocalizedDescriptionKey : |
|||
response.message ?? ""]) |
|||
|
|||
failure(error) |
|||
} else { |
|||
let model = response.data |
|||
success(model) |
|||
} |
|||
}, |
|||
failure: { failure($0) } |
|||
) |
|||
} |
|||
|
|||
} |
@ -1,25 +0,0 @@ |
|||
// |
|||
// OrderHistoryServiceType.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 14/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol OrderHistoryServiceType: class, ApiServiceType { |
|||
|
|||
/// Fetch order history |
|||
/// |
|||
/// - Parameters: |
|||
/// - startDate: Inquiry start date |
|||
/// - endDate: Inquiry end date |
|||
/// - success: ([Order]?) -> Void |
|||
/// - failure: (Error) -> Void |
|||
func fetchOrderHistory( |
|||
from startDate: String, |
|||
to endDate: String, |
|||
success: @escaping([Order]?) -> Void, |
|||
failure: @escaping(Error) -> Void |
|||
) |
|||
|
|||
} |
@ -1,32 +0,0 @@ |
|||
// |
|||
// OrderHistoryModuleInterface.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 14/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol OrderHistoryModuleInterface: class { |
|||
/// request to presenter about fetch order history |
|||
/// |
|||
/// - Parameters: |
|||
/// - startData: Inquiry start date |
|||
/// - endDate: Inquiry end date |
|||
func fetchOrders(from startDate: String, to endDate: String) |
|||
|
|||
/// Fetch orders history as filterd from searchText |
|||
/// |
|||
/// - Parameter searchText: search text |
|||
func fetchFilteredOrders(by searchText: String) |
|||
|
|||
/// move DetailOrderViewController |
|||
/// |
|||
/// - Parameter order: selected order |
|||
func pushDetailOrder(with order: Order?) |
|||
|
|||
/// present DataPicker ViewController |
|||
/// |
|||
/// - Parameter completion: selected dates handle closure |
|||
func presentDatePicker(completion: ((_ from: String?, _ to: String?) -> Void)?) |
|||
|
|||
} |
@ -1,56 +0,0 @@ |
|||
// |
|||
// OrderHistoryPresenter.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 14/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class OrderHistoryPresenter { |
|||
|
|||
// MARK: Properties |
|||
|
|||
weak var view: OrderHistoryViewInterface? |
|||
var interactor: OrderHistoryInteractorInput? |
|||
var wireframe: OrderHistoryWireframeInput? |
|||
|
|||
} |
|||
|
|||
// MARK: OrderHistory module interface |
|||
|
|||
extension OrderHistoryPresenter: OrderHistoryModuleInterface { |
|||
func fetchOrders(from startDate: String, to endDate: String) { |
|||
view?.stardLoading() |
|||
interactor?.fetchOrderHistory(from: startDate, to: endDate) |
|||
} |
|||
|
|||
func fetchFilteredOrders(by searchText: String) { |
|||
interactor?.fetchFilteredOrders(by: searchText) |
|||
} |
|||
|
|||
func pushDetailOrder(with order: Order?) { |
|||
wireframe?.pushDetailOrder(with: order) |
|||
} |
|||
|
|||
func presentDatePicker(completion: ((_ from: String?, _ to: String?) -> Void)?) { |
|||
wireframe?.presentDatePicker(completion: completion) |
|||
} |
|||
|
|||
} |
|||
|
|||
// MARK: OrderHistory interactor output interface |
|||
|
|||
extension OrderHistoryPresenter: OrderHistoryInteractorOutput { |
|||
func setOrderHistoryModel(with model: [Order]?) { |
|||
view?.endLoading() |
|||
view?.setOrderHistoryModel(with: model) |
|||
} |
|||
|
|||
func didFailFetchOrderHistory(with error: Error) { |
|||
view?.endLoading() |
|||
view?.didFailFetchOrderHistory(with: error) |
|||
} |
|||
|
|||
} |
@ -1,102 +0,0 @@ |
|||
// |
|||
// OrderCell.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 14/05/2019. |
|||
// Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
|
|||
class OrderCell: UITableViewCell { |
|||
|
|||
@IBOutlet weak var orderDateLabel: UILabel! |
|||
@IBOutlet weak var orderStatusLabel: UILabel! |
|||
@IBOutlet weak var branchNameLabel: UILabel! |
|||
|
|||
@IBOutlet weak var orderedProductNameLabel: UILabel! |
|||
@IBOutlet weak var orderedProductPointLabel: UILabel! |
|||
|
|||
@IBOutlet weak var orderIDLabel: UILabel! |
|||
|
|||
@IBOutlet weak var cellContentView: UIView! |
|||
|
|||
enum Status: String { |
|||
case orderCompleted = "1" |
|||
case delivered = "2" |
|||
case received = "3" |
|||
case orderCanceled = "9" |
|||
|
|||
var color: UIColor { |
|||
switch self { |
|||
case .orderCanceled: |
|||
return .themeRed |
|||
case .delivered: |
|||
return .init(hex: "#08a384") |
|||
case .received: |
|||
return .themeBlue |
|||
case .orderCompleted: |
|||
return .init(hex: "#08a384") |
|||
} |
|||
} |
|||
|
|||
var shortMessage: String { |
|||
switch self { |
|||
case .orderCanceled: |
|||
return "canceled_text".localized() |
|||
case .delivered: |
|||
return "DELIVERED".localized() |
|||
case .received: |
|||
return "received_text".localized() |
|||
case .orderCompleted: |
|||
return "ordered_text".localized() |
|||
} |
|||
} |
|||
|
|||
var message: String { |
|||
switch self { |
|||
case .orderCanceled: |
|||
return "your_order_canceled_text".localized() |
|||
case .delivered: |
|||
return "Delivered_text".localized() |
|||
case .received: |
|||
return "you_received_reward_text".localized() |
|||
case .orderCompleted: |
|||
return "your_order_completed_text".localized() |
|||
} |
|||
} |
|||
} |
|||
|
|||
override func awakeFromNib() { |
|||
super.awakeFromNib() |
|||
// Initialization code |
|||
} |
|||
|
|||
override func setSelected(_ selected: Bool, animated: Bool) { |
|||
super.setSelected(selected, animated: animated) |
|||
|
|||
// Configure the view for the selected state |
|||
} |
|||
|
|||
func setModel(with model: Order?) { |
|||
guard |
|||
let model = model, |
|||
let statusCode = model.orderStatus, |
|||
let status = Status(rawValue: statusCode) |
|||
else {return} |
|||
|
|||
orderIDLabel.text = model.orderID |
|||
orderDateLabel.text = model.createdDate |
|||
orderStatusLabel.text = status.shortMessage |
|||
|
|||
branchNameLabel.text = model.branchName |
|||
|
|||
orderedProductNameLabel.text = model.productName |
|||
orderedProductPointLabel.text = model.usePoint?.likeCommaMoney() |
|||
|
|||
orderStatusLabel.layer.cornerRadius = 5 |
|||
orderStatusLabel.backgroundColor = status.color |
|||
cellContentView.layer.cornerRadius = 5 |
|||
} |
|||
|
|||
} |
@ -1,367 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="HSb-ou-7T5"> |
|||
<device id="retina4_7" orientation="portrait" appearance="dark"/> |
|||
<dependencies> |
|||
<deployment identifier="iOS"/> |
|||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15509"/> |
|||
<capability name="Named colors" minToolsVersion="9.0"/> |
|||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> |
|||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
|||
</dependencies> |
|||
<customFonts key="customFonts"> |
|||
<array key="SanFranciscoDisplay-Medium.otf"> |
|||
<string>SanFranciscoDisplay-Medium</string> |
|||
</array> |
|||
<array key="SanFranciscoDisplay-Regular.otf"> |
|||
<string>SanFranciscoDisplay-Regular</string> |
|||
</array> |
|||
</customFonts> |
|||
<scenes> |
|||
<!--OrderHistory--> |
|||
<scene sceneID="R60-Pu-Hpy"> |
|||
<objects> |
|||
<viewController storyboardIdentifier="OrderHistoryViewController" title="OrderHistory" id="HSb-ou-7T5" customClass="OrderHistoryViewController" customModule="GME_Remit" sceneMemberID="viewController"> |
|||
<view key="view" contentMode="scaleToFill" id="9Uc-9s-KgO"> |
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SpX-eE-pj8"> |
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="56"/> |
|||
<subviews> |
|||
<searchBar contentMode="redraw" searchBarStyle="minimal" translatesAutoresizingMaskIntoConstraints="NO" id="VvS-IW-POd"> |
|||
<rect key="frame" x="0.0" y="0.0" width="319" height="56"/> |
|||
<textInputTraits key="textInputTraits"/> |
|||
</searchBar> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UcY-yS-vrK"> |
|||
<rect key="frame" x="319" y="0.0" width="56" height="56"/> |
|||
<subviews> |
|||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="njM-uI-aWq"> |
|||
<rect key="frame" x="3" y="3" width="50" height="50"/> |
|||
<state key="normal" image="ic_calender"/> |
|||
<connections> |
|||
<action selector="touchCalendar:" destination="HSb-ou-7T5" eventType="touchUpInside" id="aSR-3M-aEP"/> |
|||
</connections> |
|||
</button> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="njM-uI-aWq" firstAttribute="centerY" secondItem="UcY-yS-vrK" secondAttribute="centerY" id="6YP-6J-IIo"/> |
|||
<constraint firstItem="njM-uI-aWq" firstAttribute="centerX" secondItem="UcY-yS-vrK" secondAttribute="centerX" id="Pj8-ZD-2fs"/> |
|||
<constraint firstAttribute="width" constant="56" id="REa-2d-RjW"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
</stackView> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="97g-ut-B3f"> |
|||
<rect key="frame" x="0.0" y="61" width="375" height="35"/> |
|||
<subviews> |
|||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jT4-tF-K3X"> |
|||
<rect key="frame" x="10" y="1" width="355" height="33"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="PGn-S6-cUw"> |
|||
<rect key="frame" x="114.5" y="-8.5" width="126" height="50"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JNb-rQ-S60"> |
|||
<rect key="frame" x="0.0" y="0.0" width="50" height="50"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="16"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="~" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VoE-31-HDw"> |
|||
<rect key="frame" x="58" y="0.0" width="10" height="50"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="16"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IfM-7I-OUY"> |
|||
<rect key="frame" x="76" y="0.0" width="50" height="50"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="16"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="MsW-Cu-WAq"> |
|||
<rect key="frame" x="330" y="9" width="15" height="15"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="15" id="QEH-pM-M9B"/> |
|||
<constraint firstAttribute="width" constant="15" id="VaT-i2-nM8"/> |
|||
</constraints> |
|||
<state key="normal" title="Button" image="ic_error"/> |
|||
<connections> |
|||
<action selector="touchHidePerioidContentView:" destination="HSb-ou-7T5" eventType="touchUpInside" id="T9w-yA-L2x"/> |
|||
</connections> |
|||
</button> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="PGn-S6-cUw" firstAttribute="centerX" secondItem="jT4-tF-K3X" secondAttribute="centerX" id="2tu-H9-Ogk"/> |
|||
<constraint firstItem="MsW-Cu-WAq" firstAttribute="centerY" secondItem="jT4-tF-K3X" secondAttribute="centerY" id="MoP-cW-gz4"/> |
|||
<constraint firstItem="PGn-S6-cUw" firstAttribute="centerY" secondItem="jT4-tF-K3X" secondAttribute="centerY" id="Sm7-eC-hTb"/> |
|||
<constraint firstAttribute="trailing" secondItem="MsW-Cu-WAq" secondAttribute="trailing" constant="10" id="mfx-lA-gcl"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="jT4-tF-K3X" firstAttribute="top" secondItem="97g-ut-B3f" secondAttribute="top" constant="1" id="1Td-qn-jSx"/> |
|||
<constraint firstItem="jT4-tF-K3X" firstAttribute="leading" secondItem="97g-ut-B3f" secondAttribute="leading" constant="10" id="5kQ-G9-uX0"/> |
|||
<constraint firstAttribute="bottom" secondItem="jT4-tF-K3X" secondAttribute="bottom" constant="1" id="P1B-IH-n80"/> |
|||
<constraint firstAttribute="height" constant="35" id="WwQ-Eb-nRV"/> |
|||
<constraint firstAttribute="trailing" secondItem="jT4-tF-K3X" secondAttribute="trailing" constant="10" id="fIr-Rj-2P8"/> |
|||
</constraints> |
|||
</view> |
|||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="IWs-Lw-Lzy"> |
|||
<rect key="frame" x="0.0" y="101" width="375" height="521"/> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<color key="separatorColor" name="ThemeSeparate"/> |
|||
<inset key="separatorInset" minX="15" minY="0.0" maxX="15" maxY="0.0"/> |
|||
<view key="tableFooterView" contentMode="scaleToFill" id="2ni-7Z-yrb"> |
|||
<rect key="frame" x="0.0" y="158" width="375" height="44"/> |
|||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="There are no orders for the last one week." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rNT-r9-A2c"> |
|||
<rect key="frame" x="57.5" y="14" width="260.5" height="16.5"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="rNT-r9-A2c" firstAttribute="centerX" secondItem="2ni-7Z-yrb" secondAttribute="centerX" id="ixb-iV-giu"/> |
|||
<constraint firstItem="rNT-r9-A2c" firstAttribute="centerY" secondItem="2ni-7Z-yrb" secondAttribute="centerY" id="w2e-gV-ZKG"/> |
|||
</constraints> |
|||
</view> |
|||
<prototypes> |
|||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="OrderCell" rowHeight="102" id="nnL-fD-ItP" customClass="OrderCell" customModule="GME_Remit" customModuleProvider="target"> |
|||
<rect key="frame" x="0.0" y="28" width="375" height="102"/> |
|||
<autoresizingMask key="autoresizingMask"/> |
|||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="nnL-fD-ItP" id="1Fu-Lg-AVq"> |
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="102"/> |
|||
<autoresizingMask key="autoresizingMask"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SgX-lh-lBx"> |
|||
<rect key="frame" x="10" y="5" width="355" height="92"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="9" translatesAutoresizingMaskIntoConstraints="NO" id="csX-mL-45u"> |
|||
<rect key="frame" x="15" y="10" width="325" height="72"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="kp2-pk-32c"> |
|||
<rect key="frame" x="0.0" y="0.0" width="325" height="18"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="5/7/2019 12:46:25 PM" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4wU-5A-37H"> |
|||
<rect key="frame" x="0.0" y="0.0" width="162.5" height="18"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="20190507461225046" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7VR-Ln-1qD"> |
|||
<rect key="frame" x="162.5" y="0.0" width="162.5" height="18"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" translatesAutoresizingMaskIntoConstraints="NO" id="u1J-U8-WKm"> |
|||
<rect key="frame" x="0.0" y="27" width="325" height="18"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="James Kim" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wnk-jc-cdy"> |
|||
<rect key="frame" x="0.0" y="0.0" width="162.5" height="18"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="16"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SOCKS" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mke-Pt-ah3"> |
|||
<rect key="frame" x="162.5" y="0.0" width="162.5" height="18"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="16"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oK4-zg-Jxw"> |
|||
<rect key="frame" x="0.0" y="54" width="325" height="18"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="eE9-9b-1HL"> |
|||
<rect key="frame" x="0.0" y="0.0" width="210" height="18"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="2000" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6CI-jf-L3S"> |
|||
<rect key="frame" x="0.0" y="0.0" width="27" height="18"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="P" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="99X-qk-YM9"> |
|||
<rect key="frame" x="29" y="0.0" width="181" height="18"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="12"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="N/A" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZsY-ZC-r5d"> |
|||
<rect key="frame" x="210" y="0.0" width="115" height="18"/> |
|||
<color key="backgroundColor" red="0.92941176469999998" green="0.1058823529" blue="0.14117647059999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="115" id="RKx-Ak-98j"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="16"/> |
|||
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="csX-mL-45u" firstAttribute="leading" secondItem="SgX-lh-lBx" secondAttribute="leading" constant="15" id="E5f-vU-3Qi"/> |
|||
<constraint firstAttribute="trailing" secondItem="csX-mL-45u" secondAttribute="trailing" constant="15" id="TVR-gm-5Gp"/> |
|||
<constraint firstAttribute="bottom" secondItem="csX-mL-45u" secondAttribute="bottom" constant="10" id="aTN-Jw-NNg"/> |
|||
<constraint firstItem="csX-mL-45u" firstAttribute="top" secondItem="SgX-lh-lBx" secondAttribute="top" constant="10" id="kZI-LC-AxS"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="bottom" secondItem="SgX-lh-lBx" secondAttribute="bottom" constant="5" id="1Ze-pb-7bU"/> |
|||
<constraint firstItem="SgX-lh-lBx" firstAttribute="top" secondItem="1Fu-Lg-AVq" secondAttribute="top" constant="5" id="KMf-eH-Ky2"/> |
|||
<constraint firstItem="SgX-lh-lBx" firstAttribute="leading" secondItem="1Fu-Lg-AVq" secondAttribute="leading" constant="10" id="Wa1-1L-SoU"/> |
|||
<constraint firstAttribute="trailing" secondItem="SgX-lh-lBx" secondAttribute="trailing" constant="10" id="nkV-vP-nb1"/> |
|||
</constraints> |
|||
</tableViewCellContentView> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<connections> |
|||
<outlet property="branchNameLabel" destination="mke-Pt-ah3" id="JRE-ih-zRr"/> |
|||
<outlet property="cellContentView" destination="SgX-lh-lBx" id="9D4-Cx-lgv"/> |
|||
<outlet property="orderDateLabel" destination="4wU-5A-37H" id="BlB-41-bg1"/> |
|||
<outlet property="orderIDLabel" destination="7VR-Ln-1qD" id="7cE-qb-qhT"/> |
|||
<outlet property="orderStatusLabel" destination="ZsY-ZC-r5d" id="0V9-Xb-0jI"/> |
|||
<outlet property="orderedProductNameLabel" destination="wnk-jc-cdy" id="C96-gz-NTP"/> |
|||
<outlet property="orderedProductPointLabel" destination="6CI-jf-L3S" id="EWj-Dg-UwJ"/> |
|||
</connections> |
|||
</tableViewCell> |
|||
</prototypes> |
|||
</tableView> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qT6-24-ye4" userLabel="Status View"> |
|||
<rect key="frame" x="0.0" y="627" width="375" height="35"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="Ezo-4B-DbQ"> |
|||
<rect key="frame" x="10" y="10" width="355" height="15"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" horizontalHuggingPriority="249" translatesAutoresizingMaskIntoConstraints="NO" id="HBz-a8-3bJ" userLabel="Black"> |
|||
<rect key="frame" x="0.0" y="0.0" width="70" height="15"/> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
</view> |
|||
<stackView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="3qY-rc-sUg"> |
|||
<rect key="frame" x="75" y="0.0" width="90" height="15"/> |
|||
<subviews> |
|||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ORDERED" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3zV-Rv-aOE"> |
|||
<rect key="frame" x="0.0" y="0.0" width="90" height="15"/> |
|||
<color key="backgroundColor" red="0.031372549019607843" green="0.63921568627450975" blue="0.51764705882352935" alpha="1" colorSpace="calibratedRGB"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="10"/> |
|||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
<stackView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="MfU-Y3-oia"> |
|||
<rect key="frame" x="170" y="0.0" width="90" height="15"/> |
|||
<subviews> |
|||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="RECEIVED" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JUV-Fq-hn5"> |
|||
<rect key="frame" x="0.0" y="0.0" width="90" height="15"/> |
|||
<color key="backgroundColor" red="0.18823529410000001" green="0.24313725489999999" blue="0.62352941179999999" alpha="1" colorSpace="calibratedRGB"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="10"/> |
|||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
<stackView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="V64-U6-ggb"> |
|||
<rect key="frame" x="265" y="0.0" width="90" height="15"/> |
|||
<subviews> |
|||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="CANCELED" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lfY-UU-Xpa"> |
|||
<rect key="frame" x="0.0" y="0.0" width="90" height="15"/> |
|||
<color key="backgroundColor" red="0.92941176469999998" green="0.10980392160000001" blue="0.14117647059999999" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="90" id="m1x-Bc-Ocv"/> |
|||
<constraint firstAttribute="height" constant="15" id="yOU-id-Q68"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="10"/> |
|||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
<constraints> |
|||
<constraint firstItem="V64-U6-ggb" firstAttribute="width" secondItem="MfU-Y3-oia" secondAttribute="width" id="R3R-IG-Me7"/> |
|||
<constraint firstItem="V64-U6-ggb" firstAttribute="width" secondItem="3qY-rc-sUg" secondAttribute="width" id="wiB-rd-6V9"/> |
|||
</constraints> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="trailing" secondItem="Ezo-4B-DbQ" secondAttribute="trailing" constant="10" id="9Ss-Oh-arn"/> |
|||
<constraint firstItem="Ezo-4B-DbQ" firstAttribute="leading" secondItem="qT6-24-ye4" secondAttribute="leading" constant="10" id="Pat-gr-2gF"/> |
|||
<constraint firstItem="Ezo-4B-DbQ" firstAttribute="top" secondItem="qT6-24-ye4" secondAttribute="top" constant="10" id="gmk-ck-4Cr"/> |
|||
<constraint firstAttribute="bottom" secondItem="Ezo-4B-DbQ" secondAttribute="bottom" constant="10" id="svr-36-axw"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<color key="backgroundColor" name="ThemeMainBackground"/> |
|||
<constraints> |
|||
<constraint firstItem="qT6-24-ye4" firstAttribute="top" secondItem="IWs-Lw-Lzy" secondAttribute="bottom" constant="5" id="6Gr-8g-ThY"/> |
|||
<constraint firstItem="qT6-24-ye4" firstAttribute="trailing" secondItem="Zt6-f6-JOC" secondAttribute="trailing" id="6SQ-d1-pNh"/> |
|||
<constraint firstItem="SpX-eE-pj8" firstAttribute="top" secondItem="Zt6-f6-JOC" secondAttribute="top" id="AfL-1V-hq8"/> |
|||
<constraint firstItem="IWs-Lw-Lzy" firstAttribute="top" secondItem="97g-ut-B3f" secondAttribute="bottom" constant="5" id="I5M-n1-3wt"/> |
|||
<constraint firstItem="97g-ut-B3f" firstAttribute="trailing" secondItem="Zt6-f6-JOC" secondAttribute="trailing" id="Szl-XX-RkQ"/> |
|||
<constraint firstItem="qT6-24-ye4" firstAttribute="leading" secondItem="Zt6-f6-JOC" secondAttribute="leading" id="U3v-v0-7CD"/> |
|||
<constraint firstItem="SpX-eE-pj8" firstAttribute="trailing" secondItem="Zt6-f6-JOC" secondAttribute="trailing" id="Wr3-hw-cgh"/> |
|||
<constraint firstItem="97g-ut-B3f" firstAttribute="top" secondItem="SpX-eE-pj8" secondAttribute="bottom" constant="5" id="XtF-Gk-Jmv"/> |
|||
<constraint firstItem="Zt6-f6-JOC" firstAttribute="bottom" secondItem="qT6-24-ye4" secondAttribute="bottom" constant="5" id="ZGQ-mm-ztl"/> |
|||
<constraint firstItem="IWs-Lw-Lzy" firstAttribute="leading" secondItem="Zt6-f6-JOC" secondAttribute="leading" id="aZ7-QV-J08"/> |
|||
<constraint firstItem="SpX-eE-pj8" firstAttribute="leading" secondItem="Zt6-f6-JOC" secondAttribute="leading" id="icE-df-7bq"/> |
|||
<constraint firstItem="IWs-Lw-Lzy" firstAttribute="trailing" secondItem="Zt6-f6-JOC" secondAttribute="trailing" id="kzg-Dp-6Sh"/> |
|||
<constraint firstItem="97g-ut-B3f" firstAttribute="leading" secondItem="Zt6-f6-JOC" secondAttribute="leading" id="uNt-pF-jI7"/> |
|||
</constraints> |
|||
<viewLayoutGuide key="safeArea" id="Zt6-f6-JOC"/> |
|||
</view> |
|||
<connections> |
|||
<outlet property="canceledColorLabel" destination="lfY-UU-Xpa" id="8EZ-Nh-SyK"/> |
|||
<outlet property="endDateLabel" destination="IfM-7I-OUY" id="moq-Ij-Bx3"/> |
|||
<outlet property="noOrderHistoryLabel" destination="rNT-r9-A2c" id="gbh-ck-PBS"/> |
|||
<outlet property="orderedColorLabel" destination="3zV-Rv-aOE" id="lpI-j3-fW1"/> |
|||
<outlet property="periodView" destination="97g-ut-B3f" id="bD9-AR-f95"/> |
|||
<outlet property="periodViewHeightConstraint" destination="WwQ-Eb-nRV" id="2cf-jr-nPf"/> |
|||
<outlet property="perioidContentView" destination="jT4-tF-K3X" id="yJd-xC-pNR"/> |
|||
<outlet property="receivedColorLabel" destination="JUV-Fq-hn5" id="g5q-ih-wi4"/> |
|||
<outlet property="searchBar" destination="VvS-IW-POd" id="LWs-DQ-UtC"/> |
|||
<outlet property="startDateLabel" destination="JNb-rQ-S60" id="AHq-zu-xBo"/> |
|||
<outlet property="tableView" destination="IWs-Lw-Lzy" id="CLg-oe-VFc"/> |
|||
</connections> |
|||
</viewController> |
|||
<placeholder placeholderIdentifier="IBFirstResponder" id="8je-5K-XuW" userLabel="First Responder" sceneMemberID="firstResponder"/> |
|||
</objects> |
|||
<point key="canvasLocation" x="-92" y="232.53373313343329"/> |
|||
</scene> |
|||
</scenes> |
|||
<resources> |
|||
<image name="ic_calender" width="25" height="25"/> |
|||
<image name="ic_error" width="55" height="55"/> |
|||
<namedColor name="ThemeMainBackground"> |
|||
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
<namedColor name="ThemeSeparate"> |
|||
<color red="0.82400000095367432" green="0.82400000095367432" blue="0.82400000095367432" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
<namedColor name="ThemeText"> |
|||
<color red="0.28999999165534973" green="0.28999999165534973" blue="0.28999999165534973" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
</resources> |
|||
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</document> |
@ -1,258 +0,0 @@ |
|||
// |
|||
// OrderHistoryViewController.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 14/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
import XLPagerTabStrip |
|||
|
|||
class OrderHistoryViewController: UIViewController { |
|||
|
|||
// MARK: Properties |
|||
|
|||
var presenter: OrderHistoryModuleInterface? |
|||
|
|||
private lazy var refreshControl = UIRefreshControl() |
|||
|
|||
private lazy var isSearch = false |
|||
|
|||
// MARK: Computed Properties |
|||
|
|||
private var orders: [Order]? { |
|||
didSet { |
|||
guard |
|||
let orders = self.orders, |
|||
orders.count != 0 |
|||
else { |
|||
noOrderHistoryLabel.isHidden = false |
|||
noOrderHistoryLabel.text = |
|||
isSearch ? "no_search_orders_message_text".localized() : "no_orders_message_text".localized() |
|||
tableView.reloadData() |
|||
return |
|||
} |
|||
|
|||
tableView.reloadData() |
|||
noOrderHistoryLabel.isHidden = true |
|||
} |
|||
} |
|||
|
|||
// MARK: IBOutlets |
|||
|
|||
@IBOutlet private weak var tableView: UITableView! |
|||
@IBOutlet private weak var searchBar: UISearchBar! |
|||
@IBOutlet private weak var periodView: UIView! |
|||
@IBOutlet private weak var perioidContentView: UIView! |
|||
@IBOutlet private weak var noOrderHistoryLabel: UILabel! |
|||
|
|||
@IBOutlet private weak var startDateLabel: UILabel! |
|||
@IBOutlet private weak var endDateLabel: UILabel! |
|||
|
|||
@IBOutlet private weak var orderedColorLabel: UILabel! |
|||
@IBOutlet private weak var receivedColorLabel: UILabel! |
|||
@IBOutlet private weak var canceledColorLabel: UILabel! |
|||
|
|||
@IBOutlet private weak var periodViewHeightConstraint: NSLayoutConstraint! |
|||
|
|||
// MARK: VC's Life cycle |
|||
|
|||
override func viewDidLoad() { |
|||
super.viewDidLoad() |
|||
setup() |
|||
} |
|||
|
|||
override func viewWillAppear(_ animated: Bool) { |
|||
super.viewWillAppear(animated) |
|||
|
|||
if searchBar.text == "" && startDateLabel.text == ""{ |
|||
isSearch = false |
|||
presenter?.fetchOrders(from: "", to: "") |
|||
} |
|||
} |
|||
|
|||
override func viewWillDisappear(_ animated: Bool) { |
|||
super.viewWillDisappear(animated) |
|||
} |
|||
|
|||
// MARK: IBActions |
|||
|
|||
@IBAction private func touchCalendar(_ sender: UIButton) { |
|||
presenter?.presentDatePicker { [weak self] (from, to) in |
|||
guard let `self` = self else { return } |
|||
|
|||
let originDateFormatter = DateFormatter() |
|||
originDateFormatter.dateFormat = "yyyy-MM-dd" |
|||
|
|||
let dateFormatter = DateFormatter() |
|||
dateFormatter.dateFormat = "MMM d, yyyy" |
|||
|
|||
guard |
|||
let startDate = from, |
|||
let endDate = to, |
|||
let changeFormatStartDate = originDateFormatter.date(from: startDate), |
|||
let changeFormatEndDate = originDateFormatter.date(from: endDate) |
|||
else { return } |
|||
|
|||
self.startDateLabel.text = dateFormatter.string(from: changeFormatStartDate) |
|||
self.endDateLabel.text = dateFormatter.string(from: changeFormatEndDate) |
|||
|
|||
self.setPeriodViewStatus(isHidden: false) |
|||
self.searchBar.text?.removeAll() |
|||
|
|||
self.isSearch = true |
|||
|
|||
self.presenter?.fetchOrders(from: startDate, to: endDate) |
|||
} |
|||
} |
|||
|
|||
@IBAction func touchHidePerioidContentView(_ sender: Any) { |
|||
startDateLabel.text?.removeAll() |
|||
endDateLabel.text?.removeAll() |
|||
refresh() |
|||
} |
|||
} |
|||
|
|||
// MARK: OrderHistoryViewInterface |
|||
extension OrderHistoryViewController: OrderHistoryViewInterface { |
|||
func setOrderHistoryModel(with model: [Order]?) { |
|||
orders = model |
|||
} |
|||
|
|||
func didFailFetchOrderHistory(with error: Error) { |
|||
alert(type: .error, message: error.localizedDescription) |
|||
} |
|||
|
|||
func stardLoading() { |
|||
showProgressHud() |
|||
} |
|||
|
|||
func endLoading() { |
|||
hideProgressHud() |
|||
|
|||
DispatchQueue.main.asyncAfter(deadline: .now()) { [weak self] in |
|||
guard let `self` = self else { return } |
|||
|
|||
if #available(iOS 10.0, *) { |
|||
self.tableView.refreshControl?.endRefreshing() |
|||
} else { |
|||
self.refreshControl.endRefreshing() |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
// MARK: Other Functions |
|||
extension OrderHistoryViewController { |
|||
private func setup() { |
|||
initDelegate() |
|||
initUI() |
|||
setMultiLanguage() |
|||
|
|||
orderedColorLabel.layer.cornerRadius = 5 |
|||
receivedColorLabel.layer.cornerRadius = 5 |
|||
canceledColorLabel.layer.cornerRadius = 5 |
|||
|
|||
perioidContentView.layer.cornerRadius = 5 |
|||
|
|||
canceledColorLabel.backgroundColor = .themeRed |
|||
} |
|||
|
|||
private func setMultiLanguage() { |
|||
searchBar.placeholder = "search_text".localized() |
|||
orderedColorLabel.text = "ordered_text".localized() |
|||
receivedColorLabel.text = "received_text".localized() |
|||
canceledColorLabel.text = "canceled_text".localized() |
|||
noOrderHistoryLabel.text = "no_orders_message_text".localized() |
|||
} |
|||
|
|||
private func initDelegate() { |
|||
tableView.delegate = self |
|||
tableView.dataSource = self |
|||
searchBar.delegate = self |
|||
} |
|||
|
|||
private func initUI() { |
|||
setPeriodViewStatus(isHidden: true) |
|||
addRefreshControl() |
|||
} |
|||
|
|||
private func addRefreshControl() { |
|||
let colorOption = [NSAttributedString.Key.foregroundColor : UIColor.themeWhite] |
|||
|
|||
let title = NSAttributedString(string: "pull to refresh", attributes: colorOption) |
|||
|
|||
refreshControl.attributedTitle = title |
|||
refreshControl.backgroundColor = .themeBlue |
|||
refreshControl.tintColor = .themeWhite |
|||
refreshControl.addTarget(self, action: #selector(refresh), for: .valueChanged) |
|||
|
|||
if #available(iOS 10.0, *) { |
|||
tableView.refreshControl = refreshControl |
|||
} else { |
|||
tableView.addSubview(refreshControl) |
|||
} |
|||
} |
|||
|
|||
private func setPeriodViewStatus(isHidden: Bool) { |
|||
periodView.isHidden = isHidden |
|||
periodViewHeightConstraint.constant = isHidden ? 0.0 : 35.0 |
|||
} |
|||
|
|||
@objc |
|||
private func refresh() { |
|||
setPeriodViewStatus(isHidden: true) |
|||
searchBar.text?.removeAll() |
|||
isSearch = false |
|||
presenter?.fetchOrders(from: "", to: "") |
|||
} |
|||
|
|||
} |
|||
|
|||
// MARK: - XLPagerTabStrip'`s IndicatorInfoProvider |
|||
extension OrderHistoryViewController: IndicatorInfoProvider { |
|||
func indicatorInfo(for pagerTabStripController: PagerTabStripViewController) -> IndicatorInfo { |
|||
return IndicatorInfo.init(title: "orders_group_title_text".localized()) |
|||
} |
|||
|
|||
} |
|||
|
|||
// MARK: - UITableViewDataSource |
|||
extension OrderHistoryViewController: UITableViewDataSource { |
|||
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { |
|||
guard let orders = self.orders else { |
|||
return 0 |
|||
} |
|||
|
|||
return orders.count |
|||
} |
|||
|
|||
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { |
|||
guard let cell = tableView.dequeueReusableCell(withIdentifier: "OrderCell") as? OrderCell |
|||
else { |
|||
return UITableViewCell() |
|||
} |
|||
|
|||
cell.setModel(with: orders?[indexPath.row]) |
|||
return cell |
|||
} |
|||
|
|||
} |
|||
|
|||
// MARK: - UITableViewDelegate |
|||
extension OrderHistoryViewController: UITableViewDelegate { |
|||
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { |
|||
presenter?.pushDetailOrder(with: orders?[indexPath.row]) |
|||
} |
|||
} |
|||
|
|||
// MARK: - UISearchBarDelegate |
|||
extension OrderHistoryViewController: UISearchBarDelegate { |
|||
func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) { |
|||
isSearch = true |
|||
presenter?.fetchFilteredOrders(by: searchText) |
|||
} |
|||
|
|||
} |
@ -1,27 +0,0 @@ |
|||
// |
|||
// OrderHistoryViewInterface.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 14/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol OrderHistoryViewInterface: class { |
|||
|
|||
/// set order history model from presenter |
|||
/// |
|||
/// - Parameter model: order history model |
|||
func setOrderHistoryModel(with model: [Order]?) |
|||
|
|||
/// raise error from presenter |
|||
/// |
|||
/// - Parameter error: error |
|||
func didFailFetchOrderHistory(with error: Error) |
|||
|
|||
/// present activity indicator for something process |
|||
func stardLoading() |
|||
|
|||
/// dismiss activity indicator for something process |
|||
func endLoading() |
|||
|
|||
} |
@ -1,51 +0,0 @@ |
|||
// |
|||
// OrderHistoryWireframe.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 14/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
|
|||
class OrderHistoryWireframe { |
|||
weak var view: UIViewController! |
|||
} |
|||
|
|||
extension OrderHistoryWireframe: OrderHistoryWireframeInput { |
|||
|
|||
var storyboardName: String {return "OrderHistory"} |
|||
|
|||
func getMainView() -> UIViewController { |
|||
let service = OrderHistoryService() |
|||
let interactor = OrderHistoryInteractor(service: service) |
|||
let presenter = OrderHistoryPresenter() |
|||
let viewController = viewControllerFromStoryboard(of: OrderHistoryViewController.self) |
|||
|
|||
viewController.presenter = presenter |
|||
interactor.output = presenter |
|||
presenter.interactor = interactor |
|||
presenter.wireframe = self |
|||
presenter.view = viewController |
|||
|
|||
view = viewController |
|||
return viewController |
|||
} |
|||
|
|||
func pushDetailOrder(with order: Order?) { |
|||
DetailOrderWireframe().pushMainView(on: view, order: order) |
|||
} |
|||
|
|||
func presentDatePicker(completion: ((_ from: String?, _ to: String?) -> Void)?) { |
|||
guard let datePickerViewController = UIStoryboard |
|||
.init(name: "TransactionHistoryDatePicker", bundle: nil) |
|||
.instantiateViewController( |
|||
withIdentifier: "DatePickerViewController" |
|||
) as? DatePickerViewController else { return } |
|||
|
|||
datePickerViewController.completion = completion |
|||
|
|||
view.present(datePickerViewController, animated: true, completion: nil) |
|||
} |
|||
|
|||
} |
@ -1,23 +0,0 @@ |
|||
// |
|||
// OrderHistoryWireframeInput.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 14/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
protocol OrderHistoryWireframeInput: WireframeInput { |
|||
|
|||
/// push DetailOrderViewController |
|||
/// |
|||
/// - Parameter order: selected order |
|||
func pushDetailOrder(with order: Order?) |
|||
|
|||
/// present DataPicker ViewController |
|||
/// |
|||
/// - Parameter completion: selected dates handle closure |
|||
func presentDatePicker(completion: ((_ from: String?, _ to: String?) -> Void)?) |
|||
|
|||
} |
@ -1,68 +0,0 @@ |
|||
// |
|||
// RedeemInteractor.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class RedeemInteractor { |
|||
|
|||
// MARK: Properties |
|||
|
|||
weak var output: RedeemInteractorOutput? |
|||
private let service: RedeemServiceType |
|||
|
|||
// MARK: Initialization |
|||
|
|||
init(service: RedeemServiceType) { |
|||
self.service = service |
|||
} |
|||
|
|||
// MARK: Converting entities |
|||
} |
|||
|
|||
// MARK: Redeem interactor input interface |
|||
|
|||
extension RedeemInteractor: RedeemInteractorInput { |
|||
func fetchBranches() { |
|||
service.fetchBranches( |
|||
success: { |
|||
self.output?.setBranches(with: $0) |
|||
}, |
|||
failure: { |
|||
self.output?.setBranchesError(with: $0) |
|||
} |
|||
) |
|||
} |
|||
|
|||
func viewIsReady(model: RewardProduct?) { |
|||
self.output?.result(model: model) |
|||
} |
|||
|
|||
func submit(with model: Redeem?) { |
|||
self.service.submit( |
|||
with: model, |
|||
success: { |
|||
self.output?.submitSuccess() |
|||
}, |
|||
failure: { |
|||
self.output?.submitFailure(with: $0) |
|||
} |
|||
) |
|||
} |
|||
|
|||
func refreshRewardPoint() { |
|||
self.service.fetchUserInfo( |
|||
success: { |
|||
Utility.save(user: $0) |
|||
self.output?.successRefreshRewardPoint() |
|||
}, |
|||
failure: { |
|||
self.output?.failureRefreshRewardPoint(with: $0) |
|||
} |
|||
) |
|||
} |
|||
} |
@ -1,26 +0,0 @@ |
|||
// |
|||
// RedeemInteractorIO.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol RedeemInteractorInput: class { |
|||
func viewIsReady(model: RewardProduct?) |
|||
func fetchBranches() |
|||
func submit(with model: Redeem?) |
|||
func refreshRewardPoint() |
|||
} |
|||
|
|||
protocol RedeemInteractorOutput: class { |
|||
func result(model: RewardProduct?) |
|||
func setBranches(with model: [Branch]?) |
|||
func setBranchesError(with error: Error) |
|||
|
|||
func submitSuccess() |
|||
func submitFailure(with error: Error) |
|||
|
|||
func successRefreshRewardPoint() |
|||
func failureRefreshRewardPoint(with error: Error) |
|||
} |
@ -1,23 +0,0 @@ |
|||
// |
|||
// Redeem.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 03/05/2019. |
|||
// Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
struct Redeem { |
|||
let userID: String? |
|||
let productCode: String? |
|||
let usePoint: String? |
|||
let orderType: String? |
|||
let recvType: String? |
|||
let branchCode: String? |
|||
let recvAddress: String? |
|||
let recvZipCode: String? |
|||
let recvPhoneNumber: String? |
|||
let recvName: String? |
|||
// let rewardType: String? |
|||
} |
@ -1,107 +0,0 @@ |
|||
// |
|||
// RedeemService.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
import FirebaseInstanceID |
|||
|
|||
class RedeemService: RedeemServiceType { |
|||
|
|||
// MARK: Properties |
|||
|
|||
// MARK: Initialization |
|||
|
|||
// MARK: Data management |
|||
|
|||
func fetchBranches( |
|||
success: @escaping ([Branch]?) -> Void, |
|||
failure: @escaping (Error) -> Void |
|||
) { |
|||
|
|||
let url = baseUrlWithoutVersion + "/v2/reward/branchInfo" |
|||
// let url = "http://gmeuat.gmeremit.com:5018/api/v2/reward/branchInfo" |
|||
|
|||
auth.request( |
|||
method: .post, |
|||
url: url, |
|||
params: nil, |
|||
success: { (response: BranchContainer) in |
|||
if (response.errorCode ?? "") == "1" { |
|||
let error = NSError.init( |
|||
domain: "Network", |
|||
code: 0, |
|||
userInfo: [NSLocalizedDescriptionKey : response.message ?? ""] |
|||
) |
|||
|
|||
failure(error) |
|||
} else { |
|||
success(response.data) |
|||
} |
|||
}, |
|||
failure: { (error) in |
|||
failure(error) |
|||
}) |
|||
} |
|||
|
|||
func submit( |
|||
with model: Redeem?, |
|||
success: @escaping () -> Void, |
|||
failure: @escaping (Error) -> Void |
|||
) { |
|||
// let url = baseUrl + "/reward/productBuy" |
|||
let url = baseUrlWithoutVersion + "/v2/reward/productBuy" |
|||
// let url = "http://gmeuat.gmeremit.com:5018/api/v2/reward/productBuy" |
|||
|
|||
let params: [String: String] = [ |
|||
"userId": model?.userID ?? "", |
|||
"productCode": model?.productCode ?? "", |
|||
"usePoint": model?.usePoint ?? "", |
|||
"orderType": model?.orderType ?? "", //1 - 승인 9 취소 |
|||
"recvType": model?.recvType ?? "", |
|||
"branchCode": model?.branchCode ?? "", |
|||
"recvAddress": model?.recvAddress ?? "", |
|||
"recvZipCode": model?.recvZipCode ?? "", |
|||
"recvPhoneNumber": model?.recvPhoneNumber ?? "", |
|||
"recvName": model?.recvName ?? "" |
|||
] |
|||
|
|||
auth.request( |
|||
method: .post, |
|||
url: url, |
|||
params: params, |
|||
success: { (response: ResponseMessage) in |
|||
if (response.errorCode ?? "") == "1" { |
|||
let error = NSError.init( |
|||
domain: "Network", |
|||
code: 0, |
|||
userInfo: [NSLocalizedDescriptionKey : response.message ?? ""] |
|||
) |
|||
|
|||
failure(error) |
|||
} else { |
|||
success() |
|||
} |
|||
}, |
|||
failure: { (error) in |
|||
failure(error) |
|||
} |
|||
) |
|||
} |
|||
|
|||
func fetchUserInfo(success: @escaping (User) -> Void, failure: @escaping (Error) -> Void) { |
|||
let service = HomeService() |
|||
|
|||
GMEDB.shared.getFcmToken { (token, error) in |
|||
guard let error = error else { |
|||
service.fetchUserInfo(token: token ?? "", success: success, failure: failure) |
|||
return |
|||
} |
|||
|
|||
failure(error) |
|||
} |
|||
} |
|||
} |
@ -1,26 +0,0 @@ |
|||
// |
|||
// RedeemServiceType.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
protocol RedeemServiceType: class, ApiServiceType { |
|||
func fetchBranches( |
|||
success: @escaping ([Branch]?) -> Void, |
|||
failure: @escaping (Error) -> Void |
|||
) |
|||
|
|||
func submit( |
|||
with model: Redeem?, |
|||
success: @escaping () -> Void, |
|||
failure: @escaping (Error) -> Void |
|||
) |
|||
|
|||
func fetchUserInfo( |
|||
success: @escaping (User) -> Void, |
|||
failure: @escaping (Error) -> Void) |
|||
} |
@ -1,18 +0,0 @@ |
|||
// |
|||
// RedeemModuleInterface.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol RedeemModuleInterface: class { |
|||
func viewIsReady() |
|||
func showSearchAddressVC() |
|||
func fetchBranches() |
|||
func showBranchesVC() |
|||
func submit(with model: Redeem?) |
|||
func goRewardHome() |
|||
|
|||
func refreshRewardPoint() |
|||
} |
@ -1,102 +0,0 @@ |
|||
// |
|||
// RedeemPresenter.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class RedeemPresenter { |
|||
|
|||
// MARK: Properties |
|||
|
|||
weak var view: RedeemViewInterface? |
|||
var interactor: RedeemInteractorInput? |
|||
var wireframe: RedeemWireframeInput? |
|||
|
|||
private var model: RewardProduct? |
|||
|
|||
init(with model: RewardProduct?) { |
|||
self.model = model |
|||
} |
|||
|
|||
// MARK: Converting entities |
|||
|
|||
} |
|||
|
|||
// MARK: Redeem module interface |
|||
|
|||
extension RedeemPresenter: RedeemModuleInterface { |
|||
func viewIsReady() { |
|||
view?.startLoading() |
|||
interactor?.viewIsReady(model: model) |
|||
} |
|||
|
|||
func showSearchAddressVC() { |
|||
wireframe?.showSearchAddressVC() |
|||
} |
|||
|
|||
func fetchBranches() { |
|||
view?.startLoading() |
|||
interactor?.fetchBranches() |
|||
} |
|||
|
|||
func showBranchesVC() { |
|||
wireframe?.showBranchesVC() |
|||
} |
|||
|
|||
func submit(with model: Redeem?) { |
|||
view?.startLoading() |
|||
interactor?.submit(with: model) |
|||
} |
|||
|
|||
func goRewardHome() { |
|||
wireframe?.goRewardVC() |
|||
} |
|||
|
|||
func refreshRewardPoint() { |
|||
view?.startLoading() |
|||
interactor?.refreshRewardPoint() |
|||
} |
|||
} |
|||
|
|||
// MARK: Redeem interactor output interface |
|||
|
|||
extension RedeemPresenter: RedeemInteractorOutput { |
|||
func successRefreshRewardPoint() { |
|||
view?.endLoading() |
|||
view?.successRefreshRewardPoint() |
|||
} |
|||
|
|||
func failureRefreshRewardPoint(with error: Error) { |
|||
view?.endLoading() |
|||
view?.failureRefreshRewardPoint(with: error) |
|||
} |
|||
|
|||
func result(model: RewardProduct?) { |
|||
view?.endLoading() |
|||
view?.setModel(model: model) |
|||
} |
|||
|
|||
func setBranches(with model: [Branch]?) { |
|||
view?.endLoading() |
|||
view?.setBranches(with: model) |
|||
} |
|||
|
|||
func setBranchesError(with error: Error) { |
|||
view?.endLoading() |
|||
view?.setBranchesError(with: error) |
|||
} |
|||
|
|||
func submitSuccess() { |
|||
view?.endLoading() |
|||
view?.submitSuccess() |
|||
} |
|||
|
|||
func submitFailure(with error: Error) { |
|||
view?.endLoading() |
|||
view?.submitFailure(with: error) |
|||
} |
|||
} |
@ -1,382 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> |
|||
<device id="retina4_7" orientation="portrait" appearance="dark"/> |
|||
<dependencies> |
|||
<deployment identifier="iOS"/> |
|||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/> |
|||
<capability name="Named colors" minToolsVersion="9.0"/> |
|||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> |
|||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
|||
</dependencies> |
|||
<customFonts key="customFonts"> |
|||
<array key="SanFranciscoDisplay-Medium.otf"> |
|||
<string>SanFranciscoDisplay-Medium</string> |
|||
</array> |
|||
<array key="SanFranciscoDisplay-Regular.otf"> |
|||
<string>SanFranciscoDisplay-Regular</string> |
|||
</array> |
|||
</customFonts> |
|||
<scenes> |
|||
<!--Redeem--> |
|||
<scene sceneID="R60-Pu-Hpy"> |
|||
<objects> |
|||
<viewController storyboardIdentifier="RedeemViewController" title="Redeem" id="HSb-ou-7T5" customClass="RedeemViewController" customModule="GME_Remit" sceneMemberID="viewController"> |
|||
<view key="view" contentMode="scaleToFill" id="9Uc-9s-KgO"> |
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
|||
<subviews> |
|||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UhJ-s4-o3M"> |
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
|||
<subviews> |
|||
<view contentMode="scaleToFill" placeholderIntrinsicWidth="414" placeholderIntrinsicHeight="603" translatesAutoresizingMaskIntoConstraints="NO" id="EFX-6u-NSo"> |
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="757"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="14" translatesAutoresizingMaskIntoConstraints="NO" id="LRW-jF-Fzf"> |
|||
<rect key="frame" x="10" y="10" width="355" height="727"/> |
|||
<subviews> |
|||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GON-ZE-a1z" userLabel="selectedItemView"> |
|||
<rect key="frame" x="0.0" y="0.0" width="355" height="264"/> |
|||
<subviews> |
|||
<imageView opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="starredBackground" translatesAutoresizingMaskIntoConstraints="NO" id="9N3-FF-Z9b"> |
|||
<rect key="frame" x="0.0" y="0.0" width="355" height="264"/> |
|||
</imageView> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Redeem xxx, ooo Points will be deducted from your reward point" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xJc-f0-ose"> |
|||
<rect key="frame" x="10" y="140" width="335" height="114"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="14"/> |
|||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<imageView opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_reward" translatesAutoresizingMaskIntoConstraints="NO" id="mT2-re-Yo2"> |
|||
<rect key="frame" x="10" y="10" width="335" height="120"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="120" id="RE8-H1-M1o"/> |
|||
</constraints> |
|||
</imageView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="mT2-re-Yo2" firstAttribute="top" secondItem="GON-ZE-a1z" secondAttribute="top" constant="10" id="5Q9-jg-xJq"/> |
|||
<constraint firstItem="9N3-FF-Z9b" firstAttribute="leading" secondItem="GON-ZE-a1z" secondAttribute="leading" id="7bz-bR-2p2"/> |
|||
<constraint firstAttribute="trailing" secondItem="9N3-FF-Z9b" secondAttribute="trailing" id="9qH-XB-STx"/> |
|||
<constraint firstAttribute="bottom" secondItem="xJc-f0-ose" secondAttribute="bottom" constant="10" id="CU0-ux-62h"/> |
|||
<constraint firstItem="mT2-re-Yo2" firstAttribute="leading" secondItem="GON-ZE-a1z" secondAttribute="leading" constant="10" id="HZm-Hk-buX"/> |
|||
<constraint firstItem="xJc-f0-ose" firstAttribute="top" secondItem="mT2-re-Yo2" secondAttribute="bottom" constant="10" id="KN5-iO-bGz"/> |
|||
<constraint firstAttribute="trailing" secondItem="xJc-f0-ose" secondAttribute="trailing" constant="10" id="ebD-HN-MeR"/> |
|||
<constraint firstAttribute="trailing" secondItem="mT2-re-Yo2" secondAttribute="trailing" constant="10" id="oyM-ke-hUT"/> |
|||
<constraint firstItem="9N3-FF-Z9b" firstAttribute="top" secondItem="GON-ZE-a1z" secondAttribute="top" id="qol-Rz-US7"/> |
|||
<constraint firstItem="xJc-f0-ose" firstAttribute="leading" secondItem="GON-ZE-a1z" secondAttribute="leading" constant="10" id="rgM-NM-bgt"/> |
|||
<constraint firstAttribute="bottom" secondItem="9N3-FF-Z9b" secondAttribute="bottom" id="tMn-ND-f6Q"/> |
|||
</constraints> |
|||
</view> |
|||
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Who will receive the rewards?" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ug2-xv-jYl"> |
|||
<rect key="frame" x="84.5" y="271" width="186.5" height="30"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="30" id="vaH-SG-WyG"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="14"/> |
|||
<color key="textColor" red="0.43529412150000002" green="0.4431372583" blue="0.47450980539999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<segmentedControl hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" translatesAutoresizingMaskIntoConstraints="NO" id="O3s-cM-BFw"> |
|||
<rect key="frame" x="20" y="271" width="315" height="31"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="30" id="dqx-wU-lGs"/> |
|||
</constraints> |
|||
<segments> |
|||
<segment title="It's me"/> |
|||
<segment title="Another "/> |
|||
</segments> |
|||
<color key="tintColor" red="0.92941176469999998" green="0.1058823529" blue="0.14117647059999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</segmentedControl> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="Diw-ue-AMa"> |
|||
<rect key="frame" x="20" y="278" width="315" height="116"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="EkU-Me-Zae"> |
|||
<rect key="frame" x="0.0" y="0.0" width="315" height="55.5"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Receiver" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AlI-iJ-Bev"> |
|||
<rect key="frame" x="0.0" y="0.0" width="315" height="16.5"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Receiver Name" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="O5y-2Y-uNB"> |
|||
<rect key="frame" x="0.0" y="21.5" width="315" height="34"/> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/> |
|||
<textInputTraits key="textInputTraits"/> |
|||
</textField> |
|||
</subviews> |
|||
</stackView> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="PrU-0w-nlB"> |
|||
<rect key="frame" x="0.0" y="60.5" width="315" height="55.5"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="PhoneNumber" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4eh-w1-tJj"> |
|||
<rect key="frame" x="0.0" y="0.0" width="315" height="16.5"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Receiver PhoneNumber" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="kJ0-CB-ktJ"> |
|||
<rect key="frame" x="0.0" y="21.5" width="315" height="34"/> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/> |
|||
<textInputTraits key="textInputTraits" keyboardType="numberPad"/> |
|||
</textField> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
</stackView> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Select branch for redeem your reward." textAlignment="center" lineBreakMode="wordWrap" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="djo-b7-Gp6"> |
|||
<rect key="frame" x="57.5" y="408" width="240.5" height="30"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="30" id="Lmw-z8-GeG"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Mlk-Xa-OMy" userLabel="segmentView"> |
|||
<rect key="frame" x="20" y="445" width="315" height="30"/> |
|||
<subviews> |
|||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" translatesAutoresizingMaskIntoConstraints="NO" id="0ge-iG-7cr"> |
|||
<rect key="frame" x="0.0" y="0.0" width="315" height="31"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="30" id="SR5-vs-Th7"/> |
|||
</constraints> |
|||
<segments> |
|||
<segment title="Branch"/> |
|||
<segment title="My Address"/> |
|||
</segments> |
|||
<color key="tintColor" red="0.92941176469999998" green="0.1058823529" blue="0.14117647059999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</segmentedControl> |
|||
</subviews> |
|||
<constraints> |
|||
<constraint firstAttribute="trailing" secondItem="0ge-iG-7cr" secondAttribute="trailing" id="6Nn-Ql-rxc"/> |
|||
<constraint firstAttribute="bottom" secondItem="0ge-iG-7cr" secondAttribute="bottom" id="6tZ-56-vV7"/> |
|||
<constraint firstItem="0ge-iG-7cr" firstAttribute="centerY" secondItem="Mlk-Xa-OMy" secondAttribute="centerY" id="8gd-Nr-EpF"/> |
|||
<constraint firstItem="0ge-iG-7cr" firstAttribute="centerX" secondItem="Mlk-Xa-OMy" secondAttribute="centerX" id="HJm-OS-8VG"/> |
|||
<constraint firstItem="0ge-iG-7cr" firstAttribute="leading" secondItem="Mlk-Xa-OMy" secondAttribute="leading" id="J5a-6Y-ium"/> |
|||
<constraint firstItem="0ge-iG-7cr" firstAttribute="top" secondItem="Mlk-Xa-OMy" secondAttribute="top" id="NsB-QI-6hf"/> |
|||
<constraint firstAttribute="height" constant="30" id="yaQ-YG-WMl"/> |
|||
</constraints> |
|||
</view> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="9" translatesAutoresizingMaskIntoConstraints="NO" id="Tn8-n9-tLQ" userLabel="inputView"> |
|||
<rect key="frame" x="20" y="452" width="315" height="147"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="jEL-pw-zU1" userLabel="branchView"> |
|||
<rect key="frame" x="0.0" y="0.0" width="315" height="147"/> |
|||
<subviews> |
|||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Select branch" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="YDd-Mt-uc6"> |
|||
<rect key="frame" x="0.0" y="0.0" width="315" height="30"/> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="30" id="8sr-cU-Vcw"/> |
|||
</constraints> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/> |
|||
<textInputTraits key="textInputTraits"/> |
|||
</textField> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="14" translatesAutoresizingMaskIntoConstraints="NO" id="lnD-do-0Xs"> |
|||
<rect key="frame" x="0.0" y="40" width="315" height="107"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="252" axis="vertical" alignment="center" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="IVi-XN-tss"> |
|||
<rect key="frame" x="36.5" y="0.0" width="242" height="33"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="You visit nearest Fast Remit branch to redeem your reward directly." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9XM-cU-ueM"> |
|||
<rect key="frame" x="0.0" y="0.0" width="242" height="33"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="242" id="05d-kF-qdi"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="14"/> |
|||
<color key="textColor" name="ThemeRed"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
</stackView> |
|||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="O9d-6l-wou"> |
|||
<rect key="frame" x="127.5" y="47" width="60" height="60"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" secondItem="O9d-6l-wou" secondAttribute="height" multiplier="1:1" id="Pxp-fS-qxF"/> |
|||
</constraints> |
|||
<state key="normal" image="ic_reward_location"/> |
|||
<connections> |
|||
<action selector="touchBranches:" destination="HSb-ou-7T5" eventType="touchUpInside" id="xc9-Va-iiB"/> |
|||
</connections> |
|||
</button> |
|||
</subviews> |
|||
</stackView> |
|||
</subviews> |
|||
</stackView> |
|||
<stackView hidden="YES" opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" alignment="top" spacing="9" translatesAutoresizingMaskIntoConstraints="NO" id="Z5H-WU-fSs" userLabel="addressView"> |
|||
<rect key="frame" x="0.0" y="0.0" width="315" height="108"/> |
|||
<subviews> |
|||
<stackView opaque="NO" contentMode="scaleToFill" spacing="1" translatesAutoresizingMaskIntoConstraints="NO" id="D9t-nV-3k1"> |
|||
<rect key="frame" x="0.0" y="0.0" width="109" height="30"/> |
|||
<subviews> |
|||
<textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" enabled="NO" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="zipcode" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="3KK-FX-uFq"> |
|||
<rect key="frame" x="0.0" y="0.0" width="78" height="30"/> |
|||
<color key="textColor" red="0.43529412150000002" green="0.4431372583" blue="0.47450980539999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/> |
|||
<textInputTraits key="textInputTraits"/> |
|||
</textField> |
|||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="YWl-Z0-qfz"> |
|||
<rect key="frame" x="79" y="0.0" width="30" height="30"/> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" secondItem="YWl-Z0-qfz" secondAttribute="height" multiplier="1:1" id="7df-JW-jMU"/> |
|||
</constraints> |
|||
<color key="tintColor" red="0.92941176469999998" green="0.1058823529" blue="0.14117647059999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<state key="normal" image="ic_search_light"> |
|||
<attributedString key="attributedTitle"/> |
|||
</state> |
|||
<connections> |
|||
<action selector="touchSearchAddressButton:" destination="HSb-ou-7T5" eventType="touchUpInside" id="uY9-Me-Psu"/> |
|||
</connections> |
|||
</button> |
|||
</subviews> |
|||
</stackView> |
|||
<textField opaque="NO" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Selected your address to deliver" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="qGz-f1-8ma"> |
|||
<rect key="frame" x="0.0" y="39" width="315" height="30"/> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="30" id="xRO-GY-XvR"/> |
|||
</constraints> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/> |
|||
<textInputTraits key="textInputTraits"/> |
|||
</textField> |
|||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Detail Address" minimumFontSize="14" translatesAutoresizingMaskIntoConstraints="NO" id="ilw-Ka-aLd"> |
|||
<rect key="frame" x="0.0" y="78" width="315" height="30"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="30" id="x2y-gi-BYy"/> |
|||
</constraints> |
|||
<color key="textColor" red="0.43529412150000002" green="0.4431372583" blue="0.47450980539999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/> |
|||
<textInputTraits key="textInputTraits"/> |
|||
</textField> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="qGz-f1-8ma" firstAttribute="leading" secondItem="Z5H-WU-fSs" secondAttribute="leading" id="4nx-6h-daV"/> |
|||
<constraint firstAttribute="trailing" secondItem="qGz-f1-8ma" secondAttribute="trailing" id="BCL-I3-6li"/> |
|||
<constraint firstAttribute="trailing" secondItem="ilw-Ka-aLd" secondAttribute="trailing" id="Oc1-Eo-n9E"/> |
|||
<constraint firstItem="ilw-Ka-aLd" firstAttribute="leading" secondItem="Z5H-WU-fSs" secondAttribute="leading" id="phZ-9v-ig1"/> |
|||
</constraints> |
|||
</stackView> |
|||
</subviews> |
|||
</stackView> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="uVb-7Z-Fk8" userLabel="blank"> |
|||
<rect key="frame" x="0.0" y="613" width="355" height="50"/> |
|||
</stackView> |
|||
<button opaque="NO" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Eqf-wL-rV9"> |
|||
<rect key="frame" x="20" y="677" width="315" height="50"/> |
|||
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="50" id="zvd-tx-zF5"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="20"/> |
|||
<state key="normal" title="Submit"> |
|||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
</state> |
|||
<connections> |
|||
<action selector="touchSubmitButton:" destination="HSb-ou-7T5" eventType="touchUpInside" id="62Q-PJ-8Wb"/> |
|||
</connections> |
|||
</button> |
|||
</subviews> |
|||
<constraints> |
|||
<constraint firstItem="uVb-7Z-Fk8" firstAttribute="leading" secondItem="LRW-jF-Fzf" secondAttribute="leading" id="6hY-Uj-0AK"/> |
|||
<constraint firstItem="Mlk-Xa-OMy" firstAttribute="leading" secondItem="LRW-jF-Fzf" secondAttribute="leading" constant="20" id="7oB-B3-KDE"/> |
|||
<constraint firstItem="Tn8-n9-tLQ" firstAttribute="width" secondItem="Mlk-Xa-OMy" secondAttribute="width" id="Ghq-0F-1hG"/> |
|||
<constraint firstAttribute="trailing" secondItem="Mlk-Xa-OMy" secondAttribute="trailing" constant="20" id="Gxd-g5-eRL"/> |
|||
<constraint firstAttribute="trailing" secondItem="GON-ZE-a1z" secondAttribute="trailing" id="JVi-5k-iYb"/> |
|||
<constraint firstItem="Diw-ue-AMa" firstAttribute="leading" secondItem="LRW-jF-Fzf" secondAttribute="leading" constant="20" id="ihs-Ch-9dV"/> |
|||
<constraint firstItem="Eqf-wL-rV9" firstAttribute="leading" secondItem="LRW-jF-Fzf" secondAttribute="leading" constant="20" id="kDb-oz-TL1"/> |
|||
<constraint firstAttribute="trailing" secondItem="Eqf-wL-rV9" secondAttribute="trailing" constant="20" id="mdG-dg-A3J"/> |
|||
<constraint firstAttribute="trailing" secondItem="O3s-cM-BFw" secondAttribute="trailing" constant="20" id="mp2-3d-5gt"/> |
|||
<constraint firstItem="GON-ZE-a1z" firstAttribute="leading" secondItem="LRW-jF-Fzf" secondAttribute="leading" id="nSp-AB-tsM"/> |
|||
<constraint firstAttribute="trailing" secondItem="Diw-ue-AMa" secondAttribute="trailing" constant="20" id="sRw-Ev-TMJ"/> |
|||
<constraint firstItem="O3s-cM-BFw" firstAttribute="leading" secondItem="LRW-jF-Fzf" secondAttribute="leading" constant="20" id="tFV-0H-nSW"/> |
|||
<constraint firstAttribute="trailing" secondItem="uVb-7Z-Fk8" secondAttribute="trailing" id="zzb-Gn-tQw"/> |
|||
</constraints> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="trailing" secondItem="LRW-jF-Fzf" secondAttribute="trailing" constant="10" id="B8M-Pw-2vL"/> |
|||
<constraint firstAttribute="bottom" secondItem="LRW-jF-Fzf" secondAttribute="bottom" constant="20" id="Yud-TS-DMK"/> |
|||
<constraint firstItem="LRW-jF-Fzf" firstAttribute="leading" secondItem="EFX-6u-NSo" secondAttribute="leading" constant="10" id="ibN-ZK-TKc"/> |
|||
<constraint firstItem="LRW-jF-Fzf" firstAttribute="top" secondItem="EFX-6u-NSo" secondAttribute="top" constant="10" id="sKc-7R-4of"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="trailing" secondItem="EFX-6u-NSo" secondAttribute="trailing" id="5GU-UQ-QrK"/> |
|||
<constraint firstItem="EFX-6u-NSo" firstAttribute="leading" secondItem="UhJ-s4-o3M" secondAttribute="leading" id="CHw-CD-GuE"/> |
|||
<constraint firstItem="EFX-6u-NSo" firstAttribute="width" secondItem="UhJ-s4-o3M" secondAttribute="width" id="bIT-zg-XUh"/> |
|||
<constraint firstItem="EFX-6u-NSo" firstAttribute="top" secondItem="UhJ-s4-o3M" secondAttribute="top" id="gfb-ng-ont"/> |
|||
<constraint firstAttribute="bottom" secondItem="EFX-6u-NSo" secondAttribute="bottom" id="m3T-HM-Fw9"/> |
|||
</constraints> |
|||
</scrollView> |
|||
</subviews> |
|||
<color key="backgroundColor" name="ThemeMainBackground"/> |
|||
<constraints> |
|||
<constraint firstItem="UhJ-s4-o3M" firstAttribute="top" secondItem="dJI-fk-pch" secondAttribute="top" id="QSp-Dc-Sub"/> |
|||
<constraint firstItem="dJI-fk-pch" firstAttribute="bottom" secondItem="UhJ-s4-o3M" secondAttribute="bottom" id="lt7-fG-0gd"/> |
|||
<constraint firstItem="UhJ-s4-o3M" firstAttribute="leading" secondItem="dJI-fk-pch" secondAttribute="leading" id="pct-g9-re3"/> |
|||
<constraint firstItem="dJI-fk-pch" firstAttribute="trailing" secondItem="UhJ-s4-o3M" secondAttribute="trailing" id="yfD-6I-w6x"/> |
|||
</constraints> |
|||
<viewLayoutGuide key="safeArea" id="dJI-fk-pch"/> |
|||
</view> |
|||
<navigationItem key="navigationItem" title="Reward" id="7aq-Jk-dgm"/> |
|||
<connections> |
|||
<outlet property="addressSegmentView" destination="Mlk-Xa-OMy" id="kfP-YF-F0c"/> |
|||
<outlet property="addressSegmentedControl" destination="0ge-iG-7cr" id="1At-8h-2eP"/> |
|||
<outlet property="addressTextField" destination="qGz-f1-8ma" id="wpd-8e-hOv"/> |
|||
<outlet property="addressView" destination="Z5H-WU-fSs" id="Ewc-Ir-GB4"/> |
|||
<outlet property="branchInfotmationTitleLabel" destination="9XM-cU-ueM" id="Mgr-vF-Q7y"/> |
|||
<outlet property="branchTextField" destination="YDd-Mt-uc6" id="bFf-aH-0iE"/> |
|||
<outlet property="branchesView" destination="jEL-pw-zU1" id="Rc7-Mu-gUX"/> |
|||
<outlet property="detailAddressTextField" destination="ilw-Ka-aLd" id="Uph-Vv-CVM"/> |
|||
<outlet property="phoneNumberTitleLabel" destination="4eh-w1-tJj" id="NIt-wL-IVS"/> |
|||
<outlet property="receiverTitleLabel" destination="AlI-iJ-Bev" id="KVi-jO-AFA"/> |
|||
<outlet property="scrollView" destination="UhJ-s4-o3M" id="9LP-tA-gpW"/> |
|||
<outlet property="searchButton" destination="YWl-Z0-qfz" id="c9u-Tu-un1"/> |
|||
<outlet property="selectAddressInfoLabel" destination="djo-b7-Gp6" id="lHg-pi-ek3"/> |
|||
<outlet property="selectInformationLabel" destination="xJc-f0-ose" id="LBd-0M-0hP"/> |
|||
<outlet property="selectedItemImageView" destination="mT2-re-Yo2" id="kht-Qe-kh3"/> |
|||
<outlet property="selectedItemInfoView" destination="GON-ZE-a1z" id="yDu-fF-mTC"/> |
|||
<outlet property="submitButton" destination="Eqf-wL-rV9" id="8KL-gZ-lKH"/> |
|||
<outlet property="userInfoSegmentedControl" destination="O3s-cM-BFw" id="bYz-uy-lwU"/> |
|||
<outlet property="userInfoView" destination="Diw-ue-AMa" id="U0x-Wq-CeQ"/> |
|||
<outlet property="userNameTextField" destination="O5y-2Y-uNB" id="Jid-S6-gKW"/> |
|||
<outlet property="userPhoneNumberTextField" destination="kJ0-CB-ktJ" id="JB8-zs-dcv"/> |
|||
<outlet property="zipcodeTextField" destination="3KK-FX-uFq" id="zot-bE-gNb"/> |
|||
</connections> |
|||
</viewController> |
|||
<placeholder placeholderIdentifier="IBFirstResponder" id="8je-5K-XuW" userLabel="First Responder" sceneMemberID="firstResponder"/> |
|||
</objects> |
|||
<point key="canvasLocation" x="749.60000000000002" y="230.73463268365819"/> |
|||
</scene> |
|||
</scenes> |
|||
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<resources> |
|||
<image name="ic_reward" width="74" height="74"/> |
|||
<image name="ic_reward_location" width="60" height="60"/> |
|||
<image name="ic_search_light" width="20" height="20"/> |
|||
<image name="starredBackground" width="355" height="132"/> |
|||
<namedColor name="ThemeMainBackground"> |
|||
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
<namedColor name="ThemeRed"> |
|||
<color red="0.92941176470588238" green="0.10588235294117647" blue="0.14117647058823529" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
<namedColor name="ThemeText"> |
|||
<color red="0.28999999165534973" green="0.28999999165534973" blue="0.28999999165534973" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
</resources> |
|||
</document> |
@ -1,509 +0,0 @@ |
|||
// |
|||
// RedeemViewController.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
import Kingfisher |
|||
|
|||
class RedeemViewController: UIViewController { |
|||
|
|||
// MARK: Properties |
|||
|
|||
var presenter: RedeemModuleInterface? |
|||
|
|||
private var model: RewardProduct? { |
|||
didSet { |
|||
if let imageData = model?.productImgPath, |
|||
let url = URL(string: imageData) { |
|||
selectedItemImageView.kf.setImage(with: url) |
|||
} |
|||
|
|||
guard |
|||
let selectedItemName = model?.productName, |
|||
let selectedItemPoint = model?.pointPrice?.likeCommaMoney() else { |
|||
return |
|||
} |
|||
|
|||
let message = "selected_product_message_text" |
|||
.localized() |
|||
.replacingOccurrences(of: "xxx", with: selectedItemName) |
|||
.replacingOccurrences(of: "ooo", with: selectedItemPoint) |
|||
|
|||
selectInformationLabel.text = message |
|||
} |
|||
} |
|||
|
|||
private var ordered: Redeem? |
|||
|
|||
private enum AddressType: Int { |
|||
case branch = 0 |
|||
case custom |
|||
} |
|||
|
|||
private enum UserType: Int { |
|||
case user |
|||
case custom |
|||
} |
|||
|
|||
private var selectedUserType = UserType.user { |
|||
didSet { |
|||
let name: String? |
|||
let phoneNumber: String? |
|||
let isEnable: Bool |
|||
switch selectedUserType { |
|||
case .user: |
|||
isEnable = false |
|||
name = GMEDB.shared.user.string(.fullName) |
|||
phoneNumber = GMEDB.shared.user.string(.mobileNumber) |
|||
case .custom: |
|||
isEnable = true |
|||
name = "" |
|||
phoneNumber = "" |
|||
} |
|||
|
|||
userNameTextField.isEnabled = isEnable |
|||
userPhoneNumberTextField.isEnabled = isEnable |
|||
|
|||
userNameTextField.text = name |
|||
userPhoneNumberTextField.text = phoneNumber |
|||
|
|||
userNameTextField.sendActions(for: .editingChanged) |
|||
userPhoneNumberTextField.sendActions(for: .editingChanged) |
|||
|
|||
userInfoView.isHidden = false |
|||
selectAddressInfoLabel.isHidden = false |
|||
addressSegmentView.isHidden = false |
|||
|
|||
UIView.animate(withDuration: 0.3, animations: {[weak self] in |
|||
guard let `self` = self else { return } |
|||
|
|||
self.userInfoView.alpha = 1 |
|||
self.selectAddressInfoLabel.alpha = 1 |
|||
self.addressSegmentView.alpha = 1 |
|||
}, completion: nil) |
|||
} |
|||
} |
|||
|
|||
private var selectedAddressType = AddressType.branch { |
|||
|
|||
didSet { |
|||
switch selectedAddressType { |
|||
case .branch: |
|||
|
|||
selectedAddress = nil |
|||
// selectedCoupon = nil |
|||
detailAddressTextField.text = "" |
|||
branchesView.isHidden = false |
|||
addressView.isHidden = true |
|||
|
|||
UIView.animate(withDuration: 0.3, animations: { [weak self] in |
|||
guard let `self` = self else {return} |
|||
|
|||
self.branchesView.alpha = 1 |
|||
self.addressView.alpha = 0 |
|||
}, completion: nil) |
|||
|
|||
case .custom: |
|||
selectedBranch = nil |
|||
branchesView.isHidden = true |
|||
addressView.isHidden = false |
|||
|
|||
UIView.animate(withDuration: 0.3, animations: {[weak self] in |
|||
guard let `self` = self else {return} |
|||
|
|||
self.branchesView.alpha = 0 |
|||
self.addressView.alpha = 1 |
|||
}, completion: nil) |
|||
|
|||
UIView.animate(withDuration: 0.3, animations: {[weak self] in |
|||
guard let `self` = self else {return} |
|||
|
|||
self.branchesView.alpha = 0 |
|||
self.addressView.alpha = 0 |
|||
}, completion: nil) |
|||
} |
|||
|
|||
submitButton.isHidden = false |
|||
perform(#selector(self.moveToBottom), with: nil, afterDelay: 0.3) |
|||
|
|||
} |
|||
} |
|||
|
|||
private var selectedBranch: Branch? { |
|||
didSet { |
|||
branchTextField.text = selectedBranch?.agentName |
|||
branchTextField.sendActions(for: .editingChanged) |
|||
} |
|||
} |
|||
|
|||
private var selectedAddress: Juso? { |
|||
didSet { |
|||
zipcodeTextField.text = selectedAddress?.zipNo |
|||
addressTextField.text = selectedAddress?.roadAddr |
|||
detailAddressTextField.sendActions(for: .editingChanged) |
|||
} |
|||
} |
|||
|
|||
private lazy var branchesPickerView = UIPickerView() |
|||
|
|||
private var branches: [Branch]? |
|||
|
|||
// MARK: IBOutlets |
|||
|
|||
@IBOutlet private weak var selectedItemInfoView: UIView! |
|||
@IBOutlet private weak var selectedItemImageView: UIImageView! |
|||
@IBOutlet private weak var selectInformationLabel: UILabel! |
|||
|
|||
@IBOutlet private weak var userInfoSegmentedControl: UISegmentedControl! |
|||
@IBOutlet private weak var addressSegmentedControl: UISegmentedControl! |
|||
|
|||
@IBOutlet private weak var userNameTextField: UITextField! |
|||
@IBOutlet private weak var userPhoneNumberTextField: UITextField! |
|||
|
|||
@IBOutlet private weak var branchTextField: UITextField! |
|||
@IBOutlet weak var onlineCouponTextField: UITextField! |
|||
@IBOutlet private weak var detailAddressTextField: UITextField! |
|||
|
|||
@IBOutlet private weak var addressTextField: UITextField! |
|||
@IBOutlet private weak var zipcodeTextField: UITextField! |
|||
|
|||
@IBOutlet private weak var submitButton: UIButton! |
|||
@IBOutlet private weak var searchButton: UIButton! |
|||
|
|||
@IBOutlet private weak var branchesView: UIStackView! |
|||
@IBOutlet private weak var addressView: UIStackView! |
|||
@IBOutlet weak var onlineCouponView: UIStackView! |
|||
@IBOutlet private weak var userInfoView: UIStackView! |
|||
@IBOutlet private weak var selectAddressInfoLabel: UILabel! |
|||
@IBOutlet private weak var addressSegmentView: UIView! |
|||
@IBOutlet private weak var scrollView: UIScrollView! |
|||
|
|||
@IBOutlet weak var receiverTitleLabel: UILabel! |
|||
@IBOutlet weak var phoneNumberTitleLabel: UILabel! |
|||
@IBOutlet weak var branchInfotmationTitleLabel: UILabel! |
|||
|
|||
|
|||
// MARK: VC's Life cycle |
|||
|
|||
override func viewDidLoad() { |
|||
super.viewDidLoad() |
|||
setup() |
|||
|
|||
presenter?.viewIsReady() |
|||
presenter?.fetchBranches() |
|||
} |
|||
|
|||
override func viewWillAppear(_ animated: Bool) { |
|||
super.viewWillAppear(animated) |
|||
title = "reward_group_title_text".localized() |
|||
} |
|||
|
|||
override func viewWillDisappear(_ animated: Bool) { |
|||
super.viewWillDisappear(animated) |
|||
title = "" |
|||
} |
|||
|
|||
// MARK: IBActions |
|||
|
|||
@IBAction |
|||
private func cancelButtonTouch(_ sender: UIBarButtonItem) { |
|||
dismiss(animated: true, completion: nil) |
|||
} |
|||
|
|||
@IBAction |
|||
private func touchSearchAddressButton(_ sender: UIButton) { |
|||
presenter?.showSearchAddressVC() |
|||
} |
|||
|
|||
@IBAction |
|||
private func touchBranches(_ sender: UIButton) { |
|||
presenter?.showBranchesVC() |
|||
} |
|||
|
|||
@IBAction |
|||
private func touchSubmitButton(_ sender: UIButton) { |
|||
|
|||
let address = "\(detailAddressTextField.text ?? ""), \(addressTextField.text ?? "")" |
|||
|
|||
let confirmVC = ConfirmViewController(nibName: "ConfirmViewController", bundle: nil) |
|||
|
|||
var configure = ConfirmViewControllerConfiguration() |
|||
|
|||
configure.content1 = userNameTextField.text |
|||
configure.content2 = userPhoneNumberTextField.text |
|||
configure.multiLineContent = (selectedAddressType == .custom) ? address : selectedBranch?.agentName |
|||
configure.model = model |
|||
|
|||
confirmVC.setConfigure(with: configure) |
|||
confirmVC.delegate = self |
|||
|
|||
present(confirmVC, animated: true, completion: nil) |
|||
} |
|||
|
|||
// MARK: Other Functions |
|||
|
|||
private func setup() { |
|||
// all setup should be done here |
|||
branchesPickerView.delegate = self |
|||
branchesPickerView.dataSource = self |
|||
|
|||
userNameTextField.addTarget(self, action: #selector(editingChanged(_:)), for: .editingChanged) |
|||
userPhoneNumberTextField.addTarget(self, action: #selector(editingChanged(_:)), for: .editingChanged) |
|||
branchTextField.addTarget(self, action: #selector(editingChanged(_:)), for: .editingChanged) |
|||
detailAddressTextField.addTarget(self, action: #selector(editingChanged(_:)), for: .editingChanged) |
|||
|
|||
setButton() |
|||
setSegmentedControl() |
|||
// self.setDefaultState() |
|||
setOnlyBranchMode() |
|||
|
|||
setMultiLanguage() |
|||
|
|||
navigationController?.interactivePopGestureRecognizer?.delegate = self |
|||
navigationController?.interactivePopGestureRecognizer?.isEnabled = true |
|||
|
|||
branchInfotmationTitleLabel.textColor = .themeRed |
|||
} |
|||
} |
|||
|
|||
// MARK: RedeemViewInterface |
|||
|
|||
extension RedeemViewController: RedeemViewInterface { |
|||
func setModel(model: RewardProduct?) { |
|||
self.model = model |
|||
} |
|||
|
|||
func setBranches(with model: [Branch]?) { |
|||
branches = model |
|||
} |
|||
|
|||
func setBranchesError(with error: Error) { |
|||
alert(type: .error, message: error.localizedDescription) |
|||
} |
|||
|
|||
func submitSuccess() { |
|||
alert( |
|||
type: .normal, |
|||
message: |
|||
"order_completed_message_text".localized(), |
|||
title: "order_completed_message_title_text".localized() |
|||
) {[weak self] in |
|||
guard let `self` = self else {return} |
|||
|
|||
self.presenter?.refreshRewardPoint() |
|||
} |
|||
} |
|||
|
|||
func submitFailure(with error: Error) { |
|||
alert(type: .error, message: error.localizedDescription) |
|||
} |
|||
|
|||
func startLoading() { |
|||
showProgressHud() |
|||
} |
|||
|
|||
func endLoading() { |
|||
hideProgressHud() |
|||
} |
|||
|
|||
func failureRefreshRewardPoint(with error: Error) { |
|||
alert(type: .error, message: error.localizedDescription, title: "Alert") {[weak self] in |
|||
guard let `self` = self else { return } |
|||
self.presenter?.goRewardHome() |
|||
} |
|||
} |
|||
|
|||
func successRefreshRewardPoint() { |
|||
presenter?.goRewardHome() |
|||
} |
|||
} |
|||
|
|||
// MARK: - UIPickerViewDataSource, UIPickerViewDelegate |
|||
|
|||
extension RedeemViewController: UIPickerViewDataSource, UIPickerViewDelegate { |
|||
func numberOfComponents(in pickerView: UIPickerView) -> Int { |
|||
return 1 |
|||
} |
|||
|
|||
func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { |
|||
return branches?.count ?? 0 |
|||
} |
|||
|
|||
func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String? { |
|||
return branches?[row].agentName |
|||
} |
|||
|
|||
func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { |
|||
selectedBranch = branches?[row] |
|||
} |
|||
} |
|||
|
|||
// MARK: - SearchAddressDelegate |
|||
|
|||
extension RedeemViewController: SearchAddressDelegate { |
|||
func searchAddress(viewController: SearchAddressViewController, selectedJuso: Juso) { |
|||
selectedAddress = selectedJuso |
|||
viewController.dismiss(animated: true, completion: nil) |
|||
} |
|||
} |
|||
|
|||
// MARK: - Other Methods |
|||
|
|||
extension RedeemViewController { |
|||
|
|||
private func setButton() { |
|||
submitButton.layer.cornerRadius = 5 |
|||
} |
|||
|
|||
private func setDefaultState() { |
|||
branchesView.isHidden = true |
|||
addressView.isHidden = true |
|||
userInfoView.isHidden = true |
|||
submitButton.isHidden = true |
|||
selectAddressInfoLabel.isHidden = true |
|||
addressSegmentView.isHidden = true |
|||
|
|||
userInfoView.alpha = 0 |
|||
selectAddressInfoLabel.alpha = 0 |
|||
addressSegmentView.alpha = 0 |
|||
branchesView.alpha = 0 |
|||
addressView.alpha = 0 |
|||
|
|||
addressTextField.layer.cornerRadius = 5 |
|||
branchTextField.inputView = branchesPickerView |
|||
} |
|||
|
|||
private func setSegmentedControl() { |
|||
let font = UIFont.sanfrancisco(.medium, size: 14) |
|||
|
|||
addressSegmentedControl.setTitleTextAttributes( |
|||
[NSAttributedString.Key.font: font], |
|||
for: .normal |
|||
) |
|||
|
|||
addressSegmentedControl.addTarget( |
|||
self, |
|||
action: #selector(addressTypeChange(_:)), |
|||
for: .valueChanged |
|||
) |
|||
|
|||
userInfoSegmentedControl.setTitleTextAttributes( |
|||
[NSAttributedString.Key.font: font], |
|||
for: .normal |
|||
) |
|||
|
|||
userInfoSegmentedControl.addTarget( |
|||
self, |
|||
action: #selector(userInfoChange(_:)), |
|||
for: .valueChanged |
|||
) |
|||
} |
|||
|
|||
private func setOnlyBranchMode() { |
|||
userNameTextField.isEnabled = false |
|||
userPhoneNumberTextField.isEnabled = false |
|||
|
|||
userNameTextField.text = GMEDB.shared.user.string(.fullName) |
|||
userPhoneNumberTextField.text = GMEDB.shared.user.string(.mobileNumber) |
|||
|
|||
userNameTextField.sendActions(for: .editingChanged) |
|||
userPhoneNumberTextField.sendActions(for: .editingChanged) |
|||
|
|||
branchTextField.inputView = branchesPickerView |
|||
} |
|||
|
|||
private func setMultiLanguage() { |
|||
receiverTitleLabel.text = "receiver_text".localized() |
|||
phoneNumberTitleLabel.text = "mobile_number_text".localized() |
|||
|
|||
selectAddressInfoLabel.text = "select_branch_for_redeem_your_reward_text".localized() |
|||
branchTextField.placeholder = "select_branch_text".localized() |
|||
branchInfotmationTitleLabel.text = "you_visit_nearest_gme_branch_to_redeem_text".localized() |
|||
|
|||
selectInformationLabel.text = "selected_product_message_text".localized() |
|||
|
|||
submitButton.setTitle("submit_text".localized(), for: .normal) |
|||
|
|||
} |
|||
|
|||
@objc |
|||
private func addressTypeChange(_ sender: UISegmentedControl) { |
|||
selectedAddressType = AddressType(rawValue: sender.selectedSegmentIndex) ?? .branch |
|||
} |
|||
|
|||
@objc |
|||
private func userInfoChange(_ sender: UISegmentedControl) { |
|||
selectedUserType = UserType(rawValue: sender.selectedSegmentIndex) ?? .user |
|||
} |
|||
|
|||
@objc |
|||
private func editingChanged(_ textField: UITextField) { |
|||
guard |
|||
let name = userNameTextField.text, |
|||
let phoneNumber = userPhoneNumberTextField.text, |
|||
let branch = branchTextField.text, |
|||
let detail = detailAddressTextField.text, |
|||
let address = addressTextField.text else { return } |
|||
|
|||
var isValid = name.count > 0 && phoneNumber.count > 0 |
|||
|
|||
switch selectedAddressType { |
|||
case .branch: |
|||
isValid = isValid && branch.count > 0 |
|||
case .custom: |
|||
isValid = isValid && address.count > 0 && detail.count > 0 |
|||
} |
|||
|
|||
submitButton.isEnabled = isValid |
|||
submitButton.backgroundColor = isValid ? .themeRed : .lightGray |
|||
} |
|||
|
|||
@objc private func moveToBottom() { |
|||
if scrollView.contentSize.height - scrollView.bounds.size.height > 0 { |
|||
let bottomOffset = CGPoint(x: 0, y: scrollView.contentSize.height - scrollView.bounds.size.height) |
|||
scrollView.setContentOffset(bottomOffset, animated: true) |
|||
} |
|||
} |
|||
} |
|||
|
|||
// MARK: - ConfirmViewControllerDelegate |
|||
extension RedeemViewController: ConfirmViewControllerDelegate { |
|||
func confirm(_ viewController: ConfirmViewController) { |
|||
|
|||
let recvType = selectedAddressType == .custom ? "1" : "2" |
|||
let address = "\(detailAddressTextField.text ?? ""), \(addressTextField.text ?? "")" |
|||
|
|||
ordered = Redeem( |
|||
userID: GMEDB.shared.user.string(.userId), |
|||
productCode: model?.productCode, |
|||
usePoint: model?.pointPrice, |
|||
orderType: "1", |
|||
recvType: recvType, |
|||
branchCode: selectedBranch?.agentID, |
|||
recvAddress: address, |
|||
recvZipCode: selectedAddress?.zipNo, |
|||
recvPhoneNumber: userPhoneNumberTextField.text, |
|||
recvName: userNameTextField.text |
|||
) |
|||
|
|||
presenter?.submit(with: ordered) |
|||
} |
|||
|
|||
func cancel(_ viewController: ConfirmViewController) { |
|||
|
|||
} |
|||
} |
|||
|
|||
// MARK: - UIGestureRecognizerDelegate |
|||
extension RedeemViewController: UIGestureRecognizerDelegate { |
|||
func gestureRecognizer( |
|||
_ gestureRecognizer: UIGestureRecognizer, |
|||
shouldBeRequiredToFailBy otherGestureRecognizer: UIGestureRecognizer |
|||
) -> Bool { |
|||
return true |
|||
} |
|||
} |
@ -1,22 +0,0 @@ |
|||
// |
|||
// RedeemViewInterface.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol RedeemViewInterface: class { |
|||
func setModel(model: RewardProduct?) |
|||
func setBranches(with model: [Branch]?) |
|||
func setBranchesError(with error: Error) |
|||
|
|||
func submitSuccess() |
|||
func submitFailure(with error: Error) |
|||
|
|||
func startLoading() |
|||
func endLoading() |
|||
|
|||
func failureRefreshRewardPoint(with error: Error) |
|||
func successRefreshRewardPoint() |
|||
} |
@ -1,63 +0,0 @@ |
|||
// |
|||
// RedeemWireframe.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
|
|||
class RedeemWireframe { |
|||
weak var view: UIViewController! |
|||
private var model: RewardProduct? |
|||
} |
|||
|
|||
extension RedeemWireframe: RedeemWireframeInput { |
|||
|
|||
var storyboardName: String {return "Redeem"} |
|||
|
|||
func getMainView() -> UIViewController { |
|||
let service = RedeemService() |
|||
let interactor = RedeemInteractor(service: service) |
|||
let presenter = RedeemPresenter(with: self.model) |
|||
let viewController = viewControllerFromStoryboard(of: RedeemViewController.self) |
|||
|
|||
viewController.presenter = presenter |
|||
interactor.output = presenter |
|||
presenter.interactor = interactor |
|||
presenter.wireframe = self |
|||
presenter.view = viewController |
|||
|
|||
view = viewController |
|||
return viewController |
|||
} |
|||
|
|||
func pushMainViewWithModel(with model: RewardProduct?, in source: UINavigationController) { |
|||
self.model = model |
|||
pushMainView(in: source) |
|||
} |
|||
|
|||
func showSearchAddressVC() { |
|||
let wireframe = SearchAddressWireframe() |
|||
guard let delegate = view as? SearchAddressDelegate else {return} |
|||
|
|||
wireframe.openViewControllerWithNavigationWithDelegate( |
|||
delegate: delegate, |
|||
viewController: wireframe.getMainView(), |
|||
source: view |
|||
) |
|||
} |
|||
|
|||
func showBranchesVC() { |
|||
let wireframe = GmeContactsWireframe() |
|||
let vc = wireframe.getMainView() |
|||
|
|||
wireframe.openViewControllerWithNavigation(viewController: vc, source: view) |
|||
} |
|||
|
|||
func goRewardVC() { |
|||
view.navigationController?.popToRootViewController(animated: true) |
|||
} |
|||
|
|||
} |
@ -1,17 +0,0 @@ |
|||
// |
|||
// RedeemWireframeInput.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
import UIKit |
|||
|
|||
protocol RedeemWireframeInput: WireframeInput { |
|||
func pushMainViewWithModel(with model: RewardProduct?, in source: UINavigationController) |
|||
func showSearchAddressVC() |
|||
func showBranchesVC() |
|||
func goRewardVC() |
|||
} |
@ -1,63 +0,0 @@ |
|||
// |
|||
// RewardInteractor.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class RewardInteractor { |
|||
|
|||
// MARK: Properties |
|||
|
|||
weak var output: RewardInteractorOutput? |
|||
private let service: RewardServiceType |
|||
|
|||
// MARK: Initialization |
|||
|
|||
init(service: RewardServiceType) { |
|||
self.service = service |
|||
} |
|||
|
|||
// MARK: Converting entities |
|||
} |
|||
|
|||
// MARK: Reward interactor input interface |
|||
|
|||
extension RewardInteractor: RewardInteractorInput { |
|||
func submit(with model: RewardProduct?) { |
|||
self.service.submit( |
|||
with: model, |
|||
success: { |
|||
self.output?.submitSuccess() |
|||
}, |
|||
failure: { |
|||
self.output?.submitFailure(with: $0) |
|||
} |
|||
) |
|||
} |
|||
|
|||
func viewIsReady() { |
|||
service.fetchProductList( |
|||
success: { |
|||
self.output?.setRewardProducts(models: $0) |
|||
}, |
|||
failure: { |
|||
self.output?.failure(error: $0) |
|||
} |
|||
) |
|||
} |
|||
func refreshRewardPoint() { |
|||
self.service.couponFetchUserInfo( |
|||
success: { |
|||
Utility.save(user: $0) |
|||
self.output?.successRefreshRewardPoint() |
|||
}, |
|||
failure: { |
|||
self.output?.failureRefreshRewardPoint(with: $0) |
|||
} |
|||
) |
|||
} |
|||
} |
@ -1,25 +0,0 @@ |
|||
// |
|||
// RewardInteractorIO.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol RewardInteractorInput: class { |
|||
func viewIsReady() |
|||
func submit(with model: RewardProduct?) |
|||
func refreshRewardPoint() |
|||
|
|||
|
|||
} |
|||
|
|||
protocol RewardInteractorOutput: class { |
|||
func setRewardProducts(models: [RewardProduct]?) |
|||
func failure(error: Error) |
|||
func submitSuccess() |
|||
func submitFailure(with error: Error) |
|||
|
|||
func successRefreshRewardPoint() |
|||
func failureRefreshRewardPoint(with error: Error) |
|||
} |
@ -1,33 +0,0 @@ |
|||
// |
|||
// ProductList.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 17/04/2019. |
|||
// Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
import ObjectMapper |
|||
|
|||
struct RewardProductContainer: Mappable { |
|||
var errorCode: String? //ErrorCode |
|||
var msg: String? //Msg |
|||
var id: String? //Id |
|||
var extra: String? //Extra |
|||
var extra2: String? //Extra2 |
|||
var data: [RewardProduct]? // Data |
|||
|
|||
init?(map: Map) { |
|||
|
|||
} |
|||
|
|||
mutating func mapping(map: Map) { |
|||
errorCode <- map["ErrorCode"] |
|||
msg <- map["Msg"] |
|||
id <- map["Id"] |
|||
extra <- map["Extra"] |
|||
extra2 <- map["Extra2"] |
|||
data <- map["Data"] |
|||
} |
|||
|
|||
} |
@ -1,115 +0,0 @@ |
|||
// |
|||
// RewardService.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class RewardService: RewardServiceType { |
|||
|
|||
|
|||
|
|||
// MARK: Properties |
|||
|
|||
// MARK: Initialization |
|||
|
|||
// MARK: Data management |
|||
|
|||
// /api/v2/reward/productList |
|||
func fetchProductList( |
|||
success: @escaping ([RewardProduct]?) -> Void, |
|||
failure: @escaping (Error) -> Void |
|||
) { |
|||
|
|||
let url = baseUrlWithoutVersion + "/v2/reward/productList" |
|||
|
|||
auth.request( |
|||
method: .post, |
|||
url: url, |
|||
params: nil, |
|||
success: { (response: RewardProductContainer) in |
|||
if (response.errorCode ?? "") == "1" { |
|||
let error = NSError( |
|||
domain: "Network", |
|||
code: 0, |
|||
userInfo: [NSLocalizedDescriptionKey : response.msg ?? ""] |
|||
) |
|||
failure(error) |
|||
} else { |
|||
let model = response.data |
|||
success(model) |
|||
} |
|||
}, |
|||
failure: { (error) in |
|||
failure(error) |
|||
} |
|||
) |
|||
} |
|||
|
|||
func submit( |
|||
with model: RewardProduct?, |
|||
success: @escaping () -> Void, |
|||
failure: @escaping (Error) -> Void |
|||
) { |
|||
// let url = baseUrl + "/reward/productBuy" |
|||
let url = baseUrlWithoutVersion + "/v2/reward/productBuy" |
|||
// let url = "http://gmeuat.gmeremit.com:5018/api/v2/reward/productBuy" |
|||
|
|||
let params: [String: String] = [ |
|||
|
|||
// "productCode": model?.productCode ?? "", |
|||
|
|||
"userId": GMEDB.shared.user.string(.userId) ?? "", |
|||
"productCode": model?.productCode ?? "", |
|||
"usePoint": model?.pointPrice ?? "", |
|||
"orderType": "1", |
|||
"recvType": "3", //1 - 직접수령 2 - 배송 3-온라인 |
|||
"branchCode": "1034", //여기는 <온라인>으로 |
|||
"recvAddress": "", |
|||
"recvZipCode": "", |
|||
"recvPhoneNumber": GMEDB.shared.user.string(.mobileNumber) ?? "", |
|||
"recvName": GMEDB.shared.user.string(.fullName) ?? "", |
|||
"rewardType": model?.rewardType ?? "" |
|||
] |
|||
|
|||
auth.request( |
|||
method: .post, |
|||
url: url, |
|||
params: params, |
|||
success: { (response: ResponseMessage) in |
|||
if (response.errorCode ?? "") == "1" { |
|||
let error = NSError.init( |
|||
domain: "Network", |
|||
code: 0, |
|||
userInfo: [NSLocalizedDescriptionKey : response.message ?? ""] |
|||
) |
|||
|
|||
failure(error) |
|||
} else { |
|||
success() |
|||
} |
|||
}, |
|||
failure: { (error) in |
|||
failure(error) |
|||
} |
|||
) |
|||
} |
|||
func couponFetchUserInfo(success: @escaping (User) -> Void, failure: @escaping (Error) -> Void) { |
|||
let service = HomeService() |
|||
|
|||
GMEDB.shared.getFcmToken { (token, error) in |
|||
guard let error = error else { |
|||
service.fetchUserInfo(token: token ?? "", success: success, failure: failure) |
|||
return |
|||
} |
|||
|
|||
failure(error) |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -1,26 +0,0 @@ |
|||
// |
|||
// RewardServiceType.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
protocol RewardServiceType: class, ApiServiceType { |
|||
func fetchProductList( |
|||
success: @escaping ([RewardProduct]?) -> Void, |
|||
failure: @escaping (Error) -> Void |
|||
) |
|||
|
|||
func submit( |
|||
with model: RewardProduct?, |
|||
success: @escaping () -> Void, |
|||
failure: @escaping (Error) -> Void |
|||
) |
|||
|
|||
func couponFetchUserInfo( |
|||
success: @escaping (User) -> Void, |
|||
failure: @escaping (Error) -> Void) |
|||
} |
@ -1,16 +0,0 @@ |
|||
// |
|||
// RewardModuleInterface.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol RewardModuleInterface: class { |
|||
func viewIsReady() |
|||
func goRedeemViewController(with model: RewardProduct?) |
|||
func submit(with model: RewardProduct?) |
|||
|
|||
func refreshRewardPoint() |
|||
func goRewardHome() |
|||
} |
@ -1,82 +0,0 @@ |
|||
// |
|||
// RewardPresenter.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class RewardPresenter { |
|||
|
|||
// MARK: Properties |
|||
|
|||
weak var view: RewardViewInterface? |
|||
var interactor: RewardInteractorInput? |
|||
var wireframe: RewardWireframeInput? |
|||
|
|||
// MARK: Converting entities |
|||
} |
|||
|
|||
// MARK: Reward module interface |
|||
|
|||
extension RewardPresenter: RewardModuleInterface { |
|||
|
|||
func refreshRewardPoint() { |
|||
view?.startLoading() |
|||
interactor?.refreshRewardPoint() |
|||
} |
|||
|
|||
func goRewardHome() { |
|||
wireframe?.goRewardVC() |
|||
} |
|||
|
|||
func viewIsReady() { |
|||
view?.startLoading() |
|||
interactor?.viewIsReady() |
|||
} |
|||
|
|||
func goRedeemViewController(with model: RewardProduct?) { |
|||
wireframe?.goRedeemViewController(with: model) |
|||
} |
|||
|
|||
func submit(with model: RewardProduct?) { |
|||
view?.startLoading() |
|||
interactor?.submit(with: model) |
|||
} |
|||
} |
|||
|
|||
// MARK: Reward interactor output interface |
|||
|
|||
extension RewardPresenter: RewardInteractorOutput { |
|||
func successRefreshRewardPoint() { |
|||
view?.endLoading() |
|||
view?.successRefreshRewardPoint() |
|||
} |
|||
|
|||
func failureRefreshRewardPoint(with error: Error) { |
|||
view?.endLoading() |
|||
view?.failureRefreshRewardPoint(with: error) |
|||
} |
|||
|
|||
func submitSuccess() { |
|||
view?.endLoading() |
|||
view?.submitSuccess() |
|||
} |
|||
|
|||
func submitFailure(with error: Error) { |
|||
view?.endLoading() |
|||
view?.submitFailure(with: error) |
|||
} |
|||
|
|||
func setRewardProducts(models: [RewardProduct]?) { |
|||
view?.endLoading() |
|||
view?.setRewardProducts(models: models) |
|||
} |
|||
|
|||
func failure(error: Error) { |
|||
view?.endLoading() |
|||
view?.failure(error: error) |
|||
} |
|||
} |
@ -1,73 +0,0 @@ |
|||
// |
|||
// RewardItemCollectionViewCell.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
// Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
import Kingfisher |
|||
|
|||
class RewardItemCollectionViewCell: UICollectionViewCell { |
|||
@IBOutlet weak var itemImage: UIImageView! |
|||
@IBOutlet weak var itemNameLabel: UILabel! |
|||
@IBOutlet weak var itemPriceLabel: UILabel! |
|||
@IBOutlet weak var redeemButton: UIButton! |
|||
@IBOutlet weak var contentsView: UIView! |
|||
@IBOutlet weak var pointTitleLabel: UILabel! |
|||
|
|||
private var model: RewardProduct? |
|||
|
|||
weak var delegate: RewardViewInterface? |
|||
|
|||
func setModel(with model: RewardProduct?, delegate: RewardViewInterface?) { |
|||
if let imageData = model?.productImgPath, |
|||
let url = URL(string: imageData) { |
|||
itemImage.kf.setImage(with: url) |
|||
} |
|||
|
|||
self.itemNameLabel.text = model?.productName |
|||
self.itemPriceLabel.text = model?.pointPrice?.likeCommaMoney() |
|||
|
|||
self.model = model |
|||
self.delegate = delegate |
|||
|
|||
self.setUI() |
|||
} |
|||
|
|||
private func setUI() { |
|||
self.contentsView.layer.cornerRadius = 5 |
|||
self.setButton() |
|||
setMultiLanguage() |
|||
} |
|||
|
|||
func setButton() { |
|||
// self.redeemButton.layer.cornerRadius = 10 |
|||
self.redeemButton.addTarget(self, action: #selector(redeemButtonTouch), for: .touchUpInside) |
|||
|
|||
let totalPoint = GMEDB.shared.user.integer(.rewardPoint) |
|||
|
|||
let isEnable = totalPoint >= Int(self.model?.pointPrice ?? "") ?? 0 |
|||
|
|||
self.redeemButton.backgroundColor = isEnable ? .themeRed : .lightGray |
|||
self.redeemButton.isEnabled = isEnable |
|||
|
|||
redeemButton.titleLabel?.adjustsFontSizeToFitWidth(true, scale: 0.5) |
|||
redeemButton.titleLabel?.numberOfLines = 2 |
|||
|
|||
pointTitleLabel.textColor = .themeRed |
|||
itemPriceLabel.textColor = .themeRed |
|||
} |
|||
|
|||
private func setMultiLanguage() { |
|||
pointTitleLabel.text = "points_text".localized() |
|||
redeemButton.setTitle("redeem_text".localized(), for: .normal) |
|||
} |
|||
|
|||
@objc |
|||
func redeemButtonTouch() { |
|||
print("touched \(self.itemNameLabel.text ?? "") redeem button") |
|||
delegate?.goRedeemViewController(with: self.model) |
|||
} |
|||
} |
@ -1,290 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="HSb-ou-7T5"> |
|||
<device id="retina4_7" orientation="portrait" appearance="dark"/> |
|||
<dependencies> |
|||
<deployment identifier="iOS"/> |
|||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> |
|||
<capability name="Named colors" minToolsVersion="9.0"/> |
|||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> |
|||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
|||
</dependencies> |
|||
<customFonts key="customFonts"> |
|||
<array key="SanFranciscoDisplay-Medium.otf"> |
|||
<string>SanFranciscoDisplay-Medium</string> |
|||
</array> |
|||
<array key="SanFranciscoDisplay-Regular.otf"> |
|||
<string>SanFranciscoDisplay-Regular</string> |
|||
</array> |
|||
</customFonts> |
|||
<scenes> |
|||
<!--Reward--> |
|||
<scene sceneID="R60-Pu-Hpy"> |
|||
<objects> |
|||
<viewController storyboardIdentifier="RewardViewController" title="Reward" id="HSb-ou-7T5" customClass="RewardViewController" customModule="GME_Remit" customModuleProvider="target" sceneMemberID="viewController"> |
|||
<view key="view" contentMode="scaleToFill" id="9Uc-9s-KgO"> |
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
|||
<subviews> |
|||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mVq-cj-kN9"> |
|||
<rect key="frame" x="10" y="10" width="355" height="132"/> |
|||
<subviews> |
|||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="starredBackground" translatesAutoresizingMaskIntoConstraints="NO" id="OUC-GY-cfV"> |
|||
<rect key="frame" x="0.0" y="0.0" width="355" height="132"/> |
|||
</imageView> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Note: The reward point is valid for a year only." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zsW-Jn-5cx"> |
|||
<rect key="frame" x="45" y="113.5" width="265.5" height="15.5"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="13"/> |
|||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_reward" translatesAutoresizingMaskIntoConstraints="NO" id="w0R-LI-YPR"> |
|||
<rect key="frame" x="75.5" y="19.5" width="80" height="80"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="80" id="0qu-ST-7fP"/> |
|||
<constraint firstAttribute="width" constant="80" id="LaH-ji-hpA"/> |
|||
</constraints> |
|||
</imageView> |
|||
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="a1o-7y-Kgz"> |
|||
<rect key="frame" x="184.5" y="34.5" width="98" height="50"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Reward Points" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vyv-ya-vvm"> |
|||
<rect key="frame" x="0.0" y="0.0" width="98" height="17"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="17" id="bs5-Ee-cbW"/> |
|||
</constraints> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="15"/> |
|||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="999" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qUz-im-Ri9"> |
|||
<rect key="frame" x="24" y="25" width="50.5" height="25"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="30"/> |
|||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="50" id="YHq-Pz-BCd"/> |
|||
</constraints> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="OUC-GY-cfV" firstAttribute="leading" secondItem="mVq-cj-kN9" secondAttribute="leading" id="A52-Bg-bDq"/> |
|||
<constraint firstAttribute="trailing" secondItem="OUC-GY-cfV" secondAttribute="trailing" id="Cnd-iV-Xf2"/> |
|||
<constraint firstItem="w0R-LI-YPR" firstAttribute="centerY" secondItem="mVq-cj-kN9" secondAttribute="centerY" multiplier="0.9:1" id="Hku-ZU-bRP"/> |
|||
<constraint firstAttribute="bottom" secondItem="OUC-GY-cfV" secondAttribute="bottom" id="I21-tO-DcP"/> |
|||
<constraint firstItem="OUC-GY-cfV" firstAttribute="top" secondItem="mVq-cj-kN9" secondAttribute="top" id="SXg-2t-8Sf"/> |
|||
<constraint firstItem="a1o-7y-Kgz" firstAttribute="centerY" secondItem="mVq-cj-kN9" secondAttribute="centerY" multiplier="0.9:1" id="Y9Y-o0-XZF"/> |
|||
<constraint firstItem="a1o-7y-Kgz" firstAttribute="centerX" secondItem="mVq-cj-kN9" secondAttribute="centerX" multiplier="1:0.76" id="bwp-Qn-JjK"/> |
|||
<constraint firstItem="zsW-Jn-5cx" firstAttribute="centerX" secondItem="OUC-GY-cfV" secondAttribute="centerX" id="cFA-Vu-JJk"/> |
|||
<constraint firstItem="zsW-Jn-5cx" firstAttribute="bottom" secondItem="mVq-cj-kN9" secondAttribute="bottomMargin" constant="5" id="rIq-c9-A1e"/> |
|||
<constraint firstItem="w0R-LI-YPR" firstAttribute="centerX" secondItem="mVq-cj-kN9" secondAttribute="centerX" multiplier="0.65:1" id="uhb-mU-iLg"/> |
|||
</constraints> |
|||
</view> |
|||
<collectionView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="vmj-sE-fUF"> |
|||
<rect key="frame" x="10" y="182" width="355" height="475"/> |
|||
<color key="backgroundColor" name="ThemeSubBackground"/> |
|||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="TUx-T5-4WL"> |
|||
<size key="itemSize" width="320" height="260"/> |
|||
<size key="headerReferenceSize" width="0.0" height="0.0"/> |
|||
<size key="footerReferenceSize" width="0.0" height="0.0"/> |
|||
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/> |
|||
</collectionViewFlowLayout> |
|||
<cells> |
|||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="RewardItemCollectionViewCell" id="cHI-vd-pPt" customClass="RewardItemCollectionViewCell" customModule="GME_Remit"> |
|||
<rect key="frame" x="17.5" y="0.0" width="320" height="260"/> |
|||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
|||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO"> |
|||
<rect key="frame" x="0.0" y="0.0" width="320" height="260"/> |
|||
<autoresizingMask key="autoresizingMask"/> |
|||
<subviews> |
|||
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BxP-VR-9pb" userLabel="ContentsView"> |
|||
<rect key="frame" x="0.0" y="0.0" width="320" height="260"/> |
|||
<subviews> |
|||
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gXS-zt-2Em" userLabel="Image"> |
|||
<rect key="frame" x="10" y="15" width="300" height="138.5"/> |
|||
<subviews> |
|||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_reward" translatesAutoresizingMaskIntoConstraints="NO" id="yBC-h9-W9V"> |
|||
<rect key="frame" x="0.0" y="0.0" width="300" height="138.5"/> |
|||
</imageView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="trailing" secondItem="yBC-h9-W9V" secondAttribute="trailing" id="5lx-zb-fLq"/> |
|||
<constraint firstItem="yBC-h9-W9V" firstAttribute="leading" secondItem="gXS-zt-2Em" secondAttribute="leading" id="NHU-VV-0iu"/> |
|||
<constraint firstAttribute="width" secondItem="gXS-zt-2Em" secondAttribute="height" multiplier="303:140" id="Wu9-Ox-s9G"/> |
|||
<constraint firstItem="yBC-h9-W9V" firstAttribute="top" secondItem="gXS-zt-2Em" secondAttribute="top" id="stm-cr-M4j"/> |
|||
<constraint firstAttribute="bottom" secondItem="yBC-h9-W9V" secondAttribute="bottom" id="zNC-ex-CVg"/> |
|||
</constraints> |
|||
</view> |
|||
<view opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Yng-4K-S2l"> |
|||
<rect key="frame" x="10" y="158.5" width="300" height="56.5"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Bose Portable Speaker" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BqF-5D-gKI"> |
|||
<rect key="frame" x="10" y="15" width="280" height="16.5"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="14"/> |
|||
<color key="textColor" name="ThemeText"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="ZuI-S8-E7W" userLabel="Point"> |
|||
<rect key="frame" x="10" y="36.5" width="280" height="20"/> |
|||
<subviews> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="19800" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="45R-vr-kHD"> |
|||
<rect key="frame" x="0.0" y="0.0" width="138.5" height="20"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="14"/> |
|||
<color key="textColor" name="ThemeRed"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Points" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WJV-cK-BUi"> |
|||
<rect key="frame" x="141.5" y="0.0" width="138.5" height="20"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Regular" family="San Francisco Display" pointSize="14"/> |
|||
<color key="textColor" name="ThemeRed"/> |
|||
<nil key="highlightedColor"/> |
|||
</label> |
|||
</subviews> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="20" id="CL0-Ph-e5j"/> |
|||
</constraints> |
|||
</stackView> |
|||
</subviews> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstItem="BqF-5D-gKI" firstAttribute="leading" secondItem="Yng-4K-S2l" secondAttribute="leading" constant="10" id="63e-kW-ahI"/> |
|||
<constraint firstAttribute="trailing" secondItem="ZuI-S8-E7W" secondAttribute="trailing" constant="10" id="8gt-e7-Y2N"/> |
|||
<constraint firstItem="ZuI-S8-E7W" firstAttribute="leading" secondItem="Yng-4K-S2l" secondAttribute="leading" constant="10" id="imf-K2-iM7"/> |
|||
<constraint firstItem="BqF-5D-gKI" firstAttribute="top" relation="greaterThanOrEqual" secondItem="Yng-4K-S2l" secondAttribute="top" priority="500" constant="5" id="qn7-Kd-vUD"/> |
|||
<constraint firstItem="ZuI-S8-E7W" firstAttribute="top" secondItem="BqF-5D-gKI" secondAttribute="bottom" constant="5" id="vhY-Cn-bgi"/> |
|||
<constraint firstAttribute="bottom" secondItem="ZuI-S8-E7W" secondAttribute="bottom" id="zh4-Py-GST"/> |
|||
<constraint firstAttribute="trailing" secondItem="BqF-5D-gKI" secondAttribute="trailing" constant="10" id="zmQ-gk-slr"/> |
|||
</constraints> |
|||
</view> |
|||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7p0-Ih-FE0" userLabel="SeperateLine"> |
|||
<rect key="frame" x="0.0" y="220" width="320" height="1"/> |
|||
<color key="backgroundColor" name="ThemeSeparate"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="1" id="aIU-fW-HwS"/> |
|||
</constraints> |
|||
</view> |
|||
<button opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="tailTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Qou-YC-598"> |
|||
<rect key="frame" x="0.0" y="221" width="320" height="39"/> |
|||
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<fontDescription key="fontDescription" name="SanFranciscoDisplay-Medium" family="San Francisco Display" pointSize="16"/> |
|||
<state key="normal" title="Redeem"> |
|||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
</state> |
|||
</button> |
|||
</subviews> |
|||
<color key="backgroundColor" name="ThemeMainBackground"/> |
|||
<constraints> |
|||
<constraint firstItem="Qou-YC-598" firstAttribute="centerX" secondItem="BxP-VR-9pb" secondAttribute="centerX" id="0rd-4C-8B8"/> |
|||
<constraint firstAttribute="trailing" secondItem="Qou-YC-598" secondAttribute="trailing" id="6ZG-hl-rX3"/> |
|||
<constraint firstItem="7p0-Ih-FE0" firstAttribute="leading" secondItem="BxP-VR-9pb" secondAttribute="leading" id="BkC-hw-lTS"/> |
|||
<constraint firstAttribute="bottom" secondItem="Qou-YC-598" secondAttribute="bottom" id="CQu-M2-EwR"/> |
|||
<constraint firstItem="7p0-Ih-FE0" firstAttribute="top" secondItem="Yng-4K-S2l" secondAttribute="bottom" constant="5" id="LPd-iu-pEg"/> |
|||
<constraint firstItem="Yng-4K-S2l" firstAttribute="top" secondItem="gXS-zt-2Em" secondAttribute="bottom" constant="5" id="Nxo-cR-ohx"/> |
|||
<constraint firstAttribute="trailing" secondItem="Yng-4K-S2l" secondAttribute="trailing" constant="10" id="Svy-Ot-Obx"/> |
|||
<constraint firstItem="gXS-zt-2Em" firstAttribute="leading" secondItem="BxP-VR-9pb" secondAttribute="leading" constant="10" id="U6q-4z-r5A"/> |
|||
<constraint firstAttribute="trailing" secondItem="7p0-Ih-FE0" secondAttribute="trailing" id="USA-fy-xey"/> |
|||
<constraint firstItem="Qou-YC-598" firstAttribute="height" secondItem="BxP-VR-9pb" secondAttribute="height" multiplier="0.15:1" id="dyW-5n-uSE"/> |
|||
<constraint firstItem="Qou-YC-598" firstAttribute="leading" secondItem="BxP-VR-9pb" secondAttribute="leading" id="hox-fN-HTE"/> |
|||
<constraint firstItem="gXS-zt-2Em" firstAttribute="top" secondItem="BxP-VR-9pb" secondAttribute="top" constant="15" id="p0A-ak-GTK"/> |
|||
<constraint firstItem="Yng-4K-S2l" firstAttribute="leading" secondItem="BxP-VR-9pb" secondAttribute="leading" constant="10" id="qwg-eV-eBK"/> |
|||
<constraint firstItem="Qou-YC-598" firstAttribute="top" secondItem="7p0-Ih-FE0" secondAttribute="bottom" id="tKD-lC-dhX"/> |
|||
<constraint firstAttribute="trailing" secondItem="gXS-zt-2Em" secondAttribute="trailing" constant="10" id="usV-HI-31j"/> |
|||
</constraints> |
|||
</view> |
|||
</subviews> |
|||
</view> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="bottom" secondItem="BxP-VR-9pb" secondAttribute="bottom" id="BZ0-dO-oDJ"/> |
|||
<constraint firstItem="BxP-VR-9pb" firstAttribute="leading" secondItem="cHI-vd-pPt" secondAttribute="leading" id="Ren-lD-9Nc"/> |
|||
<constraint firstItem="BxP-VR-9pb" firstAttribute="top" secondItem="cHI-vd-pPt" secondAttribute="top" id="kIj-Ju-r7j"/> |
|||
<constraint firstAttribute="trailing" secondItem="BxP-VR-9pb" secondAttribute="trailing" id="pnh-np-BcN"/> |
|||
</constraints> |
|||
<size key="customSize" width="320" height="260"/> |
|||
<connections> |
|||
<outlet property="contentsView" destination="BxP-VR-9pb" id="W3A-zJ-aS7"/> |
|||
<outlet property="itemImage" destination="yBC-h9-W9V" id="V5H-yu-uJn"/> |
|||
<outlet property="itemNameLabel" destination="BqF-5D-gKI" id="SfN-Lt-Eif"/> |
|||
<outlet property="itemPriceLabel" destination="45R-vr-kHD" id="Y5b-8s-Q00"/> |
|||
<outlet property="pointTitleLabel" destination="WJV-cK-BUi" id="zGg-cN-y3H"/> |
|||
<outlet property="redeemButton" destination="Qou-YC-598" id="smo-E4-GZd"/> |
|||
</connections> |
|||
</collectionViewCell> |
|||
</cells> |
|||
</collectionView> |
|||
<segmentedControl opaque="NO" clipsSubviews="YES" contentMode="scaleAspectFit" selected="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="pUS-5u-yiU"> |
|||
<rect key="frame" x="315" y="152" width="50" height="26"/> |
|||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
<constraints> |
|||
<constraint firstAttribute="width" constant="50" id="3Ig-8M-nEs"/> |
|||
<constraint firstAttribute="height" constant="25" id="Ohr-Rq-jxc"/> |
|||
</constraints> |
|||
<segments> |
|||
<segment title="" image="collection0"/> |
|||
<segment title="" image="list0"/> |
|||
</segments> |
|||
<color key="tintColor" red="0.92941176469999998" green="0.10980392160000001" blue="0.14117647059999999" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/> |
|||
</segmentedControl> |
|||
</subviews> |
|||
<color key="backgroundColor" name="ThemeMainBackground"/> |
|||
<constraints> |
|||
<constraint firstItem="pUS-5u-yiU" firstAttribute="top" secondItem="mVq-cj-kN9" secondAttribute="bottom" constant="10" id="33O-u2-VAn"/> |
|||
<constraint firstItem="mVq-cj-kN9" firstAttribute="top" secondItem="xzr-V8-PuC" secondAttribute="top" constant="10" id="ToK-9y-JLR"/> |
|||
<constraint firstItem="xzr-V8-PuC" firstAttribute="bottom" secondItem="vmj-sE-fUF" secondAttribute="bottom" constant="10" id="WAE-L4-8NY"/> |
|||
<constraint firstItem="vmj-sE-fUF" firstAttribute="leading" secondItem="xzr-V8-PuC" secondAttribute="leading" constant="10" id="ZPN-6Q-A6T"/> |
|||
<constraint firstItem="xzr-V8-PuC" firstAttribute="trailing" secondItem="pUS-5u-yiU" secondAttribute="trailing" constant="10" id="aIc-AA-Iqr"/> |
|||
<constraint firstItem="xzr-V8-PuC" firstAttribute="trailing" secondItem="vmj-sE-fUF" secondAttribute="trailing" constant="10" id="gcR-Zb-xMO"/> |
|||
<constraint firstItem="xzr-V8-PuC" firstAttribute="trailing" secondItem="mVq-cj-kN9" secondAttribute="trailing" constant="10" id="usG-n5-rnO"/> |
|||
<constraint firstItem="mVq-cj-kN9" firstAttribute="leading" secondItem="xzr-V8-PuC" secondAttribute="leading" constant="10" id="xRu-NY-z1z"/> |
|||
<constraint firstItem="vmj-sE-fUF" firstAttribute="top" secondItem="pUS-5u-yiU" secondAttribute="bottom" constant="5" id="yAd-Y1-4jk"/> |
|||
</constraints> |
|||
<viewLayoutGuide key="safeArea" id="xzr-V8-PuC"/> |
|||
</view> |
|||
<navigationItem key="navigationItem" title="Reward" id="hwT-7x-wrG"> |
|||
<barButtonItem key="rightBarButtonItem" title="Cancel" id="0iP-nh-qBh"> |
|||
<color key="tintColor" red="1" green="0.14913141730000001" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<connections> |
|||
<action selector="closeButtonTouch:" destination="HSb-ou-7T5" id="UDd-Qh-yCe"/> |
|||
</connections> |
|||
</barButtonItem> |
|||
</navigationItem> |
|||
<connections> |
|||
<outlet property="collectionView" destination="vmj-sE-fUF" id="1hS-9U-Y8o"/> |
|||
<outlet property="layoutSegment" destination="pUS-5u-yiU" id="3y6-Kg-nuh"/> |
|||
<outlet property="rewardNoteLabel" destination="zsW-Jn-5cx" id="Vw4-nf-Jmz"/> |
|||
<outlet property="rewardPointContainerView" destination="mVq-cj-kN9" id="rig-KH-udE"/> |
|||
<outlet property="rewardPointLabel" destination="qUz-im-Ri9" id="12G-rl-Pno"/> |
|||
<outlet property="rewardPointTitleLabel" destination="Vyv-ya-vvm" id="Jza-eO-lL2"/> |
|||
</connections> |
|||
</viewController> |
|||
<placeholder placeholderIdentifier="IBFirstResponder" id="8je-5K-XuW" userLabel="First Responder" sceneMemberID="firstResponder"/> |
|||
</objects> |
|||
<point key="canvasLocation" x="847.20000000000005" y="232.53373313343329"/> |
|||
</scene> |
|||
</scenes> |
|||
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<resources> |
|||
<image name="collection0" width="128" height="128"/> |
|||
<image name="ic_reward" width="74" height="74"/> |
|||
<image name="list0" width="128" height="128"/> |
|||
<image name="starredBackground" width="355" height="132"/> |
|||
<namedColor name="ThemeMainBackground"> |
|||
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
<namedColor name="ThemeRed"> |
|||
<color red="0.92941176470588238" green="0.10588235294117647" blue="0.14117647058823529" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
<namedColor name="ThemeSeparate"> |
|||
<color red="0.82400000095367432" green="0.82400000095367432" blue="0.82400000095367432" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
<namedColor name="ThemeSubBackground"> |
|||
<color red="0.93300002813339233" green="0.93300002813339233" blue="0.93300002813339233" alpha="1" colorSpace="custom" customColorSpace="displayP3"/> |
|||
</namedColor> |
|||
<namedColor name="ThemeText"> |
|||
<color red="0.28999999165534973" green="0.28999999165534973" blue="0.28999999165534973" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
</resources> |
|||
</document> |
@ -1,287 +0,0 @@ |
|||
// |
|||
// RewardViewController.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
import XLPagerTabStrip |
|||
|
|||
class RewardViewController: UIViewController { |
|||
|
|||
// MARK: Properties |
|||
private enum ProductType: String { |
|||
case product = "Product" |
|||
case coupon = "Coupon" |
|||
} |
|||
|
|||
var presenter: RewardModuleInterface? |
|||
private lazy var refreshControl = UIRefreshControl() |
|||
|
|||
private var models: [RewardProduct]? { |
|||
didSet { |
|||
collectionView.reloadData() |
|||
} |
|||
} |
|||
|
|||
private var couponModel: RewardProduct? { |
|||
didSet { |
|||
let confirmVC = ConfirmViewController(nibName: "ConfirmViewController", bundle: nil) |
|||
|
|||
var configure = ConfirmViewControllerConfiguration() |
|||
|
|||
configure.content1 = GMEDB.shared.user.string(.fullName) |
|||
configure.content2 = GMEDB.shared.user.string(.mobileNumber) |
|||
configure.receiveLocation = "location_title_text".localized() |
|||
configure.multiLineContent = "online_title_text".localized() |
|||
configure.productType = "\(couponModel?.rewardType ?? "")" |
|||
|
|||
confirmVC.setConfigure(with: configure) |
|||
|
|||
confirmVC.delegate = self |
|||
|
|||
present(confirmVC, animated: true, completion: nil) |
|||
} |
|||
} |
|||
|
|||
private var rewardPoint: String? { |
|||
didSet { |
|||
rewardPointLabel.text = rewardPoint |
|||
} |
|||
} |
|||
|
|||
private var couponOrdered: Redeem? |
|||
|
|||
// MARK: IBOutlets |
|||
|
|||
@IBOutlet weak var collectionView: UICollectionView! |
|||
@IBOutlet weak var rewardPointLabel: UILabel! |
|||
@IBOutlet weak var rewardPointTitleLabel: UILabel! |
|||
@IBOutlet weak var rewardNoteLabel: UILabel! |
|||
@IBOutlet weak var rewardPointContainerView: UIView! |
|||
@IBOutlet weak var layoutSegment: UISegmentedControl! |
|||
|
|||
// MARK: VC's Life cycle |
|||
|
|||
override func viewDidLoad() { |
|||
super.viewDidLoad() |
|||
setup() |
|||
|
|||
layoutSegment.addTarget(self, action: #selector(selectLayout(_:)), for: .valueChanged) |
|||
} |
|||
|
|||
override func viewWillAppear(_ animated: Bool) { |
|||
super.viewWillAppear(animated) |
|||
title = "reward_group_title_text".localized() |
|||
|
|||
collectionView.setContentOffset(.zero, animated: false) |
|||
rewardPoint = GMEDB.shared.user.string(.rewardPoint)?.likeCommaMoney() |
|||
|
|||
collectionView.reloadData() |
|||
} |
|||
|
|||
override func viewWillDisappear(_ animated: Bool) { |
|||
super.viewWillDisappear(animated) |
|||
navigationItem.title = "" |
|||
} |
|||
// MARK: IBActions |
|||
|
|||
@objc func selectLayout(_ sender: UISegmentedControl) { |
|||
setCollectionViewLayout(sender.selectedSegmentIndex) |
|||
} |
|||
|
|||
// MARK: Other Functions |
|||
|
|||
private func setup() { |
|||
// all setup should be done here |
|||
setDelegate() |
|||
setCollectionViewLayout(0) |
|||
addRefreshControlCollectionView() |
|||
setMultiLanguage() |
|||
|
|||
rewardPointContainerView.hero.id = "pointsView" |
|||
presenter?.viewIsReady() |
|||
|
|||
layoutSegment.tintColor = .themeRed |
|||
layoutSegment.backgroundColor = .clear |
|||
|
|||
collectionView.layer.cornerRadius = 5 |
|||
} |
|||
|
|||
private func setDelegate() { |
|||
collectionView.dataSource = self |
|||
} |
|||
|
|||
private func setMultiLanguage() { |
|||
rewardPointTitleLabel.text = "reward_points_text".localized() |
|||
rewardNoteLabel.text = "reward_note_text".localized() |
|||
} |
|||
|
|||
private func setCollectionViewLayout(_ type: Int) { |
|||
let width: CGFloat |
|||
let height: CGFloat |
|||
|
|||
switch type { |
|||
case 0: |
|||
width = (view.frame.width - 30) / 2 - 3.5 |
|||
height = (view.frame.width - 30) / 2 - 3.5 + 30 |
|||
case 1: |
|||
width = (view.frame.width - 30) |
|||
height = (( width * 260 ) / 320) + 5 |
|||
|
|||
default: |
|||
width = (view.frame.width - 30) / 2 - 3.5 |
|||
height = (view.frame.width - 30) / 2 - 3.5 + 30 |
|||
} |
|||
|
|||
let cellSize = CGSize( |
|||
width: width, |
|||
height: height |
|||
) |
|||
|
|||
let layout = UICollectionViewFlowLayout() |
|||
layout.scrollDirection = .vertical |
|||
layout.itemSize = cellSize |
|||
layout.sectionInset = UIEdgeInsets(top: 5, left: 5, bottom: 5, right: 5) |
|||
layout.minimumLineSpacing = 5.0 |
|||
layout.minimumInteritemSpacing = 5.0 |
|||
|
|||
collectionView.setCollectionViewLayout(layout, animated: true) |
|||
collectionView.reloadData() |
|||
collectionView.collectionViewLayout.invalidateLayout() |
|||
} |
|||
|
|||
private func addRefreshControlCollectionView() { |
|||
let colorOption = [NSAttributedString.Key.foregroundColor : UIColor.themeWhite] |
|||
|
|||
let title = NSAttributedString(string: "pull to refresh", attributes: colorOption) |
|||
|
|||
refreshControl.attributedTitle = title |
|||
refreshControl.backgroundColor = .themeBlue |
|||
refreshControl.tintColor = .themeWhite |
|||
refreshControl.addTarget(self, action: #selector(refresh), for: .valueChanged) |
|||
if #available(iOS 10.0, *) { |
|||
collectionView.refreshControl = refreshControl |
|||
} else { |
|||
collectionView.addSubview(refreshControl) |
|||
} |
|||
} |
|||
|
|||
@objc |
|||
private func refresh() { |
|||
self.presenter?.viewIsReady() |
|||
|
|||
DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {[weak self] in |
|||
guard let `self` = self else {return} |
|||
|
|||
if #available(iOS 10.0, *) { |
|||
self.collectionView.refreshControl?.endRefreshing() |
|||
} else { |
|||
self.refreshControl.endRefreshing() |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
// MARK: RewardViewInterface |
|||
extension RewardViewController: RewardViewInterface { |
|||
|
|||
func failureRefreshRewardPoint(with error: Error) { |
|||
alert(type: .error, message: error.localizedDescription, title: "Alert") {[weak self] in |
|||
guard let `self` = self else { return } |
|||
self.presenter?.goRewardHome() |
|||
} |
|||
} |
|||
|
|||
func successRefreshRewardPoint() { |
|||
rewardPoint = GMEDB.shared.user.string(.rewardPoint)?.likeCommaMoney() |
|||
collectionView.reloadData() |
|||
} |
|||
|
|||
func submitSuccess() { |
|||
alert( |
|||
type: .normal, |
|||
message: "You can now use free service charge coupon while sending money overseas.", |
|||
title: "order_completed_message_title_text".localized() |
|||
) {[weak self] in |
|||
guard let `self` = self else {return} |
|||
|
|||
self.presenter?.refreshRewardPoint() |
|||
} |
|||
} |
|||
|
|||
func submitFailure(with error: Error) { |
|||
alert(type: .error, message: error.localizedDescription) |
|||
} |
|||
|
|||
func setRewardProducts(models: [RewardProduct]?) { |
|||
self.models = models |
|||
} |
|||
|
|||
func failure(error: Error) { |
|||
alertWithOk(message: error.localizedDescription) |
|||
} |
|||
|
|||
func goRedeemViewController(with model: RewardProduct?) { |
|||
guard |
|||
let rewardType = model?.rewardType, |
|||
let type = ProductType(rawValue: rewardType) else { return } |
|||
|
|||
switch type { |
|||
case .product: |
|||
presenter?.goRedeemViewController(with: model) |
|||
case .coupon: |
|||
couponModel = model |
|||
} |
|||
} |
|||
|
|||
func startLoading() { |
|||
showProgressHud() |
|||
} |
|||
|
|||
func endLoading() { |
|||
hideProgressHud() |
|||
} |
|||
} |
|||
|
|||
// MARK: - UICollectionViewDataSource |
|||
extension RewardViewController: UICollectionViewDataSource { |
|||
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { |
|||
return models?.count ?? 0 |
|||
} |
|||
|
|||
func collectionView( |
|||
_ collectionView: UICollectionView, |
|||
cellForItemAt indexPath: IndexPath |
|||
) -> UICollectionViewCell { |
|||
guard let cell = collectionView.dequeueReusableCell( |
|||
withReuseIdentifier: "RewardItemCollectionViewCell", |
|||
for: indexPath |
|||
) as? RewardItemCollectionViewCell else { |
|||
return UICollectionViewCell() |
|||
} |
|||
|
|||
cell.setModel(with: models?[indexPath.row], delegate: self) |
|||
return cell |
|||
} |
|||
} |
|||
|
|||
// MARK: - XLPagerTabStrip's IndicatorInfoProvider |
|||
extension RewardViewController: IndicatorInfoProvider { |
|||
func indicatorInfo(for pagerTabStripController: PagerTabStripViewController) -> IndicatorInfo { |
|||
return IndicatorInfo.init(title: "products_text".localized()) |
|||
} |
|||
} |
|||
|
|||
// MARK: - ConfirmViewControllerDelegate |
|||
extension RewardViewController: ConfirmViewControllerDelegate { |
|||
func confirm(_ viewController: ConfirmViewController) { |
|||
presenter?.submit(with: couponModel) |
|||
} |
|||
|
|||
func cancel(_ viewController: ConfirmViewController) { |
|||
|
|||
} |
|||
} |
@ -1,23 +0,0 @@ |
|||
// |
|||
// RewardViewInterface.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol RewardViewInterface: class { |
|||
func setRewardProducts(models: [RewardProduct]?) |
|||
func failure(error: Error) |
|||
func goRedeemViewController(with model: RewardProduct?) |
|||
|
|||
func startLoading() |
|||
func endLoading() |
|||
|
|||
func submitSuccess() |
|||
func submitFailure(with error: Error) |
|||
|
|||
func failureRefreshRewardPoint(with error: Error) |
|||
func successRefreshRewardPoint() |
|||
|
|||
} |
@ -1,46 +0,0 @@ |
|||
// |
|||
// RewardWireframe.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
|
|||
class RewardWireframe { |
|||
weak var view: UIViewController! |
|||
} |
|||
|
|||
extension RewardWireframe: RewardWireframeInput { |
|||
|
|||
var storyboardName: String {return "Reward"} |
|||
|
|||
func getMainView() -> UIViewController { |
|||
let service = RewardService() |
|||
let interactor = RewardInteractor(service: service) |
|||
let presenter = RewardPresenter() |
|||
let viewController = viewControllerFromStoryboard(of: RewardViewController.self) |
|||
|
|||
viewController.presenter = presenter |
|||
interactor.output = presenter |
|||
presenter.interactor = interactor |
|||
presenter.wireframe = self |
|||
presenter.view = viewController |
|||
|
|||
view = viewController |
|||
return viewController |
|||
} |
|||
|
|||
func goRedeemViewController(with model: RewardProduct?) { |
|||
let redeemWireframe = RedeemWireframe() |
|||
guard let navigationVC = view.navigationController else { return } |
|||
redeemWireframe.pushMainViewWithModel(with: model, in: navigationVC) |
|||
} |
|||
|
|||
func goRewardVC() { |
|||
view.navigationController?.popToRootViewController(animated: true) |
|||
} |
|||
|
|||
|
|||
} |
@ -1,14 +0,0 @@ |
|||
// |
|||
// RewardWireframeInput.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 11/04/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
protocol RewardWireframeInput: WireframeInput { |
|||
func goRedeemViewController(with model: RewardProduct?) |
|||
func goRewardVC() |
|||
} |
@ -1,30 +0,0 @@ |
|||
// |
|||
// RewardGroupInteractor.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 13/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class RewardGroupInteractor { |
|||
|
|||
// MARK: Properties |
|||
|
|||
weak var output: RewardGroupInteractorOutput? |
|||
private let service: RewardGroupServiceType |
|||
|
|||
// MARK: Initialization |
|||
|
|||
init(service: RewardGroupServiceType) { |
|||
self.service = service |
|||
} |
|||
|
|||
} |
|||
|
|||
// MARK: RewardGroup interactor input interface |
|||
|
|||
extension RewardGroupInteractor: RewardGroupInteractorInput { |
|||
|
|||
} |
@ -1,15 +0,0 @@ |
|||
// |
|||
// RewardGroupInteractorIO.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 13/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol RewardGroupInteractorInput: class { |
|||
|
|||
} |
|||
|
|||
protocol RewardGroupInteractorOutput: class { |
|||
|
|||
} |
@ -1,13 +0,0 @@ |
|||
// |
|||
// RewardGroupService.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 13/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class RewardGroupService: RewardGroupServiceType { |
|||
|
|||
} |
@ -1,11 +0,0 @@ |
|||
// |
|||
// RewardGroupServiceType.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 13/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol RewardGroupServiceType: class { |
|||
|
|||
} |
@ -1,11 +0,0 @@ |
|||
// |
|||
// RewardGroupModuleInterface.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 13/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol RewardGroupModuleInterface: class { |
|||
|
|||
} |
@ -1,31 +0,0 @@ |
|||
// |
|||
// RewardGroupPresenter.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 13/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
class RewardGroupPresenter { |
|||
|
|||
// MARK: Properties |
|||
|
|||
weak var view: RewardGroupViewInterface? |
|||
var interactor: RewardGroupInteractorInput? |
|||
var wireframe: RewardGroupWireframeInput? |
|||
|
|||
} |
|||
|
|||
// MARK: RewardGroup module interface |
|||
|
|||
extension RewardGroupPresenter: RewardGroupModuleInterface { |
|||
|
|||
} |
|||
|
|||
// MARK: RewardGroup interactor output interface |
|||
|
|||
extension RewardGroupPresenter: RewardGroupInteractorOutput { |
|||
|
|||
} |
@ -1,97 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="GtC-iQ-Pz8"> |
|||
<device id="retina4_7" orientation="portrait" appearance="dark"/> |
|||
<dependencies> |
|||
<deployment identifier="iOS"/> |
|||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> |
|||
<capability name="Named colors" minToolsVersion="9.0"/> |
|||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> |
|||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
|||
</dependencies> |
|||
<scenes> |
|||
<!--RewardGroup--> |
|||
<scene sceneID="R60-Pu-Hpy"> |
|||
<objects> |
|||
<viewController storyboardIdentifier="RewardGroupViewController" title="RewardGroup" id="HSb-ou-7T5" customClass="RewardGroupViewController" customModule="GME_Remit" sceneMemberID="viewController"> |
|||
<view key="view" contentMode="scaleToFill" id="9Uc-9s-KgO"> |
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
|||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
|||
<subviews> |
|||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="zWG-Af-8Nd" customClass="ButtonBarView" customModule="XLPagerTabStrip"> |
|||
<rect key="frame" x="0.0" y="44" width="375" height="44"/> |
|||
<color key="backgroundColor" name="ThemeMainBackground"/> |
|||
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<constraints> |
|||
<constraint firstAttribute="height" constant="44" id="guh-y2-6RD"/> |
|||
</constraints> |
|||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="rhP-qF-b2H"> |
|||
<size key="itemSize" width="0.0" height="0.0"/> |
|||
<size key="headerReferenceSize" width="0.0" height="0.0"/> |
|||
<size key="footerReferenceSize" width="0.0" height="0.0"/> |
|||
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/> |
|||
</collectionViewFlowLayout> |
|||
<cells/> |
|||
</collectionView> |
|||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Cio-Gc-7dX"> |
|||
<rect key="frame" x="0.0" y="88" width="375" height="579"/> |
|||
</scrollView> |
|||
</subviews> |
|||
<color key="backgroundColor" name="ThemeMainBackground"/> |
|||
<constraints> |
|||
<constraint firstItem="Cio-Gc-7dX" firstAttribute="top" secondItem="zWG-Af-8Nd" secondAttribute="bottom" id="0vU-57-Sbx"/> |
|||
<constraint firstItem="Cio-Gc-7dX" firstAttribute="trailing" secondItem="UMp-XF-kLb" secondAttribute="trailing" id="9fx-di-f7A"/> |
|||
<constraint firstItem="zWG-Af-8Nd" firstAttribute="top" secondItem="UMp-XF-kLb" secondAttribute="top" id="Lbn-CL-PRf"/> |
|||
<constraint firstItem="zWG-Af-8Nd" firstAttribute="leading" secondItem="9Uc-9s-KgO" secondAttribute="leading" id="gzm-Te-zSm"/> |
|||
<constraint firstAttribute="bottom" secondItem="Cio-Gc-7dX" secondAttribute="bottom" id="kOz-qJ-QRH"/> |
|||
<constraint firstAttribute="trailing" secondItem="zWG-Af-8Nd" secondAttribute="trailing" id="lNZ-CU-yAg"/> |
|||
<constraint firstItem="Cio-Gc-7dX" firstAttribute="leading" secondItem="UMp-XF-kLb" secondAttribute="leading" id="r4n-Df-VaF"/> |
|||
</constraints> |
|||
<viewLayoutGuide key="safeArea" id="UMp-XF-kLb"/> |
|||
</view> |
|||
<navigationItem key="navigationItem" id="HJY-D2-1rl"> |
|||
<barButtonItem key="leftBarButtonItem" image="ic_cancel" id="2qJ-vW-6N3"> |
|||
<color key="tintColor" name="ThemeBlack"/> |
|||
<connections> |
|||
<action selector="touchCloseButton:" destination="HSb-ou-7T5" id="37t-NS-Lx3"/> |
|||
</connections> |
|||
</barButtonItem> |
|||
</navigationItem> |
|||
<connections> |
|||
<outlet property="closeBarButton" destination="2qJ-vW-6N3" id="WsV-qn-qgI"/> |
|||
<outlet property="containerView" destination="Cio-Gc-7dX" id="RXE-Yf-zba"/> |
|||
</connections> |
|||
</viewController> |
|||
<placeholder placeholderIdentifier="IBFirstResponder" id="8je-5K-XuW" userLabel="First Responder" sceneMemberID="firstResponder"/> |
|||
</objects> |
|||
<point key="canvasLocation" x="847.20000000000005" y="232.53373313343329"/> |
|||
</scene> |
|||
<!--Navigation Controller--> |
|||
<scene sceneID="aHW-wp-45v"> |
|||
<objects> |
|||
<navigationController automaticallyAdjustsScrollViewInsets="NO" modalPresentationStyle="fullScreen" id="GtC-iQ-Pz8" sceneMemberID="viewController"> |
|||
<toolbarItems/> |
|||
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="bzF-BH-BIB"> |
|||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/> |
|||
<autoresizingMask key="autoresizingMask"/> |
|||
</navigationBar> |
|||
<nil name="viewControllers"/> |
|||
<connections> |
|||
<segue destination="HSb-ou-7T5" kind="relationship" relationship="rootViewController" id="2V7-AG-lFY"/> |
|||
</connections> |
|||
</navigationController> |
|||
<placeholder placeholderIdentifier="IBFirstResponder" id="FaZ-P2-qjg" userLabel="First Responder" sceneMemberID="firstResponder"/> |
|||
</objects> |
|||
<point key="canvasLocation" x="-92" y="232.53373313343329"/> |
|||
</scene> |
|||
</scenes> |
|||
<color key="tintColor" red="0.78177064659999995" green="0.55228364470000002" blue="0.018981300289999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
<resources> |
|||
<image name="ic_cancel" width="12" height="12"/> |
|||
<namedColor name="ThemeBlack"> |
|||
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
|||
</namedColor> |
|||
<namedColor name="ThemeMainBackground"> |
|||
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
|||
</namedColor> |
|||
</resources> |
|||
</document> |
@ -1,106 +0,0 @@ |
|||
// |
|||
// RewardGroupViewController.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 13/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
import XLPagerTabStrip |
|||
|
|||
class RewardGroupViewController: ButtonBarPagerTabStripViewController { |
|||
|
|||
// MARK: Properties |
|||
|
|||
var presenter: RewardGroupModuleInterface? |
|||
|
|||
// MARK: Computed Properties |
|||
|
|||
// MARK: IBOutlets |
|||
|
|||
@IBOutlet weak var closeBarButton: UIBarButtonItem! |
|||
|
|||
// MARK: VC's Life cycle |
|||
|
|||
override func viewDidLoad() { |
|||
super.viewDidLoad() |
|||
setup() |
|||
} |
|||
|
|||
override func viewWillAppear(_ animated: Bool) { |
|||
super.viewWillAppear(animated) |
|||
title = "reward_group_title_text".localized() |
|||
setupNormalNavigation() |
|||
} |
|||
|
|||
override func viewWillDisappear(_ animated: Bool) { |
|||
super.viewWillDisappear(animated) |
|||
title = "" |
|||
} |
|||
|
|||
override func viewControllers( |
|||
for pagerTabStripController: PagerTabStripViewController |
|||
) -> [UIViewController] { |
|||
let rewardViewController = RewardWireframe().getMainView() |
|||
let orderViewController = OrderHistoryWireframe().getMainView() |
|||
|
|||
return [rewardViewController, orderViewController] |
|||
} |
|||
|
|||
// MARK: IBActions |
|||
|
|||
@IBAction func touchCloseButton(_ sender: UIBarButtonItem) { |
|||
dismiss(animated: true, completion: nil) |
|||
} |
|||
|
|||
} |
|||
|
|||
// MARK: RewardGroupViewInterface |
|||
extension RewardGroupViewController: RewardGroupViewInterface { |
|||
|
|||
} |
|||
|
|||
// MARK: Other Functions |
|||
extension RewardGroupViewController { |
|||
private func setup() { |
|||
// all setup should be done here |
|||
initXLPagerTabStrip() |
|||
|
|||
closeBarButton.title = "penny_test_close_text".localized() |
|||
} |
|||
|
|||
private func initXLPagerTabStrip() { |
|||
buttonBarView.backgroundColor = .themeMainBackground |
|||
buttonBarView.selectedBar.backgroundColor = .themeRed |
|||
|
|||
settings.style.selectedBarHeight = 1 |
|||
settings.style.selectedBarBackgroundColor = .themeRed |
|||
|
|||
settings.style.buttonBarItemFont = .sanfrancisco(.bold, size: 17) |
|||
|
|||
settings.style.buttonBarBackgroundColor = .themeMainBackground |
|||
settings.style.buttonBarItemBackgroundColor = .themeMainBackground |
|||
|
|||
settings.style.buttonBarLeftContentInset = 0 |
|||
settings.style.buttonBarRightContentInset = 0 |
|||
|
|||
settings.style.buttonBarMinimumLineSpacing = 0 |
|||
settings.style.buttonBarItemsShouldFillAvailiableWidth = true |
|||
|
|||
changeCurrentIndexProgressive = {( |
|||
oldCell: ButtonBarViewCell?, |
|||
newCell: ButtonBarViewCell?, |
|||
progressPercentage: CGFloat, |
|||
changeCurrentIndex: Bool, |
|||
animated: Bool |
|||
) -> Void in |
|||
|
|||
guard changeCurrentIndex == true else { return } |
|||
oldCell?.label.textColor = .init(hex: "#7b7a7a") |
|||
newCell?.label.textColor = .themeRed |
|||
|
|||
} |
|||
} |
|||
|
|||
} |
@ -1,11 +0,0 @@ |
|||
// |
|||
// RewardGroupViewInterface.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 13/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
protocol RewardGroupViewInterface: class { |
|||
|
|||
} |
@ -1,35 +0,0 @@ |
|||
// |
|||
// RewardGroupWireframe.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 13/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import UIKit |
|||
|
|||
class RewardGroupWireframe { |
|||
weak var view: UIViewController! |
|||
} |
|||
|
|||
extension RewardGroupWireframe: RewardGroupWireframeInput { |
|||
|
|||
var storyboardName: String {return "RewardGroup"} |
|||
|
|||
func getMainView() -> UIViewController { |
|||
let service = RewardGroupService() |
|||
let interactor = RewardGroupInteractor(service: service) |
|||
let presenter = RewardGroupPresenter() |
|||
let viewController = viewControllerFromStoryboard(of: RewardGroupViewController.self) |
|||
|
|||
viewController.presenter = presenter |
|||
interactor.output = presenter |
|||
presenter.interactor = interactor |
|||
presenter.wireframe = self |
|||
presenter.view = viewController |
|||
|
|||
view = viewController |
|||
return viewController |
|||
} |
|||
|
|||
} |
@ -1,13 +0,0 @@ |
|||
// |
|||
// RewardGroupWireframeInput.swift |
|||
// GME Remit |
|||
// |
|||
// Created by InKwon Devik Kim on 13/05/2019. |
|||
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. |
|||
// |
|||
|
|||
import Foundation |
|||
|
|||
protocol RewardGroupWireframeInput: WireframeInput { |
|||
|
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue