working on referral screen bugs

merge-requests/377/head
mosazaid 5 years ago
parent b3b2beef70
commit 27ff179750

@ -126,7 +126,7 @@ class MyReferralDetailScreen extends StatelessWidget {
PatientReferralItemWidget( PatientReferralItemWidget(
"${pendingReferral.patientID}", "${pendingReferral.patientID}",
patientName: pendingReferral.patientName, patientName: pendingReferral.patientName,
referralStatus: null, referralStatus: pendingReferral.referralStatus,
isReferredTo: false, isReferredTo: false,
isSameBranch: isSameBranch:
pendingReferral.isReferralDoctorSameBranch, pendingReferral.isReferralDoctorSameBranch,
@ -135,6 +135,7 @@ class MyReferralDetailScreen extends StatelessWidget {
clinicDescription: null, clinicDescription: null,
remark: pendingReferral.remarksFromSource, remark: pendingReferral.remarksFromSource,
referredOn: pendingReferral.referredOn, referredOn: pendingReferral.referredOn,
patientInfo: pendingReferral,
), ),
SizedBox( SizedBox(
child: ProfileMedicalInfoWidgetSearch( child: ProfileMedicalInfoWidgetSearch(

@ -23,7 +23,6 @@ class MyReferralPatientScreen extends StatelessWidget {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false, isShowAppBar: false,
appBarTitle: TranslationBase.of(context).referPatient, appBarTitle: TranslationBase.of(context).referPatient,
body: model.pendingReferral == null || model.pendingReferral.length == 0 body: model.pendingReferral == null || model.pendingReferral.length == 0
? Center( ? Center(
@ -34,35 +33,13 @@ class MyReferralPatientScreen extends StatelessWidget {
) )
: SingleChildScrollView( : SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.only(top: 50),
// color: Colors.white, // color: Colors.white,
height: MediaQuery.of(context).size.height, // height: MediaQuery.of(context).size.height,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(height: 100), // SizedBox(height: 50),
// ProfileWelcomeWidget(
// AppText(
// authProvider.selectedClinicName != null
// ? authProvider.selectedClinicName
// : authProvider.doctorProfile.clinicDescription,
// fontSize: SizeConfig.textMultiplier * 1.7,
// color: Colors.white,
// textAlign: TextAlign.center,
// ),
// height: 100,
// ),
// SizedBox(
// height: 16,
// ),
// Padding(
// padding: const EdgeInsets.symmetric(horizontal: 16.0),
// child: AppText(
// TranslationBase.of(context).myReferralPatient,
// color: Colors.black,
// fontWeight: FontWeight.bold,
// fontSize: 16,
// ),
// ),
...List.generate( ...List.generate(
model.pendingReferral.length, model.pendingReferral.length,
(index) => InkWell( (index) => InkWell(
@ -74,10 +51,11 @@ class MyReferralPatientScreen extends StatelessWidget {
}, },
child: PatientReferralItemWidget( child: PatientReferralItemWidget(
"${model.pendingReferral[index].patientID}", "${model.pendingReferral[index].patientID}",
patientInfo:model.pendingReferral[index] , patientInfo: model.pendingReferral[index],
patientName: patientName:
model.pendingReferral[index].patientName, model.pendingReferral[index].patientName,
referralStatus: null, referralStatus:
model.pendingReferral[index].referralStatus,
isReferredTo: false, isReferredTo: false,
isSameBranch: model.pendingReferral[index] isSameBranch: model.pendingReferral[index]
.isReferralDoctorSameBranch, .isReferralDoctorSameBranch,

@ -92,7 +92,8 @@ class _PatientReferralScreen extends State<PatientReferralScreen>
controller: _tabController, controller: _tabController,
children: <Widget>[ children: <Widget>[
MyReferralPatientScreen(), MyReferralPatientScreen(),
MyReferredPatient(), ReferredPatientScreen(),
// MyReferredPatient(),
], ],
), ),
) )

@ -15,6 +15,7 @@ class ReferredPatientScreen extends StatelessWidget {
onModelReady: (model) => model.getMyReferredPatient(), onModelReady: (model) => model.getMyReferredPatient(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false,
appBarTitle: TranslationBase.of(context).referredPatient, appBarTitle: TranslationBase.of(context).referredPatient,
body: model.listMyReferredPatientModel == null || body: model.listMyReferredPatientModel == null ||
model.listMyReferredPatientModel.length == 0 model.listMyReferredPatientModel.length == 0

@ -39,7 +39,7 @@ class PatientReferralItemWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
margin: EdgeInsets.all(16.0), margin: EdgeInsets.only(left: 16.0, right: 16.0, top: 8.0),
child: Column( child: Column(
children: [ children: [
// TODO should be removed by mousa // TODO should be removed by mousa
@ -257,14 +257,14 @@ class PatientReferralItemWidget extends StatelessWidget {
// indent: 0, // indent: 0,
// endIndent: 0, // endIndent: 0,
// ), // ),
SizedBox( // SizedBox(
height: 8, // height: 8,
), // ),
Container( Container(
child: CardWithBgWidget( child: CardWithBgWidget(
bgColor: patientInfo.referralStatus == 'Pending' bgColor: referralStatus != null ? referralStatus == 'Pending'
? Colors.orange[400] ? Colors.orange[400]
: Colors.red[800], : Colors.red[800] : Colors.grey[500],
hasBorder: false, hasBorder: false,
widget: Container( widget: Container(
// padding: EdgeInsets.only(left: 20, right: 0, bottom: 0), // padding: EdgeInsets.only(left: 20, right: 0, bottom: 0),
@ -283,12 +283,11 @@ class PatientReferralItemWidget extends StatelessWidget {
color: Colors.black), color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: patientInfo.referralStatus, text: referralStatus != null ? referralStatus : "",
style: TextStyle( style: TextStyle(
color: patientInfo.referralStatus == color: referralStatus != null ? referralStatus == 'Pending'
'Pending'
? Colors.orange[400] ? Colors.orange[400]
: Colors.red[800], : Colors.red[800] : Colors.grey[500],
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 18)), fontSize: 18)),

Loading…
Cancel
Save