fixed select item and add more than one services in appointment

fatima_dev
Fatimah.Alshammari 11 hours ago
parent 1e22570a1c
commit e65d0ec0f8

@ -44,8 +44,7 @@ class _AddNewServiceAppointmentPageState
final List<SelectedAppointmentServiceModel> appointmentSelectedServices = [];
ServiceVM? serviceVM;
bool isSubmitting = false;
// Keep the existing Custom Service currency dropdown unchanged.
DropValue? selectedCurrency;
final List<DropValue> currencies = [
DropValue(1, 'SAR', 'SAR'),
@ -108,7 +107,6 @@ class _AddNewServiceAppointmentPageState
Map<String, dynamic> postParams;
if (vm.customServiceEnabledStatus) {
// Original Custom Service behavior, intentionally unchanged.
if (!vm.isCustomServiceDetailValidated()) return;
postParams = {
'providerBranchID': widget.appointmentListModel.branchId,
@ -150,9 +148,6 @@ class _AddNewServiceAppointmentPageState
await _updateAppointment(context, widget.appointmentListModel.branchId ?? 0);
if (!mounted) return;
Utils.showToast(LocaleKeys.itemsAddedSuccessfully.tr());
// Return to the previous page after the successful API call.
// Original code popped twice; confirm whether your navigation stack
// still needs a second pop before adding it here.
pop(context);
} else {
Utils.showToast(res.message.toString());

Loading…
Cancel
Save