Merge pull request 'dental routing fixed and laser exception removed' (#82) from laser_appointment into master

Reviewed-on: #82
pull/85/head
Haroon6138 3 weeks ago
commit 5505f549fc

@ -734,7 +734,7 @@ class BookAppointmentsRepoImp implements BookAppointmentsRepo {
body: mapDevice, body: mapDevice,
onFailure: (error, statusCode, {messageStatus, failureType}) { onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType; failure = failureType;
onError!(error); onError?.call(error);
}, },
onSuccess: (response, statusCode, {messageStatus, errorMessage}) { onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try { try {

@ -1009,7 +1009,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
(failure) async => await errorHandlerService.handleError(failure: failure), (failure) async => await errorHandlerService.handleError(failure: failure),
(apiResponse) { (apiResponse) {
if (apiResponse.messageStatus == 2) { if (apiResponse.messageStatus == 2) {
onError!(apiResponse.errorMessage!); onError?.call(apiResponse.errorMessage!);
// dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {});
} else if (apiResponse.messageStatus == 1) { } else if (apiResponse.messageStatus == 1) {
dentalChiefComplaintsList = apiResponse.data!; dentalChiefComplaintsList = apiResponse.data!;

@ -110,7 +110,6 @@ class AppointmentViaRegionViewmodel extends ChangeNotifier {
); );
} }
} }
if (clinicId == 253) { if (clinicId == 253) {
{ {

@ -43,7 +43,9 @@ class BodyPartsListing extends StatelessWidget {
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return SizedBox( height: 80, width: 80,).toShimmer2(isShow: isLoading); return SizedBox( height: 80, width: 80,).toShimmer2(isShow: isLoading);
})), })),
GridView.builder( Visibility(
visible: !isLoading,
child: GridView.builder(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3, crossAxisCount: 3,
childAspectRatio: 85 / 107, childAspectRatio: 85 / 107,
@ -123,6 +125,7 @@ class BodyPartsListing extends StatelessWidget {
); );
}, },
), ),
),
], ],
); );
} }

@ -303,11 +303,9 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
id = regionalViewModel.selectedHospital?.patientDoctorAppointmentList?.first.projectID?.toString() ?? ""; id = regionalViewModel.selectedHospital?.patientDoctorAppointmentList?.first.projectID?.toString() ?? "";
} }
if (bookAppointmentsViewModel.selectedClinic.clinicID == 17) { if (bookAppointmentsViewModel.selectedClinic.clinicID == 17) {
if (appState.isAuthenticated) { if (appState.isAuthenticated) {
initDentalAppointmentBookingFlow(int.parse(bookAppointmentsViewModel initDentalAppointment();
.currentlySelectedHospitalFromRegionFlow ?? return SizedBox.shrink();
"0"));
}else { }else {
bookAppointmentsViewModel.setIsChiefComplaintsListLoading(true); bookAppointmentsViewModel.setIsChiefComplaintsListLoading(true);
} }
@ -464,6 +462,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
isCloseButtonVisible: true, isCloseButtonVisible: true,
); );
} else { } else {
bookAppointmentsViewModel.setIsChiefComplaintsListLoading(true);
Navigator.of(context).push( Navigator.of(context).push(
CustomPageRoute( CustomPageRoute(
page: DentalChiefComplaintsPage(), page: DentalChiefComplaintsPage(),
@ -472,4 +471,12 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
} }
}); });
} }
void initDentalAppointment() async {
await Future.delayed(Duration(milliseconds: 300));
initDentalAppointmentBookingFlow(int.parse(bookAppointmentsViewModel
.currentlySelectedHospitalFromRegionFlow ??
"0"));
return;
}
} }

@ -59,15 +59,14 @@ class DialogServiceImp implements DialogService {
onOkPressed: () { onOkPressed: () {
if (onOkPressed != null) { if (onOkPressed != null) {
onOkPressed(); onOkPressed();
} else {
context.pop();
} }
context.pop(); context.pop();
}, },
onCancelPressed: () { onCancelPressed: () {
if (onCancelPressed != null) { if (onCancelPressed != null) {
context.pop(); onCancelPressed();
} }
context.pop();
}, },
), ),
); );

@ -60,7 +60,7 @@ class CustomButton extends StatelessWidget {
color: isDisabled ? backgroundColor.withOpacity(.5) : backgroundColor, color: isDisabled ? backgroundColor.withOpacity(.5) : backgroundColor,
borderRadius: borderRadius, borderRadius: borderRadius,
customBorder: BorderRadius.circular(borderRadius), customBorder: BorderRadius.circular(borderRadius),
side: borderSide ?? BorderSide(width: borderWidth.h, color: isDisabled ? borderColor.withValues(alpha: 0.5) : borderColor)), side: borderSide ?? BorderSide(width: borderWidth.h, color: isDisabled ? Colors.transparent : borderColor)),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,

Loading…
Cancel
Save