dev_v3.13.6
Mirza.Shafique 5 years ago
parent afb08fcd0a
commit 831780555c

@ -1175,6 +1175,7 @@ const Map localizedValues = {
"generalHealth": {"en": "General Health", "ar": "صحة عامة"}, "generalHealth": {"en": "General Health", "ar": "صحة عامة"},
"womanHealth": {"en": "Women's Health", "ar": "صحة المرأة"}, "womanHealth": {"en": "Women's Health", "ar": "صحة المرأة"},
"bmi": {"en": "BMI", "ar": "الكتلة"}, "bmi": {"en": "BMI", "ar": "الكتلة"},
"bloodType": {"en": "Blood Type:", "ar": ":فصيلة الدم"},
"calc-health": {"en": "Calculators", "ar": "الصحية"}, "calc-health": {"en": "Calculators", "ar": "الصحية"},
"calories": {"en": "Calories", "ar": "سعرات"}, "calories": {"en": "Calories", "ar": "سعرات"},
"bmr": {"en": "BMR", "ar": "معدل الأيض القاعدي"}, "bmr": {"en": "BMR", "ar": "معدل الأيض القاعدي"},

@ -122,16 +122,7 @@ class _NewCMCPageState extends State<NewCMCPage> with TickerProviderStateMixin {
height: MediaQuery.of(context).size.height * 0.8, height: MediaQuery.of(context).size.height * 0.8,
child: Column( child: Column(
children: [ children: [
if (widget.model.cmcAllOrderDetail.length == 0)
Container(
margin: EdgeInsets.only(
left: MediaQuery.of(context).size.width * 0.05,
right: MediaQuery.of(context).size.width * 0.05),
child: StepsWidget(
index: _currentIndex,
changeCurrentTab: changePageViewIndex,
),
),
Expanded( Expanded(
child: PageView( child: PageView(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
@ -376,12 +367,15 @@ class _NewCMCPageState extends State<NewCMCPage> with TickerProviderStateMixin {
), ),
), ),
) )
: NewCMCStepOnePage( : Container(
color: Colors.red,
child: NewCMCStepOnePage(
changePageViewIndex: changePageViewIndex, changePageViewIndex: changePageViewIndex,
cMCInsertPresOrderRequestModel: cMCInsertPresOrderRequestModel:
cMCInsertPresOrderRequestModel, cMCInsertPresOrderRequestModel,
model: widget.model, model: widget.model,
), ),
),
NewCMCStepTowPage( NewCMCStepTowPage(
longitude: _longitude, longitude: _longitude,
latitude: _latitude, latitude: _latitude,

@ -3,8 +3,10 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/Comprehens
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart'; import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.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/core/viewModels/project_view_model.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/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/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -17,12 +19,7 @@ class NewCMCStepOnePage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
final CMCViewModel model; final CMCViewModel model;
const NewCMCStepOnePage( const NewCMCStepOnePage({Key key, this.cMCInsertPresOrderRequestModel, this.model, this.changePageViewIndex}) : super(key: key);
{Key key,
this.cMCInsertPresOrderRequestModel,
this.model,
this.changePageViewIndex})
: super(key: key);
@override @override
_NewCMCStepOnePageState createState() => _NewCMCStepOnePageState(); _NewCMCStepOnePageState createState() => _NewCMCStepOnePageState();
@ -44,175 +41,107 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
child: Container( child: Container(
margin: EdgeInsets.all(12), margin: EdgeInsets.only(left: 12, right: 12),
child: Center( child: Center(
child: Column( child: Column(
children: [ children: [
FractionallySizedBox( ListView.separated(
widthFactor: 0.94, physics: NeverScrollableScrollPhysics(),
child: Column( shrinkWrap: true,
crossAxisAlignment: CrossAxisAlignment.start, itemBuilder: (context, index) {
children: [ return Row(
SizedBox(
height: 20,
),
Texts(
TranslationBase.of(context).selectService,
textAlign: TextAlign.center,
),
Column(
children:
widget.model.cmcAllServicesList.map((service) {
return Container(
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border:
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Theme.of(context).primaryColor),
child: Column(
children: [
Row(
children: [ children: [
Radio( Radio(
value: service.serviceID, value: widget.model.cmcAllServicesList[index].serviceID,
activeColor: Colors.red[800], activeColor: Colors.red[800],
onChanged: (newValue) async { onChanged: (newValue) async {
PatientERCMCInsertServicesList PatientERCMCInsertServicesList patientERCMCInsertServicesList = new PatientERCMCInsertServicesList(
patientERCMCInsertServicesList = price: widget.model.cmcAllServicesList[index].price,
new PatientERCMCInsertServicesList( serviceID: widget.model.cmcAllServicesList[index].serviceID.toString(),
price: service.price, selectedServiceName: widget.model.cmcAllServicesList[index].description,
serviceID: service.serviceID selectedServiceNameAR: widget.model.cmcAllServicesList[index].descriptionN,
.toString(),
selectedServiceName:
service.description,
selectedServiceNameAR:
service.descriptionN,
recordID: 1, recordID: 1,
totalPrice: totalPrice: widget.model.cmcAllServicesList[index].totalPrice,
service.totalPrice, vAT: widget.model.cmcAllServicesList[index].vAT);
vAT: service.vAT);
setState(() { setState(() {
widget widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList = [patientERCMCInsertServicesList];
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList = [
patientERCMCInsertServicesList
];
}); });
CMCGetItemsRequestModel CMCGetItemsRequestModel cMCGetItemsRequestModel = new CMCGetItemsRequestModel(checkupType: newValue);
cMCGetItemsRequestModel = await widget.model.getCheckupItems(cMCGetItemsRequestModel: cMCGetItemsRequestModel);
new CMCGetItemsRequestModel(
checkupType: newValue);
await widget.model.getCheckupItems(
cMCGetItemsRequestModel:
cMCGetItemsRequestModel);
}, },
groupValue: widget groupValue: widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList.length > 0
.cMCInsertPresOrderRequestModel ? int.parse(widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList[0].serviceID)
.patientERCMCInsertServicesList
.length >
0
? int.parse(widget
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList[
0]
.serviceID)
: 1), : 1),
Expanded( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.all(20.0), padding: const EdgeInsets.only(
child: Texts( left: 10,
projectViewModel.isArabic right: 10,
? service.descriptionN top: 20,
: service.description, bottom: 20,
fontSize: 15,
), ),
child: Text(
projectViewModel.isArabic ? widget.model.cmcAllServicesList[index].descriptionN : widget.model.cmcAllServicesList[index].description,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
letterSpacing: -0.45,
), ),
), ),
],
),
],
), ),
);
}).toList(),
), ),
], ],
), );
), },
SizedBox( separatorBuilder: (context, index) {
height: 30, return mDivider(Colors.grey);
), },
Container( itemCount: widget.model.cmcAllServicesList.length),
color: Theme.of(context).primaryColor, Card(
shape: cardRadius(12),
elevation: 4,
child: Container(
width: double.infinity, width: double.infinity,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Padding(
children: [ padding: const EdgeInsets.only(left: 12,right: 12,top: 12),
Container( child: Text(
margin: EdgeInsets.only(right: 10, left: 10),
child: Texts(
TranslationBase.of(context).coveredService, TranslationBase.of(context).coveredService,
fontWeight: FontWeight.bold, style: TextStyle(
)) fontSize: 14,
], fontWeight: FontWeight.w600,
letterSpacing: -0.45,
), ),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: widget.model.checkupItems.map((item) {
return Center(
child: FractionallySizedBox(
widthFactor: 1,
child: Container(
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
color: Theme.of(context).primaryColor),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
), ),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 5, top: 5),
decoration: BoxDecoration(
border: BorderDirectional(
bottom: BorderSide(
style: BorderStyle.solid,
width: 0.5,
color: Colors.grey)),
//borderRadius: ,
color:
Theme.of(context).primaryColor),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(
right: 10, left: 10),
child: Texts(item.itemName,
fontSize: 15,
fontWeight: FontWeight.bold),
), ),
], 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,
), ),
), ),
SizedBox( );
height: 12, },
separatorBuilder: (context, index) {
return mDivider(Colors.grey);
},
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemCount: widget.model.checkupItems.length,
), ),
], ],
), ),
), ),
), ),
); mHeight(MediaQuery.of(context).size.height * 0.12),
}).toList()),
],
),
)
], ],
), ),
), ),
@ -221,44 +150,30 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
bottomSheet: Container( bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10, height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity, width: double.infinity,
color: CustomColors.appBackgroudGreyColor,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Container( Container(
width: MediaQuery.of(context).size.width * 0.9, width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton( child: SecondaryButton(
label: TranslationBase.of(context).next, label: TranslationBase.of(context).next,
textColor: Theme.of(context).backgroundColor, textColor: Theme.of(context).backgroundColor,
color: Colors.grey[800], color: CustomColors.accentColor,
onTap: () async { onTap: () async {
if (widget.cMCInsertPresOrderRequestModel if (widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList.length != 0 || widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList == null) {
.patientERCMCInsertServicesList.length !=
0 ||
widget.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList ==
null) {
int index = widget.model.cmcAllServicesList.length; int index = widget.model.cmcAllServicesList.length;
PatientERCMCInsertServicesList PatientERCMCInsertServicesList patientERCMCInsertServicesList = new PatientERCMCInsertServicesList(
patientERCMCInsertServicesList = price: widget.model.cmcAllServicesList[index - 1].price,
new PatientERCMCInsertServicesList( serviceID: widget.model.cmcAllServicesList[index - 1].serviceID.toString(),
price: widget selectedServiceName: widget.model.cmcAllServicesList[index - 1].description,
.model.cmcAllServicesList[index - 1].price, selectedServiceNameAR: widget.model.cmcAllServicesList[index - 1].descriptionN,
serviceID: widget
.model.cmcAllServicesList[index - 1].serviceID
.toString(),
selectedServiceName: widget.model
.cmcAllServicesList[index - 1].description,
selectedServiceNameAR: widget.model
.cmcAllServicesList[index - 1].descriptionN,
recordID: 1, recordID: 1,
totalPrice: widget totalPrice: widget.model.cmcAllServicesList[index - 1].totalPrice,
.model.cmcAllServicesList[index - 1].totalPrice, vAT: widget.model.cmcAllServicesList[index - 1].vAT);
vAT:
widget.model.cmcAllServicesList[index - 1].vAT);
widget.cMCInsertPresOrderRequestModel widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList = [patientERCMCInsertServicesList];
.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();

@ -3,6 +3,7 @@ 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/pages/base/base_view.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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.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';
@ -42,77 +43,54 @@ class _CMCPageState extends State<CMCPage> with SingleTickerProviderStateMixin {
isShowAppBar: true, isShowAppBar: true,
description: TranslationBase.of(context).infoCMC, description: TranslationBase.of(context).infoCMC,
imagesInfo: [ imagesInfo: [
ImagesInfo( ImagesInfo(imageAr: 'https://hmgwebservices.com/Images/MobileApp/CMC/ar/0.png', imageEn: 'https://hmgwebservices.com/Images/MobileApp/CMC/en/0.png'),
imageAr: 'https://hmgwebservices.com/Images/MobileApp/CMC/ar/0.png',
imageEn: 'https://hmgwebservices.com/Images/MobileApp/CMC/en/0.png')
], ],
appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup, appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup,
body: Scaffold( showNewAppBar: true,
extendBodyBehindAppBar: true, showNewAppBarTitle: true,
appBar: PreferredSize( backgroundColor: CustomColors.appBackgroudGreyColor,
preferredSize: Size.fromHeight(65.0), body: Column(
child: Stack(
children: <Widget>[ children: <Widget>[
Positioned( Container(
bottom: 1,
left: 0,
right: 0,
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
child: Container(
color: Theme.of(context).primaryColor.withOpacity(0.8),
height: 70.0,
),
),
),
Center(
child: Container(
height: 60.0, height: 60.0,
margin: EdgeInsets.only(top: 10.0), width: double.infinity,
width: MediaQuery.of(context).size.width * 0.9,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context).dividerColor,
width: 0.7),
),
color: Theme.of(context).primaryColor),
child: Center( child: Center(
child: TabBar( child: TabBar(
isScrollable: true, isScrollable: false,
controller: _tabController, controller: _tabController,
indicatorWeight: 5.0, indicatorWeight: 3.0,
indicatorSize: TabBarIndicatorSize.tab, indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800], indicatorColor: CustomColors.accentColor,
labelColor: Theme.of(context).primaryColor, labelColor: Colors.black,
labelPadding: labelPadding: EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),
EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),
unselectedLabelColor: Colors.grey[800], unselectedLabelColor: Colors.grey[800],
tabs: [ tabs: [
Container( Center(
width: MediaQuery.of(context).size.width * 0.37, child: Text(
child: Center( TranslationBase.of(context).comprehensiveMedicalCheckup,
child: Texts(TranslationBase.of(context) textAlign: TextAlign.center,
.comprehensiveMedicalCheckup), style: TextStyle(
), fontSize: 13,
), fontWeight: FontWeight.w600,
Container( letterSpacing: -0.34,
width: MediaQuery.of(context).size.width * 0.37,
child: Center(
child:
Texts(TranslationBase.of(context).orderLog),
), ),
), ),
],
), ),
Center(
child: Text(
TranslationBase.of(context).orderLog,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.w600,
letterSpacing: -0.34,
), ),
), ),
), ),
], ],
), ),
), ),
body: Column( ),
children: <Widget>[
Expanded( Expanded(
child: TabBarView( child: TabBarView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
@ -130,7 +108,6 @@ class _CMCPageState extends State<CMCPage> with SingleTickerProviderStateMixin {
], ],
), ),
), ),
),
); );
} }
} }

@ -22,26 +22,20 @@ class OrdersLogDetailsPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
void showConfirmMessage( void showConfirmMessage(CMCViewModel model, GetHHCAllPresOrdersResponseModel order) {
CMCViewModel model, GetHHCAllPresOrdersResponseModel order) {
showDialog( showDialog(
context: context, context: context,
child: ConfirmCancelOrderDialog( child: ConfirmCancelOrderDialog(
model: model, model: model,
onTap: () async { onTap: () async {
UpdatePresOrderRequestModel updatePresOrderRequestModel = UpdatePresOrderRequestModel updatePresOrderRequestModel = UpdatePresOrderRequestModel(presOrderID: order.iD, rejectionReason: "", presOrderStatus: 4, editedBy: 3);
UpdatePresOrderRequestModel(
presOrderID: order.iD,
rejectionReason: "",
presOrderStatus: 4, editedBy: 3);
await model.updateCmcPresOrder(updatePresOrderRequestModel); await model.updateCmcPresOrder(updatePresOrderRequestModel);
if(model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error); Utils.showErrorToast(model.error);
} else { } else {
AppToast.showSuccessToast(message:TranslationBase.of(context).processDoneSuccessfully ); AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully);
await model.getCmcAllPresOrders(); await model.getCmcAllPresOrders();
} }
}, },
@ -61,30 +55,23 @@ class OrdersLogDetailsPage extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(
height: 50,
),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: model.cmcAllPresOrders.map((order) { children: model.cmcAllPresOrders.map((order) {
return Container( return Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(top: 15), margin: EdgeInsets.only(top: 12),
decoration: BoxDecoration( clipBehavior: Clip.antiAlias,
border: decoration: BoxDecoration(border: Border.all(color: Colors.grey, width: 1), borderRadius: BorderRadius.circular(12), color: Colors.white),
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox( SizedBox(
height: 12, height: 6,
), ),
Container( Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.only( padding: EdgeInsets.only(left: 15, bottom: 15, top: 8, right: 15),
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(
@ -93,31 +80,35 @@ class OrdersLogDetailsPage extends StatelessWidget {
), ),
), ),
// borderRadius: BorderRadius.circular(12), // borderRadius: BorderRadius.circular(12),
color: Colors.white), ),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts( Text(
TranslationBase TranslationBase.of(context).requestID,
.of(context) style: TextStyle(
.requestID,
bold: false,
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.w600,
letterSpacing: -0.45,
),
), ),
SizedBox( SizedBox(
height: 4, height: 4,
), ),
Texts( Text(
order.iD.toString(), order.iD.toString(),
fontSize: 22, style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
letterSpacing: -0.45,
),
), ),
], ],
), ),
), ),
Container( Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.only( padding: EdgeInsets.only(left: 15, bottom: 15, top: 15, right: 15),
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(
@ -126,33 +117,35 @@ class OrdersLogDetailsPage extends StatelessWidget {
), ),
), ),
// borderRadius: BorderRadius.circular(12), // borderRadius: BorderRadius.circular(12),
color: Colors.white), ),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts( Text(
TranslationBase TranslationBase.of(context).OrderStatus,
.of(context) style: TextStyle(
.OrderStatus,
bold: false,
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.w600,
letterSpacing: -0.45,
),
), ),
SizedBox( SizedBox(
height: 4, height: 4,
), ),
Texts( Text(
projectViewModel.isArabic ? order.descriptionN : order.description,
projectViewModel.isArabic ? order style: TextStyle(
.descriptionN : order.description, fontSize: 18,
fontSize: 22, fontWeight: FontWeight.w600,
letterSpacing: -0.45,
),
), ),
], ],
), ),
), ),
Container( Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.only( padding: EdgeInsets.only(left: 15, bottom: 15, top: 15, right: 15),
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(
@ -161,89 +154,95 @@ class OrdersLogDetailsPage extends StatelessWidget {
), ),
), ),
// borderRadius: BorderRadius.circular(12), // borderRadius: BorderRadius.circular(12),
color: Colors.white), ),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts( Text(
TranslationBase.of(context).pickupDate, TranslationBase.of(context).pickupDate,
bold: false, style: TextStyle(
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.w600,
letterSpacing: -0.45,
),
), ),
SizedBox( SizedBox(
height: 4, height: 4,
), ),
Texts( Text(
DateUtil.getDayMonthYearDateFormatted( DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.createdOn)),
DateUtil.convertStringToDate(order.createdOn)), style: TextStyle(
fontSize: 22, fontSize: 18,
fontWeight: FontWeight.w600,
letterSpacing: -0.45,
),
), ),
], ],
), ),
), ),
Container( Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.only( clipBehavior: Clip.antiAlias,
left: 15, bottom: 15, top: 15,right: 15), padding: EdgeInsets.only(left: 15, bottom: 15, top: 15, right: 15),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(
color: Colors.grey, color: (order.status == 1 || order.status == 2) ? Colors.grey : Colors.transparent,
width: 1.0, width: (order.status == 1 || order.status == 2) ? 1.0 : 0,
), ),
), ),
// borderRadius: BorderRadius.circular(12), // borderRadius: BorderRadius.circular(12),
color: Colors.white), ),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [ children: [
Texts( Text(
TranslationBase.of(context).orderLocation, TranslationBase.of(context).orderLocation,
bold: false, style: TextStyle(
fontSize: 13, fontSize: 13,
fontWeight: FontWeight.w600,
letterSpacing: -0.45,
),
), ),
SizedBox( SizedBox(
height: 4, height: 4,
), ),
Texts( Text(
!projectViewModel.isArabic?order. !projectViewModel.isArabic ? order.projectDescription.toString() : order.projectDescriptionN.toString(),
projectDescription.toString() : style: TextStyle(
order fontSize: 13,
.projectDescriptionN fontWeight: FontWeight.w600,
.toString(), letterSpacing: -0.45,
fontSize: 22, ),
), ),
], ],
), ),
), ),
SizedBox( (order.status == 1 || order.status == 2)
? SizedBox(
height: 12, height: 12,
), )
if (order.status == 1 ||order.status == 2 ) : Container(),
if (order.status == 1 || order.status == 2)
Center( Center(
child: Container( child: Container(
width: MediaQuery width: MediaQuery.of(context).size.width * 0.85,
.of(context)
.size
.width *
0.85,
child: SecondaryButton( child: SecondaryButton(
label: TranslationBase.of(context).cancel.toUpperCase(), label: TranslationBase.of(context).cancel.toUpperCase(),
onTap: () { onTap: () {
showConfirmMessage(model, showConfirmMessage(model, order);
order); },
}
,
color: Colors.red[800], color: Colors.red[800],
disabled: false, disabled: false,
textColor: Theme textColor: Theme.of(context).backgroundColor),
.of(context)
.backgroundColor),
), ),
), ),
SizedBox( (order.status == 1 || order.status == 2)
height: 22, ? SizedBox(
height: 12,
)
: SizedBox(
height: 2,
), ),
], ],
), ),

@ -1,4 +1,6 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -12,170 +14,87 @@ class StepsWidget extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); return showRow();
return !projectViewModel.isArabic? Stack( }
children: [
Container(
height: 50,
width: MediaQuery.of(context).size.width,
color: Colors.transparent,
child: Center(
child: Divider(
color: Colors.grey,
height: 0.75,
thickness: 0.75,
),
),
),
Positioned(
top: 10,
left: 0,
child: InkWell(
onTap: () => changeCurrentTab(0),
child: Container(
width: 35,
height: 35,
decoration: BoxDecoration(
border: index > 0 ? null:Border.all(color: Colors.black,width: 0.75),
shape: BoxShape.circle,
color: index == 0 ? Colors.grey[800] : index > 0 ?Colors.green: Colors.white,
),
child: Center(
child: Texts(
'1',
color: index == 0 ? Colors.white : index > 0 ?Colors.white: Colors.grey[800],
),
),
),
),
),
Positioned(
top: 10,
left: MediaQuery.of(context).size.width * 0.42,
child: InkWell(
onTap: () => index >= 2 ? changeCurrentTab(1) : null,
child: Container(
width: 35,
height: 35,
decoration: BoxDecoration(
border: index > 1 ? null:Border.all(color: Colors.black,width: 0.75),
shape: BoxShape.circle,
color: index == 1 ? Colors.grey[800] : index > 1 ?Colors.green: Colors.white,
),
child: Center(
child: Texts(
'2',
color: index == 1? Colors.white : index > 1 ?Colors.white: Colors.grey[800],
),
),
),
),
),
Positioned(
top: 10,
right: 0,
child: InkWell(
onTap: () => index == 2 ?changeCurrentTab(3) : null,
child: Container(
width: 35,
height: 35,
decoration: BoxDecoration(
shape: BoxShape.circle,
border: Border.all(color: Colors.black,width: 0.75),
color: index == 2 ? Colors.grey[800] : Colors.white,
),
child: Center(
child: Texts(
'3',
color: index == 2 ? Colors.white : Colors.grey[800],
),
),
),
),
),
], Widget showRow() {
):Stack( return Container(
width: double.infinity,
child: Row(
children: [ children: [
Container( InkWell(
height: 50,
width: MediaQuery.of(context).size.width,
color: Colors.transparent,
child: Center(
child: Divider(
color: Colors.grey,
height: 0.75,
thickness: 0.75,
),
),
),
Positioned(
top: 10,
right: 0,
child: InkWell(
onTap: () => changeCurrentTab(0), onTap: () => changeCurrentTab(0),
child: Container( child: Container(
width: 35, width: 35,
height: 35, height: 35,
decoration: BoxDecoration( decoration: containerColorRadiusBorder(
border: index > 0 ? null:Border.all(color: Colors.black,width: 0.75), index == 0
shape: BoxShape.circle, ? CustomColors.accentColor
color: index == 0 ? Colors.grey[800] : index > 0 ?Colors.green: Colors.white, : index > 0
), ? Colors.green[700]
: Colors.white,
2000,
Colors.black),
child: Center( child: Center(
child: Texts( child: Text(
'1', "1",
color: index == 0 ? Colors.white : index > 0 ?Colors.white: Colors.grey[800], style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
), ),
), ),
), ),
), ),
), ),
Positioned( Expanded(child: mDivider(Colors.grey)),
top: 10, InkWell(
left: MediaQuery.of(context).size.width * 0.42,
child: InkWell(
onTap: () => index >= 2 ? changeCurrentTab(1) : null, onTap: () => index >= 2 ? changeCurrentTab(1) : null,
child: Container( child: Container(
width: 35, width: 35,
height: 35, height: 35,
decoration: BoxDecoration( decoration: containerColorRadiusBorder(
border: index > 1 ? null:Border.all(color: Colors.black,width: 0.75), index == 1
shape: BoxShape.circle, ? CustomColors.accentColor
color: index == 1 ? Colors.grey[800] : index > 1 ?Colors.green: Colors.white, : index > 1
), ? Colors.green[700]
: Colors.white,
2000,
Colors.black),
child: Center( child: Center(
child: Texts( child: Text(
'2', "2",
color: index == 1? Colors.white : index > 1 ?Colors.white: Colors.grey[800], style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
), ),
), ),
), ),
), ),
), ),
Positioned( Expanded(child: mDivider(Colors.grey)),
top: 10, InkWell(
left: 0, onTap: () => index == 2 ? changeCurrentTab(3) : null,
child: InkWell(
onTap: () => index == 2 ?changeCurrentTab(3) : null,
child: Container( child: Container(
width: 35, width: 35,
height: 35, height: 35,
decoration: BoxDecoration( decoration: containerColorRadiusBorder(
shape: BoxShape.circle, index == 2 ? CustomColors.accentColor : Colors.white,
border: Border.all(color: Colors.black,width: 0.75), 2000,
color: index == 2 ? Colors.grey[800] : Colors.white, Colors.black,
), ),
child: Center( child: Center(
child: Texts( child: Text(
'3', "3",
color: index == 2 ? Colors.white : Colors.grey[800], style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
), ),
), ),
), ),
), ),
), ),
], ],
),
); );
} }
} }

@ -84,7 +84,8 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
projectViewModel, projectViewModel,
new SliderData(TranslationBase.of(context).fileno + ": " + projectViewModel.user.patientID.toString(), projectViewModel.user.firstName + ' ' + projectViewModel.user.lastName, new SliderData(TranslationBase.of(context).fileno + ": " + projectViewModel.user.patientID.toString(), projectViewModel.user.firstName + ' ' + projectViewModel.user.lastName,
"", bannerColor[0].darkColor, bannerColor[0].lightColor), "", bannerColor[0].darkColor, bannerColor[0].lightColor),
widget.model), widget.model,
),
), ),
), ),
) )

@ -138,7 +138,7 @@ class LoggedSliderView extends StatelessWidget {
padding: const EdgeInsets.only(left: 20, right: 20), padding: const EdgeInsets.only(left: 20, right: 20),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded( flex: 3,
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
SvgPicture.asset( SvgPicture.asset(
@ -158,7 +158,7 @@ class LoggedSliderView extends StatelessWidget {
SizedBox( SizedBox(
width: 3, width: 3,
), ),
Expanded( Expanded( flex: 3,
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
SvgPicture.asset( SvgPicture.asset(
@ -175,6 +175,7 @@ class LoggedSliderView extends StatelessWidget {
width: 3, width: 3,
), ),
Expanded( Expanded(
flex: 3,
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
SvgPicture.asset( SvgPicture.asset(
@ -183,10 +184,11 @@ class LoggedSliderView extends StatelessWidget {
height: 12, height: 12,
), ),
mWidth(6), mWidth(6),
Texts('${TranslationBase.of(context).bloodD}: ${model.booldType}', color: Colors.white, fontSize: 10) Texts('${TranslationBase.of(context).bloodType1} ${model.booldType}', color: Colors.white, fontSize: 10)
], ],
), ),
), ),
mFlex(1),
], ],
), ),
), ),

@ -20,6 +20,8 @@ class TranslationBase {
String get dashboardScreenToolbarTitle => localizedValues['dashboardScreenToolbarTitle'][locale.languageCode]; String get dashboardScreenToolbarTitle => localizedValues['dashboardScreenToolbarTitle'][locale.languageCode];
String get bloodType1 => localizedValues['bloodType'][locale.languageCode];
String get settings => localizedValues['settings'][locale.languageCode]; String get settings => localizedValues['settings'][locale.languageCode];
String get language => localizedValues['language'][locale.languageCode]; String get language => localizedValues['language'][locale.languageCode];
@ -93,18 +95,25 @@ class TranslationBase {
String get patientShare => localizedValues['patientShare'][locale.languageCode]; String get patientShare => localizedValues['patientShare'][locale.languageCode];
String get neverWait => localizedValues['neverWait'][locale.languageCode]; String get neverWait => localizedValues['neverWait'][locale.languageCode];
String get patientShareWithTax => localizedValues['patientShareWithTax'][locale.languageCode]; String get patientShareWithTax => localizedValues['patientShareWithTax'][locale.languageCode];
String get reminderTitle => localizedValues['reminderTitle'][locale.languageCode]; String get reminderTitle => localizedValues['reminderTitle'][locale.languageCode];
String get confirmAppo => localizedValues['confirmAppo'][locale.languageCode]; String get confirmAppo => localizedValues['confirmAppo'][locale.languageCode];
String get appointmentCalendar => localizedValues['appointmentCalendar'][locale.languageCode]; String get appointmentCalendar => localizedValues['appointmentCalendar'][locale.languageCode];
String get appointmentSuccess => localizedValues['appointmentSuccess'][locale.languageCode]; String get appointmentSuccess => localizedValues['appointmentSuccess'][locale.languageCode];
String get confirm => localizedValues['confirm'][locale.languageCode]; String get confirm => localizedValues['confirm'][locale.languageCode];
String get pressAgain => localizedValues['pressAgain'][locale.languageCode]; String get pressAgain => localizedValues['pressAgain'][locale.languageCode];
String get confirmLiveCare => localizedValues['confirmLiveCare'][locale.languageCode]; String get confirmLiveCare => localizedValues['confirmLiveCare'][locale.languageCode];
String get doctorFilter => localizedValues['doctorFilter'][locale.languageCode]; String get doctorFilter => localizedValues['doctorFilter'][locale.languageCode];
String get waitingForDoctor => localizedValues['waitingForDoctor'][locale.languageCode]; String get waitingForDoctor => localizedValues['waitingForDoctor'][locale.languageCode];
String get confirmLater => localizedValues['confirmLater'][locale.languageCode]; String get confirmLater => localizedValues['confirmLater'][locale.languageCode];
@ -724,11 +733,15 @@ class TranslationBase {
String get sentRequest => localizedValues['sent-requests'][locale.languageCode]; String get sentRequest => localizedValues['sent-requests'][locale.languageCode];
String get km => localizedValues['km'][locale.languageCode]; String get km => localizedValues['km'][locale.languageCode];
String get km_ => localizedValues['km_'][locale.languageCode]; String get km_ => localizedValues['km_'][locale.languageCode];
String get patientHealthSummaryReport => String get patientHealthSummaryReport =>
localizedValues['PatientHealthSummaryReport'][locale.languageCode]; localizedValues['PatientHealthSummaryReport'][locale.languageCode];
String get toViewTheTermsAndConditions => String get toViewTheTermsAndConditions =>
localizedValues['ToViewTheTermsAndConditions'][locale.languageCode]; localizedValues['ToViewTheTermsAndConditions'][locale.languageCode];
String get clickHere => localizedValues['ClickHere'][locale.languageCode]; String get clickHere => localizedValues['ClickHere'][locale.languageCode];
String get iAgreeToTheTermsAndConditions => localizedValues['IAgreeToTheTermsAndConditions'][locale.languageCode]; String get iAgreeToTheTermsAndConditions => localizedValues['IAgreeToTheTermsAndConditions'][locale.languageCode];
@ -802,7 +815,9 @@ class TranslationBase {
String get country => localizedValues['country'][locale.languageCode]; String get country => localizedValues['country'][locale.languageCode];
String get ok => localizedValues['Ok'][locale.languageCode]; String get ok => localizedValues['Ok'][locale.languageCode];
String get averageWaitingTime => localizedValues['averageWaitingTime'][locale.languageCode]; String get averageWaitingTime => localizedValues['averageWaitingTime'][locale.languageCode];
String get waterConsumedInWeek => localizedValues['WaterConsumedInWeek'][locale.languageCode]; String get waterConsumedInWeek => localizedValues['WaterConsumedInWeek'][locale.languageCode];
String get waterConsumedInMonth => localizedValues['WaterConsumedInMonth'][locale.languageCode]; String get waterConsumedInMonth => localizedValues['WaterConsumedInMonth'][locale.languageCode];
@ -1069,12 +1084,16 @@ class TranslationBase {
String get consumed => localizedValues['consumed'][locale.languageCode]; String get consumed => localizedValues['consumed'][locale.languageCode];
String get transferred => localizedValues['transferred'][locale.languageCode]; String get transferred => localizedValues['transferred'][locale.languageCode];
String get checkBeneficiary => String get checkBeneficiary =>
localizedValues['checkBeneficiary'][locale.languageCode]; localizedValues['checkBeneficiary'][locale.languageCode];
String get beneficiaryName => String get beneficiaryName =>
localizedValues['beneficiaryName'][locale.languageCode]; localizedValues['beneficiaryName'][locale.languageCode];
String get accountActivation => String get accountActivation =>
localizedValues['accountActivation'][locale.languageCode]; localizedValues['accountActivation'][locale.languageCode];
String get nonRecommended => String get nonRecommended =>
localizedValues['nonRecommended'][locale.languageCode]; localizedValues['nonRecommended'][locale.languageCode];
@ -2094,7 +2113,9 @@ class TranslationBase {
String get upComingPayOption => localizedValues["upcoming-pay-options"][locale.languageCode]; String get upComingPayOption => localizedValues["upcoming-pay-options"][locale.languageCode];
String get pleaseAcceptTerms => localizedValues["please-accept-terms"][locale.languageCode]; String get pleaseAcceptTerms => localizedValues["please-accept-terms"][locale.languageCode];
String get pleaseSelectAllQuestionToContinue => localizedValues["pleaseSelectAllQuestionToContinue"][locale.languageCode]; String get pleaseSelectAllQuestionToContinue => localizedValues["pleaseSelectAllQuestionToContinue"][locale.languageCode];
String get type => localizedValues["type"][locale.languageCode]; String get type => localizedValues["type"][locale.languageCode];
String get eReferralInfo => localizedValues["info-ereferral"][locale.languageCode]; String get eReferralInfo => localizedValues["info-ereferral"][locale.languageCode];
@ -2132,36 +2153,57 @@ class TranslationBase {
String get noThankyou => localizedValues["no-thankyou"][locale.languageCode]; String get noThankyou => localizedValues["no-thankyou"][locale.languageCode];
String get visitClinic => localizedValues["visit-clinic"][locale.languageCode]; String get visitClinic => localizedValues["visit-clinic"][locale.languageCode];
String get generateCovidCertificate => localizedValues["generate-covid-certificate"][locale.languageCode]; String get generateCovidCertificate => localizedValues["generate-covid-certificate"][locale.languageCode];
String get isReportOutsideKsa => localizedValues["is-report-outside-ksa"][locale.languageCode]; String get isReportOutsideKsa => localizedValues["is-report-outside-ksa"][locale.languageCode];
String get passportNumber => localizedValues["passport-number"][locale.languageCode]; String get passportNumber => localizedValues["passport-number"][locale.languageCode];
String get enterPassportNumber => localizedValues["enter-passport-number"][locale.languageCode]; String get enterPassportNumber => localizedValues["enter-passport-number"][locale.languageCode];
String get validPassportNumber => localizedValues["valid-passport-number"][locale.languageCode]; String get validPassportNumber => localizedValues["valid-passport-number"][locale.languageCode];
String get continuePlan => localizedValues["continue-plan"][locale.languageCode]; String get continuePlan => localizedValues["continue-plan"][locale.languageCode];
String get dentalProcedureList => localizedValues["dental-procedure-list"][locale.languageCode]; String get dentalProcedureList => localizedValues["dental-procedure-list"][locale.languageCode];
String get aboutApp => localizedValues["about-app"][locale.languageCode]; String get aboutApp => localizedValues["about-app"][locale.languageCode];
String get aboutPointsLength => localizedValues["about-points"]['length'][locale.languageCode]; String get aboutPointsLength => localizedValues["about-points"]['length'][locale.languageCode];
String get timeNeeded => localizedValues["time-needed"][locale.languageCode]; String get timeNeeded => localizedValues["time-needed"][locale.languageCode];
String get totalTimeNeeded => String get totalTimeNeeded =>
localizedValues["total-time-needed"][locale.languageCode]; localizedValues["total-time-needed"][locale.languageCode];
String get infoEye => String get infoEye =>
localizedValues["info-eye"][locale.languageCode]; localizedValues["info-eye"][locale.languageCode];
String get infoVaccines => String get infoVaccines =>
localizedValues["info-vaccines"][locale.languageCode]; localizedValues["info-vaccines"][locale.languageCode];
String get infoTrackers => String get infoTrackers =>
localizedValues["info-trackers"][locale.languageCode]; localizedValues["info-trackers"][locale.languageCode];
String get infoHealthData => String get infoHealthData =>
localizedValues["info-health-data"][locale.languageCode]; localizedValues["info-health-data"][locale.languageCode];
String get infoAskDoc => String get infoAskDoc =>
localizedValues["info-ask-doc"][locale.languageCode]; localizedValues["info-ask-doc"][locale.languageCode];
String get infoAutoWifi => String get infoAutoWifi =>
localizedValues["info-auto-wifi"][locale.languageCode]; localizedValues["info-auto-wifi"][locale.languageCode];
String get autoWifi => String get autoWifi =>
localizedValues["auto-wifi"][locale.languageCode]; localizedValues["auto-wifi"][locale.languageCode];
String get childVaccineInfo => String get childVaccineInfo =>
localizedValues["child-vaccine-info"][locale.languageCode]; localizedValues["child-vaccine-info"][locale.languageCode];
String get h2oInfo => String get h2oInfo =>
localizedValues["h2o-info"][locale.languageCode]; localizedValues["h2o-info"][locale.languageCode];
String get askDocEmpty => String get askDocEmpty =>
localizedValues["ask-doc-empty"][locale.languageCode]; localizedValues["ask-doc-empty"][locale.languageCode];
} }

@ -163,7 +163,7 @@ class _AppDrawerState extends State<AppDrawer> {
} else { } else {
projectProvider.changeLanguage('ar'); projectProvider.changeLanguage('ar');
} }
var themeNotifier = Provider.of<ThemeNotifier>(context, listen: false); var themeNotifier = Provider.of<ThemeNotifier>(context, listen: true);
themeNotifier.setTheme(defaultTheme(fontName: projectProvider.isArabic ? 'Cairo' : 'Poppins')); themeNotifier.setTheme(defaultTheme(fontName: projectProvider.isArabic ? 'Cairo' : 'Poppins'));
}, },
), ),

Loading…
Cancel
Save