diff --git a/Runner 2021-01-01 21-59-41/DiplomaticQuarter.ipa b/Runner 2021-01-01 21-59-41/DiplomaticQuarter.ipa new file mode 100644 index 00000000..ca720a76 Binary files /dev/null and b/Runner 2021-01-01 21-59-41/DiplomaticQuarter.ipa differ diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index e779d88a..0dd5c750 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -114,6 +114,9 @@ class BaseAppClient { } } + // body['PatientID'] = 1018977; + // body['TokenID'] = "@dm!n"; + print("URL : $url"); final jsonBody = json.encode(body); print(jsonBody); diff --git a/lib/pages/DrawerPages/family/my-family.dart b/lib/pages/DrawerPages/family/my-family.dart index 857c680c..adcc6e1d 100644 --- a/lib/pages/DrawerPages/family/my-family.dart +++ b/lib/pages/DrawerPages/family/my-family.dart @@ -160,12 +160,12 @@ class _MyFamily extends State with TickerProviderStateMixin { else return ListView.separated( itemBuilder: (context, index) { - snapshot.data.getAllSharedRecordsByStatusList[index].gender = 2; + // snapshot.data.getAllSharedRecordsByStatusList[index].gender = 2; if (snapshot.data.getAllSharedRecordsByStatusList[index].status == 3) return Card( margin: EdgeInsets.all(5), shape: cardRadius(15), - color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0xffFDA4B0) : Color(0xff6EA8FF), + color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 2 ? Color(0xffFDA4B0) : Color(0xff6EA8FF), elevation: 0.0, child: Container( // height: 130,0xffFDA4B0 @@ -179,7 +179,7 @@ class _MyFamily extends State with TickerProviderStateMixin { children: [ Texts( snapshot.data.getAllSharedRecordsByStatusList[index].patientName.toLowerCase().capitalizeFirstofEach, - fontSize: 22, + fontSize: 18, fontWeight: FontWeight.bold, color: Colors.white, ), @@ -209,7 +209,7 @@ class _MyFamily extends State with TickerProviderStateMixin { mainAxisAlignment: MainAxisAlignment.center, children: [ SvgPicture.asset("assets/images/new-design/switch.svg", - height: 22, color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0Xff5A282E) : Colors.white), + height: 22, color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 2 ? Color(0Xff5A282E) : Colors.white), SizedBox( width: 5, ), @@ -223,7 +223,7 @@ class _MyFamily extends State with TickerProviderStateMixin { // }, // ), Texts(TranslationBase.of(context).switchUser, - color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0Xff5A282E) : Colors.white, + color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 2 ? Color(0Xff5A282E) : Colors.white, fontSize: 12, fontWeight: FontWeight.w600) ], @@ -242,12 +242,12 @@ class _MyFamily extends State with TickerProviderStateMixin { mainAxisAlignment: MainAxisAlignment.center, children: [ SvgPicture.asset("assets/images/new-design/delete.svg", - height: 22, color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0Xff5A282E) : Colors.white), + height: 22, color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 2 ? Color(0Xff5A282E) : Colors.white), SizedBox( width: 5, ), Texts(TranslationBase.of(context).delete, - color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 1 ? Color(0Xff5A282E) : Colors.white, + color: snapshot.data.getAllSharedRecordsByStatusList[index].gender == 2 ? Color(0Xff5A282E) : Colors.white, fontSize: 12, fontWeight: FontWeight.w600), ], diff --git a/lib/pages/DrawerPages/notifications/notifications_page.dart b/lib/pages/DrawerPages/notifications/notifications_page.dart index 5a859fca..7b699467 100644 --- a/lib/pages/DrawerPages/notifications/notifications_page.dart +++ b/lib/pages/DrawerPages/notifications/notifications_page.dart @@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notificatio import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.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'; @@ -15,25 +16,6 @@ import 'package:provider/provider.dart'; // ignore: must_be_immutable class NotificationsPage extends StatelessWidget { - getDateForm(String date) { - DateTime d = DateUtil.convertStringToDate(date); - String monthName = DateUtil.getMonth(d.month).toString(); - TimeOfDay timeOfDay = TimeOfDay(hour: d.hour, minute: d.minute); - String minute = timeOfDay.minute < 10 ? timeOfDay.minute.toString().padLeft(2, '0') : timeOfDay.minute.toString(); - - String hour = '${timeOfDay.hourOfPeriod}:$minute'; - if (timeOfDay.period == DayPeriod.am) { - hour = hour + "AM"; - } else { - { - hour = hour + "PM"; - } - } - - //DayPeriod.am - return monthName + ',${d.day},${d.year}, $hour'; - } - int currentIndex = 0; @override @@ -41,7 +23,11 @@ class NotificationsPage extends StatelessWidget { ProjectViewModel projectViewModel = Provider.of(context); return BaseView( onModelReady: (model) { - GetNotificationsRequestModel getNotificationsRequestModel = new GetNotificationsRequestModel(currentPage: currentIndex, pagingSize: 14, notificationStatusID: 2); + GetNotificationsRequestModel getNotificationsRequestModel = + new GetNotificationsRequestModel( + currentPage: currentIndex, + pagingSize: 14, + notificationStatusID: 2); model.getNotifications(getNotificationsRequestModel, context); }, @@ -53,6 +39,28 @@ class NotificationsPage extends StatelessWidget { baseViewModel: model, body: ListView.separated( itemBuilder: (context, index) { + if (index == model.notifications.length) { + return InkWell( + onTap: () async { + GifLoaderDialogUtils.showMyDialog(context); + currentIndex++; + GetNotificationsRequestModel + getNotificationsRequestModel = + new GetNotificationsRequestModel( + currentPage: currentIndex, + pagingSize: 14, + notificationStatusID: 2); + + await model.getNotifications( + getNotificationsRequestModel, context); + GifLoaderDialogUtils.hideDialog(context); + }, + child: Center( + child: Image.asset('assets/images/notf.png'), + ), + ); + } + return InkWell( onTap: () async { if (!model.notifications[index].isRead) { @@ -69,17 +77,23 @@ class NotificationsPage extends StatelessWidget { width: double.infinity, padding: EdgeInsets.all(8.0), decoration: BoxDecoration( - color: model.notifications[index].isRead ? Theme.of(context).scaffoldBackgroundColor : CustomColors.accentColor.withOpacity(0.05), + color: model.notifications[index].isRead + ? Theme.of(context).scaffoldBackgroundColor + : CustomColors.accentColor.withOpacity(0.05), border: projectViewModel.isArabic ? Border( right: BorderSide( - color: model.notifications[index].isRead ? Theme.of(context).scaffoldBackgroundColor : CustomColors.accentColor, + color: model.notifications[index].isRead + ? Theme.of(context).scaffoldBackgroundColor + : CustomColors.accentColor, width: 5.0, ), ) : Border( left: BorderSide( - color: model.notifications[index].isRead ? Theme.of(context).scaffoldBackgroundColor : CustomColors.accentColor, + color: model.notifications[index].isRead + ? Theme.of(context).scaffoldBackgroundColor + : CustomColors.accentColor, width: 5.0, ), ), @@ -92,16 +106,25 @@ class NotificationsPage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(model.notifications[index].createdOn)) + + Texts(DateUtil.getDayMonthYearDateFormatted( + DateUtil.convertStringToDate(model + .notifications[index].createdOn)) + " " + - DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(model.notifications[index].createdOn), false)), + DateUtil.formatDateToTimeLang( + DateUtil.convertStringToDate(model + .notifications[index].createdOn), + false)), SizedBox( height: 5, ), Row( children: [ - Expanded(child: Texts(model.notifications[index].message)), - if (model.notifications[index].messageType == "image") + Expanded( + child: Texts(model + .notifications[index].message)), + if (model + .notifications[index].messageType == + "image") Icon( FontAwesomeIcons.images, color: CustomColors.grey, @@ -130,7 +153,7 @@ class NotificationsPage extends StatelessWidget { ], ); }, - itemCount: model.notifications.length)), + itemCount: model.notifications.length + 1)), // ListView( // children: model.notifications // .map( diff --git a/lib/pages/ToDoList/payment_method_select.dart b/lib/pages/ToDoList/payment_method_select.dart index 5f9532e1..2269eae9 100644 --- a/lib/pages/ToDoList/payment_method_select.dart +++ b/lib/pages/ToDoList/payment_method_select.dart @@ -65,8 +65,8 @@ class _PaymentMethodState extends State { ), mWidth(12), Container( - height: 60.0, - width: 60, + height: 70.0, + width: 70.0, padding: EdgeInsets.all(7.0), child: Image.asset("assets/images/new/payment/Mada.png"), ), diff --git a/lib/pages/medical/balance/confirm_payment_page.dart b/lib/pages/medical/balance/confirm_payment_page.dart index e1a0b843..2d79219d 100644 --- a/lib/pages/medical/balance/confirm_payment_page.dart +++ b/lib/pages/medical/balance/confirm_payment_page.dart @@ -31,7 +31,11 @@ class ConfirmPaymentPage extends StatefulWidget { final String selectedPaymentMethod; AuthenticatedUser authenticatedUser; - ConfirmPaymentPage({this.advanceModel, this.patientInfoAndMobileNumber, this.selectedPaymentMethod, this.authenticatedUser}); + ConfirmPaymentPage( + {this.advanceModel, + this.patientInfoAndMobileNumber, + this.selectedPaymentMethod, + this.authenticatedUser}); @override _ConfirmPaymentPageState createState() => _ConfirmPaymentPageState(); @@ -47,12 +51,16 @@ class _ConfirmPaymentPageState extends State { void submit(MyBalanceViewModel model, code) { final activationCode = code; GifLoaderDialogUtils.showMyDialog(AppGlobal.context); - model.checkActivationCodeForAdvancePayment(activationCode: activationCode).then((value) { + model + .checkActivationCodeForAdvancePayment(activationCode: activationCode) + .then((value) { GifLoaderDialogUtils.hideDialog(AppGlobal.context); Navigator.pop(context, true); - AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); + AppoitmentAllHistoryResultList appo = + new AppoitmentAllHistoryResultList(); appo.projectID = widget.patientInfoAndMobileNumber.projectID; - openPayment(widget.selectedPaymentMethod, widget.authenticatedUser, double.parse(widget.advanceModel.amount), null); + openPayment(widget.selectedPaymentMethod, widget.authenticatedUser, + double.parse(widget.advanceModel.amount), null); }); } @@ -70,22 +78,6 @@ class _ConfirmPaymentPageState extends State { Navigator.pop(context), }, ).displayDialog(context); - - // 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( @@ -120,11 +112,13 @@ class _ConfirmPaymentPageState extends State { Container( height: 100.0, padding: EdgeInsets.all(7.0), - width: MediaQuery.of(context).size.width * 0.45, - child: widget.selectedPaymentMethod == "ApplePay" ? SvgPicture.asset(getImagePath(widget.selectedPaymentMethod)) : Image.asset(getImagePath(widget.selectedPaymentMethod)), + width: MediaQuery.of(context).size.width * 0.30, + child: Image.asset( + getImagePath(widget.selectedPaymentMethod)), ), Text( - '${widget.advanceModel.amount} SAR', + '${widget.advanceModel.amount} ' + + TranslationBase.of(context).sar, style: TextStyle( fontSize: 20, fontWeight: FontWeight.w900, @@ -153,7 +147,8 @@ class _ConfirmPaymentPageState extends State { margin: EdgeInsets.all(3), child: NewTextFields( hintText: TranslationBase.of(context).name, - initialValue: widget.patientInfoAndMobileNumber.firstName, + initialValue: + widget.patientInfoAndMobileNumber.firstName, isEnabled: false, ), ), @@ -173,7 +168,11 @@ class _ConfirmPaymentPageState extends State { ), NewTextFields( hintText: TranslationBase.of(context).depositorName, - initialValue: model.user.firstName + " " + model.user.middleName + " " + model.user.lastName, + initialValue: model.user.firstName + + " " + + model.user.middleName + + " " + + model.user.lastName, isEnabled: false, ), SizedBox( @@ -198,9 +197,14 @@ class _ConfirmPaymentPageState extends State { TranslationBase.of(context).confirm.toUpperCase(), () { GifLoaderDialogUtils.showMyDialog(context); - model.sendActivationCodeForAdvancePayment(patientID: int.parse(widget.advanceModel.fileNumber), projectID: widget.advanceModel.hospitalsModel.iD).then((value) { + model + .sendActivationCodeForAdvancePayment( + patientID: int.parse(widget.advanceModel.fileNumber), + projectID: widget.advanceModel.hospitalsModel.iD) + .then((value) { GifLoaderDialogUtils.hideDialog(context); - if (model.state != ViewState.ErrorLocal && model.state != ViewState.Error) showSMSDialog(model); + if (model.state != ViewState.ErrorLocal && + model.state != ViewState.Error) showSMSDialog(model); }); }, ), @@ -213,35 +217,54 @@ class _ConfirmPaymentPageState extends State { String getImagePath(String paymentMethod) { switch (paymentMethod) { case "MADA": - return 'assets/images/new-design/mada.png'; + return 'assets/images/new/payment/Mada.png'; break; case "SADAD": return 'assets/images/new-design/sadad.png'; break; case "VISA": - return 'assets/images/new-design/visa.png'; + return 'assets/images/new/payment/visa.png'; break; case "MASTERCARD": - return 'assets/images/new-design/mastercard.png'; + return 'assets/images/new/payment/Mastercard.png'; break; case "Installment": - return 'assets/images/new-design/installment.png'; + return 'assets/images/new/payment/installments.png'; break; case "ApplePay": - return 'assets/images/new-design/applepay.svg'; + return 'assets/images/new/payment/Apple_Pay.png'; break; } return 'assets/images/new-design/mada.png'; } - openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) { - browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart); + openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, + double amount, AppoitmentAllHistoryResultList appo) { + browser = new MyInAppBrowser( + onExitCallback: onBrowserExit, + appo: appo, + onLoadStartCallback: onBrowserLoadStart); - transID = Utils.getAdvancePaymentTransID(widget.advanceModel.hospitalsModel.iD, int.parse(widget.advanceModel.fileNumber)); + transID = Utils.getAdvancePaymentTransID( + widget.advanceModel.hospitalsModel.iD, + int.parse(widget.advanceModel.fileNumber)); - browser.openPaymentBrowser(amount, "Advance Payment", transID, widget.advanceModel.hospitalsModel.iD.toString(), widget.advanceModel.email, paymentMethod, - widget.patientInfoAndMobileNumber.patientType, widget.advanceModel.patientName, widget.advanceModel.fileNumber, authenticatedUser, browser, false, "3", ""); + browser.openPaymentBrowser( + amount, + "Advance Payment", + transID, + widget.advanceModel.hospitalsModel.iD.toString(), + widget.advanceModel.email, + paymentMethod, + widget.patientInfoAndMobileNumber.patientType, + widget.advanceModel.patientName, + widget.advanceModel.fileNumber, + authenticatedUser, + browser, + false, + "3", + ""); } onBrowserLoadStart(String url) { @@ -293,11 +316,23 @@ class _ConfirmPaymentPageState extends State { createAdvancePayment(res, AppoitmentAllHistoryResultList appo) { DoctorsListService service = new DoctorsListService(); String paymentReference = res['Fort_id'].toString(); - service.HIS_createAdvancePayment(appo, widget.advanceModel.hospitalsModel.iD.toString(), res['Amount'], res['Fort_id'], res['PaymentMethod'], widget.patientInfoAndMobileNumber.patientType, - widget.advanceModel.patientName, widget.advanceModel.fileNumber, AppGlobal.context) + service.HIS_createAdvancePayment( + appo, + widget.advanceModel.hospitalsModel.iD.toString(), + res['Amount'], + res['Fort_id'], + res['PaymentMethod'], + widget.patientInfoAndMobileNumber.patientType, + widget.advanceModel.patientName, + widget.advanceModel.fileNumber, + AppGlobal.context) .then((res) { print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']); - addAdvancedNumberRequest(res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), paymentReference, 0, appo); + addAdvancedNumberRequest( + res['OnlineCheckInAppointments'][0]['AdvanceNumber'].toString(), + paymentReference, + 0, + appo); }).catchError((err) { GifLoaderDialogUtils.hideDialog(AppGlobal.context); AppToast.showErrorToast(message: err); @@ -305,9 +340,13 @@ class _ConfirmPaymentPageState extends State { }); } - addAdvancedNumberRequest(String advanceNumber, String paymentReference, dynamic appointmentID, AppoitmentAllHistoryResultList appo) { + addAdvancedNumberRequest(String advanceNumber, String paymentReference, + dynamic appointmentID, AppoitmentAllHistoryResultList appo) { DoctorsListService service = new DoctorsListService(); - service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, AppGlobal.context).then((res) { + service + .addAdvancedNumberRequest( + advanceNumber, paymentReference, appointmentID, AppGlobal.context) + .then((res) { print(res); GifLoaderDialogUtils.hideDialog(AppGlobal.context); navigateToHome(AppGlobal.context); diff --git a/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart b/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart index 6725874f..8b390fe2 100644 --- a/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart +++ b/lib/pages/medical/my_trackers/Weight/WeightWeeklyPage.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart'; import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; @@ -31,7 +32,7 @@ class WeightWeeklyPage extends StatelessWidget { elevation: 1, margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), child: ShowChart( - title: TranslationBase.of(context).weight, + title: TranslationBase.of(AppGlobal.context).weight, timeSeries: model.weightWeekTimeSeriesData.isEmpty ? [TimeSeriesSales2(DateTime.now(), 0.0)] : model.weightWeekTimeSeriesData, indexes: model.weightWeekTimeSeriesData.length ~/ 5.5 ?? 0, horizontalInterval: 2, @@ -46,7 +47,7 @@ class WeightWeeklyPage extends StatelessWidget { children: [ Padding( padding: const EdgeInsets.all(8.0), - child: Texts(TranslationBase.of(context).details), + child: Texts(TranslationBase.of(AppGlobal.context).details), ), Container( padding: EdgeInsets.all(10), @@ -57,14 +58,14 @@ class WeightWeeklyPage extends StatelessWidget { model.weightWeekTimeSeriesData.isEmpty ? Container( child: Center( - child: Texts(TranslationBase.of(context).noDataAvailable), + child: Texts(TranslationBase.of(AppGlobal.context).noDataAvailable), ), ) : Table( columnWidths: { 0: FlexColumnWidth(2.5), }, - children: fullData(context, model), + children: fullData(AppGlobal.context, model), ), ], ), diff --git a/lib/widgets/data_display/medical/LabResult/Lab_Result_details_wideget.dart b/lib/widgets/data_display/medical/LabResult/Lab_Result_details_wideget.dart index 7b8a0c47..04ed184b 100644 --- a/lib/widgets/data_display/medical/LabResult/Lab_Result_details_wideget.dart +++ b/lib/widgets/data_display/medical/LabResult/Lab_Result_details_wideget.dart @@ -46,7 +46,7 @@ class _VitalSignDetailsWidgetState extends State { tableRow.add( TableRow( children: [ - Utils.tableColumnValue(DateUtil.formatDateToDate(DateUtil.convertStringToDate(labOrderResultList[i].verifiedOnDateTime), false), isLast: i == (labOrderResultList.length - 1)), + Utils.tableColumnValue(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(labOrderResultList[i].verifiedOnDateTime)), isLast: i == (labOrderResultList.length - 1)), Utils.tableColumnValue(labOrderResultList[i].resultValue, isLast: i == (labOrderResultList.length - 1)), ], ),