Merge remote-tracking branch 'origin/development_new_design_2.0' into development_new_design_2.0

merge-update-with-lab-changes
Mirza.Shafique 4 years ago
commit 6e244a55f5

@ -12,8 +12,8 @@ const PACKAGES_PRODUCTS = '/api/products';
const PACKAGES_CUSTOMER = '/api/customers'; const PACKAGES_CUSTOMER = '/api/customers';
const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders'; const PACKAGES_ORDERS = '/api/orders';
// const BASE_URL = 'https://uat.hmgwebservices.com/'; const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs // Pharmacy UAT URLs
const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';

@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.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/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -22,7 +23,7 @@ class NewCMCStepOnePage extends StatefulWidget {
final double latitude; final double latitude;
final double longitude; final double longitude;
const NewCMCStepOnePage({Key key, this.cMCInsertPresOrderRequestModel, this.model, this.changePageViewIndex,this.latitude,this.longitude}) : super(key: key); const NewCMCStepOnePage({Key key, this.cMCInsertPresOrderRequestModel, this.model, this.changePageViewIndex, this.latitude, this.longitude}) : super(key: key);
@override @override
_NewCMCStepOnePageState createState() => _NewCMCStepOnePageState(); _NewCMCStepOnePageState createState() => _NewCMCStepOnePageState();
@ -41,160 +42,151 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
return AppScaffold( return AppScaffold(
isShowAppBar: false, isShowAppBar: false,
baseViewModel: widget.model, baseViewModel: widget.model,
body: SingleChildScrollView( body: Column(
physics: ScrollPhysics(), children: [
child: Container( Expanded(
margin: EdgeInsets.only(left: 12, right: 12), child: SingleChildScrollView(
child: Center( physics: BouncingScrollPhysics(),
child: Column( padding: EdgeInsets.all(21),
children: [ child: Column(
ListView.separated( children: [
physics: NeverScrollableScrollPhysics(), ListView.separated(
shrinkWrap: true, physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, index) { shrinkWrap: true,
return Row( itemBuilder: (context, index) {
children: [ return Row(
Radio( children: [
value: widget.model.cmcAllServicesList[index].serviceID, Radio(
activeColor: Colors.red[800], value: widget.model.cmcAllServicesList[index].serviceID,
onChanged: (newValue) async { activeColor: Colors.red[800],
PatientERCMCInsertServicesList patientERCMCInsertServicesList = new PatientERCMCInsertServicesList( onChanged: (newValue) async {
price: widget.model.cmcAllServicesList[index].price, PatientERCMCInsertServicesList patientERCMCInsertServicesList = new PatientERCMCInsertServicesList(
serviceID: widget.model.cmcAllServicesList[index].serviceID.toString(), price: widget.model.cmcAllServicesList[index].price,
selectedServiceName: widget.model.cmcAllServicesList[index].description, serviceID: widget.model.cmcAllServicesList[index].serviceID.toString(),
selectedServiceNameAR: widget.model.cmcAllServicesList[index].descriptionN, selectedServiceName: widget.model.cmcAllServicesList[index].description,
recordID: 1, selectedServiceNameAR: widget.model.cmcAllServicesList[index].descriptionN,
totalPrice: widget.model.cmcAllServicesList[index].totalPrice, recordID: 1,
vAT: widget.model.cmcAllServicesList[index].vAT); totalPrice: widget.model.cmcAllServicesList[index].totalPrice,
setState(() { vAT: widget.model.cmcAllServicesList[index].vAT);
widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList = [patientERCMCInsertServicesList]; setState(() {
}); widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList = [patientERCMCInsertServicesList];
CMCGetItemsRequestModel cMCGetItemsRequestModel = new CMCGetItemsRequestModel(checkupType: newValue); });
await widget.model.getCheckupItems(cMCGetItemsRequestModel: cMCGetItemsRequestModel); CMCGetItemsRequestModel cMCGetItemsRequestModel = new CMCGetItemsRequestModel(checkupType: newValue);
}, await widget.model.getCheckupItems(cMCGetItemsRequestModel: cMCGetItemsRequestModel);
groupValue: widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList.length > 0 },
? int.parse(widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList[0].serviceID) groupValue: widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList.length > 0
: 1), ? int.parse(widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList[0].serviceID)
Expanded( : 1),
child: Padding( Expanded(
padding: const EdgeInsets.only( child: Padding(
left: 10, padding: const EdgeInsets.only(
right: 10, left: 10,
top: 20, right: 10,
bottom: 20, top: 20,
), bottom: 20,
child: Text( ),
projectViewModel.isArabic ? widget.model.cmcAllServicesList[index].descriptionN : widget.model.cmcAllServicesList[index].description, child: Text(
style: TextStyle( projectViewModel.isArabic ? widget.model.cmcAllServicesList[index].descriptionN : widget.model.cmcAllServicesList[index].description,
fontSize: 14, style: TextStyle(
fontWeight: FontWeight.w600, fontSize: 14,
letterSpacing: -0.45, fontWeight: FontWeight.w600,
letterSpacing: -0.45,
),
), ),
), ),
), ),
), ],
], );
); },
}, separatorBuilder: (context, index) {
separatorBuilder: (context, index) { return mDivider(Colors.grey);
return mDivider(Colors.grey); },
}, itemCount: widget.model.cmcAllServicesList.length),
itemCount: widget.model.cmcAllServicesList.length), Card(
Card( shape: cardRadius(12),
shape: cardRadius(12), elevation: 4,
elevation: 4, child: Container(
child: Container( width: double.infinity,
width: double.infinity, child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ Padding(
Padding( padding: const EdgeInsets.only(left: 12, right: 12, top: 12),
padding: const EdgeInsets.only(left: 12,right: 12,top: 12), child: Text(
child: Text( TranslationBase.of(context).coveredService,
TranslationBase.of(context).coveredService, style: TextStyle(
style: TextStyle( fontSize: 14,
fontSize: 14, fontWeight: FontWeight.w600,
fontWeight: FontWeight.w600, letterSpacing: -0.45,
letterSpacing: -0.45, ),
), ),
), ),
), ListView.separated(
ListView.separated( itemBuilder: (context, index) {
itemBuilder: (context, index) { return Padding(
return Padding( padding: const EdgeInsets.all(12.0),
padding: const EdgeInsets.all(12.0), child: Text(
child: Text( widget.model.checkupItems[index].itemName,
widget.model.checkupItems[index].itemName, style: TextStyle(
style: TextStyle( fontSize: 12,
fontSize: 12, fontWeight: FontWeight.w600,
fontWeight: FontWeight.w600, letterSpacing: -0.45,
letterSpacing: -0.45, ),
), ),
), );
); },
}, separatorBuilder: (context, index) {
separatorBuilder: (context, index) { return mDivider(Colors.grey);
return mDivider(Colors.grey); },
}, physics: NeverScrollableScrollPhysics(),
physics: NeverScrollableScrollPhysics(), shrinkWrap: true,
shrinkWrap: true, itemCount: widget.model.checkupItems.length,
itemCount: widget.model.checkupItems.length, ),
), ],
], ),
), ),
), ),
), ],
mHeight(MediaQuery.of(context).size.height * 0.12), ),
],
), ),
), ),
), Container(
), color: Colors.white,
bottomSheet: Container( padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
height: MediaQuery.of(context).size.height * 0.10, child: DefaultButton(
width: double.infinity, TranslationBase.of(context).next,
color: CustomColors.appBackgroudGreyColor, () async {
child: Column( if (widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList.length != 0 || widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList == null) {
crossAxisAlignment: CrossAxisAlignment.center, int index = widget.model.cmcAllServicesList.length;
mainAxisAlignment: MainAxisAlignment.center, PatientERCMCInsertServicesList patientERCMCInsertServicesList = new PatientERCMCInsertServicesList(
children: <Widget>[ price: widget.model.cmcAllServicesList[index - 1].price,
Container( serviceID: widget.model.cmcAllServicesList[index - 1].serviceID.toString(),
width: MediaQuery.of(context).size.width * 0.9, selectedServiceName: widget.model.cmcAllServicesList[index - 1].description,
child: SecondaryButton( selectedServiceNameAR: widget.model.cmcAllServicesList[index - 1].descriptionN,
label: TranslationBase.of(context).next, recordID: 1,
textColor: Theme.of(context).backgroundColor, totalPrice: widget.model.cmcAllServicesList[index - 1].totalPrice,
color: CustomColors.accentColor, vAT: widget.model.cmcAllServicesList[index - 1].vAT);
onTap: () async {
if (widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList.length != 0 || widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList == null) {
int index = widget.model.cmcAllServicesList.length;
PatientERCMCInsertServicesList patientERCMCInsertServicesList = new PatientERCMCInsertServicesList(
price: widget.model.cmcAllServicesList[index - 1].price,
serviceID: widget.model.cmcAllServicesList[index - 1].serviceID.toString(),
selectedServiceName: widget.model.cmcAllServicesList[index - 1].description,
selectedServiceNameAR: widget.model.cmcAllServicesList[index - 1].descriptionN,
recordID: 1,
totalPrice: widget.model.cmcAllServicesList[index - 1].totalPrice,
vAT: widget.model.cmcAllServicesList[index - 1].vAT);
widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList = [patientERCMCInsertServicesList]; widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList = [patientERCMCInsertServicesList];
await widget.model.getCustomerInfo(); await widget.model.getCustomerInfo();
if (widget.model.state == ViewState.ErrorLocal) { if (widget.model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(); Utils.showErrorToast();
} else { } else {
navigateTo(context,NewCMCStepTowPage( navigateTo(
longitude: widget.longitude, context,
latitude: widget.latitude, NewCMCStepTowPage(
cmcInsertPresOrderRequestModel: widget.cMCInsertPresOrderRequestModel, longitude: widget.longitude,
model: widget.model, latitude: widget.latitude,
)); cmcInsertPresOrderRequestModel: widget.cMCInsertPresOrderRequestModel,
model: widget.model,
));
// widget.changePageViewIndex(1); // widget.changePageViewIndex(1);
}
} }
}, }
), },
), ),
], ),
), ],
), ),
); );
} }

@ -2,12 +2,14 @@ import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_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/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'NewCMC/new_cmc_page.dart'; import 'NewCMC/new_cmc_page.dart';
import 'orders_log_details_page.dart'; import 'orders_log_details_page.dart';
@ -34,6 +36,7 @@ class _CMCPageState extends State<CMCPage> with SingleTickerProviderStateMixin {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<CMCViewModel>( return BaseView<CMCViewModel>(
onModelReady: (model) async { onModelReady: (model) async {
await model.getCmcAllPresOrders(); await model.getCmcAllPresOrders();
@ -47,61 +50,35 @@ class _CMCPageState extends State<CMCPage> with SingleTickerProviderStateMixin {
appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup, appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup,
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGreyColor, backgroundColor: CustomColors.appBackgroudGrey2Color,
body: Column( body: Column(
children: <Widget>[ children: <Widget>[
Container( TabBar(
height: 60.0, controller: _tabController,
width: double.infinity, indicatorWeight: 3.0,
child: Center( indicatorSize: TabBarIndicatorSize.tab,
child: TabBar( labelColor: Color(0xff2B353E),
isScrollable: false, unselectedLabelColor: Color(0xff575757),
controller: _tabController, labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
indicatorWeight: 3.0, labelStyle: TextStyle(
indicatorSize: TabBarIndicatorSize.tab, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
indicatorColor: CustomColors.accentColor, fontSize: 16,
labelColor: Colors.black, fontWeight: FontWeight.w600,
labelPadding: EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), letterSpacing: -0.48,
unselectedLabelColor: Colors.grey[800],
tabs: [
Center(
child: Text(
TranslationBase.of(context).comprehensiveMedicalCheckup,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.w600,
letterSpacing: -0.34,
),
),
),
Center(
child: Text(
TranslationBase.of(context).orderLog,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.w600,
letterSpacing: -0.34,
),
),
),
],
),
), ),
unselectedLabelStyle: TextStyle(
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
tabs: [Text(TranslationBase.of(context).cmcHeading), Text(TranslationBase.of(context).orderLog)],
), ),
Expanded( Expanded(
child: TabBarView( child: TabBarView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
controller: _tabController, controller: _tabController,
children: <Widget>[ children: <Widget>[NewCMCPage(model: model), OrdersLogDetailsPage(model: model)],
NewCMCPage(
model: model,
),
OrdersLogDetailsPage(
model: model,
)
],
), ),
) )
], ],

@ -7,7 +7,9 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.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/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -44,10 +46,128 @@ class OrdersLogDetailsPage extends StatelessWidget {
return AppScaffold( return AppScaffold(
isShowAppBar: false, isShowAppBar: false,
baseViewModel: model, baseViewModel: model,
body: SingleChildScrollView( 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,
// ),
SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
child: Container( child: Container(
margin: EdgeInsets.all(12), margin: EdgeInsets.all(10),
child: Center( child: Center(
child: FractionallySizedBox( child: FractionallySizedBox(
widthFactor: 0.94, widthFactor: 0.94,
@ -58,194 +178,100 @@ class OrdersLogDetailsPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: model.cmcAllPresOrders.map((order) { children: model.cmcAllPresOrders.map((order) {
return Container( return Container(
// margin: EdgeInsets.all(10),
child: Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(top: 12), padding: EdgeInsets.only(left: 12, right: 12, top: 12),
clipBehavior: Clip.antiAlias, child: Card(
decoration: BoxDecoration(border: Border.all(color: Colors.grey, width: 1), borderRadius: BorderRadius.circular(12), color: Colors.white), shape: cardRadius(12),
child: Column( elevation: 2,
crossAxisAlignment: CrossAxisAlignment.start, margin: EdgeInsets.zero,
children: [ color: order.status == 4
SizedBox( ? Colors.red[900]
height: 6, : order.status == 3
), ? Colors.green[400]
Container( : Color(0xffcd9e1b),
width: double.infinity, clipBehavior: Clip.antiAlias,
padding: EdgeInsets.only(left: 15, bottom: 15, top: 8, right: 15), child: Container(
decoration: BoxDecoration( // decoration: containerColorRadiusLeft(Colors.white, 12),
border: Border( margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 8, right: projectViewModel.isArabic ? 8 : 0),
bottom: BorderSide( padding: EdgeInsets.all(12),
color: Colors.grey, // color: Colors.white,
width: 1.0, decoration: BoxDecoration(
), shape: BoxShape.rectangle,
), color: Colors.white,
// borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.only(
), topLeft: projectViewModel.isArabic ? Radius.zero : Radius.circular(12.0),
child: Column( topRight: projectViewModel.isArabic ? Radius.circular(12.0) : Radius.zero,
crossAxisAlignment: CrossAxisAlignment.start, bottomLeft: projectViewModel.isArabic ? Radius.zero : Radius.circular(12.0),
children: [ bottomRight: projectViewModel.isArabic ? Radius.circular(12.0) : Radius.zero,
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( // clipBehavior: Clip.antiAlias,
crossAxisAlignment: CrossAxisAlignment.start, child: Row(
children: [ children: [
Text( Expanded(
TranslationBase.of(context).pickupDate, child: Column(
style: TextStyle( mainAxisAlignment: MainAxisAlignment.start,
fontSize: 13, crossAxisAlignment: CrossAxisAlignment.start,
fontWeight: FontWeight.w600, children: [
letterSpacing: -0.45, Texts(
), TranslationBase.of(context).OrderStatus + ' ' + (projectViewModel.isArabic ? order.descriptionN : order.description),
), bold: false,
SizedBox( fontSize: 12,
height: 4, color: order.status == 4
), ? Colors.red[900]
Text( : order.status == 3
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.createdOn)), ? Colors.green[400]
style: TextStyle( : Color(0xffcd9e1b),
fontSize: 18, fontWeight: FontWeight.bold,
fontWeight: FontWeight.w600, ),
letterSpacing: -0.45, Texts(
), TranslationBase.of(context).requestID + ' ' + order.iD.toString(),
), fontWeight: FontWeight.w600,
], fontSize: 18,
), ),
), Column(
Container( crossAxisAlignment: CrossAxisAlignment.start,
width: double.infinity, children: [
clipBehavior: Clip.antiAlias, Texts(
padding: EdgeInsets.only(left: 15, bottom: 15, top: 15, right: 15), TranslationBase.of(context).orderLocation,
decoration: BoxDecoration( bold: false,
border: Border( fontSize: 13,
bottom: BorderSide( ),
color: (order.status == 1 || order.status == 2) ? Colors.grey : Colors.transparent, SizedBox(
width: (order.status == 1 || order.status == 2) ? 1.0 : 0, height: 4,
), ),
), Texts(
// borderRadius: BorderRadius.circular(12), !projectViewModel.isArabic ? order.nearestProjectDescription.toString() : order.nearestProjectDescriptionN.toString(),
), fontSize: 13,
child: Column( ),
crossAxisAlignment: CrossAxisAlignment.start, ],
children: [ )
Text( ],
TranslationBase.of(context).orderLocation, )),
style: TextStyle( Column(
fontSize: 13, children: [
fontWeight: FontWeight.w600, Texts(
letterSpacing: -0.45, DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.createdOn)),
), fontSize: 14,
), ),
SizedBox( SizedBox(height: 8),
height: 4, (order.status == 1 || order.status == 2)
), ? SecondaryButton(
Text( onTap: () {
!projectViewModel.isArabic ? order.projectDescription.toString() : order.projectDescriptionN.toString(), showConfirmMessage(model, order);
style: TextStyle( },
fontSize: 13, label: TranslationBase.of(context).cancel,
fontWeight: FontWeight.w600, color: Colors.red[900],
letterSpacing: -0.45, small: true,
)
: SizedBox()
],
), ),
), ],
], ))),
), ));
),
(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()) }).toList())
], ],
), ),
@ -253,6 +279,216 @@ class OrdersLogDetailsPage extends StatelessWidget {
), ),
), ),
), ),
// 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())
// ],
// ),
// ),
// ),
// ),
// ),
); );
} }
} }

@ -79,7 +79,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
padding: const EdgeInsets.only(left: 20, right: 20, top: 8, bottom: 6), padding: const EdgeInsets.only(left: 20, right: 20, top: 8, bottom: 6),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
navigateTo(context, MedicalProfilePageNew()); widget.onMedicalFileClick();
}, },
child: LoggedSliderView( child: LoggedSliderView(
projectViewModel, projectViewModel,

Loading…
Cancel
Save