Merge branch 'Haroon' into 'development'

Haroon

See merge request Cloud_Solution/diplomatic-quarter!344
merge-requests/345/head
haroon amjad 5 years ago
commit b5f180f16c

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

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/weather_service.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/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.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/%E2%80%8B%20health_calculators.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.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/ContactUs/findus/findus_page.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.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/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.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/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/info.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/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/services)contaniner.dart'; import 'package:diplomaticquarterapp/widgets/data_display/services)contaniner.dart';
@ -51,9 +55,13 @@ class AllHabibMedicalService extends StatefulWidget {
class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> { class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser = new AuthenticatedUser(); AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider();
PharmacyModuleViewModel pharmacyModuleViewModel =
locator<PharmacyModuleViewModel>();
LocationUtils locationUtils; LocationUtils locationUtils;
var weather = '--'; var weather = '--';
WeatherService _weatherService = WeatherService(); WeatherService _weatherService = WeatherService();
@override @override
void initState() { void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) { WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
@ -238,12 +246,13 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
title: TranslationBase.of(context).emergencyService, title: TranslationBase.of(context).emergencyService,
), ),
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => getPharmacyToken(),
context, // Navigator.push(
FadePage( // context,
page: ParkingPage(), // FadePage(
), // page: ParkingPage(),
), // ),
// ),
imageLocation: 'assets/images/pharmacy_logo.png', imageLocation: 'assets/images/pharmacy_logo.png',
title: TranslationBase.of(context).pharmacy), title: TranslationBase.of(context).pharmacy),
ServicesContainer( ServicesContainer(
@ -406,6 +415,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 { getAuthUser() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson( var data = AuthenticatedUser.fromJson(

@ -121,6 +121,15 @@ class _DoctorProfileState extends State<DoctorProfile>
color: Colors.grey[900], color: Colors.grey[900],
letterSpacing: 1.0)), 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( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
alignment: Alignment.center, alignment: Alignment.center,

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

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

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

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

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

@ -12,10 +12,12 @@ class ClinicCard extends StatefulWidget {
bool isSelected; bool isSelected;
final PatientERGetClinicsList patientERGetClinicsList; final PatientERGetClinicsList patientERGetClinicsList;
var languageID; var languageID;
int isOnline;
ClinicCard( ClinicCard(
{this.isSelected, {this.isSelected,
this.languageID, this.languageID,
this.isOnline,
@required this.patientERGetClinicsList}); @required this.patientERGetClinicsList});
@override @override
@ -37,7 +39,7 @@ class _State extends State<ClinicCard> {
children: <Widget>[ children: <Widget>[
Card( Card(
margin: EdgeInsets.fromLTRB(15.0, 10.0, 8.0, 8.0), 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( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
), ),

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

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

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

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

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

Loading…
Cancel
Save