fix insurance update

fix_insurance_update
Mohammad Aljammal 4 years ago
parent 9fecf8e89f
commit 554ed1b50a

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

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
@ -35,7 +36,7 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
onModelReady: (model) => model.getInsuranceUpdated(),
builder: (BuildContext context, InsuranceViewModel model, Widget child) =>
AppScaffold(
appBarTitle: 'Insurance Cards',
appBarTitle: TranslationBase.of(context).insurCards,
isShowAppBar: true,
baseViewModel: model,
body: Scaffold(
@ -63,7 +64,7 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
controller: _tabController,
isScrollable: true,
indicatorWeight: 4.0,
indicatorColor: Colors.red,
indicatorColor: Theme.of(context).primaryColor,
labelColor: Theme.of(context).primaryColor,
labelPadding: EdgeInsets.symmetric(
horizontal: 13.0, vertical: 2.0),
@ -72,13 +73,14 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
Container(
width: MediaQuery.of(context).size.width * 0.35,
child: Center(
child: Texts('Card'),
child: Texts(TranslationBase.of(context)
.updateInsuranceSubtitle),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.35,
child: Center(
child: Texts('History'),
child: Texts(TranslationBase.of(context).history),
),
),
],
@ -97,15 +99,18 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
controller: _tabController,
children: <Widget>[
Container(
child:
model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList!=null?
ListView.builder(
itemCount: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.length,
child: model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList !=
null
? ListView.builder(
itemCount: model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList.length,
itemBuilder: (BuildContext context, int index) {
return Container(
margin: EdgeInsets.all(10.0),
child: Card(
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,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
@ -114,37 +119,45 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.all(10.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Expanded(
flex: 3,
child: Container(
margin: EdgeInsets.only(
top: 2.0, left: 10.0, right: 20.0),
top: 2.0,
left: 10.0,
right: 20.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Text(
model.getAllSharedRecordsByStatusResponse
Texts(
model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index].patientName,
style: TextStyle(
fontSize: 14.0,
index]
.patientName,
fontSize: 14,
color: Colors.black,
fontWeight: FontWeight.w500,
letterSpacing: 1.0)),
Text(
'File No.' +
model.getAllSharedRecordsByStatusResponse
),
Texts(
TranslationBase.of(context)
.fileno +
": " +
model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index].patientID.toString(),
style: TextStyle(
fontSize: 14.0,
index]
.patientID
.toString(),
fontSize: 14,
color: Colors.black,
fontWeight: FontWeight.w500,
letterSpacing: 1.0)),
)
],
),
),
@ -158,7 +171,9 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
children: <Widget>[
Container(
child: SecondaryButton(
label: 'Update',
label: TranslationBase.of(
context)
.updateInsurance,
small: true,
textColor: Colors.white,
// color: Colors.grey,
@ -175,7 +190,8 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
),
),
);
}):Container(),
})
: Container(),
),
Container(
child: ListView.builder(
@ -212,35 +228,34 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Text("TAMER FANASHEH ",
Text(
model.user.firstName +
" " +
model.user.lastName,
style: TextStyle(
fontSize: 14.0,
color: Colors.black,
fontWeight:
FontWeight.w500,
letterSpacing: 1.0)),
Text(
'File No.' +
Texts(
TranslationBase.of(context)
.fileno +
": " +
model
.insuranceUpdate[
index]
.patientID
.toString(),
style: TextStyle(
fontSize: 14.0,
fontSize: 14,
color: Colors.black,
fontWeight:
FontWeight.w500,
letterSpacing: 1.0)),
Text(
),
Texts(
model.insuranceUpdate[index]
.createdOn,
style: TextStyle(
fontSize: 14.0,
fontSize: 14,
color: Colors.black,
fontWeight:
FontWeight.w500,
letterSpacing: 1.0)),
),
],
),
),
@ -248,7 +263,6 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
Expanded(
flex: 1,
child: Container(
// height: MediaQuery.of(context).size.height * 0.12,
margin: EdgeInsets.only(top: 20.0),
child: Column(
children: <Widget>[
@ -259,15 +273,13 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
Container(
margin: EdgeInsets.only(
top: 13.5, left: 2.0),
child: Text(
model
.insuranceUpdate[
index]
child: Texts(
model.insuranceUpdate[index]
.statusDescription,
textAlign:
TextAlign.center,
style: TextStyle(
fontSize: 12.0)),
textAlign: TextAlign.center,
fontSize: 12,
color: Colors.black,
),
),
],
),

@ -942,6 +942,7 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get completed => localizedValues['completed'][locale.languageCode];
String get cancelled => localizedValues['cancelled'][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.isBottomBar,
this.image,
this.infoList, this.imagesInfo});
this.infoList,
this.imagesInfo});
@override
Widget build(BuildContext context) {
AppGlobal.context = context;
ProjectViewModel projectViewModel = Provider.of<ProjectViewModel>(context);
return Scaffold(
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
@ -75,13 +77,15 @@ class AppScaffold extends StatelessWidget {
headline6:
TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
),
title: Texts(
title: Text(
authenticatedUserObject.isLogin || !isShowDecPage
? appBarTitle.toUpperCase()
: TranslationBase.of(context).serviceInformationTitle,
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.white,
bold: true,
),
fontFamily:
projectViewModel.isArabic ? 'Cairo' : 'WorkSans')),
leading: Builder(
builder: (BuildContext context) {
return ArrowBack();
@ -135,7 +139,11 @@ class AppScaffold extends StatelessWidget {
baseViewModel: baseViewModel,
)
: 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,
// bottomNavigationBar:
// this.isBottomBar == true ? BottomBarSearch() : SizedBox()

Loading…
Cancel
Save