|
|
|
|
@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/utils.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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';
|
|
|
|
|
@ -27,468 +28,148 @@ class OrdersLogDetailsPage extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
void showConfirmMessage(CMCViewModel model, GetHHCAllPresOrdersResponseModel order) {
|
|
|
|
|
showDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
child: ConfirmCancelOrderDialog(
|
|
|
|
|
model: model,
|
|
|
|
|
onTap: () async {
|
|
|
|
|
UpdatePresOrderRequestModel updatePresOrderRequestModel = UpdatePresOrderRequestModel(presOrderID: order.iD, rejectionReason: "", presOrderStatus: 4, editedBy: 3);
|
|
|
|
|
await model.updateCmcPresOrder(updatePresOrderRequestModel);
|
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
|
Utils.showErrorToast(model.error);
|
|
|
|
|
} else {
|
|
|
|
|
AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully);
|
|
|
|
|
await model.getCmcAllPresOrders();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
));
|
|
|
|
|
context: context,
|
|
|
|
|
child: ConfirmCancelOrderDialog(
|
|
|
|
|
model: model,
|
|
|
|
|
onTap: () async {
|
|
|
|
|
UpdatePresOrderRequestModel updatePresOrderRequestModel = UpdatePresOrderRequestModel(presOrderID: order.iD, rejectionReason: "", presOrderStatus: 4, editedBy: 3);
|
|
|
|
|
await model.updateCmcPresOrder(updatePresOrderRequestModel);
|
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
|
Utils.showErrorToast(model.error);
|
|
|
|
|
} else {
|
|
|
|
|
AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully);
|
|
|
|
|
await model.getCmcAllPresOrders();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return AppScaffold(
|
|
|
|
|
isShowAppBar: false,
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
body:
|
|
|
|
|
|
|
|
|
|
// ListView.separated(
|
|
|
|
|
// physics: BouncingScrollPhysics(),
|
|
|
|
|
// padding: EdgeInsets.all(21),
|
|
|
|
|
// separatorBuilder: (context, index) {
|
|
|
|
|
// return SizedBox(height: 12);
|
|
|
|
|
// },
|
|
|
|
|
// itemBuilder: (context, index) {
|
|
|
|
|
// int status = model.cmcAllPresOrders[index].status;
|
|
|
|
|
// String _statusDisp = projectViewModel.isArabic ? model.cmcAllPresOrders[index].descriptionN : model.cmcAllPresOrders[index].description;
|
|
|
|
|
// Color _color;
|
|
|
|
|
// if (status == 1) {
|
|
|
|
|
// //pending
|
|
|
|
|
// _color = Color(0xffCC9B14);
|
|
|
|
|
// } else if (status == 2) {
|
|
|
|
|
// //processing
|
|
|
|
|
// _color = Color(0xff2E303A);
|
|
|
|
|
// } else if (status == 3) {
|
|
|
|
|
// //completed
|
|
|
|
|
// _color = Color(0xff359846);
|
|
|
|
|
// } else if (status == 4) {
|
|
|
|
|
// //cancel // Rejected
|
|
|
|
|
// _color = Color(0xffD02127);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// return InkWell(
|
|
|
|
|
// // onTap: () => Navigator.push(
|
|
|
|
|
// // context,
|
|
|
|
|
// // FadePage(
|
|
|
|
|
// // page: PrescriptionsHistoryDetailsPage(
|
|
|
|
|
// // prescriptionsOrder: prescriptionsViewModel.prescriptionsHistory[index],
|
|
|
|
|
// // ),
|
|
|
|
|
// // ),
|
|
|
|
|
// // ),
|
|
|
|
|
// child: Container(
|
|
|
|
|
// height: 65,
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
// borderRadius: BorderRadius.all(
|
|
|
|
|
// Radius.circular(10.0),
|
|
|
|
|
// ),
|
|
|
|
|
// boxShadow: [
|
|
|
|
|
// BoxShadow(
|
|
|
|
|
// color: Color(0xff000000).withOpacity(.05),
|
|
|
|
|
// blurRadius: 27,
|
|
|
|
|
// offset: Offset(0, -3),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// child: Row(
|
|
|
|
|
// mainAxisSize: MainAxisSize.min,
|
|
|
|
|
// children: [
|
|
|
|
|
// Container(
|
|
|
|
|
// width: 6,
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
// color: _color,
|
|
|
|
|
// borderRadius: BorderRadius.only(
|
|
|
|
|
// topLeft: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0),
|
|
|
|
|
// bottomLeft: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0),
|
|
|
|
|
// topRight: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0),
|
|
|
|
|
// bottomRight: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: Padding(
|
|
|
|
|
// padding: EdgeInsets.only(left: projectViewModel.isArabic ? 6 : 12, right: projectViewModel.isArabic ? 12 : 6),
|
|
|
|
|
// child: Row(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// mainAxisSize: MainAxisSize.min,
|
|
|
|
|
// children: [
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: Column(
|
|
|
|
|
// mainAxisSize: MainAxisSize.min,
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: [
|
|
|
|
|
// Text(
|
|
|
|
|
// _statusDisp,
|
|
|
|
|
// style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: _color, letterSpacing: -0.4, height: 16 / 10),
|
|
|
|
|
// ),
|
|
|
|
|
// Text(
|
|
|
|
|
// '${TranslationBase.of(context).orderNo}. ${model.cmcAllPresOrders[index].iD}',
|
|
|
|
|
// style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// Column(
|
|
|
|
|
// mainAxisSize: MainAxisSize.min,
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
// children: [
|
|
|
|
|
// Text(
|
|
|
|
|
// DateUtil.formatDateToDate(DateUtil.convertStringToDate(model.cmcAllPresOrders[index].createdOn), projectViewModel.isArabic),
|
|
|
|
|
// style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10),
|
|
|
|
|
// ),
|
|
|
|
|
// Text(
|
|
|
|
|
// DateUtil.formatDateToTime(DateUtil.convertStringToDate(model.cmcAllPresOrders[index].createdOn)),
|
|
|
|
|
// style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// )
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// Icon(
|
|
|
|
|
// Icons.arrow_forward_ios,
|
|
|
|
|
// size: 16,
|
|
|
|
|
// ),
|
|
|
|
|
// mWidth(6),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ));
|
|
|
|
|
// },
|
|
|
|
|
// itemCount: model.cmcAllPresOrders.length,
|
|
|
|
|
// ),
|
|
|
|
|
body: ListView.separated(
|
|
|
|
|
padding: EdgeInsets.all(21),
|
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
|
GetHHCAllPresOrdersResponseModel order = model.cmcAllPresOrders[index];
|
|
|
|
|
|
|
|
|
|
SingleChildScrollView(
|
|
|
|
|
physics: ScrollPhysics(),
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: FractionallySizedBox(
|
|
|
|
|
widthFactor: 0.94,
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: model.cmcAllPresOrders.map((order) {
|
|
|
|
|
return Container(
|
|
|
|
|
// margin: EdgeInsets.all(10),
|
|
|
|
|
child: Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
padding: EdgeInsets.only(left: 12, right: 12, top: 12),
|
|
|
|
|
child: Card(
|
|
|
|
|
shape: cardRadius(12),
|
|
|
|
|
elevation: 2,
|
|
|
|
|
margin: EdgeInsets.zero,
|
|
|
|
|
color: order.status == 4
|
|
|
|
|
? Colors.red[900]
|
|
|
|
|
: order.status == 3
|
|
|
|
|
? Colors.green[400]
|
|
|
|
|
: Color(0xffcd9e1b),
|
|
|
|
|
clipBehavior: Clip.antiAlias,
|
|
|
|
|
child: Container(
|
|
|
|
|
// decoration: containerColorRadiusLeft(Colors.white, 12),
|
|
|
|
|
margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 8, right: projectViewModel.isArabic ? 8 : 0),
|
|
|
|
|
padding: EdgeInsets.all(12),
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
topLeft: projectViewModel.isArabic ? Radius.zero : Radius.circular(12.0),
|
|
|
|
|
topRight: projectViewModel.isArabic ? Radius.circular(12.0) : Radius.zero,
|
|
|
|
|
bottomLeft: projectViewModel.isArabic ? Radius.zero : Radius.circular(12.0),
|
|
|
|
|
bottomRight: projectViewModel.isArabic ? Radius.circular(12.0) : Radius.zero,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
// clipBehavior: Clip.antiAlias,
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).OrderStatus + ' ' + (projectViewModel.isArabic ? order.descriptionN : order.description),
|
|
|
|
|
bold: false,
|
|
|
|
|
fontSize: 12,
|
|
|
|
|
color: order.status == 4
|
|
|
|
|
? Colors.red[900]
|
|
|
|
|
: order.status == 3
|
|
|
|
|
? Colors.green[400]
|
|
|
|
|
: Color(0xffcd9e1b),
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context).requestID + ' ' + order.iD.toString(),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
),
|
|
|
|
|
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: 13,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
Texts(
|
|
|
|
|
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.createdOn)),
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 8),
|
|
|
|
|
(order.status == 1 || order.status == 2)
|
|
|
|
|
? SecondaryButton(
|
|
|
|
|
onTap: () {
|
|
|
|
|
showConfirmMessage(model, order);
|
|
|
|
|
},
|
|
|
|
|
label: TranslationBase.of(context).cancel,
|
|
|
|
|
color: Colors.red[900],
|
|
|
|
|
small: true,
|
|
|
|
|
)
|
|
|
|
|
: SizedBox()
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
))),
|
|
|
|
|
));
|
|
|
|
|
}).toList())
|
|
|
|
|
int status = order.status;
|
|
|
|
|
String _statusDisp = projectViewModel.isArabic ? order.descriptionN : order.description;
|
|
|
|
|
Color _color;
|
|
|
|
|
if (status == 1) {
|
|
|
|
|
//pending
|
|
|
|
|
_color = Color(0xffCC9B14);
|
|
|
|
|
} else if (status == 2) {
|
|
|
|
|
//processing
|
|
|
|
|
_color = Color(0xff2E303A);
|
|
|
|
|
} else if (status == 3) {
|
|
|
|
|
//completed
|
|
|
|
|
_color = Color(0xff359846);
|
|
|
|
|
} else if (status == 4) {
|
|
|
|
|
//cancel // Rejected
|
|
|
|
|
_color = Color(0xffD02127);
|
|
|
|
|
}
|
|
|
|
|
return Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: _color,
|
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
|
Radius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
boxShadow: [
|
|
|
|
|
BoxShadow(
|
|
|
|
|
color: Color(0xff000000).withOpacity(.05),
|
|
|
|
|
blurRadius: 27,
|
|
|
|
|
offset: Offset(0, -3),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
// SingleChildScrollView(
|
|
|
|
|
// physics: ScrollPhysics(),
|
|
|
|
|
// child: Container(
|
|
|
|
|
// margin: EdgeInsets.all(12),
|
|
|
|
|
// child: Center(
|
|
|
|
|
// child: FractionallySizedBox(
|
|
|
|
|
// widthFactor: 0.94,
|
|
|
|
|
// child: Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: [
|
|
|
|
|
// Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: model.cmcAllPresOrders.map((order) {
|
|
|
|
|
// return Container(
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
// margin: EdgeInsets.only(top: 12),
|
|
|
|
|
// clipBehavior: Clip.antiAlias,
|
|
|
|
|
// 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: 6,
|
|
|
|
|
// ),
|
|
|
|
|
// Container(
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
// padding: EdgeInsets.only(left: 15, bottom: 15, top: 8, right: 15),
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
// border: Border(
|
|
|
|
|
// bottom: BorderSide(
|
|
|
|
|
// color: Colors.grey,
|
|
|
|
|
// width: 1.0,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// // borderRadius: BorderRadius.circular(12),
|
|
|
|
|
// ),
|
|
|
|
|
// child: Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: [
|
|
|
|
|
// Text(
|
|
|
|
|
// TranslationBase.of(context).requestID,
|
|
|
|
|
// style: TextStyle(
|
|
|
|
|
// fontSize: 13,
|
|
|
|
|
// fontWeight: FontWeight.w600,
|
|
|
|
|
// letterSpacing: -0.45,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// height: 4,
|
|
|
|
|
// ),
|
|
|
|
|
// Text(
|
|
|
|
|
// order.iD.toString(),
|
|
|
|
|
// style: TextStyle(
|
|
|
|
|
// fontSize: 18,
|
|
|
|
|
// fontWeight: FontWeight.w600,
|
|
|
|
|
// letterSpacing: -0.45,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// 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),
|
|
|
|
|
// ),
|
|
|
|
|
// child: Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: [
|
|
|
|
|
// Text(
|
|
|
|
|
// TranslationBase.of(context).OrderStatus,
|
|
|
|
|
// style: TextStyle(
|
|
|
|
|
// fontSize: 13,
|
|
|
|
|
// fontWeight: FontWeight.w600,
|
|
|
|
|
// letterSpacing: -0.45,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// height: 4,
|
|
|
|
|
// ),
|
|
|
|
|
// Text(
|
|
|
|
|
// projectViewModel.isArabic ? order.descriptionN : order.description,
|
|
|
|
|
// style: TextStyle(
|
|
|
|
|
// fontSize: 18,
|
|
|
|
|
// fontWeight: FontWeight.w600,
|
|
|
|
|
// letterSpacing: -0.45,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// 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),
|
|
|
|
|
// ),
|
|
|
|
|
// child: Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: [
|
|
|
|
|
// Text(
|
|
|
|
|
// TranslationBase.of(context).pickupDate,
|
|
|
|
|
// style: TextStyle(
|
|
|
|
|
// fontSize: 13,
|
|
|
|
|
// fontWeight: FontWeight.w600,
|
|
|
|
|
// letterSpacing: -0.45,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// height: 4,
|
|
|
|
|
// ),
|
|
|
|
|
// Text(
|
|
|
|
|
// DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.createdOn)),
|
|
|
|
|
// style: TextStyle(
|
|
|
|
|
// fontSize: 18,
|
|
|
|
|
// fontWeight: FontWeight.w600,
|
|
|
|
|
// letterSpacing: -0.45,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// Container(
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
// clipBehavior: Clip.antiAlias,
|
|
|
|
|
// padding: EdgeInsets.only(left: 15, bottom: 15, top: 15, right: 15),
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
// border: Border(
|
|
|
|
|
// bottom: BorderSide(
|
|
|
|
|
// color: (order.status == 1 || order.status == 2) ? Colors.grey : Colors.transparent,
|
|
|
|
|
// width: (order.status == 1 || order.status == 2) ? 1.0 : 0,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// // borderRadius: BorderRadius.circular(12),
|
|
|
|
|
// ),
|
|
|
|
|
// child: Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: [
|
|
|
|
|
// Text(
|
|
|
|
|
// TranslationBase.of(context).orderLocation,
|
|
|
|
|
// style: TextStyle(
|
|
|
|
|
// fontSize: 13,
|
|
|
|
|
// fontWeight: FontWeight.w600,
|
|
|
|
|
// letterSpacing: -0.45,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// height: 4,
|
|
|
|
|
// ),
|
|
|
|
|
// Text(
|
|
|
|
|
// !projectViewModel.isArabic ? order.projectDescription.toString() : order.projectDescriptionN.toString(),
|
|
|
|
|
// style: TextStyle(
|
|
|
|
|
// fontSize: 13,
|
|
|
|
|
// fontWeight: FontWeight.w600,
|
|
|
|
|
// letterSpacing: -0.45,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// (order.status == 1 || order.status == 2)
|
|
|
|
|
// ? SizedBox(
|
|
|
|
|
// height: 12,
|
|
|
|
|
// )
|
|
|
|
|
// : Container(),
|
|
|
|
|
// if (order.status == 1 || order.status == 2)
|
|
|
|
|
// 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),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// (order.status == 1 || order.status == 2)
|
|
|
|
|
// ? SizedBox(
|
|
|
|
|
// height: 12,
|
|
|
|
|
// )
|
|
|
|
|
// : SizedBox(
|
|
|
|
|
// height: 2,
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// );
|
|
|
|
|
// }).toList())
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
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(
|
|
|
|
|
_statusDisp,
|
|
|
|
|
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: _color, letterSpacing: -0.4, height: 16 / 10),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 6),
|
|
|
|
|
Text(
|
|
|
|
|
'${TranslationBase.of(context).requestID}: ${order.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).serviceName + ": ",
|
|
|
|
|
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Text(
|
|
|
|
|
!projectViewModel.isArabic ? order.nearestProjectDescription.trim().toString() : order.nearestProjectDescriptionN.toString(),
|
|
|
|
|
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
DateUtil.formatDateToDate(DateUtil.convertStringToDate(order.createdOn), projectViewModel.isArabic),
|
|
|
|
|
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 12),
|
|
|
|
|
if (order.status == 1 || order.status == 2)
|
|
|
|
|
InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
showConfirmMessage(model, order);
|
|
|
|
|
},
|
|
|
|
|
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),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
separatorBuilder: (context, index) => SizedBox(height: 12),
|
|
|
|
|
itemCount: model.cmcAllPresOrders.length),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|