From 11f2c30c6400f7622aec48c1c34a5a3fa8187056 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Wed, 7 Apr 2021 11:15:24 +0300 Subject: [PATCH] Fix vist date im medical file --- .../medical-file/medical_file_details.dart | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/lib/screens/medical-file/medical_file_details.dart b/lib/screens/medical-file/medical_file_details.dart index 1e2bc1f8..25ea1f22 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -1,8 +1,10 @@ import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/patient_profile_screen.dart'; +import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; @@ -14,6 +16,7 @@ import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body. import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; class MedicalFileDetails extends StatefulWidget { String age; @@ -69,6 +72,7 @@ class _MedicalFileDetailsState extends State { @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); return BaseView( onModelReady: (model) => model.getMedicalFile(mrn: pp), builder: @@ -184,7 +188,7 @@ class _MedicalFileDetailsState extends State { TranslationBase.of(context) .episode + ": ", - fontWeight: FontWeight.w700, + //fontWeight: FontWeight.w700, ), if (model.medicalFileList.length != 0 && @@ -216,7 +220,7 @@ class _MedicalFileDetailsState extends State { TranslationBase.of(context) .visitDate + ": ", - fontWeight: FontWeight.w700, + //fontWeight: FontWeight.w700, ), if (model.medicalFileList.length != 0 && @@ -230,15 +234,17 @@ class _MedicalFileDetailsState extends State { .length != 0) AppText( - model - .medicalFileList[0] - .entityList[0] - .timelines[encounterNumber] - .timeLineEvents[0] - .consulations[0] - .appointmentDate - .toString(), + '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat( + model + .medicalFileList[0] + .entityList[0] + .timelines[ + encounterNumber] + .date, + ), isArabic: projectViewModel.isArabic)}', + color: Colors.black, fontWeight: FontWeight.w700, + fontSize: 14, ), SizedBox(width: 35.0), // AppText(