Ambulance Service second step
parent
3d6eafe473
commit
1ce55e687f
@ -0,0 +1,27 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
enum Ambulate { Wheelchair, Walker, Stretcher, None }
|
||||||
|
|
||||||
|
extension SelectedAmbulate on Ambulate {
|
||||||
|
String getAmbulateTitle(BuildContext context) {
|
||||||
|
switch (this) {
|
||||||
|
case Ambulate.Wheelchair:
|
||||||
|
// TODO: Handle this case.
|
||||||
|
return 'Wheelchair';
|
||||||
|
break;
|
||||||
|
case Ambulate.Walker:
|
||||||
|
// TODO: Handle this case.
|
||||||
|
return 'Walker';
|
||||||
|
break;
|
||||||
|
case Ambulate.Stretcher:
|
||||||
|
// TODO: Handle this case.
|
||||||
|
return 'Stretcher';
|
||||||
|
break;
|
||||||
|
case Ambulate.None:
|
||||||
|
// TODO: Handle this case.
|
||||||
|
return 'None';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return 'None';
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/ErService/widgets/AppointmentCard.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class AvailableAppointmentsPage extends StatelessWidget {
|
||||||
|
final List<AppoitmentAllHistoryResultList> appointmentsAllHistoryList;
|
||||||
|
|
||||||
|
const AvailableAppointmentsPage({Key key, this.appointmentsAllHistoryList})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
appBarTitle: 'Available Appointments',
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Texts('Available Appointments'),
|
||||||
|
SizedBox(
|
||||||
|
height: 12,
|
||||||
|
),
|
||||||
|
...List.generate(
|
||||||
|
appointmentsAllHistoryList.length,
|
||||||
|
(index) => InkWell(
|
||||||
|
onTap: (){
|
||||||
|
Navigator.pop(context, appointmentsAllHistoryList[index]);
|
||||||
|
},
|
||||||
|
child: AppointmentCard(appointment: appointmentsAllHistoryList[index],),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1,41 +1,334 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/enum/Ambulate.dart';
|
||||||
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
|
import 'package:diplomaticquarterapp/core/model/er/PatientER.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/pages/Blood/new_text_Field.dart';
|
||||||
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
||||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
|
||||||
class BillAmount extends StatefulWidget {
|
class BillAmount extends StatefulWidget {
|
||||||
final Function changeCurrentTab;
|
final Function changeCurrentTab;
|
||||||
final PatientER patientER;
|
final PatientER patientER;
|
||||||
final AmRequestViewModel amRequestViewModel;
|
final AmRequestViewModel amRequestViewModel;
|
||||||
|
|
||||||
BillAmount({Key key, this.changeCurrentTab, this.patientER, this.amRequestViewModel});
|
BillAmount(
|
||||||
|
{Key key,
|
||||||
|
this.changeCurrentTab,
|
||||||
|
this.patientER,
|
||||||
|
this.amRequestViewModel});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_BillAmountState createState() => _BillAmountState();
|
_BillAmountState createState() => _BillAmountState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _BillAmountState extends State<BillAmount> {
|
class _BillAmountState extends State<BillAmount> {
|
||||||
|
Ambulate _ambulate = Ambulate.None;
|
||||||
|
String note ="";
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Column(
|
return SingleChildScrollView(
|
||||||
children: [
|
physics: BouncingScrollPhysics(),
|
||||||
Texts('BillAmount 3'),
|
child: Container(
|
||||||
SizedBox(height: 45,),
|
margin: EdgeInsets.only(left: 12, right: 12),
|
||||||
Container(
|
child: Column(
|
||||||
padding: EdgeInsets.all(15),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
width: double.maxFinite,
|
children: [
|
||||||
height: 76,
|
Texts('Bill Amount '),
|
||||||
child:SecondaryButton(
|
SizedBox(
|
||||||
color: Colors.grey[800],
|
height: 10,
|
||||||
textColor: Colors.white,
|
),
|
||||||
onTap: ()=> widget.changeCurrentTab(3),
|
Table(
|
||||||
label: 'Next',
|
border: TableBorder.symmetric(
|
||||||
|
inside: BorderSide(width: 1.0, color: Colors.grey[300]),
|
||||||
|
outside: BorderSide(width: 1.0, color: Colors.grey[300])),
|
||||||
|
children: [
|
||||||
|
TableRow(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.09,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(10.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Texts(
|
||||||
|
'Amount before tax: ',
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 15,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.09,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topRight: Radius.circular(10.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Texts(
|
||||||
|
'SR ${widget.patientER.patientERTransportationMethod.price}',
|
||||||
|
color: Colors.black,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
fontSize: 15,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
TableRow(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
color: Colors.white,
|
||||||
|
height: MediaQuery.of(context).size.height * 0.09,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Texts(
|
||||||
|
'Tax amount :',
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 15,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.09,
|
||||||
|
color: Colors.white,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Texts(
|
||||||
|
'SR ${widget.patientER.patientERTransportationMethod.vAT}',
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 15,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
TableRow(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.09,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
bottomLeft: Radius.circular(10.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Texts(
|
||||||
|
'Total amount payable',
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 15,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
bold: true,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: MediaQuery.of(context).size.height * 0.09,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
bottomRight: Radius.circular(10.0),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Texts(
|
||||||
|
'SR ${widget.patientER.patientERTransportationMethod.totalPrice}',
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 15,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10,
|
||||||
|
),
|
||||||
|
Texts('Select Ambulate',bold: true,),
|
||||||
|
SizedBox(height: 5,),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
_ambulate = Ambulate.Wheelchair;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border:
|
||||||
|
Border.all(color: Colors.grey, width: 0.5),
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
child: ListTile(
|
||||||
|
title: Text('Wheelchair'),
|
||||||
|
leading: Radio(
|
||||||
|
value: Ambulate.Wheelchair,
|
||||||
|
groupValue: _ambulate,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
_ambulate = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
_ambulate = Ambulate.Walker;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border:
|
||||||
|
Border.all(color: Colors.grey, width: 0.5),
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
child: ListTile(
|
||||||
|
title: Text('Walker'),
|
||||||
|
leading: Radio(
|
||||||
|
value: Ambulate.Walker,
|
||||||
|
groupValue: _ambulate,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
_ambulate = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 5,),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
_ambulate = Ambulate.Stretcher;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border:
|
||||||
|
Border.all(color: Colors.grey, width: 0.5),
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
child: ListTile(
|
||||||
|
title: Text('Stretcher'),
|
||||||
|
leading: Radio(
|
||||||
|
value: Ambulate.Stretcher,
|
||||||
|
groupValue: _ambulate,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
_ambulate = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
_ambulate = Ambulate.None;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border:
|
||||||
|
Border.all(color: Colors.grey, width: 0.5),
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
child: ListTile(
|
||||||
|
title: Text('Walker'),
|
||||||
|
leading: Radio(
|
||||||
|
value: Ambulate.None,
|
||||||
|
groupValue: _ambulate,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
_ambulate = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 12,),
|
||||||
|
NewTextFields(
|
||||||
|
hintText: 'Note',
|
||||||
|
initialValue: note,
|
||||||
|
onChanged: (value){
|
||||||
|
setState(() {
|
||||||
|
note = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
|
||||||
),
|
SizedBox(
|
||||||
)
|
height: 15,
|
||||||
],
|
),
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.all(15),
|
||||||
|
width: double.maxFinite,
|
||||||
|
height: 76,
|
||||||
|
child: SecondaryButton(
|
||||||
|
color: Colors.grey[800],
|
||||||
|
textColor: Colors.white,
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
widget.patientER.ambulate = _ambulate;
|
||||||
|
widget.patientER.requesterNote = note;
|
||||||
|
widget.changeCurrentTab(3);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
label: 'Next',
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,47 @@
|
|||||||
|
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class AppointmentCard extends StatelessWidget {
|
||||||
|
final AppoitmentAllHistoryResultList appointment;
|
||||||
|
|
||||||
|
const AppointmentCard({Key key, this.appointment}) : super(key: key);
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
width: double.infinity,
|
||||||
|
margin: EdgeInsets.all(8),
|
||||||
|
padding: EdgeInsets.all(10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
LargeAvatar(
|
||||||
|
url: appointment.doctorImageURL,
|
||||||
|
name: appointment.doctorNameObj,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Texts(appointment.doctorNameObj,bold: true,),
|
||||||
|
SizedBox(height: 4,),
|
||||||
|
Texts(appointment.projectName),
|
||||||
|
Texts(appointment.clinicName),
|
||||||
|
Texts(DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appointment.bookDate))),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class ProgressDialogUtil{
|
||||||
|
|
||||||
|
static AlertDialog alert = AlertDialog(
|
||||||
|
content: new Row(
|
||||||
|
children: [
|
||||||
|
CircularProgressIndicator(),
|
||||||
|
Container(margin: EdgeInsets.only(left: 7),child:Text("Loading..." )),
|
||||||
|
],),
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue