Quick Fixes

aamir_dev
Faiz Hashmi 9 months ago
parent 0ed41736b2
commit 14024def24

@ -333,7 +333,6 @@ class _AddNewServiceAppointmentPageState extends State<AddNewServiceAppointmentP
return;
}
}
try {
Utils.showLoading(context);
GenericRespModel res = await serviceVM!.addNewServiceInAppointment(postParams);

@ -116,38 +116,36 @@ class _AppointmentPageState extends State<AppointmentPage> {
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<AppointmentPage> {
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<AppointmentPage> {
),
)
.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<AppointmentPage> {
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<AppointmentPage> {
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<AppointmentPage> {
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,

@ -47,7 +47,6 @@ class _CreateServicesPage3State extends State<CreateServicesPage3> {
int? serviceId = -1;
DropValue? category;
DropValue? service;
bool isEditDisabled = false;
bool isServiceActive = false;

@ -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);

@ -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,

Loading…
Cancel
Save