aamir_dev
Aamir 1 year ago
parent ca563f41cd
commit b25caa56fc

@ -11,7 +11,6 @@ import 'package:mc_common_app/widgets/common_widgets/app_bar.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:easy_localization/easy_localization.dart'; import 'package:easy_localization/easy_localization.dart';
class AppointmentDetailListPage extends StatelessWidget { class AppointmentDetailListPage extends StatelessWidget {
const AppointmentDetailListPage({Key? key}) : super(key: key); const AppointmentDetailListPage({Key? key}) : super(key: key);
@ -19,7 +18,7 @@ class AppointmentDetailListPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
appBar: CustomAppBar( appBar: CustomAppBar(
title:LocaleKeys.appointment_details.tr(), title: LocaleKeys.appointment_details.tr(),
), ),
body: SizedBox( body: SizedBox(
width: double.infinity, width: double.infinity,
@ -55,14 +54,16 @@ class AppointmentDetailListPage extends StatelessWidget {
} }
}), }),
), ),
ShowFillButton( context.read<AppointmentsVM>().isShowMergeButton()
title: LocaleKeys.mergeAppointments.tr(), ? ShowFillButton(
maxWidth: double.infinity, title: LocaleKeys.mergeAppointments.tr(),
margin: const EdgeInsets.all(21), maxWidth: double.infinity,
onPressed: () { margin: const EdgeInsets.all(21),
navigateWithName(context, ProviderAppRoutes.mergeAppointments); onPressed: () {
}, navigateWithName(context, ProviderAppRoutes.mergeAppointments);
), },
)
: SizedBox(),
], ],
)), )),
); );

@ -48,8 +48,11 @@ class _AddSchedulesPageState extends State<AddSchedulesPage> {
// mModel.selectedServicesItems.clear(); // mModel.selectedServicesItems.clear();
scheduleData.scheduleServices?.forEach((element) { scheduleData.scheduleServices?.forEach((element) {
mModel.selectedServicesItems.add(PickerItem(id: element.providerServiceId ?? 0, title: element.serviceDescription ?? "")); print("Services Elements");
print(element);
mModel.selectedServicesItems.add(PickerItem(id: element.serviceProviderServiceId ?? 0, title: element.serviceDescription ?? ""));
}); });
logger.d(mModel.selectedServicesItems.first.id);
mModel.selectedDaysItems.clear(); mModel.selectedDaysItems.clear();
scheduleData.weeklyOffDays?.forEach((element) { scheduleData.weeklyOffDays?.forEach((element) {
for (var daysElement in initDaysList) { for (var daysElement in initDaysList) {
@ -331,6 +334,7 @@ class _AddSchedulesPageState extends State<AddSchedulesPage> {
"serviceGroupDescription": "string" "serviceGroupDescription": "string"
}; };
GenericRespModel servicesResponse = await model.addServicesInSchedule(map1); GenericRespModel servicesResponse = await model.addServicesInSchedule(map1);
Utils.hideLoading(context); Utils.hideLoading(context);
if (servicesResponse.messageStatus == 1) { if (servicesResponse.messageStatus == 1) {
@ -363,7 +367,7 @@ class _AddSchedulesPageState extends State<AddSchedulesPage> {
"fromDate": startDate, "fromDate": startDate,
"toDate": endDate, "toDate": endDate,
"startTime": startTime, "startTime": startTime,
"endTime": endDate, "endTime": endTime,
"slotDurationMinute": slotsTime, "slotDurationMinute": slotsTime,
"perSlotAppointment": appointmentPerSlot, "perSlotAppointment": appointmentPerSlot,
"deliveryServiceType": 1, "deliveryServiceType": 1,

Loading…
Cancel
Save