diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 03e966ff..5ab7d487 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1175,6 +1175,7 @@ const Map localizedValues = { "generalHealth": {"en": "General Health", "ar": "صحة عامة"}, "womanHealth": {"en": "Women's Health", "ar": "صحة المرأة"}, "bmi": {"en": "BMI", "ar": "الكتلة"}, + "bloodType": {"en": "Blood Type:", "ar": ":فصيلة الدم"}, "calc-health": {"en": "Calculators", "ar": "الصحية"}, "calories": {"en": "Calories", "ar": "سعرات"}, "bmr": {"en": "BMR", "ar": "معدل الأيض القاعدي"}, diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart index f314a9bf..5ce0cc3e 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_page.dart @@ -122,16 +122,7 @@ class _NewCMCPageState extends State with TickerProviderStateMixin { height: MediaQuery.of(context).size.height * 0.8, child: Column( 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( child: PageView( physics: NeverScrollableScrollPhysics(), @@ -376,12 +367,15 @@ class _NewCMCPageState extends State with TickerProviderStateMixin { ), ), ) - : NewCMCStepOnePage( - changePageViewIndex: changePageViewIndex, - cMCInsertPresOrderRequestModel: - cMCInsertPresOrderRequestModel, - model: widget.model, - ), + : Container( + color: Colors.red, + child: NewCMCStepOnePage( + changePageViewIndex: changePageViewIndex, + cMCInsertPresOrderRequestModel: + cMCInsertPresOrderRequestModel, + model: widget.model, + ), + ), NewCMCStepTowPage( longitude: _longitude, latitude: _latitude, diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart index c07b8345..5bf65ef4 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/NewCMC/new_cmc_step_one_page.dart @@ -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/viewModels/AlHabibMedicalService/cmc_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/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'; @@ -17,12 +19,7 @@ class NewCMCStepOnePage extends StatefulWidget { final Function changePageViewIndex; final CMCViewModel model; - const NewCMCStepOnePage( - {Key key, - this.cMCInsertPresOrderRequestModel, - this.model, - this.changePageViewIndex}) - : super(key: key); + const NewCMCStepOnePage({Key key, this.cMCInsertPresOrderRequestModel, this.model, this.changePageViewIndex}) : super(key: key); @override _NewCMCStepOnePageState createState() => _NewCMCStepOnePageState(); @@ -44,175 +41,107 @@ class _NewCMCStepOnePageState extends State { body: SingleChildScrollView( physics: ScrollPhysics(), child: Container( - margin: EdgeInsets.all(12), + margin: EdgeInsets.only(left: 12, right: 12), child: Center( child: Column( children: [ - FractionallySizedBox( - widthFactor: 0.94, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - 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: [ - Radio( - value: service.serviceID, - activeColor: Colors.red[800], - onChanged: (newValue) async { - PatientERCMCInsertServicesList - patientERCMCInsertServicesList = - new PatientERCMCInsertServicesList( - price: service.price, - serviceID: service.serviceID - .toString(), - selectedServiceName: - service.description, - selectedServiceNameAR: - service.descriptionN, - recordID: 1, - totalPrice: - service.totalPrice, - vAT: service.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.all(20.0), - child: Texts( - projectViewModel.isArabic - ? service.descriptionN - : service.description, - fontSize: 15, - ), - ), - ), - ], + 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, ), - ], + ), ), - ); - }).toList(), - ), - ], - ), - ), - SizedBox( - height: 30, - ), - Container( - color: Theme.of(context).primaryColor, - width: double.infinity, - child: Column( - children: [ - Row( - children: [ - Container( - margin: EdgeInsets.only(right: 10, left: 10), - child: Texts( - TranslationBase.of(context).coveredService, - fontWeight: FontWeight.bold, - )) + ), ], - ), - 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), - ), - ], - ), - ), - SizedBox( - height: 12, - ), - ], - ), + ); + }, + 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, ), ), ); - }).toList()), - ], + }, + separatorBuilder: (context, index) { + return mDivider(Colors.grey); + }, + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemCount: widget.model.checkupItems.length, + ), + ], + ), ), - ) + ), + mHeight(MediaQuery.of(context).size.height * 0.12), ], ), ), @@ -221,44 +150,30 @@ class _NewCMCStepOnePageState extends State { 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: [ Container( width: MediaQuery.of(context).size.width * 0.9, child: SecondaryButton( label: TranslationBase.of(context).next, textColor: Theme.of(context).backgroundColor, - color: Colors.grey[800], + color: CustomColors.accentColor, onTap: () async { - if (widget.cMCInsertPresOrderRequestModel - .patientERCMCInsertServicesList.length != - 0 || - widget.cMCInsertPresOrderRequestModel - .patientERCMCInsertServicesList == - null) { + 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); + PatientERCMCInsertServicesList patientERCMCInsertServicesList = new PatientERCMCInsertServicesList( + price: widget.model.cmcAllServicesList[index - 1].price, + serviceID: widget.model.cmcAllServicesList[index - 1].serviceID.toString(), + selectedServiceName: widget.model.cmcAllServicesList[index - 1].description, + selectedServiceNameAR: widget.model.cmcAllServicesList[index - 1].descriptionN, + recordID: 1, + totalPrice: widget.model.cmcAllServicesList[index - 1].totalPrice, + vAT: widget.model.cmcAllServicesList[index - 1].vAT); - widget.cMCInsertPresOrderRequestModel - .patientERCMCInsertServicesList = [ - patientERCMCInsertServicesList - ]; + widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList = [patientERCMCInsertServicesList]; await widget.model.getCustomerInfo(); if (widget.model.state == ViewState.ErrorLocal) { Utils.showErrorToast(); diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart index d7ebad6c..65b2d878 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart @@ -3,6 +3,7 @@ import 'dart:ui'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_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/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; @@ -42,93 +43,69 @@ class _CMCPageState extends State with SingleTickerProviderStateMixin { isShowAppBar: true, description: TranslationBase.of(context).infoCMC, imagesInfo: [ - ImagesInfo( - imageAr: 'https://hmgwebservices.com/Images/MobileApp/CMC/ar/0.png', - imageEn: 'https://hmgwebservices.com/Images/MobileApp/CMC/en/0.png') + ImagesInfo(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, - body: Scaffold( - extendBodyBehindAppBar: true, - appBar: PreferredSize( - preferredSize: Size.fromHeight(65.0), - child: Stack( - children: [ - Positioned( - 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, - margin: EdgeInsets.only(top: 10.0), - width: MediaQuery.of(context).size.width * 0.9, - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: Theme.of(context).dividerColor, - width: 0.7), + showNewAppBar: true, + showNewAppBarTitle: true, + backgroundColor: CustomColors.appBackgroudGreyColor, + body: Column( + children: [ + 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, ), - color: Theme.of(context).primaryColor), - child: Center( - child: TabBar( - isScrollable: true, - controller: _tabController, - indicatorWeight: 5.0, - indicatorSize: TabBarIndicatorSize.tab, - indicatorColor: Colors.red[800], - labelColor: Theme.of(context).primaryColor, - labelPadding: - EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), - unselectedLabelColor: Colors.grey[800], - tabs: [ - Container( - width: MediaQuery.of(context).size.width * 0.37, - child: Center( - child: Texts(TranslationBase.of(context) - .comprehensiveMedicalCheckup), - ), - ), - Container( - width: MediaQuery.of(context).size.width * 0.37, - child: Center( - child: - Texts(TranslationBase.of(context).orderLog), - ), - ), - ], ), ), - ), - ), - ], - ), - ), - body: Column( - children: [ - Expanded( - child: TabBarView( - physics: BouncingScrollPhysics(), - controller: _tabController, - children: [ - NewCMCPage( - model: model, + Center( + child: Text( + TranslationBase.of(context).orderLog, + textAlign: TextAlign.center, + style: TextStyle( + fontSize: 13, + fontWeight: FontWeight.w600, + letterSpacing: -0.34, + ), + ), ), - OrdersLogDetailsPage( - model: model, - ) ], ), - ) - ], - ), + ), + ), + Expanded( + child: TabBarView( + physics: BouncingScrollPhysics(), + controller: _tabController, + children: [ + NewCMCPage( + model: model, + ), + OrdersLogDetailsPage( + model: model, + ) + ], + ), + ) + ], ), ), ); diff --git a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/orders_log_details_page.dart b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/orders_log_details_page.dart index ec686e70..b98d97c9 100644 --- a/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/orders_log_details_page.dart +++ b/lib/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/orders_log_details_page.dart @@ -22,26 +22,20 @@ class OrdersLogDetailsPage extends StatelessWidget { @override Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); - void showConfirmMessage( - CMCViewModel model, GetHHCAllPresOrdersResponseModel order) { + void showConfirmMessage(CMCViewModel model, GetHHCAllPresOrdersResponseModel order) { showDialog( context: context, child: ConfirmCancelOrderDialog( model: model, onTap: () async { - UpdatePresOrderRequestModel updatePresOrderRequestModel = - UpdatePresOrderRequestModel( - presOrderID: order.iD, - rejectionReason: "", - presOrderStatus: 4, editedBy: 3); + UpdatePresOrderRequestModel updatePresOrderRequestModel = UpdatePresOrderRequestModel(presOrderID: order.iD, rejectionReason: "", presOrderStatus: 4, editedBy: 3); await model.updateCmcPresOrder(updatePresOrderRequestModel); - if(model.state == ViewState.ErrorLocal) { - Utils.showErrorToast(model.error); + if (model.state == ViewState.ErrorLocal) { + Utils.showErrorToast(model.error); } else { - AppToast.showSuccessToast(message:TranslationBase.of(context).processDoneSuccessfully ); + AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully); await model.getCmcAllPresOrders(); } }, @@ -49,205 +43,210 @@ class OrdersLogDetailsPage extends StatelessWidget { } return AppScaffold( - isShowAppBar: false, - baseViewModel: model, - body: SingleChildScrollView( - physics: ScrollPhysics(), - child: Container( - margin: EdgeInsets.all(12), - child: Center( - child: FractionallySizedBox( - widthFactor: 0.94, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 50, - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: model.cmcAllPresOrders.map((order) { - return Container( - width: double.infinity, - margin: EdgeInsets.only(top: 15), - decoration: BoxDecoration( - border: - Border.all(color: Colors.grey, width: 1), - borderRadius: BorderRadius.circular(12), - color: Colors.white), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 12, - ), - Container( - width: double.infinity, - padding: EdgeInsets.only( - left: 15, bottom: 15, top: 15,right: 15), - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: Colors.grey, - width: 1.0, - ), + isShowAppBar: false, + baseViewModel: model, + body: SingleChildScrollView( + physics: ScrollPhysics(), + child: Container( + margin: EdgeInsets.all(12), + child: Center( + child: FractionallySizedBox( + widthFactor: 0.94, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + 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), - color: Colors.white), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - TranslationBase - .of(context) - .requestID, - bold: false, + ), + // 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, + ), + SizedBox( + height: 4, + ), + Text( + order.iD.toString(), + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w600, + letterSpacing: -0.45, ), - Texts( - order.iD.toString(), - fontSize: 22, - ), - ], - ), + ), + ], ), - Container( - width: double.infinity, - padding: EdgeInsets.only( - left: 15, bottom: 15, top: 15,right: 15), - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: Colors.grey, - width: 1.0, - ), + ), + Container( + width: double.infinity, + padding: EdgeInsets.only(left: 15, bottom: 15, top: 15, right: 15), + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: Colors.grey, + width: 1.0, ), - // borderRadius: BorderRadius.circular(12), - color: Colors.white), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - TranslationBase - .of(context) - .OrderStatus, - bold: false, + ), + // 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, + ), + SizedBox( + height: 4, + ), + Text( + projectViewModel.isArabic ? order.descriptionN : order.description, + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w600, + letterSpacing: -0.45, ), - Texts( - - projectViewModel.isArabic ? order - .descriptionN : order.description, - fontSize: 22, - ), - ], - ), + ), + ], ), - Container( - width: double.infinity, - padding: EdgeInsets.only( - left: 15, bottom: 15, top: 15,right: 15), - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: Colors.grey, - width: 1.0, - ), + ), + Container( + width: double.infinity, + padding: EdgeInsets.only(left: 15, bottom: 15, top: 15, right: 15), + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + color: Colors.grey, + width: 1.0, ), - // borderRadius: BorderRadius.circular(12), - color: Colors.white), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - TranslationBase.of(context).pickupDate, - bold: false, + ), + // 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, + ), + SizedBox( + height: 4, + ), + Text( + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.createdOn)), + style: TextStyle( + fontSize: 18, + fontWeight: FontWeight.w600, + letterSpacing: -0.45, ), - Texts( - DateUtil.getDayMonthYearDateFormatted( - DateUtil.convertStringToDate(order.createdOn)), - fontSize: 22, - ), - ], - ), + ), + ], ), - Container( - width: double.infinity, - padding: EdgeInsets.only( - left: 15, bottom: 15, top: 15,right: 15), - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: Colors.grey, - width: 1.0, - ), + ), + 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), - color: Colors.white), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Texts( - TranslationBase.of(context).orderLocation, - bold: false, + ), + // 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, - ), - Texts( - !projectViewModel.isArabic?order. - projectDescription.toString() : - order - .projectDescriptionN - .toString(), - fontSize: 22, + ), + SizedBox( + height: 4, + ), + Text( + !projectViewModel.isArabic ? order.projectDescription.toString() : order.projectDescriptionN.toString(), + style: TextStyle( + fontSize: 13, + fontWeight: FontWeight.w600, + letterSpacing: -0.45, ), - ], - ), - ), - SizedBox( - height: 12, + ), + ], ), - if (order.status == 1 ||order.status == 2 ) + ), + (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, + width: MediaQuery.of(context).size.width * 0.85, child: SecondaryButton( label: TranslationBase.of(context).cancel.toUpperCase(), onTap: () { - showConfirmMessage(model, - order); - } - , + showConfirmMessage(model, order); + }, color: Colors.red[800], disabled: false, - textColor: Theme - .of(context) - .backgroundColor), + textColor: Theme.of(context).backgroundColor), ), ), - SizedBox( - height: 22, - ), - ], - ), - ); + (order.status == 1 || order.status == 2) + ? SizedBox( + height: 12, + ) + : SizedBox( + height: 2, + ), + ], + ), + ); }).toList()) ], ), diff --git a/lib/pages/AlHabibMedicalService/HomeHealthCare/StepsWidget.dart b/lib/pages/AlHabibMedicalService/HomeHealthCare/StepsWidget.dart index 370544d0..4ea50670 100644 --- a/lib/pages/AlHabibMedicalService/HomeHealthCare/StepsWidget.dart +++ b/lib/pages/AlHabibMedicalService/HomeHealthCare/StepsWidget.dart @@ -1,4 +1,6 @@ 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:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -12,170 +14,87 @@ class StepsWidget extends StatelessWidget { @override Widget build(BuildContext context) { - ProjectViewModel projectViewModel = Provider.of(context); - 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], - ), - ), - ), - ), - ), + return showRow(); + } - ], - ):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, - right: 0, - child: InkWell( + Widget showRow() { + return Container( + width: double.infinity, + child: Row( + children: [ + 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, - ), + decoration: containerColorRadiusBorder( + index == 0 + ? CustomColors.accentColor + : index > 0 + ? Colors.green[700] + : Colors.white, + 2000, + Colors.black), child: Center( - child: Texts( - '1', - color: index == 0 ? Colors.white : index > 0 ?Colors.white: Colors.grey[800], + child: Text( + "1", + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + ), ), ), ), ), - ), - Positioned( - top: 10, - left: MediaQuery.of(context).size.width * 0.42, - child: InkWell( + Expanded(child: mDivider(Colors.grey)), + 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, - ), + decoration: containerColorRadiusBorder( + index == 1 + ? CustomColors.accentColor + : index > 1 + ? Colors.green[700] + : Colors.white, + 2000, + Colors.black), child: Center( - child: Texts( - '2', - color: index == 1? Colors.white : index > 1 ?Colors.white: Colors.grey[800], + child: Text( + "2", + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + ), ), ), ), ), - ), - Positioned( - top: 10, - left: 0, - child: InkWell( - onTap: () => index == 2 ?changeCurrentTab(3) : null, + Expanded(child: mDivider(Colors.grey)), + 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, + decoration: containerColorRadiusBorder( + index == 2 ? CustomColors.accentColor : Colors.white, + 2000, + Colors.black, ), child: Center( - child: Texts( - '3', - color: index == 2 ? Colors.white : Colors.grey[800], + child: Text( + "3", + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + ), ), ), ), ), - ), - ], + ], + ), ); } } diff --git a/lib/pages/landing/fragments/home_page_fragment2.dart b/lib/pages/landing/fragments/home_page_fragment2.dart index 68bf2ffe..c0a28d8f 100644 --- a/lib/pages/landing/fragments/home_page_fragment2.dart +++ b/lib/pages/landing/fragments/home_page_fragment2.dart @@ -81,10 +81,11 @@ class _HomePageFragment2State extends State { navigateTo(context, MedicalProfilePageNew()); }, child: LoggedSliderView( - projectViewModel, - new SliderData(TranslationBase.of(context).fileno + ": " + projectViewModel.user.patientID.toString(), projectViewModel.user.firstName + ' ' + projectViewModel.user.lastName, - "", bannerColor[0].darkColor, bannerColor[0].lightColor), - widget.model), + projectViewModel, + new SliderData(TranslationBase.of(context).fileno + ": " + projectViewModel.user.patientID.toString(), projectViewModel.user.firstName + ' ' + projectViewModel.user.lastName, + "", bannerColor[0].darkColor, bannerColor[0].lightColor), + widget.model, + ), ), ), ) diff --git a/lib/pages/landing/widgets/logged_slider_view.dart b/lib/pages/landing/widgets/logged_slider_view.dart index 958135d0..067cb148 100644 --- a/lib/pages/landing/widgets/logged_slider_view.dart +++ b/lib/pages/landing/widgets/logged_slider_view.dart @@ -138,7 +138,7 @@ class LoggedSliderView extends StatelessWidget { padding: const EdgeInsets.only(left: 20, right: 20), child: Row( children: [ - Expanded( + Expanded( flex: 3, child: Row( children: [ SvgPicture.asset( @@ -158,7 +158,7 @@ class LoggedSliderView extends StatelessWidget { SizedBox( width: 3, ), - Expanded( + Expanded( flex: 3, child: Row( children: [ SvgPicture.asset( @@ -175,6 +175,7 @@ class LoggedSliderView extends StatelessWidget { width: 3, ), Expanded( + flex: 3, child: Row( children: [ SvgPicture.asset( @@ -183,10 +184,11 @@ class LoggedSliderView extends StatelessWidget { height: 12, ), 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), ], ), ), diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index b7efad42..3cb7ce31 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -20,6 +20,8 @@ class TranslationBase { String get dashboardScreenToolbarTitle => localizedValues['dashboardScreenToolbarTitle'][locale.languageCode]; + String get bloodType1 => localizedValues['bloodType'][locale.languageCode]; + String get settings => localizedValues['settings'][locale.languageCode]; String get language => localizedValues['language'][locale.languageCode]; @@ -93,18 +95,25 @@ class TranslationBase { String get patientShare => localizedValues['patientShare'][locale.languageCode]; String get neverWait => localizedValues['neverWait'][locale.languageCode]; + String get patientShareWithTax => localizedValues['patientShareWithTax'][locale.languageCode]; String get reminderTitle => localizedValues['reminderTitle'][locale.languageCode]; + String get confirmAppo => localizedValues['confirmAppo'][locale.languageCode]; String get appointmentCalendar => localizedValues['appointmentCalendar'][locale.languageCode]; + String get appointmentSuccess => localizedValues['appointmentSuccess'][locale.languageCode]; String get confirm => localizedValues['confirm'][locale.languageCode]; + String get pressAgain => localizedValues['pressAgain'][locale.languageCode]; + String get confirmLiveCare => localizedValues['confirmLiveCare'][locale.languageCode]; + String get doctorFilter => localizedValues['doctorFilter'][locale.languageCode]; + String get waitingForDoctor => localizedValues['waitingForDoctor'][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 km => localizedValues['km'][locale.languageCode]; + String get km_ => localizedValues['km_'][locale.languageCode]; + String get patientHealthSummaryReport => localizedValues['PatientHealthSummaryReport'][locale.languageCode]; + String get toViewTheTermsAndConditions => localizedValues['ToViewTheTermsAndConditions'][locale.languageCode]; + String get clickHere => localizedValues['ClickHere'][locale.languageCode]; String get iAgreeToTheTermsAndConditions => localizedValues['IAgreeToTheTermsAndConditions'][locale.languageCode]; @@ -802,7 +815,9 @@ class TranslationBase { String get country => localizedValues['country'][locale.languageCode]; String get ok => localizedValues['Ok'][locale.languageCode]; + String get averageWaitingTime => localizedValues['averageWaitingTime'][locale.languageCode]; + String get waterConsumedInWeek => localizedValues['WaterConsumedInWeek'][locale.languageCode]; String get waterConsumedInMonth => localizedValues['WaterConsumedInMonth'][locale.languageCode]; @@ -1069,12 +1084,16 @@ class TranslationBase { String get consumed => localizedValues['consumed'][locale.languageCode]; String get transferred => localizedValues['transferred'][locale.languageCode]; + String get checkBeneficiary => localizedValues['checkBeneficiary'][locale.languageCode]; + String get beneficiaryName => localizedValues['beneficiaryName'][locale.languageCode]; + String get accountActivation => localizedValues['accountActivation'][locale.languageCode]; + String get nonRecommended => localizedValues['nonRecommended'][locale.languageCode]; @@ -2094,7 +2113,9 @@ class TranslationBase { String get upComingPayOption => localizedValues["upcoming-pay-options"][locale.languageCode]; String get pleaseAcceptTerms => localizedValues["please-accept-terms"][locale.languageCode]; + String get pleaseSelectAllQuestionToContinue => localizedValues["pleaseSelectAllQuestionToContinue"][locale.languageCode]; + String get type => localizedValues["type"][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 visitClinic => localizedValues["visit-clinic"][locale.languageCode]; + String get generateCovidCertificate => localizedValues["generate-covid-certificate"][locale.languageCode]; + String get isReportOutsideKsa => localizedValues["is-report-outside-ksa"][locale.languageCode]; + String get passportNumber => localizedValues["passport-number"][locale.languageCode]; + String get enterPassportNumber => localizedValues["enter-passport-number"][locale.languageCode]; + String get validPassportNumber => localizedValues["valid-passport-number"][locale.languageCode]; + String get continuePlan => localizedValues["continue-plan"][locale.languageCode]; + String get dentalProcedureList => localizedValues["dental-procedure-list"][locale.languageCode]; + String get aboutApp => localizedValues["about-app"][locale.languageCode]; + String get aboutPointsLength => localizedValues["about-points"]['length'][locale.languageCode]; + String get timeNeeded => localizedValues["time-needed"][locale.languageCode]; + String get totalTimeNeeded => localizedValues["total-time-needed"][locale.languageCode]; + String get infoEye => localizedValues["info-eye"][locale.languageCode]; + String get infoVaccines => localizedValues["info-vaccines"][locale.languageCode]; + String get infoTrackers => localizedValues["info-trackers"][locale.languageCode]; + String get infoHealthData => localizedValues["info-health-data"][locale.languageCode]; + String get infoAskDoc => localizedValues["info-ask-doc"][locale.languageCode]; + String get infoAutoWifi => localizedValues["info-auto-wifi"][locale.languageCode]; + String get autoWifi => localizedValues["auto-wifi"][locale.languageCode]; + String get childVaccineInfo => localizedValues["child-vaccine-info"][locale.languageCode]; + String get h2oInfo => localizedValues["h2o-info"][locale.languageCode]; + String get askDocEmpty => localizedValues["ask-doc-empty"][locale.languageCode]; } diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart index f5e633ec..6fa0a4ec 100644 --- a/lib/widgets/drawer/app_drawer_widget.dart +++ b/lib/widgets/drawer/app_drawer_widget.dart @@ -163,7 +163,7 @@ class _AppDrawerState extends State { } else { projectProvider.changeLanguage('ar'); } - var themeNotifier = Provider.of(context, listen: false); + var themeNotifier = Provider.of(context, listen: true); themeNotifier.setTheme(defaultTheme(fontName: projectProvider.isArabic ? 'Cairo' : 'Poppins')); }, ),