fix the Procedure Card

merge-requests/424/head
Mohammad Aljammal 5 years ago
parent c66357a4ce
commit e84dd573fe

@ -25,116 +25,113 @@ class ProcedureCard extends StatelessWidget {
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
color: Colors.white, color: Colors.white,
), ),
child: Padding( child: Container(
padding: const EdgeInsets.all(8.0), child: Row(
child: Container( mainAxisAlignment: MainAxisAlignment.start,
child: Row( children: [
mainAxisAlignment: MainAxisAlignment.start, Container(
children: [ height: MediaQuery.of(context).size.height * .20,
Container( width: 5,
height: MediaQuery.of(context).size.height * .20, decoration: BoxDecoration(
width: 5, borderRadius: BorderRadius.only(
decoration: BoxDecoration( topLeft: Radius.circular(10),
borderRadius: BorderRadius.only( bottomLeft: Radius.circular(10),
topLeft: Radius.circular(10),
bottomLeft: Radius.circular(10),
),
color: entityList.orderType == 1
? Colors.red[500]
: Colors.black,
), ),
color: entityList.orderType == 1
? Colors.red[500]
: Colors.black,
), ),
Expanded( ),
child: Container( Expanded(
padding: EdgeInsets.only( child: Container(
left: projectViewModel.isArabic ? 0 : 15, padding: EdgeInsets.only(
right: projectViewModel.isArabic ? 15 : 0), left: projectViewModel.isArabic ? 0 : 15,
child: InkWell( right: projectViewModel.isArabic ? 15 : 0),
child: Column( child: InkWell(
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Row( children: [
mainAxisAlignment: MainAxisAlignment.spaceBetween, Row(
children: [ mainAxisAlignment: MainAxisAlignment.spaceBetween,
Expanded( children: [
child: Column( Expanded(
crossAxisAlignment: CrossAxisAlignment.start, child: Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Texts(
entityList.orderType == 0
? 'Routine'
: 'Urgent',
color: entityList.orderType == 0
? Colors.black
: Colors.red[800],
fontWeight: FontWeight.w600,
),
SizedBox(
height: 5,
),
Texts(
entityList.procedureName,
bold: true,
fontSize: 14,
),
],
),
),
SizedBox(
width: 5,
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
Texts( Texts(
'${DateUtils.getDayMonthYearDateFormatted(DateUtils.convertISOStringToDateTime(entityList.orderDate), isArabic: projectViewModel.isArabic)}', entityList.orderType == 0
color: Colors.black, ? 'Routine'
: 'Urgent',
color: entityList.orderType == 0
? Colors.black
: Colors.red[800],
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14, ),
SizedBox(
height: 5,
), ),
Texts( Texts(
'${DateUtils.getHour(DateUtils.convertISOStringToDateTime(entityList.orderDate))}', entityList.procedureName,
fontWeight: FontWeight.w600, bold: true,
color: Colors.grey[700],
fontSize: 14, fontSize: 14,
), ),
], ],
), ),
], ),
), SizedBox(
Row( width: 5,
children: [ ),
Texts( Column(
TranslationBase.of(context).orderNo, crossAxisAlignment: CrossAxisAlignment.end,
color: Colors.grey, mainAxisAlignment: MainAxisAlignment.end,
fontSize: 12, children: [
), Texts(
Texts( '${DateUtils.getDayMonthYearDateFormatted(DateUtils.convertISOStringToDateTime(entityList.orderDate), isArabic: projectViewModel.isArabic)}',
entityList.orderNo.toString(), color: Colors.black,
color: Colors.grey, fontWeight: FontWeight.w600,
fontSize: 12, fontSize: 14,
), ),
], Texts(
), '${DateUtils.getHour(DateUtils.convertISOStringToDateTime(entityList.orderDate))}',
Row( fontWeight: FontWeight.w600,
mainAxisAlignment: MainAxisAlignment.spaceBetween, color: Colors.grey[700],
children: [ fontSize: 14,
Texts( ),
entityList.remarks ?? '', ],
fontSize: 12, ),
), ],
Icon(Icons.edit) ),
], Row(
) children: [
], Texts(
), TranslationBase.of(context).orderNo,
onTap: onTap, color: Colors.grey,
fontSize: 12,
),
Texts(
entityList.orderNo.toString(),
color: Colors.grey,
fontSize: 12,
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(
entityList.remarks ?? '',
fontSize: 12,
),
Icon(Icons.edit)
],
)
],
), ),
onTap: onTap,
), ),
), ),
], ),
), ],
), ),
), ),
); );

@ -7,6 +7,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/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-app-bar.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -27,8 +28,8 @@ class ProcedureScreen extends StatelessWidget {
onModelReady: (model) => model.getProcedure(mrn: patient.patientId), onModelReady: (model) => model.getProcedure(mrn: patient.patientId),
builder: (BuildContext context, ProcedureViewModel model, Widget child) => builder: (BuildContext context, ProcedureViewModel model, Widget child) =>
AppScaffold( AppScaffold(
isShowAppBar: false, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).orderProcedure, appBar: PatientProfileHeaderNewDesignAppBar(patient, arrivalType ?? '0', patientType),
body: NetworkBaseView( body: NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: SingleChildScrollView( child: SingleChildScrollView(
@ -37,8 +38,6 @@ class ProcedureScreen extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
PatientProfileHeaderNewDesign(
patient, arrivalType ?? '0', patientType),
SizedBox( SizedBox(
height: 12, height: 12,
), ),

@ -1,14 +1,9 @@
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'StarRating.dart';
import 'Text.dart'; import 'Text.dart';
class DoctorCardInsurance extends StatelessWidget { class DoctorCardInsurance extends StatelessWidget {
@ -41,142 +36,163 @@ class DoctorCardInsurance extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
width: double.maxFinite,
height: 160,
margin: EdgeInsets.all(10), margin: EdgeInsets.all(10),
padding: EdgeInsets.only(left: 0, right: 5, bottom: 5, top: 5),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( borderRadius: BorderRadius.circular(15),
left: BorderSide( color: Colors.white,
color: approvalStatus == "Approved" ),
? Color(0xff359846) child: Container(
: Color(0xffD02127), child: Row(
width: 3.5), mainAxisAlignment: MainAxisAlignment.start,
top: BorderSide(color: Colors.white, width: 0.5), children: [
bottom: BorderSide(color: Colors.white, width: 0.5), Container(
right: BorderSide(color: Colors.white, width: 0.5), height: 160,
), width: 5,
color: Colors.white), decoration: BoxDecoration(
child: Padding( borderRadius: BorderRadius.only(
padding: const EdgeInsets.all(15.0), topLeft: Radius.circular(10),
child: InkWell( bottomLeft: Radius.circular(10),
onTap: onTap, ),
child: Column( color: approvalStatus == "Approved" ? Color(0xff359846) : Color(0xffD02127),
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(
"$approvalStatus",
color: approvalStatus == "Approved"
? Color(0xff359846)
: Color(0xffD02127),
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(25.0),
),
color: Color(0xff2E303A)),
child: Padding(
padding: const EdgeInsets.all(5.0),
child: Texts(
'$patientOut',
color: Colors.white,
fontSize: 15.0,
),
),
)
],
),
Row(
children: [
Expanded(
child: Texts(
doctorName,
bold: true,
)),
],
), ),
Row( ),
crossAxisAlignment: CrossAxisAlignment.end, Expanded(
children: <Widget>[ child: Container(
Container( padding: EdgeInsets.only(
child: LargeAvatar( left: projectViewModel.isArabic ? 0 : 15,
name: doctorName, right: projectViewModel.isArabic ? 15 : 0),
url: profileUrl, child: InkWell(
), onTap: onTap,
width: 55, child: Column(
height: 55, crossAxisAlignment: CrossAxisAlignment.start,
), children: <Widget>[
Expanded( Row(
flex: 4, mainAxisAlignment: MainAxisAlignment.spaceBetween,
child: Container( children: [
margin: EdgeInsets.all(10), Texts(
child: Column( "$approvalStatus",
crossAxisAlignment: CrossAxisAlignment.start, color: approvalStatus == "Approved"
children: <Widget>[ ? Color(0xff359846)
if (orderNo != null && !isPrescriptions) : Color(0xffD02127),
Row( ),
children: <Widget>[ Container(
Texts( decoration: BoxDecoration(
'order No:', borderRadius: BorderRadius.all(
color: Colors.grey[500], Radius.circular(25.0),
), ),
Texts( color: Color(0xff2E303A)),
orderNo ?? '', child: Padding(
) padding: const EdgeInsets.all(5.0),
], child: Texts(
), '$patientOut',
if (invoiceNO != null && !isPrescriptions) color: Colors.white,
Row( fontSize: 13.0,
children: <Widget>[
Texts(
'Invoice:',
color: Colors.grey[500],
),
Texts(
invoiceNO,
)
],
),
if (isPrescriptions)
Row(
children: <Widget>[
Texts(
'Clinic: ',
color: Colors.grey[500],
),
Expanded(
child: Texts(
clinic,
),
)
],
), ),
if (branch != null) ),
Row( )
children: <Widget>[ ],
Texts( ),
'Approval No: ', Row(
color: Colors.grey[500], children: [
), Expanded(
Texts( child: Texts(
branch, doctorName,
) bold: true,
], )),
) ],
]), ),
), Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Container(
child: LargeAvatar(
name: doctorName,
url: profileUrl,
),
width: 55,
height: 55,
),
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
if (orderNo != null && !isPrescriptions)
Row(
children: <Widget>[
Texts(
'order No:',
color: Colors.grey[500],
),
Texts(
orderNo ?? '',
)
],
),
if (invoiceNO != null && !isPrescriptions)
Row(
children: <Widget>[
Texts(
'Invoice:',
color: Colors.grey[500],
),
Texts(
invoiceNO,
)
],
),
if (isPrescriptions)
Row(
children: <Widget>[
Texts(
'Clinic: ',
color: Colors.grey[500],
),
Expanded(
child: Texts(
clinic,
),
)
],
),
if (branch != null)
Row(
children: <Widget>[
Texts(
'Approval No: ',
color: Colors.grey[500],
),
Texts(
branch,
)
],
)
]),
),
),
Icon(
EvaIcons.eye,
size: 38.0,
)
],
),
],
), ),
Icon( ),
EvaIcons.eye,
size: 38.0,
)
],
), ),
], ),
), ],
), ),
), ),
); );
} }
} }

Loading…
Cancel
Save