family files changes

merge-update-with-lab-changes
Sultan Khan 5 years ago
parent fa929adfd9
commit 9010558dc9

@ -1484,4 +1484,5 @@ const Map localizedValues = {
"rateAppointment": {"en": "Rate Appointment", "ar": "سعر التعيين"}, "rateAppointment": {"en": "Rate Appointment", "ar": "سعر التعيين"},
"noInsuranceCardAttached": {"en": "Please attach your insurance card image to continue", "ar": "يرجى إرفاق صورة بطاقة التأمين الخاصة بك للمتابعة"}, "noInsuranceCardAttached": {"en": "Please attach your insurance card image to continue", "ar": "يرجى إرفاق صورة بطاقة التأمين الخاصة بك للمتابعة"},
"bodyMassIndex": {"en": "Body Mass Index is: ", "ar": "مؤشر كتلة الجسم هو:"}, "bodyMassIndex": {"en": "Body Mass Index is: ", "ar": "مؤشر كتلة الجسم هو:"},
"years": {"en": "Years", "ar": "سنوات"},
}; };

@ -120,29 +120,29 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
// color: Colors.white), // color: Colors.white),
Center( Center(
child: child:
// TabBar( // TabBar(
// isScrollable: true, // isScrollable: true,
// controller: _tabController, // controller: _tabController,
// indicatorWeight: 5.0, // indicatorWeight: 5.0,
// indicatorSize: TabBarIndicatorSize.tab, // indicatorSize: TabBarIndicatorSize.tab,
// labelPadding: EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), // labelPadding: EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
// unselectedLabelColor: Colors.grey[800], // unselectedLabelColor: Colors.grey[800],
// tabs: [ // tabs: [
// Container( // Container(
// width: MediaQuery.of(context).size.width * 0.30, // width: MediaQuery.of(context).size.width * 0.30,
// child: Center( // child: Center(
// child: AppText(TranslationBase.of(context).family), // child: AppText(TranslationBase.of(context).family),
// ), // ),
// ), // ),
// Container( // Container(
// width: MediaQuery.of(context).size.width * 0.30, // width: MediaQuery.of(context).size.width * 0.30,
// child: Center( // child: Center(
// child: AppText(TranslationBase.of(context).request), // child: AppText(TranslationBase.of(context).request),
// ), // ),
// ), // ),
// ], // ],
// ), // ),
TabBar( TabBar(
controller: _tabController, controller: _tabController,
indicatorWeight: 3.0, indicatorWeight: 3.0,
indicatorSize: TabBarIndicatorSize.tab, indicatorSize: TabBarIndicatorSize.tab,
@ -361,7 +361,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
child: ExpansionTile( child: ExpansionTile(
title: Text( title: Text(
TranslationBase.of(context).userViewRequest, TranslationBase.of(context).userViewRequest,
style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold), style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, color: Colors.black),
), ),
children: <Widget>[ children: <Widget>[
FutureBuilder( FutureBuilder(
@ -374,50 +374,57 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
if (snapshot.hasError) if (snapshot.hasError)
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable)); return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable));
else else
return Column( return Container(
children: [ padding: EdgeInsets.all(15),
Column(children: [ child: Card(
Padding( elevation: 3,
padding: EdgeInsets.only(left: 10, right: 10), shape: cardRadius(8),
child: Row(children: [ child: Column(
Expanded(flex: 3, child: AppText(TranslationBase.of(context).name)), children: [
Expanded(flex: 1, child: AppText(TranslationBase.of(context).allow)), Column(children: [
Expanded(flex: 1, child: AppText(TranslationBase.of(context).reject)), Padding(
])), padding: EdgeInsets.all(10),
Column( child: Row(children: [
children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map<Widget>((result) { Expanded(flex: 3, child: AppText(TranslationBase.of(context).name, fontWeight: FontWeight.w600)),
return Card( Expanded(flex: 1, child: AppText(TranslationBase.of(context).allow, fontWeight: FontWeight.w600)),
child: Row( Expanded(flex: 1, child: AppText(TranslationBase.of(context).reject, fontWeight: FontWeight.w600)),
children: <Widget>[ ])),
Expanded(flex: 3, child: Text(result.patientName)), Divider(color: Colors.black, height: 1),
Expanded( Column(
flex: 1, children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map<Widget>((result) {
child: IconButton( return Container(
icon: Icon( padding: EdgeInsets.all(10),
Icons.check_circle, child: Row(
color: Colors.black, children: <Widget>[
), Expanded(flex: 3, child: Text(result.patientName)),
onPressed: () { Expanded(
acceptRemoveRequest(result.iD, 3, context); flex: 1,
}, child: IconButton(
)), icon: Icon(
Expanded( Icons.check_circle,
flex: 1, color: Colors.black,
child: IconButton( ),
icon: Icon( onPressed: () {
Icons.delete, acceptRemoveRequest(result.iD, 3, context);
color: Colors.black, },
), )),
onPressed: () { Expanded(
acceptRemoveRequest(result.iD, 4, context); flex: 1,
}, child: IconButton(
)) icon: Icon(
Icons.delete,
color: Colors.black,
),
onPressed: () {
acceptRemoveRequest(result.iD, 4, context);
},
))
],
));
}).toList())
])
], ],
)); )));
}).toList())
])
],
);
} }
}) })
], ],
@ -427,7 +434,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
child: ExpansionTile( child: ExpansionTile(
title: Text( title: Text(
TranslationBase.of(context).sentRequest, TranslationBase.of(context).sentRequest,
style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold), style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, color: Colors.black),
), ),
children: <Widget>[ children: <Widget>[
FutureBuilder( FutureBuilder(
@ -441,30 +448,40 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable)); return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable));
else else
return Container( return Container(
padding: EdgeInsets.all(15),
height: SizeConfig.screenHeight * .3, height: SizeConfig.screenHeight * .3,
child: SingleChildScrollView( child: Card(
child: Column( elevation: 3,
children: [ shape: cardRadius(8),
Padding(padding: EdgeInsets.only(left: 10, right: 10), child: Row(children: [Expanded(flex: 3, child: AppText(TranslationBase.of(context).theName))])), child: SingleChildScrollView(
Column( child: Column(
children: snapshot.data.getAllSharedRecordsByStatusList.map<Widget>((result) { children: [
return Padding( Padding(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: Row( child: Row(children: [
children: <Widget>[ Expanded(flex: 3, child: AppText(TranslationBase.of(context).theName, fontWeight: FontWeight.w600)),
Expanded(flex: 3, child: Text(result.patientName)), Expanded(flex: 2, child: AppText(TranslationBase.of(context).status, fontWeight: FontWeight.w600))
Expanded( ])),
flex: 2, Divider(color: Colors.black, height: 1),
child: AppText( Column(
result.statusDescription, children: snapshot.data.getAllSharedRecordsByStatusList.map<Widget>((result) {
color: result.status == 3 ? Colors.green : Colors.red, return Padding(
)), padding: EdgeInsets.all(10),
], child: Row(
)); children: <Widget>[
}).toList(), Expanded(flex: 3, child: Text(result.patientName)),
) Expanded(
], flex: 2,
))); child: AppText(
result.statusDescription,
color: result.status == 3 ? Colors.green : Colors.red,
)),
],
));
}).toList(),
)
],
))));
} }
}) })
], ],
@ -473,7 +490,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
child: ExpansionTile( child: ExpansionTile(
title: Text( title: Text(
TranslationBase.of(context).userView, TranslationBase.of(context).userView,
style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold), style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold, color: Colors.black),
), ),
children: <Widget>[ children: <Widget>[
FutureBuilder( FutureBuilder(
@ -486,39 +503,45 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
if (snapshot.hasError) if (snapshot.hasError)
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable)); return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable));
else else
return Column( return Container(
children: [ padding: EdgeInsets.all(15),
Column(children: [ child: Card(
Padding( elevation: 3,
padding: EdgeInsets.only(left: 10, right: 10), shape: cardRadius(8),
child: Row(children: [ child: Column(
Expanded(flex: 3, child: AppText(TranslationBase.of(context).name)), children: [
Expanded(flex: 1, child: AppText(TranslationBase.of(context).delete)), Column(children: [
])), Padding(
Column( padding: EdgeInsets.all(10),
children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map<Widget>((result) { child: Row(children: [
return Padding( Expanded(flex: 3, child: AppText(TranslationBase.of(context).name)),
padding: EdgeInsets.all(10), Expanded(flex: 1, child: AppText(TranslationBase.of(context).delete)),
child: Row( ])),
children: <Widget>[ Divider(color: Colors.black),
Expanded(flex: 3, child: AppText(result.patientName)), Column(
Expanded( children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map<Widget>((result) {
flex: 1, return Padding(
child: IconButton( padding: EdgeInsets.all(10),
icon: Icon( child: Row(
Icons.delete, children: <Widget>[
color: Colors.black, Expanded(flex: 3, child: AppText(result.patientName)),
), Expanded(
onPressed: () { flex: 1,
deactivateRequest(result.iD, 5, context); child: IconButton(
}, icon: Icon(
)), Icons.delete,
], color: Colors.black,
)); ),
}).toList()) onPressed: () {
]) deactivateRequest(result.iD, 5, context);
], },
); )),
],
));
}).toList())
])
],
)));
} }
}) })
], ],

@ -8,7 +8,7 @@ import 'package:hexcolor/hexcolor.dart';
/// ///
//final projectProvider = Provider.of(AppGlobal.context); //final projectProvider = Provider.of(AppGlobal.context);
final bluePrimary = Color(0xFF3F51B5); final bluePrimary = Color(0xFF00000);
final blueAccent = Color(0xFFFF9800); final blueAccent = Color(0xFFFF9800);
final blueBackground = Color(0xFFFFFFFF); final blueBackground = Color(0xFFFFFFFF);

Loading…
Cancel
Save