Merge branch 'development' into development_new_design_2.0

# Conflicts:
#	lib/config/localized_values.dart
merge-requests/390/head
Sikander Saleem 3 years ago
commit 56c0adaada

@ -34,13 +34,15 @@ android {
}
lintOptions {
disable 'InvalidPackage'
disable 'MissingTranslation'
checkReleaseBuilds false
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
// applicationId "com.cloud.diplomaticquarterapp"
applicationId "com.ejada.hmg.uat"
applicationId "com.ejada.hmg"
minSdkVersion 21
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()

@ -10,7 +10,7 @@
"client_info": {
"mobilesdk_app_id": "1:815750722565:android:62281cd3e5df4063",
"android_client_info": {
"package_name": "com.ejada.hmg.uat"
"package_name": "com.ejada.hmg"
}
},
"oauth_client": [

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cloud.diplomaticquarterapp">
package="com.ejada.hmg">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cloud.diplomaticquarterapp">
package="com.ejada.hmg">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide

@ -1,8 +1,8 @@
package com.cloud.diplomaticquarterapp
package com.ejada.hmg
import android.os.Bundle
import android.util.Log
import androidx.annotation.NonNull;
import com.cloud.diplomaticquarterapp.utils.*
import com.ejada.hmg.utils.*
import io.flutter.embedding.android.FlutterFragmentActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel

@ -1,4 +1,4 @@
package com.cloud.diplomaticquarterapp.geofence
package com.ejada.hmg.geofence
import com.google.android.gms.location.Geofence
import com.google.gson.Gson

@ -1,4 +1,4 @@
package com.cloud.diplomaticquarterapp.geofence
package com.ejada.hmg.geofence
import android.Manifest
import android.app.PendingIntent
@ -8,9 +8,9 @@ import android.content.SharedPreferences
import android.content.pm.PackageManager
import android.location.Location
import androidx.core.content.ContextCompat
import com.cloud.diplomaticquarterapp.geofence.intent_receivers.GeofenceBroadcastReceiver
import com.cloud.diplomaticquarterapp.geofence.intent_receivers.ReregisterGeofenceJobService
import com.cloud.diplomaticquarterapp.utils.*
import com.ejada.hmg.geofence.intent_receivers.GeofenceBroadcastReceiver
import com.ejada.hmg.geofence.intent_receivers.ReregisterGeofenceJobService
import com.ejada.hmg.utils.*
import com.google.android.gms.location.Geofence
import com.google.android.gms.location.GeofencingClient
import com.google.android.gms.location.GeofencingRequest

@ -1,14 +1,14 @@
package com.cloud.diplomaticquarterapp.geofence.intent_receivers
package com.ejada.hmg.geofence.intent_receivers
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.util.Log
import com.cloud.diplomaticquarterapp.geofence.GeofenceTransition
import com.cloud.diplomaticquarterapp.geofence.HMG_Geofence
import com.cloud.diplomaticquarterapp.utils.Logs
import com.ejada.hmg.geofence.GeofenceTransition
import com.ejada.hmg.geofence.HMG_Geofence
import com.ejada.hmg.utils.Logs
import com.google.android.gms.location.GeofenceStatusCodes
import com.google.android.gms.location.GeofencingEvent

@ -1,11 +1,11 @@
package com.cloud.diplomaticquarterapp.geofence.intent_receivers
package com.ejada.hmg.geofence.intent_receivers
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.cloud.diplomaticquarterapp.geofence.HMG_Geofence
import com.ejada.hmg.geofence.HMG_Geofence
import com.google.android.gms.location.GeofenceStatusCodes
class GeofenceBroadcastReceiverWithJobService : BroadcastReceiver() {

@ -1,10 +1,10 @@
package com.cloud.diplomaticquarterapp.geofence.intent_receivers
package com.ejada.hmg.geofence.intent_receivers
import android.content.Context
import com.cloud.diplomaticquarterapp.R
import com.cloud.diplomaticquarterapp.geofence.HMG_Geofence
import com.ejada.hmg.R
import com.ejada.hmg.geofence.HMG_Geofence
import com.google.android.gms.common.api.ApiException
import com.google.android.gms.location.GeofenceStatusCodes

@ -29,15 +29,15 @@
*/
package com.cloud.diplomaticquarterapp.geofence.intent_receivers
package com.ejada.hmg.geofence.intent_receivers
import android.content.Context
import android.content.Intent
import android.util.Log
import androidx.core.app.JobIntentService
import com.cloud.diplomaticquarterapp.geofence.GeofenceTransition
import com.cloud.diplomaticquarterapp.geofence.HMG_Geofence
import com.cloud.diplomaticquarterapp.utils.saveLog
import com.ejada.hmg.geofence.GeofenceTransition
import com.ejada.hmg.geofence.HMG_Geofence
import com.ejada.hmg.utils.saveLog
import com.google.android.gms.location.GeofenceStatusCodes
import com.google.android.gms.location.GeofencingEvent

@ -1,12 +1,12 @@
package com.cloud.diplomaticquarterapp.geofence.intent_receivers
package com.ejada.hmg.geofence.intent_receivers
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.cloud.diplomaticquarterapp.geofence.HMG_Geofence
import com.cloud.diplomaticquarterapp.utils.PREFS_STORAGE
import com.ejada.hmg.geofence.HMG_Geofence
import com.ejada.hmg.utils.PREFS_STORAGE
class GeofencingRebootBroadcastReceiver : BroadcastReceiver(){
override fun onReceive(context: Context, intent: Intent) {

@ -1,14 +1,14 @@
package com.cloud.diplomaticquarterapp.geofence.intent_receivers
package com.ejada.hmg.geofence.intent_receivers
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.location.LocationManager
import com.cloud.diplomaticquarterapp.geofence.HMG_Geofence
import com.cloud.diplomaticquarterapp.utils.HMGUtils
import com.cloud.diplomaticquarterapp.utils.PREFS_STORAGE
import com.ejada.hmg.geofence.HMG_Geofence
import com.ejada.hmg.utils.HMGUtils
import com.ejada.hmg.utils.PREFS_STORAGE
class LocationProviderChangeReceiver : BroadcastReceiver() {
private val LOG_TAG = "LocationProviderChangeReceiver"

@ -1,9 +1,9 @@
package com.cloud.diplomaticquarterapp.geofence.intent_receivers
package com.ejada.hmg.geofence.intent_receivers
import android.app.job.JobParameters
import android.app.job.JobService
import com.cloud.diplomaticquarterapp.geofence.HMG_Geofence
import com.cloud.diplomaticquarterapp.utils.Logs
import com.ejada.hmg.geofence.HMG_Geofence
import com.ejada.hmg.utils.Logs
class ReregisterGeofenceJobService : JobService(){
companion object{

@ -1,4 +1,4 @@
package com.cloud.diplomaticquarterapp.hmgwifi
package com.ejada.hmg.hmgwifi
import android.content.Context
import android.net.ConnectivityManager
@ -8,9 +8,9 @@ import android.net.wifi.WifiManager
import android.os.Build
import android.util.Log
import android.widget.Toast
import com.cloud.diplomaticquarterapp.MainActivity
import com.cloud.diplomaticquarterapp.utils.FlutterText
import com.cloud.diplomaticquarterapp.utils.HMGUtils
import com.ejada.hmg.MainActivity
import com.ejada.hmg.utils.FlutterText
import com.ejada.hmg.utils.HMGUtils
class HMG_Guest(context: MainActivity) {

@ -1,9 +1,9 @@
package com.cloud.diplomaticquarterapp.hmgwifi
package com.ejada.hmg.hmgwifi
import android.annotation.SuppressLint
import com.cloud.diplomaticquarterapp.utils.API
import com.cloud.diplomaticquarterapp.MainActivity
import com.cloud.diplomaticquarterapp.utils.FlutterText
import com.ejada.hmg.utils.API
import com.ejada.hmg.MainActivity
import com.ejada.hmg.utils.FlutterText
import com.github.kittinunf.fuel.core.extensions.jsonBody
import com.github.kittinunf.fuel.httpGet
import com.github.kittinunf.fuel.httpPost

@ -1,4 +1,4 @@
package com.cloud.diplomaticquarterapp.hmgwifi
package com.ejada.hmg.hmgwifi
import android.annotation.SuppressLint
import android.content.Context
@ -7,8 +7,8 @@ import android.net.wifi.*
import android.net.wifi.SupplicantState.ASSOCIATED
import android.net.wifi.SupplicantState.COMPLETED
import android.util.Log
import com.cloud.diplomaticquarterapp.MainActivity
import com.cloud.diplomaticquarterapp.utils.HMGUtils
import com.ejada.hmg.MainActivity
import com.ejada.hmg.utils.HMGUtils
class WPA(mainActivity: MainActivity, SSID:String) {
private var TAG = "WPA"

@ -1,4 +1,4 @@
package com.cloud.diplomaticquarterapp.utils
package com.ejada.hmg.utils
class API {
companion object{

@ -1,4 +1,4 @@
package com.cloud.diplomaticquarterapp.utils
package com.ejada.hmg.utils
const val PREFS_STORAGE = "FlutterSharedPreferences"

@ -1,4 +1,4 @@
package com.cloud.diplomaticquarterapp.utils
package com.ejada.hmg.utils
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugin.common.MethodChannel.Result

@ -1,4 +1,4 @@
package com.cloud.diplomaticquarterapp.utils
package com.ejada.hmg.utils
import android.app.NotificationChannel
import android.app.NotificationManager
@ -13,10 +13,10 @@ import android.widget.Toast
import androidx.annotation.Nullable
import androidx.core.app.NotificationCompat
import androidx.core.app.TaskStackBuilder
import com.cloud.diplomaticquarterapp.BuildConfig
import com.cloud.diplomaticquarterapp.MainActivity
import com.cloud.diplomaticquarterapp.R
import com.cloud.diplomaticquarterapp.geofence.GeoZoneModel
import com.ejada.hmg.BuildConfig
import com.ejada.hmg.MainActivity
import com.ejada.hmg.R
import com.ejada.hmg.geofence.GeoZoneModel
import com.github.kittinunf.fuel.core.extensions.jsonBody
import com.github.kittinunf.fuel.httpPost
import com.google.gson.Gson

@ -1,4 +1,4 @@
//package com.cloud.diplomaticquarterapp.utils
//package com.ejada.hmg.utils
//
//import android.annotation.SuppressLint
//import android.content.Context
@ -10,8 +10,8 @@
//import android.net.wifi.WifiConfiguration
//import android.net.wifi.WifiManager
//import android.util.Log
//import com.cloud.diplomaticquarterapp.utils.API
//import com.cloud.diplomaticquarterapp.FlutterMainActivity
//import com.ejada.hmg.utils.API
//import com.ejada.hmg.FlutterMainActivity
//import com.github.kittinunf.fuel.core.extensions.jsonBody
//import com.github.kittinunf.fuel.httpGet
//import com.github.kittinunf.fuel.httpPost

@ -1,9 +1,9 @@
package com.cloud.diplomaticquarterapp.utils
package com.ejada.hmg.utils
import android.content.Context
import android.content.SharedPreferences
import android.os.Build
import com.cloud.diplomaticquarterapp.BuildConfig
import com.ejada.hmg.BuildConfig
import com.google.gson.Gson
class Logs {

@ -1,13 +1,13 @@
package com.cloud.diplomaticquarterapp.utils
package com.ejada.hmg.utils
import android.content.Context
import android.net.wifi.WifiManager
import android.util.Log
import com.cloud.diplomaticquarterapp.MainActivity
import com.cloud.diplomaticquarterapp.hmgwifi.HMG_Guest
import com.cloud.diplomaticquarterapp.hmgwifi.HMG_Internet
import com.cloud.diplomaticquarterapp.geofence.GeoZoneModel
import com.cloud.diplomaticquarterapp.geofence.HMG_Geofence
import com.ejada.hmg.MainActivity
import com.ejada.hmg.hmgwifi.HMG_Guest
import com.ejada.hmg.hmgwifi.HMG_Internet
import com.ejada.hmg.geofence.GeoZoneModel
import com.ejada.hmg.geofence.HMG_Geofence
import io.flutter.plugin.common.BinaryMessenger
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cloud.diplomaticquarterapp">
package="com.ejada.hmg">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->

@ -83,6 +83,7 @@ class Patientobject {
String dateofBirth;
int gender;
String nationalityID;
String eHealthIDField;
String dateofBirthN;
String emailAddress;
String sourceType;
@ -96,15 +97,16 @@ class Patientobject {
this.mobileNumber,
this.patientOutSA,
this.firstName,
this.middleName,
this.lastName,
this.firstNameN,
this.middleNameN,
this.lastNameN,
this.middleName,
this.lastName,
this.firstNameN,
this.middleNameN,
this.lastNameN,
this.strDateofBirth,
this.dateofBirth,
this.gender,
this.nationalityID,
this.eHealthIDField,
this.dateofBirthN,
this.emailAddress,
this.sourceType,
@ -127,6 +129,7 @@ class Patientobject {
dateofBirth = json['DateofBirth'];
gender = json['Gender'];
nationalityID = json['NationalityID'];
eHealthIDField = json['eHealthIDField'];
dateofBirthN = json['DateofBirthN'];
emailAddress = json['EmailAddress'];
sourceType = json['SourceType'];
@ -152,10 +155,10 @@ class Patientobject {
data['DateofBirth'] = this.dateofBirth;
data['Gender'] = this.gender;
data['NationalityID'] = this.nationalityID;
data['eHealthIDField'] = this.eHealthIDField;
data['DateofBirthN'] = this.dateofBirthN;
data['EmailAddress'] = this.emailAddress;
data['SourceType'] = this.sourceType;
data['PreferredLanguage'] = this.preferredLanguage;
data['Marital'] = this.marital;
return data;

@ -35,10 +35,10 @@ class PatientERGetClinicsList {
String createdOn;
String createdBy;
int isOnline;
Null endTime;
dynamic endTime;
bool projectOutSA;
List<ShiftTimings> shiftTimings;
Null startTime;
dynamic startTime;
PatientERGetClinicsList(
{this.iD,

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/weather_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/%E2%80%8B%20health_calculators.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart';
@ -15,14 +17,16 @@ import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dar
import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/services)contaniner.dart';
@ -51,6 +55,9 @@ class AllHabibMedicalService extends StatefulWidget {
class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider();
PharmacyModuleViewModel pharmacyModuleViewModel =
locator<PharmacyModuleViewModel>();
LocationUtils locationUtils;
var weather = '--';
WeatherService _weatherService = WeatherService();
@ -224,12 +231,13 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
title: TranslationBase.of(context).emergencyService,
),
ServicesContainer(
onTap: () => Navigator.push(
context,
FadePage(
page: ParkingPage(),
),
),
onTap: () => getPharmacyToken(),
// Navigator.push(
// context,
// FadePage(
// page: ParkingPage(),
// ),
// ),
imageLocation: 'assets/images/pharmacy_logo.png',
title: TranslationBase.of(context).pharmacy),
ServicesContainer(
@ -380,6 +388,25 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
);
}
getPharmacyToken() async {
if (!authProvider.isLogin) {
Navigator.push(context, FadePage(page: LandingPagePharmacy()));
} else {
GifLoaderDialogUtils.showMyDialog(context);
await pharmacyModuleViewModel.generatePharmacyToken().then((value) async {
if (pharmacyModuleViewModel.error.isNotEmpty) {
await pharmacyModuleViewModel.createUser().then((value) {
GifLoaderDialogUtils.hideDialog(context);
Navigator.push(context, FadePage(page: LandingPagePharmacy()));
});
} else {
GifLoaderDialogUtils.hideDialog(context);
Navigator.push(context, FadePage(page: LandingPagePharmacy()));
}
});
}
}
getAuthUser() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));

@ -45,6 +45,10 @@ class _BodyFatState extends State<BodyFat> {
String dropdownValue;
double calories = 0;
String textResult = '';
TextEditingController heightController = TextEditingController();
TextEditingController neckController = TextEditingController();
TextEditingController waistController = TextEditingController();
TextEditingController hipController = TextEditingController();
void updateColorHeight(int type) {
//MG/DLT card
@ -310,7 +314,18 @@ class _BodyFatState extends State<BodyFat> {
children: <Widget>[
Expanded(
child: Center(
child: Text(heightCm.toString()),
child: Padding(
padding: const EdgeInsets.only(left: 10.0),
child: TextFormField(
keyboardType: TextInputType.number,
controller: heightController,
decoration: InputDecoration(
labelText: heightCm.toString(),
labelStyle: TextStyle(
color: Colors.black,
)),
),
),
),
),
Container(
@ -476,7 +491,18 @@ class _BodyFatState extends State<BodyFat> {
children: <Widget>[
Expanded(
child: Center(
child: Text(neck.toString()),
child: Padding(
padding: const EdgeInsets.only(left: 10.0),
child: TextFormField(
keyboardType: TextInputType.number,
controller: neckController,
decoration: InputDecoration(
labelText: neck.toString(),
labelStyle: TextStyle(
color: Colors.black,
)),
),
),
),
),
Container(
@ -642,7 +668,18 @@ class _BodyFatState extends State<BodyFat> {
children: <Widget>[
Expanded(
child: Center(
child: Text(waist.toString()),
child: Padding(
padding: const EdgeInsets.only(left: 10.0),
child: TextFormField(
keyboardType: TextInputType.number,
controller: waistController,
decoration: InputDecoration(
labelText: waist.toString(),
labelStyle: TextStyle(
color: Colors.black,
)),
),
),
),
),
Container(
@ -808,7 +845,18 @@ class _BodyFatState extends State<BodyFat> {
children: <Widget>[
Expanded(
child: Center(
child: Text(hip.toString()),
child: Padding(
padding: const EdgeInsets.only(left: 10.0),
child: TextFormField(
keyboardType: TextInputType.number,
controller: hipController,
decoration: InputDecoration(
labelText: hip.toString(),
labelStyle: TextStyle(
color: Colors.black,
)),
),
),
),
),
Container(

@ -121,6 +121,15 @@ class _DoctorProfileState extends State<DoctorProfile>
color: Colors.grey[900],
letterSpacing: 1.0)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.center,
child: Text(widget.doctor.projectName,
style: TextStyle(
fontSize: 15.0,
color: Colors.grey[900],
letterSpacing: 1.0)),
),
Container(
margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.center,

@ -19,6 +19,7 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
@override
void initState() {
super.initState();
_isButtonDisabled = true;
}
@ -120,11 +121,15 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
_patientDoctorAppointmentListHospital.add(
PatientDoctorAppointmentList(
filterName: element.projectName,
distanceInKMs: element.projectDistanceInKiloMeters.toString(),
distanceInKMs:
element.projectDistanceInKiloMeters.toString(),
patientDoctorAppointment: element));
}
});
} else {}
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: res['ErrorSearchMsg']);
}
});
GifLoaderDialogUtils.hideDialog(context);
navigateToSearchResults(
@ -167,7 +172,7 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
context,
FadePage(
page: SearchResults(
isLiveCareAppointment: false,
isLiveCareAppointment: false,
doctorsList: docList,
patientDoctorAppointmentListHospital:
patientDoctorAppointmentListHospital)));

@ -39,10 +39,10 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
void initState() {
_tabController = new TabController(length: 2, vsync: this);
AppointmentDetails.showFooterButton = false;
print(widget.appo.clinicID);
super.initState();
}
@override
void dispose() {
super.dispose();
@ -116,7 +116,8 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
Container(
margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.center,
child: Text(getDoctorSpeciality(widget.appo.doctorSpeciality),
child: Text(
getDoctorSpeciality(widget.appo.doctorSpeciality),
style: TextStyle(
fontSize: 12.0,
color: Colors.grey[900],
@ -177,20 +178,36 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
TabBar(
onTap: (index) {
setState(() {
index == 1
? AppointmentDetails.showFooterButton = true
: AppointmentDetails.showFooterButton = false;
print(AppointmentDetails.showFooterButton);
if (index == 1) {
if (widget.appo.clinicID == 17 ||
widget.appo.clinicID == 23 ||
widget.appo.isExecludeDoctor) {
_tabController.index =
_tabController.previousIndex;
AppointmentDetails.showFooterButton = false;
} else {
AppointmentDetails.showFooterButton = true;
}
}
});
},
tabs: [
Tab(
child: Text(TranslationBase.of(context).appoActions,
style: TextStyle(color: Colors.black))),
Tab(
child: Text(TranslationBase.of(context).availableAppo,
style: TextStyle(color: Colors.black)),
)
widget.appo.clinicID == 17 ||
widget.appo.clinicID == 23 ||
widget.appo.isExecludeDoctor
? Tab(
child: Text(
TranslationBase.of(context).availableAppo,
style: TextStyle(color: Colors.grey)),
)
: Tab(
child: Text(
TranslationBase.of(context).availableAppo,
style: TextStyle(color: Colors.black)),
)
],
controller: _tabController,
),

@ -30,7 +30,7 @@ class ArrivedButtons {
{
"title": TranslationBase.of(AppGlobal.context).raise,
"subtitle": TranslationBase.of(AppGlobal.context).complaint,
"icon": "assets/images/new-design/Complaint_icon.png",
"icon": "assets/images/new-design/feedback_icon.png",
"caller": "insertComplaint"
},
{

@ -264,6 +264,7 @@ class InsuranceCardUpdateDetails extends StatelessWidget {
textColor: Colors.white,
label: TranslationBase.of(context).scanNow.toUpperCase(),
color: Theme.of(context).primaryColor,
small: true,
onTap: () async {
confirmAttachInsuranceCardImageDialogDialog(
context: context,

@ -901,7 +901,7 @@ class _HomePageState extends State<HomePage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
TranslationBase.of(context).contactUs,
TranslationBase.of(context).reachUs,
color: Colors.white,
fontWeight: FontWeight.normal,
),

@ -12,10 +12,12 @@ class ClinicCard extends StatefulWidget {
bool isSelected;
final PatientERGetClinicsList patientERGetClinicsList;
var languageID;
int isOnline;
ClinicCard(
{this.isSelected,
this.languageID,
this.isOnline,
@required this.patientERGetClinicsList});
@override
@ -37,7 +39,7 @@ class _State extends State<ClinicCard> {
children: <Widget>[
Card(
margin: EdgeInsets.fromLTRB(15.0, 10.0, 8.0, 8.0),
color: widget.isSelected ? Colors.blue : Colors.white,
color: widget.isSelected ? Colors.blue : widget.isOnline == 1 ? Colors.white : Colors.grey,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),

@ -385,7 +385,7 @@ class _clinic_listState extends State<ClinicList> {
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
// AppToast.showErrorToast(message: err);
print(err);
});
}
@ -555,8 +555,13 @@ class _clinic_listState extends State<ClinicList> {
itemBuilder: (context, index) {
return InkWell(
onTap: () {
updateSelectedIndex(liveCareClinicsListResponse
.patientERGetClinicsList[index]);
if(liveCareClinicsListResponse
.patientERGetClinicsList[index].isOnline == 1) {
updateSelectedIndex(liveCareClinicsListResponse
.patientERGetClinicsList[index]);
} else {
AppToast.showErrorToast(message: "Clinic is offline");
}
},
child: ClinicCard(
isSelected: selectedClinicID ==

@ -24,6 +24,7 @@ class _ForgotPassword extends State<ForgotPassword> {
final TextEditingController nationalIDorFile = null;
String mobileNo = "";
var con;
@override
Widget build(BuildContext context) {
con = context;
@ -138,6 +139,8 @@ class _ForgotPassword extends State<ForgotPassword> {
child: DefaultButton(
TranslationBase.of(context).submit,
() {
// if (mobileNo.length >= 9 == true)
// sendPatientIDBySMS();
if (mobileNo.length >= 9) sendPatientIDBySMS();
// print(mobileNo.text);
},

@ -2,8 +2,9 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.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_user_requet.dart';
import 'package:diplomaticquarterapp/pages/login/login-type.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'
as checkActivation;
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
@ -20,6 +21,10 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:hijri/hijri_calendar.dart';
import 'package:intl/intl.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:provider/provider.dart';
class RegisterInfo extends StatefulWidget {
@override
@ -45,6 +50,13 @@ class _RegisterInfo extends State<RegisterInfo> {
String email = '';
String location = '1';
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
ProjectViewModel projectViewModel;
AppointmentRateViewModel appointmentRateViewModel =
locator<AppointmentRateViewModel>();
@override
void initState() {
@ -56,6 +68,8 @@ class _RegisterInfo extends State<RegisterInfo> {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).register,
isShowAppBar: true,
@ -300,16 +314,17 @@ class _RegisterInfo extends State<RegisterInfo> {
}
else
{
result = checkActivation.CheckActivationCode.fromJson(result),
result.list.isFamily = false,
sharedPref.setObject(USER_PROFILE, result.list),
this.sharedPref.setObject(MAIN_USER, result.list),
sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
sharedPref.setString(TOKEN, result.authenticationTokenID),
Navigator.of(context).pushNamed(HOME)
this.setUser(result),
}
})
.catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
// GifLoaderDialogUtils.hideDialog(context);
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: err,
@ -321,6 +336,15 @@ class _RegisterInfo extends State<RegisterInfo> {
});
}
setUser(result) async {
await authenticatedUserObject.getUser(getUser: true);
authenticatedUserObject.isLogin = true;
appointmentRateViewModel.isLogin = true;
projectViewModel.isLogin = true;
authenticatedUserObject.user = result.list;
Navigator.of(context).pushNamed(HOME);
}
getRegisterInfo() async {
var data =
RegisterInfoResponse.fromJson(await sharedPref.getObject(NHIC_DATA));

@ -144,7 +144,7 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
),
InkWell(
onTap: () {
confirmSelectMeasureTimeDialog(projectViewModel.isArabic ? measureTimeArList : measureTimeEnList);
confirmSelectMeasureTimeDialog(projectViewModel.isArabic ? measureTimeEnList : measureTimeArList);
},
child: Container(
padding: EdgeInsets.all(12),
@ -235,7 +235,8 @@ class _AddBloodPressurePageState extends State<AddBloodPressurePage> {
textColor: Colors.white,
color: isButtonDisabled ? Colors.grey[900] : Colors.grey,
onTap: () async {
if (_bloodSystolicValueController.text.isNotEmpty && _bloodDiastolicValueController.text.isNotEmpty) {
if (_bloodSystolicValueController.text.isNotEmpty &&
_bloodDiastolicValueController.text.isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context);
widget.model

@ -60,23 +60,29 @@ class ReportListWidget extends StatelessWidget {
height: 12,
),
Texts(reportList[index].projectName),
Texts(reportList[index].clinicDescription),
Container(
//height: MediaQuery.of(context).size.height * 0.07,
width: MediaQuery.of(context).size.width * 0.35,
child: Texts(reportList[index].clinicDescription),
),
Texts(TranslationBase.of(context).invoiceNo + ': ${reportList[index].invoiceNo}'),
SizedBox(height: 12),
],
),
reportList[index].status == 2
? Container(
margin: EdgeInsets.only(left: 15.0, right: 15.0),
child: InkWell(
onTap: () {
showConfirmMessage(reportList[index]);
// sendReportEmail(reportList[index]);
},
child: Icon(
Icons.email,
color: Theme.of(context).primaryColor,
size: 30.0,
? Expanded(
child: Container(
margin: EdgeInsets.only(left: 15.0, right: 15.0),
child: InkWell(
onTap: () {
showConfirmMessage(reportList[index]);
// sendReportEmail(reportList[index]);
},
child: Icon(
Icons.email,
color: Theme.of(context).primaryColor,
size: 30.0,
),
),
),
)

@ -163,7 +163,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
des: TranslationBase.of(context).respirationRate,
icon: DQIcons.outline,
lastVal: mode.respirationBeatPerMinute,
unit: TranslationBase.of(context).respirationSigns,
unit: TranslationBase.of(context).bpm,
),
),
],

@ -78,7 +78,7 @@ class VitalSignItem extends StatelessWidget {
children: [
TextSpan(text: lastVal),
TextSpan(
text: unit,
text: " " + unit,
style: TextStyle(
color: HexColor('#B8382C'),
),

@ -116,7 +116,7 @@ class DoctorsListService extends BaseService {
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": authUser.outSA,
"PatientOutSA": authProvider.isLogin ? authUser.outSA : false,
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
"SessionID": null,

@ -117,8 +117,10 @@ class AuthProvider with ChangeNotifier {
var imei = await sharedPref.getString(PUSH_TOKEN);
// if (!request.) {
newRequest.iMEI = imei; //imei!=null ? imei : '';
newRequest.firstName = request.firstName??"" + " " + request.lastName??"";
newRequest.firstNameN = request.firstNameN??"" + " " + request.lastNameN??"";
newRequest.firstName =
request.firstName ?? "" + " " + request.lastName ?? "";
newRequest.firstNameN =
request.firstNameN ?? "" + " " + request.lastNameN ?? "";
newRequest.lastNameN = request.lastNameN ?? "";
newRequest.outSA = request.outSA == 1 ? true : false;
newRequest.biometricEnabled = false;
@ -325,6 +327,8 @@ class AuthProvider with ChangeNotifier {
request['DeviceTypeID'] = DeviceTypeID;
request['LanguageID'] = LANGUAGE_ID;
var requestN = RegisterUserRequest.fromJson(request);
requestN.patientOutSA = requestN.patientobject.patientOutSA;
await sharedPref.remove(USER_PROFILE);
// request.tokenID = '';
dynamic localRes;
try {

Loading…
Cancel
Save