diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 4081ff24..8e410819 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -19,6 +19,7 @@ import 'package:provider/provider.dart'; import '../../../locator.dart'; import '../../../routes.dart'; import '../AuthenticatedUserObject.dart'; +import 'dart:io' show Platform; AppSharedPreferences sharedPref = new AppSharedPreferences(); @@ -86,7 +87,7 @@ class BaseAppClient { : IS_DENTAL_ALLOWED_BACKEND; } - body['DeviceTypeID'] = DeviceTypeID; + body['DeviceTypeID'] = Platform.isAndroid ? 1: 2; if (!body.containsKey('IsPublicRequest')) { body['PatientType'] = body.containsKey('PatientType') @@ -277,7 +278,8 @@ class BaseAppClient { : IS_DENTAL_ALLOWED_BACKEND; } - body['DeviceTypeID'] = DeviceTypeID; + + body['DeviceTypeID'] = Platform.isAndroid ? 1: 2; if (!body.containsKey('IsPublicRequest')) { body['PatientType'] = body.containsKey('PatientType') @@ -731,7 +733,7 @@ class BaseAppClient { : IS_DENTAL_ALLOWED_BACKEND; } - body['DeviceTypeID'] = DeviceTypeID; + body['DeviceTypeID'] = Platform.isAndroid ? 1: 2; if (!body.containsKey('IsPublicRequest')) { body['PatientType'] = body.containsKey('PatientType') diff --git a/lib/pages/Blood/my_balance_page.dart b/lib/pages/Blood/my_balance_page.dart deleted file mode 100644 index 06bd50f6..00000000 --- a/lib/pages/Blood/my_balance_page.dart +++ /dev/null @@ -1,110 +0,0 @@ -import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; -import 'package:diplomaticquarterapp/pages/base/base_view.dart'; -import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; -import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; -import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; -import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; - -import 'advance_payment_page.dart'; -import 'blood_donation.dart'; - -class MyBalancePage extends StatelessWidget { - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.getPatientAdvanceBalanceAmount(), - builder: (_, model, w) => AppScaffold( - baseViewModel: model, - isShowAppBar: true, - appBarTitle: TranslationBase.of(context).myBalances, - body: Container( - margin: EdgeInsets.all(12), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - TranslationBase.of(context).balanceAmount, - color: Colors.black, - bold: true, - ), - SizedBox( - height: 15, - ), - Container( - padding: EdgeInsets.all(8), - width: double.infinity, - height: 65, - decoration: BoxDecoration( - color: HexColor('#B61422'), - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(7), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Texts( - TranslationBase.of(context).totalBalance, - color: Theme.of(context).primaryColor, - ), - Texts( - '${model.totalAdvanceBalanceAmount ?? 0} SAR', - color: Theme.of(context).primaryColor, - bold: true, - ), - ], - ), - ), - SizedBox( - height: 9, - ), - ...List.generate( - model.patientAdvanceBalanceAmountList.length, - (index) => Container( - padding: EdgeInsets.all(8), - height: 65, - margin: EdgeInsets.only(top: 8), - decoration: BoxDecoration( - color: Theme.of(context).primaryColor, - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(7), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Texts(model.patientAdvanceBalanceAmountList[index] - .projectDescription), - Texts( - '${model.patientAdvanceBalanceAmountList[index].patientAdvanceBalanceAmount} SAR', - bold: true, - ), - ], - ), - ), - ), - ], - ), - ), - bottomSheet: Container( - height: MediaQuery.of(context).size.height * 0.1, - width: double.infinity, - padding: EdgeInsets.all(12), - child: SecondaryButton( - // color: Colors.grey[900], - textColor: Colors.white, - label: TranslationBase.of(context).createAdvancedPayment, - onTap: () { - Navigator.push( - context, - //FadePage(page: AdvancePaymentPage())); - FadePage(page: BloodDonationPage())); - }, - ), - ), - ), - ); - } -} diff --git a/lib/pages/medical/balance/advance_payment_page.dart b/lib/pages/medical/balance/advance_payment_page.dart index 5b2b5d56..d3921d4a 100644 --- a/lib/pages/medical/balance/advance_payment_page.dart +++ b/lib/pages/medical/balance/advance_payment_page.dart @@ -94,7 +94,7 @@ class _AdvancePaymentPageState extends State { height: 65, decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), - color: Theme.of(context).primaryColor), + color: Colors.white), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -125,7 +125,7 @@ class _AdvancePaymentPageState extends State { height: 65, decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), - color: Theme.of(context).primaryColor), + color: Colors.white), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -168,7 +168,7 @@ class _AdvancePaymentPageState extends State { height: 65, decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), - color: Theme.of(context).primaryColor), + color: Colors.white), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -189,7 +189,7 @@ class _AdvancePaymentPageState extends State { height: 65, decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), - color: Theme.of(context).primaryColor), + color: Colors.white), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ diff --git a/lib/pages/medical/balance/new_text_Field.dart b/lib/pages/medical/balance/new_text_Field.dart index 6d368a6a..f61c7267 100644 --- a/lib/pages/medical/balance/new_text_Field.dart +++ b/lib/pages/medical/balance/new_text_Field.dart @@ -158,7 +158,7 @@ class _NewTextFieldsState extends State { duration: Duration(milliseconds: 300), decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), - color: Theme.of(context).primaryColor), + color: Colors.white), child: Container( margin: EdgeInsets.only(top: 8), child: TextFormField( diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index 9d8f5326..de659eb4 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -8,7 +8,6 @@ import 'package:connectivity/connectivity.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; -import 'package:diplomaticquarterapp/pages/Blood/my_balance_page.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_card_screen.dart'; @@ -16,6 +15,7 @@ import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dar import 'package:diplomaticquarterapp/pages/medical/active_medications/ActiveMedicationsPage.dart'; import 'package:diplomaticquarterapp/pages/medical/allergies_page.dart'; import 'package:diplomaticquarterapp/pages/medical/ask_doctor/ask_doctor_home_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart'; import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/eye/EyeMeasurementsPage.dart'; import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart'; diff --git a/lib/widgets/others/floating_button_search.dart b/lib/widgets/others/floating_button_search.dart index 69251773..4310996b 100644 --- a/lib/widgets/others/floating_button_search.dart +++ b/lib/widgets/others/floating_button_search.dart @@ -17,7 +17,6 @@ import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.da import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/my_web_view.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart'; import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart'; -import 'package:diplomaticquarterapp/pages/Blood/my_balance_page.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/DoctorProfile.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart'; @@ -35,6 +34,7 @@ import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/login/welcome.dart'; import 'package:diplomaticquarterapp/pages/medical/balance/advance_payment_page.dart'; +import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.dart'; import 'package:diplomaticquarterapp/pages/medical/doctor/doctor_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/labs/labs_home_page.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';