working on referral screen bugs

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

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

@ -23,7 +23,6 @@ class MyReferralPatientScreen extends StatelessWidget {
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
isShowAppBar: false,
appBarTitle: TranslationBase.of(context).referPatient,
body: model.pendingReferral == null || model.pendingReferral.length == 0
? Center(
@ -34,35 +33,13 @@ class MyReferralPatientScreen extends StatelessWidget {
)
: SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(top: 50),
// color: Colors.white,
height: MediaQuery.of(context).size.height,
// height: MediaQuery.of(context).size.height,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 100),
// 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,
// ),
// ),
// SizedBox(height: 50),
...List.generate(
model.pendingReferral.length,
(index) => InkWell(
@ -74,10 +51,11 @@ class MyReferralPatientScreen extends StatelessWidget {
},
child: PatientReferralItemWidget(
"${model.pendingReferral[index].patientID}",
patientInfo:model.pendingReferral[index] ,
patientInfo: model.pendingReferral[index],
patientName:
model.pendingReferral[index].patientName,
referralStatus: null,
referralStatus:
model.pendingReferral[index].referralStatus,
isReferredTo: false,
isSameBranch: model.pendingReferral[index]
.isReferralDoctorSameBranch,

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

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

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

Loading…
Cancel
Save