Merge branch 'development_new_design_2.0' into haroon-new-design

merge-update-with-lab-changes
haroon amjad 4 years ago
commit 4a2e01b8b1

@ -316,7 +316,7 @@ const Map localizedValues = {
"NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"}, "NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"},
"NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"}, "NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"},
"noArrivedAppointments": {"en": "No Arrived Appointments", "ar": "لم يتم حضورها"}, "noArrivedAppointments": {"en": "No Arrived Appointments", "ar": "لم يتم حضورها"},
"MyAppointmentsList": {"en": "Appointments", "ar": "قائمة بمواعدي"}, "MyAppointmentsList": {"en": "Appointments", "ar": "قائمة بمواعيدي"},
"Radiology": {"en": "Radiology", "ar": "الأشعة"}, "Radiology": {"en": "Radiology", "ar": "الأشعة"},
"RadiologySubtitle": {"en": "Result", "ar": "صور وتقارير"}, "RadiologySubtitle": {"en": "Result", "ar": "صور وتقارير"},
"Lab": {"en": "Lab", "ar": "تحليل المختبر"}, "Lab": {"en": "Lab", "ar": "تحليل المختبر"},
@ -610,7 +610,7 @@ const Map localizedValues = {
"years-old": {"en": "years old", "ar": "سنة"}, "years-old": {"en": "years old", "ar": "سنة"},
"drag-point": {"en": "Drag point to change your age", "ar": "اسحب لتغيير عمرك"}, "drag-point": {"en": "Drag point to change your age", "ar": "اسحب لتغيير عمرك"},
"refine": {"en": "Refine", "ar": "تصفية"}, "refine": {"en": "Refine", "ar": "تصفية"},
"reset": {"en": "Reset", "ar": "اعادة تعيين"}, "reset": {"en": "Reset", "ar": "اعادة ضبط"},
"apply": {"en": "Apply", "ar": "تطبيق"}, "apply": {"en": "Apply", "ar": "تطبيق"},
"viewCategorise": {"en": "View All Categories", "ar": "عرض جميع الفئات"}, "viewCategorise": {"en": "View All Categories", "ar": "عرض جميع الفئات"},
"categorise": {"en": "Categories", "ar": "التطبيقات"}, "categorise": {"en": "Categories", "ar": "التطبيقات"},
@ -1489,13 +1489,13 @@ const Map localizedValues = {
"medicalReport": {"en": "Medical Report", "ar": "تقرير طبي"}, "medicalReport": {"en": "Medical Report", "ar": "تقرير طبي"},
"insuredPatient": {"en": "Insured Patient", "ar": "هل لدى المريض تامين؟"}, "insuredPatient": {"en": "Insured Patient", "ar": "هل لدى المريض تامين؟"},
"rateDoctor": {"en": "Rate Doctor", "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": "يرجى إرفاق صورة بطاقة التأمين الخاصة بك للمتابعة"}, "noInsuranceCardAttached": {"en": "Please attach your insurance card image to continue", "ar": "يرجى إرفاق صورة بطاقة التأمين الخاصة بك للمتابعة"},
"bodyMassIndex": {"en": "Body Mass Index is: ", "ar": "مؤشر كتلة الجسم هو:"}, "bodyMassIndex": {"en": "Body Mass Index is: ", "ar": "مؤشر كتلة الجسم هو:"},
"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": "نفس" }, "respirationBPM": {"en": "bpm", "ar": "نفس"},
"extremeObese": {"en": "Extreme Obese", "ar": "السمنة المفرطة"}, "extremeObese": {"en": "Extreme Obese", "ar": "السمنة المفرطة"},
"invoiceDetails": { "en": "Invoice Details", "ar": "تفاصيل الفاتورة" }, "invoiceDetails": { "en": "Invoice Details", "ar": "تفاصيل الفاتورة" },
"appoDetails": {"en": "Appointment Details", "ar": "تفاصيل الموعد"}, "appoDetails": {"en": "Appointment Details", "ar": "تفاصيل الموعد"},

@ -14,6 +14,8 @@ class CheckPatientForRegistration {
String tokenID; String tokenID;
int patientID; int patientID;
bool isRegister; bool isRegister;
String dob;
int isHijri;
CheckPatientForRegistration( CheckPatientForRegistration(
{this.patientIdentificationID, {this.patientIdentificationID,
@ -30,7 +32,9 @@ class CheckPatientForRegistration {
this.deviceTypeID, this.deviceTypeID,
this.tokenID, this.tokenID,
this.patientID, this.patientID,
this.isRegister}); this.isRegister,
this.dob,
this.isHijri});
CheckPatientForRegistration.fromJson(Map<String, dynamic> json) { CheckPatientForRegistration.fromJson(Map<String, dynamic> json) {
patientIdentificationID = json['PatientIdentificationID']; patientIdentificationID = json['PatientIdentificationID'];
@ -48,6 +52,8 @@ class CheckPatientForRegistration {
tokenID = json['TokenID']; tokenID = json['TokenID'];
patientID = json['PatientID']; patientID = json['PatientID'];
isRegister = json['isRegister']; isRegister = json['isRegister'];
dob = json['DOB'];
isHijri = json['IsHijri'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -67,6 +73,8 @@ class CheckPatientForRegistration {
data['TokenID'] = this.tokenID; data['TokenID'] = this.tokenID;
data['PatientID'] = this.patientID; data['PatientID'] = this.patientID;
data['isRegister'] = this.isRegister; data['isRegister'] = this.isRegister;
data['DOB'] = dob;
data['IsHijri'] = isHijri;
return data; return data;
} }
} }

@ -104,7 +104,7 @@ class CovidDirveThruQuestionsState extends State<CovidDirveThruQuestions> {
Row( Row(
children: [ children: [
Text( Text(
TranslationBase.of(context).fileNo + ":", TranslationBase.of(context).nationalIdNumber + ":",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 10, fontSize: 10,

@ -363,6 +363,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
var request = this.getCommonRequest(type: type); var request = this.getCommonRequest(type: type);
request.sMSSignature = await SMSOTP.getSignature(); request.sMSSignature = await SMSOTP.getSignature();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await this.authService.sendActivationCode(request).then((result) { await this.authService.sendActivationCode(request).then((result) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (result != null && result['isSMSSent'] == true) { if (result != null && result['isSMSSent'] == true) {

@ -67,19 +67,14 @@ class _Register extends State<Register> {
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[ children: <Widget>[
MobileNo( MobileNo(onNumberChange: (value) => {mobileNo = value, validateForm()}, onCountryChange: (value) => countryCode = value),
onNumberChange: (value) =>
{mobileNo = value, validateForm()},
onCountryChange: (value) => countryCode = value),
Container( Container(
child: TextFields( child: TextFields(
controller: nationalIDorFile, controller: nationalIDorFile,
onChanged: (value) => validateForm(), onChanged: (value) => validateForm(),
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
prefixIcon: Icon(Icons.chrome_reader_mode, prefixIcon: Icon(Icons.chrome_reader_mode, color: Color(0xFF40ACC9)),
color: Color(0xFF40ACC9)), padding: EdgeInsets.only(top: 20, bottom: 20, left: 10, right: 10),
padding: EdgeInsets.only(
top: 20, bottom: 20, left: 10, right: 10),
hintText: TranslationBase.of(context).nationalID, hintText: TranslationBase.of(context).nationalID,
)), )),
Row( Row(
@ -120,33 +115,25 @@ class _Register extends State<Register> {
), ),
], ],
), ),
Row( Row(mainAxisAlignment: MainAxisAlignment.end, children: <Widget>[
mainAxisAlignment: MainAxisAlignment.end, Container(
children: <Widget>[ width: SizeConfig.realScreenWidth * .9,
Container( height: 60,
width: SizeConfig.realScreenWidth * .9, child: isHijri == 1
height: 60, ? TextFields(
child: isHijri == 1 onChanged: (value) => {dob = value},
? TextFields( hintText: 'DD/MM/YYYY',
onChanged: (value) => {dob = value}, prefixIcon: Icon(Icons.date_range),
hintText: 'DD/MM/YYYY', )
prefixIcon: Icon(Icons.date_range), : RaisedButton.icon(
) shape: RoundedRectangleBorder(
: RaisedButton.icon( borderRadius: BorderRadius.circular(15.0),
shape: RoundedRectangleBorder( ),
borderRadius: BorderRadius.circular(15.0), color: Colors.white,
), onPressed: () => {if (isHijri != null) _selectDate(context)},
color: Colors.white, icon: Icon(Icons.date_range),
onPressed: () => { label: Text(selectedDate != null ? "${selectedDate.toLocal()}".split(' ')[0] : TranslationBase.of(context).dob)))
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<Register> {
Row( Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: DefaultButton( child: DefaultButton(TranslationBase.of(context).registerNow, () => {startRegistration()},
TranslationBase.of(context).registerNow, textColor: Colors.white, color: isButtonDisabled == true ? Colors.grey : Colors.grey[900]))
() => {startRegistration()},
textColor: Colors.white,
color: isButtonDisabled == true
? Colors.grey
: Colors.grey[900]))
], ],
), ),
], ],
@ -181,11 +163,7 @@ class _Register extends State<Register> {
} }
Future<Null> _selectDate(BuildContext context) async { Future<Null> _selectDate(BuildContext context) async {
final DateTime picked = await showDatePicker( final DateTime picked = await showDatePicker(context: context, initialDate: DateTime.now(), firstDate: DateTime(1950, 8), lastDate: DateTime.now());
context: context,
initialDate: DateTime.now(),
firstDate: DateTime(1950, 8),
lastDate: DateTime.now());
if (picked != null && picked != selectedDate) if (picked != null && picked != selectedDate)
setState(() { setState(() {
selectedDate = picked; selectedDate = picked;
@ -193,30 +171,25 @@ class _Register extends State<Register> {
} }
startRegistration() { startRegistration() {
final DateFormat dateFormat = DateFormat('dd/MM/yyyy');
if (isButtonDisabled == false) { if (isButtonDisabled == false) {
var request = CheckPatientForRegistration(); var request = CheckPatientForRegistration();
request.patientMobileNumber = int.parse(mobileNo); request.patientMobileNumber = int.parse(mobileNo);
request.zipCode = countryCode; request.zipCode = countryCode;
request.patientOutSA = countryCode == '966' ? 0 : 1; request.patientOutSA = countryCode == '966' ? 0 : 1;
// if (this.loginType == 1) {
request.patientIdentificationID = int.parse(nationalIDorFile.text); request.patientIdentificationID = int.parse(nationalIDorFile.text);
request.patientID = 0; request.patientID = 0;
request.isRegister = true; request.isRegister = true;
// } else { request.dob = isHijri == 1 ? dob : dateFormat.format(selectedDate);
// request.patientIdentificationID = 0; request.isHijri = isHijri;
// request.patientID = int.parse(nationalIDorFile.text);
// }
this.checkPatientForRegisteration(request); this.checkPatientForRegisteration(request);
} }
} }
checkPatientForRegisteration(request) { checkPatientForRegisteration(request) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
this this.authService.checkPatientForRegisteration(request).then((response) => {checkUserStatus(response, request)}).catchError((err) {
.authService
.checkPatientForRegisteration(request)
.then((response) => {checkUserStatus(response, request)})
.catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
ConfirmDialog dialog = new ConfirmDialog( ConfirmDialog dialog = new ConfirmDialog(
context: context, context: context,
@ -233,10 +206,7 @@ class _Register extends State<Register> {
} }
void validateForm() { void validateForm() {
if (util.validateIDBox(nationalIDorFile.text, loginType) == true && if (util.validateIDBox(nationalIDorFile.text, loginType) == true && mobileNo.length >= 9 && util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true && isHijri != null) {
mobileNo.length >= 9 &&
util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true &&
isHijri != null) {
setState(() { setState(() {
isButtonDisabled = false; isButtonDisabled = false;
}); });
@ -265,8 +235,7 @@ class _Register extends State<Register> {
} else { } else {
nRequest['forRegister'] = true; nRequest['forRegister'] = true;
nRequest['isRegister'] = true; nRequest['isRegister'] = true;
nRequest["PatientIdentificationID"] = nRequest["PatientIdentificationID"] = nRequest["PatientIdentificationID"].toString();
nRequest["PatientIdentificationID"].toString();
sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, nRequest); sharedPref.setObject(REGISTER_DATA_FOR_LOGIIN, nRequest);
sharedPref.setString(LOGIN_TOKEN_ID, response['LogInTokenID']); sharedPref.setString(LOGIN_TOKEN_ID, response['LogInTokenID']);
this.chekUserData(response['LogInTokenID']); this.chekUserData(response['LogInTokenID']);
@ -312,12 +281,7 @@ class _Register extends State<Register> {
Navigator.of(context).push(FadePage(page: ConfirmLogin())), Navigator.of(context).push(FadePage(page: ConfirmLogin())),
} }
else else
{ {AppToast.showErrorToast(message: result ? result : TranslationBase.of(context).somethingWentWrong)}
AppToast.showErrorToast(
message: result
? result
: TranslationBase.of(context).somethingWentWrong)
}
}); });
} }

@ -30,6 +30,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePageNew> {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
var appoCountProvider = Provider.of<ToDoCountProviderModel>(context); var appoCountProvider = Provider.of<ToDoCountProviderModel>(context);
List<Widget> myMedicalList = Utils.myMedicalList(projectViewModel: projectViewModel, context: context, count: appoCountProvider.count, isLogin: projectViewModel.isLogin); List<Widget> myMedicalList = Utils.myMedicalList(projectViewModel: projectViewModel, context: context, count: appoCountProvider.count, isLogin: projectViewModel.isLogin);
print(myMedicalList);
return BaseView<MedicalViewModel>( return BaseView<MedicalViewModel>(
onModelReady: (model) => model.getAppointmentHistory(), onModelReady: (model) => model.getAppointmentHistory(),
builder: (_, model, widget1) => AppScaffold( builder: (_, model, widget1) => AppScaffold(
@ -40,7 +41,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePageNew> {
isHelp: true, isHelp: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
appBarTitle: TranslationBase.of(context).medicalFile, appBarTitle: TranslationBase.of(context).medicalFile,
onTap:widget.onTap, onTap: widget.onTap,
body: Container( body: Container(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(

@ -65,7 +65,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
index: widget.index, index: widget.index,
currentIndex: 3, currentIndex: 3,
name: TranslationBase.of(context).myFamily, name: TranslationBase.of(context).myFamily,
// isDisabled: projectViewModel.isLoginChild, isDisabled: projectViewModel.isLoginChild,
), ),
if (widget.index == 0) if (widget.index == 0)
(widget.showHomeIcon) (widget.showHomeIcon)

@ -47,7 +47,13 @@ class BottomNavigationItem extends StatelessWidget {
height: 15, height: 15,
), ),
Container( 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( SizedBox(
height: 2, height: 2,
@ -55,7 +61,11 @@ class BottomNavigationItem extends StatelessWidget {
Texts( Texts(
name, name,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: currentIndex == index ? secondaryColor : Colors.grey, color: currentIndex == index
? secondaryColor
: isDisabled
? Colors.grey[300]
: Colors.grey,
fontSize: 11, fontSize: 11,
), ),
SizedBox( SizedBox(
@ -116,7 +126,13 @@ class BottomNavigationItem extends StatelessWidget {
height: 15, height: 15,
), ),
Container( 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( SizedBox(
height: 2, height: 2,
@ -124,7 +140,11 @@ class BottomNavigationItem extends StatelessWidget {
Texts( Texts(
name, name,
textAlign: TextAlign.center, 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, fontSize: 11,
), ),
SizedBox( SizedBox(

@ -358,8 +358,7 @@ class _AppDrawerState extends State<AppDrawer> {
onTap: () { onTap: () {
//NotificationsPage //NotificationsPage
// Navigator.of(context).pop(); // Navigator.of(context).pop();
if(!projectProvider.user.isFamily) if (!projectProvider.user.isFamily) Navigator.push(context, FadePage(page: NotificationsPage()));
Navigator.push(context, FadePage(page: NotificationsPage()));
}, },
), ),
if (projectProvider.havePrivilege(3)) if (projectProvider.havePrivilege(3))
@ -552,6 +551,8 @@ class _AppDrawerState extends State<AppDrawer> {
this.sharedPref.clear(); this.sharedPref.clear();
if (mainUser["PatientID"] != result.list.patientID) { if (mainUser["PatientID"] != result.list.patientID) {
result.list.isFamily = true; result.list.isFamily = true;
} else {
result.list.isFamily = false;
} }
// result.list.cRSVerificationStatus = result['CRSVerificationStatus']; // result.list.cRSVerificationStatus = result['CRSVerificationStatus'];
this.sharedPref.setString(APP_LANGUAGE, currentLang); this.sharedPref.setString(APP_LANGUAGE, currentLang);

Loading…
Cancel
Save