|
|
|
|
@ -23,8 +23,11 @@ import 'package:hmg_patient_app_new/presentation/book_appointment/select_livecar
|
|
|
|
|
import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/clinic_card.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/theme/colors.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/input_widget.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
|
|
|
|
|
import 'package:hmg_patient_app_new/widgets/transitions/fade_page.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
@ -216,16 +219,124 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//17 and 235
|
|
|
|
|
void handleDoctorScreen(GetClinicsListResponseModel clinic) {
|
|
|
|
|
void handleDoctorScreen(GetClinicsListResponseModel clinic) async {
|
|
|
|
|
if (widget.isFromRegionFlow) {
|
|
|
|
|
//Dental Clinic Flow
|
|
|
|
|
if (clinic.clinicID == 17) {
|
|
|
|
|
LoaderBottomSheet.showLoader(loadingText: "Checking for an existing dental plan, Please wait...".needTranslation);
|
|
|
|
|
await bookAppointmentsViewModel.getPatientDentalEstimation(projectID: int.parse(bookAppointmentsViewModel.currentlySelectedHospitalFromRegionFlow ?? "0")).then((value) {
|
|
|
|
|
LoaderBottomSheet.hideLoader();
|
|
|
|
|
if (bookAppointmentsViewModel.patientDentalPlanEstimationList.isNotEmpty) {
|
|
|
|
|
showCommonBottomSheetWithoutHeight(
|
|
|
|
|
// title: LocaleKeys.notice.tr(context: context),
|
|
|
|
|
title: "Dental treatment plan".needTranslation,
|
|
|
|
|
context,
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"You have an existing treatment plan: ".needTranslation.toText14(weight: FontWeight.w500),
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
padding: EdgeInsets.all(16.h),
|
|
|
|
|
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
|
|
|
|
|
color: AppColors.whiteColor,
|
|
|
|
|
borderRadius: 20.h,
|
|
|
|
|
hasShadow: true,
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
ListView.separated(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
itemCount: bookAppointmentsViewModel.patientDentalPlanEstimationList.length,
|
|
|
|
|
separatorBuilder: (_, __) {
|
|
|
|
|
return Column(
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
Divider(height: 1, color: AppColors.greyColor),
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
bookAppointmentsViewModel.patientDentalPlanEstimationList[index].procedureName!.toText12(isBold: true),
|
|
|
|
|
AppCustomChipWidget(icon: AppAssets.appointment_time_icon, labelText: "${bookAppointmentsViewModel.totalTimeNeededForDentalProcedure} Mins".needTranslation),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 16.h,
|
|
|
|
|
),
|
|
|
|
|
Divider(height: 1, color: AppColors.greyColor),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8.h,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
"Total time required".needTranslation.toText14(isBold: true),
|
|
|
|
|
AppCustomChipWidget(icon: AppAssets.appointment_time_icon, labelText: "30 Mins".needTranslation),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
"Would you like to continue it?".needTranslation.toText14(weight: FontWeight.w500),
|
|
|
|
|
SizedBox(height: 16.h),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: CustomButton(
|
|
|
|
|
text: LocaleKeys.cancel.tr(),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: AppColors.primaryRedColor,
|
|
|
|
|
borderColor: AppColors.primaryRedColor,
|
|
|
|
|
textColor: AppColors.whiteColor,
|
|
|
|
|
icon: AppAssets.cancel,
|
|
|
|
|
iconColor: AppColors.whiteColor,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: 8.h),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: CustomButton(
|
|
|
|
|
text: LocaleKeys.confirm.tr(),
|
|
|
|
|
onPressed: () async {},
|
|
|
|
|
backgroundColor: AppColors.bgGreenColor,
|
|
|
|
|
borderColor: AppColors.bgGreenColor,
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
icon: AppAssets.confirm,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
callBackFunc: () {},
|
|
|
|
|
isFullScreen: false,
|
|
|
|
|
isCloseButtonVisible: true,
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
// Navigate to Chief Complaint Screen
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
CustomPageRoute(
|
|
|
|
|
page: SelectDoctorPage(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
var bottomSheetType = RegionBottomSheetType.FOR_CLINIIC;
|
|
|
|
|
print("the cliininc id is ${clinic.clinicID}");
|
|
|
|
|
if (clinic.clinicID == 17 || clinic.clinicID == 235) {
|
|
|
|
|
bottomSheetType = RegionBottomSheetType.REGION_FOR_DENTAL_AND_LASER;
|
|
|
|
|
}
|
|
|
|
|
|