Merge branch 'development_new_design_2.0' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into sultan_new_design

merge-requests/433/head
Sultan Khan 4 years ago
commit 3b4e03c618

@ -1495,4 +1495,6 @@ const Map localizedValues = {
"noSlotsError": {"en": "No appointments available for selected date", "ar": "لا توجد مواعيد متاحة للتاريخ المحدد"}, "noSlotsError": {"en": "No appointments available for selected date", "ar": "لا توجد مواعيد متاحة للتاريخ المحدد"},
"selectSlot": {"en": "Please select Time Slot to continue", "ar": "الرجاء تحديد فترة زمنية للمتابعة"}, "selectSlot": {"en": "Please select Time Slot to continue", "ar": "الرجاء تحديد فترة زمنية للمتابعة"},
"years": {"en": "Years", "ar": "سنوات"}, "years": {"en": "Years", "ar": "سنوات"},
"respirationBPM": { "en": "bpm", "ar": "نفس" },
"extremeObese": {"en": "Extreme Obese", "ar": "السمنة المفرطة"},
}; };

@ -103,6 +103,7 @@ class TransportationDetails {
String pickupDateTime; String pickupDateTime;
String transportationType; String transportationType;
int ambulate; int ambulate;
String ambulateTitle;
String notes; String notes;
int requesterFileNo; int requesterFileNo;
String requesterMobileNo; String requesterMobileNo;
@ -128,6 +129,7 @@ class TransportationDetails {
this.pickupDateTime, this.pickupDateTime,
this.transportationType, this.transportationType,
this.ambulate, this.ambulate,
this.ambulateTitle,
this.notes, this.notes,
this.requesterFileNo, this.requesterFileNo,
this.requesterMobileNo, this.requesterMobileNo,
@ -153,6 +155,7 @@ class TransportationDetails {
pickupDateTime = json['pickupDateTime']; pickupDateTime = json['pickupDateTime'];
transportationType = json['transportationType']; transportationType = json['transportationType'];
ambulate = json['ambulate']; ambulate = json['ambulate'];
ambulateTitle = "";
notes = json['notes']; notes = json['notes'];
requesterFileNo = json['requesterFileNo']; requesterFileNo = json['requesterFileNo'];
requesterMobileNo = json['requesterMobileNo']; requesterMobileNo = json['requesterMobileNo'];
@ -180,6 +183,7 @@ class TransportationDetails {
data['pickupDateTime'] = this.pickupDateTime; data['pickupDateTime'] = this.pickupDateTime;
data['transportationType'] = this.transportationType; data['transportationType'] = this.transportationType;
data['ambulate'] = this.ambulate; data['ambulate'] = this.ambulate;
data['ambulateTitle'] = this.ambulateTitle;
data['notes'] = this.notes; data['notes'] = this.notes;
data['requesterFileNo'] = this.requesterFileNo; data['requesterFileNo'] = this.requesterFileNo;
data['requesterMobileNo'] = this.requesterMobileNo; data['requesterMobileNo'] = this.requesterMobileNo;

@ -86,6 +86,7 @@ class FeedbackService extends BaseService {
response['ListCOCItems'].forEach((cOC) { response['ListCOCItems'].forEach((cOC) {
cOCItemList.add(COCItem.fromJson(cOC)); cOCItemList.add(COCItem.fromJson(cOC));
}); });
cOCItemList = cOCItemList.reversed.toList(); // Sort list in desc order
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -21,14 +21,15 @@ class PrescriptionDeliveryViewModel extends BaseViewModel {
setState(ViewState.Busy); setState(ViewState.Busy);
await _pharmacyModuleService.generatePharmacyToken().then((value) async { await _pharmacyModuleService.generatePharmacyToken().then((value) async {
// await _customerAddressesService.getCustomerInfo(); // await _customerAddressesService.getCustomerInfo();
await _customerAddressesService.getCustomerInfo(); // await _customerAddressesService.getCustomerInfo();
await _pharmacyModuleService.createUser();
}); });
if (_customerAddressesService.hasError) { if (_customerAddressesService.hasError) {
error = _customerAddressesService.error; error = _customerAddressesService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else { } else {
await getCustomerAddresses();
} }
await getCustomerAddresses();
} }
Future insertDeliveryOrder( Future insertDeliveryOrder(

@ -45,7 +45,7 @@ class PrescriptionsViewModel extends BaseViewModel {
setState(ViewState.Error); setState(ViewState.Error);
} else { } else {
_filterList(); _filterList();
await getPrescriptionsOrders(); // await getPrescriptionsOrders();
setState(ViewState.Idle); setState(ViewState.Idle);
} }
} }

@ -1,13 +1,17 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/H2O/insert_user_activity_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/widgets/h20_floating_action_button.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/widgets/h20_floating_action_button.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:percent_indicator/circular_percent_indicator.dart'; import 'package:percent_indicator/circular_percent_indicator.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@ -17,13 +21,27 @@ import 'package:wave/wave.dart';
import 'Dialog/confirm_add_amount_dialog.dart'; import 'Dialog/confirm_add_amount_dialog.dart';
import 'add_custom_amount.dart'; import 'add_custom_amount.dart';
class TodayPage extends StatelessWidget { class TodayPage extends StatefulWidget {
TodayPage({Key key}) : super(key: key);
@override
_TodayPageState createState() {
return _TodayPageState();
}
}
class _TodayPageState extends State<TodayPage> {
TextEditingController _h20AmountController = TextEditingController();
bool isUnitML = true;
Future<bool> readPrefs() async { Future<bool> readPrefs() async {
SharedPreferences prefs = await SharedPreferences.getInstance(); SharedPreferences prefs = await SharedPreferences.getInstance();
return (prefs.getString(H2O_UNIT) ?? "ml") == "ml" ? true : false; isUnitML = (prefs.getString(H2O_UNIT) ?? "ml") == "ml" ? true : false;
return isUnitML;
} }
bool canShowAddButton = false;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<H2OViewModel>( return BaseView<H2OViewModel>(
@ -46,7 +64,6 @@ class TodayPage extends StatelessWidget {
child: FutureBuilder<bool>( child: FutureBuilder<bool>(
future: readPrefs(), future: readPrefs(),
builder: (context, data) { builder: (context, data) {
var isUnitML = true;
String unit; String unit;
if (data.connectionState == ConnectionState.done) { if (data.connectionState == ConnectionState.done) {
isUnitML = data.data; isUnitML = data.data;
@ -152,8 +169,6 @@ class TodayPage extends StatelessWidget {
_circularButton(context, 330, model), _circularButton(context, 330, model),
SizedBox(height: 8), SizedBox(height: 8),
_circularButton(context, 200, model), _circularButton(context, 200, model),
// SizedBox(height: 8),
// _circularButton(context, 0, model, isCustom: true),
SizedBox(height: 8), SizedBox(height: 8),
InkWell( InkWell(
onTap: () => undoVolume(context, model), onTap: () => undoVolume(context, model),
@ -175,24 +190,114 @@ class TodayPage extends StatelessWidget {
), ),
), ),
SizedBox(height: 40), SizedBox(height: 40),
// Text( Text(
// TranslationBase.of(context).addCustomAmount, TranslationBase.of(context).addCustomAmount,
// style: TextStyle( style: TextStyle(
// fontSize: 14, fontSize: 14,
// height: 21 / 14, height: 21 / 14,
// fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
// color: Color(0xff2B353E), color: Color(0xff2B353E),
// letterSpacing: -0.56, letterSpacing: -0.56,
// ), ),
// ), ),
SizedBox(height: 12),
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: Column(
mainAxisSize: MainAxisSize.min,
children: [
Row(
children: [
Expanded(
flex: 3,
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).amount,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
letterSpacing: -0.44,
),
),
TextField(
controller: _h20AmountController,
keyboardType: TextInputType.number,
onChanged: (value) {
double _value = 0;
if (value.length > 0) _value = double.parse(value);
if (value.length > 0) {
if (canShowAddButton) {
return;
}
canShowAddButton = true;
setState(() {});
} else {
canShowAddButton = false;
setState(() {});
}
},
inputFormatters: [
FilteringTextInputFormatter.allow(RegExp(r'[0-9]')),
],
style: TextStyle(
color: Color(0xff575757),
letterSpacing: -0.56,
),
decoration: InputDecoration(
isDense: true,
hintText: "0",
hintStyle: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff575757),
letterSpacing: -0.56,
),
contentPadding: EdgeInsets.zero,
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
),
),
],
),
),
if (canShowAddButton)
Expanded(
flex: 1,
child: DefaultButton(
TranslationBase.of(context).add,
() async {
await showConfirmMessage(context, int.parse(_h20AmountController.text), model);
_h20AmountController.text = "";
canShowAddButton = false;
SystemChannels.textInput.invokeMethod('TextInput.hide');
setState(() {});
},
),
),
],
),
],
),
),
], ],
), ),
), ),
// floatingActionButton: H20FloatingActionButton(
// // controller: _controller,
// model: model,
// ),
), ),
); );
} }
@ -252,12 +357,19 @@ class TodayPage extends StatelessWidget {
); );
} }
void showConfirmMessage(context, int amount, H2OViewModel model) { Future showConfirmMessage(context, int amount, H2OViewModel model) async {
showDialog( String title = "${TranslationBase.of(context).areyousure} $amount ${(isUnitML ? TranslationBase.of(context).ml : TranslationBase.of(context).l).toLowerCase()} ?";
await showDialog(
context: context, context: context,
child: ConfirmAddAmountDialog( child: ConfirmWithMessageDialog(
model: model, message: title,
amount: amount, onTap: () async {
GifLoaderDialogUtils.showMyDialog(context);
InsertUserActivityRequestModel insertUserActivityRequestModel = InsertUserActivityRequestModel(quantityIntake: amount);
await model.insertUserActivity(insertUserActivityRequestModel);
GifLoaderDialogUtils.hideDialog(context);
FocusManager.instance.primaryFocus.unfocus();
},
), ),
); );
} }

@ -164,11 +164,11 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
getDoctorsList(context); getDoctorsList(context);
} }
Future navigateToSearchResults( navigateToSearchResults(
context, context,
List<DoctorList> docList, List<DoctorList> docList,
List<PatientDoctorAppointmentList> List<PatientDoctorAppointmentList>
patientDoctorAppointmentListHospital) async { patientDoctorAppointmentListHospital) {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(

@ -1,7 +1,4 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -49,40 +46,7 @@ class _LiveChatPageState extends State<LiveChatPage> with SingleTickerProviderSt
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGrey2Color, backgroundColor: CustomColors.appBackgroudGrey2Color,
body: Column( body: HospitalsLiveChatPage(),
children: <Widget>[
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(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
unselectedLabelStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
tabs: [Text(TranslationBase.of(context).hospitals), Text(TranslationBase.of(context).pharmacies)],
),
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
HospitalsLiveChatPage(), //SendFeedbackPage(),
PharmaciesLiveChatPage()
//StatusFeedbackPage()
],
),
)
],
),
); );
} }
} }

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/model/family-file/insert_share_file_re
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -12,7 +13,6 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart'; import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart';
@ -41,6 +41,7 @@ class _AddMember extends State<AddMember> {
var familyFileProvider = FamilyFilesProvider(); var familyFileProvider = FamilyFilesProvider();
var patientShareRequestID; var patientShareRequestID;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -101,7 +102,7 @@ class _AddMember extends State<AddMember> {
child: DefaultButton( child: DefaultButton(
TranslationBase.of(context).add, TranslationBase.of(context).add,
() => {this.addMember()}, () => {this.addMember()},
color: isButtonDisabled == true ? Colors.grey : Colors.red[600], color: isButtonDisabled == true ? Colors.grey : CustomColors.accentColor,
textColor: Colors.white, textColor: Colors.white,
)) ))
], ],
@ -139,7 +140,7 @@ class _AddMember extends State<AddMember> {
request.isRegister = false; request.isRegister = false;
request.patientStatus = 2; request.patientStatus = 2;
loading(true); loading(true);
familyFileProvider.addFamilyFile(request).then((value) => manageFamily(value)).catchError(() { familyFileProvider.addFamilyFile(request).then((value) => manageFamily(value)).catchError((err) {
loading(false); loading(false);
}); });
} }
@ -183,6 +184,7 @@ class _AddMember extends State<AddMember> {
} }
var tempType; var tempType;
startSMSService(type, result) { startSMSService(type, result) {
tempType = type; tempType = type;
loading(false); loading(false);

@ -520,7 +520,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
// Utils.showProgressDialog(context); // Utils.showProgressDialog(context);
this.familyFileProvider.silentLoggin(user is AuthenticatedUser ? null : user, mainUser: user is AuthenticatedUser).then((value) => loginAfter(value, context)).catchError((err) { this.familyFileProvider.silentLoggin(user is AuthenticatedUser ? null : user, mainUser: user is AuthenticatedUser).then((value) => loginAfter(value, context)).catchError((err) {
print(err); print(err);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err.toString());
Navigator.of(context).pop(); Navigator.of(context).pop();
}); });
} }

@ -2,12 +2,13 @@ import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/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/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart'; import 'AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart';
import 'OrderLogPage.dart'; import 'OrderLogPage.dart';
@ -17,8 +18,7 @@ class AmbulanceReq extends StatefulWidget {
_AmbulanceReqState createState() => _AmbulanceReqState(); _AmbulanceReqState createState() => _AmbulanceReqState();
} }
class _AmbulanceReqState extends State<AmbulanceReq> class _AmbulanceReqState extends State<AmbulanceReq> with SingleTickerProviderStateMixin {
with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
List<ImagesInfo> imagesInfo = List(); List<ImagesInfo> imagesInfo = List();
@ -36,101 +36,61 @@ class _AmbulanceReqState extends State<AmbulanceReq>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo( ProjectViewModel projectViewModel = Provider.of(context);
imageEn: imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/Ambulance/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/Ambulance/ar/0.png'));
'https://hmgwebservices.com/Images/MobileApp/Ambulance/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/Ambulance/ar/0.png'));
return BaseView<AmRequestViewModel>( return BaseView<AmRequestViewModel>(
onModelReady: (model) => model.getAmRequestOrders(), onModelReady: (model) => model.getAmRequestOrders(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
showNewAppBarTitle: true,
showNewAppBar: true,
appBarTitle: TranslationBase.of(context).transportationService, appBarTitle: TranslationBase.of(context).transportationService,
description: TranslationBase.of(context).infoAmbulance, description: TranslationBase.of(context).infoAmbulance,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
baseViewModel: model, baseViewModel: model,
body: Scaffold( body: Column(
extendBodyBehindAppBar: true, children: [
appBar: PreferredSize( TabBar(
preferredSize: Size.fromHeight(65.0), isScrollable: false,
child: Stack( controller: _tabController,
children: <Widget>[ indicatorWeight: 3.0,
Positioned( indicatorSize: TabBarIndicatorSize.tab,
bottom: 1, labelColor: Color(0xff2B353E),
left: 0, unselectedLabelColor: Color(0xff575757),
right: 0, labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
child: BackdropFilter( labelStyle: TextStyle(
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
child: Container( fontSize: 15,
color: Theme.of(context) fontWeight: FontWeight.w600,
.scaffoldBackgroundColor letterSpacing: -0.48,
.withOpacity(0.8), ),
height: 70.0, unselectedLabelStyle: TextStyle(
), fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
), fontSize: 15,
), fontWeight: FontWeight.w600,
Center( letterSpacing: -0.48,
child: Container( ),
height: 60.0, tabs: [
margin: EdgeInsets.only(top: 10.0), Text(TranslationBase.of(context).transportationService),
width: MediaQuery.of(context).size.width * 0.90, Text(TranslationBase.of(context).ordersLog),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context).dividerColor,
width: 0.7),
),
color: Colors.white),
child: Center(
child: TabBar(
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label,
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.40,
child: Center(
child: Texts(TranslationBase.of(context).transportationService),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: Texts(TranslationBase.of(context).ordersLog),
),
),
],
),
),
),
),
], ],
), ),
), Expanded(
body: Column( child: TabBarView(
children: <Widget>[ physics: BouncingScrollPhysics(),
Expanded( controller: _tabController,
child: TabBarView( children: <Widget>[
physics: BouncingScrollPhysics(), AmbulanceRequestIndexPage(
controller: _tabController, amRequestViewModel: model,
children: <Widget>[ ),
AmbulanceRequestIndexPage( OrderLogPage(
amRequestViewModel: model, amRequestViewModel: model,
), )
OrderLogPage( ],
amRequestViewModel: model, ),
) )
], ],
),
)
],
),
), ),
), ),
); );

@ -56,7 +56,7 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
child: Column( child: Column(
children: [ children: [
SizedBox( SizedBox(
height: 80, height: 10,
), ),
Container( Container(
margin: EdgeInsets.only(left: 18, right: 18), margin: EdgeInsets.only(left: 18, right: 18),

@ -4,7 +4,7 @@ import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart'; import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -174,7 +174,7 @@ class _BillAmountState extends State<BillAmount> {
), ),
Texts( Texts(
TranslationBase.of(context).selectAmbulate, TranslationBase.of(context).selectAmbulate,
bold: true, bold: false,
), ),
SizedBox( SizedBox(
height: 5, height: 5,
@ -196,7 +196,9 @@ class _BillAmountState extends State<BillAmount> {
color: Colors.white, color: Colors.white,
), ),
child: ListTile( child: ListTile(
title: Text(TranslationBase.of(context).wheelchair), title: Text(TranslationBase.of(context).wheelchair, style: TextStyle(
fontSize: 14.0
)),
leading: Radio( leading: Radio(
value: Ambulate.Wheelchair, value: Ambulate.Wheelchair,
groupValue: _ambulate, groupValue: _ambulate,
@ -225,7 +227,9 @@ class _BillAmountState extends State<BillAmount> {
color: Colors.white, color: Colors.white,
), ),
child: ListTile( child: ListTile(
title: Text(TranslationBase.of(context).walker), title: Text(TranslationBase.of(context).walker, style: TextStyle(
fontSize: 14.0
)),
leading: Radio( leading: Radio(
value: Ambulate.Walker, value: Ambulate.Walker,
groupValue: _ambulate, groupValue: _ambulate,
@ -261,7 +265,9 @@ class _BillAmountState extends State<BillAmount> {
color: Colors.white, color: Colors.white,
), ),
child: ListTile( child: ListTile(
title: Text(TranslationBase.of(context).stretcher), title: Text(TranslationBase.of(context).stretcher, style: TextStyle(
fontSize: 14.0
)),
leading: Radio( leading: Radio(
value: Ambulate.Stretcher, value: Ambulate.Stretcher,
groupValue: _ambulate, groupValue: _ambulate,
@ -290,7 +296,9 @@ class _BillAmountState extends State<BillAmount> {
color: Colors.white, color: Colors.white,
), ),
child: ListTile( child: ListTile(
title: Text(TranslationBase.of(context).none), title: Text(TranslationBase.of(context).none, style: TextStyle(
fontSize: 14.0
)),
leading: Radio( leading: Radio(
value: Ambulate.None, value: Ambulate.None,
groupValue: _ambulate, groupValue: _ambulate,
@ -326,21 +334,20 @@ class _BillAmountState extends State<BillAmount> {
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
padding: EdgeInsets.all(15), color: Theme.of(context).scaffoldBackgroundColor,
width: double.maxFinite, padding: EdgeInsets.all(12.0),
height: 90, child: DefaultButton(
child: SecondaryButton( TranslationBase.of(context).next,
color: Colors.grey[800], () {
textColor: Colors.white,
onTap: () {
setState(() { setState(() {
widget.patientER_RC.transportationDetails.ambulate = _ambulate.selectAmbulateNumber(); widget.patientER_RC.transportationDetails.ambulate = _ambulate.selectAmbulateNumber();
widget.patientER_RC.transportationDetails.ambulateTitle = _ambulate.getAmbulateTitle(context);
widget.patientER_RC.transportationDetails.notes = note; widget.patientER_RC.transportationDetails.notes = note;
// widget.patientER.selectedAmbulate = _ambulate.selectAmbulateNumber(); // widget.patientER.selectedAmbulate = _ambulate.selectAmbulateNumber();
widget.changeCurrentTab(3); widget.changeCurrentTab(3);
}); });
}, },
label: TranslationBase.of(context).next, // label: TranslationBase.of(context).next,
), ),
), ),
); );

@ -11,7 +11,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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';
import 'package:diplomaticquarterapp/widgets/pickupLocation/PickupLocationFromMap.dart'; import 'package:diplomaticquarterapp/widgets/pickupLocation/PickupLocationFromMap.dart';
@ -264,7 +264,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Texts(getHospitalName(TranslationBase.of(context).pickupLocation)), Texts(getHospitalName(TranslationBase.of(context).selectHospital)),
Icon( Icon(
Icons.arrow_drop_down, Icons.arrow_drop_down,
size: 24, size: 24,
@ -368,13 +368,13 @@ class _PickupLocationState extends State<PickupLocation> {
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
padding: EdgeInsets.all(15), color: Theme.of(context).scaffoldBackgroundColor,
width: double.maxFinite, padding: EdgeInsets.all(12.0),
height: 90, child: DefaultButton(
child: SecondaryButton( // color: Colors.grey[800],
color: Colors.grey[800], // textColor: Colors.white,
textColor: Colors.white, TranslationBase.of(context).next,
onTap: () { () {
if (_result == null || _selectedHospital == null) if (_result == null || _selectedHospital == null)
AppToast.showErrorToast(message: TranslationBase.of(context).selectAll); AppToast.showErrorToast(message: TranslationBase.of(context).selectAll);
else else
@ -432,7 +432,7 @@ class _PickupLocationState extends State<PickupLocation> {
widget.changeCurrentTab(2); widget.changeCurrentTab(2);
}); });
}, },
label: TranslationBase.of(context).next, // label: TranslationBase.of(context).next,
), ),
), ),
); );

@ -5,7 +5,7 @@ import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -53,7 +53,6 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
} else { } else {
if (widget.amRequestViewModel.amRequestModeList.length != 0) _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[widget.amRequestViewModel.amRequestModeList.length - 1]; if (widget.amRequestViewModel.amRequestModeList.length != 0) _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[widget.amRequestViewModel.amRequestModeList.length - 1];
} }
} }
@override @override
@ -280,13 +279,11 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
padding: EdgeInsets.all(15), color: Theme.of(context).scaffoldBackgroundColor,
width: double.maxFinite, padding: EdgeInsets.all(12.0),
height: 90, child: DefaultButton(
child: SecondaryButton( TranslationBase.of(context).next,
color: Colors.grey[800], () {
textColor: Colors.white,
onTap: () {
setState(() { setState(() {
// widget.patientER.transportationMethodId = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1); // widget.patientER.transportationMethodId = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
// widget.patientER.direction = _direction == Direction.ToHospital ? 1 : 0; // widget.patientER.direction = _direction == Direction.ToHospital ? 1 : 0;
@ -314,10 +311,8 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
// widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0; // widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0;
// widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble(); // widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble();
widget.changeCurrentTab(1); widget.changeCurrentTab(1);
}); });
}, },
label: TranslationBase.of(context).next,
), ),
), ),
); );

@ -1,12 +1,14 @@
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class Summary extends StatefulWidget { class Summary extends StatefulWidget {
final Function changeCurrentTab; final Function changeCurrentTab;
@ -23,6 +25,7 @@ class Summary extends StatefulWidget {
class _SummaryState extends State<Summary> { class _SummaryState extends State<Summary> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
isShowDecPage: false, isShowDecPage: false,
isShowAppBar: false, isShowAppBar: false,
@ -33,7 +36,9 @@ class _SummaryState extends State<Summary> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts(TranslationBase.of(context).RRTSummary), Texts(TranslationBase.of(context).RRTSummary),
SizedBox(height: 5,), SizedBox(
height: 5,
),
Container( Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
@ -48,10 +53,15 @@ class _SummaryState extends State<Summary> {
TranslationBase.of(context).transportMethod, TranslationBase.of(context).transportMethod,
color: Colors.grey, color: Colors.grey,
), ),
Texts( projectViewModel.isArabic
'${widget.patientER_RC.patientERTransportationMethod.text}', ? Texts(
bold: true, '${widget.patientER_RC.patientERTransportationMethod.textN}',
), bold: true,
)
: Texts(
'${widget.patientER_RC.patientERTransportationMethod.text}',
bold: true,
),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
@ -93,7 +103,7 @@ class _SummaryState extends State<Summary> {
color: Colors.grey, color: Colors.grey,
), ),
Texts( Texts(
'${widget.patientER_RC.transportationDetails.ambulate}', '${widget.patientER_RC.transportationDetails.ambulateTitle}',
bold: true, bold: true,
), ),
SizedBox( SizedBox(
@ -113,16 +123,20 @@ class _SummaryState extends State<Summary> {
], ],
), ),
), ),
SizedBox(height: 20,), SizedBox(
Texts(TranslationBase.of(context).billAmount,textAlign: TextAlign.start,), height: 20,
SizedBox(height: 5,), ),
Texts(
TranslationBase.of(context).billAmount,
textAlign: TextAlign.start,
),
SizedBox(
height: 5,
),
Container( Container(
height: 55, height: 55,
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
decoration: BoxDecoration( decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)),
color: Colors.white,
borderRadius: BorderRadius.circular(8)
),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [Texts(TranslationBase.of(context).patientShareTotal + ':'), Texts(TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.priceTotal}')], children: [Texts(TranslationBase.of(context).patientShareTotal + ':'), Texts(TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.priceTotal}')],
@ -134,16 +148,11 @@ class _SummaryState extends State<Summary> {
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
padding: EdgeInsets.all(15), color: Theme.of(context).scaffoldBackgroundColor,
width: double.maxFinite, padding: EdgeInsets.all(12.0),
height: 90, child: DefaultButton(TranslationBase.of(context).send, () async {
child:SecondaryButton( await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER_RC);
color: Colors.grey[800], }),
textColor: Colors.white,
label: TranslationBase.of(context).send,
onTap: () async {
await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER_RC);
}),
), ),
); );
} }

@ -56,135 +56,169 @@ class _SchedulePageState extends State<SchedulePage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<MedicalViewModel>( return BaseView<MedicalViewModel>(
onModelReady: (model) => model.getDoctorSchedule(doctorList), onModelReady: (model) => model.getDoctorSchedule(doctorList),
allowAny: true, allowAny: true,
builder: (_, model, widget) => BaseView<MedicalViewModel>( builder: (_, model, widget) => BaseView<MedicalViewModel>(
onModelReady: (model2) => model2.getFreeSlots(doctorList), onModelReady: (model2) => model2.getFreeSlots(doctorList),
allowAny: true, allowAny: true,
builder: (_, model2, widget2) { builder: (_, model2, widget2) {
if (model2.freeSlots.length > 0 && isPageChange == false && model2.state == ViewState.Idle) { if (model2.freeSlots.length > 0 && isPageChange == false && model2.state == ViewState.Idle) {
this.freeSlots = model2.freeSlots; this.freeSlots = model2.freeSlots;
this.doctorScheduleResponse = model.getDoctorScheduleList; this.doctorScheduleResponse = model.getDoctorScheduleList;
this.generateWeeksSchedules(); this.generateWeeksSchedules();
} else if (model2.freeSlots.length == 0 && model2.state == ViewState.Idle) { } else if (model2.freeSlots.length == 0 && model2.state == ViewState.Idle) {
AppToast.showErrorToast(message: TranslationBase.of(context).emptySchedule); AppToast.showErrorToast(message: TranslationBase.of(context).emptySchedule);
Navigator.pop(context); Navigator.pop(context);
} }
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).schedule, appBarTitle: TranslationBase.of(context).schedule,
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model2, backgroundColor: Color(0xffF7F7F7),
isShowDecPage: false, baseViewModel: model2,
body: SizedBox( isShowDecPage: false,
height: MediaQuery.of(context).size.height, body: Column(
child: Stack( children: [
children: [ SizedBox(height: 21),
Container( PageViewIndicator(
margin: EdgeInsets.only(top: 40), isActive: true,
child: PageView.builder( currentPage: this.currentPage,
controller: _pageController, length: weeks.length,
itemCount: weeks.length, ),
onPageChanged: (index) { Expanded(
setState(() { child: PageView.builder(
isPageChange = true; controller: _pageController,
this.currentPage = index.toDouble(); itemCount: weeks.length,
}); onPageChanged: (index) {
}, setState(() {
itemBuilder: (context, index) { isPageChange = true;
return Container( this.currentPage = index.toDouble();
child: ListView.builder( });
itemCount: weeks[index].length, },
itemBuilder: (context, index2) => InkWell( itemBuilder: (context, index) {
onTap: () { return ListView.separated(
openBookAppointment(weeks[index][index2]); itemCount: weeks[index].length,
}, padding: EdgeInsets.all(21),
child: Row( separatorBuilder: (context, index) => SizedBox(height: 12),
children: [ itemBuilder: (context, index2) {
Expanded( bool isToday = DateUtil.convertStringToDate(weeks[index][index2]['Date']).toString().substring(0, 10) == DateTime.now().toString().substring(0, 10);
flex: 1, Color toDayColor = isToday ? Color(0xff359846) : Colors.white;
child: Padding(
padding: projectViewModel.isArabic ? EdgeInsets.only(right: 20) : EdgeInsets.only(left: 20), return InkWell(
child: Row(children: [ onTap: () {
Column( openBookAppointment(weeks[index][index2]);
children: [
Texts(
weeks[index][index2]['DayName'],
fontSize: 13,
fontWeight: projectViewModel.isArabic ? FontWeight.w600 : FontWeight.w500,
),
Texts(
getDayMonths(
DateUtil.convertStringToDate(
weeks[index][index2]['Date'],
),
),
fontWeight: FontWeight.bold,
fontSize: 18,
)
],
)
])),
),
Expanded(
flex: 3,
child: ClipRRect(
borderRadius: const BorderRadius.all(Radius.circular(20.0)),
child: Container(
padding: EdgeInsets.only(left: 10, right: 10, top: 15, bottom: 20),
margin: EdgeInsets.only(left: 20, right: 20, top: 7, bottom: 7),
decoration: BoxDecoration(boxShadow: [
DateUtil.convertStringToDate(weeks[index][index2]['Date']).toString().substring(0, 10) == DateTime.now().toString().substring(0, 10)
? BoxShadow(color: Colors.green, offset: Offset(projectViewModel.isArabic ? 5 : -5, 0))
: BoxShadow(
color: Colors.grey[100],
blurRadius: 5,
spreadRadius: 4,
offset: Offset(0, 10),
),
], borderRadius: const BorderRadius.all(Radius.circular(10.0)), color: Colors.white),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
DateUtil.convertStringToDate(weeks[index][index2]['Date']).toString().substring(0, 10) == DateTime.now().toString().substring(0, 10)
? Texts(
TranslationBase.of(context).today,
color: Colors.green,
fontWeight: FontWeight.w600,
fontSize: 12,
marginTop: 0,
)
: SizedBox(),
Row(
children: [
Expanded(
child: Texts(
weeks[index][index2]['WorkingHours'],
fontWeight: FontWeight.w500,
),
),
Icon(projectViewModel.isArabic
? Icons
.arrow_back_ios_outlined
: Icons
.arrow_forward_outlined, size: 16.0),
],
)
]))),
),
],
)
)));
}, },
)), child: Row(
PageViewIndicator( crossAxisAlignment: CrossAxisAlignment.start,
isActive: true, children: [
currentPage: this.currentPage, Expanded(
length: weeks.length, flex: 1,
) child: Column(
], mainAxisSize: MainAxisSize.min,
))); crossAxisAlignment: CrossAxisAlignment.start,
})); children: [
Text(
weeks[index][index2]['DayName'],
style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
letterSpacing: -0.52,
),
),
Text(
getDayMonths(DateUtil.convertStringToDate(weeks[index][index2]['Date'])),
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w700,
color: Color(0xff2E303A),
letterSpacing: -0.72,
),
),
],
),
),
Expanded(
flex: 3,
child: Container(
decoration: BoxDecoration(
color: toDayColor,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
blurRadius: 27,
offset: Offset(0, -3),
),
],
),
child: Container(
margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0),
padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12),
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.white, width: 1),
borderRadius: BorderRadius.only(
bottomRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0),
topRight: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(10.0),
bottomLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0),
topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0),
),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
if (isToday)
Text(
TranslationBase.of(context).today,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: toDayColor,
letterSpacing: -0.48,
),
),
Row(
children: [
Expanded(
child: Text(
weeks[index][index2]['WorkingHours'],
style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
letterSpacing: -0.56,
),
),
),
],
)
]),
),
Icon(Icons.arrow_forward, color: Color(0xff2B353E)),
],
),
),
),
),
],
),
);
});
},
),
),
],
),
);
}),
);
} }
generateWeeksSchedules() { generateWeeksSchedules() {

@ -37,11 +37,11 @@ class PageViewIndicator extends StatelessWidget {
Widget circleBar(bool isActive) { Widget circleBar(bool isActive) {
return AnimatedContainer( return AnimatedContainer(
duration: Duration(milliseconds: 150), duration: Duration(milliseconds: 150),
margin: EdgeInsets.symmetric(horizontal: 3), margin: EdgeInsets.symmetric(horizontal: 4),
height: isActive ? 12 : 8, height: isActive ? 12 : 12,
width: isActive ? 12 : 8, width: isActive ? 12 : 12,
decoration: BoxDecoration( decoration: BoxDecoration(
color: isActive ? Colors.red : Colors.grey, color: isActive ? Color(0xffD02127) : Color(0xffD0D0D0),
borderRadius: BorderRadius.all(Radius.circular(12))), borderRadius: BorderRadius.all(Radius.circular(12))),
); );
} }

@ -81,7 +81,7 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
color: Color(0xff2B353E), color: Color(0xff2B353E),
letterSpacing: -0.48)), letterSpacing: -0.48)),
Text(model.cOCItemList[index].date.split(" ")[1], Text(model.cOCItemList[index].date.split(" ")[1].substring(0, 4),
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,

@ -47,18 +47,15 @@ class _InsuranceCardState extends State<InsuranceCard> {
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGreyColor, backgroundColor: CustomColors.appBackgroudGreyColor,
floatingActionButton: FloatingActionButton( floatingActionButton: FloatingActionButton.extended(
onPressed: () { onPressed: () {
Navigator.push(context, FadePage(page: InsuranceUpdate())); Navigator.push(context, FadePage(page: InsuranceUpdate()));
}, },
backgroundColor: CustomColors.accentColor, backgroundColor: CustomColors.accentColor,
child: Padding( label: Text(TranslationBase.of(context).update, style: TextStyle(
padding: const EdgeInsets.all(12.0), fontSize: 12.0,
child: Image.asset( fontWeight: FontWeight.bold
'assets/images/medical/insurance_update_icon_.png', )),
color: Colors.white,
),
),
), ),
body: Container( body: Container(
child: ListView.separated( child: ListView.separated(

@ -541,7 +541,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
pageController.jumpToPage(0); pageController.jumpToPage(0);
}, },
), ),
projectViewModel.isLogin && model.notificationsCount != null projectViewModel.isLogin && model.notificationsCount != null && !projectViewModel.isLoginChild
? new Positioned( ? new Positioned(
right: projectViewModel.isArabic ? 35 : 0, right: projectViewModel.isArabic ? 35 : 0,
top: 5, top: 5,

@ -17,42 +17,74 @@ import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'dialogs/ConfirmSMSDialog.dart';
import 'new_text_Field.dart'; import 'new_text_Field.dart';
class ConfirmPaymentPage extends StatelessWidget { class ConfirmPaymentPage extends StatefulWidget {
final AdvanceModel advanceModel; final AdvanceModel advanceModel;
final PatientInfoAndMobileNumber patientInfoAndMobileNumber; final PatientInfoAndMobileNumber patientInfoAndMobileNumber;
final String selectedPaymentMethod; final String selectedPaymentMethod;
MyInAppBrowser browser;
AuthenticatedUser authenticatedUser; AuthenticatedUser authenticatedUser;
ConfirmPaymentPage({this.advanceModel, this.patientInfoAndMobileNumber, this.selectedPaymentMethod, this.authenticatedUser});
@override
_ConfirmPaymentPageState createState() => _ConfirmPaymentPageState();
}
class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
MyInAppBrowser browser;
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
String transID = ""; String transID = "";
ConfirmPaymentPage({this.advanceModel, this.patientInfoAndMobileNumber, this.selectedPaymentMethod, this.authenticatedUser}); void submit(MyBalanceViewModel model, code) {
final activationCode = code;
GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
model.checkActivationCodeForAdvancePayment(activationCode: activationCode).then((value) {
GifLoaderDialogUtils.hideDialog(AppGlobal.context);
Navigator.pop(context, true);
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.projectID = widget.patientInfoAndMobileNumber.projectID;
openPayment(widget.selectedPaymentMethod, widget.authenticatedUser, double.parse(widget.advanceModel.amount), null);
});
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
void showSMSDialog() { void showSMSDialog(MyBalanceViewModel model) {
showDialog( new SMSOTP(
context: context, context,
barrierDismissible: false, 1,
child: ConfirmSMSDialog( widget.patientInfoAndMobileNumber.mobileNumber,
phoneNumber: patientInfoAndMobileNumber.mobileNumber, (value) {
), submit(model, value);
).then((value) { },
print("dialog dismissed"); () => {
print(value); Navigator.pop(context),
if (value != null && value) { },
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); ).displayDialog(context);
appo.projectID = patientInfoAndMobileNumber.projectID;
openPayment(selectedPaymentMethod, authenticatedUser, double.parse(advanceModel.amount), null); // showDialog(
} // context: context,
}); // barrierDismissible: false,
// child: ConfirmSMSDialog(
// phoneNumber: patientInfoAndMobileNumber.mobileNumber,
// ),
// ).then((value) {
// print("dialog dismissed");
// print(value);
// if (value != null && value) {
// AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
// appo.projectID = patientInfoAndMobileNumber.projectID;
// openPayment(selectedPaymentMethod, authenticatedUser, double.parse(advanceModel.amount), null);
// }
// });
} }
return BaseView<MyBalanceViewModel>( return BaseView<MyBalanceViewModel>(
@ -88,10 +120,10 @@ class ConfirmPaymentPage extends StatelessWidget {
height: 100.0, height: 100.0,
padding: EdgeInsets.all(7.0), padding: EdgeInsets.all(7.0),
width: MediaQuery.of(context).size.width * 0.45, width: MediaQuery.of(context).size.width * 0.45,
child: selectedPaymentMethod == "ApplePay" ? SvgPicture.asset(getImagePath(selectedPaymentMethod)) : Image.asset(getImagePath(selectedPaymentMethod)), child: widget.selectedPaymentMethod == "ApplePay" ? SvgPicture.asset(getImagePath(widget.selectedPaymentMethod)) : Image.asset(getImagePath(widget.selectedPaymentMethod)),
), ),
Text( Text(
'${advanceModel.amount} SAR', '${widget.advanceModel.amount} SAR',
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.w900, fontWeight: FontWeight.w900,
@ -110,7 +142,7 @@ class ConfirmPaymentPage extends StatelessWidget {
margin: EdgeInsets.all(3), margin: EdgeInsets.all(3),
child: NewTextFields( child: NewTextFields(
hintText: TranslationBase.of(context).fileNumber, hintText: TranslationBase.of(context).fileNumber,
initialValue: advanceModel.fileNumber, initialValue: widget.advanceModel.fileNumber,
isEnabled: false, isEnabled: false,
), ),
), ),
@ -120,7 +152,7 @@ class ConfirmPaymentPage extends StatelessWidget {
margin: EdgeInsets.all(3), margin: EdgeInsets.all(3),
child: NewTextFields( child: NewTextFields(
hintText: TranslationBase.of(context).name, hintText: TranslationBase.of(context).name,
initialValue: patientInfoAndMobileNumber.firstName, initialValue: widget.patientInfoAndMobileNumber.firstName,
isEnabled: false, isEnabled: false,
), ),
), ),
@ -132,7 +164,7 @@ class ConfirmPaymentPage extends StatelessWidget {
), ),
NewTextFields( NewTextFields(
hintText: TranslationBase.of(context).mobileNumber, hintText: TranslationBase.of(context).mobileNumber,
initialValue: patientInfoAndMobileNumber.mobileNumber, initialValue: widget.patientInfoAndMobileNumber.mobileNumber,
isEnabled: false, isEnabled: false,
), ),
SizedBox( SizedBox(
@ -148,7 +180,7 @@ class ConfirmPaymentPage extends StatelessWidget {
), ),
NewTextFields( NewTextFields(
hintText: TranslationBase.of(context).notes, hintText: TranslationBase.of(context).notes,
initialValue: advanceModel.note, initialValue: widget.advanceModel.note,
isEnabled: false, isEnabled: false,
), ),
], ],
@ -168,9 +200,9 @@ class ConfirmPaymentPage extends StatelessWidget {
disabled: model.state == ViewState.Busy, disabled: model.state == ViewState.Busy,
onTap: () { onTap: () {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
model.sendActivationCodeForAdvancePayment(patientID: int.parse(advanceModel.fileNumber), projectID: advanceModel.hospitalsModel.iD).then((value) { model.sendActivationCodeForAdvancePayment(patientID: int.parse(widget.advanceModel.fileNumber), projectID: widget.advanceModel.hospitalsModel.iD).then((value) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (model.state != ViewState.ErrorLocal && model.state != ViewState.Error) showSMSDialog(); if (model.state != ViewState.ErrorLocal && model.state != ViewState.Error) showSMSDialog(model);
}); });
}, },
), ),
@ -208,10 +240,10 @@ class ConfirmPaymentPage extends StatelessWidget {
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) { openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart); browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
transID = Utils.getAdvancePaymentTransID(advanceModel.hospitalsModel.iD, int.parse(advanceModel.fileNumber)); transID = Utils.getAdvancePaymentTransID(widget.advanceModel.hospitalsModel.iD, int.parse(widget.advanceModel.fileNumber));
browser.openPaymentBrowser(amount, "Advance Payment", transID, advanceModel.hospitalsModel.iD.toString(), advanceModel.email, paymentMethod, patientInfoAndMobileNumber.patientType, browser.openPaymentBrowser(amount, "Advance Payment", transID, widget.advanceModel.hospitalsModel.iD.toString(), widget.advanceModel.email, paymentMethod,
advanceModel.patientName, advanceModel.fileNumber, authenticatedUser, browser, false, "3", ""); widget.patientInfoAndMobileNumber.patientType, widget.advanceModel.patientName, widget.advanceModel.fileNumber, authenticatedUser, browser, false, "3", "");
} }
onBrowserLoadStart(String url) { onBrowserLoadStart(String url) {
@ -263,8 +295,8 @@ class ConfirmPaymentPage extends StatelessWidget {
createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { createAdvancePayment(res, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
String paymentReference = res['Fort_id'].toString(); String paymentReference = res['Fort_id'].toString();
service.HIS_createAdvancePayment(appo, advanceModel.hospitalsModel.iD.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], patientInfoAndMobileNumber.patientType, service.HIS_createAdvancePayment(appo, widget.advanceModel.hospitalsModel.iD.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], widget.patientInfoAndMobileNumber.patientType,
advanceModel.patientName, advanceModel.fileNumber, AppGlobal.context) widget.advanceModel.patientName, widget.advanceModel.fileNumber, AppGlobal.context)
.then((res) { .then((res) {
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']); print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);
addAdvancedNumberRequest(res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), paymentReference, 0, appo); addAdvancedNumberRequest(res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), paymentReference, 0, appo);

@ -77,7 +77,7 @@ class PrescriptionOrderOverview extends StatelessWidget {
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Center( child: Center(
child: Texts(prescriptionReportList[index].itemDescription.isNotEmpty child: Text(prescriptionReportList[index].itemDescription.isNotEmpty
? prescriptionReportList[index].itemDescription ? prescriptionReportList[index].itemDescription
: prescriptionReportList[index].itemDescriptionN)), : prescriptionReportList[index].itemDescriptionN)),
)), )),
@ -130,7 +130,7 @@ class PrescriptionOrderOverview extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts(prescriptionReportEnhList[index].itemDescription), Text(prescriptionReportEnhList[index].itemDescription),
], ],
), ),
), ),

@ -4,7 +4,7 @@ import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_h
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -21,128 +21,130 @@ class PrescriptionsHistoryPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return BaseView<PrescriptionsViewModel>(
baseViewModel: prescriptionsViewModel, onModelReady: (model) => model.getPrescriptionsOrders(showLoading: true),
body: ListView.separated( builder: (_, model, widget) => AppScaffold(
physics: BouncingScrollPhysics(), baseViewModel: prescriptionsViewModel,
padding: EdgeInsets.all(21), body: ListView.separated(
separatorBuilder: (context, index) { physics: BouncingScrollPhysics(),
return SizedBox(height: 12); padding: EdgeInsets.all(21),
}, separatorBuilder: (context, index) {
itemBuilder: (context, index) { return SizedBox(height: 12);
int status = prescriptionsViewModel.prescriptionsHistory[index].status; },
String _statusDisp = projectViewModel.isArabic ? prescriptionsViewModel.prescriptionsHistory[index].descriptionN : prescriptionsViewModel.prescriptionsHistory[index].description; itemBuilder: (context, index) {
Color _color; int status = prescriptionsViewModel.prescriptionsHistory[index].status;
if (status == 1) { String _statusDisp = projectViewModel.isArabic ? prescriptionsViewModel.prescriptionsHistory[index].descriptionN : prescriptionsViewModel.prescriptionsHistory[index].description;
//pending Color _color;
_color = Color(0xffCC9B14); if (status == 1) {
} else if (status == 2) { //pending
//processing _color = Color(0xffCC9B14);
_color = Color(0xff2E303A); } else if (status == 2) {
} else if (status == 3) { //processing
//completed _color = Color(0xff2E303A);
_color = Color(0xff359846); } else if (status == 3) {
} else if (status == 4) { //completed
//cancel // Rejected _color = Color(0xff359846);
_color = Color(0xffD02127); } else if (status == 4) {
} //cancel // Rejected
_color = Color(0xffD02127);
}
return InkWell( return InkWell(
onTap: () async { onTap: () async {
final result = await Navigator.push( final result = await Navigator.push(
context, context,
FadePage( FadePage(
page: PrescriptionsHistoryDetailsPage( page: PrescriptionsHistoryDetailsPage(
prescriptionsOrder: prescriptionsViewModel.prescriptionsHistory[index], prescriptionsOrder: prescriptionsViewModel.prescriptionsHistory[index],
), ),
), ),
); );
if (result != null) { if (result != null) {
showOrderLog(); showOrderLog();
} }
}, },
child: Container( child: Container(
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(10.0), Radius.circular(10.0),
), ),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Color(0xff000000).withOpacity(.05), color: Color(0xff000000).withOpacity(.05),
blurRadius: 27, blurRadius: 27,
offset: Offset(0, -3), 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( child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Expanded( Container(
child: Column( width: 6,
mainAxisSize: MainAxisSize.min, decoration: BoxDecoration(
crossAxisAlignment: CrossAxisAlignment.start, color: _color,
children: [ borderRadius: BorderRadius.only(
Text( topLeft: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0),
_statusDisp, bottomLeft: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: _color, letterSpacing: -0.4, height: 16 / 10), topRight: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0),
), bottomRight: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0),
Text( ),
'${TranslationBase.of(context).orderNo}. ${prescriptionsViewModel.prescriptionsHistory[index].iD}',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
],
), ),
), ),
Column( Expanded(
mainAxisSize: MainAxisSize.min, child: Padding(
crossAxisAlignment: CrossAxisAlignment.end, padding: EdgeInsets.only(left: projectViewModel.isArabic ? 6 : 12, right: projectViewModel.isArabic ? 12 : 6),
children: [ child: Row(
Text( crossAxisAlignment: CrossAxisAlignment.start,
DateUtil.getDayMonthYearDateFormatted(prescriptionsViewModel.prescriptionsHistory[index].createdOn), mainAxisSize: MainAxisSize.min,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10), children: [
), Expanded(
Text( child: Column(
DateUtil.formatDateToTimeLang(prescriptionsViewModel.prescriptionsHistory[index].createdOn, false), mainAxisSize: MainAxisSize.min,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10), 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}. ${prescriptionsViewModel.prescriptionsHistory[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.getDayMonthYearDateFormatted(prescriptionsViewModel.prescriptionsHistory[index].createdOn),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10),
),
Text(
DateUtil.formatDateToTimeLang(prescriptionsViewModel.prescriptionsHistory[index].createdOn, false),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
],
)
],
), ),
], ),
) ),
Icon(
Icons.arrow_forward,
size: 16,
),
mWidth(6),
], ],
), ),
), ));
), },
Icon( itemCount: prescriptionsViewModel.prescriptionsHistory.length,
Icons.arrow_forward, ),
size: 16, ));
),
mWidth(6),
],
),
));
},
itemCount: prescriptionsViewModel.prescriptionsHistory.length,
),
);
} }
} }

@ -212,22 +212,43 @@ class Utils {
hasBadge: true, hasBadge: true,
isEnable: projectViewModel.havePrivilege(5)), isEnable: projectViewModel.havePrivilege(5)),
), ),
Positioned( projectViewModel.isArabic
right: 8, ? !projectViewModel.user.isFamily
top: 4, ? Positioned(
child: Badge( left: 8,
toAnimate: false, top: 4,
elevation: 0, child: Badge(
position: BadgePosition.topEnd(), toAnimate: false,
shape: BadgeShape.circle, elevation: 0,
badgeColor: secondaryColor.withOpacity(1.0), position: BadgePosition.topEnd(),
borderRadius: BorderRadius.circular(8), shape: BadgeShape.circle,
badgeContent: Container( badgeColor: secondaryColor.withOpacity(1.0),
padding: EdgeInsets.all(2.0), borderRadius: BorderRadius.circular(8),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontSize: 16.0)), badgeContent: Container(
), padding: EdgeInsets.all(2.0),
), child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
), ),
),
)
: Container()
: !projectViewModel.user.isFamily
? Positioned(
right: 8,
top: 4,
child: Badge(
toAnimate: false,
elevation: 0,
position: BadgePosition.topEnd(),
shape: BadgeShape.circle,
badgeColor: secondaryColor.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
: Container(),
]) ])
: MedicalProfileItem( : MedicalProfileItem(
title: TranslationBase.of(context).myAppointments, title: TranslationBase.of(context).myAppointments,
@ -509,38 +530,42 @@ class Utils {
hasBadge: true, hasBadge: true,
isEnable: projectViewModel.havePrivilege(5)), isEnable: projectViewModel.havePrivilege(5)),
projectViewModel.isArabic projectViewModel.isArabic
? Positioned( ? !projectViewModel.isLoginChild
left: 8, ? Positioned(
top: 4, left: 8,
child: Badge( top: 4,
toAnimate: false, child: Badge(
elevation: 0, toAnimate: false,
position: BadgePosition.topEnd(), elevation: 0,
shape: BadgeShape.circle, position: BadgePosition.topEnd(),
badgeColor: secondaryColor.withOpacity(1.0), shape: BadgeShape.circle,
borderRadius: BorderRadius.circular(8), badgeColor: secondaryColor.withOpacity(1.0),
badgeContent: Container( borderRadius: BorderRadius.circular(8),
padding: EdgeInsets.all(2.0), badgeContent: Container(
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)), padding: EdgeInsets.all(2.0),
), child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
), ),
) ),
: Positioned( )
right: 8, : Container()
top: 4, : !projectViewModel.isLoginChild
child: Badge( ? Positioned(
toAnimate: false, right: 8,
elevation: 0, top: 4,
position: BadgePosition.topEnd(), child: Badge(
shape: BadgeShape.circle, toAnimate: false,
badgeColor: secondaryColor.withOpacity(1.0), elevation: 0,
borderRadius: BorderRadius.circular(8), position: BadgePosition.topEnd(),
badgeContent: Container( shape: BadgeShape.circle,
padding: EdgeInsets.all(2.0), badgeColor: secondaryColor.withOpacity(1.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)), borderRadius: BorderRadius.circular(8),
), badgeContent: Container(
), padding: EdgeInsets.all(2.0),
), child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
: Container(),
]) ])
: MedicalProfileItem( : MedicalProfileItem(
title: TranslationBase.of(context).myAppointments, title: TranslationBase.of(context).myAppointments,

@ -1,5 +1,6 @@
import 'package:badges/badges.dart'; import 'package:badges/badges.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -25,6 +26,7 @@ class BottomNavigationItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var model = Provider.of<ToDoCountProviderModel>(context); var model = Provider.of<ToDoCountProviderModel>(context);
ProjectViewModel projectViewModel = Provider.of(context);
return Expanded( return Expanded(
child: SizedBox( child: SizedBox(
// height: 72.0, // height: 72.0,
@ -61,7 +63,7 @@ class BottomNavigationItem extends StatelessWidget {
), ),
], ],
) )
: (authenticatedUserObject.isLogin && model.isShowBadge) : (authenticatedUserObject.isLogin && model.isShowBadge && !projectViewModel.isLoginChild)
? Stack( ? Stack(
alignment: AlignmentDirectional.center, alignment: AlignmentDirectional.center,
children: [ children: [

@ -104,7 +104,7 @@ class ShowChart extends StatelessWidget {
touchCallback: (LineTouchResponse touchResponse) {}, touchCallback: (LineTouchResponse touchResponse) {},
handleBuiltInTouches: true, handleBuiltInTouches: true,
), ),
gridData: FlGridData(show: true, drawVerticalLine: true, drawHorizontalLine: true, horizontalInterval: horizontalInterval, verticalInterval: horizontalInterval), gridData: FlGridData(show: true, drawVerticalLine: true, drawHorizontalLine: true),
titlesData: FlTitlesData( titlesData: FlTitlesData(
bottomTitles: SideTitles( bottomTitles: SideTitles(
showTitles: true, showTitles: true,
@ -137,7 +137,7 @@ class ShowChart extends StatelessWidget {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 10, fontSize: 10,
), ),
interval: 3.0, // interval: 3.0,
margin: 12, margin: 12,
), ),
), ),

@ -1,101 +1,85 @@
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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';
class ConfirmWithMessageDialog extends StatelessWidget { class ConfirmWithMessageDialog extends StatelessWidget {
final String title;
final String message; final String message;
final String okTitle; final String okTitle;
final GestureTapCallback onTap; final VoidCallback onTap;
const ConfirmWithMessageDialog({Key key, this.message, this.okTitle, this.onTap}) : super(key: key); const ConfirmWithMessageDialog({Key key, this.title, @required this.message, this.okTitle, this.onTap}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SimpleDialog( return Dialog(
contentPadding: EdgeInsets.fromLTRB(12.0, 12.0, 12.0, 12.0), backgroundColor: Colors.white,
children: [ shape: RoundedRectangleBorder(),
Column( insetPadding: EdgeInsets.only(left: 21, right: 21),
child: Padding(
padding: EdgeInsets.only(left: 20, right: 20, top: 18, bottom: 28),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [ children: [
Text( Row(
TranslationBase.of(context).confirm, crossAxisAlignment: CrossAxisAlignment.start,
style: TextStyle( children: [
color: Colors.black, Expanded(
fontSize: 22, child: Padding(
letterSpacing: -0.94, padding: const EdgeInsets.only(top: 16.0),
fontWeight: FontWeight.bold, child: Text(
), title ?? TranslationBase.of(context).confirm,
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w600, color: Color(0xff2B353E), height: 35 / 24, letterSpacing: -0.96),
),
),
),
IconButton(
padding: EdgeInsets.zero,
icon: Icon(Icons.close),
color: Color(0xff2B353E),
constraints: BoxConstraints(),
onPressed: () {
Navigator.pop(context);
},
)
],
), ),
Text( Text(
message, message,
style: TextStyle( style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff808080), letterSpacing: -0.48),
fontSize: 14,
color: CustomColors.grey,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
), ),
mHeight(20), SizedBox(height: 28),
Container( Row(
child: Row( mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
children: [ Expanded(
Expanded( child: DefaultButton(
child: InkWell( TranslationBase.of(context).cancel_nocaps,
onTap: () { () => Navigator.pop(context),
Navigator.pop(context); textColor: Color(0xff2B353E),
}, color: Color(0xffEAEAEA),
child: Container(
decoration: containerRadius(CustomColors.darkGreyColor, 6),
padding: EdgeInsets.all(6),
child: Center(
child: Text(
TranslationBase.of(context).cancel,
style: TextStyle(
color: Colors.black,
fontSize: 16,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
),
),
),
), ),
mWidth(12), ),
Expanded( SizedBox(width: 10),
child: InkWell( Expanded(
onTap: () { child: DefaultButton(
Navigator.pop(context); okTitle ?? TranslationBase.of(context).ok,
onTap(); () {
}, Navigator.pop(context);
child: Container( onTap();
decoration: containerRadius(CustomColors.accentColor, 6), },
padding: EdgeInsets.all(6),
child: Center(
child: Text(
okTitle,
style: TextStyle(
color: Colors.white,
fontSize: 16,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
),
),
),
), ),
], ),
), ],
), ),
], ],
) ),
], ),
); );
} }
} }

@ -329,7 +329,7 @@ class _AppDrawerState extends State<AppDrawer> {
letterSpacing: -0.84, letterSpacing: -0.84,
fontSize: 14, fontSize: 14,
projectProvider: projectProvider, projectProvider: projectProvider,
count: toDoProvider.notificationsCount != 0 count: toDoProvider.notificationsCount != "0" && !projectProvider.isLoginChild
? new Container( ? new Container(
padding: EdgeInsets.all(4), padding: EdgeInsets.all(4),
margin: EdgeInsets.all(2), margin: EdgeInsets.all(2),
@ -358,7 +358,8 @@ class _AppDrawerState extends State<AppDrawer> {
onTap: () { onTap: () {
//NotificationsPage //NotificationsPage
// Navigator.of(context).pop(); // Navigator.of(context).pop();
Navigator.push(context, FadePage(page: NotificationsPage())); if(!projectProvider.user.isFamily)
Navigator.push(context, FadePage(page: NotificationsPage()));
}, },
), ),
if (projectProvider.havePrivilege(3)) if (projectProvider.havePrivilege(3))

Loading…
Cancel
Save