updates & fixes

merge-requests/215/merge
Haroon Amjad 4 years ago
parent b326b0324e
commit b0ea1fc262

1
.gitignore vendored

@ -42,3 +42,4 @@ app.*.map.json
# Exceptions to above rules. # Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
health_calculators.dart

@ -65,35 +65,5 @@ class _SearchState extends State<Search> with TickerProviderStateMixin {
], ],
), ),
)); ));
// Scaffold(
// appBar: AppBar(
// bottom: TabBar(
// labelColor: Colors.white,
// tabs: [
// Tab(text: TranslationBase.of(context).clinicName),
// Tab(
// text: TranslationBase.of(context).doctorName,
// )
// ],
// controller: _tabController,
// ),
// title: Text(TranslationBase.of(context).bookAppo,
// style: TextStyle(color: Colors.white)),
// leading: Builder(
// builder: (BuildContext context) {
// return ArrowBack();
// },
// ),
// ),
// body: TabBarView(
// physics: NeverScrollableScrollPhysics(),
// children: [
// SearchByClinic(
// clnicIds: widget.clnicIds,
// ),
// SearchByDoctor()
// ],
// controller: _tabController),
// );
} }
} }

@ -33,6 +33,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
List<HospitalsModel> projectsList = []; List<HospitalsModel> projectsList = [];
bool isMobileAppDentalAllow = false; bool isMobileAppDentalAllow = false;
bool isLoaded = false; bool isLoaded = false;
bool isProjectLoaded = false;
@override @override
void initState() { void initState() {
@ -55,6 +56,11 @@ class _SearchByClinicState extends State<SearchByClinic> {
onChanged: (bool value) { onChanged: (bool value) {
setState(() { setState(() {
nearestAppo = value; nearestAppo = value;
print(nearestAppo);
if (nearestAppo)
getProjectsList();
else
isProjectLoaded = false;
}); });
}, },
), ),
@ -120,7 +126,8 @@ class _SearchByClinicState extends State<SearchByClinic> {
}, },
), ),
)), )),
isDentalSelectedAndSupported() == true || nearestAppo isDentalSelectedAndSupported() == true ||
(nearestAppo && isProjectLoaded)
? Container( ? Container(
height: 60.0, height: 60.0,
decoration: BoxDecoration( decoration: BoxDecoration(
@ -177,24 +184,30 @@ class _SearchByClinicState extends State<SearchByClinic> {
}); });
}); });
getProjectsList(); getProjectsList();
GifLoaderDialogUtils.hideDialog(context);
} else {} } else {}
}).catchError((err) { }).catchError((err) {
print(err); print(err);
GifLoaderDialogUtils.hideDialog(context);
}); });
} }
getProjectsList() { getProjectsList() {
ClinicListService service = new ClinicListService(); ClinicListService service = new ClinicListService();
List<HospitalsModel> projectsListLocal = [];
service.getProjectsList(context).then((res) { service.getProjectsList(context).then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
res['ListProject'].forEach((v) { res['ListProject'].forEach((v) {
projectsList.add(new HospitalsModel.fromJson(v)); projectsListLocal.add(new HospitalsModel.fromJson(v));
}); });
projectsList = projectsListLocal;
}); });
GifLoaderDialogUtils.hideDialog(context);
filterClinic(); filterClinic();
} else {} isProjectLoaded = true;
} else {
isProjectLoaded = false;
}
}).catchError((err) { }).catchError((err) {
print(err); print(err);
}); });
@ -235,10 +248,6 @@ class _SearchByClinicState extends State<SearchByClinic> {
doctorsList.clear(); doctorsList.clear();
res['DoctorList'].forEach((v) { res['DoctorList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v)); doctorsList.add(new DoctorList.fromJson(v));
// arr.add(new DoctorList.fromJson(v).projectName);
// arrDistance.add(new DoctorList.fromJson(v)
// .projectDistanceInKiloMeters
// .toString());
}); });
doctorsList.forEach((element) { doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital = List<PatientDoctorAppointmentList> doctorByHospital =
@ -269,8 +278,6 @@ class _SearchByClinicState extends State<SearchByClinic> {
result = LinkedHashSet<String>.from(arr).toList(); result = LinkedHashSet<String>.from(arr).toList();
numAll = result.length; numAll = result.length;
// navigateToSearchResults(
// context, doctorsList, result, numAll, arrDistance);
navigateToSearchResults( navigateToSearchResults(
context, doctorsList, _patientDoctorAppointmentListHospital); context, doctorsList, _patientDoctorAppointmentListHospital);
} else { } else {
@ -299,6 +306,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
List<DoctorList> docList, List<DoctorList> docList,
List<PatientDoctorAppointmentList> List<PatientDoctorAppointmentList>
patientDoctorAppointmentListHospital) async { patientDoctorAppointmentListHospital) async {
isProjectLoaded = false;
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
@ -313,7 +321,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
filterClinic() { filterClinic() {
setState(() { setState(() {
if (widget.clnicIds.length > 0) { if (widget.clnicIds != null && widget.clnicIds.length > 0) {
clinicsList = clinicsList clinicsList = clinicsList
.where((i) => widget.clnicIds.indexOf(i.clinicID) > -1) .where((i) => widget.clnicIds.indexOf(i.clinicID) > -1)
.toList(); .toList();

@ -2,13 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class ArrivedButtons { class ArrivedButtons {
static var buttons = [ var buttons = [
// {
// "title": TranslationBase.of(AppGlobal.context).arrived,
// "subtitle": TranslationBase.of(AppGlobal.context).status,
// "icon": "assets/images/new-design/waiting-room.png",
// "caller": "openReschedule"
// },
{ {
"title": TranslationBase.of(AppGlobal.context).medicines, "title": TranslationBase.of(AppGlobal.context).medicines,
"subtitle": TranslationBase.of(AppGlobal.context).medicinesSubtitle, "subtitle": TranslationBase.of(AppGlobal.context).medicinesSubtitle,

@ -2,7 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class BookedButtons { class BookedButtons {
static var buttons = [ var buttons = [
{ {
"title": TranslationBase.of(AppGlobal.context).confirm, "title": TranslationBase.of(AppGlobal.context).confirm,
"subtitle": TranslationBase.of(AppGlobal.context).appointment, "subtitle": TranslationBase.of(AppGlobal.context).appointment,

@ -2,7 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class BookedButtonsAllowCheckIn { class BookedButtonsAllowCheckIn {
static var buttons = [ var buttons = [
{ {
"title": TranslationBase.of(AppGlobal.context).confirm, "title": TranslationBase.of(AppGlobal.context).confirm,
"subtitle": TranslationBase.of(AppGlobal.context).appointment, "subtitle": TranslationBase.of(AppGlobal.context).appointment,

@ -2,7 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class ConfirmedButtons { class ConfirmedButtons {
static var buttons = [ var buttons = [
{ {
"title": TranslationBase.of(AppGlobal.context).reschedule, "title": TranslationBase.of(AppGlobal.context).reschedule,
"subtitle": TranslationBase.of(AppGlobal.context).appointment, "subtitle": TranslationBase.of(AppGlobal.context).appointment,

@ -2,7 +2,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class ConfirmedButtonsAllowCheckIn { class ConfirmedButtonsAllowCheckIn {
static var buttons = [ var buttons = [
{ {
"title": TranslationBase.of(AppGlobal.context).reschedule, "title": TranslationBase.of(AppGlobal.context).reschedule,
"subtitle": TranslationBase.of(AppGlobal.context).appointment, "subtitle": TranslationBase.of(AppGlobal.context).appointment,

@ -276,14 +276,15 @@ class _AppointmentActionsState extends State<AppointmentActions> {
Future<List<AppoDetailsButton>> _getBookedAppoActionsList() async { Future<List<AppoDetailsButton>> _getBookedAppoActionsList() async {
print("_getBookedAppoActionsList"); print("_getBookedAppoActionsList");
print(BookedButtons.buttons); BookedButtons bookedButtons = new BookedButtons();
print(bookedButtons.buttons);
List<AppoDetailsButton> buttonsList = []; List<AppoDetailsButton> buttonsList = [];
for (var i = 0; i < BookedButtons.buttons.length; i++) { for (var i = 0; i < bookedButtons.buttons.length; i++) {
buttonsList.add(AppoDetailsButton( buttonsList.add(AppoDetailsButton(
title: BookedButtons.buttons[i]['title'], title: bookedButtons.buttons[i]['title'],
subtitle: BookedButtons.buttons[i]['subtitle'], subtitle: bookedButtons.buttons[i]['subtitle'],
icon: BookedButtons.buttons[i]['icon'], icon: bookedButtons.buttons[i]['icon'],
caller: BookedButtons.buttons[i]['caller'], caller: bookedButtons.buttons[i]['caller'],
)); ));
} }
setState(() { setState(() {
@ -293,14 +294,16 @@ class _AppointmentActionsState extends State<AppointmentActions> {
Future<List<AppoDetailsButton>> _getBookedCheckInAppoActionsList() async { Future<List<AppoDetailsButton>> _getBookedCheckInAppoActionsList() async {
print("_getBookedCheckInAppoActionsList"); print("_getBookedCheckInAppoActionsList");
print(BookedButtonsAllowCheckIn.buttons); BookedButtonsAllowCheckIn bookedButtonsAllowCheckIn =
new BookedButtonsAllowCheckIn();
print(bookedButtonsAllowCheckIn.buttons);
List<AppoDetailsButton> buttonsList = []; List<AppoDetailsButton> buttonsList = [];
for (var i = 0; i < BookedButtonsAllowCheckIn.buttons.length; i++) { for (var i = 0; i < bookedButtonsAllowCheckIn.buttons.length; i++) {
buttonsList.add(AppoDetailsButton( buttonsList.add(AppoDetailsButton(
title: BookedButtonsAllowCheckIn.buttons[i]['title'], title: bookedButtonsAllowCheckIn.buttons[i]['title'],
subtitle: BookedButtonsAllowCheckIn.buttons[i]['subtitle'], subtitle: bookedButtonsAllowCheckIn.buttons[i]['subtitle'],
icon: BookedButtonsAllowCheckIn.buttons[i]['icon'], icon: bookedButtonsAllowCheckIn.buttons[i]['icon'],
caller: BookedButtonsAllowCheckIn.buttons[i]['caller'], caller: bookedButtonsAllowCheckIn.buttons[i]['caller'],
)); ));
} }
setState(() { setState(() {
@ -310,14 +313,15 @@ class _AppointmentActionsState extends State<AppointmentActions> {
Future<List<AppoDetailsButton>> _getConfirmedAppoActionsList() async { Future<List<AppoDetailsButton>> _getConfirmedAppoActionsList() async {
print("_getConfirmedAppoActionsList"); print("_getConfirmedAppoActionsList");
print(ConfirmedButtons.buttons); ConfirmedButtons confirmedButtons = new ConfirmedButtons();
print(confirmedButtons.buttons);
List<AppoDetailsButton> buttonsList = []; List<AppoDetailsButton> buttonsList = [];
for (var i = 0; i < ConfirmedButtons.buttons.length; i++) { for (var i = 0; i < confirmedButtons.buttons.length; i++) {
buttonsList.add(AppoDetailsButton( buttonsList.add(AppoDetailsButton(
title: ConfirmedButtons.buttons[i]['title'], title: confirmedButtons.buttons[i]['title'],
subtitle: ConfirmedButtons.buttons[i]['subtitle'], subtitle: confirmedButtons.buttons[i]['subtitle'],
icon: ConfirmedButtons.buttons[i]['icon'], icon: confirmedButtons.buttons[i]['icon'],
caller: ConfirmedButtons.buttons[i]['caller'], caller: confirmedButtons.buttons[i]['caller'],
)); ));
} }
setState(() { setState(() {
@ -327,14 +331,16 @@ class _AppointmentActionsState extends State<AppointmentActions> {
Future<List<AppoDetailsButton>> _getConfirmedCheckInAppoActionsList() async { Future<List<AppoDetailsButton>> _getConfirmedCheckInAppoActionsList() async {
print("_getConfirmedAllowCheckInAppoActionsList"); print("_getConfirmedAllowCheckInAppoActionsList");
print(ConfirmedButtonsAllowCheckIn.buttons); ConfirmedButtonsAllowCheckIn confirmedButtonsAllowCheckIn =
new ConfirmedButtonsAllowCheckIn();
print(confirmedButtonsAllowCheckIn.buttons);
List<AppoDetailsButton> buttonsList = []; List<AppoDetailsButton> buttonsList = [];
for (var i = 0; i < ConfirmedButtonsAllowCheckIn.buttons.length; i++) { for (var i = 0; i < confirmedButtonsAllowCheckIn.buttons.length; i++) {
buttonsList.add(AppoDetailsButton( buttonsList.add(AppoDetailsButton(
title: ConfirmedButtonsAllowCheckIn.buttons[i]['title'], title: confirmedButtonsAllowCheckIn.buttons[i]['title'],
subtitle: ConfirmedButtonsAllowCheckIn.buttons[i]['subtitle'], subtitle: confirmedButtonsAllowCheckIn.buttons[i]['subtitle'],
icon: ConfirmedButtonsAllowCheckIn.buttons[i]['icon'], icon: confirmedButtonsAllowCheckIn.buttons[i]['icon'],
caller: ConfirmedButtonsAllowCheckIn.buttons[i]['caller'], caller: confirmedButtonsAllowCheckIn.buttons[i]['caller'],
)); ));
} }
setState(() { setState(() {
@ -344,14 +350,15 @@ class _AppointmentActionsState extends State<AppointmentActions> {
Future<List<AppoDetailsButton>> _getArrivedAppoActionsList() async { Future<List<AppoDetailsButton>> _getArrivedAppoActionsList() async {
print("_getArrivedAppoActionsList"); print("_getArrivedAppoActionsList");
print(ArrivedButtons.buttons); ArrivedButtons arrivedButtons = new ArrivedButtons();
print(arrivedButtons.buttons);
List<AppoDetailsButton> buttonsList = []; List<AppoDetailsButton> buttonsList = [];
for (var i = 0; i < ArrivedButtons.buttons.length; i++) { for (var i = 0; i < arrivedButtons.buttons.length; i++) {
buttonsList.add(AppoDetailsButton( buttonsList.add(AppoDetailsButton(
title: ArrivedButtons.buttons[i]['title'], title: arrivedButtons.buttons[i]['title'],
subtitle: ArrivedButtons.buttons[i]['subtitle'], subtitle: arrivedButtons.buttons[i]['subtitle'],
icon: ArrivedButtons.buttons[i]['icon'], icon: arrivedButtons.buttons[i]['icon'],
caller: ArrivedButtons.buttons[i]['caller'], caller: arrivedButtons.buttons[i]['caller'],
)); ));
} }
setState(() { setState(() {
@ -361,14 +368,14 @@ class _AppointmentActionsState extends State<AppointmentActions> {
Future<List<AppoDetailsButton>> _getArrivedInvoiceAppoActionsList() async { Future<List<AppoDetailsButton>> _getArrivedInvoiceAppoActionsList() async {
print("_getArrivedInvoiceAppoActionsList"); print("_getArrivedInvoiceAppoActionsList");
print(ArrivedButtons.buttons); ArrivedButtons arrivedButtons = new ArrivedButtons();
List<AppoDetailsButton> buttonsList = []; List<AppoDetailsButton> buttonsList = [];
for (var i = 0; i < ArrivedButtons.buttons.length; i++) { for (var i = 0; i < arrivedButtons.buttons.length; i++) {
buttonsList.add(AppoDetailsButton( buttonsList.add(AppoDetailsButton(
title: ArrivedButtons.buttons[i]['title'], title: arrivedButtons.buttons[i]['title'],
subtitle: ArrivedButtons.buttons[i]['subtitle'], subtitle: arrivedButtons.buttons[i]['subtitle'],
icon: ArrivedButtons.buttons[i]['icon'], icon: arrivedButtons.buttons[i]['icon'],
caller: ArrivedButtons.buttons[i]['caller'], caller: arrivedButtons.buttons[i]['caller'],
)); ));
} }
setState(() { setState(() {
@ -474,7 +481,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report)); prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(report));
}); });
print(prescriptionReportEnhList.length); print(prescriptionReportEnhList.length);
navigateToMedicinePrescriptionReport(prescriptionReportEnhList, res['ListPRM']); navigateToMedicinePrescriptionReport(
prescriptionReportEnhList, res['ListPRM']);
} else { } else {
AppToast.showErrorToast(message: TranslationBase.of(context).noRecords); AppToast.showErrorToast(message: TranslationBase.of(context).noRecords);
} }

@ -146,7 +146,7 @@ dependencies:
google_maps_place_picker: ^1.0.0 google_maps_place_picker: ^1.0.0
#countdown timer for Upcoming List #countdown timer for Upcoming List
flutter_countdown_timer: ^1.4.0 flutter_countdown_timer: ^1.6.0
#Dependencies for video call implementation #Dependencies for video call implementation
native_device_orientation: ^0.3.0 native_device_orientation: ^0.3.0

Loading…
Cancel
Save