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

fix_issues
Sultan Khan 5 years ago
commit de2a5e55eb

@ -997,7 +997,7 @@ const Map localizedValues = {
"selectClinic": {"en": "Select Clinic", "ar": " بحث بالعيادة"}, "selectClinic": {"en": "Select Clinic", "ar": " بحث بالعيادة"},
"reviews": {"en": "Reviews", "ar": "تقييمات"}, "reviews": {"en": "Reviews", "ar": "تقييمات"},
"searchItemError": {"en": "Item name should be more than 3 character ", "ar": "يجب أن يكون اسم العنصر أكثر من 3 أحرف"}, "searchItemError": {"en": "Item name should be more than 3 character ", "ar": "يجب أن يكون اسم العنصر أكثر من 3 أحرف"},
"YouCanFind": {"en": "YouCanFind", "ar": "باستطاعتك العثور على "}, "YouCanFind": {"en": "You Can Find ", "ar": "باستطاعتك العثور على "},
"ItemInSearch": {"en": " Item In Search", "ar": " عنصر في البحث "}, "ItemInSearch": {"en": " Item In Search", "ar": " عنصر في البحث "},
"InvoiceNo": {"en": " Invoice No", "ar": "رقم الفاتورة"}, "InvoiceNo": {"en": " Invoice No", "ar": "رقم الفاتورة"},
"SpecialResult": {"en": " Special Result", "ar": "نتيجة خاصة"}, "SpecialResult": {"en": " Special Result", "ar": "نتيجة خاصة"},
@ -1035,5 +1035,13 @@ const Map localizedValues = {
"en": "Email the Report", "en": "Email the Report",
"ar": "أرسل التقرير" "ar": "أرسل التقرير"
}, },
"appoSurvey": {
"en": "Survey",
"ar": "إستبيان"
},
"appoSurveySubtitle": {
"en": "Survey",
"ar": "إستبيان"
},
}; };

@ -4,7 +4,7 @@ class PharmaciesListModel {
int languageID; int languageID;
String stamp; String stamp;
String iPAdress; String iPAdress;
double versionID; dynamic versionID;
String tokenID; String tokenID;
String sessionID; String sessionID;
bool isLoginForDoctorApp; bool isLoginForDoctorApp;
@ -14,7 +14,7 @@ class PharmaciesListModel {
int editedBy; int editedBy;
int projectID; int projectID;
int clinicID; int clinicID;
double price; dynamic price;
String imageLocation; String imageLocation;
String desLocation; String desLocation;
String itemDes; String itemDes;

@ -554,7 +554,7 @@ class _BookSuccessState extends State<BookSuccess> {
AppoitmentAllHistoryResultList appo) async { AppoitmentAllHistoryResultList appo) async {
if (paymentMethod == "ApplePay") { if (paymentMethod == "ApplePay") {
await widget.chromeBrowser.open( await widget.chromeBrowser.open(
url: "https://flutter.dev/", url: "https://applepay-datatrans-sample.herokuapp.com/",
options: ChromeSafariBrowserClassOptions( options: ChromeSafariBrowserClassOptions(
android: AndroidChromeCustomTabsOptions( android: AndroidChromeCustomTabsOptions(
addDefaultShareMenuItem: false), addDefaultShareMenuItem: false),

@ -102,7 +102,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
//indicatorSize: TabBarIndicatorSize.label, //indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab, indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800], indicatorColor: Theme.of(context).primaryColor,
labelColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor,
labelPadding: labelPadding:
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
@ -184,7 +184,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
Widget myFamilyDetails(context) { Widget myFamilyDetails(context) {
return Container( return Container(
height: MediaQuery.of(context).size.height, height: MediaQuery.of(context).size.height,
margin: EdgeInsets.fromLTRB(20.0, 0, 20.0, 0.0), margin: EdgeInsets.fromLTRB(20.0, 25.0, 20.0, 0.0),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(

@ -4,32 +4,32 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
class ArrivedButtons { class ArrivedButtons {
static var buttons = [ static var buttons = [
{ {
"title": "Arrived", "title": TranslationBase.of(AppGlobal.context).arrived,
"subtitle": "Status", "subtitle": TranslationBase.of(AppGlobal.context).status,
"icon": "assets/images/new-design/waiting-room.png", "icon": "assets/images/new-design/waiting-room.png",
"caller": "openReschedule" "caller": "openReschedule"
}, },
{ {
"title": "Medicines", "title": TranslationBase.of(AppGlobal.context).medicines,
"subtitle": "Prescriptions", "subtitle": TranslationBase.of(AppGlobal.context).medicinesSubtitle,
"icon": "assets/images/new-design/medicine_prescriptions_icon.png", "icon": "assets/images/new-design/medicine_prescriptions_icon.png",
"caller": "prescriptions" "caller": "prescriptions"
}, },
{ {
"title": "Radiology", "title": TranslationBase.of(AppGlobal.context).radiology,
"subtitle": "Services", "subtitle": TranslationBase.of(AppGlobal.context).radiologySubtitle,
"icon": "assets/images/new-design/radiology_service_icon.png", "icon": "assets/images/new-design/radiology_service_icon.png",
"caller": "radiology" "caller": "radiology"
}, },
{ {
"title": "Lab", "title": TranslationBase.of(AppGlobal.context).lab,
"subtitle": "Result", "subtitle": TranslationBase.of(AppGlobal.context).labSubtitle,
"icon": "assets/images/new-design/lab_result_icon.png", "icon": "assets/images/new-design/lab_result_icon.png",
"caller": "labResult" "caller": "labResult"
}, },
{ {
"title": "Vital Signs", "title": TranslationBase.of(AppGlobal.context).vitalSigns,
"subtitle": "Values", "subtitle": TranslationBase.of(AppGlobal.context).vitalSignsSubtitle,
"icon": "assets/images/new-design/vital_signs.png", "icon": "assets/images/new-design/vital_signs.png",
"caller": "VitalSigns" "caller": "VitalSigns"
}, },
@ -40,20 +40,20 @@ class ArrivedButtons {
"caller": "insertComplaint" "caller": "insertComplaint"
}, },
{ {
"title": "Insurance", "title": TranslationBase.of(AppGlobal.context).insurance,
"subtitle": "Approvals", "subtitle": TranslationBase.of(AppGlobal.context).insuranceSubtitle,
"icon": "assets/images/new-design/insurance_approvals_icon.png", "icon": "assets/images/new-design/insurance_approvals_icon.png",
"caller": "Insurance" "caller": "Insurance"
}, },
{ {
"title": "Ask Your", "title": TranslationBase.of(AppGlobal.context).askYour,
"subtitle": "Doctor", "subtitle": TranslationBase.of(AppGlobal.context).askYourSubtitle,
"icon": "assets/images/new-design/ask_doctor_icon.png", "icon": "assets/images/new-design/ask_doctor_icon.png",
"caller": "askDoc" "caller": "askDoc"
}, },
{ {
"title": "Survey", "title": TranslationBase.of(AppGlobal.context).appoSurvey,
"subtitle": "Service", "subtitle": TranslationBase.of(AppGlobal.context).service,
"icon": "assets/images/new-design/survey.png", "icon": "assets/images/new-design/survey.png",
"caller": "Survey" "caller": "Survey"
} }

@ -53,7 +53,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var size = MediaQuery.of(context).size; var size = MediaQuery.of(context).size;
final double itemHeight = ((size.height - kToolbarHeight - 24) * 0.42) / 2; final double itemHeight = ((size.height - kToolbarHeight - 24) * 0.455) / 2;
final double itemWidth = size.width / 2; final double itemWidth = size.width / 2;
return Container( return Container(
@ -73,8 +73,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
_handleButtonClicks(e); _handleButtonClicks(e);
}, },
child: Container( child: Container(
height: 100.0, // height: 100.0,
margin: EdgeInsets.all(9.0), margin: EdgeInsets.all(7.0),
decoration: BoxDecoration( decoration: BoxDecoration(
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
@ -90,17 +90,17 @@ class _AppointmentActionsState extends State<AppointmentActions> {
children: <Widget>[ children: <Widget>[
Container( Container(
margin: margin:
EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0), EdgeInsets.fromLTRB(5.0, 5.0, 5.0, 0.0),
child: Text(e.title, child: Text(e.title,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
color: new Color(0xFF40ACC9), color: new Color(0xFF40ACC9),
letterSpacing: 1.0, letterSpacing: 1.0,
fontSize: 20.0)), fontSize: 18.0)),
), ),
Container( Container(
margin: margin:
EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0), EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
child: Text(e.subtitle, child: Text(e.subtitle,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
style: TextStyle( style: TextStyle(
@ -113,7 +113,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
margin: margin:
EdgeInsets.fromLTRB(0.0, 10.0, 10.0, 7.0), EdgeInsets.fromLTRB(0.0, 10.0, 10.0, 7.0),
child: Image.asset(e.icon, child: Image.asset(e.icon,
width: 45.0, height: 45.0), width: 40.0, height: 40.0),
), ),
], ],
), ),

@ -163,45 +163,45 @@ class _PaymentMethodState extends State<PaymentMethod> {
], ],
), ),
), ),
Container( // Container(
margin: EdgeInsets.only(top: 25.0), // margin: EdgeInsets.only(top: 25.0),
child: Flex( // child: Flex(
direction: Axis.horizontal, // direction: Axis.horizontal,
children: <Widget>[ // children: <Widget>[
Expanded( // Expanded(
child: Container( // child: Container(
child: InkWell( // child: InkWell(
onTap: () { // onTap: () {
updateSelectedPaymentMethod("ApplePay"); // updateSelectedPaymentMethod("ApplePay");
}, // },
child: Card( // child: Card(
elevation: 3.0, // elevation: 3.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), // margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white, // color: Colors.white,
shape: RoundedRectangleBorder( // shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10), // borderRadius: BorderRadius.circular(10),
side: selectedPaymentMethod == "ApplePay" // side: selectedPaymentMethod == "ApplePay"
? BorderSide( // ? BorderSide(
color: Colors.green, width: 5.0) // color: Colors.green, width: 5.0)
: BorderSide( // : BorderSide(
color: Colors.transparent, width: 0.0), // color: Colors.transparent, width: 0.0),
), // ),
child: Container( // child: Container(
height: 120.0, // height: 120.0,
padding: EdgeInsets.all(20.0), // padding: EdgeInsets.all(20.0),
child: SvgPicture.asset( // child: SvgPicture.asset(
"assets/images/new-design/applepay.svg"), // "assets/images/new-design/applepay.svg"),
), // ),
), // ),
), // ),
), // ),
), // ),
Expanded( // Expanded(
child: Container(), // child: Container(),
), // ),
], // ],
), // ),
), // ),
SizedBox( SizedBox(
height: 150.0, height: 150.0,
), ),

@ -734,7 +734,7 @@ class _HomePageState extends State<HomePage> {
], ],
), ),
), ),
height: 100, height: 106,
imageName: 'rectangle.png', imageName: 'rectangle.png',
color: Colors.grey[700], color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45, width: MediaQuery.of(context).size.width * 0.45,

@ -26,7 +26,7 @@ import 'package:flutter/services.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.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:smart_progress_bar/smart_progress_bar.dart'; // import 'package:smart_progress_bar/smart_progress_bar.dart';
class ConfirmLogin extends StatefulWidget { class ConfirmLogin extends StatefulWidget {
@override @override
@ -74,7 +74,6 @@ class _ConfirmLogin extends State<ConfirmLogin> {
locator<AppointmentRateViewModel>(); locator<AppointmentRateViewModel>();
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
@override @override
void initState() { void initState() {
_getAvailableBiometrics(); _getAvailableBiometrics();
@ -369,23 +368,23 @@ class _ConfirmLogin extends State<ConfirmLogin> {
stickyAuth: true); stickyAuth: true);
if (authenticated == true) { if (authenticated == true) {
if (user != null && (user.logInType == 2 || user.logInType == 3)) {
if(user !=null && (user.logInType==2 || user.logInType ==3)){
this.checkActivationCode(); this.checkActivationCode();
}else{ } else {
var request = this.getCommonRequest(type: type); var request = this.getCommonRequest(type: type);
this.getMobileInfo(request); this.getMobileInfo(request);
} }
} }
} }
} }
getMobileInfo(request) { getMobileInfo(request) {
GifLoaderDialogUtils.showMyDialog(context);
this this
.authService .authService
.getLoginInfo(request) .getLoginInfo(request)
.then((result) => { .then((result) => {
GifLoaderDialogUtils.hideDialog(context),
if (result['SMSLoginRequired'] == false) if (result['SMSLoginRequired'] == false)
{ {
this.loginTokenID = result.logInTokenID, this.loginTokenID = result.logInTokenID,
@ -422,9 +421,9 @@ class _ConfirmLogin extends State<ConfirmLogin> {
} }
}) })
.catchError((err) { .catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
setUser() async {} setUser() async {}
@ -460,7 +459,9 @@ class _ConfirmLogin extends State<ConfirmLogin> {
this.deviceToken = await sharedPref.getString(PUSH_TOKEN); this.deviceToken = await sharedPref.getString(PUSH_TOKEN);
this.lastLogin = await sharedPref.getInt(LAST_LOGIN) != null this.lastLogin = await sharedPref.getInt(LAST_LOGIN) != null
? await sharedPref.getInt(LAST_LOGIN) ? await sharedPref.getInt(LAST_LOGIN)
: user !=null ? user.logInType : null; : user != null
? user.logInType
: null;
//this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN); //this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN);
} }
@ -514,7 +515,6 @@ class _ConfirmLogin extends State<ConfirmLogin> {
.then((result) => { .then((result) => {
if (result is Map) if (result is Map)
{ {
result = CheckActivationCode.fromJson(result), result = CheckActivationCode.fromJson(result),
if (this.registerd_data != null && if (this.registerd_data != null &&
this.registerd_data.isRegister == true) this.registerd_data.isRegister == true)
@ -570,7 +570,6 @@ class _ConfirmLogin extends State<ConfirmLogin> {
} }
goToHome() { goToHome() {
authenticatedUserObject.isLogin = true; authenticatedUserObject.isLogin = true;
appointmentRateViewModel.isLogin = true; appointmentRateViewModel.isLogin = true;
projectViewModel.isLogin = true; projectViewModel.isLogin = true;
@ -756,7 +755,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
bool checkIfBiometricAvailable(BiometricType biometricType) { bool checkIfBiometricAvailable(BiometricType biometricType) {
bool isAvailable = false; bool isAvailable = false;
if(_availableBiometrics != null) { if (_availableBiometrics != null) {
for (var i = 0; i < _availableBiometrics.length; i++) { for (var i = 0; i < _availableBiometrics.length; i++) {
if (biometricType == _availableBiometrics[i]) isAvailable = true; if (biometricType == _availableBiometrics[i]) isAvailable = true;
} }

@ -46,7 +46,7 @@ class VitalSignItem extends StatelessWidget {
des, des,
style: TextStyle( style: TextStyle(
fontSize: 1.7 * SizeConfig.textMultiplier, fontSize: 1.7 * SizeConfig.textMultiplier,
color: HexColor('#B8382C'), color: Color(0xff40ACC9),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
@ -78,9 +78,9 @@ class VitalSignItem extends StatelessWidget {
children: [ children: [
TextSpan(text: lastVal), TextSpan(text: lastVal),
TextSpan( TextSpan(
text: unit, text: " " + unit,
style: TextStyle( style: TextStyle(
color: HexColor('#B8382C'), color: Color(0xff40ACC9),
), ),
), ),
]), ]),

@ -1,23 +1,23 @@
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacies_view_model.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/pharmacies_list_screen.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacies_view_model.dart';
import '../base/base_view.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/input/text_field.dart'; import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/pharmacy/drug_item.dart'; import 'package:diplomaticquarterapp/widgets/pharmacy/drug_item.dart';
import 'package:diplomaticquarterapp/core/service/pharmacies_service.dart'; import 'package:flutter/cupertino.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/pharmacies_list_screen.dart'; import 'package:flutter/material.dart';
import '../base/base_view.dart';
class MedicineSearch extends StatelessWidget { class MedicineSearch extends StatelessWidget {
final textController = TextEditingController(); final textController = TextEditingController();
final _formKey = GlobalKey<FormState>(); final _formKey = GlobalKey<FormState>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<PharmacyViewModel>( return BaseView<PharmacyViewModel>(
@ -51,10 +51,12 @@ class MedicineSearch extends StatelessWidget {
controller: textController, controller: textController,
validator: (value) { validator: (value) {
if (value.isEmpty) { if (value.isEmpty) {
return TranslationBase.of(context).pleaseEnterMedicineName; return TranslationBase.of(context)
}else if( value.length <4){ .pleaseEnterMedicineName;
return TranslationBase.of(context).searchItemError; } else if (value.length < 4) {
}else return TranslationBase.of(context)
.searchItemError;
} else
return null; return null;
}, },
), ),
@ -81,18 +83,21 @@ class MedicineSearch extends StatelessWidget {
], ],
), ),
), ),
if(model.pharmacy.isNotEmpty) if (model.pharmacy.isNotEmpty)
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: SizeConfig.heightMultiplier * 2), left: SizeConfig.heightMultiplier * 2),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts( Container(
TranslationBase.of(context).youCanFind+ margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
'${model.pharmacy == null ? '0' : model.pharmacy.length.toString()}'+ child: Texts(
TranslationBase.of(context).youCanFind +
'${model.pharmacy == null ? '0' : model.pharmacy.length.toString()}' +
TranslationBase.of(context).itemInSearch, TranslationBase.of(context).itemInSearch,
), ),
),
], ],
), ),
), ),

@ -1,20 +1,19 @@
import 'package:diplomaticquarterapp/core/model/pharmacies/pharmacies_model.dart'; import 'dart:convert';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:flutter/cupertino.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacies_view_model.dart';
import 'package:maps_launcher/maps_launcher.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import '../base/base_view.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
import 'dart:typed_data'; import 'package:flutter/cupertino.dart';
import 'dart:convert'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:maps_launcher/maps_launcher.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacies_view_model.dart';
import 'package:map_launcher/map_launcher.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import '../base/base_view.dart';
class PharmaciesList extends StatelessWidget { class PharmaciesList extends StatelessWidget {
final int medicineID; final int medicineID;
final String imageURL; final String imageURL;
@ -30,6 +29,7 @@ class PharmaciesList extends StatelessWidget {
AppScaffold( AppScaffold(
appBarTitle: TranslationBase.of(context).pharmaciesList, appBarTitle: TranslationBase.of(context).pharmaciesList,
baseViewModel: model, baseViewModel: model,
isShowAppBar: true,
body: Container( body: Container(
height: SizeConfig.screenHeight, height: SizeConfig.screenHeight,
child: ListView( child: ListView(

@ -866,6 +866,7 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get report => localizedValues['report'][locale.languageCode]; String get report => localizedValues['report'][locale.languageCode];
String get openRad => localizedValues['open-rad'][locale.languageCode]; String get openRad => localizedValues['open-rad'][locale.languageCode];
String get sendCopyRad => localizedValues['send-copy'][locale.languageCode]; String get sendCopyRad => localizedValues['send-copy'][locale.languageCode];
String get appoSurvey => localizedValues['appoSurvey'][locale.languageCode];
} }

@ -25,7 +25,7 @@ class MedicalProfileItem extends StatelessWidget {
showBorder: true, showBorder: true,
borderWidth: 0, borderWidth: 0,
margin: 4, margin: 4,
height: 120, // height: 120,
// MediaQuery.of(context).size.height * 0.12, // MediaQuery.of(context).size.height * 0.12,
child: Container( child: Container(
//width: MediaQuery.of(context).size.width * 0.25, //width: MediaQuery.of(context).size.width * 0.25,

@ -244,7 +244,7 @@ class _TextsState extends State<Texts> {
Theme.of(context).backgroundColor.withOpacity(0), Theme.of(context).backgroundColor.withOpacity(0),
], begin: Alignment.bottomCenter, end: Alignment.topCenter), ], begin: Alignment.bottomCenter, end: Alignment.topCenter),
), ),
height: 30.0, height: 32.0,
), ),
) )
], ],

@ -11,6 +11,7 @@ import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.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/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
@ -40,7 +41,8 @@ class _AppDrawerState extends State<AppDrawer> {
var familyFileProvider = FamilyFilesProvider(); var familyFileProvider = FamilyFilesProvider();
AuthenticatedUser user; AuthenticatedUser user;
AuthenticatedUser mainUser; AuthenticatedUser mainUser;
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>(); AuthenticatedUserObject authenticatedUserObject = locator<
AuthenticatedUserObject>();
VitalSignService _vitalSignService = locator<VitalSignService>(); VitalSignService _vitalSignService = locator<VitalSignService>();
@ -48,7 +50,10 @@ class _AppDrawerState extends State<AppDrawer> {
Widget build(BuildContext context) { Widget build(BuildContext 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,
child: Container( child: Container(
color: Colors.white, color: Colors.white,
child: Drawer( child: Drawer(
@ -102,7 +107,8 @@ class _AppDrawerState extends State<AppDrawer> {
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
AppText( AppText(
TranslationBase.of( TranslationBase
.of(
context) context)
.fileno + .fileno +
": " + ": " +
@ -138,7 +144,9 @@ class _AppDrawerState extends State<AppDrawer> {
children: <Widget>[ children: <Widget>[
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase.of(context).arabicChange, TranslationBase
.of(context)
.arabicChange,
Icons.translate), Icons.translate),
onTap: () { onTap: () {
// Navigator.of(context).pushNamed( // Navigator.of(context).pushNamed(
@ -155,9 +163,12 @@ class _AppDrawerState extends State<AppDrawer> {
? Column( ? Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
user.isFamily ==null || user.isFamily ==false ? InkWell( user.isFamily == null || user.isFamily == false
? InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase.of(context).family, TranslationBase
.of(context)
.family,
Icons.group, Icons.group,
textColor: Color(0xFF40ACC9), textColor: Color(0xFF40ACC9),
iconColor: Color(0xFF40ACC9), iconColor: Color(0xFF40ACC9),
@ -169,7 +180,8 @@ class _AppDrawerState extends State<AppDrawer> {
MY_FAMILIY, MY_FAMILIY,
); );
}, },
) : SizedBox(), )
: SizedBox(),
FutureBuilder( FutureBuilder(
future: getFamilyFiles(), // async work future: getFamilyFiles(), // async work
builder: (BuildContext context, builder: (BuildContext context,
@ -224,10 +236,25 @@ class _AppDrawerState extends State<AppDrawer> {
flex: 7, flex: 7,
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment
children: <Widget>[ .start,
AppText(mainUser.firstName + ' ' + mainUser.lastName), children: <
AppText(TranslationBase.of(context).fileno + ": " + mainUser.patientID.toString()), Widget>[
AppText(
mainUser
.firstName +
' ' +
mainUser
.lastName),
AppText(
TranslationBase
.of(
context)
.fileno +
": " +
mainUser
.patientID
.toString()),
])), ])),
], ],
))) )))
@ -258,20 +285,63 @@ class _AppDrawerState extends State<AppDrawer> {
}, },
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment
.start,
children: < children: <
Widget>[ Widget>[
Expanded( Expanded(
child: child:
Icon(Icons.person, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black), Icon(Icons
.person,
color: result
.responseID ==
user
.patientID
? Color(
0xFF40ACC9)
: Colors
.black),
), ),
Expanded( Expanded(
flex: 7, flex: 7,
child: Padding( child: Padding(
padding:EdgeInsets.only(left:5, right:5), padding: EdgeInsets
child:Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ .only(
AppText(result.patientName, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black), left: 5,
AppText(TranslationBase.of(context).fileno + ": " + result.iD.toString(), color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black), right: 5),
child: Column(
crossAxisAlignment: CrossAxisAlignment
.start,
children: <
Widget>[
AppText(
result
.patientName,
color: result
.responseID ==
user
.patientID
? Color(
0xFF40ACC9)
: Colors
.black),
AppText(
TranslationBase
.of(
context)
.fileno +
": " +
result
.iD
.toString(),
color: result
.responseID ==
user
.patientID
? Color(
0xFF40ACC9)
: Colors
.black),
]))), ]))),
], ],
))) )))
@ -284,7 +354,8 @@ class _AppDrawerState extends State<AppDrawer> {
), ),
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase.of(context) TranslationBase
.of(context)
.notification, .notification,
Icons.notifications), Icons.notifications),
onTap: () { onTap: () {
@ -299,7 +370,9 @@ class _AppDrawerState extends State<AppDrawer> {
), ),
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase.of(context).appsetting, TranslationBase
.of(context)
.appsetting,
Icons.settings_input_composite), Icons.settings_input_composite),
onTap: () { onTap: () {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
@ -309,7 +382,9 @@ class _AppDrawerState extends State<AppDrawer> {
), ),
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase.of(context).rateApp, TranslationBase
.of(context)
.rateApp,
Icons.star), Icons.star),
onTap: () { onTap: () {
if (Platform.isIOS) { if (Platform.isIOS) {
@ -323,7 +398,9 @@ class _AppDrawerState extends State<AppDrawer> {
), ),
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase.of(context).logout, TranslationBase
.of(context)
.logout,
Icons.lock_open), Icons.lock_open),
onTap: () { onTap: () {
logout(); logout();
@ -333,7 +410,9 @@ class _AppDrawerState extends State<AppDrawer> {
) )
: InkWell( : InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase.of(context).loginregister, TranslationBase
.of(context)
.loginregister,
Icons.lock_open), Icons.lock_open),
onTap: () { onTap: () {
login(); login();
@ -357,7 +436,9 @@ class _AppDrawerState extends State<AppDrawer> {
children: [ children: [
Column( Column(
children: <Widget>[ children: <Widget>[
Text(TranslationBase.of(context).poweredBy), Text(TranslationBase
.of(context)
.poweredBy),
Image.asset( Image.asset(
'assets/images/cs_logo_container.png', 'assets/images/cs_logo_container.png',
width: SizeConfig.imageSizeMultiplier * 30, width: SizeConfig.imageSizeMultiplier * 30,
@ -410,8 +491,8 @@ class _AppDrawerState extends State<AppDrawer> {
authenticatedUserObject.logout(); authenticatedUserObject.logout();
projectProvider.isLogin = false; projectProvider.isLogin = false;
await authenticatedUserObject.getUser(); await authenticatedUserObject.getUser();
_vitalSignService.heightCm =""; _vitalSignService.heightCm = "";
_vitalSignService.weightKg =""; _vitalSignService.weightKg = "";
await sharedPref.clear(); await sharedPref.clear();
this.user = null; this.user = null;
Navigator.of(context).pushNamed(HOME); Navigator.of(context).pushNamed(HOME);
@ -442,18 +523,21 @@ class _AppDrawerState extends State<AppDrawer> {
} }
switchUser(user, context) { switchUser(user, context) {
Utils.showProgressDialog(context); GifLoaderDialogUtils.showMyDialog(context);
this this
.familyFileProvider .familyFileProvider
.silentLoggin(user is AuthenticatedUser ? null : user, .silentLoggin(user is AuthenticatedUser ? null : user,
mainUser: user is AuthenticatedUser) mainUser: user is AuthenticatedUser)
.then((value) => loginAfter(value, context)) .then((value) {
GifLoaderDialogUtils.hideDialog(context);
loginAfter(value, context);
})
.catchError((err) { .catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err);
Navigator.of(context).pop(); Navigator.of(context).pop();
}).showProgressBar( });
text: "Loading", backgroundColor: Colors.blue.withOpacity(0.6));
} }
loginAfter(result, context) async { loginAfter(result, context) async {

@ -10,17 +10,17 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart';
class MyInAppBrowser extends InAppBrowser { class MyInAppBrowser extends InAppBrowser {
// static String SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
static String SERVICE_URL = static String SERVICE_URL =
'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String SERVICE_URL = // static String PREAUTH_SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE // 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
static String PREAUTH_SERVICE_URL = static String PREAUTH_SERVICE_URL =
'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
// static String PREAUTH_SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
static List<String> successURLS = [ static List<String> successURLS = [
'success', 'success',

@ -29,7 +29,7 @@ class _MedicineItemWidgetState extends State<MedicineItemWidget> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new RoundedContainer( return new RoundedContainer(
height: SizeConfig.heightMultiplier * 12.9, height: SizeConfig.heightMultiplier * 13.1,
child: Padding( child: Padding(
padding: const EdgeInsets.all(2.0), padding: const EdgeInsets.all(2.0),
child: Row( child: Row(

Loading…
Cancel
Save