@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import ' package:diplomaticquarterapp/core/model/er/PatientER_RC.dart ' ;
import ' package:diplomaticquarterapp/core/model/er/PatientER_RC.dart ' ;
import ' package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart ' ;
import ' package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart ' ;
import ' package:diplomaticquarterapp/core/viewModels/project_view_model.dart ' ;
import ' package:diplomaticquarterapp/core/viewModels/project_view_model.dart ' ;
import ' package:diplomaticquarterapp/theme/colors.dart ' ;
import ' package:diplomaticquarterapp/uitl/translations_delegate_base.dart ' ;
import ' package:diplomaticquarterapp/uitl/translations_delegate_base.dart ' ;
import ' package:diplomaticquarterapp/uitl/utils_new.dart ' ;
import ' package:diplomaticquarterapp/uitl/utils_new.dart ' ;
import ' package:diplomaticquarterapp/widgets/buttons/defaultButton.dart ' ;
import ' package:diplomaticquarterapp/widgets/buttons/defaultButton.dart ' ;
@ -9,6 +10,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.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 ' ;
import ' package:url_launcher/url_launcher.dart ' ;
class Summary extends StatefulWidget {
class Summary extends StatefulWidget {
final Function changeCurrentTab ;
final Function changeCurrentTab ;
@ -86,48 +88,89 @@ class _SummaryState extends State<Summary> {
SizedBox (
SizedBox (
height: 8 ,
height: 8 ,
) ,
) ,
_getNormalText ( TranslationBase . of ( context ) . selectAmbulate ) ,
_getNormalText ( TranslationBase . of ( context ) . way ) ,
_getNormalText (
_getNormalText (
' ${ widget . patientER_RC . transportationDetails . ambulateTitle } ' ,
widget . patientER_RC . transportationDetails . tripType = = 0 ? TranslationBase . of ( context ) . twoDirec : TranslationBase . of ( context ) . oneDirec ,
isBold: true ,
) ,
SizedBox (
height: 8 ,
) ,
_getNormalText ( TranslationBase . of ( context ) . notes ) ,
_getNormalText (
' ${ widget . patientER_RC . transportationDetails . notes ? ? ' --- ' } ' ,
isBold: true ,
isBold: true ,
) ,
) ,
SizedBox (
SizedBox (
height: 8 ,
height: 8 ,
) ,
) ,
/ / / / _getNormalText ( TranslationBase . of ( context ) . notes ) ,
/ / / / _getNormalText (
/ / / / ' ${ widget . patientER_RC . transportationDetails . notes ? ? ' --- ' } ' ,
/ / / / isBold: true ,
/ / / / ) ,
/ / SizedBox (
/ / height: 8 ,
/ / ) ,
] ,
] ,
) ,
) ,
) ,
) ,
SizedBox (
/ / SizedBox (
height: 20 ,
/ / height: 20 ,
/ / ) ,
/ / Text ( TranslationBase . of ( context ) . billAmount , style: TextStyle ( fontSize: 16.0 , letterSpacing: - 0.64 , fontWeight: FontWeight . w600 ) ) ,
/ / SizedBox (
/ / height: 5 ,
/ / ) ,
Container (
margin: EdgeInsets . only ( top: 12 ) ,
decoration: cardRadius ( 12 ) ,
padding: EdgeInsets . all ( 16.0 ) ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
Text ( TranslationBase . of ( context ) . billAmount + " : " , style: TextStyle ( fontSize: 16.0 , letterSpacing: - 0.64 , fontWeight: FontWeight . w600 ) ) ,
SizedBox ( height: 16.0 ) ,
Row (
mainAxisSize: MainAxisSize . max ,
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
children: [
Text ( TranslationBase . of ( context ) . patientShareTotalToDo , style: TextStyle ( fontSize: 13.0 , letterSpacing: - 0.64 , fontWeight: FontWeight . w600 ) ) ,
Text (
TranslationBase . of ( context ) . sar +
( widget . patientER_RC . transportationDetails . tripType = = 1
? ' ${ widget . patientER_RC . patientERTransportationMethod . priceTotal } '
: ' ${ ( widget . patientER_RC . patientERTransportationMethod . priceTotal * 2 ) } ' ) ,
style: TextStyle ( fontSize: 16.0 , letterSpacing: - 0.64 , fontWeight: FontWeight . bold ) ,
) ,
] ,
)
] ,
) ,
) ,
Text ( TranslationBase . of ( context ) . billAmount , style: TextStyle ( fontSize: 16.0 , letterSpacing: - 0.64 , fontWeight: FontWeight . w600 ) ) ,
SizedBox (
height: 5 ,
) ,
) ,
Container (
Container (
height: 55 ,
margin: EdgeInsets . only ( top: 12 ) ,
padding: EdgeInsets . all ( 10 ) ,
decoration: cardRadius ( 12 ) ,
decoration: cardRadius ( 12 ) ,
padding: EdgeInsets . all ( 16.0 ) ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
Text ( TranslationBase . of ( context ) . contactRRT + " : " , style: TextStyle ( fontSize: 16.0 , letterSpacing: - 0.64 , fontWeight: FontWeight . w600 ) ) ,
SizedBox ( height: 16.0 ) ,
InkWell (
onTap: ( ) {
launchUrl (
Uri . parse ( " tel://0115259555 " ) ,
) ;
} ,
child: Row (
child: Row (
mainAxisSize: MainAxisSize . max ,
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
mainAxisAlignment: MainAxisAlignment . spaceBetween ,
children: [
children: [
_getNormalText ( TranslationBase . of ( context ) . patientShareTotal + ' : ' ) ,
Text ( " 0115259555 " , style: TextStyle ( fontSize: 16.0 , letterSpacing: - 0.64 , fontWeight: FontWeight . bold ) ) ,
Container (
Icon (
padding: EdgeInsets . only ( left: 20.0 , right: 20.0 ) ,
Icons . headset_mic_rounded ,
child: _getNormalText ( TranslationBase . of ( context ) . sar + ' ${ widget . patientER_RC . patientERTransportationMethod . priceTotal } ' , isBold: true , isTotal: true )
size: 30.0 ,
)
] ,
) ,
) ,
)
] ,
] ,
) ,
) ,
) ,
) ,
SizedBox ( height: 50 ) ,
SizedBox ( height: 8 0) ,
] ,
] ,
) ,
) ,
) ,
) ,
@ -135,9 +178,30 @@ class _SummaryState extends State<Summary> {
bottomSheet: Container (
bottomSheet: Container (
color: Theme . of ( context ) . scaffoldBackgroundColor ,
color: Theme . of ( context ) . scaffoldBackgroundColor ,
padding: EdgeInsets . all ( 12.0 ) ,
padding: EdgeInsets . all ( 12.0 ) ,
child: DefaultButton ( TranslationBase . of ( context ) . send , ( ) async {
child: Row (
children: [
Expanded (
flex: 1 ,
child: DefaultButton (
TranslationBase . of ( context ) . back ,
( ) {
widget . changeCurrentTab ( 1 ) ;
} ,
) ,
) ,
SizedBox ( width: 12.0 ) ,
Expanded (
flex: 1 ,
child: DefaultButton (
TranslationBase . of ( context ) . submit ,
( ) async {
await widget . amRequestViewModel . insertERPressOrder ( patientER: widget . patientER_RC ) ;
await widget . amRequestViewModel . insertERPressOrder ( patientER: widget . patientER_RC ) ;
} ) ,
} ,
color: CustomColors . green ,
) ,
) ,
] ,
) ,
) ,
) ,
) ;
) ;
}
}