Merge commit '81b94814ce4f0a1e4626fe07a9b7933246d71336' into dev_v3.13.6

dev_v3.13.6
haroon amjad 1 week ago
commit a6ee6869cc

@ -199,7 +199,7 @@ dependencies {
implementation files('libs/Penguin.aar') implementation files('libs/Penguin.aar')
implementation files('libs/PenguinRenderer.aar') implementation files('libs/PenguinRenderer.aar')
implementation "org.jetbrains.anko:anko-commons:0.10.4" // implementation "org.jetbrains.anko:anko-commons:0.10.4"
implementation 'com.github.kittinunf.fuel:fuel:2.3.0' //for JVM implementation 'com.github.kittinunf.fuel:fuel:2.3.0' //for JVM
implementation 'com.github.kittinunf.fuel:fuel-android:2.3.0' implementation 'com.github.kittinunf.fuel:fuel-android:2.3.0'
implementation 'com.google.android.gms:play-services-location:17.1.0'//for Android implementation 'com.google.android.gms:play-services-location:17.1.0'//for Android

@ -215,6 +215,7 @@ var GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
//URL to get clinic list //URL to get clinic list
var GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized"; var GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized";
var GET_CLINICS_LIST_WRT_HOSPITAL_URL = "Services/Lists.svc/REST/GetClinicFromDoctorSchedule";
//URL to get active appointment list //URL to get active appointment list
var GET_ACTIVE_APPOINTMENTS_LIST_URL = "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber"; var GET_ACTIVE_APPOINTMENTS_LIST_URL = "Services/Doctors.svc/Rest/Dr_GetAppointmentActiveNumber";

@ -45,6 +45,8 @@ const Map localizedValues = {
'name': {'en': 'Name', 'ar': 'الإسم'}, 'name': {'en': 'Name', 'ar': 'الإسم'},
'doctor': {'en': 'Doctor', 'ar': 'الطبيب'}, 'doctor': {'en': 'Doctor', 'ar': 'الطبيب'},
'clinicName': {'en': 'Clinic Name', 'ar': 'اسم العيادة'}, 'clinicName': {'en': 'Clinic Name', 'ar': 'اسم العيادة'},
'hospitalName': {'en': 'Hospital Name', 'ar': 'اسم المستشفى'},
'NoClinicFound': {'en': 'No Clinic Found', 'ar': 'لم يتم العثور على عيادة'},
'doctorName': {'en': 'Doctor Name', 'ar': 'إسم الطبيب'}, 'doctorName': {'en': 'Doctor Name', 'ar': 'إسم الطبيب'},
'nearestAppo': {'en': 'Nearest Appointment', 'ar': 'أقرب موعد'}, 'nearestAppo': {'en': 'Nearest Appointment', 'ar': 'أقرب موعد'},
'searchByDocText': {'en': 'Type the name of the doctor to help you find him', 'ar': 'اكتب اسم الطبيب لمساعدتك في العثور عليه'}, 'searchByDocText': {'en': 'Type the name of the doctor to help you find him', 'ar': 'اكتب اسم الطبيب لمساعدتك في العثور عليه'},

@ -44,6 +44,8 @@ class DoctorList {
List<String>? specialityN; List<String>? specialityN;
dynamic workingHours; dynamic workingHours;
dynamic decimalDoctorRate; dynamic decimalDoctorRate;
String? projectBottomName;
String? projectTopName;
DoctorList( DoctorList(
{this.clinicID, {this.clinicID,
@ -90,7 +92,9 @@ class DoctorList {
this.speciality, this.speciality,
this.specialityN, this.specialityN,
this.workingHours, this.workingHours,
this.decimalDoctorRate}); this.decimalDoctorRate,
this.projectBottomName,
this.projectTopName});
DoctorList.fromJson(Map<String, dynamic> json) { DoctorList.fromJson(Map<String, dynamic> json) {
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
@ -138,6 +142,8 @@ class DoctorList {
if (json.containsKey('SpecialityN') && json['SpecialityN'] != null) specialityN = json['SpecialityN'].cast<String>(); if (json.containsKey('SpecialityN') && json['SpecialityN'] != null) specialityN = json['SpecialityN'].cast<String>();
workingHours = json['WorkingHours']; workingHours = json['WorkingHours'];
decimalDoctorRate = json['DecimalDoctorRate']; decimalDoctorRate = json['DecimalDoctorRate'];
projectBottomName = json['ProjectNameBottom'];
projectTopName = json['ProjectNameTop'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -188,6 +194,10 @@ class DoctorList {
data['DecimalDoctorRate'] = this.decimalDoctorRate; data['DecimalDoctorRate'] = this.decimalDoctorRate;
return data; return data;
} }
String getProjectCompleteName(){
return "${this.projectTopName} ${this.projectBottomName}";
}
} }
class PatientDoctorAppointmentList { class PatientDoctorAppointmentList {

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByClinic.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByClinic.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByDoctor.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/components/SearchByDoctor.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/search_by_hospital_name.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -28,15 +29,20 @@ class _SearchState extends State<Search> with TickerProviderStateMixin {
@override @override
void initState() { void initState() {
_tabController = new TabController(length: 2, vsync: this, initialIndex: widget.type, ); _tabController = new TabController(
length: 3,
vsync: this,
initialIndex: widget.type,
);
super.initState(); super.initState();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
AppGlobal.context = context; AppGlobal.context = context;
// ProjectViewModel projectViewModel = Provider.of(context); // ProjectViewModel projectViewModel = Provider.of(context);
GAnalytics.TREATMENT_TYPE = null; // reset treatment type on start new booking GAnalytics.TREATMENT_TYPE =
null; // reset treatment type on start new booking
return AppScaffold( return AppScaffold(
isShowAppBar: false, isShowAppBar: false,
@ -54,32 +60,58 @@ class _SearchState extends State<Search> with TickerProviderStateMixin {
indicatorSize: TabBarIndicatorSize.tab, indicatorSize: TabBarIndicatorSize.tab,
labelColor: Color(0xff2B353E), labelColor: Color(0xff2B353E),
unselectedLabelColor: Color(0xff575757), unselectedLabelColor: Color(0xff575757),
labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), labelPadding:
EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
labelStyle: TextStyle( labelStyle: TextStyle(
fontFamily: context.read<ProjectViewModel>().isArabic ? 'Cairo' : 'Poppins', fontFamily: context.read<ProjectViewModel>().isArabic
? 'Cairo'
: 'Poppins',
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: -0.48, letterSpacing: -0.48,
), ),
unselectedLabelStyle: TextStyle( unselectedLabelStyle: TextStyle(
fontFamily: context.read<ProjectViewModel>().isArabic ? 'Cairo' : 'Poppins', fontFamily: context.read<ProjectViewModel>().isArabic
? 'Cairo'
: 'Poppins',
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: -0.48, letterSpacing: -0.48,
), ),
tabs: [Text(TranslationBase.of(context).clinicName), Text(TranslationBase.of(context).doctorName)], tabs: [
Text(
TranslationBase.of(context).hospitalName,
style: TextStyle(fontSize: 12),
),
Text(
TranslationBase.of(context).clinicName,
style: TextStyle(fontSize: 12),
),
Text(
TranslationBase.of(context).doctorName,
style: TextStyle(fontSize: 12),
)
],
onTap: (idx) { onTap: (idx) {
if (idx == 0) if (idx == 0)
context.read<ProjectViewModel>().analytics.appointment.book_appointment_by_clinic(); context
.read<ProjectViewModel>()
.analytics
.appointment
.book_appointment_by_clinic();
else else
context.read<ProjectViewModel>().analytics.appointment.book_appointment_by_doctor(); context
.read<ProjectViewModel>()
.analytics
.appointment
.book_appointment_by_doctor();
}, },
), ),
Expanded( Expanded(
child: TabBarView( child: TabBarView(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
children: [ children: [
SearchByHospital(),
SearchByClinic(clnicIds: widget.clnicIds), SearchByClinic(clnicIds: widget.clnicIds),
SearchByDoctor(), SearchByDoctor(),
], ],

@ -656,7 +656,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
} else { } else {
_patientDoctorAppointmentListHospital _patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); .add(PatientDoctorAppointmentList(filterName: element.getProjectCompleteName(), distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
} }
}); });
} else {} } else {}

@ -111,7 +111,7 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element); _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList!.add(element);
} else { } else {
_patientDoctorAppointmentListHospital _patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element)); .add(PatientDoctorAppointmentList(filterName: element.getProjectCompleteName(), distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
} }
}); });
} else { } else {

@ -0,0 +1,536 @@
import 'dart:collection';
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../../config/shared_pref_kay.dart';
import '../../../config/size_config.dart';
import '../../../core/model/hospitals/hospitals_model.dart';
import '../../../core/viewModels/project_view_model.dart';
import '../../../models/Appointments/DoctorListResponse.dart';
import '../../../models/Appointments/SearchInfoModel.dart';
import '../../../models/Clinics/ClinicListResponse.dart';
import '../../../services/appointment_services/GetDoctorsList.dart';
import '../../../services/authentication/auth_provider.dart';
import '../../../services/clinic_services/get_clinic_service.dart';
import '../../../uitl/app_toast.dart';
import '../../../uitl/gif_loader_dialog_utils.dart';
import '../../../uitl/translations_delegate_base.dart';
import '../../../widgets/transitions/fade_page.dart';
import '../../livecare/livecare_home.dart';
import '../DentalComplaints.dart';
import '../LaserBooking.dart';
import '../SearchResults.dart';
import '../dialog/clinic_list_dialog.dart';
import 'LiveCareBookAppointment.dart';
class SearchByHospital extends StatefulWidget {
@override
State<SearchByHospital> createState() => _SearchByHospitalState();
}
class _SearchByHospitalState extends State<SearchByHospital> {
HospitalsModel? selectedHospital;
bool nearestAppo = false;
String? selectedClinicName;
List<HospitalsModel> projectsList = [];
List<ListClinicCentralized>? clinicIds = List.empty();
final GlobalKey projectDropdownKey = GlobalKey();
List<ListClinicCentralized> clinicsList = [];
bool isMobileAppDentalAllow = false;
ListClinicCentralized? selectedClinic;
String? dropdownValue;
String dropdownTitle = "";
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) => getProjectsList());
}
@override
Widget build(BuildContext context) {
AppGlobal.context = context;
return Column(
children: [
Padding(
padding: const EdgeInsets.only(left: 6, right: 6, top: 16),
child: Row(
children: <Widget>[
Checkbox(
activeColor: CustomColors.accentColor,
value: nearestAppo,
onChanged: (bool? value) {
nearestAppo = value ?? false;
setState(() {});
},
),
AutoSizeText(
TranslationBase.of(context).nearestAppo.trim(),
maxLines: 1,
minFontSize: 10,
style: TextStyle(
fontSize: SizeConfig.textMultiplier! * 1.4,
fontWeight: FontWeight.w600,
letterSpacing: -0.39,
height: 0.8,
),
),
// Text(TranslationBase.of(context).nearestAppo, style: TextStyle(fontSize: 14.0, letterSpacing: -0.56)),
],
),
),
mHeight(8),
Container(
width: double.infinity,
decoration: containerRadius(Colors.white, 12),
margin: EdgeInsets.only(left: 20, right: 20),
padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12),
child: Row(
children: [
Flexible(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).selectHospital,
style: TextStyle(
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
),
Container(
height: 18,
width: double.infinity,
child: DropdownButtonHideUnderline(
child: DropdownButton<HospitalsModel>(
hint: Text(
TranslationBase.of(context).selectHospital),
value: selectedHospital,
iconSize: 0,
isExpanded: true,
style: TextStyle(
fontSize: 14,
letterSpacing: -0.56,
color: Colors.black),
items: projectsList.map((HospitalsModel item) {
return DropdownMenuItem<HospitalsModel>(
value: item,
child: AutoSizeText(
item.name!,
maxLines: 1,
minFontSize: 10,
style: TextStyle(
fontSize: SizeConfig.textMultiplier! * 1.6,
fontWeight: FontWeight.w600,
letterSpacing: -0.39,
height: 0.8,
),
),
// Text('${item.name!}'),
);
}).toList(),
onChanged: (HospitalsModel? newValue) {
getClinicWrtHospital(newValue);
setState(() {
selectedHospital = newValue;
});
},
),
),
),
],
),
),
Icon(Icons.keyboard_arrow_down),
],
)),
if (clinicIds?.isNotEmpty == true) ...[
mHeight(8),
InkWell(
onTap: () {
showClickListDialog(context, clinicIds ?? List.empty(),
onSelection: (ListClinicCentralized clincs) {
selectedClinic = clincs;
Navigator.pop(context);
setState(() {
dropdownTitle = clincs.clinicDescription!;
dropdownValue = clincs.clinicID.toString() +
"-" +
clincs.isLiveCareClinicAndOnline.toString() +
"-" +
clincs.liveCareClinicID.toString() +
"-" +
clincs.liveCareServiceID.toString();
});
getDoctorsList(context);
context
.read<ProjectViewModel>()
.analytics
.appointment
.book_appointment_select_clinic(
appointment_type: 'regular',
clinic: clincs.clinicDescription);
});
},
child: Container(
width: double.infinity,
decoration: containerRadius(Colors.white, 12),
margin: EdgeInsets.only(left: 20, right: 20),
padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 8),
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).selectClinic,
style: TextStyle(
fontSize: 11,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
),
Padding(
padding: const EdgeInsets.only(top: 4, bottom: 2),
child: Text(
dropdownTitle,
style: TextStyle(
fontSize: 13,
letterSpacing: -0.44,
fontWeight: FontWeight.w600,
),
),
),
],
),
),
Icon(Icons.keyboard_arrow_down),
],
),
),
)
]
],
);
}
void openDropdown(GlobalKey key) {
GestureDetector? detector;
detector = searchForGestureDetector(key.currentContext!);
assert(detector != null);
detector!.onTap!();
}
GestureDetector? searchForGestureDetector(BuildContext element) {
GestureDetector? detector;
element.visitChildElements((element) {
if (element.widget != null && element.widget is GestureDetector) {
detector = element.widget as GestureDetector?;
//return false;
} else {
searchForGestureDetector(element);
}
});
return detector;
}
getProjectsList() {
GifLoaderDialogUtils.showMyDialog(context);
int languageID = context.read<ProjectViewModel>().isArabic ? 1 : 2;
ClinicListService service = new ClinicListService();
List<HospitalsModel> projectsListLocal = [];
service.getProjectsList(languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
res['ListProject'].forEach((v) {
projectsListLocal.add(new HospitalsModel.fromJson(v));
});
projectsList = projectsListLocal;
});
} else {}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
void getClinicWrtHospital(HospitalsModel? newValue) async {
GifLoaderDialogUtils.showMyDialog(context);
ClinicListService service = new ClinicListService();
List<HospitalsModel> projectsListLocal = [];
setState(() {
clinicIds = List.empty();
});
List<ListClinicCentralized> clinicId = [];
try {
Map res = await service.getClinicByHospital(
projectID: newValue?.mainProjectID.toString() ?? "");
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
List list = res['ListClinic'];
if (list.isEmpty) {
AppToast.showErrorToast(
message: TranslationBase.of(context).NoClinicFound,
);
}
res['ListClinic'].forEach((v) {
clinicId.add(ListClinicCentralized.fromJson(v));
});
clinicIds = clinicId;
setState(() {});
} else {
AppToast.showErrorToast(
message: TranslationBase.of(context).NoClinicFound,
);
}
} catch (e) {
print("the error is $e");
AppToast.showErrorToast(
message: TranslationBase.of(context).NoClinicFound,
);
GifLoaderDialogUtils.hideDialog(context);
}
// .then((res) {
// print("the result is obtained");
// GifLoaderDialogUtils.hideDialog(context);
// if (res['MessageStatus'] == 1) {
// List list = res['ListClinic'];
//
// if(list.isEmpty){
// AppToast.showErrorToast(message:
// TranslationBase.of(context).NoClinicFound,
// );
//
// }
// res['ListClinic'].forEach((v) {
// clinicId?.add(ListClinicCentralized.fromJson(v));
// });
// clinicIds = clinicId;
// setState(() {
//
// });
// } else {
// AppToast.showErrorToast(message:
// TranslationBase.of(context).NoClinicFound,
// );
// }
// }).catchError((err) {
// print('the error is $err');
// AppToast.showErrorToast(message:
// TranslationBase.of(context).NoClinicFound,
// );
// GifLoaderDialogUtils.hideDialog(context);
// }).catchError((err) {
// AppToast.showErrorToast(message:
// TranslationBase.of(context).NoClinicFound,
// );
// GifLoaderDialogUtils.hideDialog(context);
//
// print(err);
// });
}
@override
void dispose() {
super.dispose();
}
Future navigateToDentalComplaints(
BuildContext context, SearchInfo searchInfo) async {
Navigator.push(
context,
FadePage(
page: DentalComplaints(searchInfo: searchInfo),
),
).then((value) {
setState(() {
dropdownValue = null;
selectedHospital = null;
clinicIds = List.empty();
});
});
}
callDoctorsSearchAPI(int clinicID) {
int languageID = context.read<ProjectViewModel>().isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context);
List<DoctorList> doctorsList = [];
List<String> arr = [];
List<String> arrDistance = [];
List<String> result;
int numAll;
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
[];
DoctorsListService service = new DoctorsListService();
service
.getDoctorsList(
clinicID,
selectedHospital?.mainProjectID.toString() != ""
? int.parse(selectedHospital?.mainProjectID.toString() ?? "-1")
: 0,
nearestAppo,
languageID,
null)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
if (res['DoctorList'].length != 0) {
doctorsList.clear();
res['DoctorList'].forEach((v) {
doctorsList.add(DoctorList.fromJson(v));
});
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital =
_patientDoctorAppointmentListHospital
.where(
(elementClinic) =>
elementClinic.filterName == element.projectName,
)
.toList();
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[
_patientDoctorAppointmentListHospital
.indexOf(doctorByHospital[0])]
.patientDoctorAppointmentList!
.add(element);
} else {
_patientDoctorAppointmentListHospital.add(
PatientDoctorAppointmentList(
filterName: element.getProjectCompleteName(),
distanceInKMs:
element.projectDistanceInKiloMeters.toString(),
patientDoctorAppointment: element));
}
});
} else {}
});
result = LinkedHashSet<String>.from(arr).toList();
numAll = result.length;
navigateToSearchResults(
context, doctorsList, _patientDoctorAppointmentListHospital);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
AppToast.showErrorToast(message: err, localContext: context);
});
}
Future navigateToSearchResults(
context,
List<DoctorList> docList,
List<PatientDoctorAppointmentList>
patientDoctorAppointmentListHospital) async {
Navigator.push(
context,
FadePage(
page: SearchResults(
isLiveCareAppointment: false,
doctorsList: docList,
patientDoctorAppointmentListHospital:
patientDoctorAppointmentListHospital)))
.then((value) {
print("navigation return ");
dropdownValue = null;
dropdownTitle = "";
selectedHospital = null;
clinicIds = List.empty();
setState(() {});
// getProjectsList();
});
}
Future navigateToLaserClinic(BuildContext context) async {
Navigator.push(
context,
FadePage(
page: LaserBooking(),
),
).then((value) {
print("LaserBooking navigation return ");
setState(() {
dropdownValue = null;
selectedHospital = null;
clinicIds = List.empty();
});
});
}
getDoctorsList(BuildContext context) {
SearchInfo searchInfo = new SearchInfo();
if (dropdownValue != null) if (dropdownValue!.split("-")[0] == "17") {
searchInfo.ProjectID = int.parse(selectedHospital?.mainProjectID ?? "");
searchInfo.ClinicID = int.parse(dropdownValue!.split("-")[0]);
searchInfo.hospital = selectedHospital;
searchInfo.clinic = selectedClinic;
searchInfo.date = DateTime.now();
if (context.read<ProjectViewModel>().isLogin) {
if (context.read<ProjectViewModel>().user.age! > 12) {
navigateToDentalComplaints(context, searchInfo);
} else {
callDoctorsSearchAPI(17);
}
} else {
navigateToDentalComplaints(context, searchInfo);
}
} else if (dropdownValue!.split("-")[0] == "253") {
navigateToLaserClinic(context);
// callDoctorsSearchAPI();
} else if (dropdownValue!.split("-")[1] == "true"
// && authProvider.isLogin &&
// authUser.patientType == 1
) {
Navigator.push(
context,
FadePage(
page: LiveCareBookAppointment(
clinicName: dropdownTitle,
liveCareClinicID: dropdownValue!.split("-")[2],
liveCareServiceID: dropdownValue!.split("-")[3]),
),
).then((value) {
print("navigation return ");
if (value == "false") dropdownValue = null;
// setState(() {
// });
if (value == "livecare") {
Navigator.push(context, FadePage(page: LiveCareHome()));
}
if (value == "schedule") {
callDoctorsSearchAPI(int.parse(dropdownValue!.split("-")[0]));
}
});
setState(() {});
} else {
callDoctorsSearchAPI(int.parse(dropdownValue!.split("-")[0]));
}
}
}

@ -115,7 +115,7 @@ class _ClickListDialogState extends State<ClickListDialog> {
), ),
), ),
), ),
tempClinicsList[index].isLiveCareClinicAndOnline! tempClinicsList[index].isLiveCareClinicAndOnline == true
? SvgPicture.asset( ? SvgPicture.asset(
'assets/images/new-design/video_icon_green_right.svg', 'assets/images/new-design/video_icon_green_right.svg',
height: 12, height: 12,

@ -34,7 +34,7 @@ class DoctorsListService extends BaseService {
String? tokenID; String? tokenID;
List<LaserBodyPart> selectedBodyPartList = []; List<LaserBodyPart> selectedBodyPartList = [];
Future<Map> getDoctorsList(int clinicID, int projectID, bool isNearest, int languageID, BuildContext context, {doctorId, doctorName, isContinueDentalPlan = false}) async { Future<Map> getDoctorsList(int clinicID, int projectID, bool isNearest, int languageID, BuildContext? context, {doctorId, doctorName, isContinueDentalPlan = false}) async {
Map<String, dynamic> request; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {

@ -34,6 +34,19 @@ class ClinicListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getClinicByHospital({required String projectID}) async {
Map<String, dynamic> request = {"ProjectID": projectID};
dynamic localRes;
await baseAppClient.post(GET_CLINICS_LIST_WRT_HOSPITAL_URL, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> getActiveAppointmentNo(context) async { Future<Map> getActiveAppointmentNo(context) async {
Map<String, dynamic> request = {}; Map<String, dynamic> request = {};

@ -59,7 +59,10 @@ class TranslationBase {
String get clinicName => localizedValues['clinicName'][locale.languageCode]; String get clinicName => localizedValues['clinicName'][locale.languageCode];
String get hospitalName => localizedValues['hospitalName'][locale.languageCode];
String get doctorName => localizedValues['doctorName'][locale.languageCode]; String get doctorName => localizedValues['doctorName'][locale.languageCode];
String get NoClinicFound => localizedValues['NoClinicFound'][locale.languageCode];
String get nearestAppo => localizedValues['nearestAppo'][locale.languageCode]; String get nearestAppo => localizedValues['nearestAppo'][locale.languageCode];

Loading…
Cancel
Save