Merge branch 'fixes_before_live' into 'development'

fix show count in home page

See merge request Cloud_Solution/doctor_app_flutter!794
merge-requests/796/merge
Mohammad Aljammal 5 years ago
commit 794c935d05

@ -665,7 +665,7 @@ const Map<String, Map<String, String>> localizedValues = {
'noteVerify': {'en': 'Verify', 'ar': 'تحقق'}, 'noteVerify': {'en': 'Verify', 'ar': 'تحقق'},
'noteConfirm': {'en': 'Confirm', 'ar': 'تاكيد'}, 'noteConfirm': {'en': 'Confirm', 'ar': 'تاكيد'},
'noteAdd': {'en': 'Add ', 'ar': 'اضف '}, 'noteAdd': {'en': 'Add ', 'ar': 'اضف '},
'noteUpdateْْ': {'en': 'Update ', 'ar': 'تحديت'}, 'noteUpdate': {'en': 'Update ', 'ar': 'تحديت'},
'orderSheet': {'en': 'Order Sheet', 'ar': 'ورقة الطلب'}, 'orderSheet': {'en': 'Order Sheet', 'ar': 'ورقة الطلب'},
'order': {'en': 'Order', 'ar': 'الطلب'}, 'order': {'en': 'Order', 'ar': 'الطلب'},
'sheet': {'en': 'Sheet', 'ar': 'ورقة'}, 'sheet': {'en': 'Sheet', 'ar': 'ورقة'},

@ -148,7 +148,7 @@ class DoctorReplayChat extends StatelessWidget {
child: AppText( child: AppText(
reply.patientName reply.patientName
.toString(), .toString(),
fontSize: 14, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3,
fontFamily: 'Poppins', fontFamily: 'Poppins',
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -170,7 +170,7 @@ class DoctorReplayChat extends StatelessWidget {
], ],
), ),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
AppText( AppText(
@ -178,11 +178,11 @@ class DoctorReplayChat extends StatelessWidget {
fontWeight: FontWeight fontWeight: FontWeight
.w500, .w500,
color: Colors.white, color: Colors.white,
fontSize: 14, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8,
), ),
AppText( AppText(
reply.createdOn !=null?AppDateUtils.getHour(AppDateUtils.getDateTimeFromServerFormat(reply.createdOn)):AppDateUtils.getHour(DateTime.now()), reply.createdOn !=null?AppDateUtils.getHour(AppDateUtils.getDateTimeFromServerFormat(reply.createdOn)):AppDateUtils.getHour(DateTime.now()),
fontSize: 14, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8,
fontFamily: 'Poppins', fontFamily: 'Poppins',
color: Colors.white, color: Colors.white,
// fontSize: 18 // fontSize: 18
@ -223,6 +223,7 @@ class DoctorReplayChat extends StatelessWidget {
SizedBox(height: 30,), SizedBox(height: 30,),
SizedBox(height: 30,), SizedBox(height: 30,),
if(reply.doctorResponse != null && reply.doctorResponse.isNotEmpty)
Align( Align(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: Container( child: Container(
@ -267,7 +268,7 @@ class DoctorReplayChat extends StatelessWidget {
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
child: AppText( child: AppText(
previousModel.doctorProfile.doctorName, previousModel.doctorProfile.doctorName,
fontSize: 14, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3,
fontFamily: 'Poppins', fontFamily: 'Poppins',
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -278,18 +279,18 @@ class DoctorReplayChat extends StatelessWidget {
], ],
), ),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
AppText( AppText(
reply.createdOn !=null?AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(reply.createdOn)):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()), reply.createdOn !=null?AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(reply.createdOn)):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()),
fontWeight: FontWeight fontWeight: FontWeight
.w500, .w500,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
fontSize: 14, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8,
), ),
AppText( AppText(
reply.createdOn !=null?AppDateUtils.getHour(AppDateUtils.getDateTimeFromServerFormat(reply.createdOn)):AppDateUtils.getHour(DateTime.now()), reply.createdOn !=null?AppDateUtils.getHour(AppDateUtils.getDateTimeFromServerFormat(reply.createdOn)):AppDateUtils.getHour(DateTime.now()),
fontSize: 14, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8,
fontFamily: 'Poppins', fontFamily: 'Poppins',
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
// fontSize: 18 // fontSize: 18
@ -358,16 +359,23 @@ class DoctorReplayChat extends StatelessWidget {
suffixIcon: FontAwesomeIcons.arrowRight, suffixIcon: FontAwesomeIcons.arrowRight,
suffixIconColor: Colors.green, suffixIconColor: Colors.green,
onSuffixTap: ()async { onSuffixTap: ()async {
GifLoaderDialogUtils.showMyDialog(context);
await previousModel.createDoctorResponse(msgController.text, reply); if(msgController.text.isEmpty){
if(previousModel.state == ViewState.ErrorLocal) { Helpers.showErrorToast("Please Add Doctor Reply");
Helpers.showErrorToast(previousModel.error); return;
} else { } else {
DrAppToastMsg.showSuccesToast("Thank you for your replay "); GifLoaderDialogUtils.showMyDialog(context);
await previousModel.getDoctorReply(); await previousModel.createDoctorResponse(msgController.text, reply);
Navigator.pop(context); if(previousModel.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(previousModel.error);
} else {
DrAppToastMsg.showSuccesToast("Thank you for your replay ");
await previousModel.getDoctorReply();
Navigator.pop(context);
}
GifLoaderDialogUtils.hideDialog(context);
} }
GifLoaderDialogUtils.hideDialog(context);

@ -161,6 +161,9 @@ class _InPatientPageState extends State<InPatientPage> {
"isSearch": false, "isSearch": false,
"isInpatient": true, "isInpatient": true,
"arrivalType": "1", "arrivalType": "1",
"isMyPatient":widget.patientSearchViewModel.filteredInPatientItems[index]
.doctorId ==
widget.patientSearchViewModel.doctorProfile.doctorID,
}); });
}, },
); );

@ -39,6 +39,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
bool isFromLiveCare = false; bool isFromLiveCare = false;
bool isInpatient = false; bool isInpatient = false;
bool isMyPatient = false;
bool isCallFinished = false; bool isCallFinished = false;
bool isDischargedPatient = false; bool isDischargedPatient = false;
bool isSearchAndOut = false; bool isSearchAndOut = false;
@ -97,6 +98,9 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
if (routeArgs.containsKey("isCallFinished")) { if (routeArgs.containsKey("isCallFinished")) {
isCallFinished = routeArgs['isCallFinished']; isCallFinished = routeArgs['isCallFinished'];
} }
if (routeArgs.containsKey("isMyPatient")) {
isMyPatient = routeArgs['isMyPatient'];
}
if (isInpatient) if (isInpatient)
_activeTab = 0; _activeTab = 0;
else else
@ -132,7 +136,9 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
if (isFromLiveCare && patient.patientStatus == 1) await model.addPatientToDoctorList(patient.vcId); if (isFromLiveCare && patient.patientStatus == 1) await model.addPatientToDoctorList(patient.vcId);
}, },
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
appBarTitle: TranslationBase.of(context).patientProfile, appBarTitle: TranslationBase.of(context).patientProfile,
isShowAppBar: false, isShowAppBar: false,
body: Column( body: Column(
@ -198,11 +204,13 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
), ),
], ],
), ),
if ( isInpatient? true:isFromLiveCare if ( (isInpatient && isMyPatient )? true:isFromLiveCare
? patient.episodeNo != null ? patient.episodeNo != null
: patient.patientStatusType != null && patient.patientStatusType == 43) : patient.patientStatusType != null && patient.patientStatusType == 43)
BaseView<SOAPViewModel>( BaseView<SOAPViewModel>(
onModelReady: (model) async {}, onModelReady: (model) async {
model.getDoctorProfile();
},
builder: (_, model, w) => Positioned( builder: (_, model, w) => Positioned(
top: 180, top: 180,
left: 20, left: 20,
@ -253,7 +261,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
AppButton( AppButton(
title: title:
"${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}", "${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}",
color: isInpatient || isFromLiveCare color: (isInpatient &&isMyPatient ) || isFromLiveCare
? Colors.red.shade700 ? Colors.red.shade700
: patient.patientStatusType == 43 : patient.patientStatusType == 43
? Colors.red.shade700 ? Colors.red.shade700

Loading…
Cancel
Save