merge-update-with-lab-changes
haroon amjad 6 years ago
commit 478917b240

@ -461,4 +461,32 @@ const Map<String, Map<String, String>> localizedValues = {
"UpdateSuccessfully":{"en":"Update Successfully","ar":"تم التحديث بنجاح"}, "UpdateSuccessfully":{"en":"Update Successfully","ar":"تم التحديث بنجاح"},
"CHECK_VACCINE_AVAILABILITY":{"en":"CHECK VACCINE AVAILABILITY","ar":"تحقق من توافر اللقاح"}, "CHECK_VACCINE_AVAILABILITY":{"en":"CHECK VACCINE AVAILABILITY","ar":"تحقق من توافر اللقاح"},
"MyVaccinesAvailability":{"en":"MyVaccinesAvailability","ar":"توفر لقاحي"}, "MyVaccinesAvailability":{"en":"MyVaccinesAvailability","ar":"توفر لقاحي"},
"PaymentService":{"en":"Payment Service","ar":"خدمة المدفوعات"},
"PaymentOnline":{"en":"Service","ar":"الالكتروني"},
"OnlineCheckIn":{"en":"Online Check-In","ar":"مدفوعات معلقة"},
"MyBalances":{"en":"My Balances","ar":"رصيدي"},
"BalanceAmount":{"en":"Balance Amount","ar":"رصيدالحساب"},
"TotalBalance":{"en":"Total Balance","ar":"الرصيد الكلي"},
"CreateAdvancedPayment":{"en":"Create Advanced Payment","ar":"إنشاء دفعة مقدمة"},
"AdvancePayment":{"en":"Advance Payment","ar":"الدفع مقدما"},
"AdvancePaymentLabel":{
"en":"You can create and add an Advanced Payment for you account or other accounts.",
"ar":"يمكنك تحويل مبلغ لحسابك لدى المجموعة أو لحساب احد المراجعين"},
"FileNumber":{"en":"File Number","ar":"رقم الملف"},
"Amount":{"en":"Amount *","ar":"المبلغ *"},
"DepositorEmail":{"en":"Depositor Email *","ar":"البريد الإلكتروني للمودع *"},
"Notes":{"en":"Notes","ar":"ملاحظات"},
"SelectPatientName":{"en":"Select Patient Name","ar":"اختر اسم المريض"},
"SelectFamilyPatientName":{"en":"Family Members","ar":"أفراد الأسرة"},
"SelectHospital":{"en":"Select Hospital","ar":"اختر المستشفى"},
"MyAccount":{"en":"My Account","ar":"حسابي"},
"OtherAccount":{"en":"Other Account","ar":"حساب آخر"},
"SelectBeneficiary":{"en":"Select Beneficiary","ar":"حدد المستفيد"},
"ConfirmThePayment":{"en":"Confirm The Payment","ar":"تأكيد عملية الدفع"},
"DepositorName":{"en":"Depositor Name","ar":"اسم المودع *"},
"MobileNumber":{"en":"Mobile Number","ar":"رقم الجوال"},
"Ok":{"en":"Ok","ar":"حسنا"},
"TheVerificationCodeExpiresIn":{"en":"The Verification Code Expires In","ar":"تنتهي صلاحية رمز التحقق في"},
"PleaseEnterTheVerificationCode":{"en":"Please enter the verification code send to","ar":"الرجاء إدخال رمز التحقق المرسل إلى"},
}; };

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medic
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart'; import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
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/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
@ -443,52 +444,23 @@ class _HomePageState extends State<HomePage> {
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Container( InkWell(
margin: EdgeInsets.only(left: 15, right: 15), onTap: () => Navigator.push(
child: Row( context, FadePage(page: PaymentService())),
mainAxisAlignment: MainAxisAlignment.spaceBetween, child: Container(
children: <Widget>[ margin: EdgeInsets.only(left: 15, right: 15),
Container( child: Row(
width: MediaQuery.of(context).size.width * 0.29, mainAxisAlignment: MainAxisAlignment.spaceBetween,
child: Center( children: <Widget>[
child: Padding( Container(
padding: const EdgeInsets.all(15.0), width: MediaQuery.of(context).size.width * 0.29,
child: Column(
children: <Widget>[
Image.asset(
'assets/images/al-habib_online_payment_service_icon.png',
height: 55,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context)
.onlinePaymentService,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 2,
)
],
),
),
),
height: MediaQuery.of(context).size.width * 0.4,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
),
Container(
child: Center( child: Center(
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Image.asset( Image.asset(
'assets/images/ereferral_service_icon.png', 'assets/images/al-habib_online_payment_service_icon.png',
width: 50,
height: 55, height: 55,
), ),
SizedBox( SizedBox(
@ -496,7 +468,7 @@ class _HomePageState extends State<HomePage> {
), ),
Texts( Texts(
TranslationBase.of(context) TranslationBase.of(context)
.offersAndPackages, .onlinePaymentService,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.black87, color: Colors.black87,
bold: false, bold: false,
@ -506,49 +478,87 @@ class _HomePageState extends State<HomePage> {
), ),
), ),
), ),
width: MediaQuery.of(context).size.width * 0.29,
height: MediaQuery.of(context).size.width * 0.4, height: MediaQuery.of(context).size.width * 0.4,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
color: Colors.white, color: Colors.white,
)), ),
Container( ),
width: MediaQuery.of(context).size.width * 0.29, Container(
child: InkWell( child: Center(
onTap: ()=>Navigator.push(context, child: Padding(
FadePage(page: ErOptions(isAppbar: true,))), padding: const EdgeInsets.all(15.0),
child: Center( child: Column(
child: Padding( children: <Widget>[
padding: const EdgeInsets.all(15.0), Image.asset(
child: Column( 'assets/images/ereferral_service_icon.png',
children: <Widget>[ width: 50,
Image.asset( height: 55,
'assets/images/Dr_Schedule_report.png', ),
width: 50, SizedBox(
height: 50, height: 15,
), ),
SizedBox( Texts(
height: 15, TranslationBase.of(context)
), .offersAndPackages,
Texts( textAlign: TextAlign.center,
TranslationBase.of(context).emergencyServices, color: Colors.black87,
textAlign: TextAlign.center, bold: false,
color: Colors.black87, fontSize: SizeConfig.textMultiplier * 2,
bold: false, )
fontSize: SizeConfig.textMultiplier * 2.0, ],
) ),
], ),
),
width: MediaQuery.of(context).size.width * 0.29,
height: MediaQuery.of(context).size.width * 0.4,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
)),
Container(
width: MediaQuery.of(context).size.width * 0.29,
child: InkWell(
onTap: () => Navigator.push(
context,
FadePage(
page: ErOptions(
isAppbar: true,
))),
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context)
.emergencyServices,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 2.0,
)
],
),
), ),
), ),
), ),
height: MediaQuery.of(context).size.width * 0.4,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
), ),
height: MediaQuery.of(context).size.width * 0.4, ],
decoration: BoxDecoration( ),
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
),
],
), ),
), ),
SizedBox( SizedBox(
@ -598,9 +608,9 @@ class _HomePageState extends State<HomePage> {
context, FadePage(page: AllHabibMedicalService())), context, FadePage(page: AllHabibMedicalService())),
), ),
DashboardItem( DashboardItem(
onTap: (){ onTap: () {
Navigator.push(context, FadePage(page: FeedbackHomePage())); Navigator.push(
context, FadePage(page: FeedbackHomePage()));
}, },
child: Container( child: Container(
width: double.infinity, width: double.infinity,

@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/dialogs/SelectHospitalDialog.dart'; import 'package:diplomaticquarterapp/pages/medical/balance/dialogs/SelectHospitalDialog.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
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/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -53,7 +54,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
onModelReady: (model) => model.getHospitals(), onModelReady: (model) => model.getHospitals(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'Advance Payment', appBarTitle: TranslationBase.of(context).advancePayment,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
child: Container( child: Container(
@ -62,7 +63,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts( Texts(
'You can create and add an Advanced Payment for you account or other accounts.', TranslationBase.of(context).advancePaymentLabel,
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
SizedBox( SizedBox(
@ -121,7 +122,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
height: 12, height: 12,
), ),
NewTextFields( NewTextFields(
hintText: 'File Number', hintText: TranslationBase.of(context).fileNumber,
controller: _fileTextController, controller: _fileTextController,
), ),
if (beneficiaryType == BeneficiaryType.OtherAccount) if (beneficiaryType == BeneficiaryType.OtherAccount)
@ -186,7 +187,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
height: 12, height: 12,
), ),
NewTextFields( NewTextFields(
hintText: 'Amount*', hintText: TranslationBase.of(context).amount,
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
onChanged: (value) { onChanged: (value) {
setState(() { setState(() {
@ -198,7 +199,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
height: 12, height: 12,
), ),
NewTextFields( NewTextFields(
hintText: 'Depositor Email*', hintText: TranslationBase.of(context).depositorEmail,
initialValue: model.user.emailAddress, initialValue: model.user.emailAddress,
onChanged: (value) { onChanged: (value) {
email = value; email = value;
@ -208,7 +209,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
height: 12, height: 12,
), ),
NewTextFields( NewTextFields(
hintText: 'Notes', hintText: TranslationBase.of(context).notes,
controller: _notesTextController, controller: _notesTextController,
), ),
SizedBox( SizedBox(
@ -224,7 +225,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
child: SecondaryButton( child: SecondaryButton(
textColor: Colors.white, textColor: Colors.white,
label: 'Submit', label: TranslationBase.of(context).submit,
disabled: amount.isEmpty || disabled: amount.isEmpty ||
_fileTextController.text.isEmpty || _fileTextController.text.isEmpty ||
_selectedHospital == null, _selectedHospital == null,
@ -341,37 +342,37 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
String getBeneficiaryType() { String getBeneficiaryType() {
switch (beneficiaryType) { switch (beneficiaryType) {
case BeneficiaryType.MyAccount: case BeneficiaryType.MyAccount:
return "My Account"; return TranslationBase.of(context).myAccount;
case BeneficiaryType.MyFamilyFiles: case BeneficiaryType.MyFamilyFiles:
return "My Family Files"; return TranslationBase.of(context).myFamilyFiles;
break; break;
case BeneficiaryType.OtherAccount: case BeneficiaryType.OtherAccount:
return "Other Account"; return TranslationBase.of(context).otherAccount;
break; break;
case BeneficiaryType.NON: case BeneficiaryType.NON:
return "Select Beneficiary"; return TranslationBase.of(context).selectBeneficiary;
} }
return ""; return TranslationBase.of(context).selectBeneficiary;
} }
String getHospitalName() { String getHospitalName() {
if (_selectedHospital != null) if (_selectedHospital != null)
return _selectedHospital.name; return _selectedHospital.name;
else else
return "Select Hospital"; return TranslationBase.of(context).selectHospital;
} }
String getPatientName() { String getPatientName() {
if (_selectedPatientInfo != null) if (_selectedPatientInfo != null)
return _selectedPatientInfo.fullName; return _selectedPatientInfo.fullName;
else else
return "Select Patient Name"; return TranslationBase.of(context).selectPatientName;
} }
String getFamilyMembersName() { String getFamilyMembersName() {
if (selectedPatientFamily != null) if (selectedPatientFamily != null)
return selectedPatientFamily.patientName; return selectedPatientFamily.patientName;
else else
return "Select Patient Name"; return TranslationBase.of(context).selectFamilyPatientName;
} }
} }

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobi
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -39,7 +40,7 @@ class ConfirmPaymentPage extends StatelessWidget {
return BaseView<MyBalanceViewModel>( return BaseView<MyBalanceViewModel>(
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'Advance Payment', appBarTitle: TranslationBase.of(context).advancePayment,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
child: Container( child: Container(
@ -48,7 +49,7 @@ class ConfirmPaymentPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts( Texts(
'Confirm the Payment', TranslationBase.of(context).confirmThePayment,
textAlign: TextAlign.center, textAlign: TextAlign.center,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
fontSize: 24, fontSize: 24,
@ -81,7 +82,7 @@ class ConfirmPaymentPage extends StatelessWidget {
child: Container( child: Container(
margin: EdgeInsets.all(3), margin: EdgeInsets.all(3),
child: NewTextFields( child: NewTextFields(
hintText: 'File Number', hintText: TranslationBase.of(context).fileNumber,
initialValue: advanceModel.fileNumber, initialValue: advanceModel.fileNumber,
isEnabled: false, isEnabled: false,
), ),
@ -91,7 +92,7 @@ class ConfirmPaymentPage extends StatelessWidget {
child: Container( child: Container(
margin: EdgeInsets.all(3), margin: EdgeInsets.all(3),
child: NewTextFields( child: NewTextFields(
hintText: 'Name', hintText: TranslationBase.of(context).name,
initialValue: patientInfoAndMobileNumber.firstName, initialValue: patientInfoAndMobileNumber.firstName,
isEnabled: false, isEnabled: false,
), ),
@ -103,7 +104,7 @@ class ConfirmPaymentPage extends StatelessWidget {
height: 12, height: 12,
), ),
NewTextFields( NewTextFields(
hintText: 'Mobile Number', hintText: TranslationBase.of(context).mobileNumber,
initialValue: patientInfoAndMobileNumber.mobileNumber, initialValue: patientInfoAndMobileNumber.mobileNumber,
isEnabled: false, isEnabled: false,
), ),
@ -111,7 +112,7 @@ class ConfirmPaymentPage extends StatelessWidget {
height: 12, height: 12,
), ),
NewTextFields( NewTextFields(
hintText: 'Depositor Name', hintText: TranslationBase.of(context).depositorName,
initialValue: advanceModel.depositorName, initialValue: advanceModel.depositorName,
isEnabled: false, isEnabled: false,
), ),
@ -119,7 +120,7 @@ class ConfirmPaymentPage extends StatelessWidget {
height: 12, height: 12,
), ),
NewTextFields( NewTextFields(
hintText: 'Note', hintText: TranslationBase.of(context).notes,
initialValue: advanceModel.note, initialValue: advanceModel.note,
isEnabled: false, isEnabled: false,
), ),
@ -133,7 +134,7 @@ class ConfirmPaymentPage extends StatelessWidget {
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
child: SecondaryButton( child: SecondaryButton(
textColor: Colors.white, textColor: Colors.white,
label: 'CONFIRM', label: TranslationBase.of(context).confirm.toUpperCase(),
disabled: model.state == ViewState.Busy, disabled: model.state == ViewState.Busy,
onTap: () { onTap: () {
model model

@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_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/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -108,7 +109,7 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
flex: 4, flex: 4,
child: Center( child: Center(
child: Texts( child: Texts(
'SMS', 'SMS',
color: Colors.white, color: Colors.white,
textAlign: TextAlign.center, textAlign: TextAlign.center,
))), ))),
@ -139,7 +140,7 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Texts( child: Texts(
'Please enter the Verification code send to [${widget.phoneNumber}]', TranslationBase.of(context).pleaseEnterTheVerificationCode+'[${widget.phoneNumber}]',
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), ),
@ -289,7 +290,7 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Texts( child: Texts(
'The verification code expires in $timerText', TranslationBase.of(context).theVerificationCodeExpiresIn+' $timerText',
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), ),
@ -300,7 +301,7 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
child: SecondaryButton( child: SecondaryButton(
textColor: Colors.white, textColor: Colors.white,
label: 'SUBMIT', label: TranslationBase.of(context).submit.toUpperCase(),
onTap: () { onTap: () {
submit(model); submit(model);
}, },
@ -332,9 +333,8 @@ class _ConfirmSMSDialogState extends State<ConfirmSMSDialog> {
String validateCodeDigit(value) { String validateCodeDigit(value) {
if (value.isEmpty) { if (value.isEmpty) {
return 'Please enter your Password'; return '';
} }
return null; return null;
} }

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -40,7 +41,7 @@ class _SelectBeneficiaryDialogState extends State<SelectBeneficiaryDialog> {
}); });
}, },
child: ListTile( child: ListTile(
title: const Text('My Account'), title: Text(TranslationBase.of(context).myAccount),
leading: Radio( leading: Radio(
value: BeneficiaryType.MyAccount, value: BeneficiaryType.MyAccount,
groupValue: beneficiaryType, groupValue: beneficiaryType,
@ -70,7 +71,7 @@ class _SelectBeneficiaryDialogState extends State<SelectBeneficiaryDialog> {
}); });
}, },
child: ListTile( child: ListTile(
title: const Text('My Family Files'), title: Text(TranslationBase.of(context).myFamilyFiles),
leading: Radio( leading: Radio(
value: BeneficiaryType.MyFamilyFiles, value: BeneficiaryType.MyFamilyFiles,
groupValue: beneficiaryType, groupValue: beneficiaryType,
@ -100,7 +101,7 @@ class _SelectBeneficiaryDialogState extends State<SelectBeneficiaryDialog> {
}); });
}, },
child: ListTile( child: ListTile(
title: const Text('Other Account'), title: Text(TranslationBase.of(context).otherAccount),
leading: Radio( leading: Radio(
value: BeneficiaryType.OtherAccount, value: BeneficiaryType.OtherAccount,
groupValue: beneficiaryType, groupValue: beneficiaryType,
@ -133,7 +134,7 @@ class _SelectBeneficiaryDialogState extends State<SelectBeneficiaryDialog> {
child: Container( child: Container(
child: Center( child: Center(
child: Texts( child: Texts(
'CANCEL', TranslationBase.of(context).cancel.toUpperCase(),
color: Colors.red, color: Colors.red,
), ),
), ),
@ -157,7 +158,7 @@ class _SelectBeneficiaryDialogState extends State<SelectBeneficiaryDialog> {
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Center( child: Center(
child: Texts( child: Texts(
'Ok', TranslationBase.of(context).ok,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
), ),
), ),

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -88,7 +89,7 @@ class _SelectHospitalDialogState extends State<SelectHospitalDialog> {
child: Container( child: Container(
child: Center( child: Center(
child: Texts( child: Texts(
'CANCEL', TranslationBase.of(context).cancel.toUpperCase(),
color: Colors.red, color: Colors.red,
), ),
), ),
@ -112,7 +113,7 @@ class _SelectHospitalDialogState extends State<SelectHospitalDialog> {
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Center( child: Center(
child: Texts( child: Texts(
'Ok', TranslationBase.of(context).ok,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
)), )),
), ),

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -89,7 +90,7 @@ class _SelectPatientFamilyDialogState extends State<SelectPatientFamilyDialog> {
child: Container( child: Container(
child: Center( child: Center(
child: Texts( child: Texts(
'CANCEL', TranslationBase.of(context).cancel.toUpperCase(),
color: Colors.red, color: Colors.red,
), ),
), ),
@ -113,7 +114,7 @@ class _SelectPatientFamilyDialogState extends State<SelectPatientFamilyDialog> {
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Center( child: Center(
child: Texts( child: Texts(
'Ok', TranslationBase.of(context).ok,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
)), )),
), ),

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -89,7 +90,7 @@ class _SelectPatientInfoDialogState extends State<SelectPatientInfoDialog> {
child: Container( child: Container(
child: Center( child: Center(
child: Texts( child: Texts(
'CANCEL', TranslationBase.of(context).cancel.toUpperCase(),
color: Colors.red, color: Colors.red,
), ),
), ),
@ -113,7 +114,7 @@ class _SelectPatientInfoDialogState extends State<SelectPatientInfoDialog> {
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Center( child: Center(
child: Texts( child: Texts(
'Ok', TranslationBase.of(context).ok,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
)), )),
), ),

@ -1,89 +0,0 @@
import 'dart:async';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class ShowTimerText extends StatefulWidget {
ShowTimerText({Key key, this.model});
final model;
@override
_ShowTimerTextState createState() => _ShowTimerTextState();
}
class _ShowTimerTextState extends State<ShowTimerText> {
String timerText = (TIMER_MIN - 1).toString() + ':59';
int min = TIMER_MIN - 1;
int sec = 59;
Timer _timer;
// AuthProvider authProv;
resendCode() {
min = TIMER_MIN - 1;
sec = 59;
_timer = Timer.periodic(Duration(seconds: 1), (Timer timer) {
if (min <= 0 && sec <= 0) {
timer.cancel();
} else {
setState(() {
sec = sec - 1;
if (sec == 0 && min == 0) {
//TODO
min = 0;
sec = 0;
} else if (sec == 0) {
min = min - 1;
sec = 59;
}
timerText = min.toString() + ':' + sec.toString();
});
}
});
}
@override
void initState() {
super.initState();
resendCode();
}
@override
void dispose() {
_timer.cancel();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
InkWell(
onTap: min != 0 || sec != 0
? null
: () {
resendActivatioinCode();
},
child: Text(
timerText,
style: TextStyle(
fontSize: 3.0 * SizeConfig.textMultiplier,
color: Hexcolor('#B8382C'),
fontWeight: FontWeight.bold),
),
),
],
),
);
}
resendActivatioinCode() {
}
}

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_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/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -18,14 +19,14 @@ class MyBalancePage extends StatelessWidget {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBarTitle: 'My Balances', appBarTitle: TranslationBase.of(context).myBalances,
body: Container( body: Container(
margin: EdgeInsets.all(12), margin: EdgeInsets.all(12),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts( Texts(
'Balance Amount', TranslationBase.of(context).balanceAmount,
color: Colors.black, color: Colors.black,
bold: true, bold: true,
), ),
@ -45,7 +46,7 @@ class MyBalancePage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Texts( Texts(
'Total Balance', TranslationBase.of(context).totalBalance,
color: Colors.white, color: Colors.white,
), ),
Texts( Texts(
@ -93,7 +94,7 @@ class MyBalancePage extends StatelessWidget {
child: SecondaryButton( child: SecondaryButton(
// color: Colors.grey[900], // color: Colors.grey[900],
textColor: Colors.white, textColor: Colors.white,
label: ' Create Advanced Payment', label: TranslationBase.of(context).createAdvancedPayment,
onTap: () { onTap: () {
Navigator.push(context, Navigator.push(context,
FadePage(page: AdvancePaymentPage())); FadePage(page: AdvancePaymentPage()));

@ -0,0 +1,151 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/advance_payment_page.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/my_balance_page.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/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
class PaymentService extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).paymentService,
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Expanded(
child: InkWell(
onTap: () => Navigator.push(
context, FadePage(page: AdvancePaymentPage())),
child: Container(
margin: EdgeInsets.all(5.0),
padding: EdgeInsets.all(9),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.0),
shape: BoxShape.rectangle),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context).payment,
color: Hexcolor('#B61422'),
bold: true,
),
Texts(
TranslationBase.of(context).paymentOnline,
fontSize: 14,
fontWeight: FontWeight.normal,
),
Image.asset(
'assets/images/al-habib_online_payment_service_icon.png',
fit: BoxFit.fill,
height: 55,
width: double.infinity,
),
],
),
),
),
),
Expanded(
child: Container(
margin: EdgeInsets.all(5.0),
padding: EdgeInsets.all(9),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.0),
shape: BoxShape.rectangle),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context).onlineCheckIn,
color: Hexcolor('#B61422'),
bold: true,
),
Texts(
TranslationBase.of(context).appointment,
fontSize: 14,
fontWeight: FontWeight.normal,
),
Align(
alignment: projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Image.asset(
'assets/images/al-habib_online_payment_service_icon.png',
height: 55,
),
),
],
),
),
)
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: InkWell(
onTap: () => Navigator.push(
context, FadePage(page: MyBalancePage())),
child: Container(
margin: EdgeInsets.all(5.0),
padding: EdgeInsets.all(9),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8.0),
shape: BoxShape.rectangle),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
'My Balances',
color: Hexcolor('#B61422'),
bold: true,
),
Texts(
TranslationBase.of(context).payment,
fontSize: 14,
fontWeight: FontWeight.normal,
),
Align(
alignment: projectViewModel.isArabic
? Alignment.centerRight
: Alignment.centerLeft,
child: Image.asset(
'assets/images/al-habib_online_payment_service_icon.png',
height: 55,
),
),
],
),
),
),
),
Expanded(
child: Container(),
)
],
),
],
),
),
),
);
}
}

@ -532,6 +532,32 @@ class TranslationBase {
String get emailSentSuccessfully => localizedValues['EmailSentSuccessfully'][locale.languageCode]; String get emailSentSuccessfully => localizedValues['EmailSentSuccessfully'][locale.languageCode];
String get checkVaccineAvailability => localizedValues['CHECK_VACCINE_AVAILABILITY'][locale.languageCode]; String get checkVaccineAvailability => localizedValues['CHECK_VACCINE_AVAILABILITY'][locale.languageCode];
String get myVaccinesAvailability => localizedValues['MyVaccinesAvailability'][locale.languageCode]; String get myVaccinesAvailability => localizedValues['MyVaccinesAvailability'][locale.languageCode];
String get paymentService => localizedValues['PaymentService'][locale.languageCode];
String get paymentOnline => localizedValues['PaymentOnline'][locale.languageCode];
String get onlineCheckIn => localizedValues['OnlineCheckIn'][locale.languageCode];
String get myBalances => localizedValues['MyBalances'][locale.languageCode];
String get balanceAmount => localizedValues['BalanceAmount'][locale.languageCode];
String get totalBalance => localizedValues['TotalBalance'][locale.languageCode];
String get createAdvancedPayment => localizedValues['CreateAdvancedPayment'][locale.languageCode];
String get advancePayment => localizedValues['AdvancePayment'][locale.languageCode];
String get advancePaymentLabel => localizedValues['AdvancePaymentLabel'][locale.languageCode];
String get fileNumber => localizedValues['FileNumber'][locale.languageCode];
String get amount => localizedValues['Amount'][locale.languageCode];
String get depositorEmail => localizedValues['DepositorEmail'][locale.languageCode];
String get notes => localizedValues['Notes'][locale.languageCode];
String get selectPatientName => localizedValues['SelectPatientName'][locale.languageCode];
String get selectFamilyPatientName => localizedValues['SelectFamilyPatientName'][locale.languageCode];
String get selectHospital => localizedValues['SelectHospital'][locale.languageCode];
String get myAccount => localizedValues['MyAccount'][locale.languageCode];
String get otherAccount => localizedValues['OtherAccount'][locale.languageCode];
String get selectBeneficiary => localizedValues['SelectBeneficiary'][locale.languageCode];
String get confirmThePayment => localizedValues['ConfirmThePayment'][locale.languageCode];
String get depositorName => localizedValues['DepositorName'][locale.languageCode];
String get mobileNumber => localizedValues['MobileNumber'][locale.languageCode];
String get ok => localizedValues['Ok'][locale.languageCode];
String get theVerificationCodeExpiresIn => localizedValues['TheVerificationCodeExpiresIn'][locale.languageCode];
String get pleaseEnterTheVerificationCode => localizedValues['PleaseEnterTheVerificationCode'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

Loading…
Cancel
Save