Last active
November 29, 2017 09:54
-
-
Save amannayak0007/322a4a96c2c2f8adb40d780e30a0d3e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func retrieveTransactionMessage() -> [Any] { | |
var transactionMessage = [AnyHashable]() | |
for filter: JRFilter in filters { | |
if (filter.title == "Filter By Status") { | |
for fv: JRFilterValue in filter.values { | |
if fv.selected { | |
if (fv.name.lowercased() == "successful") { | |
transactionMessage.append("SUCCESS") | |
}else if (fv.name.lowercased() == "failed") { | |
transactionMessage.append("FAILURE")} | |
else if (fv.name.lowercased() == "pending") { | |
transactionMessage.append("PENDING")} | |
} | |
} | |
} | |
} | |
return transactionMessage as! [Any] | |
} | |
func retrieveStringForSearch() -> String { | |
var filterString: String | |
for filter: JRFilter in filters { | |
if !(filter.title == "Filter By Status") { | |
for fv: JRFilterValue in filter.values { | |
if fv.selected { | |
if retrieveTransactionType(forFilterString: fv.name) == eNone { | |
filterString = (filterString.count ?? 0) ? filterString + (",\(fv.name)") : fv.name | |
} | |
} | |
} | |
} | |
else { | |
} | |
} | |
return filterString | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment