From c1c591959a7a7dfe1d66fecf89ef0c8de0961b40 Mon Sep 17 00:00:00 2001 From: InKwon James Kim Date: Wed, 25 Sep 2019 13:58:57 +0900 Subject: [PATCH] changed as subash's comments --- GME Remit/APIs/Router/APIRouter.swift | 2 + .../HomeCollectionCollectionViewCell.swift | 1 + .../Cell/HomeCollectionTableViewCell.swift | 4 +- .../Profile/ProfileViewController.swift | 1 + .../Service/DomesticRemitService.swift | 17 ++- .../View/DomesticRemit.storyboard | 4 +- .../View/DatePickerViewController.swift | 30 +++-- .../TransactionHistoryDatePicker.storyboard | 122 +++++++++--------- .../ic_menu_domestic.imageset/Contents.json | 21 +++ .../ic_menu_domestic.png | Bin 0 -> 2403 bytes GME Remit/Utilities/AppConstants.swift | 5 +- 11 files changed, 126 insertions(+), 81 deletions(-) create mode 100644 GME Remit/Supported Files/Assets.xcassets/ic_menu_domestic.imageset/Contents.json create mode 100644 GME Remit/Supported Files/Assets.xcassets/ic_menu_domestic.imageset/ic_menu_domestic.png diff --git a/GME Remit/APIs/Router/APIRouter.swift b/GME Remit/APIs/Router/APIRouter.swift index cb43cb42..f0bbac62 100644 --- a/GME Remit/APIs/Router/APIRouter.swift +++ b/GME Remit/APIs/Router/APIRouter.swift @@ -683,8 +683,10 @@ extension APIRouter { case .sendDomesticRemit(let model): let senderID = GMEDB.shared.user.string(.senderId) ?? "" + let userID = GMEDB.shared.user.string(.userId) ?? "" return [ "CustomerId": senderID, + "userId": userID, "FintechUseNo": model.fintechID, "SentAmount": model.sendAmount, "RecipientBankCode": model.bankCode, diff --git a/GME Remit/Modules/Home/User Interface/View/Cell/HomeCollectionCollectionViewCell.swift b/GME Remit/Modules/Home/User Interface/View/Cell/HomeCollectionCollectionViewCell.swift index eea5426d..61eaa794 100644 --- a/GME Remit/Modules/Home/User Interface/View/Cell/HomeCollectionCollectionViewCell.swift +++ b/GME Remit/Modules/Home/User Interface/View/Cell/HomeCollectionCollectionViewCell.swift @@ -18,6 +18,7 @@ class HomeCollectionCollectionViewCell: UICollectionViewCell { self.imageview.image = model?.icon self.titleLabel.text = model?.title self.dragButton.isHidden = true + self.layer.cornerRadius = 5 self.layer.shadowColor = UIColor.darkGray.cgColor self.layer.shadowOpacity = 0.5 self.layer.shadowRadius = 2 diff --git a/GME Remit/Modules/Home/User Interface/View/Cell/HomeCollectionTableViewCell.swift b/GME Remit/Modules/Home/User Interface/View/Cell/HomeCollectionTableViewCell.swift index 2ea85825..02cd4dad 100644 --- a/GME Remit/Modules/Home/User Interface/View/Cell/HomeCollectionTableViewCell.swift +++ b/GME Remit/Modules/Home/User Interface/View/Cell/HomeCollectionTableViewCell.swift @@ -108,7 +108,7 @@ class HomeCollectionTableViewCell: UITableViewCell, UICollectionViewDelegateFlow let domesticRemitMenu = HomeCollectionModel() domesticRemitMenu.index = 6 domesticRemitMenu.title = "domestic_remittance_text".localized() - domesticRemitMenu.icon = #imageLiteral(resourceName: "send-money") + domesticRemitMenu.icon = #imageLiteral(resourceName: "ic_menu_domestic") let menus = [sendMoneyMenu, toadaysRateMenu, domesticRemitMenu, trackTransferMenu] return menus @@ -181,7 +181,7 @@ extension HomeCollectionTableViewCell: UICollectionViewDataSource { withReuseIdentifier: "HomeCollectionCollectionViewCell", for: indexPath ) as? HomeCollectionCollectionViewCell else { - return UICollectionViewCell() + return HomeCollectionCollectionViewCell() } let menus = self.configureMenu() diff --git a/GME Remit/Modules/Profile/ProfileViewController.swift b/GME Remit/Modules/Profile/ProfileViewController.swift index ced5f5c3..f600e110 100644 --- a/GME Remit/Modules/Profile/ProfileViewController.swift +++ b/GME Remit/Modules/Profile/ProfileViewController.swift @@ -63,6 +63,7 @@ class ProfileViewController: UIViewController { self.gmeWalletNoTitle.text = "gme_wallet_no_text".localized() self.withdrawButton.setTitle(StringConstants().withdrawButtonText, for: UIControl.State.normal) self.changePasswordButton.setTitle(StringConstants().changePasswordText, for: UIControl.State.normal) + withdrawButton.layer.cornerRadius = 5 } override func setupTabItem() { diff --git a/GME Remit/Modules/RemittanceModules/DomesticModules/DomesticRemit/Application Logic/Service/DomesticRemitService.swift b/GME Remit/Modules/RemittanceModules/DomesticModules/DomesticRemit/Application Logic/Service/DomesticRemitService.swift index 8e9b656a..dbf4affc 100644 --- a/GME Remit/Modules/RemittanceModules/DomesticModules/DomesticRemit/Application Logic/Service/DomesticRemitService.swift +++ b/GME Remit/Modules/RemittanceModules/DomesticModules/DomesticRemit/Application Logic/Service/DomesticRemitService.swift @@ -257,7 +257,20 @@ class DomesticRemitService: DomesticRemitServiceType { // let json = ResponseContainerObject(JSONString: testModel) else { return } // success(json) - APIRouter.sendDomesticRemit(model: model).json(success: success, failure: failure) - + APIRouter.sendDomesticRemit(model: model) + .request( + success: {(response: ResponseContainerObject) in + if response.errorCode != "0" { + let error = NSError( + domain: "Network", + code: 0, + message: response.message ?? "Failed Send Money" + ) + failure(error) + } + success(response) + }, + failure: failure + ) } } diff --git a/GME Remit/Modules/RemittanceModules/DomesticModules/DomesticRemit/User Interface/View/DomesticRemit.storyboard b/GME Remit/Modules/RemittanceModules/DomesticModules/DomesticRemit/User Interface/View/DomesticRemit.storyboard index 70f014e4..f4c2b461 100644 --- a/GME Remit/Modules/RemittanceModules/DomesticModules/DomesticRemit/User Interface/View/DomesticRemit.storyboard +++ b/GME Remit/Modules/RemittanceModules/DomesticModules/DomesticRemit/User Interface/View/DomesticRemit.storyboard @@ -312,7 +312,7 @@ - + @@ -372,7 +372,7 @@ - + diff --git a/GME Remit/Modules/RemittanceModules/TransactionHistoryModules/TransactionHistory/User Interface/View/DatePickerViewController.swift b/GME Remit/Modules/RemittanceModules/TransactionHistoryModules/TransactionHistory/User Interface/View/DatePickerViewController.swift index 1b0f3faa..c388a2fa 100644 --- a/GME Remit/Modules/RemittanceModules/TransactionHistoryModules/TransactionHistory/User Interface/View/DatePickerViewController.swift +++ b/GME Remit/Modules/RemittanceModules/TransactionHistoryModules/TransactionHistory/User Interface/View/DatePickerViewController.swift @@ -9,14 +9,15 @@ import UIKit class DatePickerViewController: UIViewController { - @IBOutlet private weak var fromTextfield: UITextField! - @IBOutlet private weak var toTextfield: UITextField! - @IBOutlet private weak var fromTitleLabel: UILabel! - @IBOutlet private weak var toTitleLabel: UILabel! + @IBOutlet private weak var fromTextfield: ValidationTextField! + @IBOutlet private weak var toTextfield: ValidationTextField! + @IBOutlet private weak var mainView: UIView! @IBOutlet private weak var cancelButton: UIButton! @IBOutlet private weak var searchButton: UIButton! + private let impact = UIImpactFeedbackGenerator() + private struct StringConstants { let fromPlaceholderText = "placeholder_from_text".localized() let toPlaceholderText = "placeholder_to_text".localized() @@ -48,7 +49,8 @@ class DatePickerViewController: UIViewController { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) - + impact.impactOccurred() + mainView.popUpBouncy() } // IBActions @@ -68,6 +70,9 @@ class DatePickerViewController: UIViewController { // private functions private func setup() { + + mainView.layer.cornerRadius = 5 + setupToDatePicker() setupFromDatePicker() configureLanguage() @@ -85,12 +90,12 @@ class DatePickerViewController: UIViewController { toDatePicker.date = Date() handleToDatePicker(sender: toDatePicker) searchButton.backgroundColor = .themeRed - cancelButton.setTitleColor(.themeRed, for: .normal) } func configureLanguage() { - fromTitleLabel.text = StringConstants().fromPlaceholderText - toTitleLabel.text = StringConstants().toPlaceholderText + fromTextfield.titleText = "from_text".localized() + toTextfield.titleText = "to_text".localized() + fromTextfield.placeholder = StringConstants().fromPlaceholderText toTextfield.placeholder = StringConstants().toPlaceholderText cancelButton.setTitle(StringConstants().cancelButtonText, for: UIControl.State.normal) @@ -98,9 +103,18 @@ class DatePickerViewController: UIViewController { } private func setupFromDatePicker() { + let dateString:String = "2017-01-01" + + let dateFormatter = DateFormatter() + + dateFormatter.dateFormat = "yyyy-MM-dd" + + let sinceDate = dateFormatter.date(from: dateString) + fromDatePicker.datePickerMode = .date fromTextfield.inputView = fromDatePicker fromDatePicker.maximumDate = Date() + fromDatePicker.minimumDate = sinceDate fromDatePicker.addTarget(self, action: #selector(handleFromDatePicker(sender:)), for: .valueChanged) } diff --git a/GME Remit/Modules/RemittanceModules/TransactionHistoryModules/TransactionHistory/User Interface/View/TransactionHistoryDatePicker.storyboard b/GME Remit/Modules/RemittanceModules/TransactionHistoryModules/TransactionHistory/User Interface/View/TransactionHistoryDatePicker.storyboard index e9088296..e1d177a1 100644 --- a/GME Remit/Modules/RemittanceModules/TransactionHistoryModules/TransactionHistory/User Interface/View/TransactionHistoryDatePicker.storyboard +++ b/GME Remit/Modules/RemittanceModules/TransactionHistoryModules/TransactionHistory/User Interface/View/TransactionHistoryDatePicker.storyboard @@ -1,11 +1,9 @@ - - - - + + - + @@ -16,9 +14,6 @@ SanFranciscoText-Medium - - SanFranciscoText-Regular - @@ -30,64 +25,67 @@ - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + + + + @@ -115,23 +116,17 @@ - - - - - - - - - - - + + + + + @@ -140,22 +135,21 @@ - + - - + + - + - diff --git a/GME Remit/Supported Files/Assets.xcassets/ic_menu_domestic.imageset/Contents.json b/GME Remit/Supported Files/Assets.xcassets/ic_menu_domestic.imageset/Contents.json new file mode 100644 index 00000000..cd545c4e --- /dev/null +++ b/GME Remit/Supported Files/Assets.xcassets/ic_menu_domestic.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_menu_domestic.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GME Remit/Supported Files/Assets.xcassets/ic_menu_domestic.imageset/ic_menu_domestic.png b/GME Remit/Supported Files/Assets.xcassets/ic_menu_domestic.imageset/ic_menu_domestic.png new file mode 100644 index 0000000000000000000000000000000000000000..fe2ed2a5547e38c32bd4877e6e0adc753b53a98b GIT binary patch literal 2403 zcmV-p37qzcP) zcw;cMR!d(7{XC6VuV{s5lcU7X>!+U=E$33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ovPDHLkV1fnYm%{)6 literal 0 HcmV?d00001 diff --git a/GME Remit/Utilities/AppConstants.swift b/GME Remit/Utilities/AppConstants.swift index 4199d21d..d5d68ca0 100644 --- a/GME Remit/Utilities/AppConstants.swift +++ b/GME Remit/Utilities/AppConstants.swift @@ -476,9 +476,8 @@ extension Utility { uzbek.code = "uz" let languages = [ - english, korean, cambodia, srilanka, - thailand, indonesia, mongolia, myanmar, - nepal, bangladesh, russian, uzbek, vietnam + english, bangladesh, cambodia, indonesia, korean, nepal, mongolia, myanmar, russian, srilanka, + thailand, uzbek, vietnam ] return languages }