Merge branch 'favorite_procedure_templates' into 'development'

Fix medical report

See merge request Cloud_Solution/doctor_app_flutter!707
merge-requests/708/merge
Mohammad Aljammal 5 years ago
commit 8cdcd51086

@ -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/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_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/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/material.dart';
import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_html/flutter_html.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -78,7 +80,7 @@ class MedicalReportDetailPage extends StatelessWidget {
data: medicalReport.reportDataHtml ?? "" data: medicalReport.reportDataHtml ?? ""
), ),
) : Container( ) : Container(
child: ErrorMessage(error: "No Data",),
), ),
], ],
), ),

@ -88,7 +88,33 @@ class MedicalReportPage extends StatelessWidget {
if (model.state != ViewState.ErrorLocal) if (model.state != ViewState.ErrorLocal)
...List.generate( ...List.generate(
model.medicalReportList.length, 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), margin: EdgeInsets.symmetric(horizontal: 8),
child: CardWithBgWidget( child: CardWithBgWidget(
hasBorder: false, hasBorder: false,
@ -178,32 +204,6 @@ class MedicalReportPage extends StatelessWidget {
// ""), // ""),
), ),
Container( 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( child: Column(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
@ -215,7 +215,6 @@ class MedicalReportPage extends StatelessWidget {
), ),
], ],
), ),
),
) )
], ],
), ),
@ -224,6 +223,8 @@ class MedicalReportPage extends StatelessWidget {
), ),
), ),
), ),
),
SizedBox(height: 15,)
], ],
), ),
), ),

Loading…
Cancel
Save