Merge branch 'fix-issues' into 'development'

Fix issues

See merge request Cloud_Solution/doctor_app_flutter!381
merge-requests/382/merge
Mohammad Aljammal 5 years ago
commit 2d1528e30e

File diff suppressed because it is too large Load Diff

@ -1,14 +1,21 @@
import 'package:doctor_app_flutter/config/config.dart';
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/medical-file/medical_file_details.dart'; import 'package:doctor_app_flutter/screens/medical-file/medical_file_details.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/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
class MedicalFilePage extends StatefulWidget { class MedicalFilePage extends StatefulWidget {
@override @override
@ -21,6 +28,9 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
patient = routeArgs['patient']; patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
return BaseView<MedicalFileViewModel>( return BaseView<MedicalFileViewModel>(
onModelReady: (model) => model.getMedicalFile(mrn: patient.patientId), onModelReady: (model) => model.getMedicalFile(mrn: patient.patientId),
builder: builder:
@ -32,18 +42,45 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
baseViewModel: model, baseViewModel: model,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Container( child: Container(
color: Colors.white,
child: Column( child: Column(
// mainAxisAlignment: model.medicalFileList.length != 0 && // mainAxisAlignment: model.medicalFileList.length != 0 &&
// model.medicalFileList != null // model.medicalFileList != null
// ? MainAxisAlignment.start // ? MainAxisAlignment.start
// : MainAxisAlignment.center, // : MainAxisAlignment.center,
children: [ children: [
PatientPageHeaderWidget(patient), PatientProfileHeaderNewDesign(
Divider( patient, patient.patientType.toString(), arrivalType),
height: 1.0, Padding(
thickness: 1.0, padding:
color: Colors.grey, EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0),
child: Container(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
Row(
children: [
AppText(
'Medical',
fontSize: 15.0,
fontWeight: FontWeight.w600,
fontFamily: 'Poppins',
),
],
),
Row(
children: [
AppText(
'Report',
fontSize: 30.0,
fontWeight: FontWeight.w700,
),
],
),
],
),
),
),
), ),
(model.medicalFileList != null && (model.medicalFileList != null &&
model.medicalFileList.length != 0) model.medicalFileList.length != 0)
@ -60,66 +97,155 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
horizontal: 12.0, vertical: 8.0), horizontal: 12.0, vertical: 8.0),
child: InkWell( child: InkWell(
child: Container( child: Container(
width: double.infinity,
margin: EdgeInsets.only(
top: 10, left: 10, right: 10),
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(
color: Colors.grey[200], width: 0.5),
),
child: Column( child: Column(
children: [ children: [
Row( Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [ children: [
AppText( Row(
TranslationBase.of(context).branch + children: [
": ", AppText(
fontWeight: FontWeight.w700, model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorName,
fontWeight: FontWeight.w700,
fontSize: 17.0,
fontFamily: 'Poppins',
)
],
), ),
AppText(model Row(
.medicalFileList[0] children: [
.entityList[0] AppText(
.timelines[index] Helpers.convertStringToDate(model
.projectName), .medicalFileList[0]
.entityList[0]
.timelines[index]
.date)
.day
.toString() +
"/",
),
AppText(
Helpers.convertStringToDate(model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.date)
.month
.toString() +
"/",
),
AppText(
Helpers.convertStringToDate(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.date)
.year
.toString(),
),
],
)
], ],
), ),
Row( Row(
mainAxisAlignment:
MainAxisAlignment.start,
children: [ children: [
AppText( Padding(
TranslationBase.of(context) padding: const EdgeInsets.all(8.0),
.doctorName child: Column(
.toUpperCase() + children: [
": ", ClipRRect(
fontWeight: FontWeight.w700, borderRadius:
), BorderRadius.all(
Expanded( Radius.circular(30)),
child: AppText( child: Image.network(
model 'https://previews.123rf.com/images/yupiramos/yupiramos1705/yupiramos170524444/78443570-a-female-doctor-avatar-character-vector-illustration-design.jpg',
.medicalFileList[0] fit: BoxFit.cover,
.entityList[0] width: 60,
.timelines[index] height: 70,
.doctorName, ),
fontWeight: FontWeight.w700, ),
],
), ),
), ),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Row(
children: [
AppText(
TranslationBase.of(context)
.clinic +
": ",
),
AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.clinicName,
fontWeight: FontWeight.w600,
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment
.spaceBetween,
children: [
AppText(
TranslationBase.of(context)
.branch +
": ",
),
AppText(
model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.projectName,
fontWeight: FontWeight.w600,
),
],
),
],
),
], ],
), ),
Row( Row(
mainAxisAlignment:
MainAxisAlignment.end,
children: [ children: [
AppText( Column(
TranslationBase.of(context) children: [
.clinicName + Icon(
": ", Icons.remove_red_eye,
fontWeight: FontWeight.w700, size: 30.0,
), )
AppText( ],
model )
.medicalFileList[0]
.entityList[0]
.timelines[index]
.clinicName,
),
], ],
), ),
SizedBox(height: 10.0),
Divider(
height: 1.0,
thickness: 1.0,
color: Colors.grey.shade400,
)
], ],
), ),
), ),
@ -135,16 +261,24 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
gender: patient.genderDescription, gender: patient.genderDescription,
encounterNumber: index, encounterNumber: index,
pp: patient.patientId, pp: patient.patientId,
patient: patient,
)), )),
); );
}, },
), ),
); );
}) })
: Container( : Column(
child: AppText( children: [
'THERES NO MEDICAL FILE FOR THIS Patient', Container(
), child: AppText(
'THERES NO MEDICAL FILE FOR THIS Patient',
),
),
SizedBox(
height: 400,
)
],
) )
], ],
), ),

@ -566,7 +566,7 @@ packages:
name: js name: js
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.6.2" version: "0.6.3-nullsafety.1"
json_annotation: json_annotation:
dependency: transitive dependency: transitive
description: description:
@ -608,7 +608,7 @@ packages:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0-nullsafety.3" version: "1.3.0-nullsafety.4"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -900,7 +900,7 @@ packages:
name: stack_trace name: stack_trace
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.0-nullsafety.1" version: "1.10.0-nullsafety.2"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
@ -1084,5 +1084,5 @@ packages:
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
sdks: sdks:
dart: ">=2.10.0 <2.11.0" dart: ">=2.10.0 <=2.11.0-213.1.beta"
flutter: ">=1.22.0 <2.0.0" flutter: ">=1.22.0 <2.0.0"

Loading…
Cancel
Save