|
|
|
|
@ -33,13 +33,13 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
|
|
|
|
|
late double _latitude;
|
|
|
|
|
late double _longitude;
|
|
|
|
|
|
|
|
|
|
PatientERInsertPresOrderRequestModel patientERInsertPresOrderRequestModel = new PatientERInsertPresOrderRequestModel();
|
|
|
|
|
PatientERInsertPresOrderRequestModel patientERInsertPresOrderRequestModel = PatientERInsertPresOrderRequestModel();
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
super.initState();
|
|
|
|
|
_controller = new PageController();
|
|
|
|
|
// _getCurrentLocation();
|
|
|
|
|
_getCurrentLocation();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_getCurrentLocation() async {
|
|
|
|
|
@ -129,106 +129,109 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
|
|
|
|
|
},
|
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
widget.model.pendingOrder != null
|
|
|
|
|
? ListView(padding: EdgeInsets.symmetric(horizontal: 20, vertical: 15), children: [
|
|
|
|
|
(Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Color(0xffCC9B14),
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
boxShadow: [
|
|
|
|
|
BoxShadow(
|
|
|
|
|
color: Color(0xff000000).withOpacity(.05),
|
|
|
|
|
blurRadius: 27,
|
|
|
|
|
offset: Offset(0, -3),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
child: Container(
|
|
|
|
|
// decoration: containerColorRadiusLeft(Colors.white, 12),
|
|
|
|
|
margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0),
|
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12),
|
|
|
|
|
widget.model.pendingOrder != null && widget.model.pendingOrder.serviceText != null
|
|
|
|
|
? ListView(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 15),
|
|
|
|
|
children: [
|
|
|
|
|
(Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
border: Border.all(color: Colors.white, width: 1),
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0),
|
|
|
|
|
topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0),
|
|
|
|
|
bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0),
|
|
|
|
|
topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0),
|
|
|
|
|
color: Color(0xffCC9B14),
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
boxShadow: [
|
|
|
|
|
BoxShadow(
|
|
|
|
|
color: Color(0xff000000).withOpacity(.05),
|
|
|
|
|
blurRadius: 27,
|
|
|
|
|
offset: Offset(0, -3),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
// clipBehavior: Clip.antiAlias,
|
|
|
|
|
child: Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
child: Container(
|
|
|
|
|
// decoration: containerColorRadiusLeft(Colors.white, 12),
|
|
|
|
|
margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0),
|
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
border: Border.all(color: Colors.white, width: 1),
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0),
|
|
|
|
|
topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0),
|
|
|
|
|
bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0),
|
|
|
|
|
topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
// clipBehavior: Clip.antiAlias,
|
|
|
|
|
child: Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
widget.model.pendingOrder.statusText ?? "",
|
|
|
|
|
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffCC9B14), letterSpacing: -0.4, height: 16 / 10),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 6),
|
|
|
|
|
Text(
|
|
|
|
|
'${TranslationBase.of(context).requestID}: ${widget.model.pendingOrder.iD}',
|
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).hospital + ": ",
|
|
|
|
|
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Text(
|
|
|
|
|
widget.model.pendingOrder.nearestProjectName ?? "",
|
|
|
|
|
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
widget.model.pendingOrder!.statusText!,
|
|
|
|
|
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xffCC9B14), letterSpacing: -0.4, height: 16 / 10),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 6),
|
|
|
|
|
Text(
|
|
|
|
|
'${TranslationBase.of(context).requestID}: ${widget.model.pendingOrder!.iD.toString()}',
|
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
|
|
|
|
|
DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(widget.model.pendingOrder.created.toString()) ?? DateTime.now()),
|
|
|
|
|
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10),
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).hospital + ": ",
|
|
|
|
|
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
SizedBox(height: 12),
|
|
|
|
|
if (widget.model.pendingOrder.statusId == 1 || widget.model.pendingOrder.statusId == 2)
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
showConfirmMessage(widget.model, widget.model.pendingOrder);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Color(0xffD02127),
|
|
|
|
|
border: Border.all(color: Colors.white, width: 1),
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
),
|
|
|
|
|
child: Text(
|
|
|
|
|
widget.model.pendingOrder!.nearestProjectName.toString(),
|
|
|
|
|
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56),
|
|
|
|
|
TranslationBase.of(context).cancel_nocaps,
|
|
|
|
|
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(widget.model.pendingOrder!.created!)!),
|
|
|
|
|
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 12),
|
|
|
|
|
if (widget.model.pendingOrder!.statusId == 1 || widget.model.pendingOrder!.statusId == 2)
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
showConfirmMessage(widget.model, widget.model.pendingOrder!);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Color(0xffD02127),
|
|
|
|
|
border: Border.all(color: Colors.white, width: 1),
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
),
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context).cancel_nocaps,
|
|
|
|
|
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
))
|
|
|
|
|
])
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// FractionallySizedBox(
|
|
|
|
|
// widthFactor: 0.9,
|
|
|
|
|
|