fix show count in home page

merge-requests/794/head
Elham Rababh 4 years ago
parent 1d6026f9fd
commit 1712874c87

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

@ -148,7 +148,7 @@ class DoctorReplayChat extends StatelessWidget {
child: AppText(
reply.patientName
.toString(),
fontSize: 14,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3,
fontFamily: 'Poppins',
color: Colors.white,
fontWeight: FontWeight.bold,
@ -170,7 +170,7 @@ class DoctorReplayChat extends StatelessWidget {
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
AppText(
@ -178,11 +178,11 @@ class DoctorReplayChat extends StatelessWidget {
fontWeight: FontWeight
.w500,
color: Colors.white,
fontSize: 14,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8,
),
AppText(
reply.createdOn !=null?AppDateUtils.getHour(AppDateUtils.getDateTimeFromServerFormat(reply.createdOn)):AppDateUtils.getHour(DateTime.now()),
fontSize: 14,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8,
fontFamily: 'Poppins',
color: Colors.white,
// fontSize: 18
@ -223,6 +223,7 @@ class DoctorReplayChat extends StatelessWidget {
SizedBox(height: 30,),
SizedBox(height: 30,),
if(reply.doctorResponse != null && reply.doctorResponse.isNotEmpty)
Align(
alignment: Alignment.centerRight,
child: Container(
@ -267,7 +268,7 @@ class DoctorReplayChat extends StatelessWidget {
width: MediaQuery.of(context).size.width * 0.35,
child: AppText(
previousModel.doctorProfile.doctorName,
fontSize: 14,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3,
fontFamily: 'Poppins',
color: Color(0xFF2B353E),
fontWeight: FontWeight.bold,
@ -278,18 +279,18 @@ class DoctorReplayChat extends StatelessWidget {
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
AppText(
reply.createdOn !=null?AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(reply.createdOn)):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()),
fontWeight: FontWeight
.w500,
color: Color(0xFF2B353E),
fontSize: 14,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8,
),
AppText(
reply.createdOn !=null?AppDateUtils.getHour(AppDateUtils.getDateTimeFromServerFormat(reply.createdOn)):AppDateUtils.getHour(DateTime.now()),
fontSize: 14,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8,
fontFamily: 'Poppins',
color: Color(0xFF2B353E),
// fontSize: 18
@ -358,16 +359,23 @@ class DoctorReplayChat extends StatelessWidget {
suffixIcon: FontAwesomeIcons.arrowRight,
suffixIconColor: Colors.green,
onSuffixTap: ()async {
GifLoaderDialogUtils.showMyDialog(context);
await previousModel.createDoctorResponse(msgController.text, reply);
if(previousModel.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(previousModel.error);
if(msgController.text.isEmpty){
Helpers.showErrorToast("Please Add Doctor Reply");
return;
} else {
DrAppToastMsg.showSuccesToast("Thank you for your replay ");
await previousModel.getDoctorReply();
Navigator.pop(context);
GifLoaderDialogUtils.showMyDialog(context);
await previousModel.createDoctorResponse(msgController.text, reply);
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,
"isInpatient": true,
"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 isInpatient = false;
bool isMyPatient = false;
bool isCallFinished = false;
bool isDischargedPatient = false;
bool isSearchAndOut = false;
@ -97,6 +98,9 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
if (routeArgs.containsKey("isCallFinished")) {
isCallFinished = routeArgs['isCallFinished'];
}
if (routeArgs.containsKey("isMyPatient")) {
isMyPatient = routeArgs['isMyPatient'];
}
if (isInpatient)
_activeTab = 0;
else
@ -132,7 +136,9 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
if (isFromLiveCare && patient.patientStatus == 1) await model.addPatientToDoctorList(patient.vcId);
},
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
appBarTitle: TranslationBase.of(context).patientProfile,
isShowAppBar: false,
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.patientStatusType != null && patient.patientStatusType == 43)
BaseView<SOAPViewModel>(
onModelReady: (model) async {},
onModelReady: (model) async {
model.getDoctorProfile();
},
builder: (_, model, w) => Positioned(
top: 180,
left: 20,
@ -253,7 +261,7 @@ class _PatientProfileScreenState extends State<PatientProfileScreen> with Single
AppButton(
title:
"${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}",
color: isInpatient || isFromLiveCare
color: (isInpatient &&isMyPatient ) || isFromLiveCare
? Colors.red.shade700
: patient.patientStatusType == 43
? Colors.red.shade700

Loading…
Cancel
Save