Merge branch 'Haroon' into 'development'

Haroon

See merge request Cloud_Solution/diplomatic-quarter!357
merge-update-with-lab-changes
haroon amjad 5 years ago
commit 335bc9a673

@ -1592,4 +1592,12 @@ const Map localizedValues = {
"invoice-list": {"en": "Invoices List", "ar": "فائمة الفواتير"}, "invoice-list": {"en": "Invoices List", "ar": "فائمة الفواتير"},
"thisItemIsNotAvailable": {"en": "This item is not available", "ar": "هذا العنصر غير متوفر"}, "thisItemIsNotAvailable": {"en": "This item is not available", "ar": "هذا العنصر غير متوفر"},
"beforeAfterImages": {"en": "Before After Images", "ar": "قبل بعد الصور"}, "beforeAfterImages": {"en": "Before After Images", "ar": "قبل بعد الصور"},
"clinic-accept-livecare": {
"en": "No need to wait or visit You can now get medical consultation via Video call (LiveCare service) in The name of the clinic clinic and the doctor will contact you immediately",
"ar": "لا داعي للانتظار او الحضور يمكنك الان الحصول على الاستشارة عن طريق مكالمة الفيديو ( خدمة لايف كير) في العيادة وسوف يقوم الطبيب بالتواصل معك فورا"
},
"livecareModal-top": {
"en": "This Clinic is Accepting livecare services",
"ar": "هذه العيادة تقدم خدمة لايف كير"
},
}; };

@ -0,0 +1,52 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
class LiveCareBookAppointment extends StatefulWidget {
@override
_LiveCareBookAppointmentState createState() =>
_LiveCareBookAppointmentState();
}
class _LiveCareBookAppointmentState extends State<LiveCareBookAppointment> {
@override
Widget build(BuildContext context) {
return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo,
isShowAppBar: true,
isShowDecPage: false,
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.all(10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
margin: EdgeInsets.all(5.0),
child: Text(TranslationBase.of(context).clinicAcceptLivecare,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.black,
fontSize: 16.0,
letterSpacing: 0.5)),
),
Container(
margin: EdgeInsets.all(15.0),
padding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
decoration: BoxDecoration(
color: Colors.green,
borderRadius: BorderRadius.all(Radius.circular(8.0))),
child: Text(TranslationBase.of(context).livecareModalTop,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 16.0,
fontWeight: FontWeight.w600,
letterSpacing: 0.5)),
),
],
),
),
));
}
}

@ -3,10 +3,12 @@ import "dart:collection";
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart'; import 'package:diplomaticquarterapp/models/Appointments/SearchInfoModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart'; import 'package:diplomaticquarterapp/models/Clinics/ClinicListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/DentalComplaints.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -14,6 +16,9 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart'; import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'LiveCareBookAppointment.dart';
class SearchByClinic extends StatefulWidget { class SearchByClinic extends StatefulWidget {
final List clnicIds; final List clnicIds;
@ -36,6 +41,11 @@ class _SearchByClinicState extends State<SearchByClinic> {
bool isLoaded = false; bool isLoaded = false;
bool isProjectLoaded = false; bool isProjectLoaded = false;
ListClinicCentralized selectedClinic;
AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider();
@override @override
void initState() { void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList()); WidgetsBinding.instance.addPostFrameCallback((_) => getClinicsList());
@ -112,12 +122,30 @@ class _SearchByClinicState extends State<SearchByClinic> {
value: dropdownValue, value: dropdownValue,
items: clinicsList.map((item) { items: clinicsList.map((item) {
return new DropdownMenuItem<String>( return new DropdownMenuItem<String>(
value: item.clinicID.toString(), value: item.clinicID.toString() +
child: new Text(item.clinicDescription), "-" +
item.isLiveCareClinicAndOnline.toString() +
"-" +
item.liveCareClinicID.toString() +
"-" +
item.liveCareServiceID.toString(),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(item.clinicDescription),
item.isLiveCareClinicAndOnline
? SvgPicture.asset(
'assets/images/new-design/video_icon_green_right.svg',
height: 15,
width: 15,
fit: BoxFit.cover)
: Container(),
]),
); );
}).toList(), }).toList(),
onChanged: (newValue) { onChanged: (newValue) {
setState(() { setState(() {
print(newValue);
dropdownValue = newValue; dropdownValue = newValue;
if (!isDentalSelectedAndSupported() && !nearestAppo) { if (!isDentalSelectedAndSupported() && !nearestAppo) {
projectDropdownValue = ""; projectDropdownValue = "";
@ -224,6 +252,17 @@ class _SearchByClinicState extends State<SearchByClinic> {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
navigateToDentalComplaints(context, searchInfo); navigateToDentalComplaints(context, searchInfo);
} else if (dropdownValue.split("-")[1] == "true"
// &&
// authProvider.isLogin &&
// authUser.patientType == 1
) {
Navigator.push(
context,
FadePage(
page: LiveCareBookAppointment(),
),
);
} else { } else {
List<DoctorList> doctorsList = []; List<DoctorList> doctorsList = [];
List<String> arr = []; List<String> arr = [];
@ -236,7 +275,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.getDoctorsList( .getDoctorsList(
int.parse(dropdownValue), int.parse(dropdownValue.split("-")[0]),
projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0, projectDropdownValue != "" ? int.parse(projectDropdownValue) : 0,
nearestAppo, nearestAppo,
context) context)

@ -53,7 +53,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 : 0,
"TokenID": "", "TokenID": "",
"DeviceTypeID": req.DeviceTypeID, "DeviceTypeID": req.DeviceTypeID,
"SessionID": "YckwoXhUmWBsnHKEKig", "SessionID": "YckwoXhUmWBsnHKEKig",

@ -1200,6 +1200,12 @@ class TranslationBase {
String get myInvoice => localizedValues["my-invoice"][locale.languageCode]; String get myInvoice => localizedValues["my-invoice"][locale.languageCode];
String get invoicesList => localizedValues["invoice-list"][locale.languageCode]; String get invoicesList => localizedValues["invoice-list"][locale.languageCode];
String get clinicAcceptLivecare =>
localizedValues["clinic-accept-livecare"][locale.languageCode];
String get livecareModalTop =>
localizedValues["livecareModal-top"][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

Loading…
Cancel
Save