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 00000000..fe2ed2a5 Binary files /dev/null and b/GME Remit/Supported Files/Assets.xcassets/ic_menu_domestic.imageset/ic_menu_domestic.png differ 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 }