Fixing some design issues

merge-requests/976/head
RoaaGhali98 4 years ago
parent 40faef136d
commit c4f2543471

@ -4,10 +4,11 @@ import 'package:doctor_app_flutter/core/model/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/patients/profile/lab_result/special_lab_result_details_page.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/special_lab_result_details_page.dart';
import 'package:doctor_app_flutter/util/date-utils.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/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/patient_service_title.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/doctor_card.dart'; import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -67,26 +68,11 @@ class _AllLabSpecialResultState extends State<AllLabSpecialResult> {
SizedBox( SizedBox(
height: 12, height: 12,
), ),
Padding( ServiceTitle(
padding: const EdgeInsets.all(8.0), title: TranslationBase.of(context).special +
child: Column( " " +
crossAxisAlignment: CrossAxisAlignment.start, TranslationBase.of(context).lab,
children: [ subTitle: TranslationBase.of(context).result,
AppText(
TranslationBase.of(context).special +
" " +
TranslationBase.of(context).lab,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
TranslationBase.of(context).result,
bold: true,
fontSize: 22,
),
],
),
), ),
if(model.allSpecialLabList.length == 0) if(model.allSpecialLabList.length == 0)
ErrorMessage(error: TranslationBase.of(context).noItem), ErrorMessage(error: TranslationBase.of(context).noItem),
@ -170,15 +156,15 @@ class _AllLabSpecialResultState extends State<AllLabSpecialResult> {
), ),
), ),
doctorName: doctorName:
model.allSpecialLabList[index].doctorName, Helpers.convertToTitleCase(model.allSpecialLabList[index].doctorName),
invoiceNO: invoiceNO:
' ${model.allSpecialLabList[index].invoiceNo}', ' ${model.allSpecialLabList[index].invoiceNo}',
profileUrl: model profileUrl: model
.allSpecialLabList[index].doctorImageURL, .allSpecialLabList[index].doctorImageURL,
branch: branch:
model.allSpecialLabList[index].projectName, model.allSpecialLabList[index].projectName,
clinic: model clinic:
.allSpecialLabList[index].clinicDescription, Helpers.convertToTitleCase(model.allSpecialLabList[index].clinicDescription),
appointmentDate: appointmentDate:
AppDateUtils.getDateTimeFromServerFormat( AppDateUtils.getDateTimeFromServerFormat(
model.allSpecialLabList[index].createdOn, model.allSpecialLabList[index].createdOn,
@ -191,12 +177,6 @@ class _AllLabSpecialResultState extends State<AllLabSpecialResult> {
), ),
); );
}), }),
if (model.allSpecialLabList.isEmpty &&
patient.patientStatusType != 43)
Center(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
))
], ],
), ),
), ),

@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/lab_result/laboratory_result_page.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/laboratory_result_page.dart';
import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart'; import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart';
import 'package:doctor_app_flutter/screens/procedures/base_add_procedure_tab_page.dart'; import 'package:doctor_app_flutter/screens/procedures/base_add_procedure_tab_page.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/patient_service_title.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
@ -77,24 +78,9 @@ class _LabsHomePageState extends State<LabsHomePage> {
), ),
if (patient.patientStatusType != null && if (patient.patientStatusType != null &&
patient.patientStatusType == 43) patient.patientStatusType == 43)
Padding( ServiceTitle(
padding: const EdgeInsets.all(8.0), title:TranslationBase.of(context).lab,
child: Column( subTitle: TranslationBase.of(context).result,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).lab,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
TranslationBase.of(context).result,
bold: true,
fontSize: 22,
),
],
),
), ),
if ((patient.patientStatusType != null && if ((patient.patientStatusType != null &&
patient.patientStatusType == 43) || patient.patientStatusType == 43) ||
@ -200,15 +186,15 @@ class _LabsHomePageState extends State<LabsHomePage> {
), ),
), ),
doctorName: doctorName:
model.patientLabOrdersList[index].doctorName, Helpers.convertToTitleCase(model.patientLabOrdersList[index].doctorName),
invoiceNO: invoiceNO:
' ${model.patientLabOrdersList[index].invoiceNo}', ' ${model.patientLabOrdersList[index].invoiceNo}',
profileUrl: model profileUrl: model
.patientLabOrdersList[index].doctorImageURL, .patientLabOrdersList[index].doctorImageURL,
branch: branch:
model.patientLabOrdersList[index].projectName, model.patientLabOrdersList[index].projectName,
clinic: model clinic:
.patientLabOrdersList[index].clinicDescription, Helpers.convertToTitleCase(model.patientLabOrdersList[index].clinicDescription),
appointmentDate: appointmentDate:
model.patientLabOrdersList[index].createdOn, model.patientLabOrdersList[index].createdOn,
orderNo: model.patientLabOrdersList[index].orderNo, orderNo: model.patientLabOrdersList[index].orderNo,

@ -1,10 +1,10 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientMedicalReportViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientMedicalReportViewModel.dart';
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/core/model/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/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/patient_service_title.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/errors/error_message.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';
@ -31,25 +31,11 @@ class SpecialLabResultDetailsPage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( ServiceTitle(
margin: EdgeInsets.all(16.0), title: TranslationBase.of(context).special +
child: Column( " " +
crossAxisAlignment: CrossAxisAlignment.start, TranslationBase.of(context).lab,
children: [ subTitle: TranslationBase.of(context).result,
AppText(
"Special Lab ",
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w700,
color: Color(0xFF2E303A),
),
AppText(
"Result",
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
color: Color(0xFF2E303A),
)
],
),
), ),
resultData != null resultData != null
? Container( ? Container(

@ -5,7 +5,9 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_details_page.dart'; import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_details_page.dart';
import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart'; import 'package:doctor_app_flutter/screens/procedures/ProcedureType.dart';
import 'package:doctor_app_flutter/screens/procedures/base_add_procedure_tab_page.dart'; import 'package:doctor_app_flutter/screens/procedures/base_add_procedure_tab_page.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/patient_service_title.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-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';
@ -68,45 +70,15 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
), ),
if (model.radiologyList.isNotEmpty && if (model.radiologyList.isNotEmpty &&
patient.patientStatusType != 43) patient.patientStatusType != 43)
Padding( ServiceTitle(
padding: const EdgeInsets.all(8.0), title: TranslationBase.of(context).radiology,
child: Column( subTitle: TranslationBase.of(context).result,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).radiology,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
TranslationBase.of(context).result,
bold: true,
fontSize: 22,
),
],
),
), ),
if (patient.patientStatusType != null && if (patient.patientStatusType != null &&
patient.patientStatusType == 43) patient.patientStatusType == 43)
Padding( ServiceTitle(
padding: const EdgeInsets.all(8.0), title: TranslationBase.of(context).radiology,
child: Column( subTitle: TranslationBase.of(context).result,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).radiology,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
TranslationBase.of(context).result,
bold: true,
fontSize: 22,
),
],
),
), ),
if ((patient.patientStatusType != null && if ((patient.patientStatusType != null &&
patient.patientStatusType == 43) || patient.patientStatusType == 43) ||
@ -191,15 +163,15 @@ class _RadiologyHomePageState extends State<RadiologyHomePage> {
child: DoctorCard( child: DoctorCard(
isNoMargin: true, isNoMargin: true,
doctorName: doctorName:
model.radiologyList[index].doctorName, Helpers.convertToTitleCase(model.radiologyList[index].doctorName),
profileUrl: profileUrl:
model.radiologyList[index].doctorImageURL, model.radiologyList[index].doctorImageURL,
invoiceNO: invoiceNO:
'${model.radiologyList[index].invoiceNo}', '${model.radiologyList[index].invoiceNo}',
branch: branch:
'${model.radiologyList[index].projectName}', '${model.radiologyList[index].projectName}',
clinic: model clinic:
.radiologyList[index].clinicDescription, Helpers.convertToTitleCase(model.radiologyList[index].clinicDescription),
appointmentDate: appointmentDate:
model.radiologyList[index].orderDate ?? model.radiologyList[index].orderDate ??
model.radiologyList[index].reportDate, model.radiologyList[index].reportDate,

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/helpers.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/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -129,20 +130,10 @@ class ProcedureCard extends StatelessWidget {
), ),
], ],
), ),
Row( CustomRow(
children: [ label: TranslationBase.of(context).orderNo + ": ",
AppText( value: entityList.orderNo.toString() ?? "".toString(),
TranslationBase.of(context).orderNo, isCopyable: false,
//color: Colors.grey,
fontSize: 12,
color: Colors.grey,
),
AppText(
entityList.orderNo.toString(),
fontSize: 12,
bold: true,
),
],
), ),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/screens/procedures/update-procedure.dart';
import 'package:doctor_app_flutter/util/helpers.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/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/patient_service_title.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/transitions/slide_up_page.dart'; import 'package:doctor_app_flutter/widgets/transitions/slide_up_page.dart';
@ -60,45 +61,15 @@ class ProcedureScreen extends StatelessWidget {
), ),
if (model.procedureList.length == 0 && if (model.procedureList.length == 0 &&
patient.patientStatusType != 43) patient.patientStatusType != 43)
Padding( ServiceTitle(
padding: const EdgeInsets.all(8.0), title: TranslationBase.of(context).orderTestOr,
child: Column( subTitle: TranslationBase.of(context).procedure,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).orderTestOr,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
TranslationBase.of(context).procedure,
bold: true,
fontSize: 22,
),
],
),
), ),
if (patient.patientStatusType != null && if (patient.patientStatusType != null &&
patient.patientStatusType == 43) patient.patientStatusType == 43)
Padding( ServiceTitle(
padding: const EdgeInsets.all(8.0), title: TranslationBase.of(context).orderTestOr,
child: Column( subTitle: TranslationBase.of(context).procedure,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
TranslationBase.of(context).orderTestOr,
style: "caption2",
color: Colors.black,
fontSize: 13,
),
AppText(
TranslationBase.of(context).procedure,
bold: true,
fontSize: 22,
),
],
),
), ),
if ((patient.patientStatusType != null && if ((patient.patientStatusType != null &&
patient.patientStatusType == 43) || patient.patientStatusType == 43) ||
@ -161,8 +132,7 @@ class ProcedureScreen extends StatelessWidget {
...List.generate( ...List.generate(
model.procedureList[0].rowcount, model.procedureList[0].rowcount,
(index) => ProcedureCard( (index) => ProcedureCard(
categoryID: categoryID: model.procedureList[0].entityList[index].categoryID,
model.procedureList[0].entityList[index].categoryID,
entityList: model.procedureList[0].entityList[index], entityList: model.procedureList[0].entityList[index],
onTap: () { onTap: () {
if (model.procedureList[0].entityList[index].categoryID == if (model.procedureList[0].entityList[index].categoryID ==

@ -112,40 +112,24 @@ class DoctorCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
if (orderNo != null && !isPrescriptions) if (orderNo != null && !isPrescriptions)
Row( CustomRow(
children: <Widget>[ label: TranslationBase.of(context).orderNo ,
AppText( value: orderNo,
TranslationBase.of(context).orderNo + valueSize: 13,
" ", labelSize: 13,
color: Colors.grey[500],
fontSize: 14,
),
AppText(
orderNo ?? '',
fontSize: 14,
)
],
), ),
if (invoiceNO != null && !isPrescriptions) if (invoiceNO != null && !isPrescriptions)
Row( CustomRow(
children: <Widget>[ label: TranslationBase.of(context).invoiceNo ,
AppText( value: invoiceNO,
TranslationBase.of(context) valueSize: 13,
.invoiceNo + labelSize: 13,
" ",
fontSize: 14,
color: Colors.grey[500],
),
AppText(
invoiceNO,
fontSize: 14,
)
],
), ),
if (clinic != null) if (clinic != null)
CustomRow( CustomRow(
label: TranslationBase.of(context).clinic + label: TranslationBase.of(context).clinic +
": ", ": ",
value: clinic, value: clinic,
valueSize: 13, valueSize: 13,
labelSize: 13, labelSize: 13,
@ -158,7 +142,6 @@ class DoctorCard extends StatelessWidget {
valueSize: 13, valueSize: 13,
labelSize: 13, labelSize: 13,
), ),
]), ]),
), ),
), ),

Loading…
Cancel
Save