family files changes

merge-requests/428/head
Sultan Khan 4 years ago
parent fa929adfd9
commit 9010558dc9

@ -1484,4 +1484,5 @@ const Map localizedValues = {
"rateAppointment": {"en": "Rate Appointment", "ar": "سعر التعيين"},
"noInsuranceCardAttached": {"en": "Please attach your insurance card image to continue", "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),
Center(
child:
// TabBar(
// isScrollable: true,
// controller: _tabController,
// indicatorWeight: 5.0,
// indicatorSize: TabBarIndicatorSize.tab,
// labelPadding: EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
// unselectedLabelColor: Colors.grey[800],
// tabs: [
// Container(
// width: MediaQuery.of(context).size.width * 0.30,
// child: Center(
// child: AppText(TranslationBase.of(context).family),
// ),
// ),
// Container(
// width: MediaQuery.of(context).size.width * 0.30,
// child: Center(
// child: AppText(TranslationBase.of(context).request),
// ),
// ),
// ],
// ),
TabBar(
// TabBar(
// isScrollable: true,
// controller: _tabController,
// indicatorWeight: 5.0,
// indicatorSize: TabBarIndicatorSize.tab,
// labelPadding: EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
// unselectedLabelColor: Colors.grey[800],
// tabs: [
// Container(
// width: MediaQuery.of(context).size.width * 0.30,
// child: Center(
// child: AppText(TranslationBase.of(context).family),
// ),
// ),
// Container(
// width: MediaQuery.of(context).size.width * 0.30,
// child: Center(
// child: AppText(TranslationBase.of(context).request),
// ),
// ),
// ],
// ),
TabBar(
controller: _tabController,
indicatorWeight: 3.0,
indicatorSize: TabBarIndicatorSize.tab,
@ -361,7 +361,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
child: ExpansionTile(
title: Text(
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>[
FutureBuilder(
@ -374,50 +374,57 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
if (snapshot.hasError)
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable));
else
return Column(
children: [
Column(children: [
Padding(
padding: EdgeInsets.only(left: 10, right: 10),
child: Row(children: [
Expanded(flex: 3, child: AppText(TranslationBase.of(context).name)),
Expanded(flex: 1, child: AppText(TranslationBase.of(context).allow)),
Expanded(flex: 1, child: AppText(TranslationBase.of(context).reject)),
])),
Column(
children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map<Widget>((result) {
return Card(
child: Row(
children: <Widget>[
Expanded(flex: 3, child: Text(result.patientName)),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(
Icons.check_circle,
color: Colors.black,
),
onPressed: () {
acceptRemoveRequest(result.iD, 3, context);
},
)),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(
Icons.delete,
color: Colors.black,
),
onPressed: () {
acceptRemoveRequest(result.iD, 4, context);
},
))
return Container(
padding: EdgeInsets.all(15),
child: Card(
elevation: 3,
shape: cardRadius(8),
child: Column(
children: [
Column(children: [
Padding(
padding: EdgeInsets.all(10),
child: Row(children: [
Expanded(flex: 3, child: AppText(TranslationBase.of(context).name, fontWeight: FontWeight.w600)),
Expanded(flex: 1, child: AppText(TranslationBase.of(context).allow, fontWeight: FontWeight.w600)),
Expanded(flex: 1, child: AppText(TranslationBase.of(context).reject, fontWeight: FontWeight.w600)),
])),
Divider(color: Colors.black, height: 1),
Column(
children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map<Widget>((result) {
return Container(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(flex: 3, child: Text(result.patientName)),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(
Icons.check_circle,
color: Colors.black,
),
onPressed: () {
acceptRemoveRequest(result.iD, 3, context);
},
)),
Expanded(
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(
title: Text(
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>[
FutureBuilder(
@ -441,30 +448,40 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable));
else
return Container(
padding: EdgeInsets.all(15),
height: SizeConfig.screenHeight * .3,
child: SingleChildScrollView(
child: Column(
children: [
Padding(padding: EdgeInsets.only(left: 10, right: 10), child: Row(children: [Expanded(flex: 3, child: AppText(TranslationBase.of(context).theName))])),
Column(
children: snapshot.data.getAllSharedRecordsByStatusList.map<Widget>((result) {
return Padding(
child: Card(
elevation: 3,
shape: cardRadius(8),
child: SingleChildScrollView(
child: Column(
children: [
Padding(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(flex: 3, child: Text(result.patientName)),
Expanded(
flex: 2,
child: AppText(
result.statusDescription,
color: result.status == 3 ? Colors.green : Colors.red,
)),
],
));
}).toList(),
)
],
)));
child: Row(children: [
Expanded(flex: 3, child: AppText(TranslationBase.of(context).theName, fontWeight: FontWeight.w600)),
Expanded(flex: 2, child: AppText(TranslationBase.of(context).status, fontWeight: FontWeight.w600))
])),
Divider(color: Colors.black, height: 1),
Column(
children: snapshot.data.getAllSharedRecordsByStatusList.map<Widget>((result) {
return Padding(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
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(
title: Text(
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>[
FutureBuilder(
@ -486,39 +503,45 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
if (snapshot.hasError)
return Padding(padding: EdgeInsets.all(10), child: Text(TranslationBase.of(context).noDataAvailable));
else
return Column(
children: [
Column(children: [
Padding(
padding: EdgeInsets.only(left: 10, right: 10),
child: Row(children: [
Expanded(flex: 3, child: AppText(TranslationBase.of(context).name)),
Expanded(flex: 1, child: AppText(TranslationBase.of(context).delete)),
])),
Column(
children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map<Widget>((result) {
return Padding(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(flex: 3, child: AppText(result.patientName)),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(
Icons.delete,
color: Colors.black,
),
onPressed: () {
deactivateRequest(result.iD, 5, context);
},
)),
],
));
}).toList())
])
],
);
return Container(
padding: EdgeInsets.all(15),
child: Card(
elevation: 3,
shape: cardRadius(8),
child: Column(
children: [
Column(children: [
Padding(
padding: EdgeInsets.all(10),
child: Row(children: [
Expanded(flex: 3, child: AppText(TranslationBase.of(context).name)),
Expanded(flex: 1, child: AppText(TranslationBase.of(context).delete)),
])),
Divider(color: Colors.black),
Column(
children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.map<Widget>((result) {
return Padding(
padding: EdgeInsets.all(10),
child: Row(
children: <Widget>[
Expanded(flex: 3, child: AppText(result.patientName)),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(
Icons.delete,
color: Colors.black,
),
onPressed: () {
deactivateRequest(result.iD, 5, context);
},
)),
],
));
}).toList())
])
],
)));
}
})
],

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

Loading…
Cancel
Save