family file fixes

merge-requests/436/head
Sultan Khan 4 years ago
parent 5dbb257194
commit 5c8b809e39

@ -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,12 +1489,12 @@ 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": "السمنة المفرطة"},
};

@ -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<String, dynamic> 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<String, dynamic> 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;
}
}

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

@ -363,6 +363,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
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) {

@ -67,19 +67,14 @@ class _Register extends State<Register> {
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
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<Register> {
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
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: <Widget>[
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<Register> {
Row(
children: <Widget>[
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<Register> {
}
Future<Null> _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<Register> {
}
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<Register> {
}
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<Register> {
} 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<Register> {
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)}
});
}

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

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

@ -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(

@ -358,8 +358,7 @@ class _AppDrawerState extends State<AppDrawer> {
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<AppDrawer> {
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);

Loading…
Cancel
Save