|
|
|
|
@ -3,15 +3,18 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/Comprehens
|
|
|
|
|
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_cancel_order_dialog.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/StepsWidget.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/utils.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:geolocator/geolocator.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
import 'new_cmc_step_one_page.dart';
|
|
|
|
|
import 'new_cmc_step_three_page.dart';
|
|
|
|
|
@ -46,7 +49,7 @@ class _NewCMCPageState extends State<NewCMCPage>
|
|
|
|
|
price: widget.model.cmcAllServicesList[0].price,
|
|
|
|
|
serviceID: widget.model.cmcAllServicesList[0].serviceID.toString(),
|
|
|
|
|
selectedServiceName: widget.model.cmcAllServicesList[0].description,
|
|
|
|
|
selectedServiceNameAR: widget.model.cmcAllServicesList[0].description,
|
|
|
|
|
selectedServiceNameAR: widget.model.cmcAllServicesList[0].descriptionN,
|
|
|
|
|
recordID: 1,
|
|
|
|
|
totalPrice: widget.model.cmcAllServicesList[0].totalPrice,
|
|
|
|
|
vAT: widget.model.cmcAllServicesList[0].vAT);
|
|
|
|
|
@ -85,6 +88,8 @@ class _NewCMCPageState extends State<NewCMCPage>
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
|
|
|
|
|
void showConfirmMessage(
|
|
|
|
|
CMCViewModel model, GetOrderDetailByOrderIDResponseModel order) {
|
|
|
|
|
showDialog(
|
|
|
|
|
@ -101,7 +106,7 @@ class _NewCMCPageState extends State<NewCMCPage>
|
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
|
Utils.showErrorToast(model.error);
|
|
|
|
|
} else {
|
|
|
|
|
AppToast.showSuccessToast(message: "Done Successfully");
|
|
|
|
|
AppToast.showSuccessToast(message:TranslationBase.of(context).processDoneSuccessfully );
|
|
|
|
|
await model.getCmcAllPresOrders();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
@ -134,9 +139,11 @@ class _NewCMCPageState extends State<NewCMCPage>
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
widget.model.cmcAllOrderDetail.length != 0
|
|
|
|
|
? FractionallySizedBox(
|
|
|
|
|
heightFactor: 0.9,
|
|
|
|
|
widthFactor: 0.9,
|
|
|
|
|
child: Container(
|
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
margin: EdgeInsets.only(top: 15),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
@ -153,7 +160,7 @@ class _NewCMCPageState extends State<NewCMCPage>
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
left: 15, bottom: 15, top: 15),
|
|
|
|
|
left: 15, bottom: 15, top: 15,right: 15),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
border: Border(
|
|
|
|
|
bottom: BorderSide(
|
|
|
|
|
@ -164,11 +171,12 @@ class _NewCMCPageState extends State<NewCMCPage>
|
|
|
|
|
// borderRadius: BorderRadius.circular(12),
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Texts(
|
|
|
|
|
"Request ID",
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.requestID,
|
|
|
|
|
bold: false,
|
|
|
|
|
fontSize: 13,
|
|
|
|
|
),
|
|
|
|
|
@ -185,7 +193,7 @@ class _NewCMCPageState extends State<NewCMCPage>
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
left: 15, bottom: 15, top: 15),
|
|
|
|
|
left: 15, bottom: 15, top: 15,right: 15),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
border: Border(
|
|
|
|
|
bottom: BorderSide(
|
|
|
|
|
@ -196,11 +204,12 @@ class _NewCMCPageState extends State<NewCMCPage>
|
|
|
|
|
// borderRadius: BorderRadius.circular(12),
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Texts(
|
|
|
|
|
"Status",
|
|
|
|
|
TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.OrderStatus,
|
|
|
|
|
bold: false,
|
|
|
|
|
fontSize: 13,
|
|
|
|
|
),
|
|
|
|
|
@ -208,7 +217,9 @@ class _NewCMCPageState extends State<NewCMCPage>
|
|
|
|
|
height: 4,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
"Pending",
|
|
|
|
|
|
|
|
|
|
projectViewModel.isArabic ? widget.model.cmcAllOrderDetail[0]
|
|
|
|
|
.descriptionN : widget.model.cmcAllOrderDetail[0].description,
|
|
|
|
|
fontSize: 22,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -217,7 +228,7 @@ class _NewCMCPageState extends State<NewCMCPage>
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
|
left: 15, bottom: 15, top: 15),
|
|
|
|
|
left: 15, bottom: 15, top: 15,right: 15),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
border: Border(
|
|
|
|
|
bottom: BorderSide(
|
|
|
|
|
@ -228,11 +239,10 @@ class _NewCMCPageState extends State<NewCMCPage>
|
|
|
|
|
// borderRadius: BorderRadius.circular(12),
|
|
|
|
|
color: Colors.white),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Texts(
|
|
|
|
|
"Pickup Date",
|
|
|
|
|
TranslationBase.of(context).pickupDate,
|
|
|
|
|
bold: false,
|
|
|
|
|
fontSize: 13,
|
|
|
|
|
),
|
|
|
|
|
@ -241,9 +251,7 @@ class _NewCMCPageState extends State<NewCMCPage>
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
DateUtil.getDayMonthYearDateFormatted(
|
|
|
|
|
DateUtil.convertStringToDate(
|
|
|
|
|
widget.model.cmcAllOrderDetail[0]
|
|
|
|
|
.createdOn)),
|
|
|
|
|
DateUtil.convertStringToDate(widget.model.cmcAllOrderDetail[0].createdOn)),
|
|
|
|
|
fontSize: 22,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -267,7 +275,7 @@ class _NewCMCPageState extends State<NewCMCPage>
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Texts(
|
|
|
|
|
"Service Name",
|
|
|
|
|
TranslationBase.of(context).serviceName,
|
|
|
|
|
bold: false,
|
|
|
|
|
fontSize: 13,
|
|
|
|
|
),
|
|
|
|
|
@ -275,8 +283,8 @@ class _NewCMCPageState extends State<NewCMCPage>
|
|
|
|
|
height: 4,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
widget.model.cmcAllOrderDetail[0].description
|
|
|
|
|
.toString() ??
|
|
|
|
|
!projectViewModel.isArabic?widget.model.cmcAllOrderDetail[0].description
|
|
|
|
|
.toString() :
|
|
|
|
|
widget.model.cmcAllOrderDetail[0]
|
|
|
|
|
.descriptionN
|
|
|
|
|
.toString(),
|
|
|
|
|
@ -296,7 +304,7 @@ class _NewCMCPageState extends State<NewCMCPage>
|
|
|
|
|
.width *
|
|
|
|
|
0.85,
|
|
|
|
|
child: SecondaryButton(
|
|
|
|
|
label: "Cancel".toUpperCase(),
|
|
|
|
|
label: TranslationBase.of(context).cancel.toUpperCase(),
|
|
|
|
|
onTap: () {
|
|
|
|
|
showConfirmMessage(widget.model,
|
|
|
|
|
widget.model.cmcAllOrderDetail[0]);
|
|
|
|
|
@ -310,7 +318,13 @@ class _NewCMCPageState extends State<NewCMCPage>
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 12,
|
|
|
|
|
height: 22,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 22,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|