diff --git a/lib/views/appoinments/add_new_service_appointment_page.dart b/lib/views/appoinments/add_new_service_appointment_page.dart index 1227a7b..02373eb 100644 --- a/lib/views/appoinments/add_new_service_appointment_page.dart +++ b/lib/views/appoinments/add_new_service_appointment_page.dart @@ -333,7 +333,6 @@ class _AddNewServiceAppointmentPageState extends State { Center(child: CircularProgressIndicator()), ], ), - ] else - ...[ - if (appointmentsVM.myFilteredAppointmentsForProvider.isEmpty) - EmptyWidget( - spacerWidget: const SizedBox(height: 25), - text: LocaleKeys.noAppointmentFound.tr(), - ) - else - ...[ - ListView.separated( - itemBuilder: (context, index) { - return GeneralAppointmentWidget( - isNeedToShowItems: true, - appointmentListModel: appointmentsVM.myFilteredAppointmentsForProvider[index], - isNeedTotalPayment: false, - onTap: () { - appointmentsVM.selectedAppointmentIndex = index; - navigateWithName( - context, - AppRoutes.appointmentDetailList, - ); - }, + ] else ...[ + if (appointmentsVM.myFilteredAppointmentsForProvider.isEmpty) + EmptyWidget( + spacerWidget: const SizedBox(height: 25), + text: LocaleKeys.noAppointmentFound.tr(), + ) + else ...[ + ListView.separated( + itemBuilder: (context, index) { + return GeneralAppointmentWidget( + isNeedToShowItems: true, + appointmentListModel: appointmentsVM.myFilteredAppointmentsForProvider[index], + isNeedTotalPayment: false, + onTap: () { + appointmentsVM.selectedAppointmentIndex = index; + navigateWithName( + context, + AppRoutes.appointmentDetailList, ); }, - separatorBuilder: (context, snapchat) => 21.height, - itemCount: appointmentsVM.myFilteredAppointmentsForProvider.length, - physics: const NeverScrollableScrollPhysics(), - shrinkWrap: true, - padding: const EdgeInsets.all(21), - ), - ], + ); + }, + separatorBuilder: (context, snapchat) => 21.height, + itemCount: appointmentsVM.myFilteredAppointmentsForProvider.length, + physics: const NeverScrollableScrollPhysics(), + shrinkWrap: true, + padding: const EdgeInsets.all(21), + ), ], + ], ], ), ), @@ -171,9 +169,9 @@ class _AppointmentPageState extends State { children: [ Expanded( child: LocaleKeys.slotsOverview.tr().toText( - fontSize: 16, - fontWeight: FontWeight.bold, - ), + fontSize: 16, + fontWeight: FontWeight.bold, + ), ), Row( children: [ @@ -195,7 +193,7 @@ class _AppointmentPageState extends State { ), ) .onPress( - () async { + () async { String date = await Utils.pickDateFromDatePicker(context, firstDate: DateTime(2023)); appointmentsVM.selectedDateForAppointments = date; await appointmentsVM.getAppointmentSlotsInfo(branchID: widget.branch.id!); @@ -223,10 +221,10 @@ class _AppointmentPageState extends State { color: Colors.white, ), (appointmentsVM.appointmentSlots?.emptySlots ?? 0).toString().toText( - fontSize: 9, - fontWeight: FontWeight.bold, - color: Colors.white, - ), + fontSize: 9, + fontWeight: FontWeight.bold, + color: Colors.white, + ), ], ).toContainer( backgroundColor: MyColors.darkIconColor, @@ -245,10 +243,10 @@ class _AppointmentPageState extends State { color: Colors.white, ), (appointmentsVM.appointmentSlots?.occupiedSlots ?? 0).toString().toText( - fontSize: 9, - fontWeight: FontWeight.bold, - color: Colors.white, - ), + fontSize: 9, + fontWeight: FontWeight.bold, + color: Colors.white, + ), ], ).toContainer( backgroundColor: MyColors.darkIconColor, @@ -264,13 +262,13 @@ class _AppointmentPageState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ LocaleKeys.totalSlots.tr().toText( - fontSize: 13, - fontWeight: FontWeight.bold, - ), + fontSize: 13, + fontWeight: FontWeight.bold, + ), (appointmentsVM.appointmentSlots?.totalSlots ?? 0).toString().toText( - fontSize: 24, - fontWeight: FontWeight.bold, - ), + fontSize: 24, + fontWeight: FontWeight.bold, + ), ], ), backgroundColor: MyColors.lightGreyEAColor, diff --git a/lib/views/branch_management/services/create_services_page3.dart b/lib/views/branch_management/services/create_services_page3.dart index 9d5427b..4c99e07 100644 --- a/lib/views/branch_management/services/create_services_page3.dart +++ b/lib/views/branch_management/services/create_services_page3.dart @@ -47,7 +47,6 @@ class _CreateServicesPage3State extends State { int? serviceId = -1; DropValue? category; DropValue? service; - bool isEditDisabled = false; bool isServiceActive = false; diff --git a/lib/views/dashboard/widget/general_appointment_widget.dart b/lib/views/dashboard/widget/general_appointment_widget.dart index 9285238..35913c0 100644 --- a/lib/views/dashboard/widget/general_appointment_widget.dart +++ b/lib/views/dashboard/widget/general_appointment_widget.dart @@ -54,7 +54,7 @@ class GeneralAppointmentWidget extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.start, children: [ showServices( - "${appointmentListModel.appointmentServicesList!.first.providerServiceDescription} - ${appointmentListModel.appointmentServicesList!.first.serviceId}", + "${appointmentListModel.appointmentServicesList!.first.providerServiceName} ${appointmentListModel.appointmentServicesList!.first.serviceId != 0 ? '- ${appointmentListModel.appointmentServicesList!.first.serviceId}' : ""}", MyAssets.modificationsIcon, ), if (isNeedToShowItems) ...itemsList, @@ -77,7 +77,9 @@ class GeneralAppointmentWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ showServices( - "${appointmentListModel.appointmentServicesList![index].providerServiceDescription} - ${appointmentListModel.appointmentServicesList![index].serviceId}", MyAssets.modificationsIcon), + "${appointmentListModel.appointmentServicesList![index].providerServiceName} ${appointmentListModel.appointmentServicesList![index].serviceId != 0 ? '- ${appointmentListModel.appointmentServicesList![index].serviceId}' : ""}", + MyAssets.modificationsIcon, + ), if (isNeedToShowItems) ...itemsList, ], ).paddingOnly(bottom: 6); diff --git a/lib/views/dashboard/widget/my_service_provider.dart b/lib/views/dashboard/widget/my_service_provider.dart index e8f5666..73ceb9b 100644 --- a/lib/views/dashboard/widget/my_service_provider.dart +++ b/lib/views/dashboard/widget/my_service_provider.dart @@ -28,9 +28,9 @@ class ServiceProviderWidget extends StatelessWidget { return const Center(child: CircularProgressIndicator()); } else { return serviceVM.branches == null || serviceVM.branches!.data == null - ? Center(child: LocaleKeys.noBranchFound.tr().toText(fontSize: 16, color: MyColors.lightTextColor, fontWeight: MyFonts.Medium)) + ? Center(child: LocaleKeys.noBranchFound.tr().toText(fontSize: 16, color: MyColors.lightTextColor)) : serviceVM.homePageBranches.isEmpty - ? Center(child: LocaleKeys.no_branch.tr().toText(fontSize: 16, color: MyColors.lightTextColor, fontWeight: MyFonts.Medium)) + ? Center(child: LocaleKeys.no_branch.tr().toText(fontSize: 16, color: MyColors.lightTextColor)) : ListView.builder( itemCount: serviceVM.homePageBranches.length, scrollDirection: Axis.horizontal,