updates & fixes

merge-requests/390/head
haroon amjad 3 years ago
parent 45272d251c
commit 9ffe064a3b

@ -163,13 +163,11 @@ const SEND_MEDICAL_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendMedicalRe
///Rate ///Rate
const IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated'; const IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated';
const GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo'; const GET_APPOINTMENT_DETAILS_BY_NO = 'Services/MobileNotifications.svc/REST/GetAppointmentDetailsByApptNo';
const NEW_RATE_APPOINTMENT_URL = "Services/Doctors.svc/REST/AppointmentsRating_InsertAppointmentRate";
const NEW_RATE_DOCTOR_URL = "Services/Doctors.svc/REST/DoctorsRating_InsertDoctorRate";
const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID'; const GET_QR_PARKING = 'Services/SWP.svc/REST/GetQRParkingByID';
//const BASE_URL = 'https://hmgwebservices.com/'; // Production Environment
//const BASE_URL = 'https://hmgwebservices.com/Services'; // Production Environment
//const BASE_URL = 'https://uat.hmgwebservices.com/Services'; // UAT Environment
//URL to get clinic list //URL to get clinic list
const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized"; const GET_CLINICS_LIST_URL = "Services/lists.svc/REST/GetClinicCentralized";

@ -303,11 +303,11 @@ const Map localizedValues = {
"gate": {"en": "Gate:", "ar": "بوابة"}, "gate": {"en": "Gate:", "ar": "بوابة"},
"building": {"en": "Building:", "ar": "المبنى"}, "building": {"en": "Building:", "ar": "المبنى"},
"branch": {"en": "Branch:", "ar": "الفرع"}, "branch": {"en": "Branch:", "ar": "الفرع"},
"emergencyServices": {"en": "Emergency Services:", "ar": "خدمات الطوارئ"}, "emergencyServices": {"en": "Emergency Services", "ar": "خدمات الطوارئ"},
"nearester": {"en": "Nearest ER:", "ar": "أقرب طوارى"}, "nearester": {"en": "Nearest ER", "ar": "أقرب طوارى"},
"locationa": {"en": "location:", "ar": "الموقع"}, "locationa": {"en": "location", "ar": "الموقع"},
"ambulancerequest": {"en": "Ambulance :", "ar": "طلب نقل "}, "ambulancerequest": {"en": "Ambulance", "ar": "طلب نقل "},
"requestA": {"en": "Request:", "ar": "اسعاف"}, "requestA": {"en": "Request", "ar": "اسعاف"},
"MyAppointments": {"en": "My", "ar": "مواعيدي"}, "MyAppointments": {"en": "My", "ar": "مواعيدي"},
"NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"}, "NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"},
"NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"}, "NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"},

@ -1,7 +1,7 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/rate/appointment_details.dart';
import 'package:diplomaticquarterapp/core/model/rate/appointment_rate.dart'; import 'package:diplomaticquarterapp/core/model/rate/appointment_rate.dart';
import 'package:diplomaticquarterapp/core/model/rate/appoitment_rated.dart'; import 'package:diplomaticquarterapp/core/model/rate/appoitment_rated.dart';
import 'package:diplomaticquarterapp/core/model/rate/appointment_details.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
class AppointmentRateService extends BaseService { class AppointmentRateService extends BaseService {
@ -10,8 +10,7 @@ class AppointmentRateService extends BaseService {
Future getIsLastAppointmentRatedList() async { Future getIsLastAppointmentRatedList() async {
hasError = false; hasError = false;
await baseAppClient.post(IS_LAST_APPOITMENT_RATED, await baseAppClient.post(IS_LAST_APPOITMENT_RATED, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
appointmentRatedList.clear(); appointmentRatedList.clear();
response['IsLastAppoitmentRatedList'].forEach((appoint) { response['IsLastAppoitmentRatedList'].forEach((appoint) {
appointmentRatedList.add(AppoitmentRated.fromJson(appoint)); appointmentRatedList.add(AppoitmentRated.fromJson(appoint));
@ -27,19 +26,15 @@ class AppointmentRateService extends BaseService {
Map<String, dynamic> bodyData = Map(); Map<String, dynamic> bodyData = Map();
bodyData['AppointmentNumber'] = appointmentRatedList[0].appointmentNo; bodyData['AppointmentNumber'] = appointmentRatedList[0].appointmentNo;
bodyData['ProjectID'] = appointmentRatedList[0].projectID; bodyData['ProjectID'] = appointmentRatedList[0].projectID;
await baseAppClient.post(GET_APPOINTMENT_DETAILS_BY_NO, await baseAppClient.post(GET_APPOINTMENT_DETAILS_BY_NO, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { if (response['AppointmentDetails'] != null) appointmentDetails = AppointmentDetails.fromJson(response['AppointmentDetails']);
if (response['AppointmentDetails'] != null)
appointmentDetails =
AppointmentDetails.fromJson(response['AppointmentDetails']);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: bodyData); }, body: bodyData);
} }
Future sendAppointmentRate(int rate, int appointmentNo, int projectID, Future sendAppointmentRate(int rate, int appointmentNo, int projectID, int doctorID, int clinicID, String note) async {
int doctorID, int clinicID, String note) async {
hasError = false; hasError = false;
AppointmentRate appointmentRate = AppointmentRate(); AppointmentRate appointmentRate = AppointmentRate();
appointmentRate.rate = rate; appointmentRate.rate = rate;
@ -51,17 +46,42 @@ class AppointmentRateService extends BaseService {
appointmentRate.createdBy = 2; appointmentRate.createdBy = 2;
appointmentRate.editedBy = 2; appointmentRate.editedBy = 2;
await baseAppClient.post(NEW_RATE_APPOINTMENT_URL, await baseAppClient.post(NEW_RATE_APPOINTMENT_URL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: appointmentRate.toJson()); }, body: appointmentRate.toJson());
} }
Future sendDoctorRate(int rate, int appointmentNo, int projectID, int doctorID, int clinicID, String note, String appoDate, String docName, String projectName, String clinicName) async {
Map<String, dynamic> request;
hasError = false;
request = {
"DoctorID": doctorID,
"Rate": rate,
"ClinicID": clinicID,
"ProjectID": projectID,
"AppointmentNo": appointmentNo,
"Note": note,
"MobileNumber": authenticatedUserObject.user.mobileNumber,
"AppointmentDate": appoDate,
"DoctorName": docName,
"ProjectName": projectName,
"COCTypeName": 1,
"PatientName": authenticatedUserObject.user.firstName + " " + authenticatedUserObject.user.lastName,
"PatientOutSA": authenticatedUserObject.user.outSA,
"PatientTypeID": authenticatedUserObject.user.patientType,
"ClinicName": clinicName,
"PatientIdentificationID": authenticatedUserObject.user.patientIdentificationNo
};
await baseAppClient.post(NEW_RATE_DOCTOR_URL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: request);
}
AppoitmentRated get lastAppointmentRated { AppoitmentRated get lastAppointmentRated {
if (appointmentRatedList.length > 0) if (appointmentRatedList.length > 0) return appointmentRatedList[appointmentRatedList.length - 1];
return appointmentRatedList[appointmentRatedList.length - 1];
return null; return null;
} }

@ -3,16 +3,15 @@ import 'package:diplomaticquarterapp/core/model/rate/appointment_details.dart';
import 'package:diplomaticquarterapp/core/model/rate/appoitment_rated.dart'; import 'package:diplomaticquarterapp/core/model/rate/appoitment_rated.dart';
import 'package:diplomaticquarterapp/core/service/appointment_rate_service.dart'; import 'package:diplomaticquarterapp/core/service/appointment_rate_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import '../../locator.dart'; import '../../locator.dart';
class AppointmentRateViewModel extends BaseViewModel { class AppointmentRateViewModel extends BaseViewModel {
AppointmentRateService _appointmentRateService = AppointmentRateService _appointmentRateService = locator<AppointmentRateService>();
locator<AppointmentRateService>();
bool isHaveAppointmentNotRate = false; bool isHaveAppointmentNotRate = false;
AppointmentDetails get appointmentDetails => _appointmentRateService.appointmentDetails; AppointmentDetails get appointmentDetails => _appointmentRateService.appointmentDetails;
Future getIsLastAppointmentRatedList() async { Future getIsLastAppointmentRatedList() async {
isHaveAppointmentNotRate = false; isHaveAppointmentNotRate = false;
setState(ViewState.Busy); setState(ViewState.Busy);
@ -21,8 +20,7 @@ class AppointmentRateViewModel extends BaseViewModel {
error = _appointmentRateService.error; error = _appointmentRateService.error;
setState(ViewState.Error); setState(ViewState.Error);
} else { } else {
if(_appointmentRateService.appointmentRatedList.length>0) if (_appointmentRateService.appointmentRatedList.length > 0) await getAppointmentDetails();
await getAppointmentDetails();
} }
} }
@ -32,17 +30,14 @@ class AppointmentRateViewModel extends BaseViewModel {
error = _appointmentRateService.error; error = _appointmentRateService.error;
setState(ViewState.Error); setState(ViewState.Error);
} else { } else {
if (_appointmentRateService.appointmentDetails != null) if (_appointmentRateService.appointmentDetails != null) isHaveAppointmentNotRate = true;
isHaveAppointmentNotRate = true;
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }
Future sendAppointmentRate(int rate, int appointmentNo, int projectID, Future sendAppointmentRate(int rate, int appointmentNo, int projectID, int doctorID, int clinicID, String note) async {
int doctorID, int clinicID, String note) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _appointmentRateService.sendAppointmentRate( await _appointmentRateService.sendAppointmentRate(rate, appointmentNo, projectID, doctorID, clinicID, note);
rate, appointmentNo, projectID, doctorID, clinicID, note);
if (_appointmentRateService.hasError) { if (_appointmentRateService.hasError) {
error = _appointmentRateService.error; error = _appointmentRateService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -52,14 +47,23 @@ class AppointmentRateViewModel extends BaseViewModel {
} }
} }
AppoitmentRated get lastAppointmentRated => Future sendDoctorRate(int rate, int appointmentNo, int projectID, int doctorID, int clinicID, String note, String appoDate, String docName, String projectName, String clinicName) async {
_appointmentRateService.lastAppointmentRated; setState(ViewState.Busy);
await _appointmentRateService.sendDoctorRate(rate, appointmentNo, projectID, doctorID, clinicID, note, appoDate, docName, projectName, clinicName);
if (_appointmentRateService.hasError) {
error = _appointmentRateService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
_appointmentRateService.deleteAllAppAppointmentRate();
}
}
deleteAppointmentRated(AppoitmentRated appointmentRated) => AppoitmentRated get lastAppointmentRated => _appointmentRateService.lastAppointmentRated;
_appointmentRateService.deleteAppointmentRated(appointmentRated);
deleteAppAppointmentRate() => deleteAppointmentRated(AppoitmentRated appointmentRated) => _appointmentRateService.deleteAppointmentRated(appointmentRated);
_appointmentRateService.deleteAllAppAppointmentRate();
deleteAppAppointmentRate() => _appointmentRateService.deleteAllAppAppointmentRate();
setIsRated(bool isRated) { setIsRated(bool isRated) {
this.isHaveAppointmentNotRate = isRated; this.isHaveAppointmentNotRate = isRated;

@ -44,7 +44,7 @@ class _ErOptionsState extends State<ErOptions> {
return AppScaffold( return AppScaffold(
isShowAppBar: widget.isAppbar, isShowAppBar: widget.isAppbar,
appBarTitle: TranslationBase.of(context).bookAppo, appBarTitle: TranslationBase.of(context).emergencyServices,
isShowDecPage: false, isShowDecPage: false,
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,

@ -40,6 +40,12 @@ class HomePage extends StatefulWidget {
class _HomePageState extends State<HomePage> { class _HomePageState extends State<HomePage> {
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>(); PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
@override
void initState() {
// TODO: implement initState
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);

@ -232,7 +232,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context); locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
// locationUtils.getCurrentLocation(); locationUtils.getCurrentLocation();
if (projectViewModel.isLogin) { if (projectViewModel.isLogin) {
familyFileProvider.getSharedRecordByStatus(); familyFileProvider.getSharedRecordByStatus();
} }

@ -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/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.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';
@ -23,9 +24,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart'; import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -35,7 +34,6 @@ import 'package:intl/intl.dart';
import 'package:local_auth/auth_strings.dart'; import 'package:local_auth/auth_strings.dart';
import 'package:local_auth/local_auth.dart'; import 'package:local_auth/local_auth.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
class ConfirmLogin extends StatefulWidget { class ConfirmLogin extends StatefulWidget {
@override @override
@ -375,6 +373,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
} }
var tempType; var tempType;
startSMSService(type) { startSMSService(type) {
tempType = type; tempType = type;
new SMSOTP( new SMSOTP(
@ -510,9 +509,12 @@ class _ConfirmLogin extends State<ConfirmLogin> {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
var request = this.getCommonRequest().toJson(); var request = this.getCommonRequest().toJson();
dynamic res;
authService authService
.checkActivationCode(request, value) .checkActivationCode(request, value)
.then((result) => { .then((result) => {
res = result,
if (result is Map) if (result is Map)
{ {
result = CheckActivationCode.fromJson(result), result = CheckActivationCode.fromJson(result),
@ -530,7 +532,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
// sharedPref.setString( // sharedPref.setString(
// BLOOD_TYPE, result['PatientBloodType']), // BLOOD_TYPE, result['PatientBloodType']),
authenticatedUserObject.user = result.list, authenticatedUserObject.user = result.list,
projectViewModel.setPrivilege(privilegeList: res),
sharedPref.setObject(MAIN_USER, result.list), sharedPref.setObject(MAIN_USER, result.list),
sharedPref.setObject(USER_PROFILE, result.list), sharedPref.setObject(USER_PROFILE, result.list),
loginTokenID = result.logInTokenID, loginTokenID = result.logInTokenID,

@ -4,6 +4,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/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
@ -14,15 +15,13 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class RateAppointmentClinic extends StatefulWidget { class RateAppointmentClinic extends StatefulWidget {
final AppointmentDetails appointmentDetails; final AppointmentDetails appointmentDetails;
final String doctorNote; final String doctorNote;
final int doctorRate; final int doctorRate;
RateAppointmentClinic( RateAppointmentClinic({this.appointmentDetails, this.doctorRate, this.doctorNote});
{this.appointmentDetails, this.doctorRate, this.doctorNote});
@override @override
_RateAppointmentClinicState createState() => _RateAppointmentClinicState(); _RateAppointmentClinicState createState() => _RateAppointmentClinicState();
@ -43,8 +42,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
appBar: AppBar( appBar: AppBar(
elevation: 0, elevation: 0,
textTheme: TextTheme( textTheme: TextTheme(
headline6: headline6: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
), ),
title: Text('Rate'), title: Text('Rate'),
leading: Builder( leading: Builder(
@ -91,11 +89,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
height: 8, height: 8,
), ),
LargeAvatar( LargeAvatar(
url: url: 'https://hmgwebservices.com/Images/Hospitals/' + model.appointmentDetails.projectID.toString() + '.jpg',
'https://hmgwebservices.com/Images/Hospitals/' +
model.appointmentDetails.projectID
.toString() +
'.jpg',
name: model.appointmentDetails.clinicName, name: model.appointmentDetails.clinicName,
width: 110, width: 110,
height: 110, height: 110,
@ -112,9 +106,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
height: 4, height: 4,
), ),
Texts( Texts(
DateUtil.getMonthDayYearDateFormatted( DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(model.appointmentDetails.appointmentDate)),
DateUtil.convertStringToDate(
model.appointmentDetails.appointmentDate)),
), ),
SizedBox( SizedBox(
height: 8, height: 8,
@ -146,10 +138,8 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
duration: Duration(milliseconds: 1000), duration: Duration(milliseconds: 1000),
switchInCurve: Curves.elasticOut, switchInCurve: Curves.elasticOut,
switchOutCurve: Curves.elasticIn, switchOutCurve: Curves.elasticIn,
transitionBuilder: transitionBuilder: (Widget child, Animation<double> animation) {
(Widget child, Animation<double> animation) { return ScaleTransition(child: child, scale: animation);
return ScaleTransition(
child: child, scale: animation);
}, },
child: Container( child: Container(
key: ValueKey<int>(rating), key: ValueKey<int>(rating),
@ -162,9 +152,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
}, },
iconSize: rating == (index + 1) ? 60 : 40, iconSize: rating == (index + 1) ? 60 : 40,
// Theme.of(context).hintColor, // Theme.of(context).hintColor,
icon: Image.asset('assets/images/' + icon: Image.asset('assets/images/' + (index + 1).toString() + '.png')),
(index + 1).toString() +
'.png')),
), ),
), ),
) )
@ -192,25 +180,33 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
if (rating > 0) { if (rating > 0) {
model model
.sendAppointmentRate( .sendAppointmentRate(
rating, rating, widget.appointmentDetails.appointmentNo, widget.appointmentDetails.projectID, widget.appointmentDetails.doctorID, widget.appointmentDetails.clinicID, note)
widget.appointmentDetails.appointmentNo,
widget.appointmentDetails.projectID,
widget.appointmentDetails.doctorID,
widget.appointmentDetails.clinicID,
note)
.then( .then(
(value) => { (value) => {
Navigator.pushReplacement( model
context, .sendDoctorRate(
FadePage( widget.doctorRate,
page: LandingPage(), widget.appointmentDetails.appointmentNo,
), widget.appointmentDetails.projectID,
) widget.appointmentDetails.doctorID,
widget.appointmentDetails.clinicID,
note,
widget.appointmentDetails.appointmentDate,
widget.appointmentDetails.doctorName,
widget.appointmentDetails.projectName,
widget.appointmentDetails.clinicName)
.then((value) {
Navigator.pushReplacement(
context,
FadePage(
page: LandingPage(),
),
);
}),
}, },
); );
} else { } else {
AppToast.showErrorToast( AppToast.showErrorToast(message: 'please rate the clinic');
message: 'please rate the clinic');
} }
}, },
label: TranslationBase.of(context).submit, label: TranslationBase.of(context).submit,

@ -852,14 +852,14 @@ class Utils {
); );
} }
static Widget tableColumnValue(String text, {bool isLast = false}) { static Widget tableColumnValue(String text, {bool isLast = false, bool isCapitable = true}) {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
SizedBox(height: 12), SizedBox(height: 12),
Text( Text(
text.toLowerCase().capitalizeFirstofEach, isCapitable ? text.toLowerCase().capitalizeFirstofEach : text,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
), ),
SizedBox(height: 12), SizedBox(height: 12),

@ -14,7 +14,6 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import '../../text.dart'; import '../../text.dart';
import 'FlowChartPage.dart'; import 'FlowChartPage.dart';
@ -116,7 +115,7 @@ class LabResultWidget extends StatelessWidget {
openPassportUpdatePage(BuildContext context) { openPassportUpdatePage(BuildContext context) {
Navigator.push(context, FadePage(page: PassportUpdatePage())).then((value) { Navigator.push(context, FadePage(page: PassportUpdatePage())).then((value) {
print(value); print(value);
if(value != null && value == true) { if (value != null && value == true) {
showConfirmMessage(context, projectViewModel.user.emailAddress, "yes"); showConfirmMessage(context, projectViewModel.user.emailAddress, "yes");
} }
}); });
@ -179,7 +178,7 @@ class LabResultWidget extends StatelessWidget {
children: [ children: [
Utils.tableColumnValue(labResultList[i].description, isLast: i == (labResultList.length - 1)), Utils.tableColumnValue(labResultList[i].description, isLast: i == (labResultList.length - 1)),
Utils.tableColumnValue(labResultList[i].resultValue + " " + labResultList[i].uOM, isLast: i == (labResultList.length - 1)), Utils.tableColumnValue(labResultList[i].resultValue + " " + labResultList[i].uOM, isLast: i == (labResultList.length - 1)),
Utils.tableColumnValue(labResultList[i].referanceRange, isLast: i == (labResultList.length - 1)), Utils.tableColumnValue(labResultList[i].referanceRange, isLast: i == (labResultList.length - 1), isCapitable: false),
], ],
), ),
); );

@ -1,23 +1,24 @@
import 'dart:io'; import 'dart:io';
import 'package:diplomaticquarterapp/config/config.dart'; 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/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/service/privilege_service.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/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.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/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/Authentication/select_device_imei_res.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notifications_page.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notifications_page.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.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/family_files/family_files_provider.dart'; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart'; import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart'; import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
@ -32,11 +33,10 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import 'package:diplomaticquarterapp/models/Authentication/select_device_imei_res.dart';
import '../../config/size_config.dart'; import '../../config/size_config.dart';
import '../../locator.dart'; import '../../locator.dart';
import 'drawer_item_widget.dart'; import 'drawer_item_widget.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
class AppDrawer extends StatefulWidget { class AppDrawer extends StatefulWidget {
@override @override
@ -59,10 +59,12 @@ class _AppDrawerState extends State<AppDrawer> {
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>(); AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
VitalSignService _vitalSignService = locator<VitalSignService>(); VitalSignService _vitalSignService = locator<VitalSignService>();
AppointmentRateViewModel appointmentRateViewModel = locator<AppointmentRateViewModel>(); AppointmentRateViewModel appointmentRateViewModel = locator<AppointmentRateViewModel>();
PrivilegeService _privilegeService = locator<PrivilegeService>();
ToDoCountProviderModel toDoProvider; ToDoCountProviderModel toDoProvider;
String booldType; String booldType;
String notificationCount; String notificationCount;
final authService = new AuthProvider(); final authService = new AuthProvider();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectProvider = Provider.of(context); projectProvider = Provider.of(context);
@ -497,6 +499,8 @@ class _AppDrawerState extends State<AppDrawer> {
await authenticatedUserObject.getUser(); await authenticatedUserObject.getUser();
_vitalSignService.heightCm = ""; _vitalSignService.heightCm = "";
_vitalSignService.weightKg = ""; _vitalSignService.weightKg = "";
await _privilegeService.getPrivilege();
projectProvider.setPrivilegeModelList(privilege: _privilegeService.privilegeModelList);
var appLanguage = await sharedPref.getString(APP_LANGUAGE); var appLanguage = await sharedPref.getString(APP_LANGUAGE);
await sharedPref.clear(); await sharedPref.clear();
await sharedPref.setString(APP_LANGUAGE, appLanguage); await sharedPref.setString(APP_LANGUAGE, appLanguage);

Loading…
Cancel
Save