diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 987e0fb5..10a3662d 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -316,7 +316,7 @@ const Map localizedValues = { "NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"}, "NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"}, "noArrivedAppointments": {"en": "No Arrived Appointments", "ar": "لم يتم حضورها"}, - "MyAppointmentsList": {"en": "Appointments", "ar": "قائمة بمواعدي"}, + "MyAppointmentsList": {"en": "Appointments", "ar": "قائمة بمواعيدي"}, "Radiology": {"en": "Radiology", "ar": "الأشعة"}, "RadiologySubtitle": {"en": "Result", "ar": "صور وتقارير"}, "Lab": {"en": "Lab", "ar": "تحليل المختبر"}, @@ -610,7 +610,7 @@ const Map localizedValues = { "years-old": {"en": "years old", "ar": "سنة"}, "drag-point": {"en": "Drag point to change your age", "ar": "اسحب لتغيير عمرك"}, "refine": {"en": "Refine", "ar": "تصفية"}, - "reset": {"en": "Reset", "ar": "اعادة تعيين"}, + "reset": {"en": "Reset", "ar": "اعادة ضبط"}, "apply": {"en": "Apply", "ar": "تطبيق"}, "viewCategorise": {"en": "View All Categories", "ar": "عرض جميع الفئات"}, "categorise": {"en": "Categories", "ar": "التطبيقات"}, @@ -1489,13 +1489,13 @@ const Map localizedValues = { "medicalReport": {"en": "Medical Report", "ar": "تقرير طبي"}, "insuredPatient": {"en": "Insured Patient", "ar": "هل لدى المريض تامين؟"}, "rateDoctor": {"en": "Rate Doctor", "ar": "تقييم الطبيب"}, - "rateAppointment": {"en": "Rate Appointment", "ar": "سعر التعيين"}, + "rateAppointment": {"en": "Rate Appointment", "ar": "تقييم الموعد"}, "noInsuranceCardAttached": {"en": "Please attach your insurance card image to continue", "ar": "يرجى إرفاق صورة بطاقة التأمين الخاصة بك للمتابعة"}, "bodyMassIndex": {"en": "Body Mass Index is: ", "ar": "مؤشر كتلة الجسم هو:"}, "noSlotsError": {"en": "No appointments available for selected date", "ar": "لا توجد مواعيد متاحة للتاريخ المحدد"}, "selectSlot": {"en": "Please select Time Slot to continue", "ar": "الرجاء تحديد فترة زمنية للمتابعة"}, "years": {"en": "Years", "ar": "سنوات"}, - "respirationBPM": { "en": "bpm", "ar": "نفس" }, + "respirationBPM": {"en": "bpm", "ar": "نفس"}, "extremeObese": {"en": "Extreme Obese", "ar": "السمنة المفرطة"}, "invoiceDetails": { "en": "Invoice Details", "ar": "تفاصيل الفاتورة" }, "appoDetails": {"en": "Appointment Details", "ar": "تفاصيل الموعد"}, diff --git a/lib/models/Authentication/checkpatient_for_registration.dart b/lib/models/Authentication/checkpatient_for_registration.dart index 420b4adb..def8925f 100644 --- a/lib/models/Authentication/checkpatient_for_registration.dart +++ b/lib/models/Authentication/checkpatient_for_registration.dart @@ -14,6 +14,8 @@ class CheckPatientForRegistration { String tokenID; int patientID; bool isRegister; + String dob; + int isHijri; CheckPatientForRegistration( {this.patientIdentificationID, @@ -30,7 +32,9 @@ class CheckPatientForRegistration { this.deviceTypeID, this.tokenID, this.patientID, - this.isRegister}); + this.isRegister, + this.dob, + this.isHijri}); CheckPatientForRegistration.fromJson(Map json) { patientIdentificationID = json['PatientIdentificationID']; @@ -48,6 +52,8 @@ class CheckPatientForRegistration { tokenID = json['TokenID']; patientID = json['PatientID']; isRegister = json['isRegister']; + dob = json['DOB']; + isHijri = json['IsHijri']; } Map toJson() { @@ -67,6 +73,8 @@ class CheckPatientForRegistration { data['TokenID'] = this.tokenID; data['PatientID'] = this.patientID; data['isRegister'] = this.isRegister; + data['DOB'] = dob; + data['IsHijri'] = isHijri; return data; } } diff --git a/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart b/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart index 45cab249..aa1e3ea5 100644 --- a/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart +++ b/lib/pages/Covid-DriveThru/covid-dirvethru-questions.dart @@ -104,7 +104,7 @@ class CovidDirveThruQuestionsState extends State { Row( children: [ Text( - TranslationBase.of(context).fileNo + ":", + TranslationBase.of(context).nationalIdNumber + ":", style: TextStyle( fontWeight: FontWeight.w600, fontSize: 10, diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 921bec0a..ae2a4e33 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -363,6 +363,7 @@ class _ConfirmLogin extends State { var request = this.getCommonRequest(type: type); request.sMSSignature = await SMSOTP.getSignature(); GifLoaderDialogUtils.showMyDialog(context); + await this.authService.sendActivationCode(request).then((result) { GifLoaderDialogUtils.hideDialog(context); if (result != null && result['isSMSSent'] == true) { diff --git a/lib/pages/login/register.dart b/lib/pages/login/register.dart index 1591d1d5..012669c7 100644 --- a/lib/pages/login/register.dart +++ b/lib/pages/login/register.dart @@ -67,19 +67,14 @@ class _Register extends State { child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - MobileNo( - onNumberChange: (value) => - {mobileNo = value, validateForm()}, - onCountryChange: (value) => countryCode = value), + MobileNo(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value), Container( child: TextFields( controller: nationalIDorFile, onChanged: (value) => validateForm(), keyboardType: TextInputType.number, - prefixIcon: Icon(Icons.chrome_reader_mode, - color: Color(0xFF40ACC9)), - padding: EdgeInsets.only( - top: 20, bottom: 20, left: 10, right: 10), + prefixIcon: Icon(Icons.chrome_reader_mode, color: Color(0xFF40ACC9)), + padding: EdgeInsets.only(top: 20, bottom: 20, left: 10, right: 10), hintText: TranslationBase.of(context).nationalID, )), Row( @@ -120,33 +115,25 @@ class _Register extends State { ), ], ), - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Container( - width: SizeConfig.realScreenWidth * .9, - height: 60, - child: isHijri == 1 - ? TextFields( - onChanged: (value) => {dob = value}, - hintText: 'DD/MM/YYYY', - prefixIcon: Icon(Icons.date_range), - ) - : RaisedButton.icon( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(15.0), - ), - color: Colors.white, - onPressed: () => { - if (isHijri != null) - _selectDate(context) - }, - icon: Icon(Icons.date_range), - label: Text(selectedDate != null - ? "${selectedDate.toLocal()}" - .split(' ')[0] - : TranslationBase.of(context).dob))) - ]) + Row(mainAxisAlignment: MainAxisAlignment.end, children: [ + Container( + width: SizeConfig.realScreenWidth * .9, + height: 60, + child: isHijri == 1 + ? TextFields( + onChanged: (value) => {dob = value}, + hintText: 'DD/MM/YYYY', + prefixIcon: Icon(Icons.date_range), + ) + : RaisedButton.icon( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(15.0), + ), + color: Colors.white, + onPressed: () => {if (isHijri != null) _selectDate(context)}, + icon: Icon(Icons.date_range), + label: Text(selectedDate != null ? "${selectedDate.toLocal()}".split(' ')[0] : TranslationBase.of(context).dob))) + ]) ], ), ), @@ -165,13 +152,8 @@ class _Register extends State { Row( children: [ Expanded( - child: DefaultButton( - TranslationBase.of(context).registerNow, - () => {startRegistration()}, - textColor: Colors.white, - color: isButtonDisabled == true - ? Colors.grey - : Colors.grey[900])) + child: DefaultButton(TranslationBase.of(context).registerNow, () => {startRegistration()}, + textColor: Colors.white, color: isButtonDisabled == true ? Colors.grey : Colors.grey[900])) ], ), ], @@ -181,11 +163,7 @@ class _Register extends State { } Future _selectDate(BuildContext context) async { - final DateTime picked = await showDatePicker( - context: context, - initialDate: DateTime.now(), - firstDate: DateTime(1950, 8), - lastDate: DateTime.now()); + final DateTime picked = await showDatePicker(context: context, initialDate: DateTime.now(), firstDate: DateTime(1950, 8), lastDate: DateTime.now()); if (picked != null && picked != selectedDate) setState(() { selectedDate = picked; @@ -193,30 +171,25 @@ class _Register extends State { } startRegistration() { + final DateFormat dateFormat = DateFormat('dd/MM/yyyy'); if (isButtonDisabled == false) { var request = CheckPatientForRegistration(); request.patientMobileNumber = int.parse(mobileNo); request.zipCode = countryCode; request.patientOutSA = countryCode == '966' ? 0 : 1; - // if (this.loginType == 1) { + request.patientIdentificationID = int.parse(nationalIDorFile.text); request.patientID = 0; request.isRegister = true; - // } else { - // request.patientIdentificationID = 0; - // request.patientID = int.parse(nationalIDorFile.text); - // } + request.dob = isHijri == 1 ? dob : dateFormat.format(selectedDate); + request.isHijri = isHijri; this.checkPatientForRegisteration(request); } } checkPatientForRegisteration(request) { GifLoaderDialogUtils.showMyDialog(context); - this - .authService - .checkPatientForRegisteration(request) - .then((response) => {checkUserStatus(response, request)}) - .catchError((err) { + this.authService.checkPatientForRegisteration(request).then((response) => {checkUserStatus(response, request)}).catchError((err) { GifLoaderDialogUtils.hideDialog(context); ConfirmDialog dialog = new ConfirmDialog( context: context, @@ -233,10 +206,7 @@ class _Register extends State { } void validateForm() { - if (util.validateIDBox(nationalIDorFile.text, loginType) == true && - mobileNo.length >= 9 && - util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true && - isHijri != null) { + if (util.validateIDBox(nationalIDorFile.text, loginType) == true && mobileNo.length >= 9 && util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true && isHijri != null) { setState(() { isButtonDisabled = false; }); @@ -265,8 +235,7 @@ class _Register extends State { } else { nRequest['forRegister'] = true; nRequest['isRegister'] = true; - nRequest["PatientIdentificationID"] = - nRequest["PatientIdentificationID"].toString(); + nRequest["PatientIdentificationID"] = nRequest["PatientIdentificationID"].toString(); sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, nRequest); sharedPref.setString(LOGIN_TOKEN_ID, response['LogInTokenID']); this.chekUserData(response['LogInTokenID']); @@ -312,12 +281,7 @@ class _Register extends State { Navigator.of(context).push(FadePage(page: ConfirmLogin())), } else - { - AppToast.showErrorToast( - message: result - ? result - : TranslationBase.of(context).somethingWentWrong) - } + {AppToast.showErrorToast(message: result ? result : TranslationBase.of(context).somethingWentWrong)} }); } diff --git a/lib/pages/medical/medical_profile_page_new.dart b/lib/pages/medical/medical_profile_page_new.dart index 8f0bb0fc..dc7ff71f 100644 --- a/lib/pages/medical/medical_profile_page_new.dart +++ b/lib/pages/medical/medical_profile_page_new.dart @@ -30,6 +30,7 @@ class _MedicalProfilePageState extends State { projectViewModel = Provider.of(context); var appoCountProvider = Provider.of(context); List myMedicalList = Utils.myMedicalList(projectViewModel: projectViewModel, context: context, count: appoCountProvider.count, isLogin: projectViewModel.isLogin); + print(myMedicalList); return BaseView( onModelReady: (model) => model.getAppointmentHistory(), builder: (_, model, widget1) => AppScaffold( @@ -40,7 +41,7 @@ class _MedicalProfilePageState extends State { isHelp: true, showNewAppBarTitle: true, appBarTitle: TranslationBase.of(context).medicalFile, - onTap:widget.onTap, + onTap: widget.onTap, body: Container( child: SingleChildScrollView( child: Column( diff --git a/lib/widgets/bottom_navigation/bottom_nav_bar.dart b/lib/widgets/bottom_navigation/bottom_nav_bar.dart index 53eb06a2..23fbaccd 100644 --- a/lib/widgets/bottom_navigation/bottom_nav_bar.dart +++ b/lib/widgets/bottom_navigation/bottom_nav_bar.dart @@ -65,7 +65,7 @@ class _BottomNavBarState extends State { index: widget.index, currentIndex: 3, name: TranslationBase.of(context).myFamily, - // isDisabled: projectViewModel.isLoginChild, + isDisabled: projectViewModel.isLoginChild, ), if (widget.index == 0) (widget.showHomeIcon) diff --git a/lib/widgets/bottom_navigation/bottom_navigation_item.dart b/lib/widgets/bottom_navigation/bottom_navigation_item.dart index 820c6652..f01f70af 100644 --- a/lib/widgets/bottom_navigation/bottom_navigation_item.dart +++ b/lib/widgets/bottom_navigation/bottom_navigation_item.dart @@ -47,7 +47,13 @@ class BottomNavigationItem extends StatelessWidget { height: 15, ), Container( - child: Icon(currentIndex == index ? activeIcon : icon, color: currentIndex == index ? secondaryColor : Colors.grey, size: 22.0), + child: Icon(currentIndex == index ? activeIcon : icon, + color: currentIndex == index + ? secondaryColor + : isDisabled + ? Colors.grey[300] + : Colors.grey, + size: 22.0), ), SizedBox( height: 2, @@ -55,7 +61,11 @@ class BottomNavigationItem extends StatelessWidget { Texts( name, textAlign: TextAlign.center, - color: currentIndex == index ? secondaryColor : Colors.grey, + color: currentIndex == index + ? secondaryColor + : isDisabled + ? Colors.grey[300] + : Colors.grey, fontSize: 11, ), SizedBox( @@ -116,7 +126,13 @@ class BottomNavigationItem extends StatelessWidget { height: 15, ), Container( - child: Icon(currentIndex == index ? activeIcon : icon, color: currentIndex == index ? secondaryColor : isDisabled ? Colors.grey[300] : Theme.of(context).dividerColor, size: 22.0), + child: Icon(currentIndex == index ? activeIcon : icon, + color: currentIndex == index + ? secondaryColor + : isDisabled + ? Colors.grey[300] + : Theme.of(context).dividerColor, + size: 22.0), ), SizedBox( height: 2, @@ -124,7 +140,11 @@ class BottomNavigationItem extends StatelessWidget { Texts( name, textAlign: TextAlign.center, - color: currentIndex == index ? secondaryColor : isDisabled ? Colors.grey[300] : Colors.grey, + color: currentIndex == index + ? secondaryColor + : isDisabled + ? Colors.grey[300] + : Colors.grey, fontSize: 11, ), SizedBox( diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart index 2599dcd4..c790aeef 100644 --- a/lib/widgets/drawer/app_drawer_widget.dart +++ b/lib/widgets/drawer/app_drawer_widget.dart @@ -358,8 +358,7 @@ class _AppDrawerState extends State { onTap: () { //NotificationsPage // Navigator.of(context).pop(); - if(!projectProvider.user.isFamily) - Navigator.push(context, FadePage(page: NotificationsPage())); + if (!projectProvider.user.isFamily) Navigator.push(context, FadePage(page: NotificationsPage())); }, ), if (projectProvider.havePrivilege(3)) @@ -552,6 +551,8 @@ class _AppDrawerState extends State { this.sharedPref.clear(); if (mainUser["PatientID"] != result.list.patientID) { result.list.isFamily = true; + } else { + result.list.isFamily = false; } // result.list.cRSVerificationStatus = result['CRSVerificationStatus']; this.sharedPref.setString(APP_LANGUAGE, currentLang);