Merge branch 'child_vaccines' into 'master'

Child vaccines

See merge request Cloud_Solution/diplomatic-quarter!134
merge-update-with-lab-changes
Mohammad Aljammal 5 years ago
commit 3c54ed00f9

Binary file not shown.

@ -0,0 +1,9 @@
{\rtf1\ansi\ansicpg1252\cocoartf2513
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\f0\fs24 \cf0 keyPassword=HmGsa123\
storePassword=HmGsa123}

@ -3,5 +3,6 @@
<!-- Flutter needs it to communicate with the running application <!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc. to allow setting breakpoints, to provide hot reload, etc.
--> -->
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
</manifest> </manifest>

@ -4,4 +4,5 @@
to allow setting breakpoints, to provide hot reload, etc. to allow setting breakpoints, to provide hot reload, etc.
--> -->
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE" />
</manifest> </manifest>

@ -0,0 +1,4 @@
storePassword=HmGsa123
keyPassword=HmGsa123
keyAlias=DQKey
storeFile=DQKey.jks

@ -7,7 +7,7 @@ import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
const MAX_SMALL_SCREEN = 660; const MAX_SMALL_SCREEN = 660;
const BASE_URL = 'https://uat.hmgwebservices.com/'; const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/';
const GET_PROJECT = 'Services/Lists.svc/REST/GetProject'; const GET_PROJECT = 'Services/Lists.svc/REST/GetProject';
@ -244,8 +244,8 @@ const LANGUAGE = 2;
const PATIENT_OUT_SA = 0; const PATIENT_OUT_SA = 0;
const SESSION_ID = 'TMRhVmkGhOsvamErw'; const SESSION_ID = 'TMRhVmkGhOsvamErw';
const IS_DENTAL_ALLOWED_BACKEND = false; const IS_DENTAL_ALLOWED_BACKEND = false;
const PATIENT_TYPE = 2; const PATIENT_TYPE = 1;
const PATIENT_TYPE_ID = 2; const PATIENT_TYPE_ID = 1;
var DEVICE_TOKEN = ""; var DEVICE_TOKEN = "";
var DeviceTypeID = Platform.isIOS ? 1 : 2; var DeviceTypeID = Platform.isIOS ? 1 : 2;
const LANGUAGE_ID = 2; const LANGUAGE_ID = 2;

@ -1032,4 +1032,101 @@ const Map localizedValues = {
"searchItemError": {"en": "Item name should be more than 3 character ", "ar": "يجب أن يكون اسم العنصر أكثر من 3 أحرف"}, "searchItemError": {"en": "Item name should be more than 3 character ", "ar": "يجب أن يكون اسم العنصر أكثر من 3 أحرف"},
"YouCanFind": {"en": "YouCanFind", "ar": "باستطاعتك العثور على "}, "YouCanFind": {"en": "YouCanFind", "ar": "باستطاعتك العثور على "},
"ItemInSearch": {"en": " Item In Search", "ar": " عنصر في البحث "}, "ItemInSearch": {"en": " Item In Search", "ar": " عنصر في البحث "},
"InvoiceNo": {"en": " Invoice No", "ar": "رقم الفاتورة"},
"SpecialResult": {"en": " Special Result", "ar": "نتيجة خاصة"},
"GeneralResult": {"en": "General Result", "ar": "نتيجة عامة"},
"show-more-btn": {
"en": "Flow Chart",
"ar": "النتائج التراكمية"
},
"value": {
"en": "Value",
"ar": "القيمة"
},
"range": {
"en": "Range",
"ar": "المدى"
},
"out-patient": {
"en": "Out Patient",
"ar": "عيادات خارجية"
},
"in-patient": {
"en": "In Patient",
"ar": "تنويم"
},
"report": {
"en": "Radiology Report",
"ar": "تقرير الاشعة"
},
"open-rad": {
"en": "Open Image",
"ar": "فتح صور الاشعة"
},
"send-copy": {
"en": "Email the Report",
"ar": "أرسل التقرير"
},
"vaccination": {
"en": "Vaccination",
"ar": "جدول التطعيمات"
},
"welcomeBack": {
"en": "Welcome back",
"ar": "مرحبا مرة أخرى"
},
"instructions": {
"en": "Please ensure that the email address is up-to-date and process to view the schedule",
"ar": "يرجى التأكد من صحة عنوان البريد الالكتروني و المتابعة لعرض الجدول "
},
"update-email": {
"en": "Update Email",
"ar": "تحديث البريد الالكتروني"
},
"updated-email": {
"en": "Updated email successfully",
"ar": "تم تحديث البريد الالكتروني"
},
"view-list-children": {
"en": "View List of Children",
"ar": "عرض قائمة الأطفال"
},
"add-child": {
"en": "Add New Child",
"ar": "اضافة طفل"
},
"child-name": {
"en": "Child Name",
"ar": "اسم الطفل"
},
"childDob": {
"en": "Birth Date",
"ar": "تاريخ الولادة"
},
"delete": {
"en": "Delete",
"ar": "حذف"
},
"deleted-child": {
"en": "The request was successful. The children have removed from the vaccination schedule subscription service.",
"ar": "تم حذف الطفل بنجاح"
},
"visit": {
"en": "Visit",
"ar": "زيارة"
},
"description-vaccination": {
"en": "Description",
"ar": "وصف"
},
"due-date": {
"en": "Due date",
"ar": "تاريخ الاستحقاق"
},
}; };

@ -82,7 +82,7 @@ class RequestPrescriptionReport {
data['EpisodeID'] = this.episodeID; data['EpisodeID'] = this.episodeID;
data['ClinicID'] = this.clinicID; data['ClinicID'] = this.clinicID;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
data['DischargeNo'] = this.dischargeNo; // data['DischargeNo'] = this.dischargeNo;
return data; return data;
} }
} }

@ -2,6 +2,7 @@ import 'dart:convert';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
@ -23,6 +24,7 @@ AppSharedPreferences sharedPref = new AppSharedPreferences();
/// ///
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
VitalSignService _vitalSignService = locator<VitalSignService>();
class BaseAppClient { class BaseAppClient {
post(String endPoint, post(String endPoint,
@ -35,7 +37,7 @@ class BaseAppClient {
//Map profile = await sharedPref.getObj(DOCTOR_PROFILE); //Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
String token = await sharedPref.getString(TOKEN); String token = await sharedPref.getString(TOKEN);
var languageID = var languageID =
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); await sharedPref.getString(APP_LANGUAGE);
var user = await sharedPref.getObject(USER_PROFILE); var user = await sharedPref.getObject(USER_PROFILE);
if (body.containsKey('SetupID')) { if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID') body['SetupID'] = body.containsKey('SetupID')
@ -87,8 +89,8 @@ class BaseAppClient {
body['PatientTypeID'] = body.containsKey('PatientTypeID') body['PatientTypeID'] = body.containsKey('PatientTypeID')
? body['PatientTypeID'] != null ? body['PatientTypeID'] != null
? body['PatientTypeID'] ? body['PatientTypeID']
: user['PatientTypeID'] != null :user['PatientType'] != null
? user['PatientTypeID'] ? user['PatientType']
: PATIENT_TYPE_ID : PATIENT_TYPE_ID
: PATIENT_TYPE_ID; : PATIENT_TYPE_ID;
if (user != null) { if (user != null) {
@ -196,6 +198,8 @@ class BaseAppClient {
await sharedPref.remove(LOGIN_TOKEN_ID); await sharedPref.remove(LOGIN_TOKEN_ID);
await authenticatedUserObject.getUser(); await authenticatedUserObject.getUser();
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin = false; Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin = false;
_vitalSignService.weightKg ="";
_vitalSignService.heightCm="";
Navigator.of(AppGlobal.context).pushReplacementNamed(HOME); Navigator.of(AppGlobal.context).pushReplacementNamed(HOME);
} }

@ -1,5 +1,3 @@
import 'dart:convert';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart'; import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
@ -24,7 +22,8 @@ class MyBalanceService extends BaseService {
String logInTokenID; String logInTokenID;
String verificationCode; String verificationCode;
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>(); AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
getPatientAdvanceBalanceAmount() async { getPatientAdvanceBalanceAmount() async {
hasError = false; hasError = false;
@ -61,13 +60,14 @@ class MyBalanceService extends BaseService {
}, body: body); }, body: body);
} }
getPatientInfoByPatientIDAndMobileNumber() async { getPatientInfoByPatientIDAndMobileNumber(AdvanceModel advanceModel) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['MobileNo'] = authenticatedUserObject.user.mobileNumber; body['MobileNo'] = advanceModel.mobileNumber;
body['ProjectID'] = authenticatedUserObject.user.projectID; body['ProjectID'] = advanceModel.hospitalsModel.iD;
body['PatientID'] = advanceModel.fileNumber;
await baseAppClient.post(GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER, await baseAppClient.post(GET_PATIENT_INFO_BY_ID_AND_MOBILE_NUMBER,
onSuccess: (response, statusCode) async { onSuccess: (response, statusCode) async {
@ -81,7 +81,7 @@ class MyBalanceService extends BaseService {
}, body: body); }, body: body);
} }
sendActivationCodeForAdvancePayment({int patientID,int projectID}) async { sendActivationCodeForAdvancePayment({int patientID, int projectID}) async {
hasError = false; hasError = false;
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
@ -111,9 +111,8 @@ class MyBalanceService extends BaseService {
body['LogInTokenID'] = logInTokenID; body['LogInTokenID'] = logInTokenID;
await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT, await baseAppClient.post(CHECK_ACTIVATION_CODE_FOR_ADVANCE_PAYMENT,
onSuccess: (response, statusCode) async { onSuccess: (response, statusCode) async {},
onFailure: (String error, int statusCode) {
}, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
super.error = error; super.error = error;

@ -57,20 +57,30 @@ class PrescriptionsService extends BaseService {
List<PrescriptionReport> prescriptionReportList = List(); List<PrescriptionReport> prescriptionReportList = List();
Future getPrescriptionReport( Future getPrescriptionReport(
{int dischargeNo, int projectId, int clinicID, String setupID,int episodeID}) async { {Prescriptions prescriptions}) async {
hasError = false; hasError = false;
_requestPrescriptionReport.dischargeNo = dischargeNo; _requestPrescriptionReport.dischargeNo = prescriptions.dischargeNo;
_requestPrescriptionReport.projectID = projectId; _requestPrescriptionReport.projectID = prescriptions.projectID;
_requestPrescriptionReport.clinicID = clinicID; _requestPrescriptionReport.clinicID = prescriptions.clinicID;
_requestPrescriptionReport.setupID = setupID; _requestPrescriptionReport.setupID = prescriptions.setupID;
_requestPrescriptionReport.episodeID = episodeID; _requestPrescriptionReport.episodeID = prescriptions.episodeID;
_requestPrescriptionReport.appointmentNo = prescriptions.appointmentNo;
await baseAppClient.post(GET_PRESCRIPTION_REPORT,
await baseAppClient.post(prescriptions.isInOutPatient? GET_PRESCRIPTION_REPORT_ENH : GET_PRESCRIPTION_REPORT,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
prescriptionReportList.clear(); prescriptionReportList.clear();
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) { prescriptionReportEnhList.clear();
prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions)); if(prescriptions.isInOutPatient){
}); response['ListPRM'].forEach((prescriptions) {
prescriptionReportEnhList.add(PrescriptionReportEnh.fromJson(prescriptions));
});
}else{
response['INP_GetPrescriptionReport_List'].forEach((prescriptions) {
prescriptionReportList.add(PrescriptionReport.fromJson(prescriptions));
});
}
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -112,10 +112,10 @@ class MyBalanceViewModel extends BaseViewModel {
} }
} }
Future getPatientInfoByPatientIDAndMobileNumber() async { Future getPatientInfoByPatientIDAndMobileNumber(AdvanceModel advanceModel) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _myBalanceService await _myBalanceService
.getPatientInfoByPatientIDAndMobileNumber(); .getPatientInfoByPatientIDAndMobileNumber(advanceModel);
if (_myBalanceService.hasError) { if (_myBalanceService.hasError) {
error = _myBalanceService.error; error = _myBalanceService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
@ -154,7 +154,7 @@ class MyBalanceViewModel extends BaseViewModel {
Future getFamilyFiles() async { Future getFamilyFiles() async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _myBalanceService.getFamilyFiles(); await _myBalanceService.getSharedRecordByStatus();
if (_myBalanceService.hasError) { if (_myBalanceService.hasError) {
error = _myBalanceService.error; error = _myBalanceService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);

@ -103,9 +103,9 @@ class PrescriptionsViewModel extends BaseViewModel {
notifyListeners(); notifyListeners();
} }
getPrescriptionReport({int dischargeNo,int projectId,int clinicID,String setupID,int episodeID}) async { getPrescriptionReport({Prescriptions prescriptions}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReport(dischargeNo: dischargeNo,projectId: projectId,clinicID: clinicID,setupID: setupID,episodeID: episodeID); await _prescriptionsService.getPrescriptionReport(prescriptions: prescriptions);
if (_prescriptionsService.hasError) { if (_prescriptionsService.hasError) {
error = _prescriptionsService.error; error = _prescriptionsService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);

@ -23,6 +23,7 @@ void main() async {
class MyApp extends StatelessWidget { class MyApp extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final themeNotifier = Provider.of<ThemeNotifier>(context);
return LayoutBuilder( return LayoutBuilder(
builder: (context, constraints) { builder: (context, constraints) {
@ -48,6 +49,7 @@ class MyApp extends StatelessWidget {
], ],
child: Consumer<ProjectViewModel>( child: Consumer<ProjectViewModel>(
builder: (context, projectProvider, child) => MaterialApp( builder: (context, projectProvider, child) => MaterialApp(
showSemanticsDebugger: false, showSemanticsDebugger: false,
title: 'Diplomatic Quarter App', title: 'Diplomatic Quarter App',
locale: projectProvider.appLocal, locale: projectProvider.appLocal,
@ -61,8 +63,9 @@ class MyApp extends StatelessWidget {
const Locale('ar', ''), // Arabic const Locale('ar', ''), // Arabic
const Locale('en', ''), // English const Locale('en', ''), // English
], ],
theme: ThemeData( //theme: themeNotifier.getTheme(),
fontFamily: projectProvider.isArabic? 'Cairo' : 'WorkSans', theme:ThemeData(
fontFamily:projectProvider.isArabic ? 'Cairo' : 'WorkSans',
primarySwatch: Colors.blue, primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity, visualDensity: VisualDensity.adaptivePlatformDensity,
brightness: Brightness.light, brightness: Brightness.light,

@ -123,7 +123,16 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
'assets/images/new-design/my_file_bottom_bar.png', 'assets/images/new-design/my_file_bottom_bar.png',
title: TranslationBase.of(context).myMedicalFile, title: TranslationBase.of(context).myMedicalFile,
), ),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: LiveCareHome(),
),
),
imageLocation: 'assets/images/new-design/liveCare_ar_bg.png',
title: TranslationBase.of(context).livecare,
),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
@ -148,7 +157,15 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
'assets/images/al-habib_online_payment_service_icon.png', 'assets/images/al-habib_online_payment_service_icon.png',
title: TranslationBase.of(context).onlinePaymentService, title: TranslationBase.of(context).onlinePaymentService,
), ),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
),
imageLocation:
'assets/images/al-habib_online_payment_service_icon.png',
title: 'Covid-19- Drive-Thru Test',
),
ServicesContainer( ServicesContainer(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
@ -163,7 +180,37 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
imageLocation: 'assets/images/emergency_service_image.png', imageLocation: 'assets/images/emergency_service_image.png',
title: TranslationBase.of(context).emergencyService, title: TranslationBase.of(context).emergencyService,
), ),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: ParkingPage(),
),
),
imageLocation: 'assets/images/pharmacy_logo.png',
title: 'Pharmacy'),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: InsuranceUpdate(),
),
),
imageLocation:
'assets/images/medical/insurance_card_icon.png',
title: TranslationBase.of(context).updateInsurance,
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: authUser.patientID == null
? EReferralIndexPage()
: EReferralPage()),
),
imageLocation: 'assets/images/ereferral_service_icon.png',
title: 'E-Referral',
),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
@ -175,7 +222,15 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
'assets/images/new-design/family_menu_icon_red.png', 'assets/images/new-design/family_menu_icon_red.png',
title: 'My Family', title: 'My Family',
), ),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: ChildVaccinesPage()),
),
imageLocation:
'assets/images/new-design/children_vaccines_icon.png',
title: 'Child Vaccines',
),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
@ -187,7 +242,61 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
'assets/images/new-design/upcoming_icon_bottom_bar.png', 'assets/images/new-design/upcoming_icon_bottom_bar.png',
title: TranslationBase.of(context).todoList, title: TranslationBase.of(context).todoList,
), ),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: SymptomInfo()),
),
imageLocation: 'assets/images/new-design/body_icon.png',
title: 'Symptom Checker'),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(page: BloodDonationPage()),
),
imageLocation: 'assets/images/new-design/blood_icon.png',
title: 'Blood Donation',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: (HealthCalculators()),
),
),
imageLocation:
'assets/images/new-design/health_calculator_icon.png',
title: 'Health Calculators',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: HealthConverter(),
),
),
imageLocation:
'assets/images/new-design/health_convertor_icon.png',
title: 'Health Converter',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: H2OPageIndexPage(),
),
),
imageLocation: 'assets/images/new-design/water_icon.png',
title: 'H2O',
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(),
),
imageLocation: 'assets/images/new-design/smartwatch_icon.png',
title: TranslationBase.of(context).smartWatches,
),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,

@ -213,6 +213,9 @@ class ConfirmPaymentPage extends StatelessWidget {
appo.projectID.toString(), appo.projectID.toString(),
authenticatedUser.emailAddress, authenticatedUser.emailAddress,
paymentMethod, paymentMethod,
authenticatedUser.patientType,
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser, authenticatedUser,
browser); browser);
} }

@ -573,6 +573,9 @@ class _BookSuccessState extends State<BookSuccess> {
appo.projectID.toString(), appo.projectID.toString(),
authenticatedUser.emailAddress, authenticatedUser.emailAddress,
paymentMethod, paymentMethod,
authenticatedUser.patientType,
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser, authenticatedUser,
widget.browser); widget.browser);
} }

@ -0,0 +1,108 @@
import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/vaccinationtable_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class ChildDetailsWidget extends StatelessWidget {
final ChildVaccinesViewModel model;
final List_BabyInformationModel babyInfo;
DeleteBaby deleteBaby = DeleteBaby();
ChildDetailsWidget({this.model, this.babyInfo});
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(left: 5, right: 5, bottom: 10),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
border: Border.all(color: Colors.white, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(5)),
color: Colors.white,
),
padding: EdgeInsets.all(12),
width: 200,
//double.infinity,
child: Column(
children: [
Row(children: [
Texts(TranslationBase.of(context).childName),
]),
Row(children: [
Texts(babyInfo.babyName.trim()),
]),
Row(children: [
IconButton(
icon: Image.asset(babyInfo.gender == 1
? 'assets/images/new-design/male.png'
: 'assets/images/new-design/female.png'),
tooltip: '',
onPressed: () {
},
),
Texts(babyInfo.genderDescription),
IconButton(
icon: Icon(
Icons.remove_red_eye,
color: Colors.red,
),
tooltip: '',
onPressed: () {
Navigator.push(
context,
FadePage(
page: VaccinationTablePage(babyInfo: babyInfo,),
),
);
},
)
]),
Row(children: [
Texts(TranslationBase.of(context).childDob),
]),
Row(
children: [
IconButton(
icon: new Image.asset(
'assets/images/new-design/calender-secondary.png'),
tooltip: '',
),
Texts(
DateUtil.yearMonthDay(babyInfo.dOB),
),
],
),
Row(children: [
IconButton(
icon: new Image.asset('assets/images/new-design/garbage.png'),
tooltip: '',
onPressed: () async {
await model.deleteBabyOrders(newChild: deleteBaby);
deleteBaby.babyID = babyInfo.babyID;
await model.deleteBabyOrders(newChild: deleteBaby);
if (model.isDeleted) {
AppToast.showSuccessToast(message: TranslationBase.of(context).deletedChild);
Navigator.pop(context, model.isDeleted);
} else {
//TODO handling error
}
},
),
Texts(TranslationBase.of(context).delete),
]),
SizedBox(
height: 12,
),
],
),
);
}
}

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/pages/ChildVaccines/add_newchild_page.dart'
import 'package:diplomaticquarterapp/pages/ChildVaccines/vaccinationtable_page.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/vaccinationtable_page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.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/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';
@ -13,190 +14,85 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'ChidDetailsWidget.dart';
import 'dialogs/delete_child.dart'; import 'dialogs/delete_child.dart';
class ChildPage extends StatefulWidget { class ChildPage extends StatefulWidget {
@override @override
_ChildPageState createState() => _ChildPageState(); _ChildPageState createState() => _ChildPageState();
} }
//TODO
class _ChildPageState extends State<ChildPage> class _ChildPageState extends State<ChildPage>
with SingleTickerProviderStateMixin { with SingleTickerProviderStateMixin {
DeleteBaby deleteBaby = DeleteBaby(); DeleteBaby deleteBaby = DeleteBaby();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var checkedValue = true; var checkedValue = true;
return BaseView<ChildVaccinesViewModel>( return BaseView<ChildVaccinesViewModel>(
onModelReady: (model) => model.getNewUserOrders(), onModelReady: (model) => model.getNewUserOrders(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: " Vaccination", appBarTitle: TranslationBase.of(context).vaccination,
baseViewModel: model, baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.only(left: 15, right: 15, top: 70), margin: EdgeInsets.only(left: 10, right: 10, top: 10),
child: Column( child: Column(
children: [ children: [
...List.generate( GridView.builder(
model.babyInformationModelList.length, shrinkWrap: true,
(index) => Container( primary: false,
margin: EdgeInsets.only( physics: NeverScrollableScrollPhysics(),
left: 0, right: 0, bottom: 20), gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
decoration: BoxDecoration( childAspectRatio: MediaQuery.of(context).size.width /
shape: BoxShape.rectangle, (MediaQuery.of(context).size.height / 1.45),
border: Border.all( ),
color: Colors.white, width: 0.5), itemCount: model.babyInformationModelList.length,
borderRadius: itemBuilder: (BuildContext context, int index) {
BorderRadius.all(Radius.circular(5)), return ChildDetailsWidget(
color: Colors.white, model: model,
), babyInfo: model.babyInformationModelList[index],
padding: EdgeInsets.all(12), );
width: 200,//double.infinity,
child: Column(
children: [
Row(children: [
Texts("CHILD NAME"),
]),
Row(children: [
Texts(model
.babyInformationModelList[index]
.babyName
.trim()),
]),
Row(children: [
IconButton(
icon: Image.asset(model
.babyInformationModelList[
index]
.gender ==
1
? 'assets/images/new-design/male.png'
: 'assets/images/new-design/female.png'),
tooltip: '',
onPressed: () {
setState(() {
// _volume += 10;
// launch("tel://" +model.FindusHospitalModelList[index].phoneNumber);
});
},
),
Texts(model
.babyInformationModelList[index]
.genderDescription),
IconButton(
icon: Icon(
Icons.remove_red_eye,
color: Colors.red,
),
tooltip: '',
onPressed: () {
Navigator.push(
context,
FadePage(
page: VaccinationTablePage(),
),
);
},
)
]),
Row(children: [
Texts("Birthday"),
]),
Row(children: [
IconButton(
icon: new Image.asset(
'assets/images/new-design/calender-secondary.png'),
tooltip: '',
onPressed: () {
setState(() {
});
},
),
Texts(DateUtil.yearMonthDay(model
.babyInformationModelList[index]
.dOB)),
]),
Row(children: [
IconButton(
icon: new Image.asset(
'assets/images/new-design/garbage.png'),
tooltip: '',
onPressed: ()async {
//=====================
await model.deleteBabyOrders(newChild:deleteBaby );
deleteBaby.babyID=model.babyInformationModelList[index]
.babyID;
await model.deleteBabyOrders(newChild:deleteBaby );
if(model.isDeleted){
AppToast.showSuccessToast(message: "Record Deleted");
Navigator.pop(context,model.isDeleted);
}else{
//TODO handling error
}
},
),
Texts("Delete"),
]),
SizedBox(
height: 12,
),
],
),
),
)
],
))
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.12,
width: double.infinity,
padding: EdgeInsets.all(15),
child: SecondaryButton(
textColor: Colors.white,
color: checkedValue == false
? Colors.white24
: Color.fromRGBO(
63,
72,
74,
1,
),
label: "ADD NEW CHILD ",
//
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddNewChildPage(),
),
).then((value) {
if (value) model.getNewUserOrders();
});
}, },
), ),
), SizedBox(
)); height: 15,
),
],
),
),
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
padding: EdgeInsets.all(15),
child: SecondaryButton(
textColor: Colors.white,
color: checkedValue == false
? Colors.white24
: Color.fromRGBO(
63,
72,
74,
1,
),
label: TranslationBase.of(context).addChild,
//
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddNewChildPage(),
),
).then((value) {
if (value) model.getNewUserOrders();
});
},
),
),
),
);
} }
} }

@ -1,10 +1,10 @@
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.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/ChildVaccines/child_page.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.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/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/input/text_field.dart'; import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
@ -13,214 +13,147 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class ChildVaccinesPage extends StatefulWidget { class ChildVaccinesPage extends StatefulWidget {
@override @override
_ChildVaccinesPageState createState() => _ChildVaccinesPageState(); _ChildVaccinesPageState createState() => _ChildVaccinesPageState();
} }
class _ChildVaccinesPageState extends State<ChildVaccinesPage> class _ChildVaccinesPageState extends State<ChildVaccinesPage>
with SingleTickerProviderStateMixin{ with SingleTickerProviderStateMixin {
TextEditingController titleController = TextEditingController(); TextEditingController titleController = TextEditingController();
var checkedValue=false; var checkedValue = false;
String addEmail=""; String addEmail = "";
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<UserInformationViewModel>( return BaseView<UserInformationViewModel>(
onModelReady: (model) => model.getUserInformationRequestOrders(), onModelReady: (model) => model.getUserInformationRequestOrders(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
appBarTitle: " Vaccination",//TranslationBase.of(context).advancePayment, appBarTitle: TranslationBase.of(context).vaccination,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [ children: [
SizedBox( SizedBox(
height: 20, height: 20,
), ),
Padding(
Padding( padding: const EdgeInsets.all(10.0),
padding: const EdgeInsets.all(10.0), child: Container(
child:Container( child: Texts(
child: Texts("Welcome back",fontSize: 20,), TranslationBase.of(context).welcomeBackV,
) , fontSize: 20,
),
Divider(color:Colors.black , indent: 10,
endIndent: 10,),
SizedBox(
height: 20,
),
Padding(
padding: const EdgeInsets.all(10.0),
child:Container(
child: Texts("Please ensure that the email address is up-to-date and process to view the schedule",fontSize: 20,),
) ,
), ),
),
Divider(color:Colors.black , indent: 10, ),
endIndent: 10,), Divider(
Padding( color: Colors.black,
padding: const EdgeInsets.all(10.0), indent: 10,
child:Container( endIndent: 10,
),
margin: EdgeInsets.only(left: 10, right: 10, top: 15), SizedBox(
child: TextFields( height: 20,
fillColor: Colors.red, ),
Padding(
hintText: model.user.emailAddress, padding: const EdgeInsets.all(10.0),
controller: titleController, child: Container(
fontSize: 20, child: Texts(
hintColor: Colors.black, TranslationBase.of(context).instructions,
fontWeight: FontWeight.w600, fontSize: 20,
onChanged: (text) {
addEmail=text;
model.user.emailAddress==addEmail?checkedValue=false:checkedValue=true;
},
validator: (value) {
if (value == null)
{
return model.user.emailAddress;
}
else
{
return model.user.emailAddress;}
},
),
),
), ),
Container( ),
height: MediaQuery.of(context).size.height * 0.12, ),
width: double.infinity, Divider(
color: Colors.black,
padding: EdgeInsets.all(15), indent: 10,
child: SecondaryButton( endIndent: 10,
textColor: Colors.white, ),
color: checkedValue== false ?Colors.white24:Color.fromRGBO(63, 72, 74, 1,), Padding(
label: "UPDATE EMAIL", padding: const EdgeInsets.all(10.0),
// child: Container(
onTap: (){ margin: EdgeInsets.only(left: 10, right: 10, top: 15),
model.user.emailAddress=addEmail.toString(); child: TextFields(
AppToast.showSuccessToast( fillColor: Colors.red,
message: "Email updated"); hintText: model.user.emailAddress,
// bloodDetails.city=_selectedHospital.toString(); controller: titleController,
fontSize: 20,
// bloodDetails. hintColor: Colors.black,
}, fontWeight: FontWeight.w600,
onChanged: (text) {
addEmail = text;
), model.user.emailAddress == addEmail
? checkedValue = false
: checkedValue = true;
},
validator: (value) {
if (value == null) {
return model.user.emailAddress;
} else {
return model.user.emailAddress;
}
},
), ),
Container( ),
height: MediaQuery.of(context).size.height * 0.12, ),
width: double.infinity, Container(
height: MediaQuery.of(context).size.height * 0.10,
padding: EdgeInsets.all(15), width: double.infinity,
child: SecondaryButton( padding: EdgeInsets.all(15),
textColor: Colors.white, child: SecondaryButton(
color: Color.fromRGBO(63, 72, 74, 1,), textColor: Colors.white,
label: " VIEW LIST OF CHILDREN", color: checkedValue == false
// ? Colors.white24
onTap: () => Navigator.push( : Color.fromRGBO(
context, 63,
FadePage( 72,
page: ChildPage(), 74,
1,
),
), ),
label: TranslationBase.of(context).updateEmail,
//
), onTap: () {
), model.user.emailAddress = addEmail.toString();
AppToast.showSuccessToast(
// Texts( message: TranslationBase.of(context).updatedEmail);
// // TranslationBase.of(context).advancePaymentLabel, // bloodDetails.city=_selectedHospital.toString();
// model.user.emailAddress,
// textAlign: TextAlign.center, // bloodDetails.
// ), },
SizedBox( ),
height: 12, ),
), Container(
SizedBox( height: MediaQuery.of(context).size.height * 0.10,
height: 12, width: double.infinity,
), padding: EdgeInsets.all(15),
SizedBox( child: SecondaryButton(
height: 12, textColor: Colors.white,
), color: Color.fromRGBO(
63,
SizedBox( 72,
height: 12, 74,
), 1,
SizedBox(
height: 12,
), ),
label: TranslationBase.of(context).viewListChildren,
SizedBox( //
height: 10, onTap: () => Navigator.push(
context,
FadePage(
page: ChildPage(),
),
), ),
// Row( ),
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Center(
// child: Container(
// color: Colors.white,
// width: 350,
// child: InkWell(
// onTap: () {
// showDialog(
// context: context,
// builder: (_) =>
// AssetGiffyDialog(
// title: Text(
// "",
// style: TextStyle(
// fontSize: 22.0,
// fontWeight:
// FontWeight
// .w600),
// ),
// image: Image.asset(
// 'assets/images/BloodChrt_EN.png'),
// buttonCancelText:
// Text('cancel'),
// buttonCancelColor:
// Colors.grey,
// onlyCancelButton: true,
// ));
// },
// child: Container(
// width: 250,
// height: 200,
// child:Image.asset(
// 'assets/images/BloodChrt_EN.png')),
// ),
// ),
// ),
// ],
// ),
SizedBox(
height: MediaQuery.of(context).size.height * 0.15,
)
],
), ),
SizedBox(
), height: MediaQuery.of(context).size.height * 0.15,
)
],
), ),
),
),
); );
} }
} }

@ -14,6 +14,7 @@ class SelectGenderDialog extends StatefulWidget {
} }
class _SelectGenderDialogState extends State<SelectGenderDialog> { class _SelectGenderDialogState extends State<SelectGenderDialog> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SimpleDialog( return SimpleDialog(

@ -1,101 +1,154 @@
import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/vaccination_table_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/vaccination_table_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.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/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/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_html/flutter_html.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'dialogs/SelectGenderDialog.dart'; import 'dialogs/SelectGenderDialog.dart';
class VaccinationTablePage extends StatelessWidget { class VaccinationTablePage extends StatelessWidget {
final List_BabyInformationModel babyInfo;
const VaccinationTablePage({Key key, this.babyInfo}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var checkedValue; var checkedValue;
return BaseView<VaccinationTableViewModel>( return BaseView<VaccinationTableViewModel>(
onModelReady: (model) => model.getCreateVaccinationTable(),//getUserTermsAndConditions(), onModelReady: (model) => model.getCreateVaccinationTable(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
appBarTitle: "Vaccination", appBarTitle: TranslationBase.of(context).vaccination,
body: SingleChildScrollView( body: SingleChildScrollView(
child:Container( child: Container(
margin: EdgeInsets.only(left: 15,right: 15,top: 70), margin: EdgeInsets.only(left: 15, right: 15, top: 10),
child: Column( child: Column(
children: [//babyInformationModelList.length crossAxisAlignment: CrossAxisAlignment.start,
...List.generate(model.creteVaccinationTableModelList.length, (index) => children: [
Container( Row(
decoration: BoxDecoration( children: [
shape: BoxShape.rectangle, Expanded(
border: Border.all(color: Colors.white, width: 0.5), child: Column(
borderRadius: BorderRadius.all(Radius.circular(5)), children: [
color: Colors.white, Texts(TranslationBase.of(context).childName),
Texts(babyInfo.babyName??'',fontWeight: FontWeight.w600,),
],
),
),
Expanded(
child: Column(children: [
Texts(TranslationBase.of(context).childDob),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(FontAwesomeIcons.calendarCheck,color: Colors.red,),
SizedBox(width: 15,),
Texts(DateUtil.yearMonthDay(babyInfo.dOB)??''),
],
),
],
),
),
],
),
SizedBox(height: 15,),
Divider(),
Column(
children: [
Row(
children: [
Texts(TranslationBase.of(context).visit),
SizedBox(
width: 10,
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Texts(TranslationBase.of(context).descriptionVaccination),
],
),
), ),
padding: EdgeInsets.all(12), Texts(TranslationBase.of(context).dueDate),
width: double.infinity, ],
child: Column( ),
],
),
...List.generate(
model.creteVaccinationTableModelList.length,
(index) => Container(
// decoration: BoxDecoration(
// shape: BoxShape.rectangle,
// border: Border.all(color: Colors.white, width: 0.5),
// borderRadius: BorderRadius.all(Radius.circular(5)),
// // color: Colors.white,
// ),
padding: EdgeInsets.all(12),
width: double.infinity,
child: Column(
children: [
Row(
children: [ children: [
Row(children: [ Texts(model
Text(model.creteVaccinationTableModelList[index].visit), .creteVaccinationTableModelList[index].visit),
SizedBox(width: 10,), SizedBox(
width: 10,
Expanded( ),
child: Column( Expanded(
mainAxisAlignment: MainAxisAlignment.start, child: Column(
crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Html( children: [
// data:"<html><head><style type='text/css'>.Test {list-style-image:url('http://10.50.100.198:4444/Images/Bullet_List_Small.png');}</style></head><body><table><tr align='left'><td align='left'>BCG</td></tr><tr align='left'><td align='left'>HEPATITIS B</td></tr></table></body></html>"//model.creteVaccinationTableModelList[index].vaccinesDescription Html(
data:model.creteVaccinationTableModelList[index].vaccinesDescription, data: model.creteVaccinationTableModelList[index].vaccinesDescription,
),
), ],
],), ),
), ),
Text(model.creteVaccinationTableModelList[index].givenAt), Texts(model.creteVaccinationTableModelList[index].givenAt),
],),
Divider(color:Colors.black ,),
], ],
) ),
Divider(
color: Colors.white,height: 3,thickness: 1.0,
) ),
],
),
),
) )
], ],
), ),
),
), ),
), bottomSheet: Padding(
bottomSheet: Container( padding: const EdgeInsets.all(8.0),
height: MediaQuery.of(context).size.height * 0.12, child: Container(
width: double.infinity, height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
child: SecondaryButton( child: SecondaryButton(
textColor: Colors.white, textColor: Colors.white,
color: checkedValue== false ?Colors.white24:Color.fromRGBO(63, 72, 74, 1,), color: checkedValue == false
label: "Send Email ", ? Colors.white24
// : Color.fromRGBO(63, 72, 74, 1,),
onTap: () { label: TranslationBase.of(context).sendEmail,
//SelectGenderDialog(); onTap: () {
//=============== showDialog(
showDialog( context: context,
context: context, child: SelectGenderDialog(),
child: SelectGenderDialog( );
), },
); ),
//=========
}
), ),
), ),
), ),

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
@ -144,7 +145,7 @@ class _AddMember extends State<AddMember> {
request.zipCode = countryCode; request.zipCode = countryCode;
request.isRegister = false; request.isRegister = false;
request.patientStatus = 2; request.patientStatus = 2;
loading(true); GifLoaderDialogUtils.showMyDialog(context);
familyFileProvider familyFileProvider
.addFamilyFile(request) .addFamilyFile(request)
.then((value) => manageFamily(value)) .then((value) => manageFamily(value))
@ -154,18 +155,21 @@ class _AddMember extends State<AddMember> {
} }
manageFamily(addMemberResult) { manageFamily(addMemberResult) {
loading(false); GifLoaderDialogUtils.hideDialog(context);
ConfirmDialog dialog = new ConfirmDialog( if(addMemberResult is String ==false){
context: context, ConfirmDialog dialog = new ConfirmDialog(
confirmMessage: addMemberResult['ShareFamilyFileObj']['Message'], context: context,
okText: TranslationBase.of(context).confirm, confirmMessage: addMemberResult['ShareFamilyFileObj']['Message'],
cancelText: TranslationBase.of(context).cancel_nocaps, okText: TranslationBase.of(context).confirm,
okFunction: () => { cancelText: TranslationBase.of(context).cancel_nocaps,
insertFamilyData(addMemberResult), okFunction: () => {
ConfirmDialog.closeAlertDialog(context) insertFamilyData(addMemberResult),
}, ConfirmDialog.closeAlertDialog(context)
cancelFunction: () => {}); },
dialog.showAlertDialog(context); cancelFunction: () => {});
dialog.showAlertDialog(context);
}
} }
insertFamilyData(addMemberResult) { insertFamilyData(addMemberResult) {

@ -75,7 +75,7 @@ class AddFamilyMemberType extends StatelessWidget {
), ),
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context)
.nationalID, .idNo,
fontSize: SizeConfig fontSize: SizeConfig
.textMultiplier * .textMultiplier *
2, 2,
@ -113,9 +113,10 @@ class AddFamilyMemberType extends StatelessWidget {
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context)
.fileNo, .fileNo,
textAlign: TextAlign.center,
fontSize: SizeConfig fontSize: SizeConfig
.textMultiplier * .textMultiplier *
2, 1.8,
) )
], ],
), ),

@ -1,7 +1,10 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/BranchView.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -31,7 +34,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
AppSharedPreferences sharedPref = new AppSharedPreferences(); AppSharedPreferences sharedPref = new AppSharedPreferences();
var userID; var userID;
TabController _tabController; TabController _tabController;
int _tabIndex = 0;
@override @override
void initState() { void initState() {
_tabController = new TabController(length: 2, vsync: this, initialIndex: 0); _tabController = new TabController(length: 2, vsync: this, initialIndex: 0);
@ -41,41 +44,102 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
bool expandFlag = false; bool expandFlag = false;
Widget build(BuildContext context) { Widget build(BuildContext context) {
// return Scaffold( return AppScaffold(
// appBar: AppBar( appBarTitle: TranslationBase.of(context).myFamilyFiles,
// bottom: TabBar( isShowAppBar: widget.isAppbarVisible,
// indicatorColor: Colors.red, body: Scaffold(
// tabs: [ extendBodyBehindAppBar: true,
// Padding( appBar: PreferredSize(
// padding: EdgeInsets.all(6), preferredSize: Size.fromHeight(65.0),
// child: AppText( child: Stack(
// TranslationBase.of(context).family, children: <Widget>[
// color: Colors.white, Positioned(
// )), bottom: 1,
// Padding( left: 0,
// padding: EdgeInsets.all(6), right: 0,
// child: AppText( child: BackdropFilter(
// TranslationBase.of(context).request, filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
// color: Colors.white, child: Container(
// )), color: Theme.of(context)
// ], .scaffoldBackgroundColor
// controller: _tabController, .withOpacity(0.8),
// ), height: 70.0,
// ),
// ), ),
// body: TabBarView( ),
// // physics: NeverScrollableScrollPhysics(), Center(
// children: [myFamilyDetails(context), myFamilyRequest(context)], child: Container(
// controller: _tabController), height: 60.0,
// ); margin: EdgeInsets.only(top: 10.0),
// //bottomNavigationBar: BottomBarSearch()); width: MediaQuery.of(context).size.width * 0.92, // 0.9,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context).dividerColor,
width: 0.9), //width: 0.7
),
color: Colors.white),
child: Center(
child: TabBar(
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
//indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: AppText(TranslationBase.of(context).family),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: AppText(TranslationBase.of(context).request),
),
),
],
),
),
),
),
],
),
),
body: Column(
children: <Widget>[
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: [
myFamilyDetails(context),
myFamilyRequest(context)
],
),
)
],
),
),
);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).myFamilyFiles, appBarTitle: TranslationBase.of(context).myFamilyFiles,
isShowAppBar: widget.isAppbarVisible, isShowAppBar: widget.isAppbarVisible,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
height: SizeConfig.screenHeight, height: SizeConfig.screenHeight *.9,
width: SizeConfig.realScreenWidth, width: SizeConfig.realScreenWidth,
padding: EdgeInsets.all(20), padding: EdgeInsets.all(20),
child: Stack( child: Stack(
@ -84,12 +148,11 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
controller: _tabController, controller: _tabController,
indicatorColor: Colors.red, indicatorColor: Colors.red,
tabs: [ tabs: [
Padding( Tab( // padding: EdgeInsets.all(6),
padding: EdgeInsets.all(6), child:AppText(TranslationBase.of(context).family)),
child: Text(TranslationBase.of(context).family)), Tab(
Padding( // padding: EdgeInsets.all(6),
padding: EdgeInsets.all(6), child:AppText(TranslationBase.of(context).request)),
child: Text(TranslationBase.of(context).request)),
], ],
), ),
TabBarView( TabBarView(
@ -228,7 +291,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
SingleChildScrollView( SingleChildScrollView(
child: Container( child: Container(
height: MediaQuery.of(context).size.height, height: MediaQuery.of(context).size.height,
margin: EdgeInsets.only(top:50), margin: EdgeInsets.only(top:65),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
RoundedContainer( RoundedContainer(
@ -255,34 +318,37 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
else else
return Column( return Column(
children: [ children: [
Row( // Padding(padding: EdgeInsets.only(left:10, right:10),
mainAxisAlignment: // child:
MainAxisAlignment.spaceBetween, // Row(
children: <Widget>[ // mainAxisAlignment:
Expanded( // MainAxisAlignment.spaceBetween,
flex: 3, // children: <Widget>[
child: Text(TranslationBase.of(context) // Expanded(
.request)), // flex: 3,
Expanded( // child: Text(TranslationBase.of(context)
flex: 2, // .request)),
child: Text( // Expanded(
TranslationBase.of(context) // flex: 2,
.switchUser, // child: Text(
)), // TranslationBase.of(context)
Expanded( // .switchUser,
flex: 1, // )),
child: Text( // Expanded(
TranslationBase.of(context) // flex: 1,
.deleteView, // child: Text(
)), // TranslationBase.of(context)
], // .deleteView,
), // )),
// ],
// )),
Column(children: [ Column(children: [
Row(children: [ Padding(
padding: EdgeInsets.only(left:10, right:10), child:Row(children: [
Expanded(flex: 3, child: AppText('Name')), Expanded(flex: 3, child: AppText('Name')),
Expanded(flex: 1, child: AppText('Allow')), Expanded(flex: 1, child: AppText('Allow')),
Expanded(flex: 1, child: AppText('Reject')), Expanded(flex: 1, child: AppText('Reject')),
]), ])),
Column( Column(
children:familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList children:familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList
.map<Widget>((result) { .map<Widget>((result) {
@ -302,8 +368,8 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
color: Colors.black, color: Colors.black,
), ),
onPressed: () { onPressed: () {
acceptRequest( acceptRemoveRequest(
result, context); result.iD, 3, context);
}, },
)), )),
Expanded( Expanded(
@ -314,8 +380,8 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
color: Colors.black, color: Colors.black,
), ),
onPressed: () { onPressed: () {
deleteRequest( acceptRemoveRequest(
result, context); result.iD,4, context);
}, },
)) ))
], ],
@ -371,7 +437,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
flex: 2, flex: 2,
child: AppText( child: AppText(
result.statusDescription, result.statusDescription,
color: Colors.red, color: result.status==3 ? Colors.green: Colors.red,
)), )),
], ],
)); ));
@ -405,31 +471,36 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
else else
return Column( return Column(
children: [ children: [
Row( // Padding(
mainAxisAlignment: // padding:EdgeInsets.only(left:10, right:10),
MainAxisAlignment.spaceBetween, // child: Row(
children: <Widget>[ // mainAxisAlignment:
Expanded( // MainAxisAlignment.spaceBetween,
flex: 3, // children: <Widget>[
child: Text( // Expanded(
TranslationBase.of(context).request)), // flex: 3,
Expanded( // child: AppText(
flex: 2, // TranslationBase.of(context).request),
child: Text( // ),
TranslationBase.of(context).switchUser, // Expanded(
)), // flex: 2,
Expanded( // child: AppText(
flex: 1, // TranslationBase.of(context).switchUser,
child: Text( // )),
TranslationBase.of(context).deleteView, // Expanded(
)), // flex: 1,
], // child: AppText(
), // TranslationBase.of(context).deleteView,
// )),
// ],
// )),
Column(children: [ Column(children: [
Row(children: [ Padding(
padding:EdgeInsets.only(left:10, right:10),
child: Row(children: [
Expanded(flex: 3, child: AppText('Name')), Expanded(flex: 3, child: AppText('Name')),
Expanded(flex: 1, child: AppText('Delete')), Expanded(flex: 1, child: AppText('Delete')),
]), ])),
Column( Column(
children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList children: familyFileProvider.allSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList
.map<Widget>((result) { .map<Widget>((result) {
@ -439,7 +510,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
flex: 3, flex: 3,
child: Text(result.patientName)), child: AppText(result.patientName)),
Expanded( Expanded(
flex: 1, flex: 1,
child: IconButton( child: IconButton(
@ -448,8 +519,8 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
color: Colors.black, color: Colors.black,
), ),
onPressed: () { onPressed: () {
deleteRequest( deactivateRequest(result.iD,
result, context); 5, context);
}, },
)), )),
], ],
@ -514,8 +585,10 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
} }
refreshFamily(context) { refreshFamily(context) {
sharedPref.remove(FAMILY_FILE); //sharedPref.remove(FAMILY_FILE);
(context as Element).reassemble(); setState(() {
sharedPref.remove(FAMILY_FILE);
});
} }
switchUser(user, context) { switchUser(user, context) {
@ -541,6 +614,24 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
); );
} }
deleteRequest(result, context) {} deactivateRequest(ID, status, context) {
acceptRequest(result, context) {} GifLoaderDialogUtils.showMyDialog(context);
Map<String, dynamic> request = {};
request["ID"] = ID;
request["Status"] = status;
this.familyFileProvider.deactivateFamily(request).then((value) => {
GifLoaderDialogUtils.hideDialog(context),
refreshFamily(context)
});
}
acceptRemoveRequest(ID, status, context) {
GifLoaderDialogUtils.showMyDialog(context);
Map<String, dynamic> request = {};
request["ID"] = ID;
request["Status"] = status;
this.familyFileProvider.acceptRejectFamily(request).then((value) => {
GifLoaderDialogUtils.hideDialog(context),
refreshFamily(context)
});
}
} }

@ -203,6 +203,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
MaterialPageRoute( MaterialPageRoute(
builder: (context) => BookConfirm( builder: (context) => BookConfirm(
doctor: getDoctorObject(), doctor: getDoctorObject(),
isLiveCareAppointment: widget.appo.isLiveCareAppointment,
selectedDate: DocAvailableAppointments.selectedDate, selectedDate: DocAvailableAppointments.selectedDate,
selectedTime: DocAvailableAppointments.selectedTime))); selectedTime: DocAvailableAppointments.selectedTime)));
} }

@ -606,6 +606,9 @@ class _ToDoState extends State<ToDo> {
appo.projectID.toString(), appo.projectID.toString(),
authenticatedUser.emailAddress, authenticatedUser.emailAddress,
paymentMethod, paymentMethod,
authenticatedUser.patientType,
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser, authenticatedUser,
widget.browser); widget.browser);
} }

@ -74,7 +74,7 @@ class _FeedbackHomePageState extends State<FeedbackHomePage>
controller: _tabController, controller: _tabController,
indicatorWeight: 5.0, indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label, indicatorSize: TabBarIndicatorSize.label,
indicatorColor: Colors.red[800], indicatorColor: Theme.of(context).primaryColor,
labelColor: Theme.of(context).primaryColor, labelColor: Theme.of(context).primaryColor,
labelPadding: labelPadding:
EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),

@ -514,7 +514,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
leading: Radio( leading: Radio(
value: MessageType.ComplaintOnAnAppointment, value: MessageType.ComplaintOnAnAppointment,
groupValue: model.messageTypeDialog, groupValue: model.messageTypeDialog,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) => onChanged: (MessageType value) =>
model.setMessageDialogType(value), model.setMessageDialogType(value),
), ),
@ -538,7 +538,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
leading: Radio( leading: Radio(
value: MessageType.ComplaintWithoutAppointment, value: MessageType.ComplaintWithoutAppointment,
groupValue: model.messageTypeDialog, groupValue: model.messageTypeDialog,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) => onChanged: (MessageType value) =>
model.setMessageDialogType(value), model.setMessageDialogType(value),
), ),
@ -562,7 +562,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
leading: Radio( leading: Radio(
value: MessageType.Question, value: MessageType.Question,
groupValue: model.messageTypeDialog, groupValue: model.messageTypeDialog,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) => onChanged: (MessageType value) =>
model.setMessageDialogType(value), model.setMessageDialogType(value),
), ),
@ -586,7 +586,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
leading: Radio( leading: Radio(
value: MessageType.Compliment, value: MessageType.Compliment,
groupValue: model.messageTypeDialog, groupValue: model.messageTypeDialog,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) => onChanged: (MessageType value) =>
model.setMessageDialogType(value), model.setMessageDialogType(value),
), ),
@ -610,7 +610,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
leading: Radio( leading: Radio(
value: MessageType.Suggestion, value: MessageType.Suggestion,
groupValue: model.messageTypeDialog, groupValue: model.messageTypeDialog,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) => onChanged: (MessageType value) =>
model.setMessageDialogType(value), model.setMessageDialogType(value),
), ),
@ -644,7 +644,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
child: Center( child: Center(
child: Texts( child: Texts(
TranslationBase.of(context).cancel, TranslationBase.of(context).cancel,
color: Colors.red, color: Theme.of(context).primaryColor,
), ),
), ),
), ),

@ -66,7 +66,7 @@ class _HomePageState extends State<HomePage> {
right: 5, right: 5,
child: Container( child: Container(
width: width:
MediaQuery.of(context).size.width * 0.8, MediaQuery.of(context).size.width * 0.8,
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
@ -81,7 +81,7 @@ class _HomePageState extends State<HomePage> {
fit: BoxFit.fill, fit: BoxFit.fill,
), ),
color: color:
Colors.white.withOpacity(0.3), Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(5))), Radius.circular(5))),
child: Container( child: Container(
@ -92,17 +92,17 @@ class _HomePageState extends State<HomePage> {
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: fontWeight:
FontWeight.bold, FontWeight.bold,
fontSize: 18.0)), fontSize: 18.0)),
Row( Row(
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: 15.0, left: 3.5, right: 3.5), top: 15.0, left: 3.5, right: 3.5),
child: SvgPicture.asset( child: SvgPicture.asset(
'assets/images/new-design/covid-19-car.svg', 'assets/images/new-design/covid-19-car.svg',
width: 45.0, width: 45.0,
height: 45.0), height: 45.0),
), ),
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
@ -115,34 +115,34 @@ class _HomePageState extends State<HomePage> {
color: Colors color: Colors
.white, .white,
fontWeight: fontWeight:
FontWeight FontWeight
.bold, .bold,
fontSize: fontSize:
16.0)), 16.0)),
ButtonTheme( ButtonTheme(
shape: shape:
RoundedRectangleBorder( RoundedRectangleBorder(
borderRadius: borderRadius:
BorderRadius BorderRadius
.circular( .circular(
5.0), 5.0),
), ),
minWidth: MediaQuery.of( minWidth: MediaQuery.of(
context) context)
.size .size
.width * .width *
0.15, 0.15,
height: 25.0, height: 25.0,
child: RaisedButton( child: RaisedButton(
color: Colors color: Colors
.red[800], .red[800],
textColor: textColor:
Colors.white, Colors.white,
disabledTextColor: disabledTextColor:
Colors.white, Colors.white,
disabledColor: disabledColor:
new Color( new Color(
0xFFbcc2c4), 0xFFbcc2c4),
onPressed: () { onPressed: () {
navigateToCovidDriveThru(); navigateToCovidDriveThru();
}, },
@ -150,7 +150,7 @@ class _HomePageState extends State<HomePage> {
"BOOK NOW", "BOOK NOW",
style: TextStyle( style: TextStyle(
fontSize: fontSize:
12.0)), 12.0)),
), ),
), ),
], ],
@ -176,11 +176,11 @@ class _HomePageState extends State<HomePage> {
.withOpacity(0.3), .withOpacity(0.3),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(5))), Radius.circular(5))),
child: SvgPicture.asset( child: SvgPicture.asset(
projectViewModel.isArabic projectViewModel.isArabic
? 'assets/images/new-design/livecare_arabic_logo.svg' ? 'assets/images/new-design/livecare_arabic_logo.svg'
: 'assets/images/new-design/liveCare_white_logo.svg', : 'assets/images/new-design/liveCare_white_logo.svg',
), ),
), ),
), ),
), ),
@ -198,240 +198,240 @@ class _HomePageState extends State<HomePage> {
top: 155, top: 155,
left: MediaQuery.of(context).size.width * left: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation == (MediaQuery.of(context).orientation ==
Orientation.landscape Orientation.landscape
? 0.02 ? 0.02
: 0.03), : 0.03),
right: MediaQuery.of(context).size.width * right: MediaQuery.of(context).size.width *
(MediaQuery.of(context).orientation == (MediaQuery.of(context).orientation ==
Orientation.landscape Orientation.landscape
? 0.02 ? 0.02
: 0.03), : 0.03),
child: (!model.isLogin && projectViewModel.user == null) child: (!model.isLogin && projectViewModel.user == null)
? Container( ? Container(
width: double.infinity, width: double.infinity,
height: 125, height: 125,
decoration: BoxDecoration( decoration: BoxDecoration(
color: HexColor('#A59E9E'), color: HexColor('#A59E9E'),
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
border: Border.all( border: Border.all(
color: Colors.transparent, width: 0.5), color: Colors.transparent, width: 0.5),
borderRadius: borderRadius:
BorderRadius.all(Radius.circular(9)), BorderRadius.all(Radius.circular(9)),
image: DecorationImage( image: DecorationImage(
image: ExactAssetImage( image: ExactAssetImage(
'assets/images/bg_graphic.png'), 'assets/images/bg_graphic.png'),
fit: BoxFit.cover)), fit: BoxFit.cover)),
child: Container( child: Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Texts( Texts(
TranslationBase.of(context).myMedicalFile, TranslationBase.of(context).myMedicalFile,
color: Colors.black87, color: Colors.black87,
bold: true, bold: true,
fontSize: 23, fontSize: 23,
), ),
SizedBox( SizedBox(
height: 5, height: 5,
),
Texts(
TranslationBase.of(context)
.myMedicalFileSubTitle,
color: Colors.black,
fontSize: 16,
),
Align(
alignment: projectViewModel.isArabic
? Alignment.bottomRight
: Alignment.bottomLeft,
child: InkWell(
onTap: () {
widget.goToMyProfile();
},
child: Container(
margin: EdgeInsets.all(2),
width: 90,
height: 30,
decoration: BoxDecoration(
color: HexColor('#D81A2E'),
shape: BoxShape.rectangle,
border: Border.all(
color: Colors.transparent,
width: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(9)),
), ),
Texts( child: Center(
TranslationBase.of(context) child: Texts(
.myMedicalFileSubTitle, TranslationBase.of(context)
color: Colors.black, .viewMore,
fontSize: 16, color: Colors.white,
fontSize: 12,
),
), ),
Align( ),
alignment: projectViewModel.isArabic ),
? Alignment.bottomRight )
: Alignment.bottomLeft, ],
child: InkWell( ),
onTap: () { ),
widget.goToMyProfile(); )
}, : Container(
child: Container( width: double.infinity,
margin: EdgeInsets.all(2), height: 130,
width: 90, decoration: BoxDecoration(
height: 30, color: HexColor('#A59E9E'),
decoration: BoxDecoration( shape: BoxShape.rectangle,
color: HexColor('#D81A2E'), border: Border.all(
shape: BoxShape.rectangle, color: Colors.transparent, width: 0.5),
border: Border.all( borderRadius:
color: Colors.transparent, BorderRadius.all(Radius.circular(9)),
width: 0.5), image: DecorationImage(
borderRadius: BorderRadius.all( image: ExactAssetImage(
Radius.circular(9)), 'assets/images/bg_graphic.png'),
fit: BoxFit.cover),
),
child: Container(
margin: EdgeInsets.all(5),
child: Column(
children: <Widget>[
Row(
children: <Widget>[
if (model.user != null)
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 8,
), ),
child: Center( Texts(
child: Texts( model.user.firstName +
TranslationBase.of(context) " " +
.viewMore, model.user.lastName,
color: Colors.white, color: Colors.grey[100],
fontSize: 12, bold: true,
), fontSize: 15,
),
Texts(
'${model.user.patientID}',
color: Colors.white,
fontSize: 14,
),
SizedBox(
height: 5,
), ),
Texts(
'${DateUtil.getMonthDayYearDateFormatted(model.user.dateofBirthDataTime)} ,${model.user.genderDescription} ${model.user.ageDesc}',
color: Colors.grey[100],
fontWeight: FontWeight.normal,
fontSize: 14,
),
],
),
),
InkWell(
onTap: () {
widget.goToMyProfile();
},
child: Container(
margin: EdgeInsets.all(2),
width: 90,
height: 30,
decoration: BoxDecoration(
color: HexColor('#D81A2E'),
shape: BoxShape.rectangle,
border: Border.all(
color: Colors.transparent,
width: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(5),
), ),
), ),
) child: Center(
], child: Texts(
), TranslationBase.of(context)
), .viewMore,
) color: Colors.white,
: Container( fontSize: 12,
width: double.infinity, ),
height: 130, ),
decoration: BoxDecoration( ),
color: HexColor('#A59E9E'), )
shape: BoxShape.rectangle, ],
border: Border.all(
color: Colors.transparent, width: 0.5),
borderRadius:
BorderRadius.all(Radius.circular(9)),
image: DecorationImage(
image: ExactAssetImage(
'assets/images/bg_graphic.png'),
fit: BoxFit.cover),
), ),
child: Container( Row(
margin: EdgeInsets.all(5), //crossAxisAlignment: CrossAxisAlignment.center,
child: Column( //mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[ children: <Widget>[
Row( Expanded(
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
if (model.user != null) Image.asset(
Expanded( 'assets/images/height_icon.png',
child: Column( width: 35,
crossAxisAlignment: height: 40,
CrossAxisAlignment.start, ),
children: <Widget>[ Texts(
SizedBox( "${model.heightCm}",
height: 8, color: Colors.white,
),
Texts(
model.user.firstName +
" " +
model.user.lastName,
color: Colors.grey[100],
bold: true,
fontSize: 15,
),
Texts(
'${model.user.patientID}',
color: Colors.white,
fontSize: 14,
),
SizedBox(
height: 5,
),
Texts(
'${DateUtil.getMonthDayYearDateFormatted(model.user.dateofBirthDataTime)} ,${model.user.genderDescription} ${model.user.ageDesc}',
color: Colors.grey[100],
fontWeight: FontWeight.normal,
fontSize: 14,
),
],
),
),
InkWell(
onTap: () {
widget.goToMyProfile();
},
child: Container(
margin: EdgeInsets.all(2),
width: 90,
height: 30,
decoration: BoxDecoration(
color: HexColor('#D81A2E'),
shape: BoxShape.rectangle,
border: Border.all(
color: Colors.transparent,
width: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(5),
),
),
child: Center(
child: Texts(
TranslationBase.of(context)
.viewMore,
color: Colors.white,
fontSize: 12,
),
),
),
) )
], ],
), ),
Row( ),
//crossAxisAlignment: CrossAxisAlignment.center, SizedBox(
//mainAxisAlignment: MainAxisAlignment.spaceAround, width: 3,
),
Expanded(
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Expanded( Image.asset(
child: Row( 'assets/images/weight_icon.png',
mainAxisAlignment: width: 25,
MainAxisAlignment.spaceBetween, height: 40,
children: <Widget>[
Image.asset(
'assets/images/height_icon.png',
width: 35,
height: 40,
),
Texts(
"${model.heightCm}",
color: Colors.white,
)
],
),
),
SizedBox(
width: 3,
), ),
Expanded( Texts(
child: Row( '${model.weightKg}',
mainAxisAlignment: color: Colors.white,
MainAxisAlignment.spaceBetween, )
children: <Widget>[ ],
Image.asset( ),
'assets/images/weight_icon.png', ),
width: 25, SizedBox(
height: 40, width: 3,
), ),
Texts( Expanded(
'${model.weightKg}', child: Row(
color: Colors.white, mainAxisAlignment:
) MainAxisAlignment.spaceBetween,
], children: <Widget>[
), Image.asset(
), 'assets/images/blood_icon.png',
SizedBox( width: 35,
width: 3, height: 40,
),
Expanded(
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Image.asset(
'assets/images/blood_icon.png',
width: 35,
height: 40,
),
Texts(
'${model.bloadType}',
color: Colors.white,
)
],
),
), ),
Texts(
'${model.bloadType}',
color: Colors.white,
)
], ],
) ),
], ),
), ],
), )
), ],
),
),
),
), ),
], ],
), ),
@ -630,8 +630,8 @@ class _HomePageState extends State<HomePage> {
context, context,
FadePage( FadePage(
page: ErOptions( page: ErOptions(
isAppbar: true, isAppbar: true,
))), ))),
child: Center( child: Center(
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
@ -778,15 +778,15 @@ class _HomePageState extends State<HomePage> {
class DashboardItem extends StatelessWidget { class DashboardItem extends StatelessWidget {
const DashboardItem( const DashboardItem(
{this.hasBorder = false, {this.hasBorder = false,
this.imageName, this.imageName,
@required this.child, @required this.child,
this.onTap, this.onTap,
Key key, Key key,
this.width, this.width,
this.height, this.height,
this.color, this.color,
this.opacity = 0.4, this.opacity = 0.4,
this.hasColorFilter = true}) this.hasColorFilter = true})
: super(key: key); : super(key: key);
final bool hasBorder; final bool hasBorder;
final String imageName; final String imageName;
@ -807,13 +807,13 @@ class DashboardItem extends StatelessWidget {
height: height != null height: height != null
? height ? height
: MediaQuery.of(context).orientation == Orientation.portrait : MediaQuery.of(context).orientation == Orientation.portrait
? MediaQuery.of(context).size.height * 0.19 ? MediaQuery.of(context).size.height * 0.19
: MediaQuery.of(context).size.height * 0.35, : MediaQuery.of(context).size.height * 0.35,
decoration: BoxDecoration( decoration: BoxDecoration(
color: !hasBorder color: !hasBorder
? color != null ? color != null
? color ? color
: HexColor('#050705').withOpacity(opacity) : HexColor('#050705').withOpacity(opacity)
: Colors.white, : Colors.white,
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
border: hasBorder border: hasBorder
@ -821,11 +821,11 @@ class DashboardItem extends StatelessWidget {
: Border.all(width: 0.0, color: Colors.transparent), : Border.all(width: 0.0, color: Colors.transparent),
image: imageName != null image: imageName != null
? DecorationImage( ? DecorationImage(
image: ExactAssetImage('assets/images/$imageName'), image: ExactAssetImage('assets/images/$imageName'),
fit: BoxFit.cover, fit: BoxFit.cover,
colorFilter: hasColorFilter ? new ColorFilter.mode( colorFilter: hasColorFilter ? new ColorFilter.mode(
Colors.black.withOpacity(0.2), BlendMode.dstIn) : null, Colors.black.withOpacity(0.2), BlendMode.dstIn) : null,
) )
: null, : null,
), ),
child: Center( child: Center(

@ -15,6 +15,8 @@ import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart'; import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart'; import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -46,9 +48,9 @@ class LandingPage extends StatefulWidget {
class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver { class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
int currentTab = 0; int currentTab = 0;
PageController pageController; PageController pageController;
ProjectViewModel projectProvider; ProjectViewModel projectViewModel;
var notificationCount = ''; var notificationCount = '';
var themeNotifier;
///inject the user data ///inject the user data
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
@ -91,6 +93,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
print("didChangeAppLifecycleState"); print("didChangeAppLifecycleState");
print('state = $state'); print('state = $state');
AppGlobal.context = context; AppGlobal.context = context;
if (state == AppLifecycleState.resumed) { if (state == AppLifecycleState.resumed) {
print(LandingPage.isOpenCallPage); print(LandingPage.isOpenCallPage);
if (LandingPage.isOpenCallPage) { if (LandingPage.isOpenCallPage) {
@ -135,13 +138,16 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
pageController = PageController(keepPage: true); pageController = PageController(keepPage: true);
_firebaseMessaging.setAutoInitEnabled(true); _firebaseMessaging.setAutoInitEnabled(true);
if (Platform.isIOS) { if (Platform.isIOS) {
_firebaseMessaging.requestNotificationPermissions(); _firebaseMessaging.requestNotificationPermissions();
} }
_firebaseMessaging.getToken().then((String token) { _firebaseMessaging.getToken().then((String token) async {
sharedPref.setString(PUSH_TOKEN, token); sharedPref.setString(PUSH_TOKEN, token);
if (token != null && DEVICE_TOKEN == "") { if (token != null && await sharedPref.getObject(USER_PROFILE) ==null) {
DEVICE_TOKEN = token; DEVICE_TOKEN = token;
checkUserStatus(token); checkUserStatus(token);
} }
@ -151,6 +157,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
}); });
// //
// //_firebase Background message handler // //_firebase Background message handler
Future.delayed(Duration.zero, () => setTheme());
//_firebase Background message handler
// _firebaseMessaging.configure( // _firebaseMessaging.configure(
// // onMessage: (Map<String, dynamic> message) async { // // onMessage: (Map<String, dynamic> message) async {
// // showDialog("onMessage: $message"); // // showDialog("onMessage: $message");
@ -334,8 +342,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); projectViewModel = Provider.of<ProjectViewModel>(context);
themeNotifier = Provider.of<ThemeNotifier>(context);
//setTheme();
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
elevation: 0, elevation: 0,
@ -403,9 +412,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
SETTINGS, SETTINGS,
); );
else else
Navigator.of(context).pushNamed( login();
WELCOME_LOGIN,
);
}, //do something, }, //do something,
) )
], ],
@ -453,14 +460,53 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
case 1: case 1:
return TranslationBase.of(context).medicalProfile; return TranslationBase.of(context).medicalProfile;
case 2: case 2:
return TranslationBase.of(context).mySchedule; return TranslationBase.of(context).bookAppo;
case 3: case 3:
return TranslationBase.of(context).services; return TranslationBase.of(context).services;
case 4: case 4:
return TranslationBase.of(context).bookAppo; return TranslationBase.of(context).bookAppo;
} }
} }
setTheme() async{
//
// defaultTheme =
// ThemeData(
// fontFamily:projectViewModel.isArabic ? 'Cairo' : 'WorkSans',
// primarySwatch: Colors.blue,
// visualDensity: VisualDensity.adaptivePlatformDensity,
// brightness: Brightness.light,
// pageTransitionsTheme: const PageTransitionsTheme(
// builders: {
// TargetPlatform.android: ZoomPageTransitionsBuilder(),
// TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
// },
// ),
// hintColor: Colors.grey[400],
// disabledColor: Colors.grey[300],
// errorColor: Color.fromRGBO(235, 80, 60, 1.0),
// scaffoldBackgroundColor: Color(0xffEEEEEE),
// textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
// textSelectionHandleColor: Colors.grey,
// canvasColor: Colors.white,
// backgroundColor: Colors.white,
// highlightColor: Colors.grey[100].withOpacity(0.4),
// splashColor: Colors.transparent,
// primaryColor: Color(0xff40ACC9),
// bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)),
// cursorColor: Colors.grey,
// cardColor: Colors.white,
// iconTheme: IconThemeData(),
// appBarTheme: AppBarTheme(
// color: Color(0xff40ACC9),
// brightness: Brightness.dark,
// elevation: 10.0,
// actionsIconTheme: IconThemeData(
// color: Color(0xff40ACC9),
// ),
// ),
// );
// themeNotifier.setTheme(defaultTheme);
}
void checkUserStatus(token) async { void checkUserStatus(token) async {
authService authService
.selectDeviceImei(token) .selectDeviceImei(token)
@ -507,4 +553,15 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
_changeCurrentTab(2); _changeCurrentTab(2);
} }
} }
login() async {
var data = await sharedPref.getObject(IMEI_USER_DATA);
sharedPref.remove(REGISTER_DATA_FOR_LOGIIN);
if (data != null) {
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
Navigator.of(context).pushNamed(
WELCOME_LOGIN,
);
}
}
} }

@ -285,6 +285,9 @@ class _clinic_listState extends State<ClinicList> {
"12", "12",
authenticatedUser.emailAddress, authenticatedUser.emailAddress,
paymentMethod, paymentMethod,
authenticatedUser.patientType,
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser, authenticatedUser,
browser); browser);
} }

@ -370,7 +370,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
if (authenticated == true) { if (authenticated == true) {
if(user.logInType==2 || user.logInType ==3){ if(user !=null && (user.logInType==2 || user.logInType ==3)){
this.checkActivationCode(); this.checkActivationCode();
}else{ }else{
var request = this.getCommonRequest(type: type); var request = this.getCommonRequest(type: type);
@ -460,7 +460,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
this.deviceToken = await sharedPref.getString(PUSH_TOKEN); this.deviceToken = await sharedPref.getString(PUSH_TOKEN);
this.lastLogin = await sharedPref.getInt(LAST_LOGIN) != null this.lastLogin = await sharedPref.getInt(LAST_LOGIN) != null
? await sharedPref.getInt(LAST_LOGIN) ? await sharedPref.getInt(LAST_LOGIN)
: user.logInType !=null ? user.logInType : null; : user !=null ? user.logInType : null;
//this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN); //this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN);
} }
@ -525,6 +525,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
} }
else else
{ {
sharedPref.remove(FAMILY_FILE),
result.list.isFamily = false, result.list.isFamily = false,
userData = result.list, userData = result.list,
sharedPref.setObject(MAIN_USER, result.list), sharedPref.setObject(MAIN_USER, result.list),

@ -241,6 +241,7 @@ class _Login extends State<Login> {
} }
// request.isRegister = false; // request.isRegister = false;
this.authService.checkActivationCode(request, code).then((result) => { this.authService.checkActivationCode(request, code).then((result) => {
sharedPref.remove(FAMILY_FILE),
result = CheckActivationCode.fromJson(result), result = CheckActivationCode.fromJson(result),
result.list.isFamily =false, result.list.isFamily =false,
this.sharedPref.setObject(USER_PROFILE, result.list), this.sharedPref.setObject(USER_PROFILE, result.list),

@ -1,5 +1,9 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_paitent_authentication_req.dart';
import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/register_info_response.dart';
import 'package:diplomaticquarterapp/models/Authentication/register_user_requet.dart'; import 'package:diplomaticquarterapp/models/Authentication/register_user_requet.dart';
@ -7,6 +11,7 @@ import 'package:diplomaticquarterapp/pages/login/login-type.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -20,6 +25,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hijri/hijri_calendar.dart'; import 'package:hijri/hijri_calendar.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
class RegisterInfo extends StatefulWidget { class RegisterInfo extends StatefulWidget {
@override @override
@ -45,6 +51,11 @@ class _RegisterInfo extends State<RegisterInfo> {
String email = ''; String email = '';
String location = '1'; String location = '1';
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
AppointmentRateViewModel appointmentRateViewModel =
locator<AppointmentRateViewModel>();
ProjectViewModel projectViewModel;
@override @override
void initState() { void initState() {
@ -56,6 +67,7 @@ class _RegisterInfo extends State<RegisterInfo> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).register, appBarTitle: TranslationBase.of(context).register,
isShowAppBar: true, isShowAppBar: true,
@ -296,27 +308,34 @@ class _RegisterInfo extends State<RegisterInfo> {
}else }else
{ {
result.list.isFamily = false, sharedPref.remove(FAMILY_FILE),
sharedPref.setObject(USER_PROFILE, result.list), result['List'][0]['IsFamily'] = false,
this.sharedPref.setObject(MAIN_USER, result.list), sharedPref.setObject(USER_PROFILE, result['List'][0]),
sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID), this.sharedPref.setObject(MAIN_USER, result['List'][0]),
sharedPref.setString(TOKEN, result.authenticationTokenID), sharedPref.setObject(LOGIN_TOKEN_ID, result["LogInTokenID"]),
Navigator.of(context).pushNamed(HOME) sharedPref.setString(TOKEN, result["AuthenticationTokenID"]),
authenticatedUserObject.isLogin = true,
appointmentRateViewModel.isLogin = true,
projectViewModel.isLogin = true,
Navigator.of(context).pushNamed(HOME),
AppToast.showSuccessToast(message: result["ErrorEndUserMessage"])
} }
}).catchError((err) { });
GifLoaderDialogUtils.hideDialog(context); // .catchError((err) {
ConfirmDialog dialog = new ConfirmDialog( // GifLoaderDialogUtils.hideDialog(context);
context: context, // ConfirmDialog dialog = new ConfirmDialog(
confirmMessage: err, // context: context,
okText: TranslationBase.of(context).confirm, // confirmMessage: err,
cancelText: TranslationBase.of(context).cancel_nocaps, // okText: TranslationBase.of(context).confirm,
okFunction: () => { // cancelText: TranslationBase.of(context).cancel_nocaps,
ConfirmDialog.closeAlertDialog(context) // okFunction: () => {
}, // ConfirmDialog.closeAlertDialog(context)
cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)}); // },
dialog.showAlertDialog(context); // cancelFunction: () => {ConfirmDialog.closeAlertDialog(context)});
// dialog.showAlertDialog(context);
}); //
// });
} }
getRegisterInfo() async { getRegisterInfo() async {
@ -349,15 +368,15 @@ class _RegisterInfo extends State<RegisterInfo> {
"PatientOutSA": registerd_data.zipCode == '966' ? 0 : 1, "PatientOutSA": registerd_data.zipCode == '966' ? 0 : 1,
"FirstNameN":registerInfo.firstNameAr =='-' ?"": registerInfo.firstNameAr, "FirstNameN":registerInfo.firstNameAr =='-' ?"": registerInfo.firstNameAr,
"FirstName": registerInfo.firstNameEn =='-' ?"":registerInfo.firstNameEn, "FirstName": registerInfo.firstNameEn =='-' ?"":registerInfo.firstNameEn,
"MiddleNameN":registerInfo.secondNameAr =='-' ? "" : registerInfo.secondNameAr, "MiddleNameN":registerInfo.secondNameAr,
"MiddleName":registerInfo.secondNameEn == '-' ? "": registerInfo.secondNameEn, "MiddleName":registerInfo.secondNameEn,
"LastNameN": registerInfo.lastNameAr =='-'? "" : registerInfo.lastNameAr, "LastNameN": registerInfo.lastNameAr =='-'? "" : registerInfo.lastNameAr,
"LastName": registerInfo.lastNameEn =='-' ? "": registerInfo.lastNameEn, "LastName": registerInfo.lastNameEn =='-' ? "": registerInfo.lastNameEn,
"StrDateofBirth": registerInfo.dateOfBirth, "StrDateofBirth": registerInfo.dateOfBirth,
"DateofBirth": DateUtil.convertISODateToJsonDate( "DateofBirth": DateUtil.convertISODateToJsonDate(
registerInfo.dateOfBirth.replaceAll('/', '-')), registerInfo.dateOfBirth.replaceAll('/', '-')),
"Gender": registerInfo.gender == 'M' ? 1 : 2, "Gender": registerInfo.gender == 'M' ? 1 : 2,
"NationalityID": registerInfo.nationality, "NationalityID": registerInfo.nationalityCode,
"DateofBirthN": date, "DateofBirthN": date,
"EmailAddress": email, "EmailAddress": email,
"SourceType": location, "SourceType": location,
@ -374,8 +393,8 @@ class _RegisterInfo extends State<RegisterInfo> {
} }
bool isValid() { bool isValid() {
if (location != null || if (location != null &&
language != null || language != null &&
Utils.validEmail(email) == true) { Utils.validEmail(email) == true) {
return true; return true;
} else { } else {

@ -298,7 +298,7 @@ class _Register extends State<Register> {
// DOB: this.dateOption === '1' ? this.dateOfBirth : moment(this.dateOfBirth).format('DD/MM/YYYY'), // DOB: this.dateOption === '1' ? this.dateOfBirth : moment(this.dateOfBirth).format('DD/MM/YYYY'),
// IsHijri: Number(this.dateOption) // IsHijri: Number(this.dateOption)
// } // }
showLoader(true); GifLoaderDialogUtils.showMyDialog(context);
var request = CheckUserStatusRequest(); var request = CheckUserStatusRequest();
request.patientIdentificationID = nationalIDorFile.text; request.patientIdentificationID = nationalIDorFile.text;
request.dOB = isHijri == 1 request.dOB = isHijri == 1
@ -307,7 +307,7 @@ class _Register extends State<Register> {
request.isHijri = isHijri; request.isHijri = isHijri;
request.patientOutSA = countryCode == '966' ? 0 : 1; request.patientOutSA = countryCode == '966' ? 0 : 1;
this.authService.checkUserStatus(request).then((result) => { this.authService.checkUserStatus(request).then((result) => {
showLoader(false), GifLoaderDialogUtils.hideDialog(context),
if (result is Map) if (result is Map)
{ {
result = CheckUserStatusResponse.fromJson(result), result = CheckUserStatusResponse.fromJson(result),

@ -29,7 +29,6 @@ import 'new_text_Field.dart';
enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON } enum BeneficiaryType { MyAccount, MyFamilyFiles, OtherAccount, NON }
class AdvancePaymentPage extends StatefulWidget { class AdvancePaymentPage extends StatefulWidget {
@override @override
_AdvancePaymentPageState createState() => _AdvancePaymentPageState(); _AdvancePaymentPageState createState() => _AdvancePaymentPageState();
@ -238,13 +237,35 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
_fileTextController.text.isEmpty || _fileTextController.text.isEmpty ||
_selectedHospital == null, _selectedHospital == null,
onTap: () { onTap: () {
var mobileNum;
var patientName;
if (beneficiaryType == BeneficiaryType.MyFamilyFiles) {
mobileNum = selectedPatientFamily.mobileNumber;
patientName = selectedPatientFamily.patientName;
}
if (beneficiaryType == BeneficiaryType.MyAccount) {
mobileNum = model.user.mobileNumber;
patientName = model.user.firstName;
}
if (beneficiaryType == BeneficiaryType.OtherAccount) {
mobileNum = _selectedPatientInfo.mobileNumber;
patientName = _selectedPatientInfo.fullName;
}
advanceModel.fileNumber = _fileTextController.text; advanceModel.fileNumber = _fileTextController.text;
advanceModel.hospitalsModel = _selectedHospital; advanceModel.hospitalsModel = _selectedHospital;
advanceModel.note = _notesTextController.text; advanceModel.note = _notesTextController.text;
advanceModel.email = email ?? model.user.emailAddress; advanceModel.email = email ?? model.user.emailAddress;
advanceModel.amount = amount; advanceModel.amount = amount;
advanceModel.mobileNumber = mobileNum;
advanceModel.patientName = patientName;
model.getPatientInfoByPatientIDAndMobileNumber().then((value) { model
.getPatientInfoByPatientIDAndMobileNumber(advanceModel)
.then((value) {
if (model.state != ViewState.Error && if (model.state != ViewState.Error &&
model.state != ViewState.ErrorLocal) { model.state != ViewState.ErrorLocal) {
Utils.hideKeyboard(context); Utils.hideKeyboard(context);
@ -269,8 +290,8 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
); );
} }
}).showProgressBar( }).showProgressBar(
text: "Loading", text: "Loading",
backgroundColor: Colors.blue.withOpacity(0.6)); backgroundColor: Colors.blue.withOpacity(0.6));
}, },
), ),
)), )),
@ -331,22 +352,22 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
void confirmSelectFamilyDialog( void confirmSelectFamilyDialog(
List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList) { List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList) {
if(getAllSharedRecordsByStatusList.isNotEmpty) if (getAllSharedRecordsByStatusList.isNotEmpty)
showDialog( showDialog(
context: context, context: context,
child: SelectPatientFamilyDialog( child: SelectPatientFamilyDialog(
getAllSharedRecordsByStatusList: getAllSharedRecordsByStatusList, getAllSharedRecordsByStatusList: getAllSharedRecordsByStatusList,
selectedPatientFamily: selectedPatientFamily, selectedPatientFamily: selectedPatientFamily,
onValueSelected: (value) { onValueSelected: (value) {
setState(() { setState(() {
selectedPatientFamily = value; selectedPatientFamily = value;
_fileTextController.text = _fileTextController.text =
selectedPatientFamily.patientID.toString(); selectedPatientFamily.responseID.toString();
advanceModel.depositorName = value.patientName; advanceModel.depositorName = value.patientName;
}); });
}, },
), ),
); );
} }
String getBeneficiaryType() { String getBeneficiaryType() {

@ -137,7 +137,11 @@ class ConfirmPaymentPage extends StatelessWidget {
), ),
NewTextFields( NewTextFields(
hintText: TranslationBase.of(context).depositorName, hintText: TranslationBase.of(context).depositorName,
initialValue: advanceModel.depositorName, initialValue: model.user.firstName +
" " +
model.user.middleName +
" " +
model.user.lastName,
isEnabled: false, isEnabled: false,
), ),
SizedBox( SizedBox(
@ -217,6 +221,9 @@ class ConfirmPaymentPage extends StatelessWidget {
advanceModel.hospitalsModel.iD.toString(), advanceModel.hospitalsModel.iD.toString(),
advanceModel.email, advanceModel.email,
paymentMethod, paymentMethod,
patientInfoAndMobileNumber.patientType,
advanceModel.patientName,
advanceModel.fileNumber,
authenticatedUser, authenticatedUser,
browser); browser);
} }
@ -276,6 +283,9 @@ class ConfirmPaymentPage extends StatelessWidget {
res['Amount'], res['Amount'],
res['Fort_id'], res['Fort_id'],
res['PaymentMethod'], res['PaymentMethod'],
patientInfoAndMobileNumber.patientType,
advanceModel.patientName,
advanceModel.fileNumber,
AppGlobal.context) AppGlobal.context)
.then((res) { .then((res) {
print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']); print(res['OnlineCheckInAppointments'][0]['AdvanceNumber']);

@ -35,9 +35,11 @@ class _SelectPatientFamilyDialogState extends State<SelectPatientFamilyDialog> {
(index) => Column( (index) => Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if(widget.getAllSharedRecordsByStatusList[index].status==3)
SizedBox( SizedBox(
height: 2, height: 2,
), ),
if(widget.getAllSharedRecordsByStatusList[index].status==3)
Row( Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
@ -65,6 +67,8 @@ class _SelectPatientFamilyDialogState extends State<SelectPatientFamilyDialog> {
) )
], ],
), ),
if(widget.getAllSharedRecordsByStatusList[index].status==3)
SizedBox( SizedBox(
height: 5.0, height: 5.0,
), ),

@ -40,7 +40,7 @@ class LabsHomePage extends StatelessWidget {
leading: Radio( leading: Radio(
value: FilterType.Clinic, value: FilterType.Clinic,
groupValue: model.filterType, groupValue: model.filterType,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (FilterType value) { onChanged: (FilterType value) {
model.setFilterType(value); model.setFilterType(value);
}, },
@ -57,7 +57,7 @@ class LabsHomePage extends StatelessWidget {
leading: Radio( leading: Radio(
value: FilterType.Hospital, value: FilterType.Hospital,
groupValue: model.filterType, groupValue: model.filterType,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (FilterType value) => onChanged: (FilterType value) =>
model.setFilterType(value), model.setFilterType(value),
), ),

@ -136,7 +136,7 @@ class PrescriptionDetailsPage extends StatelessWidget {
height: 50, height: 50,
width: double.infinity, width: double.infinity,
child: Center( child: Center(
child: Text(prescriptionReport.frequencyN))), child: Text(prescriptionReport.frequencyN?? ''))),
Container( Container(
color: Colors.white, color: Colors.white,
height: 50, height: 50,

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_page.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_page.dart';
@ -20,63 +21,124 @@ class PrescriptionItemsPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<PrescriptionsViewModel>( return BaseView<PrescriptionsViewModel>(
onModelReady: (model) => onModelReady: (model) =>
model.getPrescriptionReport(dischargeNo: prescriptions.dischargeNo,setupID:prescriptions.setupID,clinicID: prescriptions.clinicID,projectId: prescriptions.projectID,episodeID: prescriptions.episodeID), model.getPrescriptionReport(prescriptions: prescriptions),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).prescriptions, appBarTitle: TranslationBase.of(context).prescriptions,
baseViewModel: model, baseViewModel: model,
body: Container( body: Container(
height: MediaQuery.of(context).size.height * 0.8, height: MediaQuery.of(context).size.height * 0.8,
child: ListView.builder( child: Column(
itemBuilder: (context, index) => InkWell( children: [
onTap: () => Navigator.push(
context, if(!prescriptions.isInOutPatient)
FadePage( ...List.generate(model.prescriptionReportList.length, (index) => InkWell(
page: PrescriptionDetailsPage( onTap: () => Navigator.push(
prescriptionReport: model.prescriptionReportList[index], context,
FadePage(
page: PrescriptionDetailsPage(
prescriptionReport: model.prescriptionReportList[index],
),
),
), ),
), child: Container(
), width: double.infinity,
child: Container( margin: EdgeInsets.only(top: 10, left: 10, right: 10),
width: double.infinity, padding: EdgeInsets.all(8.0),
margin: EdgeInsets.only(top: 10, left: 10, right: 10), decoration: BoxDecoration(
padding: EdgeInsets.all(8.0), color: Colors.white,
decoration: BoxDecoration( borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(color: Colors.grey[200], width: 0.5),
),
child: Row(
children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5)),
child: Image.network(
model.prescriptionReportList[index].imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 70,
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(model.prescriptionReportList[index].itemDescription.isNotEmpty?
model.prescriptionReportList[index].itemDescription :model
.prescriptionReportList[index].itemDescriptionN)),
)),
Icon(
Icons.arrow_forward_ios,
size: 18,
color: Colors.grey[500],
)
],
),
),
))
else
...List.generate(
model.prescriptionReportEnhList.length,
(index) => InkWell(
onTap: (){
PrescriptionReport prescriptionReport = PrescriptionReport(
imageSRCUrl: model.prescriptionReportEnhList[index].imageSRCUrl,
itemDescription: model.prescriptionReportEnhList[index].itemDescription,
itemDescriptionN: model.prescriptionReportEnhList[index].itemDescription,
routeN: model.prescriptionReportEnhList[index].route,
frequency: model.prescriptionReportEnhList[index].frequency,
frequencyN: model.prescriptionReportEnhList[index].frequency,
doseDailyQuantity: model.prescriptionReportEnhList[index].doseDailyQuantity,
days: model.prescriptionReportEnhList[index].days,
itemID: model.prescriptionReportEnhList[index].itemID,
remarks: model.prescriptionReportEnhList[index].remarks
);
Navigator.push(
context,
FadePage(
page: PrescriptionDetailsPage(
prescriptionReport:prescriptionReport,
),
),
);
},
child: Container(
margin: EdgeInsets.all(8.0),
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.all( child: Row(
Radius.circular(10.0), children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5)),
child: Image.network(
model.prescriptionReportEnhList[index].imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 70,
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(model.prescriptionReportEnhList[index]
.itemDescription),
],
),
),
),
],
), ),
border: Border.all(color: Colors.grey[200], width: 0.5),
), ),
child: Row(
children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5)),
child: Image.network(
model.prescriptionReportList[index].imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 70,
),
), ),
Expanded( )
child: Padding( ],
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(model.prescriptionReportList[index].itemDescription.isNotEmpty?
model.prescriptionReportList[index].itemDescription :model
.prescriptionReportList[index].itemDescriptionN)),
)),
Icon(
Icons.arrow_forward_ios,
size: 18,
color: Colors.grey[500],
)
],
),
),
),
itemCount: model.prescriptionReportList.length,
), ),
), ),
bottomSheet: Container( bottomSheet: Container(

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart'; import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_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/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -21,7 +22,7 @@ class RadiologyDetailsPage extends StatelessWidget {
lineItem: finalRadiology.invoiceLineItemNo, lineItem: finalRadiology.invoiceLineItemNo,
invoiceNo: finalRadiology.invoiceNo), invoiceNo: finalRadiology.invoiceNo),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
appBarTitle: 'Radiology Report', appBarTitle: TranslationBase.of(context).report,
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
@ -45,7 +46,7 @@ class RadiologyDetailsPage extends StatelessWidget {
onTap: () { onTap: () {
launch(model.radImageURL); launch(model.radImageURL);
}, },
label: 'Open Radio Image', label: TranslationBase.of(context).openRad,
backgroundColor: Colors.grey[800], backgroundColor: Colors.grey[800],
), ),
), ),
@ -54,9 +55,9 @@ class RadiologyDetailsPage extends StatelessWidget {
child: Button( child: Button(
onTap: () => model.sendRadReportEmail( onTap: () => model.sendRadReportEmail(
finalRadiology: finalRadiology), finalRadiology: finalRadiology),
label: 'Send Copy', label: TranslationBase.of(context).sendCopyRad,
loading: model.state == ViewState.BusyLocal, loading: model.state == ViewState.BusyLocal,
backgroundColor: Colors.red[800], backgroundColor: Theme.of(context).primaryColor,
), ),
) )
], ],

@ -38,7 +38,7 @@ class RadiologyHomePage extends StatelessWidget {
leading: Radio( leading: Radio(
value: FilterType.Clinic, value: FilterType.Clinic,
groupValue: model.filterType, groupValue: model.filterType,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (FilterType value) { onChanged: (FilterType value) {
model.setFilterType(value); model.setFilterType(value);
}, },
@ -56,7 +56,7 @@ class RadiologyHomePage extends StatelessWidget {
leading: Radio( leading: Radio(
value: FilterType.Hospital, value: FilterType.Hospital,
groupValue: model.filterType, groupValue: model.filterType,
activeColor: Colors.red[800], activeColor: Theme.of(context).primaryColor,
onChanged: (FilterType value) { onChanged: (FilterType value) {
model.setFilterType(value); model.setFilterType(value);
}, },
@ -85,6 +85,7 @@ class RadiologyHomePage extends StatelessWidget {
), ),
), ),
child: DoctorCard( child: DoctorCard(
isInOutPatient: radiology.isInOutPatient,
name: radiology.doctorName, name: radiology.doctorName,
profileUrl: radiology.doctorImageURL, profileUrl: radiology.doctorImageURL,
subName: '${radiology.projectName} \n${TranslationBase.of(context).billNo} ${radiology.invoiceNo}', subName: '${radiology.projectName} \n${TranslationBase.of(context).billNo} ${radiology.invoiceNo}',

@ -19,14 +19,14 @@ class GeneralSettings extends StatefulWidget {
class _GeneralSettings extends State<GeneralSettings> class _GeneralSettings extends State<GeneralSettings>
with TickerProviderStateMixin { with TickerProviderStateMixin {
var themeNotifier; var themeNotifier;
var mediaQueryData;
int blindValue = 0; int blindValue = 0;
bool vibration =false; bool vibration =false;
bool accsibility =false; bool accsibility =false;
bool camera =false; bool camera =false;
bool location =false; bool location =false;
var sharedPref = new AppSharedPreferences(); var sharedPref = new AppSharedPreferences();
var permission = new PermissionService(); var permission = new PermissionService();
var mediaQueryData;
@override @override
void initState() { void initState() {
getValues(); getValues();
@ -81,104 +81,104 @@ class _GeneralSettings extends State<GeneralSettings>
setState(() { setState(() {
accsibility = value; accsibility = value;
}); });
//setAccisibility(value); permission.openSettings();
}, },
activeTrackColor: Colors.lightGreenAccent, activeTrackColor: Colors.lightGreenAccent,
activeColor: Colors.green, activeColor: Colors.green,
) )
], ],
)), )),
Container( // Container(
padding: EdgeInsets.all(10), // padding: EdgeInsets.all(10),
child: AppText( // child: AppText(
TranslationBase.of(context).blindMode, // TranslationBase.of(context).blindMode,
color: Colors.black, // color: Colors.black,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
), // ),
), // ),
new Container( // new Container(
color: Colors.white, // color: Colors.white,
padding: EdgeInsets.all(8.0), // padding: EdgeInsets.all(8.0),
child: new Column( // child: new Column(
mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ // children: <Widget>[
new Column( // new Column(
mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ // children: <Widget>[
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // children: [
new Text( // new Text(
TranslationBase.of(context).offTheme, // TranslationBase.of(context).offTheme,
style: new TextStyle(fontSize: 16.0), // style: new TextStyle(fontSize: 16.0),
), // ),
Radio( // Radio(
value: 0, // value: 0,
groupValue: blindValue, // groupValue: blindValue,
onChanged: (value) { // onChanged: (value) {
setState(() => {this.blindValue = value}); // setState(() => {this.blindValue = value});
setTheme(value); // setTheme(value);
}, // },
), // ),
], // ],
), // ),
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // children: [
new Text( // new Text(
TranslationBase.of(context).invertTheme, // TranslationBase.of(context).invertTheme,
style: new TextStyle( // style: new TextStyle(
fontSize: 16.0, // fontSize: 16.0,
), // ),
), // ),
new Radio( // new Radio(
value: 1, // value: 1,
groupValue: blindValue, // groupValue: blindValue,
onChanged: (value) { // onChanged: (value) {
setState(() => {this.blindValue = value}); // setState(() => {this.blindValue = value});
setTheme(value); // setTheme(value);
}, // },
) // )
], // ],
), // ),
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // children: [
new Text( // new Text(
TranslationBase.of(context).dimTheme, // TranslationBase.of(context).dimTheme,
style: new TextStyle(fontSize: 16.0), // style: new TextStyle(fontSize: 16.0),
), // ),
new Radio( // new Radio(
value: 2, // value: 2,
groupValue: blindValue, // groupValue: blindValue,
onChanged: (value) { // onChanged: (value) {
setState(() => {this.blindValue = value}); // setState(() => {this.blindValue = value});
setTheme(value); // setTheme(value);
}, // },
), // ),
], // ],
), // ),
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // children: [
new Text( // new Text(
TranslationBase.of(context).bwTheme, // TranslationBase.of(context).bwTheme,
style: new TextStyle(fontSize: 16.0), // style: new TextStyle(fontSize: 16.0),
), // ),
new Radio( // new Radio(
value: 3, // value: 3,
groupValue: blindValue, // groupValue: blindValue,
onChanged: (value) { // onChanged: (value) {
setState(() => {this.blindValue = value}); // setState(() => {this.blindValue = value});
//
setTheme(value); // setTheme(value);
}, // },
), // ),
], // ],
), // ),
], // ],
) // )
])), // ])),
Container( Container(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: AppText( child: AppText(
@ -200,6 +200,7 @@ class _GeneralSettings extends State<GeneralSettings>
setState(() { setState(() {
camera = value; camera = value;
}); });
permission.setCameraLocationPermission(context);
}, },
activeTrackColor: Colors.lightGreenAccent, activeTrackColor: Colors.lightGreenAccent,
activeColor: Colors.green, activeColor: Colors.green,
@ -219,6 +220,7 @@ class _GeneralSettings extends State<GeneralSettings>
setState(() { setState(() {
location = value; location = value;
}); });
permission.setCameraLocationPermission(context);
}, },
activeTrackColor: Colors.lightGreenAccent, activeTrackColor: Colors.lightGreenAccent,
activeColor: Colors.green, activeColor: Colors.green,
@ -238,43 +240,7 @@ class _GeneralSettings extends State<GeneralSettings>
break; break;
case 1: case 1:
{ {
themeNotifier.setTheme(ThemeData( themeNotifier.setTheme(await getTheme(value));
fontFamily: await sharedPref.getString(APP_LANGUAGE) == 'ar' ? 'Cairo' : 'WorkSans',
primarySwatch: Colors.grey,
visualDensity: VisualDensity.adaptivePlatformDensity,
brightness: Brightness.light,
pageTransitionsTheme: const PageTransitionsTheme(
builders: {
TargetPlatform.android: ZoomPageTransitionsBuilder(),
TargetPlatform.iOS: CupertinoPageTransitionsBuilder(),
},
),
hintColor: Colors.grey[400],
cardColor: Colors.black,
buttonColor: Colors.grey[400],
disabledColor: Colors.grey[300],
errorColor: Color.fromRGBO(235, 80, 60, 1.0),
scaffoldBackgroundColor: Colors.grey,
textSelectionColor: Color.fromRGBO(80, 100, 253, 0.5),
textSelectionHandleColor: Colors.grey,
canvasColor: Colors.white,
backgroundColor: Colors.grey,
highlightColor: Colors.grey[100].withOpacity(0.4),
splashColor: Colors.transparent,
primaryColor: Colors.grey,
bottomSheetTheme: BottomSheetThemeData(backgroundColor: Color(0xffE0E0E0)),
cursorColor: Colors.grey,
iconTheme: IconThemeData(),
appBarTheme: AppBarTheme(
color: Colors.grey,
brightness: Brightness.dark,
elevation: 10.0,
actionsIconTheme: IconThemeData(
color: Colors.grey,
),
),
));
Screen.setBrightness(1.0); Screen.setBrightness(1.0);
} }
break; break;
@ -295,28 +261,31 @@ class _GeneralSettings extends State<GeneralSettings>
} }
break; break;
} }
//permission.setTheme(value); permission.setTheme(value);
} }
setVibration(value){ setVibration(value){
permission.setVibrationPermission(value); permission.setVibrationPermission(value);
} }
setAccisibility(){
if(!accsibility){
}
// permission.setVibrationPermission(value);
}
getValues() async{ getValues() async{
blindValue= permission.isThemeEnabled() == null ? 0 : permission.isThemeEnabled(); blindValue= permission.isThemeEnabled() == null ? 0 : permission.isThemeEnabled();
vibration = permission.isVibrationEnabled() ==null ? false : permission.isVibrationEnabled(); vibration = permission.isVibrationEnabled() ==null ? false : permission.isVibrationEnabled();
accsibility =mediaQueryData.accessibleNavigation; camera = await permission.isCameraEnabled();
location = await permission.isLocationEnabled();
setState(() {
location =location;
camera = camera;
vibration = vibration;
blindValue =blindValue;
accsibility = mediaQueryData.accessibleNavigation;
});
} }
getTheme(value) async{ getTheme(value) async{
if(value ==1){ if(value ==1){
return ThemeData( return ThemeData(
fontFamily: await sharedPref.getString(APP_LANGUAGE) == 'ar' ? 'Cairo' : 'WorkSans', fontFamily: await sharedPref.getString(APP_LANGUAGE) == 'en' ? 'WorkSans' : 'Cairo',
primarySwatch: Colors.grey, primarySwatch: Colors.grey,
visualDensity: VisualDensity.adaptivePlatformDensity, visualDensity: VisualDensity.adaptivePlatformDensity,
brightness: Brightness.light, brightness: Brightness.light,
@ -355,7 +324,7 @@ class _GeneralSettings extends State<GeneralSettings>
}else if(value ==3){ }else if(value ==3){
return ThemeData( return ThemeData(
fontFamily: await sharedPref.getString(APP_LANGUAGE) == 'ar' ? 'Cairo' : 'WorkSans', fontFamily: await sharedPref.getString(APP_LANGUAGE) == 'en' ? 'WorkSans' : 'Cairo',
primarySwatch: Colors.grey, primarySwatch: Colors.grey,
visualDensity: VisualDensity.adaptivePlatformDensity, visualDensity: VisualDensity.adaptivePlatformDensity,
brightness: Brightness.light, brightness: Brightness.light,
@ -394,7 +363,7 @@ class _GeneralSettings extends State<GeneralSettings>
}else { }else {
return ThemeData( return ThemeData(
fontFamily: await sharedPref.getString(APP_LANGUAGE) == 'ar' ? 'Cairo' : 'WorkSans', fontFamily: await sharedPref.getString(APP_LANGUAGE) == 'en' ? 'WorkSans' : 'Cairo',
primarySwatch: Colors.blue, primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity, visualDensity: VisualDensity.adaptivePlatformDensity,
brightness: Brightness.light, brightness: Brightness.light,

@ -1,5 +1,8 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -8,17 +11,31 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class ProfileSettings extends StatefulWidget { class ProfileSettings extends StatefulWidget {
@override @override
_ProfileSettings createState() => _ProfileSettings(); _ProfileSettings createState() => _ProfileSettings();
} }
class _ProfileSettings extends State<ProfileSettings> class _ProfileSettings extends State<ProfileSettings>
with TickerProviderStateMixin { with TickerProviderStateMixin {
bool smsAlert = true;
bool emailAlert = true;
int language = 1;
final authService = new AuthProvider();
TextEditingController emergencyContact = new TextEditingController();
TextEditingController emailController = new TextEditingController();
TextEditingController emergencyContactName = new TextEditingController();
@override
void initState() {
Future.delayed(new Duration(seconds: 0), () {
getSettings(context);
});
super.initState();
}
Widget build(BuildContext context) { Widget build(BuildContext context) {
bool isVibration = true;
var language = 1;
return BaseView<DashboardViewModel>( return BaseView<DashboardViewModel>(
onModelReady: (model) => model.getPatientRadOrders(), onModelReady: (model) =>{},
builder: (_, model, wi) => Container( builder: (_, model, wi) => Container(
child: child:
ListView(scrollDirection: Axis.vertical, children: <Widget>[ ListView(scrollDirection: Axis.vertical, children: <Widget>[
@ -62,7 +79,10 @@ class _ProfileSettings extends State<ProfileSettings>
value: 2, value: 2,
groupValue: language, groupValue: language,
onChanged: (value) { onChanged: (value) {
language = value; setState(() {
language = value;
});
}, },
) )
], ],
@ -79,7 +99,10 @@ class _ProfileSettings extends State<ProfileSettings>
value: 1, value: 1,
groupValue: language, groupValue: language,
onChanged: (value) { onChanged: (value) {
language = value; setState(() {
language = value;
});
}, },
) )
], ],
@ -97,10 +120,10 @@ class _ProfileSettings extends State<ProfileSettings>
children: [ children: [
AppText(TranslationBase.of(context).emailAlert), AppText(TranslationBase.of(context).emailAlert),
Switch( Switch(
value: isVibration, value: emailAlert,
onChanged: (value) { onChanged: (value) {
setState(() { setState(() {
isVibration = value; emailAlert = value;
}); });
}, },
activeTrackColor: Colors.lightGreenAccent, activeTrackColor: Colors.lightGreenAccent,
@ -117,10 +140,10 @@ class _ProfileSettings extends State<ProfileSettings>
children: [ children: [
AppText(TranslationBase.of(context).smsAlert), AppText(TranslationBase.of(context).smsAlert),
Switch( Switch(
value: isVibration, value: smsAlert,
onChanged: (value) { onChanged: (value) {
setState(() { setState(() {
isVibration = value; smsAlert = value;
}); });
}, },
activeTrackColor: Colors.lightGreenAccent, activeTrackColor: Colors.lightGreenAccent,
@ -141,7 +164,7 @@ class _ProfileSettings extends State<ProfileSettings>
children: [ children: [
AppText(TranslationBase.of(context).email), AppText(TranslationBase.of(context).email),
TextField( TextField(
style: TextStyle(color: Colors.red), controller: emailController,
decoration: InputDecoration( decoration: InputDecoration(
suffixIcon: Icon(Icons.edit), suffixIcon: Icon(Icons.edit),
)) ))
@ -156,7 +179,7 @@ class _ProfileSettings extends State<ProfileSettings>
children: [ children: [
AppText(TranslationBase.of(context).emergencyName), AppText(TranslationBase.of(context).emergencyName),
TextField( TextField(
style: TextStyle(color: Colors.red), controller: emergencyContactName,
decoration: InputDecoration( decoration: InputDecoration(
suffixIcon: Icon(Icons.edit), suffixIcon: Icon(Icons.edit),
)) ))
@ -171,7 +194,7 @@ class _ProfileSettings extends State<ProfileSettings>
children: [ children: [
AppText(TranslationBase.of(context).emergencyContact), AppText(TranslationBase.of(context).emergencyContact),
TextField( TextField(
style: TextStyle(color: Colors.red), controller: emergencyContact,
decoration: InputDecoration( decoration: InputDecoration(
suffixIcon: Icon(Icons.edit), suffixIcon: Icon(Icons.edit),
), ),
@ -186,11 +209,44 @@ class _ProfileSettings extends State<ProfileSettings>
child: DefaultButton( child: DefaultButton(
TranslationBase.of(context).submit, TranslationBase.of(context).submit,
() { () {
// print(mobileNo.text); saveSettings();
}, },
)), )),
], ],
)) ))
]))); ])));
} }
getSettings(context){
GifLoaderDialogUtils.showMyDialog(context);
authService.getSettings().then((result)=>{
GifLoaderDialogUtils.hideDialog(context),
setValue(result["PateintInfoForUpdateList"][0])
});
}
setValue(value){
setState(() {
this.language = int.parse(value["PreferredLanguage"]);
this.emailAlert = value["IsEmailAlertRequired"];
this.smsAlert = value["IsSMSAlertRequired"];
this.emailController.text = value["EmailAddress"];
this.emergencyContact.text = value["EmergencyContactNo"];
this.emergencyContactName.text = value["EmergencyContactName"];
});
}
saveSettings(){
GifLoaderDialogUtils.showMyDialog(context);
Map<String, dynamic> request = {};
request["EmailAddress"] =this.emailController.text;
request["EmergencyContactName"] = this.emergencyContactName.text;
request["EmergencyContactNo"] = this.emergencyContact.text;
request["IsEmailAlertRequired"] = this.emailAlert;
request["IsSMSAlertRequired"] = this.smsAlert;
request["PreferredLanguage"] = this.language.toString();
authService.saveSettings(request).then((result)=>{
print(result),
GifLoaderDialogUtils.hideDialog(context)
});
}
} }

@ -1168,6 +1168,9 @@ class DoctorsListService extends BaseService {
double payedAmount, double payedAmount,
String paymentReference, String paymentReference,
String paymentMethodName, String paymentMethodName,
dynamic patientType,
String patientName,
dynamic patientID,
BuildContext context) async { BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -1179,12 +1182,12 @@ class DoctorsListService extends BaseService {
Request req = appGlobal.getPublicRequest(); Request req = appGlobal.getPublicRequest();
request = { request = {
"CustName": authUser.firstName + " " + authUser.lastName, "CustName": patientName,
"CustID": authUser.patientID, "CustID": patientID,
"SetupID": "010266", "SetupID": "010266",
"ProjectID": projectID, "ProjectID": projectID,
"PatientID": authUser.patientID, "PatientID": patientID,
"AccountID": authUser.patientID, "AccountID": patientID,
"PaymentAmount": payedAmount, "PaymentAmount": payedAmount,
"NationalityID": null, "NationalityID": null,
"DepositorName": authUser.firstName + " " + authUser.lastName, "DepositorName": authUser.firstName + " " + authUser.lastName,
@ -1201,8 +1204,8 @@ class DoctorsListService extends BaseService {
"SessionID": "YckwoXhUmWBsnHKEKig", "SessionID": "YckwoXhUmWBsnHKEKig",
"isDentalAllowedBackend": false, "isDentalAllowedBackend": false,
"TokenID": "@dm!n", "TokenID": "@dm!n",
"PatientTypeID": authUser.patientType, "PatientTypeID": patientType,
"PatientType": authUser.patientType "PatientType": patientType
}; };
dynamic localRes; dynamic localRes;
await baseAppClient.post(HIS_CREATE_ADVANCE_PAYMENT, await baseAppClient.post(HIS_CREATE_ADVANCE_PAYMENT,

@ -48,7 +48,8 @@ const LOGGED_IN_USER_URL =
const FORGOT_PATIENT_ID = const FORGOT_PATIENT_ID =
'Services/Authentication.svc/REST/SendPatientIDSMSByMobileNumber'; 'Services/Authentication.svc/REST/SendPatientIDSMSByMobileNumber';
const DASHBOARD = 'Services/Patients.svc/REST/PatientDashboard'; const DASHBOARD = 'Services/Patients.svc/REST/PatientDashboard';
const PROFILE_SETTING = 'Services/Patients.svc/REST/GetPateintInfoForUpdate';
const SAVE_SETTING = 'Services/Patients.svc/REST/UpdatePateintInfo';
class AuthProvider with ChangeNotifier { class AuthProvider with ChangeNotifier {
bool isLogin = false; bool isLogin = false;
bool isLoading = true; bool isLoading = true;
@ -457,4 +458,40 @@ class AuthProvider with ChangeNotifier {
//return Future.value(error); //return Future.value(error);
} }
} }
getSettings() async{
dynamic localRes;
try {
await new BaseAppClient().post(PROFILE_SETTING,
onSuccess: (dynamic response, int statusCode) {
localRes = response; //CheckActivationCode.fromJson();
}, onFailure: (String error, int statusCode) {
localRes = error;
return Future.value(error);
// throw error;
}, body: {});
return Future.value(localRes);
} catch (error) {
throw error;
//return Future.value(error);
}
}
Future saveSettings(request) async{
dynamic localRes;
try {
await new BaseAppClient().post(SAVE_SETTING,
onSuccess: (dynamic response, int statusCode) {
localRes = response; //CheckActivationCode.fromJson();
}, onFailure: (String error, int statusCode) {
localRes = error;
return Future.value(error);
// throw error;
}, body: request);
return Future.value(localRes);
} catch (error) {
throw error;
//return Future.value(error);
}
}
} }

@ -37,6 +37,8 @@ const String SENT_REQUEST_URL =
'Services/Authentication.svc/REST/GetAllSharedRecordsByStatus'; 'Services/Authentication.svc/REST/GetAllSharedRecordsByStatus';
const String RECEVIED_REQUEST_URL = const String RECEVIED_REQUEST_URL =
'Services/Authentication.svc/REST/GetAllPendingRecordsByResponseId'; 'Services/Authentication.svc/REST/GetAllPendingRecordsByResponseId';
const ACCEPT_REJECT_FAMILY = 'Services/Authentication.svc/REST/Update_FileStatus';
const DEACTIVATE_FAMILY = 'Services/Authentication.svc/REST/DeactivateRequestByRensponse';
class FamilyFilesProvider with ChangeNotifier { class FamilyFilesProvider with ChangeNotifier {
bool isLogin = false; bool isLogin = false;
@ -300,4 +302,43 @@ class FamilyFilesProvider with ChangeNotifier {
throw error; throw error;
} }
} }
Future<dynamic> acceptRejectFamily(request) async {
try {
dynamic localRes;
await new BaseAppClient().post(ACCEPT_REJECT_FAMILY,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
AppToast.showErrorToast(message: error);
throw error;
}, body: request);
return Future.value(localRes);
} catch (error) {
print(error);
throw error;
}
}
Future<dynamic> deactivateFamily(request) async {
try {
dynamic localRes;
await new BaseAppClient().post(DEACTIVATE_FAMILY,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
AppToast.showErrorToast(message: error);
throw error;
}, body: request);
return Future.value(localRes);
} catch (error) {
print(error);
throw error;
}
}
} }

@ -1,3 +1,4 @@
import 'package:android_intent/android_intent.dart';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
@ -8,7 +9,8 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:localstorage/localstorage.dart'; import 'package:localstorage/localstorage.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:vibration/vibration.dart';
class PermissionService extends BaseService { class PermissionService extends BaseService {
final LocalStorage storage = new LocalStorage("permission"); final LocalStorage storage = new LocalStorage("permission");
@ -19,12 +21,21 @@ class PermissionService extends BaseService {
} }
isVibrationEnabled() { isVibrationEnabled() {
return storage.getItem('isVibration') ==null ? false :true; return (storage.getItem('isVibration') ==null) || (storage.getItem('isVibration')) ==false ? false :true;
} }
vibrate(){ vibrate(callback, context) async{
if (callback == null)
return null;
if(isVibrationEnabled() ==true){ if(isVibrationEnabled() ==true){
HapticFeedback.vibrate(); if (await Vibration.hasVibrator()) {
Vibration.vibrate(duration: 100);
callback();
}
}else{
callback();
} }
} }
@ -35,5 +46,23 @@ class PermissionService extends BaseService {
isThemeEnabled() { isThemeEnabled() {
return storage.getItem('isTheme'); return storage.getItem('isTheme');
} }
cameraPermission() async{
Map<Permission, PermissionStatus> statuses = await [
Permission.camera,
].request();
}
isCameraEnabled() async{
print(await Permission.camera.status);
return await Permission.camera.status == PermissionStatus.granted ? true : false;
}
setCameraLocationPermission(context) async{
Navigator.pop(context);
openAppSettings();
}
isLocationEnabled() async{
return await Permission.location.status == PermissionStatus.granted ? true : false;
}
openSettings() async{
openAppSettings();
}
} }

@ -53,7 +53,7 @@ final blueBackground = Color(0xFFFFFFFF);
), ),
); );
final defaultTheme = ThemeData( var defaultTheme = ThemeData(
//fontFamily: ProjectViewModel().isArabic? 'Cairo' : 'WorkSans', //fontFamily: ProjectViewModel().isArabic? 'Cairo' : 'WorkSans',
primarySwatch: Colors.blue, primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity, visualDensity: VisualDensity.adaptivePlatformDensity,

@ -864,6 +864,31 @@ String get fileno => localizedValues['fileno'][locale.languageCode];
String get searchItemError => localizedValues['searchItemError'][locale.languageCode]; String get searchItemError => localizedValues['searchItemError'][locale.languageCode];
String get youCanFind => localizedValues['YouCanFind'][locale.languageCode]; String get youCanFind => localizedValues['YouCanFind'][locale.languageCode];
String get itemInSearch => localizedValues['ItemInSearch'][locale.languageCode]; String get itemInSearch => localizedValues['ItemInSearch'][locale.languageCode];
String get invoiceNo => localizedValues['InvoiceNo'][locale.languageCode];
String get specialResult => localizedValues['SpecialResult'][locale.languageCode];
String get generalResult => localizedValues['GeneralResult'][locale.languageCode];
String get showMoreBtn => localizedValues['show-more-btn'][locale.languageCode];
String get value => localizedValues['value'][locale.languageCode];
String get range => localizedValues['range'][locale.languageCode];
String get outpatient => localizedValues['out-patient'][locale.languageCode];
String get inPatient => localizedValues['in-patient'][locale.languageCode];
String get report => localizedValues['report'][locale.languageCode];
String get openRad => localizedValues['open-rad'][locale.languageCode];
String get sendCopyRad => localizedValues['send-copy'][locale.languageCode];
String get vaccination => localizedValues['vaccination'][locale.languageCode];
String get welcomeBackV => localizedValues['welcomeBack'][locale.languageCode];
String get instructions => localizedValues['instructions'][locale.languageCode];
String get updateEmail => localizedValues['update-email'][locale.languageCode];
String get updatedEmail => localizedValues['updated-email'][locale.languageCode];
String get viewListChildren => localizedValues['view-list-children'][locale.languageCode];
String get addChild => localizedValues['add-child'][locale.languageCode];
String get childName => localizedValues['child-name'][locale.languageCode];
String get childDob => localizedValues['childDob'][locale.languageCode];
String get delete => localizedValues['delete'][locale.languageCode];
String get deletedChild => localizedValues['deleted-child'][locale.languageCode];
String get visit => localizedValues['visit'][locale.languageCode];
String get descriptionVaccination => localizedValues['description-vaccination'][locale.languageCode];
String get dueDate => localizedValues['due-date'][locale.languageCode];
} }

@ -90,7 +90,7 @@ class _ButtonState extends State<Button> with TickerProviderStateMixin {
onTapCancel: () { onTapCancel: () {
_animationController.forward(); _animationController.forward();
}, },
onTap: (){Feedback.wrapForTap(widget.onTap, context); permission.vibrate();}, onTap: (){permission.vibrate(widget.onTap, context);},
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
child: Transform.scale( child: Transform.scale(
scale: _buttonSize, scale: _buttonSize,

@ -24,6 +24,6 @@ class DefaultButton extends StatelessWidget {
this.text, this.text,
style: TextStyle(fontSize: SizeConfig.textMultiplier * 2), style: TextStyle(fontSize: SizeConfig.textMultiplier * 2),
), ),
onPressed: () =>{ this.onPress(), permission.vibrate()})); onPressed:(){permission.vibrate(this.onPress, context); }));
} }
} }

@ -63,7 +63,7 @@ class _FloatingButtonState extends State<FloatingButton>
onTapCancel: () { onTapCancel: () {
_animationController.forward(); _animationController.forward();
}, },
onTap:(){ Feedback.wrapForTap(widget.onTap, context); permission.vibrate();}, onTap: (){permission.vibrate(widget.onTap, context);},
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
child: Transform.scale( child: Transform.scale(
scale: _buttonSize, scale: _buttonSize,

@ -88,7 +88,7 @@ class _MiniButtonState extends State<MiniButton> with TickerProviderStateMixin {
_animationController.forward(); _animationController.forward();
}, },
// onTap: Feedback.wrapForTap(widget.onTap, context), // onTap: Feedback.wrapForTap(widget.onTap, context),
onTap: () =>{ widget.onTap(), permission.vibrate()}, onTap: (){permission.vibrate(widget.onTap, context);},
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
child: Transform.scale( child: Transform.scale(
scale: _buttonSize, scale: _buttonSize,

@ -144,7 +144,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
onTapCancel: () { onTapCancel: () {
_animationController.forward(); _animationController.forward();
}, },
onTap: () =>{ widget.disabled ? null : widget.onTap(), permission.vibrate()}, onTap: () =>{ widget.disabled ? null : permission.vibrate(widget.onTap, context)},
// onTap: widget.disabled?null:Feedback.wrapForTap(widget.onTap, context), // onTap: widget.disabled?null:Feedback.wrapForTap(widget.onTap, context),
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
child: Transform.scale( child: Transform.scale(

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart'; import 'package:diplomaticquarterapp/core/model/labs/lab_result.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -32,7 +33,7 @@ class LabResultWidget extends StatelessWidget {
//TODO model.getPatientLabResult(patientLabOrder: widget.patientLabOrder); //TODO model.getPatientLabResult(patientLabOrder: widget.patientLabOrder);
}, },
child: Texts( child: Texts(
'Flow Chart', TranslationBase.of(context).showMoreBtn,
decoration: TextDecoration.underline, decoration: TextDecoration.underline,
color: Colors.blue, color: Colors.blue,
), ),
@ -44,13 +45,13 @@ class LabResultWidget extends StatelessWidget {
inside: BorderSide( inside: BorderSide(
width: 2.0, color: Colors.grey[300]), width: 2.0, color: Colors.grey[300]),
), ),
children: fullData(patientLabResultList), children: fullData(patientLabResultList,context),
), ),
], ],
), ),
); );
} }
List<TableRow> fullData(List<LabResult> labResultList) { List<TableRow> fullData(List<LabResult> labResultList,context) {
List<TableRow> tableRow = []; List<TableRow> tableRow = [];
tableRow.add( tableRow.add(
TableRow( TableRow(
@ -58,7 +59,7 @@ class LabResultWidget extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xff515B5D), color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic topLeft: projectViewModel.isArabic
? Radius.circular(0.0) ? Radius.circular(0.0)
@ -70,7 +71,7 @@ class LabResultWidget extends StatelessWidget {
), ),
child: Center( child: Center(
child: Texts( child: Texts(
'Description', TranslationBase.of(context).description,
color: Colors.white, color: Colors.white,
), ),
), ),
@ -80,17 +81,17 @@ class LabResultWidget extends StatelessWidget {
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xff515B5D), color: Theme.of(context).primaryColor,
), ),
child: Center( child: Center(
child: Texts('Value', color: Colors.white), child: Texts(TranslationBase.of(context).value, color: Colors.white),
), ),
height: 60), height: 60),
), ),
Container( Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xff515B5D), color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic topLeft: projectViewModel.isArabic
? Radius.circular(10.0) ? Radius.circular(10.0)
@ -101,7 +102,7 @@ class LabResultWidget extends StatelessWidget {
), ),
), ),
child: Center( child: Center(
child: Texts('Range', color: Colors.white), child: Texts(TranslationBase.of(context).range, color: Colors.white),
), ),
height: 60), height: 60),
), ),

@ -1,3 +1,5 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:diplomaticquarterapp/widgets/others/StarRating.dart';
@ -5,6 +7,7 @@ import 'package:diplomaticquarterapp/widgets/others/rounded_container_widget.dar
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
class DoctorCard extends StatelessWidget { class DoctorCard extends StatelessWidget {
final String name; final String name;
@ -26,22 +29,22 @@ class DoctorCard extends StatelessWidget {
this.billNo, this.billNo,
this.onTap, this.onTap,
this.onEmailTap, this.onEmailTap,
this.isInOutPatient}); this.isInOutPatient});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
margin: EdgeInsets.all(10), margin: EdgeInsets.all(10),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all( border: Border.all(
width: 0.5, width: 0.5,
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
), ),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(8.0), Radius.circular(8.0),
), ),
color: Colors.white color: Colors.white),
),
child: InkWell( child: InkWell(
onTap: onTap, onTap: onTap,
child: Column( child: Column(
@ -50,18 +53,34 @@ class DoctorCard extends StatelessWidget {
Row( Row(
children: <Widget>[ children: <Widget>[
Container( Container(
width: 20, width:projectViewModel.isArabic? 27:20,
height: date == null ? 100 : 130, height: date == null ? projectViewModel.isArabic? 170 :100 : 150,
decoration: BoxDecoration( decoration: BoxDecoration(
color: !isInOutPatient? Colors.red[900]: Theme.of(context).primaryColor, color: !isInOutPatient
borderRadius: BorderRadius.only( ? Colors.red[900]
topLeft: Radius.circular(8), : Theme.of(context).primaryColor,
bottomLeft: Radius.circular(8))), borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic
? Radius.circular(0)
: Radius.circular(8),
bottomLeft: projectViewModel.isArabic
? Radius.circular(0)
: Radius.circular(8),
topRight: projectViewModel.isArabic? Radius.circular(8):Radius.circular(0),
bottomRight: projectViewModel.isArabic? Radius.circular(8):Radius.circular(0),
),
),
child: RotatedBox( child: RotatedBox(
quarterTurns: 3, quarterTurns: 3,
child: Center( child: Center(
child: Text( child: Text(
!isInOutPatient? 'In Patient'.toUpperCase():'OutPatient'.toUpperCase(), !isInOutPatient
? TranslationBase.of(context)
.inPatient
.toUpperCase()
: TranslationBase.of(context)
.outpatient
.toUpperCase(),
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
), ),
)), )),
@ -116,14 +135,14 @@ class DoctorCard extends StatelessWidget {
), ),
), ),
), ),
if(onEmailTap!=null) if (onEmailTap != null)
InkWell( InkWell(
onTap: onEmailTap, onTap: onEmailTap,
child: Icon( child: Icon(
Icons.email, Icons.email,
color: Colors.red, color: Colors.red,
), ),
) )
], ],
), ),
), ),

@ -3,6 +3,8 @@ import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_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/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -41,139 +43,139 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
return Container( return BaseView<LabsViewModel>(
margin: EdgeInsets.all(15), onModelReady: (model) =>
child: Column( model.getPatientLabResult(patientLabOrder: widget.patientLabOrder),
children: <Widget>[ builder: (_, model, w) => NetworkBaseView(
Column( baseViewModel: model,
crossAxisAlignment: CrossAxisAlignment.start, child: Container(
margin: EdgeInsets.all(15),
child: Column(
children: <Widget>[ children: <Widget>[
Container( Column(
margin: EdgeInsets.all(15), crossAxisAlignment: CrossAxisAlignment.start,
child: Row( children: <Widget>[
mainAxisAlignment: MainAxisAlignment.spaceBetween, Container(
children: <Widget>[ margin: EdgeInsets.all(15),
Expanded( child: Row(
child: Container( mainAxisAlignment: MainAxisAlignment.spaceBetween,
decoration: BoxDecoration( children: <Widget>[
shape: BoxShape.rectangle, Expanded(
color: Colors.white, child: Container(
borderRadius: BorderRadius.all( decoration: BoxDecoration(
Radius.circular(5.0), shape: BoxShape.rectangle,
)),
padding: EdgeInsets.all(10.0),
margin: EdgeInsets.only(left: 5, right: 5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts('Invoice No'),
Texts(widget.billNo),
],
),
),
),
InkWell(
onTap: widget.onTap,
child: Container(
margin: EdgeInsets.only(left: 5, right: 5),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.red[800],
borderRadius: BorderRadius.all(
Radius.circular(5.0),
)),
child: Container(
padding: EdgeInsets.all(10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Icon(
Icons.email,
color: Colors.white,
),
Texts(
'Send a copy',
color: Colors.white, color: Colors.white,
) borderRadius: BorderRadius.all(
], Radius.circular(5.0),
)),
padding: EdgeInsets.all(10.0),
margin: EdgeInsets.only(left: 5, right: 5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(TranslationBase.of(context).invoiceNo),
Texts(widget.billNo),
],
),
), ),
), ),
InkWell(
onTap: widget.onTap,
child: Container(
margin: EdgeInsets.only(left: 5, right: 5),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.all(
Radius.circular(5.0),
)),
child: Container(
padding: EdgeInsets.all(10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Icon(
Icons.email,
color: Colors.white,
),
Texts(
TranslationBase.of(context).sendCopy,
color: Colors.white,
)
],
),
),
),
)
],
),
),
SizedBox(
height: 10,
),
InkWell(
onTap: () {
setState(() {
_isShowMore = !_isShowMore;
});
},
child: Container(
padding: EdgeInsets.all(10.0),
margin: EdgeInsets.only(left: 5, right: 5),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(5.0),
)),
child: Row(
children: <Widget>[
Expanded(child: Texts(TranslationBase.of(context).specialResult)),
Container(
width: 25,
height: 25,
decoration: BoxDecoration(
shape: BoxShape.circle, color: Theme.of(context).primaryColor),
child: Icon(
_isShowMore
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down,
color: Colors.white,
size: 22,
),
)
],
), ),
) ),
], ),
), if (_isShowMore)
), AnimatedContainer(
SizedBox( padding: EdgeInsets.all(10.0),
height: 10, margin: EdgeInsets.only(left: 5, right: 5),
), decoration: BoxDecoration(
InkWell( shape: BoxShape.rectangle,
onTap: () {
setState(() {
_isShowMore = !_isShowMore;
});
},
child: Container(
padding: EdgeInsets.all(10.0),
margin: EdgeInsets.only(left: 5, right: 5),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(5.0),
)),
child: Row(
children: <Widget>[
Expanded(child: Texts('Special Result')),
Container(
width: 25,
height: 25,
decoration: BoxDecoration(
shape: BoxShape.circle, color: Colors.red[900]),
child: Icon(
_isShowMore
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down,
color: Colors.white, color: Colors.white,
size: 22, borderRadius: BorderRadius.only(
), bottomLeft: Radius.circular(5.0),
) bottomRight: Radius.circular(5.0),
], )),
duration: Duration(milliseconds: 7000),
child: Container(
width: double.infinity,
child: Html(
data: widget.details ?? 'No Data',
)),
),
SizedBox(
height: 12,
), ),
), Container(
),
if (_isShowMore)
AnimatedContainer(
padding: EdgeInsets.all(10.0),
margin: EdgeInsets.only(left: 5, right: 5),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.white,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(5.0),
bottomRight: Radius.circular(5.0),
)),
duration: Duration(milliseconds: 7000),
child: Container(
width: double.infinity,
child: Html(
data: widget.details ?? 'No Data',
)),
),
SizedBox(
height: 12,
),
BaseView<LabsViewModel>(
onModelReady: (model) => model.getPatientLabResult(
patientLabOrder: widget.patientLabOrder),
builder: (_, model, w) => NetworkBaseView(
baseViewModel: model,
child: Container(
child: Column( child: Column(
children: [ children: [
InkWell( InkWell(
onTap: () { onTap: () {
setState( setState(
() { () {
_isShowMoreGeneral = !_isShowMoreGeneral; _isShowMoreGeneral = !_isShowMoreGeneral;
}, },
); );
@ -189,13 +191,13 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
)), )),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Expanded(child: Texts('General Result')), Expanded(child: Texts(TranslationBase.of(context).generalResult)),
Container( Container(
width: 25, width: 25,
height: 25, height: 25,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, shape: BoxShape.circle,
color: Colors.red[900]), color: Theme.of(context).primaryColor),
child: Icon( child: Icon(
_isShowMoreGeneral _isShowMoreGeneral
? Icons.keyboard_arrow_up ? Icons.keyboard_arrow_up
@ -224,11 +226,12 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
child: Container( child: Container(
width: double.infinity, width: double.infinity,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
...List.generate( ...List.generate(
model.labResultLists.length, model.labResultLists.length,
(index) => LabResultWidget( (index) => LabResultWidget(
filterName: model filterName: model
.labResultLists[index].filterName, .labResultLists[index].filterName,
patientLabResultList: model patientLabResultList: model
@ -242,15 +245,13 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
), ),
], ],
), ),
), )
), ],
) ),
], ],
), ),
], ),
), ),
); );
} }
} }

@ -1,6 +1,7 @@
import 'dart:io'; import 'dart:io';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
@ -39,8 +40,9 @@ class _AppDrawerState extends State<AppDrawer> {
var familyFileProvider = FamilyFilesProvider(); var familyFileProvider = FamilyFilesProvider();
AuthenticatedUser user; AuthenticatedUser user;
AuthenticatedUser mainUser; AuthenticatedUser mainUser;
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
locator<AuthenticatedUserObject>(); VitalSignService _vitalSignService = locator<VitalSignService>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -265,10 +267,12 @@ class _AppDrawerState extends State<AppDrawer> {
), ),
Expanded( Expanded(
flex: 7, flex: 7,
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[ child: Padding(
padding:EdgeInsets.only(left:5, right:5),
child:Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
AppText(result.patientName, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black), AppText(result.patientName, color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
AppText(TranslationBase.of(context).fileno + ": " + result.iD.toString(), color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black), AppText(TranslationBase.of(context).fileno + ": " + result.iD.toString(), color: result.responseID == user.patientID ? Color(0xFF40ACC9) : Colors.black),
])), ]))),
], ],
))) )))
: SizedBox(); : SizedBox();
@ -406,6 +410,8 @@ class _AppDrawerState extends State<AppDrawer> {
authenticatedUserObject.logout(); authenticatedUserObject.logout();
projectProvider.isLogin = false; projectProvider.isLogin = false;
await authenticatedUserObject.getUser(); await authenticatedUserObject.getUser();
_vitalSignService.heightCm ="";
_vitalSignService.weightKg ="";
await sharedPref.clear(); await sharedPref.clear();
this.user = null; this.user = null;
Navigator.of(context).pushNamed(HOME); Navigator.of(context).pushNamed(HOME);

@ -107,13 +107,16 @@ class MyInAppBrowser extends InAppBrowser {
String projId, String projId,
String emailId, String emailId,
String paymentMethod, String paymentMethod,
dynamic patientType,
String patientName,
dynamic patientID,
AuthenticatedUser authenticatedUser, AuthenticatedUser authenticatedUser,
InAppBrowser browser) { InAppBrowser browser) {
getDeviceToken(); getDeviceToken();
this.browser = browser; this.browser = browser;
this.browser.openUrl( this.browser.openUrl(
url: generateURL(amount, orderDesc, transactionID, projId, emailId, url: generateURL(amount, orderDesc, transactionID, projId, emailId,
paymentMethod, authenticatedUser)); paymentMethod, patientType, patientName, patientID, authenticatedUser));
} }
openBrowser(String url) { openBrowser(String url) {
@ -128,6 +131,9 @@ class MyInAppBrowser extends InAppBrowser {
String projId, String projId,
String emailId, String emailId,
String paymentMethod, String paymentMethod,
dynamic patientType,
String patientName,
dynamic patientID,
AuthenticatedUser authUser, AuthenticatedUser authUser,
[var patientData, [var patientData,
var servID, var servID,
@ -136,11 +142,11 @@ class MyInAppBrowser extends InAppBrowser {
String currentLanguageID = getLanguageID() == 'ar' ? 'AR' : 'EN'; String currentLanguageID = getLanguageID() == 'ar' ? 'AR' : 'EN';
String form = getForm(); String form = getForm();
if (authUser != null) { // if (authUser != null) {
form = form.replaceFirst("EMAIL_VALUE", authUser.emailAddress); // form = form.replaceFirst("EMAIL_VALUE", authUser.emailAddress);
} else { // } else {
form = form.replaceFirst("EMAIL_VALUE", emailId); form = form.replaceFirst("EMAIL_VALUE", emailId);
} // }
form = form.replaceFirst('AMOUNT_VALUE', amount.toString()); form = form.replaceFirst('AMOUNT_VALUE', amount.toString());
form = form.replaceFirst('ORDER_DESCRIPTION_VALUE', orderDesc); form = form.replaceFirst('ORDER_DESCRIPTION_VALUE', orderDesc);
@ -152,7 +158,7 @@ class MyInAppBrowser extends InAppBrowser {
form = form.replaceFirst('PATIENT_OUT_SA', form = form.replaceFirst('PATIENT_OUT_SA',
authUser.outSA == 0 ? false.toString() : true.toString()); authUser.outSA == 0 ? false.toString() : true.toString());
form = form.replaceFirst('PATIENT_TYPE_ID', form = form.replaceFirst('PATIENT_TYPE_ID',
patientData == null ? authUser.patientType.toString() : "1"); patientData == null ? patientType.toString() : "1");
// form = form.replaceFirst('DEVICE_TOKEN', this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false) + "," + this.cs.sharedService.getSharedData(AuthenticationService.APNS_TOKEN, false)); // form = form.replaceFirst('DEVICE_TOKEN', this.cs.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false) + "," + this.cs.sharedService.getSharedData(AuthenticationService.APNS_TOKEN, false));
// form = form.replaceFirst('LATITUDE_VALUE', this.cs.sharedService.getSharedData('userLat', false)); // form = form.replaceFirst('LATITUDE_VALUE', this.cs.sharedService.getSharedData('userLat', false));
@ -172,13 +178,13 @@ class MyInAppBrowser extends InAppBrowser {
form = form.replaceFirst('LIVE_SERVICE_ID', "2"); form = form.replaceFirst('LIVE_SERVICE_ID', "2");
} }
if (patientData == null) { // if (patientData == null) {
form = form.replaceFirst('CUSTNAME_VALUE', authUser.firstName); form = form.replaceFirst('CUSTNAME_VALUE', patientName);
form = form.replaceFirst('CUSTID_VALUE', authUser.patientID.toString()); form = form.replaceFirst('CUSTID_VALUE', patientID.toString());
} else { // } else {
form = form.replaceFirst('CUSTNAME_VALUE', patientData.depositorName); // form = form.replaceFirst('CUSTNAME_VALUE', patientData.depositorName);
form = form.replaceFirst('CUSTID_VALUE', patientData.fileNumber); // form = form.replaceFirst('CUSTID_VALUE', patientData.fileNumber);
} // }
form = form.replaceFirst('LATITUDE_VALUE', "24.708488"); form = form.replaceFirst('LATITUDE_VALUE', "24.708488");
form = form.replaceFirst('LONGITUDE_VALUE', "46.665925"); form = form.replaceFirst('LONGITUDE_VALUE', "46.665925");

@ -152,7 +152,7 @@ dependencies:
after_layout: ^1.0.7 after_layout: ^1.0.7
twilio_programmable_video: ^0.5.0+3 twilio_programmable_video: ^0.5.0+3
flutter_tts: ^1.2.6 flutter_tts: ^1.2.6
vibration: ^1.7.2
speech_to_text: speech_to_text:
path: speech_to_text path: speech_to_text

Loading…
Cancel
Save