From f7e356976d3ef112705b32771cc0407f3190c3f3 Mon Sep 17 00:00:00 2001 From: yare Date: Wed, 22 Dec 2021 21:00:05 +0545 Subject: [PATCH] Remarks mandatory for Amendment and Cancellation Request --- .../View/MessageComposeViewController.swift | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/GME Remit/Modules/RemittanceModules/TransactionHistoryModules/MessageCompose/User Interface/View/MessageComposeViewController.swift b/GME Remit/Modules/RemittanceModules/TransactionHistoryModules/MessageCompose/User Interface/View/MessageComposeViewController.swift index d3836dd6..b3b9eff3 100644 --- a/GME Remit/Modules/RemittanceModules/TransactionHistoryModules/MessageCompose/User Interface/View/MessageComposeViewController.swift +++ b/GME Remit/Modules/RemittanceModules/TransactionHistoryModules/MessageCompose/User Interface/View/MessageComposeViewController.swift @@ -101,14 +101,18 @@ class MessageComposeViewController: UIViewController { let controlNo = self.controlNO ?? "" let transactionId = self.transactionId ?? "" - if let type = self.type { - switch type { - case .cancel: - self.presenter?.cancel(control: controlNo, transId: transactionId, subject: subject, body: body) - case .edit: - self.presenter?.edit(control: controlNo, transId: transactionId, subject: subject, body: body) + if body.isEmpty || body == "" || body == "Your request here" { + self.alert(message: "Remarks is required") + } else { + if let type = self.type { + switch type { + case .cancel: + self.presenter?.cancel(control: controlNo, transId: transactionId, subject: subject, body: body) + case .edit: + self.presenter?.edit(control: controlNo, transId: transactionId, subject: subject, body: body) + } + } } - } } }