updates & fixes

dev_v3.13.6
haroon amjad 5 years ago
parent ad3463bbfc
commit 92bfe27a6e

@ -1504,4 +1504,5 @@ const Map localizedValues = {
"seeDoctorsList": { "en": "See List Of Doctors", "ar": "اعرض قائمة الأطباء" },
"covidQuestionnaire": { "en": "Please answer below questionnaire:", "ar": "الرجاء الإجابة على الاستبيان أدناه:" },
"covidBookAppo": { "en": "Booking Appointment For: ", "ar": "موعد الحجز لـ: " },
"emptySchedule": { "en": "Doctor has no schedule.", "ar": "لا يوجد جدول حضور مسجل للطبيب" }
};

@ -11,8 +11,8 @@ class ActiveMedicationsService extends BaseService{
super.error = "";
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
// body['PatientID'] = 1298851;
// body['TokenID'] = "@dm!n";
body['PatientID'] = 1298851;
body['TokenID'] = "@dm!n";
await baseAppClient.post(ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID,
onSuccess: (response, statusCode) async {
activePrescriptionReport.clear();

@ -1,14 +1,14 @@
class ServicePrice {
String currency;
double maxPrice;
double maxTotalPrice;
double maxVAT;
double minPrice;
double minTotalPrice;
double minVAT;
int price;
int totalPrice;
int vat;
dynamic maxPrice;
dynamic maxTotalPrice;
dynamic maxVAT;
dynamic minPrice;
dynamic minTotalPrice;
dynamic minVAT;
dynamic price;
dynamic totalPrice;
dynamic vat;
ServicePrice({
this.currency,

@ -117,6 +117,7 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
),
buttonIcon: 'assets/images/new/Boo_ Appointment.svg',
showConfirmMessageDialog: false,
isNeedToShowButton: !widget.isLiveCareAppointment,
onTap: () {
Navigator.push(
context,
@ -139,7 +140,14 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
TabBar(
onTap: (index) {
setState(() {
index == 1 ? showFooterButton = true : showFooterButton = false;
if (index == 1) {
if (widget.doctor.clinicID == 17 || widget.doctor.clinicID == 23 || widget.isLiveCareAppointment) {
_tabController.index = _tabController.previousIndex;
showFooterButton = false;
} else {
showFooterButton = true;
}
}
print(showFooterButton);
});
},

@ -39,6 +39,8 @@ class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProviderS
return AppScaffold(
appBarTitle: localize.rapidResponseTeam,
isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
description: TranslationBase.of(context).rrtDDetails,
imagesInfo: imagesInfo,
body: BaseView<RRTViewModel>(
@ -73,7 +75,7 @@ class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProviderS
}
Widget tabBar() => Container(
margin: EdgeInsets.all(15),
margin: EdgeInsets.all(0.0),
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)),
child: TabBar(onTap: onPageChanged, indicatorWeight: 3, indicatorColor: Color(0xFFc5272d), isScrollable: false, controller: tabController, indicatorSize: TabBarIndicatorSize.label, tabs: [

@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/models/rrt/service_price.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
@ -21,14 +22,14 @@ import 'package:provider/provider.dart';
import 'rrt-place-order.dart';
class RRTRequestPickupAddressPage extends StatefulWidget {
final ServicePrice servicePrice;
RRTRequestPickupAddressPage({@required this.servicePrice});
@override
State<StatefulWidget> createState() => RRTRequestPickupAddressPageState();
}
class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage> with SingleTickerProviderStateMixin {
bool acceptTerms = false;
@ -39,7 +40,6 @@ class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage
zoom: 14.4746,
);
List<Addresses> myAddresses = [];
Addresses selectedAddress;
StreamController<int> addressStreamController = StreamController();
@ -60,8 +60,7 @@ class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage
myAddresses = await viewModel.getAddresses();
// GifLoaderDialogUtils.hideDialog(context);
if(myAddresses.isNotEmpty)
setState(() {});
if (myAddresses.isNotEmpty) setState(() {});
}
TranslationBase localize;
@ -82,6 +81,8 @@ class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage
builder: (ctx, vm, widget) => AppScaffold(
appBarTitle: localize.pickupLocation,
isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
body: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
@ -89,17 +90,18 @@ class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage
stream: addressStream,
builder: (context, snapshot) {
return selectAddressField();
}
),
}),
StreamBuilder<Object>(
stream: addressLoadingStream,
builder: (context, snapshot) {
return snapshot.hasData ? LinearProgressIndicator(backgroundColor: Colors.transparent) : Container(height: 4,);
}
),
return snapshot.hasData
? LinearProgressIndicator(backgroundColor: Colors.transparent)
: Container(
height: 4,
);
}),
Expanded(
child:
PlacePicker(
child: PlacePicker(
apiKey: GOOGLE_API_KEY,
enableMyLocationButton: true,
automaticallyImplyAppBarLeading: false,
@ -115,8 +117,7 @@ class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage
var loc = selectedPlace.geometry.location;
var address1 = selectedPlace.addressComponents.first.longName;
var address2 = "";
if(selectedPlace.addressComponents.length > 1)
address2 = selectedPlace.addressComponents[1].longName;
if (selectedPlace.addressComponents.length > 1) address2 = selectedPlace.addressComponents[1].longName;
selectedAddress = Addresses(latLong: '${loc.lat},${loc.lng}', address1: address1, address2: address2);
addressStreamController.sink.add(0);
@ -132,9 +133,7 @@ class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage
),
continueButton()
],
)
)
);
)));
}
Widget centerTargetPoint() {
@ -142,16 +141,10 @@ class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage
double margin = mapIdle ? 3 : 10;
return Center(
child: Container(
width: size, height: size,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20), border: Border.all(width: 2, color: Theme.of(context).appBarTheme.color)
),
child: Container(
margin: EdgeInsets.all(margin),
decoration: BoxDecoration(
color: Theme.of(context).appBarTheme.color,
borderRadius: BorderRadius.circular(20))
),
width: size,
height: size,
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20), border: Border.all(width: 2, color: Theme.of(context).appBarTheme.color)),
child: Container(margin: EdgeInsets.all(margin), decoration: BoxDecoration(color: Theme.of(context).appBarTheme.color, borderRadius: BorderRadius.circular(20))),
),
);
}
@ -162,13 +155,18 @@ class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage
margin: EdgeInsets.all(10),
height: 50,
child: MaterialButton(
height: 50, color: Colors.white,
height: 50,
color: Colors.white,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
onPressed: openAddressSelectDialog,
child: Row(
children: [
Expanded(child: Text(text, style: TextStyle(color: Colors.grey, fontSize: 13, letterSpacing: 1))),
Icon(Icons.keyboard_arrow_down, size: 20, color: Colors.grey,)
Icon(
Icons.keyboard_arrow_down,
size: 20,
color: Colors.grey,
)
],
),
),
@ -178,21 +176,18 @@ class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage
Widget continueButton() {
return Padding(
padding: const EdgeInsets.all(15),
child: MaterialButton(
height: 50,
color: Theme.of(context).appBarTheme.color,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10) ),
onPressed: () =>
child: DefaultButton(TranslationBase.of(context).continues, () {
Navigator.push(
context,
FadePage(page: RRTPlaceOrderPage(selectedAddress: selectedAddress, servicePrice: widget.servicePrice,))
),
child: Text(localize.continues, style: TextStyle(color: Colors.white, fontSize: 15, letterSpacing: 1),),
),
FadePage(
page: RRTPlaceOrderPage(
selectedAddress: selectedAddress,
servicePrice: widget.servicePrice,
)));
}),
);
}
openAddressSelectDialog() {
showMaterialResponsiveDialog(
hideButtons: true,
@ -221,18 +216,26 @@ class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage
},
);
},
separatorBuilder: (ctx,idx) => Container(height: 0.25, color: Colors.grey.withOpacity(0.7),)
)
);
separatorBuilder: (ctx, idx) => Container(
height: 0.25,
color: Colors.grey.withOpacity(0.7),
)));
}
moveToLocation(LatLng location, {bool animate = true}) async {
await Future.delayed(Duration(milliseconds: 200));
mapCameraPosition = CameraPosition(target: location, zoom: 16.4746,);
mapCameraPosition = CameraPosition(
target: location,
zoom: 16.4746,
);
if (animate)
(await mapController.future).animateCamera(CameraUpdate.newCameraPosition(mapCameraPosition),);
(await mapController.future).animateCamera(
CameraUpdate.newCameraPosition(mapCameraPosition),
);
else
(await mapController.future).moveCamera(CameraUpdate.newCameraPosition(mapCameraPosition),);
(await mapController.future).moveCamera(
CameraUpdate.newCameraPosition(mapCameraPosition),
);
}
goToCurrentLocation() async {

@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
@ -22,6 +23,7 @@ class RRTPlaceOrderPage extends StatelessWidget{
TextEditingController noteController = TextEditingController(text: '');
BuildContext _context;
@override
Widget build(BuildContext context) {
_context = context;
@ -35,6 +37,8 @@ class RRTPlaceOrderPage extends StatelessWidget{
return AppScaffold(
appBarTitle: localize.rapidResponseTeam,
isShowAppBar: true,
showNewAppBarTitle: true,
showNewAppBar: true,
body: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
@ -44,51 +48,59 @@ class RRTPlaceOrderPage extends StatelessWidget{
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(localize.selectedLocation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),),
Text(
localize.selectedLocation,
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),
),
selectedAddressField(),
AspectRatio(
aspectRatio: 3 / 1,
child: ClipRRect(
clipBehavior: Clip.hardEdge,
borderRadius: BorderRadius.circular(10),
child: Image.network(
"https://maps.googleapis.com/maps/api/staticmap?center=$lat,$lng &zoom=16&size=800x400&maptype=roadmap&markers=color:red%7C$lat,$lng&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8",
"https://maps.googleapis.com/maps/api/staticmap?center=$lat,$lng &zoom=16&size=800x600&maptype=roadmap&markers=color:red%7C$lat,$lng&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8",
fit: BoxFit.cover,
),
),
),
SizedBox(height: 10,),
SizedBox(
height: 10,
),
Container(
height: 70,
height: 80,
margin: EdgeInsets.symmetric(vertical: 5),
padding: EdgeInsets.symmetric(horizontal: 15, vertical: 10),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(10),
boxShadow: [BoxShadow(blurRadius: 5, spreadRadius: 2, offset: Offset(2,2), color: Colors.grey.withOpacity(0.25))]
),
color: Colors.white,
borderRadius: BorderRadius.circular(10),
boxShadow: [BoxShadow(blurRadius: 5, spreadRadius: 2, offset: Offset(2, 2), color: Colors.grey.withOpacity(0.25))]),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(localize.totalAmountPayable, style: TextStyle(fontSize: 13),),
SizedBox(height: 5,),
Text("${servicePrice.totalPrice ?? '- - -'} ${localize.sar}" , style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),),
Text(
localize.totalAmountPayable,
style: TextStyle(fontSize: 13),
),
SizedBox(
height: 5,
),
Text(
"${servicePrice.totalPrice ?? '- - -'} ${localize.sar}",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),
),
],
),
),
Container(
height: 70,
margin: EdgeInsets.symmetric(vertical: 5),
padding: EdgeInsets.symmetric(horizontal: 0, vertical: 10),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(10),
boxShadow: [BoxShadow(blurRadius: 5, spreadRadius: 2, offset: Offset(2,2), color: Colors.grey.withOpacity(0.25))]
),
color: Colors.white,
borderRadius: BorderRadius.circular(10),
boxShadow: [BoxShadow(blurRadius: 5, spreadRadius: 2, offset: Offset(2, 2), color: Colors.grey.withOpacity(0.25))]),
child: TextField(
controller: noteController,
style: TextStyle(fontSize: 18.0),
@ -105,8 +117,7 @@ class RRTPlaceOrderPage extends StatelessWidget{
borderSide: BorderSide(color: Colors.white),
borderRadius: BorderRadius.circular(10),
),
)
),
)),
),
],
),
@ -114,26 +125,29 @@ class RRTPlaceOrderPage extends StatelessWidget{
),
submitButton(context)
],
)
);
));
},
);
}
Widget selectedAddressField() {
var address = "${selectedAddress.address1 ?? ''} ${selectedAddress.address2 ?? ''}";
return Container(
margin: EdgeInsets.symmetric(vertical: 10),
child: Expanded(
child: MaterialButton(
height: 50, color: Colors.white,
height: 50,
color: Colors.white,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
onPressed: () {},
child: Row(
children: [
Expanded(child: Text(address, style: TextStyle(color: Colors.black87, fontSize: 15, letterSpacing: 1))),
Icon(Icons.location_on_rounded, size: 30, color: Colors.black,)
Icon(
Icons.location_on_rounded,
size: 30,
color: Colors.black,
)
],
),
),
@ -141,16 +155,12 @@ class RRTPlaceOrderPage extends StatelessWidget{
);
}
Widget submitButton(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(15),
child: MaterialButton(
height: 50,
color: Theme.of(context).appBarTheme.color,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
onPressed: () => placeOrder(),
child: Text(localize.submit, style: TextStyle(color: Colors.white, fontSize: 15, letterSpacing: 1),),
child: DefaultButton(
localize.submit,
() => placeOrder(),
),
);
}
@ -178,13 +188,11 @@ class RRTPlaceOrderPage extends StatelessWidget{
okFunction: () {
AlertDialogBox.closeAlertDialog(_context);
gotoRRTRoot();
}
).showAlertDialog(_context);
}).showAlertDialog(_context);
}
} else {
AppToast.showErrorToast(message: 'Invalid location selected');
}
}
gotoRRTRoot() {

@ -8,12 +8,12 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class RRTRequestPage extends StatefulWidget {
final List<PrescriptionsOrder> pendingOrders;
final ServicePrice servicePrice;
@ -21,8 +21,8 @@ class RRTRequestPage extends StatefulWidget{
@override
State<StatefulWidget> createState() => RRTRequestPageState();
}
class RRTRequestPageState extends State<RRTRequestPage> {
bool acceptTerms = false;
@ -37,15 +37,12 @@ class RRTRequestPageState extends State<RRTRequestPage>{
viewModel = vm;
},
builder: (ctx, vm, widgetState) {
if (widget.pendingOrders.isNotEmpty)
return currentOrderContent();
else
return requestContent();
},
);
}
Widget requestContent() {
@ -66,14 +63,12 @@ class RRTRequestPageState extends State<RRTRequestPage>{
Container(
padding: EdgeInsets.only(top: 20, bottom: 5),
alignment: Alignment.center,
child: Text(localize.youCanPayByTheFollowingOptions, style: TextStyle(fontSize: 13, color: Theme.of(context).appBarTheme.color, fontWeight: FontWeight.w500), maxLines: 2)
),
child: Text(localize.youCanPayByTheFollowingOptions, style: TextStyle(fontSize: 13, color: Theme.of(context).appBarTheme.color, fontWeight: FontWeight.w500), maxLines: 2)),
paymentOptions(),
],
),
),
actionButtons()
],
);
@ -86,12 +81,10 @@ class RRTRequestPageState extends State<RRTRequestPage>{
itemBuilder: (ctx, idx) {
var order = orders[idx];
return RRTLogListItem(order, onCancel: deleteOrder);
}
);
});
}
Widget serviceDescription(BuildContext context) =>
Padding(
Widget serviceDescription(BuildContext context) => Padding(
padding: const EdgeInsets.symmetric(horizontal: 10),
child: Text(
localize.rrtDDetails,
@ -113,13 +106,10 @@ class RRTRequestPageState extends State<RRTRequestPage>{
decoration: BoxDecoration(color: Theme.of(context).appBarTheme.color, borderRadius: BorderRadius.only(topLeft: radius, topRight: radius)),
child: Center(child: Text(localize.approximateServiceFee, style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w500, letterSpacing: 1))),
),
pricingRow(label: localize.amountBeforeTax, value: '$amount ${localize.sar}'),
Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
pricingRow(label: localize.taxAmount, value: '$vat ${localize.sar}'),
Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
pricingRow(label: localize.totalAmountPayable, value: '$total ${localize.sar}', labelBold: true),
Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
],
@ -127,49 +117,47 @@ class RRTRequestPageState extends State<RRTRequestPage>{
}
Widget pricingRow({@required String label, @required String value, bool labelBold = false, bool valueBold = false}) {
return
Container(
height: 40, margin: EdgeInsets.symmetric(horizontal: 10),
return Container(
height: 40,
margin: EdgeInsets.symmetric(horizontal: 10),
child: Row(
children: [
Text(label, style: TextStyle(fontSize: 13, color: Theme.of(context).appBarTheme.color, fontWeight: labelBold ? FontWeight.bold : FontWeight.normal)),
Spacer(),
Container(height: 40, color: Theme.of(context).appBarTheme.color, width: 0.5,),
Container(
height: 40,
color: Theme.of(context).appBarTheme.color,
width: 0.5,
),
Container(
alignment: Alignment.center,
width: MediaQuery.of(context).size.width * 0.25,
child: Text(value, style: TextStyle(fontSize: 13, color: Theme.of(context).appBarTheme.color, fontWeight: valueBold ? FontWeight.bold : FontWeight.normal))
),
child: Text(value, style: TextStyle(fontSize: 13, color: Theme.of(context).appBarTheme.color, fontWeight: valueBold ? FontWeight.bold : FontWeight.normal))),
],
),
);
}
Widget acceptPolicy() {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: Row(
children: [
Checkbox(value: acceptTerms, onChanged: (v){
Checkbox(
value: acceptTerms,
onChanged: (v) {
setState(() => acceptTerms = v);
}),
SizedBox(width: 10),
Expanded(
child: Text(localize.iAcceptTermsConditions, style: TextStyle(fontSize: 13, color: Theme.of(context).appBarTheme.color), maxLines: 2)
),
Expanded(child: Text(localize.iAcceptTermsConditions, style: TextStyle(fontSize: 13, color: Theme.of(context).appBarTheme.color), maxLines: 2)),
Container(
alignment: Alignment.center,
width: MediaQuery.of(context).size.width * 0.25,
child: TextButton(
child: Text(localize.clickHere, style: TextStyle(fontSize: 12, color: Colors.blue, fontWeight: FontWeight.w400)),
onPressed: () {
Navigator.push(
context,
FadePage(
page: RRTAgreementPage()));
}
),
Navigator.push(context, FadePage(page: RRTAgreementPage()));
}),
)
],
),
@ -179,8 +167,10 @@ class RRTRequestPageState extends State<RRTRequestPage>{
Widget paymentOptions() => Container(
height: 30,
alignment: Alignment.center,
child: Image.asset("assets/payment_options/payment_options.png", fit: BoxFit.fill,)
);
child: Image.asset(
"assets/payment_options/payment_options.png",
fit: BoxFit.fill,
));
Widget actionButtons() {
return Container(
@ -188,30 +178,16 @@ class RRTRequestPageState extends State<RRTRequestPage>{
child: Row(
children: [
Expanded(
child: MaterialButton(
height: 50,
color: Theme.of(context).appBarTheme.color,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10) ),
onPressed: () { },
child: Text(localize.cancel, style: TextStyle(color: Colors.white, fontSize: 13, letterSpacing: 1),),
),
),
SizedBox(width: 20,),
Expanded(
child: MaterialButton(
height: 50,
color: Theme.of(context).appBarTheme.color,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10) ),
child: Text(localize.ok, style: TextStyle(color: Colors.white, fontSize: 13, letterSpacing: 1),),
onPressed: () {
child: DefaultButton(
TranslationBase.of(context).next,
() {
if (acceptTerms)
goToPickupAddress();
else
AppToast.showErrorToast(message: localize.pleaseAcceptTerms);
}
},
),
),
)
],
),
);
@ -220,12 +196,12 @@ class RRTRequestPageState extends State<RRTRequestPage>{
goToPickupAddress() async {
Navigator.push(
context,
FadePage(page: RRTRequestPickupAddressPage(servicePrice: widget.servicePrice,))
);
FadePage(
page: RRTRequestPickupAddressPage(
servicePrice: widget.servicePrice,
)));
}
deleteOrder(PrescriptionsOrder order) async {
GifLoaderDialogUtils.showMyDialog(context);
var success = await viewModel.cancelOrder(order);

@ -107,7 +107,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
"",
//model.user.emailAddress,
),
isNeedToShowButton: _tabController.index == 1,
isNeedToShowButton: (widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) ? false : true,
buttonTitle: TranslationBase.of(context).schedule,
buttonIcon: 'assets/images/new/Boo_ Appointment.svg',
showConfirmMessageDialog: false,
@ -263,10 +263,10 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
}
void goToBookConfirm() {
if (DocAvailableAppointments.areSlotsAvailable)
if (DocAvailableAppointments.areAppointmentsAvailable)
navigateToBookConfirm(context);
else
AppToast.showErrorToast(message: "Please select Time Slot to continue");
AppToast.showErrorToast(message: TranslationBase.of(context).emptySchedule);
}
Future navigateToBookConfirm(context) async {

@ -1,3 +1,6 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
@ -6,6 +9,7 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/indicator.dart
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.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/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -15,10 +19,12 @@ import 'package:flutter/material.dart';
class SchedulePage extends StatefulWidget {
DoctorList doctorList;
AppoitmentAllHistoryResultList appo;
SchedulePage({
this.appo,
this.doctorList,
});
@override
_SchedulePageState createState() => _SchedulePageState();
}
@ -36,6 +42,7 @@ class _SchedulePageState extends State<SchedulePage> {
bool isPageChange = false;
AppSharedPreferences sharedPref = AppSharedPreferences();
@override
void initState() {
this.doctorList = widget.doctorList;
@ -67,7 +74,7 @@ class _SchedulePageState extends State<SchedulePage> {
isShowDecPage: false,
body: SizedBox(
height: MediaQuery.of(context).size.height,
child: Stack(
child: model.freeSlots.length > 0 ? Stack(
children: [
Container(
margin: EdgeInsets.only(top: 40),
@ -145,17 +152,28 @@ class _SchedulePageState extends State<SchedulePage> {
length: weeks.length,
)
],
) : Container(
child: Center(
child: Text(TranslationBase.of(context).emptySchedule, style: TextStyle(
fontSize: 16.0,
color: Color(0xffC5272D)
)),
),
)));
}));
}
generateWeeksSchedules() {
if (this.doctorScheduleResponse.length > 0) {
this.weeks.clear();
for (var i = 0; i < 8; i++) {
var weekSchedule = generateNewWeekSchedule(i);
this.markWeekFreeDays(weekSchedule);
this.weeks.add(weekSchedule);
}
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).emptySchedule);
}
//print(this.weeks);
}

@ -2260,6 +2260,8 @@ class TranslationBase {
String get covidBookAppo => localizedValues["covidBookAppo"][locale.languageCode];
String get emptySchedule => localizedValues["emptySchedule"][locale.languageCode];
}

@ -346,6 +346,7 @@ class TimelineNewWidget extends StatelessWidget {
FadePage(
page: AppointmentDetails(
appo: appoitmentAllHistoryResul,
parentIndex: 2,
)));
},
name: appoitmentAllHistoryResul.doctorNameObj,

Loading…
Cancel
Save