Manos Chorianopoulos

added status 7 popup in sharing

......@@ -3022,7 +3022,7 @@ public class swiftApi {
DispatchQueue.main.async {
if (sharingData?._status_outer == 1) {
if (sharingData?._status != nil && sharingData?._status != "" && sharingData?._status == "pending") {
self.initialSharingDialog(controller, sharingData?._modal_text ?? "", sharingId)
self.initialSharingDialog(controller, "Συγχαρητήρια!", sharingData?._modal_text ?? "", sharingId)
} else if (sharingData?._status != nil && sharingData?._status != "" && sharingData?._status == "reject") {
self.returnSharingDialog(controller, sharingData?._modal_text ?? "")
......@@ -3033,6 +3033,9 @@ public class swiftApi {
} else if (sharingData?._status_outer == 5) {
self.errorUsedDialog(controller, sharingData?._msg ?? "")
} else if (sharingData?._status_outer == 7) {
self.initialSharingDialog(controller, "Επιστροφή δώρου", sharingData?._msg ?? "", sharingId)
}
}
} else { // status != 1
......@@ -3041,9 +3044,9 @@ public class swiftApi {
}
}
func initialSharingDialog(_ controller: UIViewController, _ alertTitle: String, _ sharingId: String) -> Void {
func initialSharingDialog(_ controller: UIViewController, _ alertHeaderTitle: String, _ alertTitle: String, _ sharingId: String) -> Void {
let alert = UIAlertController(title: "Συγχαρητήρια!", message: alertTitle, preferredStyle: .alert)
let alert = UIAlertController(title: alertHeaderTitle, message: alertTitle, preferredStyle: .alert)
let cancelButton = UIAlertAction(title: "Απόρριψη", style: .default, handler: { action in
switch action.style{
......@@ -4492,7 +4495,7 @@ public class swiftApi {
func requestCallback(_ responseData: [AnyHashable: Any]?) -> Void {
if let responseDataDictionary = responseData as? [String: AnyObject] {
if ((responseDataDictionary["status"] as? Int == 1) || (responseDataDictionary["status"] as? Int == 4) || (responseDataDictionary["status"] as? Int == 5)) {
if ((responseDataDictionary["status"] as? Int == 1) || (responseDataDictionary["status"] as? Int == 4) || (responseDataDictionary["status"] as? Int == 5) || (responseDataDictionary["status"] as? Int == 7)) {
// let responseDataResult = (responseDataDictionary["result"] as? [String: Any] ?? [String: Any]())
let tempResponse = SharingResponseModel(dictionary: responseDataDictionary)
......