diff --git a/GMERemittance/Module/Register/Application Logic/Interactor/RegisterInteractor.swift b/GMERemittance/Module/Register/Application Logic/Interactor/RegisterInteractor.swift index b3a14546..87090b54 100644 --- a/GMERemittance/Module/Register/Application Logic/Interactor/RegisterInteractor.swift +++ b/GMERemittance/Module/Register/Application Logic/Interactor/RegisterInteractor.swift @@ -99,7 +99,7 @@ class RegisterInteractor { if password.isEmpty { - error = error + "\n Password field is required." + error = error + "\n Password cannot be empty" isValid = false }else { @@ -138,7 +138,7 @@ class RegisterInteractor { }else { isValid = true if ( userName.rangeOfCharacter(from: NSCharacterSet.letters) != nil) { - error = error + "username must be email." + error = error + "please enter a valid email id" isValid = false } } diff --git a/GMERemittance/Module/WalletStatement/User Interface/View/Cell/WalletStatementTableViewCell.swift b/GMERemittance/Module/WalletStatement/User Interface/View/Cell/WalletStatementTableViewCell.swift index 38dd9797..082befb2 100644 --- a/GMERemittance/Module/WalletStatement/User Interface/View/Cell/WalletStatementTableViewCell.swift +++ b/GMERemittance/Module/WalletStatement/User Interface/View/Cell/WalletStatementTableViewCell.swift @@ -10,14 +10,35 @@ import UIKit class WalletStatementTableViewCell: UITableViewCell { - override func awakeFromNib() { - super.awakeFromNib() - // Initialization code + enum WalletInOutType: String { + case walletIn = "WalletIn" + case walletOut = "WalletOut" } + @IBOutlet weak var dateLabel: UILabel! + @IBOutlet weak var particularLabel: UILabel! + @IBOutlet weak var closingAmountLabel: UILabel! + @IBOutlet weak var walletInOutLabel: UILabel! + @IBOutlet weak var walletAmountLabel: UILabel! + var model: WalletStatement? func setup() { + self.dateLabel.text = model?.transactionDate + self.particularLabel.text = model?.particular + self.closingAmountLabel.text = model?.closingAmount + let type: WalletInOutType = (model?.walletOut ?? "") == "₩0" ? .walletIn : .walletOut + self.walletAmountLabel.layer.cornerRadius = 4 + self.walletAmountLabel.clipsToBounds = true + walletAmountLabel.textColor = .white + switch type { + case .walletIn: + self.walletAmountLabel.backgroundColor = AppConstants.themeBlueColor + self.walletAmountLabel.text = "IN: \(model?.walletIn ?? "")200,00,00" + case .walletOut: + self.walletAmountLabel.backgroundColor = AppConstants.themeRedColor + self.walletAmountLabel.text = "OUT: \(model?.walletOut ?? "")" + } } } diff --git a/GMERemittance/Module/WalletStatement/User Interface/View/WalletStatement.storyboard b/GMERemittance/Module/WalletStatement/User Interface/View/WalletStatement.storyboard index 6df75bba..cef6d98d 100644 --- a/GMERemittance/Module/WalletStatement/User Interface/View/WalletStatement.storyboard +++ b/GMERemittance/Module/WalletStatement/User Interface/View/WalletStatement.storyboard @@ -16,9 +16,6 @@ SanFranciscoDisplay-Regular - - SanFranciscoDisplay-Semibold - @@ -35,15 +32,6 @@ - - - - - - - - -