|
|
|
|
@ -65,6 +65,7 @@ class CancelAppointmentReasonSheet extends StatefulWidget {
|
|
|
|
|
|
|
|
|
|
class _CancelAppointmentReasonSheetState extends State<CancelAppointmentReasonSheet> {
|
|
|
|
|
String reason = "";
|
|
|
|
|
String reasonDesc = "";
|
|
|
|
|
List<OfferRequestCommentModel> reasonList = [
|
|
|
|
|
OfferRequestCommentModel(title: LocaleKeys.operationalIssue.tr(), isSelected: true, index: 0),
|
|
|
|
|
OfferRequestCommentModel(title: LocaleKeys.materialIssue.tr(), isSelected: false, index: 1),
|
|
|
|
|
@ -118,7 +119,7 @@ class _CancelAppointmentReasonSheetState extends State<CancelAppointmentReasonSh
|
|
|
|
|
keyboardType: TextInputType.text,
|
|
|
|
|
hint: LocaleKeys.description.tr(),
|
|
|
|
|
onChanged: (v) {
|
|
|
|
|
reason = v;
|
|
|
|
|
reasonDesc = v;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -128,10 +129,16 @@ class _CancelAppointmentReasonSheetState extends State<CancelAppointmentReasonSh
|
|
|
|
|
ShowFillButton(
|
|
|
|
|
title: LocaleKeys.cancel.tr(),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
if (reason.isEmpty && reason == LocaleKeys.otherVar.tr()) {
|
|
|
|
|
if (reasonDesc.isEmpty && reason == LocaleKeys.otherVar.tr()) {
|
|
|
|
|
Utils.showToast(LocaleKeys.pleaseSelectReason.tr());
|
|
|
|
|
} else {
|
|
|
|
|
widget.onCancelClick(reason);
|
|
|
|
|
reasonDesc = "";
|
|
|
|
|
|
|
|
|
|
if (reason == LocaleKeys.otherVar.tr()) {
|
|
|
|
|
widget.onCancelClick(reasonDesc);
|
|
|
|
|
} else {
|
|
|
|
|
widget.onCancelClick(reason);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
maxWidth: double.infinity,
|
|
|
|
|
|