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

dq_and_master
haroon amjad 4 years ago
commit 8cd3ae915b

@ -483,7 +483,7 @@ const Map localizedValues = {
"LabOrders": {"en": "Lab Orders", "ar": "تحاليل المختبر"}, "LabOrders": {"en": "Lab Orders", "ar": "تحاليل المختبر"},
"BillNo": {"en": "Bill No :", "ar": "رقم الفاتورة"}, "BillNo": {"en": "Bill No :", "ar": "رقم الفاتورة"},
"Prescriptions": {"en": "Prescriptions", "ar": "الوصفات الطبية"}, "Prescriptions": {"en": "Prescriptions", "ar": "الوصفات الطبية"},
"History": {"en": "History", "ar": "السجل"}, "History": {"en": "History", "ar": "السجلات"},
"OrderNo": {"en": "Order No", "ar": "رقم الطلب"}, "OrderNo": {"en": "Order No", "ar": "رقم الطلب"},
"OrderDetails": {"en": "Order Details", "ar": "تفاصيل الطلب"}, "OrderDetails": {"en": "Order Details", "ar": "تفاصيل الطلب"},
"VitalSign": {"en": "Vital Sign", "ar": "العلامة حيوية"}, "VitalSign": {"en": "Vital Sign", "ar": "العلامة حيوية"},
@ -1164,5 +1164,8 @@ const Map localizedValues = {
"en": "Request medical report", "en": "Request medical report",
"ar": "طلب تقرير طبي" "ar": "طلب تقرير طبي"
}, },
"insur-cards": {
"en": "Insurance Cards",
"ar": "بطاقات التأمين"
},
}; };

@ -25,7 +25,7 @@ class GetAllSharedRecordsByStatusResponse {
dynamic successMsgN; dynamic successMsgN;
dynamic doctorInformationList; dynamic doctorInformationList;
List<GetAllSharedRecordsByStatusList> getAllPendingRecordsList; List<GetAllSharedRecordsByStatusList> getAllPendingRecordsList;
List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList; List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList = List();
List<GetAllSharedRecordsByStatusList> getResponseFileList; List<GetAllSharedRecordsByStatusList> getResponseFileList;
bool isHMGPatient; bool isHMGPatient;
bool isLoginSuccessfully; bool isLoginSuccessfully;
@ -92,7 +92,7 @@ class GetAllSharedRecordsByStatusResponse {
this.successMsgN, this.successMsgN,
this.doctorInformationList, this.doctorInformationList,
this.getAllPendingRecordsList, this.getAllPendingRecordsList,
this.getAllSharedRecordsByStatusList, this.getAllSharedRecordsByStatusList ,
this.getResponseFileList, this.getResponseFileList,
this.isHMGPatient, this.isHMGPatient,
this.isLoginSuccessfully, this.isLoginSuccessfully,

@ -1,14 +1,11 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import '../base/base_view.dart'; import '../base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
import 'package:rating_bar/rating_bar.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
class InsuranceUpdate extends StatefulWidget { class InsuranceUpdate extends StatefulWidget {
@override @override
@ -30,12 +27,13 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
_tabController.dispose(); _tabController.dispose();
} }
//TODO implement update card
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<InsuranceViewModel>( return BaseView<InsuranceViewModel>(
onModelReady: (model) => model.getInsuranceUpdated(), onModelReady: (model) => model.getInsuranceUpdated(),
builder: (BuildContext context, InsuranceViewModel model, Widget child) => builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
AppScaffold( AppScaffold(
appBarTitle: 'Insurance Cards', appBarTitle: TranslationBase.of(context).insurCards,
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
body: Scaffold( body: Scaffold(
@ -63,7 +61,7 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
controller: _tabController, controller: _tabController,
isScrollable: true, isScrollable: true,
indicatorWeight: 4.0, indicatorWeight: 4.0,
indicatorColor: Colors.red, indicatorColor: Theme.of(context).primaryColor,
labelColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor,
labelPadding: EdgeInsets.symmetric( labelPadding: EdgeInsets.symmetric(
horizontal: 13.0, vertical: 2.0), horizontal: 13.0, vertical: 2.0),
@ -72,13 +70,14 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
Container( Container(
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
child: Center( child: Center(
child: Texts('Card'), child: Texts(TranslationBase.of(context)
.updateInsuranceSubtitle),
), ),
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
child: Center( child: Center(
child: Texts('History'), child: Texts(TranslationBase.of(context).history),
), ),
), ),
], ],
@ -97,83 +96,103 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
controller: _tabController, controller: _tabController,
children: <Widget>[ children: <Widget>[
Container( Container(
child: ListView.builder( child: model.getAllSharedRecordsByStatusResponse
itemCount: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.length, .getAllSharedRecordsByStatusList !=
itemBuilder: (BuildContext context, int index) { null
return Container( ? ListView.builder(
margin: EdgeInsets.all(10.0), itemCount: model.getAllSharedRecordsByStatusResponse
child: Card( .getAllSharedRecordsByStatusList.length,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), itemBuilder: (BuildContext context, int index) {
color: Colors.white, return Container(
shape: RoundedRectangleBorder( margin: EdgeInsets.all(10.0),
borderRadius: BorderRadius.circular(10), child: Card(
), margin:
child: Container( EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
width: MediaQuery.of(context).size.width, color: Colors.white,
padding: EdgeInsets.all(10.0), shape: RoundedRectangleBorder(
child: Row( borderRadius: BorderRadius.circular(10),
crossAxisAlignment: CrossAxisAlignment.start, ),
mainAxisSize: MainAxisSize.max, child: Container(
children: <Widget>[ width: MediaQuery.of(context).size.width,
Expanded( padding: EdgeInsets.all(10.0),
flex: 3, child: Row(
child: Container( crossAxisAlignment:
margin: EdgeInsets.only( CrossAxisAlignment.start,
top: 2.0, left: 10.0, right: 20.0), mainAxisSize: MainAxisSize.max,
child: Column( children: <Widget>[
crossAxisAlignment: Expanded(
CrossAxisAlignment.start, flex: 3,
children: <Widget>[ child: Container(
Text( margin: EdgeInsets.only(
model.getAllSharedRecordsByStatusResponse top: 2.0,
.getAllSharedRecordsByStatusList[ left: 10.0,
index].patientName, right: 20.0),
style: TextStyle( child: Column(
fontSize: 14.0, crossAxisAlignment:
color: Colors.black, CrossAxisAlignment.start,
fontWeight: FontWeight.w500, children: <Widget>[
letterSpacing: 1.0)), Texts(
Text( model
'File No.' + .getAllSharedRecordsByStatusResponse
model.getAllSharedRecordsByStatusResponse .getAllSharedRecordsByStatusList[
.getAllSharedRecordsByStatusList[ index]
index].patientID.toString(), .patientName,
style: TextStyle( fontSize: 14,
fontSize: 14.0, color: Colors.black,
color: Colors.black, fontWeight: FontWeight.w500,
fontWeight: FontWeight.w500, ),
letterSpacing: 1.0)), SizedBox(
], height: 8,
),
Texts(
TranslationBase.of(context)
.fileno +
": " +
model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.patientID
.toString(),
fontSize: 14,
color: Colors.black,
fontWeight: FontWeight.w500,
)
],
),
),
), ),
), if (false)
), Expanded(
Expanded( flex: 2,
flex: 2, child: Container(
child: Container( // height: MediaQuery.of(context).size.height * 0.12,
// height: MediaQuery.of(context).size.height * 0.12, margin: EdgeInsets.only(top: 2.0),
margin: EdgeInsets.only(top: 2.0), child: Column(
child: Column( children: <Widget>[
children: <Widget>[ Container(
Container( child: SecondaryButton(
child: SecondaryButton( label: TranslationBase.of(
label: 'Update', context)
small: true, .updateInsurance,
textColor: Colors.white, small: true,
// color: Colors.grey, textColor: Colors.white,
// color: Colors.grey,
),
//height: 45,
// width:90
),
],
), ),
//height: 45,
// width:90
), ),
], )
), ],
), ),
) ),
],
), ),
), );
), })
); : Container(),
}),
), ),
Container( Container(
child: ListView.builder( child: ListView.builder(
@ -210,35 +229,40 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Text("TAMER FANASHEH ", Texts(
style: TextStyle( model.user.firstName +
fontSize: 14.0, " " +
color: Colors.black, model.user.lastName,
fontWeight: fontSize: 14,
FontWeight.w500, fontWeight: FontWeight.w500,
letterSpacing: 1.0)), color: Colors.black,
Text( ),
'File No.' + SizedBox(
model height: 8,
.insuranceUpdate[ ),
index] Texts(
.patientID TranslationBase.of(context)
.toString(), .fileno +
style: TextStyle( ": " +
fontSize: 14.0, model
color: Colors.black, .insuranceUpdate[
fontWeight: index]
FontWeight.w500, .patientID
letterSpacing: 1.0)), .toString(),
Text( fontSize: 14,
model.insuranceUpdate[index] fontWeight: FontWeight.w500,
.createdOn, color: Colors.black,
style: TextStyle( ),
fontSize: 14.0, SizedBox(
color: Colors.black, height: 8,
fontWeight: ),
FontWeight.w500, Texts(
letterSpacing: 1.0)), model.insuranceUpdate[index]
.createdOn,
fontSize: 14,
fontWeight: FontWeight.w500,
color: Colors.black,
),
], ],
), ),
), ),
@ -246,7 +270,6 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
Expanded( Expanded(
flex: 1, flex: 1,
child: Container( child: Container(
// height: MediaQuery.of(context).size.height * 0.12,
margin: EdgeInsets.only(top: 20.0), margin: EdgeInsets.only(top: 20.0),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
@ -257,15 +280,13 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: 13.5, left: 2.0), top: 13.5, left: 2.0),
child: Text( child: Texts(
model model.insuranceUpdate[index]
.insuranceUpdate[ .statusDescription,
index] textAlign: TextAlign.center,
.statusDescription, fontSize: 12,
textAlign: color: Colors.black,
TextAlign.center, ),
style: TextStyle(
fontSize: 12.0)),
), ),
], ],
), ),

@ -42,9 +42,9 @@ class _SplashScreenState extends State<SplashScreen> {
var data = await sharedPref.getObject(USER_PROFILE); var data = await sharedPref.getObject(USER_PROFILE);
if (data != null) { if (data != null) {
AuthenticatedUser userData = AuthenticatedUser.fromJson(data); AuthenticatedUser userData = AuthenticatedUser.fromJson(data);
Provider.of<ProjectViewModel>(context, listen: false).isLogin = true; // Provider.of<ProjectViewModel>(context, listen: false).isLogin = true;
authenticatedUserObject.isLogin = true; //authenticatedUserObject.isLogin = true;
authenticatedUserObject.user = userData; //authenticatedUserObject.user = userData;
} }
} }

@ -942,6 +942,7 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get completed => localizedValues['completed'][locale.languageCode]; String get completed => localizedValues['completed'][locale.languageCode];
String get cancelled => localizedValues['cancelled'][locale.languageCode]; String get cancelled => localizedValues['cancelled'][locale.languageCode];
String get requestMedicalReport => localizedValues['request-medical-report'][locale.languageCode]; String get requestMedicalReport => localizedValues['request-medical-report'][locale.languageCode];
String get insurCards => localizedValues['insur-cards'][locale.languageCode];
} }

@ -59,11 +59,13 @@ class AppScaffold extends StatelessWidget {
this.isShowDecPage = true, this.isShowDecPage = true,
this.isBottomBar, this.isBottomBar,
this.image, this.image,
this.infoList, this.imagesInfo}); this.infoList,
this.imagesInfo});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
AppGlobal.context = context; AppGlobal.context = context;
ProjectViewModel projectViewModel = Provider.of<ProjectViewModel>(context);
return Scaffold( return Scaffold(
backgroundColor: Theme.of(context).scaffoldBackgroundColor, backgroundColor: Theme.of(context).scaffoldBackgroundColor,
@ -75,13 +77,15 @@ class AppScaffold extends StatelessWidget {
headline6: headline6:
TextStyle(color: Colors.white, fontWeight: FontWeight.bold), TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
), ),
title: Texts( title: Text(
authenticatedUserObject.isLogin || !isShowDecPage authenticatedUserObject.isLogin || !isShowDecPage
? appBarTitle.toUpperCase() ? appBarTitle.toUpperCase()
: TranslationBase.of(context).serviceInformationTitle, : TranslationBase.of(context).serviceInformationTitle,
color: Colors.white, style: TextStyle(
bold: true, fontWeight: FontWeight.bold,
), color: Colors.white,
fontFamily:
projectViewModel.isArabic ? 'Cairo' : 'WorkSans')),
leading: Builder( leading: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return ArrowBack(); return ArrowBack();
@ -129,13 +133,17 @@ class AppScaffold extends StatelessWidget {
infoList: infoList, infoList: infoList,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
) )
: baseViewModel != null : baseViewModel != null
? NetworkBaseView( ? NetworkBaseView(
child: buildBodyWidget(), child: buildBodyWidget(),
baseViewModel: baseViewModel, baseViewModel: baseViewModel,
) )
: buildBodyWidget(), : buildBodyWidget(),
bottomSheet: (Provider.of<ProjectViewModel>(context, listen: false).isLogin || !isShowDecPage)?bottomSheet:null, bottomSheet:
(Provider.of<ProjectViewModel>(context, listen: false).isLogin ||
!isShowDecPage)
? bottomSheet
: null,
//floatingActionButton: floatingActionButton ?? floatingActionButton, //floatingActionButton: floatingActionButton ?? floatingActionButton,
// bottomNavigationBar: // bottomNavigationBar:
// this.isBottomBar == true ? BottomBarSearch() : SizedBox() // this.isBottomBar == true ? BottomBarSearch() : SizedBox()

Loading…
Cancel
Save