Merge branch 'development' into medical-profile-services

merge-requests/708/head
mosazaid 5 years ago
commit c7ce4676f6

@ -10,6 +10,8 @@ import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.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/errors/dr_app_embedded_error.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:provider/provider.dart';
@ -78,7 +80,7 @@ class MedicalReportDetailPage extends StatelessWidget {
data: medicalReport.reportDataHtml ?? ""
),
) : Container(
child: ErrorMessage(error: "No Data",),
),
],
),

@ -88,7 +88,33 @@ class MedicalReportPage extends StatelessWidget {
if (model.state != ViewState.ErrorLocal)
...List.generate(
model.medicalReportList.length,
(index) => Container(
(index) => InkWell(
onTap: (){
if (model.medicalReportList[index].status ==
1) {
Navigator.of(context).pushNamed(
PATIENT_MEDICAL_REPORT_DETAIL,
arguments: {
'patient': patient,
'patientType': patientType,
'arrivalType': arrivalType,
'medicalReport':
model.medicalReportList[index]
});
} else {
Navigator.of(context).pushNamed(
PATIENT_MEDICAL_REPORT_INSERT,
arguments: {
'patient': patient,
'patientType': patientType,
'arrivalType': arrivalType,
'type': MedicalReportStatus.ADD,
'medicalReport':
model.medicalReportList[index]
});
}
},
child: Container(
margin: EdgeInsets.symmetric(horizontal: 8),
child: CardWithBgWidget(
hasBorder: false,
@ -178,32 +204,6 @@ class MedicalReportPage extends StatelessWidget {
// ""),
),
Container(
child: InkWell(
onTap: () {
if (model.medicalReportList[index].status ==
1) {
Navigator.of(context).pushNamed(
PATIENT_MEDICAL_REPORT_DETAIL,
arguments: {
'patient': patient,
'patientType': patientType,
'arrivalType': arrivalType,
'medicalReport':
model.medicalReportList[index]
});
} else {
Navigator.of(context).pushNamed(
PATIENT_MEDICAL_REPORT_INSERT,
arguments: {
'patient': patient,
'patientType': patientType,
'arrivalType': arrivalType,
'type': MedicalReportStatus.ADD,
'medicalReport':
model.medicalReportList[index]
});
}
},
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
@ -215,7 +215,6 @@ class MedicalReportPage extends StatelessWidget {
),
],
),
),
)
],
),
@ -224,6 +223,8 @@ class MedicalReportPage extends StatelessWidget {
),
),
),
),
SizedBox(height: 15,)
],
),
),

Loading…
Cancel
Save