Merge branch 'diplomatic-quarter-live' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into diplomatic-quarter-haroon

dq_and_master
haroon amjad 4 years ago
commit 051bd1e23f

@ -117,6 +117,8 @@ const GET_BLOOD_REQUEST =
const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo'; const REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo';
const INSERT_REQUEST_FOR_MEDICAL_REPORT = const INSERT_REQUEST_FOR_MEDICAL_REPORT =
'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; 'Services/Doctors.svc/REST/InsertRequestForMedicalReport';
const SEND_MEDICAL_REPORT_EMAIL =
'Services/Notifications.svc/REST/SendMedicalReportEmail';
///Rate ///Rate
const IS_LAST_APPOITMENT_RATED = const IS_LAST_APPOITMENT_RATED =

@ -1154,4 +1154,12 @@ const Map localizedValues = {
"en": "This service allows you to chat with customer service directly without the need to call.", "en": "This service allows you to chat with customer service directly without the need to call.",
"ar": "المحادثة المباشرة: هذه الخدمة تمكنك التحدث كتابياً مع خدمة العملاء مباشرة دون الحاجة الى الاتصال هاتفياً." "ar": "المحادثة المباشرة: هذه الخدمة تمكنك التحدث كتابياً مع خدمة العملاء مباشرة دون الحاجة الى الاتصال هاتفياً."
}, },
"last-appointment": {
"en": "How was your appointment?",
"ar": "كيف كان موعدك الطبي ؟"
},
"rate-clinic": {
"en": "Please rate the clinic",
"ar": "يرجى تقييم العيادة"
},
}; };

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -165,8 +166,10 @@ class BaseAppClient {
await authenticatedUserObject.getUser(); await authenticatedUserObject.getUser();
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin = Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin =
false; false;
var model = Provider.of<ToDoCountProviderModel>(AppGlobal.context);
_vitalSignService.weightKg = ""; _vitalSignService.weightKg = "";
_vitalSignService.heightCm = ""; _vitalSignService.heightCm = "";
model.setState(0, false);
Navigator.of(AppGlobal.context).pushReplacementNamed(HOME); Navigator.of(AppGlobal.context).pushReplacementNamed(HOME);
} }

@ -21,7 +21,11 @@ class PatientSickLeaveService extends BaseService {
} }
sendSickLeaveEmail( sendSickLeaveEmail(
{int requestNo, String projectName, String doctorName, int projectID,String setupID}) async { {int requestNo,
String projectName,
String doctorName,
int projectID,
String setupID}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
@ -33,8 +37,8 @@ class PatientSickLeaveService extends BaseService {
body['PatientName'] = user.firstName + " " + user.firstName; body['PatientName'] = user.firstName + " " + user.firstName;
body['ProjectName'] = projectName; body['ProjectName'] = projectName;
body['DoctorName'] = doctorName; body['DoctorName'] = doctorName;
body['ProjectID'] = 12; body['ProjectID'] = projectID;
body['SetupID'] = 12; body['SetupID'] = setupID;
await baseAppClient await baseAppClient
.post(SendSickLeaveEmail, onSuccess: (response, statusCode) async {}, .post(SendSickLeaveEmail, onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) { onFailure: (String error, int statusCode) {

@ -56,22 +56,18 @@ class ReportsService extends BaseService {
}, body: Map<String, dynamic>()); }, body: Map<String, dynamic>());
} }
Future updatePatientHealthSummaryReport({bool isSummary}) async { Future updatePatientHealthSummaryReport({bool isSummary}) async {
Map<String, dynamic> body = Map<String, dynamic>(); Map<String, dynamic> body = Map<String, dynamic>();
body['RSummaryReport'] = isSummary; body['RSummaryReport'] = isSummary;
hasError = false; hasError = false;
await baseAppClient.post(UPDATE_HEALTH_TERMS, await baseAppClient.post(UPDATE_HEALTH_TERMS,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
}, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: body); }, body: body);
} }
Future insertRequestForMedicalReport( Future insertRequestForMedicalReport(
AppointmentHistory appointmentHistory) async { AppointmentHistory appointmentHistory) async {
Map<String, dynamic> body = new Map<String, dynamic>(); Map<String, dynamic> body = new Map<String, dynamic>();
@ -96,4 +92,41 @@ class ReportsService extends BaseService {
super.error = error; super.error = error;
}, body: body); }, body: body);
} }
Future sendEmailForMedicalReport(
String projectName,
String clinicName,
String doctorName,
String requestDate,
String invoiceNo,
int projectID,
String printID,
String procedureID,
String stamp,
String setupID) async {
Map<String, dynamic> body = new Map<String, dynamic>();
body['SetupID'] = setupID;
body['PrintDate'] = requestDate;
body['ProcedureID'] = "05005009";
body['Reporttype'] = "MEDICAL REPORT";
body['stamp'] = stamp;
body['To'] = user.emailAddress;
body['DateofBirth'] = user.dateofBirth;
body['PatientIditificationNum'] = user.patientIdentificationNo;
body['PatientMobileNumber'] = user.mobileNumber;
body['PatientName'] = user.firstName + " " + user.firstName;
body['ProjectName'] = projectName;
body['ClinicName'] = clinicName;
body['ProjectID'] = projectID;
body['InvoiceNo'] = invoiceNo;
body['PrintedByName'] = user.firstName + " " + user.firstName;
hasError = false;
await baseAppClient.post(SEND_MEDICAL_REPORT_EMAIL,
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
} }

@ -2,11 +2,15 @@ import 'package:flutter/cupertino.dart';
class ToDoCountProviderModel with ChangeNotifier { class ToDoCountProviderModel with ChangeNotifier {
int _count; int _count;
bool _isShowBadge = false;
int get count => _count == null ? 0 : _count; int get count => _count == null ? 0 : _count;
void setState(int count) { bool get isShowBadge => _isShowBadge;
void setState(int count, bool isShowBadge) {
_count = count; _count = count;
_isShowBadge = isShowBadge;
notifyListeners(); notifyListeners();
} }
} }

@ -513,12 +513,12 @@ class _BookConfirmState extends State<BookConfirm> {
} }
getToDoCount() { getToDoCount() {
toDoProvider.setState(0); toDoProvider.setState(0, true);
ClinicListService service = new ClinicListService(); ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) { service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']); print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber']); toDoProvider.setState(res['AppointmentActiveNumber'], true);
} else {} } else {}
}).catchError((err) { }).catchError((err) {
print(err); print(err);

@ -397,12 +397,12 @@ class _AppointmentActionsState extends State<AppointmentActions> {
} }
getToDoCount() { getToDoCount() {
toDoProvider.setState(0); toDoProvider.setState(0, true);
ClinicListService service = new ClinicListService(); ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) { service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']); print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber']); toDoProvider.setState(res['AppointmentActiveNumber'], true);
} else {} } else {}
}).catchError((err) { }).catchError((err) {
print(err); print(err);

@ -4,12 +4,14 @@ import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/QRCode.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/QRCode.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -22,6 +24,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_countdown_timer/current_remaining_time.dart'; import 'package:flutter_countdown_timer/current_remaining_time.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart'; import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
class ToDo extends StatefulWidget { class ToDo extends StatefulWidget {
@ -47,8 +50,11 @@ class _ToDoState extends State<ToDo> {
List<ImagesInfo> imagesInfo = List(); List<ImagesInfo> imagesInfo = List();
ToDoCountProviderModel toDoProvider;
@override @override
void initState() { void initState() {
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
widget.patientShareResponse = new PatientShareResponse(); widget.patientShareResponse = new PatientShareResponse();
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
if (authenticatedUserObject.isLogin) getPatientData(); if (authenticatedUserObject.isLogin) getPatientData();
@ -514,6 +520,19 @@ class _ToDoState extends State<ToDo> {
}); });
} }
getToDoCount() {
toDoProvider.setState(0, true);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true);
} else {}
}).catchError((err) {
print(err);
});
}
getPatientAppointmentHistory() { getPatientAppointmentHistory() {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
@ -529,11 +548,7 @@ class _ToDoState extends State<ToDo> {
}); });
} else {} } else {}
}); });
widget.appoList.forEach((element) { getToDoCount();
print(element.isLiveCareAppointment);
print(element.nextAction);
print(element.remaniningHoursTocanPay);
});
} else { } else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }

@ -751,23 +751,6 @@ class _HomePageState extends State<HomePage> {
Navigator.push(context, Navigator.push(context,
MaterialPageRoute(builder: (context) => CovidDrivethruLocation())); MaterialPageRoute(builder: (context) => CovidDrivethruLocation()));
} }
getToDoCount() {
toDoProvider.setState(0);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
setState(() {
toDoProvider.setState(res['AppointmentActiveNumber']);
});
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
print(err);
});
}
} }
class DashboardItem extends StatelessWidget { class DashboardItem extends StatelessWidget {

@ -4,12 +4,14 @@ import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart'; import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/models/Authentication/send_activation_request.dart'; import 'package:diplomaticquarterapp/models/Authentication/send_activation_request.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -74,6 +76,8 @@ class _ConfirmLogin extends State<ConfirmLogin> {
locator<AppointmentRateViewModel>(); locator<AppointmentRateViewModel>();
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
ToDoCountProviderModel toDoProvider;
@override @override
void initState() { void initState() {
_getAvailableBiometrics(); _getAvailableBiometrics();
@ -84,6 +88,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).confirm, appBarTitle: TranslationBase.of(context).confirm,
isShowAppBar: true, isShowAppBar: true,
@ -568,10 +573,24 @@ class _ConfirmLogin extends State<ConfirmLogin> {
}); });
} }
getToDoCount() {
toDoProvider.setState(0, true);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true);
} else {}
}).catchError((err) {
print(err);
});
}
goToHome() { goToHome() {
authenticatedUserObject.isLogin = true; authenticatedUserObject.isLogin = true;
appointmentRateViewModel.isLogin = true; appointmentRateViewModel.isLogin = true;
projectViewModel.isLogin = true; projectViewModel.isLogin = true;
getToDoCount();
Navigator.of(context).pushNamed(HOME); Navigator.of(context).pushNamed(HOME);
} }

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
@ -11,6 +12,7 @@ import 'package:diplomaticquarterapp/pages/login/login-type.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart'; import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -48,6 +50,7 @@ class _Login extends State<Login> {
locator<AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
ToDoCountProviderModel toDoProvider;
@override @override
void initState() { void initState() {
@ -64,6 +67,7 @@ class _Login extends State<Login> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).login, appBarTitle: TranslationBase.of(context).login,
isShowAppBar: true, isShowAppBar: true,
@ -264,6 +268,7 @@ class _Login extends State<Login> {
} }
else else
{ {
getToDoCount(),
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
context, context,
FadePage( FadePage(
@ -280,6 +285,19 @@ class _Login extends State<Login> {
}); });
} }
getToDoCount() {
toDoProvider.setState(0, true);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true);
} else {}
}).catchError((err) {
print(err);
});
}
// showLoader(bool isTrue) { // showLoader(bool isTrue) {
// setState(() { // setState(() {
// isLoading = isTrue; // isLoading = isTrue;

@ -1,4 +1,8 @@
import 'package:diplomaticquarterapp/core/model/reports/Reports.dart'; import 'package:diplomaticquarterapp/core/model/reports/Reports.dart';
import 'package:diplomaticquarterapp/core/service/medical/reports_service.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -16,7 +20,8 @@ class ReportListWidget extends StatelessWidget {
itemBuilder: (context, index) => Padding( itemBuilder: (context, index) => Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Container( child: Container(
width: double.infinity,margin: EdgeInsets.only(left: 8,right: 8,top: 3), width: double.infinity,
margin: EdgeInsets.only(left: 8, right: 8, top: 3),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
border: Border.all(color: Colors.white, width: 2), border: Border.all(color: Colors.white, width: 2),
@ -40,15 +45,33 @@ class ReportListWidget extends StatelessWidget {
flex: 4, flex: 4,
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
reportList[index].status == 2
? Container(
child: InkWell(
onTap: sendReportEmail(),
child: Icon(
Icons.email,
color: Colors.red,
),
),
)
: Container(),
Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
SizedBox(height: 12,), SizedBox(
height: 12,
),
Texts(reportList[index].projectName), Texts(reportList[index].projectName),
Texts(reportList[index].clinicDescription), Texts(reportList[index].clinicDescription),
Texts('invoice No: ${reportList[index].invoiceNo}'), Texts(TranslationBase.of(context).invoiceNo +
SizedBox(height: 12,), ': ${reportList[index].invoiceNo}'),
SizedBox(height: 12),
],
),
], ],
), ),
), ),
@ -61,4 +84,23 @@ class ReportListWidget extends StatelessWidget {
), ),
); );
} }
sendReportEmail(Reports report) {
ReportsService _reportsService = locator<ReportsService>();
_reportsService
.sendEmailForMedicalReport(
report.projectName,
report.clinicDescription,
report.doctorName,
DateUtil.convertDateToString(report.requestDate),
report.invoiceNo.toString(),
report.projectID,
report.printID,
procedureID,
stamp,
setupID)
.then((value) {})
.catchError(() {});
}
} }

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
@ -72,7 +73,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
height: 25, height: 25,
), ),
Texts( Texts(
'How would you rate your last visit to the Clinic', TranslationBase.of(context).lastAppointment,
bold: true, bold: true,
color: Colors.black, color: Colors.black,
), ),
@ -122,7 +123,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
), ),
Center( Center(
child: Texts( child: Texts(
'Please rate the Clinic', TranslationBase.of(context).rateClinic,
textAlign: TextAlign.center, textAlign: TextAlign.center,
)), )),
SizedBox( SizedBox(
@ -206,7 +207,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
message: 'please rate the clinic'); message: 'please rate the clinic');
} }
}, },
label: "Rate", label: TranslationBase.of(context).submit,
disabled: model.state == ViewState.BusyLocal, disabled: model.state == ViewState.BusyLocal,
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
textColor: Theme.of(context).backgroundColor), textColor: Theme.of(context).backgroundColor),
@ -224,7 +225,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
); );
}, },
child: Texts( child: Texts(
'Later', TranslationBase.of(context).later,
decoration: TextDecoration.underline, decoration: TextDecoration.underline,
color: HexColor('#151DFE'), color: HexColor('#151DFE'),
fontSize: 18, fontSize: 18,

@ -1015,6 +1015,11 @@ class TranslationBase {
String get lastVisit => localizedValues['last-visit'][locale.languageCode]; String get lastVisit => localizedValues['last-visit'][locale.languageCode];
String get tapTitle => localizedValues['tap-title'][locale.languageCode]; String get tapTitle => localizedValues['tap-title'][locale.languageCode];
String get later => localizedValues['later'][locale.languageCode]; String get later => localizedValues['later'][locale.languageCode];
String get lastAppointment => localizedValues['last-appointment'][locale.languageCode];
String get rateClinic => localizedValues['rate-clinic'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -69,7 +69,7 @@ class BottomNavigationItem extends StatelessWidget {
), ),
], ],
) )
: authenticatedUserObject.isLogin : (authenticatedUserObject.isLogin && model.isShowBadge)
? Stack( ? Stack(
alignment: AlignmentDirectional.center, alignment: AlignmentDirectional.center,
children: [ children: [

@ -142,7 +142,7 @@ class DoctorCard extends StatelessWidget {
Icons.email, Icons.email,
color: Colors.red, color: Colors.red,
), ),
) ),
], ],
), ),
), ),

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart'; import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
@ -44,8 +45,11 @@ class _AppDrawerState extends State<AppDrawer> {
locator<AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
VitalSignService _vitalSignService = locator<VitalSignService>(); VitalSignService _vitalSignService = locator<VitalSignService>();
ToDoCountProviderModel toDoProvider;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
projectProvider = Provider.of(context); projectProvider = Provider.of(context);
return SizedBox( return SizedBox(
width: MediaQuery.of(context).size.width * 0.75, width: MediaQuery.of(context).size.width * 0.75,
@ -458,9 +462,12 @@ class _AppDrawerState extends State<AppDrawer> {
_vitalSignService.weightKg = ""; _vitalSignService.weightKg = "";
await sharedPref.clear(); await sharedPref.clear();
this.user = null; this.user = null;
toDoProvider.setState(0, false);
Navigator.of(context).pushNamed(HOME); Navigator.of(context).pushNamed(HOME);
} }
login() async { login() async {
var data = await sharedPref.getObject(IMEI_USER_DATA); var data = await sharedPref.getObject(IMEI_USER_DATA);
sharedPref.remove(REGISTER_DATA_FOR_LOGIIN); sharedPref.remove(REGISTER_DATA_FOR_LOGIIN);

Loading…
Cancel
Save