First step from translations

merge-requests/224/merge
Elham Rababah 4 years ago
parent 4b435199fc
commit 5bf63174c9

@ -1163,5 +1163,25 @@ const Map localizedValues = {
"en": "The referral request has been submitted successfully, you will be contacted ASAP to complete the process. Referral request no is ",
"ar": " تم إرسال طلب الإحالة بنجاح ، وسيتم الاتصال بك في أسرع وقت ممكن لإكمال العملية. رقم طلب الإحالة"
},
"requestID": {
"en": "Request ID",
"ar": " رقم الطلب"
},
"OrderStatus": {
"en": "Status",
"ar": "الحاله"
},"pickupDate": {
"en": "Pickup Date",
"ar": "التاريخ"
}
,"serviceName": {
"en": "Service Name",
"ar": " اسم الخدمة"
}
,"orderLocation": {
"en": "Location",
"ar": "الموقع"
},
};

@ -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';
@ -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(
@ -134,183 +139,192 @@ class _NewCMCPageState extends State<NewCMCPage>
children: <Widget>[
widget.model.cmcAllOrderDetail.length != 0
? FractionallySizedBox(
heightFactor: 0.9,
widthFactor: 0.9,
child: Container(
width: double.infinity,
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border:
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
border:
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"Request ID",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
height: 12,
),
Texts(
widget.model.cmcAllOrderDetail[0].iD.toString(),
fontSize: 22,
),
],
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase
.of(context)
.requestID,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
widget.model.cmcAllOrderDetail[0].iD.toString(),
fontSize: 22,
),
],
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Status",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
"Pending",
fontSize: 22,
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase
.of(context)
.OrderStatus,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
projectViewModel.isArabic ? widget.model.cmcAllOrderDetail[0]
.descriptionN : widget.model.cmcAllOrderDetail[0].description,
fontSize: 22,
),
],
),
),
],
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context).pickupDate,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(widget.model.cmcAllOrderDetail[0].createdOn)),
fontSize: 22,
),
],
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Pickup Date",
bold: false,
fontSize: 13,
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context).serviceName,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
!projectViewModel.isArabic?widget.model.cmcAllOrderDetail[0].description
.toString() :
widget.model.cmcAllOrderDetail[0]
.descriptionN
.toString(),
fontSize: 22,
),
],
),
),
SizedBox(
height: 4,
),
Texts(
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(
widget.model.cmcAllOrderDetail[0]
.createdOn)),
fontSize: 22,
height: 12,
),
],
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: TranslationBase.of(context).cancel.toUpperCase(),
onTap: () {
showConfirmMessage(widget.model,
widget.model.cmcAllOrderDetail[0]);
}
,
color: Colors.red[800],
disabled: false,
textColor: Theme
.of(context)
.backgroundColor),
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Service Name",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
widget.model.cmcAllOrderDetail[0].description
.toString() ??
widget.model.cmcAllOrderDetail[0]
.descriptionN
.toString(),
fontSize: 22,
height: 22,
),
],
),
),
SizedBox(
height: 12,
),
Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: "Cancel".toUpperCase(),
onTap: () {
showConfirmMessage(widget.model,
widget.model.cmcAllOrderDetail[0]);
}
,
color: Colors.red[800],
disabled: false,
textColor: Theme
.of(context)
.backgroundColor),
),
),
SizedBox(
height: 12,
height: 22,
),
],
),

@ -2,13 +2,16 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_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/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:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'Dialog/confirm_cancel_order_dialog.dart';
@ -19,6 +22,9 @@ class OrdersLogDetailsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
void showConfirmMessage(
CMCViewModel model, GetHHCAllPresOrdersResponseModel order) {
showDialog(
@ -78,7 +84,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
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(
@ -89,11 +95,12 @@ class OrdersLogDetailsPage extends StatelessWidget {
// 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,
),
@ -110,7 +117,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
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(
@ -121,11 +128,12 @@ class OrdersLogDetailsPage extends StatelessWidget {
// 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,
),
@ -133,7 +141,9 @@ class OrdersLogDetailsPage extends StatelessWidget {
height: 4,
),
Texts(
order.description,
projectViewModel.isArabic ? order
.descriptionN : order.description,
fontSize: 22,
),
],
@ -142,7 +152,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
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(
@ -153,11 +163,10 @@ class OrdersLogDetailsPage extends StatelessWidget {
// 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,
),
@ -166,8 +175,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
),
Texts(
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(
order.createdOn)),
DateUtil.convertStringToDate(order.createdOn)),
fontSize: 22,
),
],
@ -176,7 +184,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
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(
@ -191,7 +199,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
CrossAxisAlignment.start,
children: [
Texts(
"Location",
TranslationBase.of(context).orderLocation,
bold: false,
fontSize: 13,
),
@ -199,10 +207,11 @@ class OrdersLogDetailsPage extends StatelessWidget {
height: 4,
),
Texts(
order.nearestProjectDescription
.toString() ??
order.nearestProjectDescriptionN
.toString(),
!projectViewModel.isArabic?order.
projectDescription.toString() :
order
.projectDescriptionN
.toString(),
fontSize: 22,
),
],
@ -212,32 +221,33 @@ class OrdersLogDetailsPage extends StatelessWidget {
height: 12,
),
if (order.status == 1 ||order.status == 2 )
Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: "Cancel".toUpperCase(),
onTap: () {
showConfirmMessage(model, order);
}
,
color: Colors.red[800],
disabled: false,
textColor: Theme
.of(context)
.backgroundColor),
),
Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: TranslationBase.of(context).cancel.toUpperCase(),
onTap: () {
showConfirmMessage(model,
order);
}
,
color: Colors.red[800],
disabled: false,
textColor: Theme
.of(context)
.backgroundColor),
),
),
SizedBox(
height: 12,
),
],
),
);
height: 22,
),
],
),
);
}).toList())
],
),

@ -3,16 +3,19 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/Dialog/confirm_cancel_order_dialog.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.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 '../StepsWidget.dart';
import 'new_Home_health_care_step_one_page.dart';
@ -92,6 +95,8 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
));
}
ProjectViewModel projectViewModel = Provider.of(context);
return Scaffold(
body: SafeArea(
child: SingleChildScrollView(
@ -99,7 +104,6 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
height: MediaQuery.of(context).size.height * 0.8,
child: Column(
children: [
Container(
margin: EdgeInsets.only(left: MediaQuery.of(context).size.width*0.05, right: MediaQuery.of(context).size.width*0.05),
child: StepsWidget(
@ -138,7 +142,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
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(
@ -152,7 +156,9 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"Request ID",
TranslationBase
.of(context)
.requestID,
bold: false,
fontSize: 13,
),
@ -169,7 +175,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
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(
@ -183,7 +189,9 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"Status",
TranslationBase
.of(context)
.OrderStatus,
bold: false,
fontSize: 13,
),
@ -191,7 +199,11 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
height: 4,
),
Texts(
widget.model.pendingOrder.description,
projectViewModel.isArabic ? widget
.model.pendingOrder
.descriptionN : widget.model
.pendingOrder.description,
fontSize: 22,
),
],
@ -200,7 +212,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
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(
@ -214,7 +226,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"Pickup Date",
TranslationBase.of(context).pickupDate,
bold: false,
fontSize: 13,
),
@ -235,7 +247,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
(index) => 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(
@ -250,7 +262,9 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
CrossAxisAlignment.start,
children: [
Texts(
"Service Name",
TranslationBase
.of(context)
.serviceName,
bold: false,
fontSize: 13,
),
@ -258,7 +272,12 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
height: 4,
),
Texts(
widget.model.hhcAllOrderDetail[index]
projectViewModel.isArabic
? widget.model
.hhcAllOrderDetail[index]
.descriptionN
: widget.model
.hhcAllOrderDetail[index]
.description,
fontSize: 22,
bold: true,
@ -275,7 +294,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
width:
MediaQuery.of(context).size.width * 0.85,
child: SecondaryButton(
label: "Cancel".toUpperCase(),
label: TranslationBase.of(context).cancel.toUpperCase(),
onTap: () {
showConfirmMessage(widget.model,
widget.model.hhcAllOrderDetail[0]);

@ -2,13 +2,16 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.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:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'Dialog/confirm_cancel_order_dialog.dart';
@ -19,6 +22,8 @@ class OrdersLogDetailsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
void showConfirmMessage(
HomeHealthCareViewModel model, GetHHCAllPresOrdersResponseModel order) {
showDialog(
@ -29,212 +34,219 @@ class OrdersLogDetailsPage extends StatelessWidget {
UpdatePresOrderRequestModel updatePresOrderRequestModel =
UpdatePresOrderRequestModel(
presOrderID: order.iD,
rejectionReason: "",
presOrderStatus: 4, editedBy: 3);
rejectionReason: "",
presOrderStatus: 4, editedBy: 3);
await model.updateHHCPresOrder(updatePresOrderRequestModel);
if(model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error);
Utils.showErrorToast(model.error);
} else {
AppToast.showSuccessToast(message: "Done Successfully");
await model.getHHCAllPresOrders();
// await model.getHHCAllServices();
// await model.getHHCAllServices();
}
},
));
}
return AppScaffold(
isShowAppBar: false,
baseViewModel: model,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
margin: EdgeInsets.all(12),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.94,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 50,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: model.hhcAllPresOrders.map((order) {
return Container(
width: double.infinity,
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border:
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Request ID",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
order.iD.toString(),
fontSize: 22,
isShowAppBar: false,
baseViewModel: model,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
margin: EdgeInsets.all(12),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.94,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 50,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: model.hhcAllPresOrders.map((order) {
return Container(
width: double.infinity,
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border:
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15, right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
],
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase
.of(context)
.requestID,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
order.iD.toString(),
fontSize: 22,
),
],
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Status",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
order.description,
fontSize: 22,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15, right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
],
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase
.of(context)
.OrderStatus,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
projectViewModel.isArabic ? order.descriptionN : order.description,
fontSize: 22,
),
],
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Pickup Date",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(
order.createdOn)),
fontSize: 22,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15, right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
],
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase
.of(context)
.pickupDate,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(order.createdOn)),
fontSize: 22,
),
],
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Location",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
order.nearestProjectDescription
.toString() ??
order.nearestProjectDescriptionN
.toString(),
fontSize: 22,
),
SizedBox(
height: 12,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15, right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
],
),
),
SizedBox(
height: 12,
),
if (order.status == 1 ||order.status == 2 )
Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: "Cancel".toUpperCase(),
onTap: () {
showConfirmMessage(model, order);
}
,
color: Colors.red[800],
disabled: false,
textColor: Theme
.of(context)
.backgroundColor),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context).orderLocation,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
!projectViewModel.isArabic ?order.nearestProjectDescription
.toString() :
order.nearestProjectDescriptionN
.toString(),
fontSize: 22,
),
],
),
),
SizedBox(
height: 12,
),
if (order.status == 1 ||order.status == 2 )
Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: "Cancel".toUpperCase(),
onTap: () {
showConfirmMessage(model, order);
}
,
color: Colors.red[800],
disabled: false,
textColor: Theme
.of(context)
.backgroundColor),
),
SizedBox(
height: 12,
),
SizedBox(
height: 12,
),
],
),

@ -898,8 +898,11 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get addedChild => localizedValues['added-child'][locale.languageCode];
String get appUpdate => localizedValues['appUpdate'][locale.languageCode];
String get ereferralSaveSuccess => localizedValues['ereferralSaveSuccess'][locale.languageCode];
String get requestID => localizedValues['requestID'][locale.languageCode];
String get OrderStatus => localizedValues['OrderStatus'][locale.languageCode];
String get pickupDate => localizedValues['pickupDate'][locale.languageCode];
String get serviceName => localizedValues['serviceName'][locale.languageCode];
String get orderLocation => localizedValues['orderLocation'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -143,7 +143,10 @@ dependencies:
screen: ^0.0.5
#google maps places
google_maps_place_picker: ^1.0.0
#fit_kit
fit_kit: ^1.1.2
#Dependencies for video call implementation
native_device_orientation: ^0.3.0
enum_to_string: ^1.0.9

Loading…
Cancel
Save