Merge branch 'master' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into dashboard
Conflicts: lib/config/localized_values.dart lib/core/service/client/base_app_client.dart lib/models/Appointments/DoctorListResponse.dart lib/pages/BookAppointment/widgets/DoctorView.dart lib/pages/MyAppointments/MyAppointments.dart lib/uitl/translations_delegate_base.dart pubspec.yamlmerge-update-with-lab-changes
commit
68466c8d03
Binary file not shown.
@ -0,0 +1,16 @@
|
||||
-----BEGIN CERTIFICATE REQUEST-----
|
||||
MIICkDCCAXgCAQAwSzEjMCEGCSqGSIb3DQEJARYUaGFyb29uNjEzOEBnbWFpbC5j
|
||||
b20xFzAVBgNVBAMMDk1vaGFtZWQgTWVrYXd5MQswCQYDVQQGEwJBRTCCASIwDQYJ
|
||||
KoZIhvcNAQEBBQADggEPADCCAQoCggEBALcPrk09MmhQhRNe8LYdaeN4mYtoKJg3
|
||||
SndMLgpxnaRqP7a6f4sp118wCFZsTXnwhPVP4DzmXWc2AzZtsusmhdw1tzNFtme0
|
||||
PtEjDXIPI2lHU3Zhi2zukZdAVxF+uNi3pcp0axina60ZQciIfb/7Fx6hNbqpk90E
|
||||
O8a2Ob17Wq/ZTYIP4H7ZGydUe2ra9QyDtjmGj9vpEv+xXYWX685sgEylTG14DSOP
|
||||
ozGsQmaf+QCMbCT3osq7idWc1IQ+3Oed0kUTx1jmRtZwPzQkJJ1Bx3vYSXN/EOlb
|
||||
u+ei1Nqtc14aVCYvmcuvGDtMyRtw6w+syCw2CpJCPGNkxNz+EH9h+EUCAwEAAaAA
|
||||
MA0GCSqGSIb3DQEBCwUAA4IBAQBYdu2AaZY6kReuT1Xp8ktlyPfjBRKhPPChuaeR
|
||||
tFnYMsJtG0aIA/xOu4/RYDgmL92seimULXd9DIPvkJ2DuaB+bdfGTw0qXUlihkm8
|
||||
ui5O0L2F9OZbQxJogvTmrMsKnkoR27O5vyfCn9VMOLk3x1nyEzAXIj/5GHWw9T6t
|
||||
r65jPUOfm6ikiZtICBzSaTPBtyfZB8mrbwG2dpOvVNSa1dj3xip4L8CL6TxH+qM3
|
||||
+N90QFYjvjphJkpn2Kt0ow9IyIyeqJbIYJmsWoV9pXddOHCjKdTWUjq7D2Jn3eUA
|
||||
DAKjKgVqF4/dU10k7EtSfrw01aHLXjj5FxsD5YhVrgTA5xSq
|
||||
-----END CERTIFICATE REQUEST-----
|
||||
Binary file not shown.
@ -0,0 +1,16 @@
|
||||
-----BEGIN CERTIFICATE REQUEST-----
|
||||
MIICkDCCAXgCAQAwSzEjMCEGCSqGSIb3DQEJARYUaGFyb29uNjEzOEBnbWFpbC5j
|
||||
b20xFzAVBgNVBAMMDk1vaGFtZWQgTWVrYXd5MQswCQYDVQQGEwJBRTCCASIwDQYJ
|
||||
KoZIhvcNAQEBBQADggEPADCCAQoCggEBAJnHqsyE7WfiVcE1Lpa4t4OVO6qlll2q
|
||||
1djs0XG06R/dlDtIqv4940/XLj+hU93mzAcVvFW4DSIEdD3InM3+T6oMTjPu6meU
|
||||
69h9ryaVkluQRrT/tdGI1EKO4MWGMe4MDIt7DqMhMfAcxTwekwdxdKaCEhaw3qnA
|
||||
l/64AelY6URW1pHHJMA0VV7j+pE3jVNai+muMXPrhQ1VrOrV8FftpY3bEeRJR2Cl
|
||||
T0tv0LhEMu4SfLnVWCzGQQC82hilDw3rH3ZDs8DFxF9agNVdwKlYamarh1dQXwRq
|
||||
Yx2+sjY1/51r9L4VS+GAh9ECxz0e+43NpzfZ/N+mTeDYKDepaBwPQ6kCAwEAAaAA
|
||||
MA0GCSqGSIb3DQEBCwUAA4IBAQB89OyLfywKT7ftmpEqCmgsmaJexb580q9w8wOk
|
||||
1JhJkNV5ec+p1dnge2NZeJ4LGII/5wmPj1vANNW0GZdmJDgnC+2gg9toq1QLCAsF
|
||||
rW7/LMpgAoEH+P5bhrHV9RRv6BQi0ZmN0apBHjp/pqZfm2Cl5jQPEWjUEf2tIF4l
|
||||
LSKdok6IPO9n4Fgyk0XdUNSEhgVhsLtZkGiXnkI1YovKDnupTFYPXMLp103bc9zP
|
||||
xDxwscvOysNDijlzZAkJPg2z8NrJIRDrKvLRHzxQwZ/1LHVB/51bp/1iyks3vOjh
|
||||
qw5XVsrtGAjCjU9md7q3XkPSyKzhK9UqPdOxdvl1OY0KKIIY
|
||||
-----END CERTIFICATE REQUEST-----
|
||||
Binary file not shown.
Binary file not shown.
@ -0,0 +1,17 @@
|
||||
package io.flutter.plugins.firebasemessaging;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
import com.google.firebase.messaging.RemoteMessage;
|
||||
|
||||
public class CustomFlutterFirebaseMessagingService extends FlutterFirebaseMessagingService {
|
||||
@Override
|
||||
public void onMessageReceived(RemoteMessage remoteMessage) {
|
||||
if (remoteMessage.getData().containsKey("is_call")) {
|
||||
Intent intent = getPackageManager().getLaunchIntentForPackage(getPackageName());
|
||||
startActivity(intent);
|
||||
super.onMessageReceived(remoteMessage);
|
||||
} else
|
||||
super.onMessageReceived(remoteMessage);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package io.flutter.plugins.firebasemessaging;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
import com.google.firebase.messaging.RemoteMessage;
|
||||
|
||||
public class CustomFlutterFirebaseMessagingService extends FlutterFirebaseMessagingService {
|
||||
@Override
|
||||
public void onMessageReceived(RemoteMessage remoteMessage) {
|
||||
if (remoteMessage.getData().containsKey("is_call")) {
|
||||
Intent intent = getPackageManager().getLaunchIntentForPackage(getPackageName());
|
||||
startActivity(intent);
|
||||
super.onMessageReceived(remoteMessage);
|
||||
} else
|
||||
super.onMessageReceived(remoteMessage);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
class DentalChiefComplaintsModel {
|
||||
List<ListDentalChiefComplain> listDentalChiefComplain;
|
||||
|
||||
DentalChiefComplaintsModel({this.listDentalChiefComplain});
|
||||
|
||||
DentalChiefComplaintsModel.fromJson(Map<String, dynamic> json) {
|
||||
if (json['List_DentalChiefComplain'] != null) {
|
||||
listDentalChiefComplain = new List<ListDentalChiefComplain>();
|
||||
json['List_DentalChiefComplain'].forEach((v) {
|
||||
listDentalChiefComplain.add(new ListDentalChiefComplain.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
if (this.listDentalChiefComplain != null) {
|
||||
data['List_DentalChiefComplain'] =
|
||||
this.listDentalChiefComplain.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class ListDentalChiefComplain {
|
||||
int projectID;
|
||||
int iD;
|
||||
String name;
|
||||
String nameN;
|
||||
|
||||
ListDentalChiefComplain({this.projectID, this.iD, this.name, this.nameN});
|
||||
|
||||
ListDentalChiefComplain.fromJson(Map<String, dynamic> json) {
|
||||
projectID = json['ProjectID'];
|
||||
iD = json['ID'];
|
||||
name = json['Name'];
|
||||
nameN = json['NameN'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['ID'] = this.iD;
|
||||
data['Name'] = this.name;
|
||||
data['NameN'] = this.nameN;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
class SearchInfo {
|
||||
int ProjectID;
|
||||
int ClinicID;
|
||||
String DoctorName;
|
||||
String SelectedDate;
|
||||
String SelectedTime;
|
||||
String currentLat;
|
||||
String currentLong;
|
||||
DateTime date;
|
||||
}
|
||||
@ -0,0 +1,82 @@
|
||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||
import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.dart';
|
||||
import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart';
|
||||
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DentalComplaintCard.dart';
|
||||
import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_card.dart';
|
||||
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:smart_progress_bar/smart_progress_bar.dart';
|
||||
|
||||
class DentalComplaints extends StatefulWidget {
|
||||
SearchInfo searchInfo;
|
||||
|
||||
DentalComplaints({@required this.searchInfo});
|
||||
|
||||
@override
|
||||
_DentalComplaintsState createState() => _DentalComplaintsState();
|
||||
}
|
||||
|
||||
class _DentalComplaintsState extends State<DentalComplaints> {
|
||||
List<ListDentalChiefComplain> complaintsList = [];
|
||||
AppSharedPreferences sharedPref = AppSharedPreferences();
|
||||
bool isDataLoaded = false;
|
||||
var languageID;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
WidgetsBinding.instance
|
||||
.addPostFrameCallback((_) => getChiefComplaintsList());
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: "Symptoms",
|
||||
body: Container(
|
||||
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
|
||||
child: ListView.builder(
|
||||
itemCount: complaintsList.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(bottom: 10.0),
|
||||
child: DentalComplaintCard(
|
||||
listDentalChiefComplain: complaintsList[index],
|
||||
languageID: languageID,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
getLanguageID() async {
|
||||
languageID = await sharedPref.getString(APP_LANGUAGE);
|
||||
}
|
||||
|
||||
getChiefComplaintsList() {
|
||||
getLanguageID();
|
||||
ClinicListService service = new ClinicListService();
|
||||
service
|
||||
.getChiefComplaintsList(
|
||||
widget.searchInfo.ClinicID, widget.searchInfo.ProjectID, context)
|
||||
.then((res) {
|
||||
if (res['MessageStatus'] == 1) {
|
||||
print(res['List_DentalChiefComplain']);
|
||||
setState(() {
|
||||
res['List_DentalChiefComplain'].forEach((v) {
|
||||
complaintsList.add(new ListDentalChiefComplain.fromJson(v));
|
||||
});
|
||||
print(complaintsList.length);
|
||||
});
|
||||
} else {}
|
||||
}).catchError((err) {
|
||||
print(err);
|
||||
}).showProgressBar(
|
||||
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,135 @@
|
||||
import 'package:diplomaticquarterapp/models/Appointments/DentalChiefComplaintsModel.dart';
|
||||
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
|
||||
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
|
||||
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:smart_progress_bar/smart_progress_bar.dart';
|
||||
|
||||
// ignore: must_be_immutable
|
||||
class DentalComplaintCard extends StatefulWidget {
|
||||
final ListDentalChiefComplain listDentalChiefComplain;
|
||||
var languageID;
|
||||
|
||||
DentalComplaintCard(
|
||||
{@required this.listDentalChiefComplain, this.languageID});
|
||||
|
||||
@override
|
||||
_DentalComplaintCardState createState() => _DentalComplaintCardState();
|
||||
}
|
||||
|
||||
class _DentalComplaintCardState extends State<DentalComplaintCard> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
getChiefComplaintsList();
|
||||
},
|
||||
child: Card(
|
||||
color: Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.85,
|
||||
padding: EdgeInsets.all(12.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
child: Text(widget.listDentalChiefComplain.name,
|
||||
style:
|
||||
TextStyle(fontSize: 16.0, color: Colors.black)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: <Widget>[
|
||||
Icon(Icons.arrow_forward_ios,
|
||||
size: 20.0, color: Colors.black54),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
getChiefComplaintsList() {
|
||||
List<DoctorList> doctorsList = [];
|
||||
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital =
|
||||
List();
|
||||
|
||||
ClinicListService service = new ClinicListService();
|
||||
service
|
||||
.getChiefComplaintDoctorList(widget.listDentalChiefComplain.iD,
|
||||
widget.listDentalChiefComplain.projectID, context)
|
||||
.then((res) {
|
||||
if (res['MessageStatus'] == 1) {
|
||||
print(res['List_DentalDoctorChiefComplaintMapping']);
|
||||
setState(() {
|
||||
doctorsList.clear();
|
||||
res['List_DentalDoctorChiefComplaintMapping'].forEach((v) {
|
||||
doctorsList.add(new 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.projectName,
|
||||
distanceInKMs:
|
||||
element.projectDistanceInKiloMeters.toString(),
|
||||
patientDoctorAppointment: element));
|
||||
}
|
||||
});
|
||||
navigateToSearchResults(
|
||||
context, doctorsList, _patientDoctorAppointmentListHospital);
|
||||
});
|
||||
} else {
|
||||
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
|
||||
}
|
||||
}).catchError((err) {
|
||||
print(err);
|
||||
}).showProgressBar(
|
||||
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
|
||||
}
|
||||
|
||||
Future navigateToSearchResults(
|
||||
context,
|
||||
List<DoctorList> docList,
|
||||
List<PatientDoctorAppointmentList>
|
||||
patientDoctorAppointmentListHospital) async {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => SearchResults(
|
||||
doctorsList: docList,
|
||||
patientDoctorAppointmentListHospital:
|
||||
patientDoctorAppointmentListHospital)));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:geolocator/geolocator.dart';
|
||||
|
||||
class LocationUtils {
|
||||
AppSharedPreferences sharedPref = new AppSharedPreferences();
|
||||
|
||||
bool isShowConfirmDialog;
|
||||
BuildContext context;
|
||||
|
||||
LocationUtils({@required this.isShowConfirmDialog, @required this.context});
|
||||
|
||||
void getCurrentLocation() async {
|
||||
print("current location");
|
||||
isLocationServiceEnabled().then((value) {
|
||||
if (value) {
|
||||
checkPermission().then((permission) {
|
||||
if (permission == LocationPermission.always ||
|
||||
permission == LocationPermission.whileInUse) {
|
||||
getLastKnownPosition().then((value) => setLocation(value));
|
||||
}
|
||||
|
||||
if (permission == LocationPermission.denied ||
|
||||
permission == LocationPermission.deniedForever) {
|
||||
setZeroLocation();
|
||||
if (isShowConfirmDialog) showErrorLocationDialog(false);
|
||||
}
|
||||
}).catchError((err) {
|
||||
print(err);
|
||||
});
|
||||
} else {
|
||||
if (isShowConfirmDialog) showErrorLocationDialog(false);
|
||||
}
|
||||
}).catchError((err) {
|
||||
print(err);
|
||||
});
|
||||
}
|
||||
|
||||
showErrorLocationDialog(bool isPermissionError) {
|
||||
ConfirmDialog dialog = new ConfirmDialog(
|
||||
context: context,
|
||||
confirmMessage: TranslationBase.of(context).locationDialogMessage,
|
||||
okText: TranslationBase.of(context).confirm,
|
||||
cancelText: TranslationBase.of(context).cancel_nocaps,
|
||||
okFunction: () => {
|
||||
ConfirmDialog.closeAlertDialog(context),
|
||||
if (isPermissionError)
|
||||
openAppSettings()
|
||||
else
|
||||
openLocationSettings()
|
||||
},
|
||||
cancelFunction: () => {});
|
||||
return dialog.showAlertDialog(context);
|
||||
}
|
||||
|
||||
void setLocation(Position position) {
|
||||
print(position);
|
||||
this.sharedPref.setDouble(USER_LAT, position.latitude);
|
||||
this.sharedPref.setDouble(USER_LONG, position.longitude);
|
||||
}
|
||||
|
||||
void setZeroLocation() {
|
||||
this.sharedPref.setDouble(USER_LAT, 0.0);
|
||||
this.sharedPref.setDouble(USER_LONG, 0.0);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue