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
@ -69,12 +69,11 @@ class _ConfirmLogin extends State<ConfirmLogin> {
int fingrePrintBefore; int fingrePrintBefore;
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
AppointmentRateViewModel appointmentRateViewModel = AppointmentRateViewModel appointmentRateViewModel =
locator<AppointmentRateViewModel>(); locator<AppointmentRateViewModel>();
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
@override @override
void initState() { void initState() {
_getAvailableBiometrics(); _getAvailableBiometrics();
@ -367,25 +366,25 @@ class _ConfirmLogin extends State<ConfirmLogin> {
localizedReason: 'Scan your fingerprint to authenticate', localizedReason: 'Scan your fingerprint to authenticate',
useErrorDialogs: true, useErrorDialogs: true,
stickyAuth: true); stickyAuth: true);
if (authenticated == true) {
if(user !=null && (user.logInType==2 || user.logInType ==3)){ if (authenticated == true) {
this.checkActivationCode(); if (user != null && (user.logInType == 2 || user.logInType == 3)) {
}else{ this.checkActivationCode();
var request = this.getCommonRequest(type: type); } else {
this.getMobileInfo(request); var request = this.getCommonRequest(type: type);
} 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,11 +51,13 @@ 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)
return null; .searchItemError;
} else
return null;
}, },
), ),
), ),
@ -81,21 +83,24 @@ 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).itemInSearch, TranslationBase.of(context).youCanFind +
), '${model.pharmacy == null ? '0' : model.pharmacy.length.toString()}' +
], TranslationBase.of(context).itemInSearch,
),
),
],
),
), ),
),
if (model.state == ViewState.ErrorLocal) if (model.state == ViewState.ErrorLocal)
Container( Container(
child: Texts(model.error), child: Texts(model.error),

@ -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(
@ -67,66 +72,67 @@ class _AppDrawerState extends State<AppDrawer> {
children: <Widget>[ children: <Widget>[
Container( Container(
child: child:
Image.asset('assets/images/DQ/DQ_logo.png'), Image.asset('assets/images/DQ/DQ_logo.png'),
margin: EdgeInsets.all( margin: EdgeInsets.all(
SizeConfig.imageSizeMultiplier * 4), SizeConfig.imageSizeMultiplier * 4),
), ),
(user != null && projectProvider.isLogin) (user != null && projectProvider.isLogin)
? Padding( ? Padding(
padding: EdgeInsets.all(15), padding: EdgeInsets.all(15),
child: Column( child: Column(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.start, MainAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[ children: <Widget>[
Row( Padding(
children: <Widget>[ padding: EdgeInsets.only(
Padding( right: 5),
padding: EdgeInsets.only( child: Icon(
right: 5), Icons.account_circle,
child: Icon(
Icons.account_circle,
color: Color(0xFF40ACC9),
)),
AppText(
user.firstName +
' ' +
user.lastName,
color: Color(0xFF40ACC9), color: Color(0xFF40ACC9),
) )),
], AppText(
), user.firstName +
Row(children: <Widget>[ ' ' +
Padding( user.lastName,
padding: EdgeInsets.only( color: Color(0xFF40ACC9),
left: 30, top: 5), )
child: Column( ],
children: <Widget>[ ),
AppText( Row(children: <Widget>[
TranslationBase.of( Padding(
context) padding: EdgeInsets.only(
.fileno + left: 30, top: 5),
": " + child: Column(
user.patientID children: <Widget>[
.toString(), AppText(
color: TranslationBase
Color(0xFF40ACC9), .of(
fontSize: SizeConfig context)
.textMultiplier * .fileno +
1.5, ": " +
), user.patientID
AppText( .toString(),
user.bloodGroup != null color:
? 'Blood Group: ' + Color(0xFF40ACC9),
user.bloodGroup fontSize: SizeConfig
: '', .textMultiplier *
fontSize: SizeConfig 1.5,
.textMultiplier * ),
1.5, AppText(
), user.bloodGroup != null
], ? 'Blood Group: ' +
)) user.bloodGroup
]) : '',
])) fontSize: SizeConfig
.textMultiplier *
1.5,
),
],
))
])
]))
: SizedBox(), : SizedBox(),
], ],
), ),
@ -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(
@ -153,192 +161,263 @@ class _AppDrawerState extends State<AppDrawer> {
), ),
(user != null && projectProvider.isLogin) (user != null && projectProvider.isLogin)
? 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
child: DrawerItem( ? InkWell(
TranslationBase.of(context).family, child: DrawerItem(
Icons.group, TranslationBase
textColor: Color(0xFF40ACC9), .of(context)
iconColor: Color(0xFF40ACC9), .family,
bottomLine: false, Icons.group,
sideArrow: true, textColor: Color(0xFF40ACC9),
), iconColor: Color(0xFF40ACC9),
onTap: () { bottomLine: false,
Navigator.of(context).pushNamed( sideArrow: true,
MY_FAMILIY, ),
); onTap: () {
}, Navigator.of(context).pushNamed(
) : SizedBox(), MY_FAMILIY,
FutureBuilder( );
future: getFamilyFiles(), // async work },
builder: (BuildContext context, )
AsyncSnapshot< : SizedBox(),
GetAllSharedRecordsByStatusResponse> FutureBuilder(
snapshot) { future: getFamilyFiles(), // async work
switch (snapshot.connectionState) { builder: (BuildContext context,
case ConnectionState.waiting: AsyncSnapshot<
return Padding( GetAllSharedRecordsByStatusResponse>
padding: EdgeInsets.all(10), snapshot) {
child: Text('Loading....')); switch (snapshot.connectionState) {
default: case ConnectionState.waiting:
if (snapshot.hasError) return Padding(
return Padding( padding: EdgeInsets.all(10),
padding: EdgeInsets.all(10), child: Text('Loading....'));
child: Text(snapshot.error)); default:
else if (snapshot.hasError)
return Container( return Padding(
decoration: BoxDecoration( padding: EdgeInsets.all(10),
border: Border( child: Text(snapshot.error));
bottom: BorderSide( else
// <--- left side return Container(
color: Colors.grey[200], decoration: BoxDecoration(
width: 1.0, border: Border(
), bottom: BorderSide(
)), // <--- left side
child: Column( color: Colors.grey[200],
children: [ width: 1.0,
user.isFamily == true ),
? Container( )),
padding: child: Column(
EdgeInsets.only( children: [
bottom: 5), user.isFamily == true
? Container(
padding:
EdgeInsets.only(
bottom: 5),
child: InkWell(
onTap: () {
switchUser(
mainUser,
context);
},
child: Row(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <
Widget>[
Expanded(
child: Icon(
Icons
.person),
),
Expanded(
flex: 7,
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <
Widget>[
AppText(
mainUser
.firstName +
' ' +
mainUser
.lastName),
AppText(
TranslationBase
.of(
context)
.fileno +
": " +
mainUser
.patientID
.toString()),
])),
],
)))
: SizedBox(),
Column(
mainAxisAlignment:
MainAxisAlignment
.start,
mainAxisSize:
MainAxisSize.min,
children: snapshot.data
.getAllSharedRecordsByStatusList
.map<Widget>(
(result) {
return result
.status ==
3
? Container(
padding: EdgeInsets
.only(
bottom:
5),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
switchUser( switchUser(
mainUser, result,
context); context);
}, },
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment CrossAxisAlignment
.start, .start,
children: < children: <
Widget>[ Widget>[
Expanded( Expanded(
child: Icon( child:
Icons Icon(Icons
.person), .person,
color: result
.responseID ==
user
.patientID
? Color(
0xFF40ACC9)
: Colors
.black),
), ),
Expanded( Expanded(
flex: 7, flex: 7,
child: Column( child: Padding(
crossAxisAlignment: padding: EdgeInsets
CrossAxisAlignment.start, .only(
children: <Widget>[ left: 5,
AppText(mainUser.firstName + ' ' + mainUser.lastName), right: 5),
AppText(TranslationBase.of(context).fileno + ": " + mainUser.patientID.toString()), 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),
]))),
], ],
))) )))
: SizedBox(), : SizedBox();
Column( }).toList())
mainAxisAlignment: ],
MainAxisAlignment ));
.start, }
mainAxisSize: },
MainAxisSize.min, ),
children: snapshot.data InkWell(
.getAllSharedRecordsByStatusList child: DrawerItem(
.map<Widget>( TranslationBase
(result) { .of(context)
return result .notification,
.status == Icons.notifications),
3 onTap: () {
? Container( //NotificationsPage
padding: EdgeInsets Navigator.of(context).pop();
.only( Navigator.push(
bottom: context,
5), MaterialPageRoute(
child: InkWell( builder: (BuildContext context) =>
onTap: () { NotificationsPage()));
switchUser( },
result, ),
context); InkWell(
}, child: DrawerItem(
child: Row( TranslationBase
crossAxisAlignment: .of(context)
CrossAxisAlignment.start, .appsetting,
children: < Icons.settings_input_composite),
Widget>[ onTap: () {
Expanded( Navigator.of(context).pushNamed(
child: SETTINGS,
Icon(Icons.person, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black), );
), },
Expanded( ),
flex: 7, InkWell(
child: Padding( child: DrawerItem(
padding:EdgeInsets.only(left:5, right:5), TranslationBase
child:Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ .of(context)
AppText(result.patientName, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black), .rateApp,
AppText(TranslationBase.of(context).fileno + ": " + result.iD.toString(), color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black), Icons.star),
]))), onTap: () {
], if (Platform.isIOS) {
))) launch(
: SizedBox(); "https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978");
}).toList()) } else {
], launch(
)); "https://play.google.com/store/apps/details?id=com.ejada.hmg&hl=en");
} }
}, },
), ),
InkWell( InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase.of(context) TranslationBase
.notification, .of(context)
Icons.notifications), .logout,
onTap: () { Icons.lock_open),
//NotificationsPage onTap: () {
Navigator.of(context).pop(); logout();
Navigator.push( },
context, )
MaterialPageRoute( ],
builder: (BuildContext context) => )
NotificationsPage()));
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).appsetting,
Icons.settings_input_composite),
onTap: () {
Navigator.of(context).pushNamed(
SETTINGS,
);
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).rateApp,
Icons.star),
onTap: () {
if (Platform.isIOS) {
launch(
"https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978");
} else {
launch(
"https://play.google.com/store/apps/details?id=com.ejada.hmg&hl=en");
}
},
),
InkWell(
child: DrawerItem(
TranslationBase.of(context).logout,
Icons.lock_open),
onTap: () {
logout();
},
)
],
)
: InkWell( : InkWell(
child: DrawerItem( child: DrawerItem(
TranslationBase.of(context).loginregister, TranslationBase
Icons.lock_open), .of(context)
onTap: () { .loginregister,
login(); Icons.lock_open),
}, onTap: () {
), 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 = // static String SERVICE_URL =
'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT // 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = static String SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
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/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL = static String PREAUTH_SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store '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