Merge branch 'development_new_design_2.0' into haroon-new-design

merge-requests/400/merge
haroon amjad 4 years ago
commit 0955a22616

@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" width="12.05" height="12.054" viewBox="0 0 12.05 12.054">
<g id="Page-1" transform="translate(-0.006 0.002)">
<g id="_029---Lane-Split" data-name="029---Lane-Split" transform="translate(0.006 -0.002)">
<path id="Shape" d="M2.532,1.083.044,4.622a.205.205,0,0,0,.168.324H1.46V5.57A5.366,5.366,0,0,0,3.293,9.61l.511.447a2.876,2.876,0,0,1,.981,2.163v.623a.208.208,0,0,0,.208.208H7.07a.208.208,0,0,0,.208-.208V12.22A5.4,5.4,0,0,0,5.445,8.18l-.511-.447A2.876,2.876,0,0,1,3.953,5.57V4.946H5.2a.205.205,0,0,0,.168-.324l-2.5-3.539a.208.208,0,0,0-.337,0Z" transform="translate(-0.006 -0.998)" fill="#2e303a"/>
<path id="Shape-2" data-name="Shape" d="M30.693,4.741a.207.207,0,0,0,.208.206h1.247V5.57a2.876,2.876,0,0,1-.981,2.163l-.511.447c-.106.094-.208.191-.305.291.012.017.027.031.039.048A5.758,5.758,0,0,1,31.6,10.983a2.842,2.842,0,0,1,.7-.927l.511-.447a5.366,5.366,0,0,0,1.833-4.04V4.946h1.247a.205.205,0,0,0,.168-.324l-2.5-3.539a.208.208,0,0,0-.337,0L30.732,4.622a.2.2,0,0,0-.039.118Z" transform="translate(-24.044 -0.998)" fill="#2e303a"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg" width="40.337" height="48.98" viewBox="0 0 40.337 48.98">
<g id="passport" transform="translate(-45)">
<path id="Path_4990" data-name="Path 4990" d="M417.4.094a7.655,7.655,0,0,1,1.69,4.8V44.253a7.655,7.655,0,0,1-1.69,4.8,4.858,4.858,0,0,0,4.571-4.839V4.933A4.858,4.858,0,0,0,417.4.094Z" transform="translate(-336.636 -0.085)" fill="#2e303a"/>
<g id="Group_8308" data-name="Group 8308" transform="translate(45 0)">
<path id="Path_4991" data-name="Path 4991" d="M200.443,195a18.068,18.068,0,0,0,.988,5.177c.589,1.546,1.21,2.026,1.37,2.026s.781-.48,1.37-2.026A18.065,18.065,0,0,0,205.16,195Z" transform="translate(-185.514 -176.272)" fill="#2e303a"/>
<path id="Path_4992" data-name="Path 4992" d="M202.8,90c-.16,0-.781.48-1.37,2.026a18.064,18.064,0,0,0-.988,5.177h4.717a18.069,18.069,0,0,0-.988-5.177C203.583,90.48,202.961,90,202.8,90Z" transform="translate(-185.514 -81.356)" fill="#2e303a"/>
<path id="Path_4993" data-name="Path 4993" d="M268.551,106.8h3.279a8.668,8.668,0,0,0-4.453-6.183A20.911,20.911,0,0,1,268.551,106.8Z" transform="translate(-246.02 -90.957)" fill="#2e303a"/>
<path id="Path_4994" data-name="Path 4994" d="M139.536,106.8a20.91,20.91,0,0,1,1.174-6.183,8.668,8.668,0,0,0-4.453,6.183Z" transform="translate(-127.493 -90.957)" fill="#2e303a"/>
<path id="Path_4995" data-name="Path 4995" d="M74.661,0H45V48.98H74.661a4.887,4.887,0,0,0,4.914-4.848V4.848A4.887,4.887,0,0,0,74.661,0ZM66.609,41.777H57.965V38.9h8.644Zm2.881-5.762H55.084V33.134H69.49Zm-7.2-7.2A11.525,11.525,0,1,1,73.812,17.287,11.538,11.538,0,0,1,62.287,28.812Z" transform="translate(-45 0)" fill="#2e303a"/>
<path id="Path_4996" data-name="Path 4996" d="M268.551,195a20.911,20.911,0,0,1-1.174,6.183A8.668,8.668,0,0,0,271.83,195Z" transform="translate(-246.02 -176.272)" fill="#2e303a"/>
<path id="Path_4997" data-name="Path 4997" d="M139.536,195h-3.279a8.668,8.668,0,0,0,4.453,6.183A20.91,20.91,0,0,1,139.536,195Z" transform="translate(-127.493 -176.272)" fill="#2e303a"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

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

@ -86,8 +86,10 @@ const Map localizedValues = {
'instruction': {'en': 'Instructions', 'ar': 'تعليمات'},
'livecare': {'en': 'LiveCare', 'ar': 'لايف كير'},
'livecareAppo': {'en': 'LiveCare Appointment', 'ar': 'الموعد لايف كير'},
'agreeTo': {'en': 'I agree the', 'ar': 'أوافق على'},
'termsConditoins': {'en': 'Terms and Conditions', 'ar': 'الأحكام والشروط'},
'cancelAppoMsg': {'en': 'Are you sure you want to cancel this appointment?', 'ar': 'هل أنت متأكد أنك تريد إلغاء هذا الموعد؟'},
'changePayment': {'en': 'Change Payment Method', 'ar': 'قم بتغيير آلية الدفع'},
'upcoming-noAction': {'en': 'No Action Required', 'ar': 'لا يوجد إجراء مطلوب'},
'upcoming-confirm': {'en': 'Please confirm the appointment to avoid cancellation', 'ar': 'يرجى تأكيد الموعد لتفادي الإلغاء'},
"book-success-confirm-more-24-1-2": {"en": "The online payment process will be available 24 hours before the appointment.", "ar": "- عملية الدفع الالكتروني ستكون متاحة قبل الموعد ب 24 ساعة."},

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

@ -2,12 +2,14 @@ import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.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/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'NewCMC/new_cmc_page.dart';
import 'orders_log_details_page.dart';
@ -34,6 +36,7 @@ class _CMCPageState extends State<CMCPage> with SingleTickerProviderStateMixin {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<CMCViewModel>(
onModelReady: (model) async {
await model.getCmcAllPresOrders();
@ -47,61 +50,35 @@ class _CMCPageState extends State<CMCPage> with SingleTickerProviderStateMixin {
appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGreyColor,
backgroundColor: CustomColors.appBackgroudGrey2Color,
body: Column(
children: <Widget>[
Container(
height: 60.0,
width: double.infinity,
child: Center(
child: TabBar(
isScrollable: false,
controller: _tabController,
indicatorWeight: 3.0,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: CustomColors.accentColor,
labelColor: Colors.black,
labelPadding: EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),
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,
),
),
),
],
),
TabBar(
controller: _tabController,
indicatorWeight: 3.0,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Color(0xff2B353E),
unselectedLabelColor: Color(0xff575757),
labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
labelStyle: TextStyle(
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
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(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
NewCMCPage(
model: model,
),
OrdersLogDetailsPage(
model: model,
)
],
children: <Widget>[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/translations_delegate_base.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/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -44,10 +46,128 @@ class OrdersLogDetailsPage extends StatelessWidget {
return AppScaffold(
isShowAppBar: false,
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(),
child: Container(
margin: EdgeInsets.all(12),
margin: EdgeInsets.all(10),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.94,
@ -58,194 +178,100 @@ class OrdersLogDetailsPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: model.cmcAllPresOrders.map((order) {
return Container(
// margin: EdgeInsets.all(10),
child: 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,
),
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,
),
],
),
),
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,
// 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()
],
),
),
],
),
),
(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())
],
),
@ -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())
// ],
// ),
// ),
// ),
// ),
// ),
);
}
}

@ -67,7 +67,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
isShowDecPage: true,
showNewAppBarTitle: true,
showNewAppBar: true,
backgroundColor: CustomColors.appBackgroudGreyColor,
backgroundColor: CustomColors.appBackgroudGrey2Color,
body: Column(
children: [
Expanded(
@ -185,10 +185,13 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
padding: const EdgeInsets.only(left: 12, right: 12, top: 6, bottom: 6),
child: Row(
children: [
SvgPicture.asset(
"assets/images/new/blood_pressure.svg",
width: 18,
height: 18,
Padding(
padding: const EdgeInsets.all(3.0),
child: SvgPicture.asset(
"assets/images/new/direction.svg",
width: 13,
height: 13,
),
),
mWidth(6),
Text(
@ -218,33 +221,37 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
),
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: CustomColors.accentColor,
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: CustomColors.accentColor,
onPressed: () {
next();
},
child: Text(
TranslationBase.of(context).next,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
letterSpacing: -0.44,
Card(
elevation: 20,
margin: EdgeInsets.zero,
child: Container(
width: double.infinity,
padding: EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: CustomColors.accentColor,
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: CustomColors.accentColor,
onPressed: () {
next();
},
child: Text(
TranslationBase.of(context).next,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
letterSpacing: -0.44,
),
),
),
),
)),
)),
),
],
),
);

@ -2,6 +2,7 @@ import 'dart:io';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
@ -33,154 +34,187 @@ class _PaymentMethodState extends State<PaymentMethod> {
Container(
margin: EdgeInsets.fromLTRB(0.0, 15.0, 0.0, 0.0),
alignment: Alignment.center,
child: Text(TranslationBase.of(context).selectPaymentOption, style: TextStyle(fontSize: 26.0, fontWeight: FontWeight.bold)),
child: Text(TranslationBase.of(context).selectPaymentOption, style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold)),
),
Container(
margin: EdgeInsets.only(top: 25.0),
child: Flex(
direction: Axis.horizontal,
children: <Widget>[
Expanded(
child: Container(
child: InkWell(
onTap: () {
updateSelectedPaymentMethod("MADA");
},
child: Card(
elevation: 3.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: selectedPaymentMethod == "MADA" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
),
child: Container(
height: 120.0,
padding: EdgeInsets.all(7.0),
width: MediaQuery.of(context).size.width * 0.45,
child: Image.asset("assets/images/new-design/mada.png"),
),
),
),
),
width: double.infinity,
child: InkWell(
onTap: () {
updateSelectedPaymentMethod("MADA");
},
child: Card(
elevation: 3.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: selectedPaymentMethod == "MADA" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
),
Expanded(
child: Container(
child: InkWell(
onTap: () {
updateSelectedPaymentMethod("VISA");
},
child: Card(
elevation: 3.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: selectedPaymentMethod == "VISA" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
),
child: Container(
height: 120.0,
padding: EdgeInsets.all(7.0),
width: MediaQuery.of(context).size.width * 0.45,
child: Image.asset("assets/images/new-design/visa.png"),
),
),
child: Row(
children: [
Container(
height: 60.0,
width:60,
padding: EdgeInsets.all(7.0),
child: Image.asset("assets/images/new-design/mada.png"),
),
),
mWidth(12),
Text(
"MADA",
style: TextStyle(
color: Colors.black,
fontSize: 14,
fontWeight: FontWeight.bold,
),
)
],
),
],
),
),
),
Container(
margin: EdgeInsets.only(top: 25.0),
child: Flex(
direction: Axis.horizontal,
children: <Widget>[
Expanded(
child: Container(
child: InkWell(
onTap: () {
updateSelectedPaymentMethod("MASTERCARD");
},
child: Card(
elevation: 3.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: selectedPaymentMethod == "MASTERCARD" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
),
child: Container(
height: 120.0,
padding: EdgeInsets.all(7.0),
width: MediaQuery.of(context).size.width * 0.45,
child: Image.asset("assets/images/new-design/mastercard.png"),
),
),
width: double.infinity,
child: InkWell(
onTap: () {
updateSelectedPaymentMethod("VISA");
},
child: Card(
elevation: 3.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: selectedPaymentMethod == "VISA" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
),
child: Row(
children: [
Container(
height: 60.0,
padding: EdgeInsets.all(7.0),
width: 60,
child: Image.asset("assets/images/new-design/visa.png"),
),
),
mWidth(12),Text(
"VISA",
style: TextStyle(
color: Colors.black,
fontSize: 14,
fontWeight: FontWeight.bold,
),
)
],
),
Expanded(
child: Container(
child: InkWell(
onTap: () {
updateSelectedPaymentMethod("Installment");
},
child: Card(
elevation: 3.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: selectedPaymentMethod == "Installment" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
),
child: Container(
height: 120.0,
padding: EdgeInsets.all(7.0),
width: MediaQuery.of(context).size.width * 0.45,
child: Image.asset("assets/images/new-design/installment.png"),
),
),
),
),
Container(
width: double.infinity,
child: InkWell(
onTap: () {
updateSelectedPaymentMethod("MASTERCARD");
},
child: Card(
elevation: 3.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: selectedPaymentMethod == "MASTERCARD" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
),
child: Row(
children: [
Container(
height: 60.0,
padding: EdgeInsets.all(7.0),
width: 60,
child: Image.asset("assets/images/new-design/mastercard.png"),
),
mWidth(12),
Text(
"MATER CARD",
style: TextStyle(
color: Colors.black,
fontSize: 14,
fontWeight: FontWeight.bold,
),
)
],
),
),
),
),
Container(
width: double.infinity,
child: InkWell(
onTap: () {
updateSelectedPaymentMethod("Installment");
},
child: Card(
elevation: 3.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: selectedPaymentMethod == "Installment" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
),
child: Row(
children: [
Container(
height: 60.0,
padding: EdgeInsets.all(7.0),
width: 60,
child: Image.asset("assets/images/new-design/installment.png"),
),
),
mWidth(12),
Text(
"INSTALLMENT",
style: TextStyle(
color: Colors.black,
fontSize: 14,
fontWeight: FontWeight.bold,
),
)
],
),
],
),
),
),
Platform.isIOS ? Container(
margin: EdgeInsets.only(top: 25.0),
child: Flex(
direction: Axis.horizontal,
children: <Widget>[
Expanded(
child: Container(
child: InkWell(
onTap: () {
updateSelectedPaymentMethod("ApplePay");
},
child: Card(
elevation: 3.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: selectedPaymentMethod == "ApplePay" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
),
Platform.isIOS
? Container(
margin: EdgeInsets.only(top: 25.0),
child: Flex(
direction: Axis.horizontal,
children: <Widget>[
Expanded(
child: Container(
height: 120.0,
padding: EdgeInsets.all(20.0),
child: SvgPicture.asset("assets/images/new-design/applepay.svg"),
child: InkWell(
onTap: () {
updateSelectedPaymentMethod("ApplePay");
},
child: Card(
elevation: 3.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: selectedPaymentMethod == "ApplePay" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
),
child: Container(
height: 120.0,
padding: EdgeInsets.all(20.0),
child: SvgPicture.asset("assets/images/new-design/applepay.svg"),
),
),
),
),
),
),
Expanded(
child: Container(),
),
],
),
),
Expanded(
child: Container(),
),
],
),
) : Container(),
)
: Container(),
SizedBox(
height: 150.0,
),

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

@ -1,11 +1,15 @@
import 'package:diplomaticquarterapp/core/service/medical/labs_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
class PassportUpdatePage extends StatefulWidget {
@override
@ -15,6 +19,7 @@ class PassportUpdatePage extends StatefulWidget {
class _PassportUpdatePageState extends State<PassportUpdatePage> {
TextEditingController passportNumber = new TextEditingController();
bool _isButtonDisabled;
ProjectViewModel projectViewModel;
@override
void initState() {
@ -24,60 +29,223 @@ class _PassportUpdatePageState extends State<PassportUpdatePage> {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).passportNumber,
isShowAppBar: true,
isBottomBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
showNewAppBarTitle: true,backgroundColor: CustomColors.appBackgroudGrey2Color,
body: Container(
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
margin: EdgeInsets.all(45.0),
child: Text(TranslationBase.of(context).enterPassportNumber, textAlign: TextAlign.center, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold, color: Colors.black)),
child: Column(
children: [
Expanded(
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: double.infinity,
child: Card(
shape: cardRadius(12),
margin: EdgeInsets.zero,
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Booking appointment for:",
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
letterSpacing: -0.64,
),
),
mHeight(6),
Row(
children: [
Text(
TranslationBase.of(context).patientName + ":",
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 10,
letterSpacing: -0.6,
color: CustomColors.grey,
),
),
mWidth(3),
Text(
projectViewModel.user.firstName + " " + projectViewModel.user.lastName,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.48,
),
),
],
),
Row(
children: [
Text(
TranslationBase.of(context).fileNo + ":",
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 10,
letterSpacing: -0.6,
color: CustomColors.grey,
),
),
mWidth(3),
Text(
projectViewModel.user.patientIdentificationNo,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.48,
),
),
],
),
],
),
),
),
),
mHeight(40),
SvgPicture.asset("assets/images/new/passport.svg", width: 40.0, fit: BoxFit.fill),
mHeight(12),
Text(
TranslationBase.of(context).enterPassportNumber,
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
color: Colors.black,
letterSpacing: -0.64,
),
),
mHeight(8),
inputWidget(TranslationBase.of(context).passportNumber, "", passportNumber),
],
),
),
),
Container(
margin: EdgeInsets.only(top: 5.0, bottom: 5.0),
child: SvgPicture.asset("assets/images/new-design/passport.svg", width: 250.0, fit: BoxFit.fill),
),
Container(
margin: EdgeInsets.only(top: 12.0, left: 12.0, right: 12.0, bottom: 10.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width,
height: 45.0,
child: RaisedButton(
color: new Color(0xFFc5272d),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: Colors.red[300],
onPressed: () {
if (_isButtonDisabled == false)
updatePassportNumber();
else
AppToast.showErrorToast(message: TranslationBase.of(context).validPassportNumber);
},
child: Text(
TranslationBase.of(context).submit,
style: TextStyle(
fontSize: 16.0,
letterSpacing: -0.64,
),
),
),
),
Container(
margin: EdgeInsets.only(left: 50.0, right: 50.0, top: 25.0),
child: TextFields(
keyboardType: TextInputType.text,
fontWeight: FontWeight.normal,
controller: passportNumber,
onChanged: (value) => {_onPassportTextChanged(value)},
padding: EdgeInsets.only(top: 20, bottom: 20, left: 10, right: 10),
hintText: TranslationBase.of(context).passportNumber,
)),
Container(
margin: EdgeInsets.only(top: 30.0, left: 45.0, right: 45.0, bottom: 10.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
],
),
),
);
}
Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String prefix, bool isEnable = true, bool hasSelection = false}) {
return Container(
padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
border: Border.all(
color: Color(0xffefefef),
width: 1,
),
),
child: InkWell(
onTap: hasSelection ? () {} : null,
child: Row(
children: [
Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
_labelText,
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.44,
),
),
minWidth: MediaQuery.of(context).size.width,
height: 45.0,
child: RaisedButton(
color: new Color(0xFFc5272d),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: Colors.red[300],
onPressed: () {
if (_isButtonDisabled == false)
updatePassportNumber();
else
AppToast.showErrorToast(message: TranslationBase.of(context).validPassportNumber);
},
child: Text(TranslationBase.of(context).submit, style: TextStyle(fontSize: 18.0)),
TextField(
enabled: isEnable,
scrollPadding: EdgeInsets.zero,
keyboardType: TextInputType.number,
controller: _controller,
onChanged: (value) => {_onPassportTextChanged(value)},
style: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff2B353E),
letterSpacing: -0.44,
),
decoration: InputDecoration(
isDense: true,
hintText: _hintText,
hintStyle: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff575757),
letterSpacing: -0.56,
),
prefixIconConstraints: BoxConstraints(minWidth: 50),
prefixIcon: prefix == null
? null
: Text(
"+" + prefix,
style: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w500,
color: Color(0xff2E303A),
letterSpacing: -0.56,
),
),
contentPadding: EdgeInsets.zero,
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
),
),
),
],
),
],
),
),
if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined),
],
),
),
);
@ -116,7 +284,7 @@ class _PassportUpdatePageState extends State<PassportUpdatePage> {
GifLoaderDialogUtils.hideDialog(context);
print(res['Covid19_Certificate_GetPassportList'][0]['PassportNo']);
passportNumber.text = res['Covid19_Certificate_GetPassportList'][0]['PassportNo'];
if(res['Covid19_Certificate_GetPassportList'][0]['PassportNo'] != "") {
if (res['Covid19_Certificate_GetPassportList'][0]['PassportNo'] != "") {
_isButtonDisabled = false;
}
}).catchError((err) {

@ -52,7 +52,7 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget {
Expanded(
child: ListView(
physics: BouncingScrollPhysics(),
padding: EdgeInsets.all(25),
padding: EdgeInsets.all(21),
children: <Widget>[
Container(
decoration: BoxDecoration(
@ -69,16 +69,16 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget {
],
),
child: Container(
margin: EdgeInsets.only(left: 6),
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(
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),
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),
),
),
child: Column(
@ -164,7 +164,7 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget {
),
),
Container(
color: Theme.of(context).scaffoldBackgroundColor,
color: Colors.white,
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).cancelOrder,

@ -69,7 +69,9 @@ class TranslationBase {
String get enterDocName => localizedValues['enterDocName'][locale.languageCode];
String get search => localizedValues['search'][locale.languageCode];
String get noResultFound => localizedValues['noResultFound'][locale.languageCode];
String get pleaseEnterProductName => localizedValues['pleaseEnterProductName'][locale.languageCode];
String get bookNow => localizedValues['bookNow'][locale.languageCode];
@ -415,7 +417,9 @@ class TranslationBase {
String get sendEmail => localizedValues['sendEmail'][locale.languageCode];
String get close => localizedValues['close'][locale.languageCode];
String get closeIt => localizedValues['closeIt'][locale.languageCode];
String get booked => localizedValues['booked'][locale.languageCode];
String get confirmed => localizedValues['confirmed'][locale.languageCode];
@ -754,6 +758,10 @@ class TranslationBase {
String get save => localizedValues['Save'][locale.languageCode];
String get agreeTo => localizedValues['agreeTo'][locale.languageCode];
String get termsConditoins => localizedValues['termsConditoins'][locale.languageCode];
String get userAgreement => localizedValues['UserAgreement'][locale.languageCode];
String get updateSuccessfully => localizedValues['UpdateSuccessfully'][locale.languageCode];
@ -810,6 +818,8 @@ class TranslationBase {
String get confirmThePayment => localizedValues['ConfirmThePayment'][locale.languageCode];
String get changePayment => localizedValues['changePayment'][locale.languageCode];
String get depositorName => localizedValues['DepositorName'][locale.languageCode];
String get mobileNumber => localizedValues['MobileNumber'][locale.languageCode];
@ -907,16 +917,27 @@ class TranslationBase {
String get lakum => localizedValues['lakum'][locale.languageCode];
String get wishlist => localizedValues['wishlist'][locale.languageCode];
String get brands => localizedValues['brands'][locale.languageCode];
String get products => localizedValues['products'][locale.languageCode];
String get reviews => localizedValues['reviews'][locale.languageCode];
String get productDetails => localizedValues['productDetails'][locale.languageCode];
String get noReviewsAvailable => localizedValues['noReviewsAvailable'][locale.languageCode];
String get noLocationAvailable => localizedValues['noLocationAvailable'][locale.languageCode];
String get myPrescriptions => localizedValues['myPrescriptions'][locale.languageCode];
String get medicationRefill => localizedValues['medicationRefill'][locale.languageCode];
String get pillReminder => localizedValues['pillReminder'][locale.languageCode];
String get shippingAddresses => localizedValues['shippingAddresses'][locale.languageCode];
String get reachUs => localizedValues['reachUs'][locale.languageCode];
String get ourLocations => localizedValues['ourLocations'][locale.languageCode];
@ -1133,10 +1154,15 @@ class TranslationBase {
String get yearOld => localizedValues['years-old'][locale.languageCode];
String get categorise => localizedValues['categorise'][locale.languageCode];
String get refine => localizedValues['refine'][locale.languageCode];
String get apply => localizedValues['apply'][locale.languageCode];
String get reset => localizedValues['reset'][locale.languageCode];
String get viewCategorise => localizedValues['viewCategorise'][locale.languageCode];
String get cart => localizedValues['cart'][locale.languageCode];
String get wishList => localizedValues['wishList'][locale.languageCode];
@ -1744,10 +1770,15 @@ class TranslationBase {
String get quantitySize => localizedValues['quantitySize'][locale.languageCode];
String get addToCart => localizedValues['addToCart'][locale.languageCode];
String get addToWishlist => localizedValues['addToWishlist'][locale.languageCode];
String get buyNow => localizedValues['buyNow'][locale.languageCode];
String get quantityShortcut => localizedValues['quantityShortcut'][locale.languageCode];
String get noData => localizedValues['noData'][locale.languageCode];
String get no_data => localizedValues['no_data'][locale.languageCode];
String get year => localizedValues['Year'][locale.languageCode];

@ -67,29 +67,16 @@ class _BottomNavBarState extends State<BottomNavBar> {
name: TranslationBase.of(context).myFamily,
),
if (widget.index == 0)
Expanded(
child: (widget.showHomeIcon)
? SizedBox(
child: BottomNavigationItem(
icon: Icons.home_outlined,
activeIcon: Icons.home_outlined,
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 2,
name: TranslationBase.of(context).home,
),
)
: SizedBox(
height: 50,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
SizedBox(height: 22),
],
),
),
),
(widget.showHomeIcon)
? BottomNavigationItem(
icon: Icons.home_outlined,
activeIcon: Icons.home_outlined,
changeIndex: _changeIndex,
index: widget.index,
currentIndex: 2,
name: TranslationBase.of(context).home,
)
: Expanded(child: SizedBox()),
if (widget.index != 0 && projectViewModel.havePrivilege(34))
BottomNavigationItem(
icon: Icons.home_outlined,

@ -0,0 +1,26 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
showDraggableDialog(BuildContext context, Widget child) {
showGeneralDialog(
barrierLabel: "Label",
barrierDismissible: false,
barrierColor: Colors.black.withOpacity(0.2),
transitionDuration: Duration(milliseconds: 200),
context: context,
pageBuilder: (context, anim1, anim2) {
return Dismissible(
direction: DismissDirection.vertical,
key: const Key('key'),
onDismissed: (_) => Navigator.of(context).pop(),
child: child,
);
},
transitionBuilder: (context, anim1, anim2, child) {
return SlideTransition(
position: Tween(begin: Offset(0, 1), end: Offset(0, 0)).animate(anim1),
child: child,
);
},
);
}
Loading…
Cancel
Save