updates & fixes

dev_3.3_faiz_payfort
haroon amjad 10 months ago
parent 98a2545a9b
commit aa04e943ef

@ -342,7 +342,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari
var CHANNEL = 3; var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958'; var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20'; var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 11.6; var VERSION_ID = 11.7;
var SETUP_ID = '91877'; var SETUP_ID = '91877';
var LANGUAGE = 2; var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0; // var PATIENT_OUT_SA = 0;

@ -36,7 +36,7 @@ class AppointmentRateService extends BaseService {
}, body: bodyData); }, body: bodyData);
} }
Future sendAppointmentRate(int rate, int appointmentNo, int projectID, int doctorID, int clinicID, String note) async { Future sendAppointmentRate(int rate, int appointmentNo, int projectID, int doctorID, int clinicID, String note, int languageID) async {
hasError = false; hasError = false;
AppointmentRate appointmentRate = AppointmentRate(); AppointmentRate appointmentRate = AppointmentRate();
appointmentRate.rate = rate; appointmentRate.rate = rate;
@ -47,6 +47,7 @@ class AppointmentRateService extends BaseService {
appointmentRate.note = note; appointmentRate.note = note;
appointmentRate.createdBy = 2; appointmentRate.createdBy = 2;
appointmentRate.editedBy = 2; appointmentRate.editedBy = 2;
appointmentRate.languageID = languageID;
await baseAppClient.post(NEW_RATE_APPOINTMENT_URL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) { await baseAppClient.post(NEW_RATE_APPOINTMENT_URL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;

@ -77,7 +77,7 @@ class BaseAppClient {
if (body.containsKey('LanguageID')) { if (body.containsKey('LanguageID')) {
if(body['LanguageID'] != null) { if(body['LanguageID'] != null) {
//change this line because language issue happened on dental //change this line because language issue happened on dental
body['LanguageID'] = body['LanguageID'] =='ar' ? "1" : body['LanguageID'] =='en' ? '2' : body['LanguageID']; body['LanguageID'] = body['LanguageID'] =='ar' ? 1 : body['LanguageID'] =='en' ? 2 : body['LanguageID'];
} else { } else {
body['LanguageID'] = Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isArabic ? 1 : 2; body['LanguageID'] = Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isArabic ? 1 : 2;
} }
@ -170,7 +170,7 @@ class BaseAppClient {
// body['IdentificationNo'] = 1023854217; // body['IdentificationNo'] = 1023854217;
// body['MobileNo'] = "531940021"; // body['MobileNo'] = "531940021";
// body['PatientID'] = 1231755; //3844083 // body['PatientID'] = 1014144; //3844083
// body['TokenID'] = "@dm!n"; // body['TokenID'] = "@dm!n";
// Patient ID: 3027574 // Patient ID: 3027574

@ -35,9 +35,9 @@ class AppointmentRateViewModel extends BaseViewModel {
} }
} }
Future sendAppointmentRate(int rate, int appointmentNo, int projectID, int doctorID, int clinicID, String note) async { Future sendAppointmentRate(int rate, int appointmentNo, int projectID, int doctorID, int clinicID, String note, int languageID) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _appointmentRateService.sendAppointmentRate(rate, appointmentNo, projectID, doctorID, clinicID, note); await _appointmentRateService.sendAppointmentRate(rate, appointmentNo, projectID, doctorID, clinicID, note, languageID);
if (_appointmentRateService.hasError) { if (_appointmentRateService.hasError) {
error = _appointmentRateService.error; error = _appointmentRateService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);

@ -11,6 +11,7 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/header_model.dart'; import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
@ -63,7 +64,7 @@ class _QRCodeState extends State<QRCode> {
widget.authUser = new AuthenticatedUser(); widget.authUser = new AuthenticatedUser();
// WidgetsBinding.instance.addPostFrameCallback((timeStamp) { // WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
// startNFCScan(); // startNFCScan();
// }); // });
super.initState(); super.initState();
@ -213,19 +214,17 @@ class _QRCodeState extends State<QRCode> {
optionsList.add( optionsList.add(
InkWell( InkWell(
onTap: () { onTap: () {
if (projectViewModel.havePrivilege(80) && _supportsNFC) { if (projectViewModel.havePrivilege(102)) {
startNFCScan(); startLocationCheckIn();
} else {
Utils.showErrorToast(TranslationBase.of(context).NFCNotSupported);
} }
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).scanNFC, title: TranslationBase.of(context).checkInViaLocation,
imagePath: 'contactless.svg', imagePath: 'location.svg',
subTitle: "", subTitle: "",
isEnable: projectViewModel.havePrivilege(80), isEnable: projectViewModel.havePrivilege(102),
width: 80.0, width: 70.0,
height: 80.0, height: 70.0,
), ),
), ),
); );
@ -251,17 +250,19 @@ class _QRCodeState extends State<QRCode> {
optionsList.add( optionsList.add(
InkWell( InkWell(
onTap: () { onTap: () {
if (projectViewModel.havePrivilege(102)) { if (projectViewModel.havePrivilege(80) && _supportsNFC) {
startLocationCheckIn(); startNFCScan();
} else {
Utils.showErrorToast(TranslationBase.of(context).NFCNotSupported);
} }
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).checkInViaLocation, title: TranslationBase.of(context).scanNFC,
imagePath: 'location.svg', imagePath: 'contactless.svg',
subTitle: "", subTitle: "",
isEnable: projectViewModel.havePrivilege(102), isEnable: projectViewModel.havePrivilege(80),
width: 70.0, width: 80.0,
height: 70.0, height: 80.0,
), ),
), ),
); );
@ -378,6 +379,7 @@ class _QRCodeState extends State<QRCode> {
child: const Text('OK'), child: const Text('OK'),
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false);
}, },
), ),
], ],

@ -55,6 +55,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
int _currentPage = 0; int _currentPage = 0;
ToDoCountProviderModel toDoProvider; ToDoCountProviderModel toDoProvider;
ProjectViewModel projectViewModel;
@override @override
void initState() { void initState() {
@ -76,6 +77,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of<ProjectViewModel>(context);
toDoProvider = Provider.of<ToDoCountProviderModel>(context); toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).myAppointmentsList, appBarTitle: TranslationBase.of(context).myAppointmentsList,
@ -135,6 +137,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
} }
getPatientAppointmentHistory() { getPatientAppointmentHistory() {
int languageID = projectViewModel.isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
widget.appoList.clear(); widget.appoList.clear();
@ -150,7 +153,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
widget._patientConfirmedAppointmentListClinic.clear(); widget._patientConfirmedAppointmentListClinic.clear();
widget._patientArrivedAppointmentListClinic.clear(); widget._patientArrivedAppointmentListClinic.clear();
service.getPatientAppointmentHistory(false, context).then((res) { service.getPatientAppointmentHistory(false, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
setState(() { setState(() {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
@ -7,6 +8,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart'; import 'package:diplomaticquarterapp/widgets/progress_indicator/app_circular_progress_Indeicator.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class VisitTicket extends StatefulWidget { class VisitTicket extends StatefulWidget {
List<DoctorList> appoList = []; List<DoctorList> appoList = [];
@ -17,6 +19,7 @@ class VisitTicket extends StatefulWidget {
class _VisitTicketState extends State<VisitTicket> { class _VisitTicketState extends State<VisitTicket> {
bool isLoading = false; bool isLoading = false;
ProjectViewModel projectViewModel;
@override @override
void initState() { void initState() {
@ -26,6 +29,7 @@ class _VisitTicketState extends State<VisitTicket> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of<ProjectViewModel>(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).todoList, appBarTitle: TranslationBase.of(context).todoList,
body: isLoading == false body: isLoading == false
@ -48,9 +52,10 @@ class _VisitTicketState extends State<VisitTicket> {
} }
getPatientAppointmentCurfewHistory(BuildContext context) { getPatientAppointmentCurfewHistory(BuildContext context) {
int languageID = projectViewModel.isArabic ? 1 : 2;
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service.getPatientAppointmentHistory(true, context).then((res) { service.getPatientAppointmentHistory(true, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {

@ -365,10 +365,11 @@ class _AppointmentActionsState extends State<AppointmentActions> {
// } // }
openAppointmentLabResults() { openAppointmentLabResults() {
int languageID = widget.projectViewModel.isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
PatientLabOrders patientLabOrders = new PatientLabOrders(); PatientLabOrders patientLabOrders = new PatientLabOrders();
service.getPatientLabOrdersByAppoNo(widget.appo.appointmentNo, widget.appo.projectID, widget.appo.clinicID, context).then((res) { service.getPatientLabOrdersByAppoNo(widget.appo.appointmentNo, widget.appo.projectID, widget.appo.clinicID, languageID, context).then((res) {
print(res['ListLabResultsByAppNo']); print(res['ListLabResultsByAppNo']);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['ListLabResultsByAppNo'] != null) { if (res['ListLabResultsByAppNo'] != null) {
@ -400,10 +401,11 @@ class _AppointmentActionsState extends State<AppointmentActions> {
} }
openAppointmentRadiology() { openAppointmentRadiology() {
int languageID = widget.projectViewModel.isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
FinalRadiology finalRadiology = new FinalRadiology(); FinalRadiology finalRadiology = new FinalRadiology();
service.getPatientRadOrders(widget.appo.appointmentNo.toString(), context).then((res) { service.getPatientRadOrders(widget.appo.appointmentNo.toString(), languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['FinalRadiologyList'] != null) { if (res['FinalRadiologyList'] != null) {
print(res['FinalRadiologyList']); print(res['FinalRadiologyList']);

@ -823,9 +823,10 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
} }
getPatientAppointmentHistory() { getPatientAppointmentHistory() {
int languageID = projectViewModel.isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service.getPatientAppointmentHistory(true, context).then((res) { service.getPatientAppointmentHistory(true, languageID, context).then((res) {
widget.appoList.clear(); widget.appoList.clear();
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {

@ -56,6 +56,8 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
List<AppoitmentAllHistoryResultList> appoList = []; List<AppoitmentAllHistoryResultList> appoList = [];
ProjectViewModel projectViewModel;
String getSelected(BuildContext context) { String getSelected(BuildContext context) {
switch (messageType) { switch (messageType) {
case MessageType.ComplaintOnAnAppointment: case MessageType.ComplaintOnAnAppointment:
@ -106,7 +108,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
return BaseView<FeedbackViewModel>( return BaseView<FeedbackViewModel>(
allowAny: true, allowAny: true,
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
@ -466,6 +468,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
listData: list, listData: list,
selectedIndex: selectedStatusIndex, selectedIndex: selectedStatusIndex,
onValueSelected: (index) { onValueSelected: (index) {
int languageID = projectViewModel.isArabic ? 1 : 2;
selectedStatusIndex = index; selectedStatusIndex = index;
if (index == 1) { if (index == 1) {
@ -485,7 +488,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
if (messageType == MessageType.ComplaintOnAnAppointment) { if (messageType == MessageType.ComplaintOnAnAppointment) {
appoList.clear(); appoList.clear();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service.getPatientAppointmentHistory(false, context, isForCOC: true).then((res) { service.getPatientAppointmentHistory(false, languageID, context, isForCOC: true).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
setState(() { setState(() {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {

@ -655,22 +655,22 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
FlutterAppIconBadge.updateBadge(num.parse(notificationCount)); FlutterAppIconBadge.updateBadge(num.parse(notificationCount));
} }
}); });
if (await AppSharedPreferences().getBool(IS_LAST_APPOINTMENT_RATE_SHOWN) == null || !await AppSharedPreferences().getBool(IS_LAST_APPOINTMENT_RATE_SHOWN)) { // if (await AppSharedPreferences().getBool(IS_LAST_APPOINTMENT_RATE_SHOWN) == null || !await AppSharedPreferences().getBool(IS_LAST_APPOINTMENT_RATE_SHOWN)) {
int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2; // int languageID = Provider.of<ProjectViewModel>(context, listen: false).isArabic ? 1 : 2;
appointmentRateViewModel.getIsLastAppointmentRatedList(languageID).then((value) async { // appointmentRateViewModel.getIsLastAppointmentRatedList(languageID).then((value) async {
if (appointmentRateViewModel.isHaveAppointmentNotRate) { // if (appointmentRateViewModel.isHaveAppointmentNotRate) {
await AppSharedPreferences().setBool(IS_LAST_APPOINTMENT_RATE_SHOWN, true); // await AppSharedPreferences().setBool(IS_LAST_APPOINTMENT_RATE_SHOWN, true);
Navigator.push( // Navigator.push(
context, // context,
FadePage( // FadePage(
page: RateAppointmentDoctor(), // page: RateAppointmentDoctor(),
), // ),
); // );
} // }
}).catchError((err) { // }).catchError((err) {
print(err); // print(err);
}); // });
} // }
}); });
} }
projectViewModel.analytics.setUser(data); projectViewModel.analytics.setUser(data);

@ -163,10 +163,10 @@ class _State extends State<ClinicCard> {
} }
getClinicTimings(PatientERGetClinicsList patientERGetClinicsList) { getClinicTimings(PatientERGetClinicsList patientERGetClinicsList) {
int languageID = widget.languageID == 'ar' ? 1 : 2;
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service.getLivecareClinicTiming(patientERGetClinicsList.serviceID, context).then((res) { service.getLivecareClinicTiming(patientERGetClinicsList.serviceID, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {

@ -513,7 +513,7 @@ class _clinic_listState extends State<ClinicList> {
isDataLoaded = false; isDataLoaded = false;
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service.getLivecareClinics(context).then((res) { service.getLivecareClinics(languageID == 'ar' ? 1: 2, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(res['PatientER_GetClinicsList'].length); print(res['PatientER_GetClinicsList'].length);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {

@ -663,11 +663,11 @@ class _ConfirmLogin extends State<ConfirmLogin> {
} }
checkIfUserAgreedBefore(CheckActivationCode result) { checkIfUserAgreedBefore(CheckActivationCode result) {
if (result.isNeedUserAgreement == true) { // if (result.isNeedUserAgreement == true) {
//move to agreement page. //move to agreement page.
} else { // } else {
goToHome(); goToHome();
} // }
} }
insertIMEI() { insertIMEI() {
@ -695,17 +695,45 @@ class _ConfirmLogin extends State<ConfirmLogin> {
projectViewModel.user = authenticatedUserObject.user; projectViewModel.user = authenticatedUserObject.user;
await authenticatedUserObject.getUser(getUser: true); await authenticatedUserObject.getUser(getUser: true);
GifLoaderDialogUtils.hideDialog(context); // GifLoaderDialogUtils.hideDialog(context);
getToDoCount(); getToDoCount();
appointmentRateViewModel
.getIsLastAppointmentRatedList(projectViewModel.isArabic ? 1 : 2)
.then((value) => {
GifLoaderDialogUtils.hideDialog(AppGlobal.context),
if (appointmentRateViewModel.isHaveAppointmentNotRate)
{
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: RateAppointmentDoctor(),
),
(r) => false)
}
else
{
Navigator.pushAndRemoveUntil(
context,
FadePage(
page: LandingPage(),
),
(r) => false)
},
insertIMEI()
})
.catchError((err) {
print(err);
});
Navigator.pushAndRemoveUntil( // getToDoCount();
context,
FadePage( // Navigator.pushAndRemoveUntil(
page: LandingPage(), // context,
), // FadePage(
(r) => false); // page: LandingPage(),
insertIMEI(); // ),
// (r) => false);
// insertIMEI();
} }
loading(flag) { loading(flag) {

@ -345,45 +345,44 @@ class _Login extends State<Login> {
authenticatedUserObject.user = result.list; authenticatedUserObject.user = result.list;
projectViewModel.user = authenticatedUserObject.user; projectViewModel.user = authenticatedUserObject.user;
GifLoaderDialogUtils.hideDialog(context); // GifLoaderDialogUtils.hideDialog(context);
//
// getToDoCount();
//
// Navigator.pushAndRemoveUntil(
// context,
// FadePage(
// page: LandingPage(),
// ),
// (r) => false);
getToDoCount(); getToDoCount();
appointmentRateViewModel
Navigator.pushAndRemoveUntil( .getIsLastAppointmentRatedList(projectViewModel.isArabic ? 1 : 2)
context, .then((value) => {
FadePage( GifLoaderDialogUtils.hideDialog(context),
page: LandingPage(), if (appointmentRateViewModel.isHaveAppointmentNotRate)
), {
(r) => false); Navigator.pushAndRemoveUntil(
context,
// appointmentRateViewModel FadePage(
// .getIsLastAppointmentRatedList() page: RateAppointmentDoctor(),
// .then((value) => { ),
// getToDoCount(), (r) => false)
// GifLoaderDialogUtils.hideDialog(context), }
// if (appointmentRateViewModel.isHaveAppointmentNotRate) else
// { {
// Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
// context, context,
// FadePage( FadePage(
// page: RateAppointmentDoctor(), page: LandingPage(),
// ), ),
// (r) => false) (r) => false)
// } }
// else })
// { .catchError((err) {
// Navigator.pushAndRemoveUntil( print(err);
// context, GifLoaderDialogUtils.hideDialog(context);
// FadePage( });
// page: LandingPage(),
// ),
// (r) => false)
// }
// })
// .catchError((err) {
// print(err);
// GifLoaderDialogUtils.hideDialog(context);
// });
}); });
} }

@ -32,10 +32,11 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
final formKey = GlobalKey<FormState>(); final formKey = GlobalKey<FormState>();
String note = ""; String note = "";
int rating = 0; int rating = 0;
ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
return BaseView<AppointmentRateViewModel>( return BaseView<AppointmentRateViewModel>(
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
@ -191,18 +192,27 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
child: DefaultButton( child: DefaultButton(
TranslationBase.of(context).later, TranslationBase.of(context).later,
() { () {
// Navigator.pushReplacement( Navigator.pushReplacement(
// context,
// FadePage(
// page: LandingPage(),
// ),
// );
Navigator.pop(
context,
);
Navigator.pop(
context, context,
FadePage(
page: LandingPage(),
),
); );
// if (projectViewModel.isLoginChild) {
// Navigator.pushReplacement(
// context,
// FadePage(
// page: LandingPage(),
// ),
// );
// } else {
// Navigator.pop(
// context,
// // FadePage(
// // page: LandingPage(),
// // ),
// );
// }
}, },
color: CustomColors.accentColor, color: CustomColors.accentColor,
textColor: Colors.white, textColor: Colors.white,
@ -215,9 +225,10 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
rating <= 0 rating <= 0
? null ? null
: () { : () {
int languageID = projectViewModel.isArabic ? 1 : 2;
model model
.sendAppointmentRate( .sendAppointmentRate(rating, widget.appointmentDetails.appointmentNo, widget.appointmentDetails.projectID, widget.appointmentDetails.doctorID,
rating, widget.appointmentDetails.appointmentNo, widget.appointmentDetails.projectID, widget.appointmentDetails.doctorID, widget.appointmentDetails.clinicID, note) widget.appointmentDetails.clinicID, note, languageID)
.then( .then(
(value) => { (value) => {
model model

@ -193,21 +193,27 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
}); });
dialog.showAlertDialog(context); dialog.showAlertDialog(context);
} else { } else {
if(projectViewModel.isLoginChild) { Navigator.pushReplacement(
Navigator.pushReplacement( context,
context, FadePage(
FadePage( page: LandingPage(),
page: LandingPage(), ),
), );
); // if(projectViewModel.isLoginChild) {
} else { // Navigator.pushReplacement(
Navigator.pop( // context,
context, // FadePage(
// FadePage( // page: LandingPage(),
// page: LandingPage(), // ),
// ), // );
); // } else {
} // Navigator.pop(
// context,
// // FadePage(
// // page: LandingPage(),
// // ),
// );
// }
} }
}, },
color: CustomColors.accentColor, color: CustomColors.accentColor,

@ -604,7 +604,7 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getPatientAppointmentHistory(bool isActiveAppointment, BuildContext context, {bool isForCOC = false}) async { Future<Map> getPatientAppointmentHistory(bool isActiveAppointment, int languageID, BuildContext context, {bool isForCOC = false}) 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) {
@ -626,7 +626,8 @@ class DoctorsListService extends BaseService {
"PatientID": authUser.patientID, "PatientID": authUser.patientID,
"PatientTypeID": authUser.patientType, "PatientTypeID": authUser.patientType,
"IsComingFromCOC": isForCOC, "IsComingFromCOC": isForCOC,
"PatientType": authUser.patientType "PatientType": authUser.patientType,
"LanguageID": languageID
}; };
dynamic localRes; dynamic localRes;
@ -1162,7 +1163,7 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getPatientRadOrders(String appoNo, BuildContext context) async { Future<Map> getPatientRadOrders(String appoNo, int languageID, 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) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
@ -1182,6 +1183,7 @@ class DoctorsListService extends BaseService {
"DeviceTypeID": req.DeviceTypeID, "DeviceTypeID": req.DeviceTypeID,
"PatientID": authUser.patientID, "PatientID": authUser.patientID,
"PatientTypeID": authUser.patientType, "PatientTypeID": authUser.patientType,
"LanguageID": languageID,
"PatientType": authUser.patientType "PatientType": authUser.patientType
}; };
@ -1194,7 +1196,7 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getPatientLabOrdersByAppoNo(dynamic appoNo, dynamic projID, dynamic clinicID, BuildContext context) async { Future<Map> getPatientLabOrdersByAppoNo(dynamic appoNo, dynamic projID, dynamic clinicID, int languageID, 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) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
@ -1216,6 +1218,7 @@ class DoctorsListService extends BaseService {
"DeviceTypeID": req.DeviceTypeID, "DeviceTypeID": req.DeviceTypeID,
"PatientID": authUser.patientID, "PatientID": authUser.patientID,
"PatientTypeID": authUser.patientType, "PatientTypeID": authUser.patientType,
"LanguageID": languageID,
"PatientType": authUser.patientType "PatientType": authUser.patientType
}; };

@ -17,7 +17,7 @@ class LiveCareService extends BaseService {
AuthenticatedUser authUser = new AuthenticatedUser(); AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider(); AuthProvider authProvider = new AuthProvider();
Future<Map> getLivecareClinics(BuildContext context) async { Future<Map> getLivecareClinics(int languageID, 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) {
@ -25,7 +25,12 @@ class LiveCareService extends BaseService {
authUser = data; authUser = data;
} }
request = {"Age": authUser.age != null ? authUser.age : 0, "PatientID": authUser.patientID != null ? authUser.patientID : 0, "Gender": authUser.gender != null ? authUser.gender : 0}; request = {
"Age": authUser.age != null ? authUser.age : 0,
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"Gender": authUser.gender != null ? authUser.gender : 0,
"LanguageID": languageID
};
dynamic localRes; dynamic localRes;
@ -122,7 +127,7 @@ class LiveCareService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getLivecareClinicTiming(int serviceID, BuildContext context) async { Future<Map> getLivecareClinicTiming(int serviceID, int languageID, 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) {
@ -132,6 +137,7 @@ class LiveCareService extends BaseService {
request = { request = {
"ServiceID": serviceID, "ServiceID": serviceID,
"LanguageID": languageID,
"Age": authUser.age != null ? authUser.age : 0, "Age": authUser.age != null ? authUser.age : 0,
"PatientID": authUser.patientID != null ? authUser.patientID : 0, "PatientID": authUser.patientID != null ? authUser.patientID : 0,
"Gender": authUser.gender != null ? authUser.gender : 0 "Gender": authUser.gender != null ? authUser.gender : 0
@ -354,5 +360,4 @@ class LiveCareService extends BaseService {
}, body: request); }, body: request);
return Future.value(localRes); return Future.value(localRes);
} }
} }

@ -42,6 +42,7 @@ import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.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/services.dart'; import 'package:flutter/services.dart';
// import 'package:flutter_amazonpaymentservices/environment_type.dart'; // import 'package:flutter_amazonpaymentservices/environment_type.dart';
// import 'package:flutter_amazonpaymentservices/flutter_amazonpaymentservices.dart'; // import 'package:flutter_amazonpaymentservices/flutter_amazonpaymentservices.dart';

Loading…
Cancel
Save