Showing
1 changed file
with
7 additions
and
4 deletions
... | @@ -3022,7 +3022,7 @@ public class swiftApi { | ... | @@ -3022,7 +3022,7 @@ public class swiftApi { |
3022 | DispatchQueue.main.async { | 3022 | DispatchQueue.main.async { |
3023 | if (sharingData?._status_outer == 1) { | 3023 | if (sharingData?._status_outer == 1) { |
3024 | if (sharingData?._status != nil && sharingData?._status != "" && sharingData?._status == "pending") { | 3024 | if (sharingData?._status != nil && sharingData?._status != "" && sharingData?._status == "pending") { |
3025 | - self.initialSharingDialog(controller, sharingData?._modal_text ?? "", sharingId) | 3025 | + self.initialSharingDialog(controller, "Συγχαρητήρια!", sharingData?._modal_text ?? "", sharingId) |
3026 | 3026 | ||
3027 | } else if (sharingData?._status != nil && sharingData?._status != "" && sharingData?._status == "reject") { | 3027 | } else if (sharingData?._status != nil && sharingData?._status != "" && sharingData?._status == "reject") { |
3028 | self.returnSharingDialog(controller, sharingData?._modal_text ?? "") | 3028 | self.returnSharingDialog(controller, sharingData?._modal_text ?? "") |
... | @@ -3033,6 +3033,9 @@ public class swiftApi { | ... | @@ -3033,6 +3033,9 @@ public class swiftApi { |
3033 | 3033 | ||
3034 | } else if (sharingData?._status_outer == 5) { | 3034 | } else if (sharingData?._status_outer == 5) { |
3035 | self.errorUsedDialog(controller, sharingData?._msg ?? "") | 3035 | self.errorUsedDialog(controller, sharingData?._msg ?? "") |
3036 | + | ||
3037 | + } else if (sharingData?._status_outer == 7) { | ||
3038 | + self.initialSharingDialog(controller, "Επιστροφή δώρου", sharingData?._msg ?? "", sharingId) | ||
3036 | } | 3039 | } |
3037 | } | 3040 | } |
3038 | } else { // status != 1 | 3041 | } else { // status != 1 |
... | @@ -3041,9 +3044,9 @@ public class swiftApi { | ... | @@ -3041,9 +3044,9 @@ public class swiftApi { |
3041 | } | 3044 | } |
3042 | } | 3045 | } |
3043 | 3046 | ||
3044 | - func initialSharingDialog(_ controller: UIViewController, _ alertTitle: String, _ sharingId: String) -> Void { | 3047 | + func initialSharingDialog(_ controller: UIViewController, _ alertHeaderTitle: String, _ alertTitle: String, _ sharingId: String) -> Void { |
3045 | 3048 | ||
3046 | - let alert = UIAlertController(title: "Συγχαρητήρια!", message: alertTitle, preferredStyle: .alert) | 3049 | + let alert = UIAlertController(title: alertHeaderTitle, message: alertTitle, preferredStyle: .alert) |
3047 | 3050 | ||
3048 | let cancelButton = UIAlertAction(title: "Απόρριψη", style: .default, handler: { action in | 3051 | let cancelButton = UIAlertAction(title: "Απόρριψη", style: .default, handler: { action in |
3049 | switch action.style{ | 3052 | switch action.style{ |
... | @@ -4492,7 +4495,7 @@ public class swiftApi { | ... | @@ -4492,7 +4495,7 @@ public class swiftApi { |
4492 | func requestCallback(_ responseData: [AnyHashable: Any]?) -> Void { | 4495 | func requestCallback(_ responseData: [AnyHashable: Any]?) -> Void { |
4493 | 4496 | ||
4494 | if let responseDataDictionary = responseData as? [String: AnyObject] { | 4497 | if let responseDataDictionary = responseData as? [String: AnyObject] { |
4495 | - if ((responseDataDictionary["status"] as? Int == 1) || (responseDataDictionary["status"] as? Int == 4) || (responseDataDictionary["status"] as? Int == 5)) { | 4498 | + if ((responseDataDictionary["status"] as? Int == 1) || (responseDataDictionary["status"] as? Int == 4) || (responseDataDictionary["status"] as? Int == 5) || (responseDataDictionary["status"] as? Int == 7)) { |
4496 | // let responseDataResult = (responseDataDictionary["result"] as? [String: Any] ?? [String: Any]()) | 4499 | // let responseDataResult = (responseDataDictionary["result"] as? [String: Any] ?? [String: Any]()) |
4497 | 4500 | ||
4498 | let tempResponse = SharingResponseModel(dictionary: responseDataDictionary) | 4501 | let tempResponse = SharingResponseModel(dictionary: responseDataDictionary) | ... | ... |
-
Please register or login to post a comment