pull/181/head
haroon amjad 11 hours ago
parent 000c403f6b
commit c9279e2272

@ -1532,5 +1532,6 @@
"servicePriceList": "قائمة أسعار الخدمات",
"servicePriceListDesc": "توضح قائمة أسعار الخدمات أدناه رسوم الخدمات الصحية المقدمة للمرضى بنظام الدفع النقدي. أما فيما يتعلق بالخدمات المشمولة بالتأمين، فسيتم تطبيق التغطية التأمينية والتحقق من الأهلية واحتساب نسب التحمل وفقًا لشروط وثيقة التأمين وجدول المنافع المعتمد لكل شركة تأمين.",
"servicePriceListRights": "يحق للمريض الحصول على متابعة مجانية في غضون 14 يومًا من الزيارة الأولى",
"serviceName": "اسم الخدمة"
"serviceName": "اسم الخدمة",
"noFreeSlot": "لا توجد مواعيد متاحة في التاريخ المحدد. يرجى اختيار تاريخ آخر أو إعادة المحاولة لاحقاً."
}

@ -1524,6 +1524,6 @@
"servicePriceList": "Services Price List",
"servicePriceListDesc": "Below is the services price list outline the healthcare services fees for cash payments, where the insurance coverage, eligibility, and co-payment deductions will be processed in accordance with the insurance policy terms and the table of benefits of each insurance providers:",
"servicePriceListRights": "The patient has the right to a free follow-up within 14 days of initial visit",
"serviceName": "Service Name"
"serviceName": "Service Name",
"noFreeSlot": "No free slot available for the selected date. Please select another date or check back later."
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

@ -185,7 +185,7 @@ class BookAppointmentsRepoImp implements BookAppointmentsRepo {
body: mapDevice,
onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType;
onError!(error);
// onError!(error);
},
onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try {

@ -103,6 +103,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
String selectedAppointmentDate = "";
String selectedAppointmentTime = "";
String selectedAppointmentDisplayDate = "";
dynamic freeSlotsResponse;
@ -385,9 +386,10 @@ class BookAppointmentsViewModel extends ChangeNotifier {
notifyListeners();
}
setSelectedAppointmentDateTime(String date, String time) {
setSelectedAppointmentDateTime(String date, String time, String displayDate) {
selectedAppointmentDate = date;
selectedAppointmentTime = time;
selectedAppointmentDisplayDate = displayDate;
notifyListeners();
}
@ -581,7 +583,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
result.fold(
(failure) async {
onError?.call(LocaleKeys.noDoctorFound.tr());
onError?.call(selectedClinic.clinicID == 23 ? failure.message : LocaleKeys.noDoctorFound.tr());
},
(apiResponse) async {
if (apiResponse.messageStatus == 2) {
@ -669,7 +671,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
Future<void> getDoctorFreeSlots({bool isBookingForLiveCare = false, Function(dynamic)? onSuccess, Function(String)? onError}) async {
docFreeSlots.clear();
DateTime date;
final DateFormat formatter = DateFormat('HH:mm');
final DateFormat formatter = DateFormat('HH:mm', "en_US");
final DateFormat dateFormatter = DateFormat('yyyy-MM-dd');
Map<DateTime, List> _eventsParsed;

@ -1523,5 +1523,6 @@ abstract class LocaleKeys {
static const servicePriceListDesc = 'servicePriceListDesc';
static const servicePriceListRights = 'servicePriceListRights';
static const serviceName = 'serviceName';
static const noFreeSlot = 'noFreeSlot';
}

@ -120,7 +120,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
),
AppCustomChipWidget(
labelText:
"${LocaleKeys.date.tr(context: context)}: ${bookAppointmentsViewModel.isWaitingAppointmentSelected ? DateUtil.formatDateToDate(DateTime.now(), false) : bookAppointmentsViewModel.selectedAppointmentDate}",
"${LocaleKeys.date.tr(context: context)}: ${bookAppointmentsViewModel.isWaitingAppointmentSelected ? DateUtil.formatDateToDate(DateTime.now(), false) : bookAppointmentsViewModel.selectedAppointmentDisplayDate}",
),
AppCustomChipWidget(
labelText:

@ -75,7 +75,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
return Scaffold(
backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView(
title: LocaleKeys.chooseDoctor.tr(),
title: LocaleKeys.chooseDoctor.tr(context: context),
// bottomChild: Container(
// decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, customBorder: BorderRadius.only(topLeft: Radius.circular(24.r), topRight: Radius.circular(24.r))),
// padding: EdgeInsets.symmetric(vertical: 20.h, horizontal: 20.h),

@ -7,6 +7,7 @@ import 'package:hmg_patient_app_new/core/app_export.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/utils/date_util.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/authentication/authentication_view_model.dart';
@ -144,13 +145,14 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
child: selectedDateDisplay.toText16(weight: FontWeight.w500),
),
//TODO: Add Next Day Span here
SizedBox(
height: 100.h,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Wrap(
direction: Axis.horizontal,
alignment: WrapAlignment.start,
dayEvents.isNotEmpty
? SizedBox(
height: 100.h,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Wrap(
direction: Axis.horizontal,
alignment: WrapAlignment.start,
spacing: 6.h,
runSpacing: 6.h,
children: List.generate(
@ -168,10 +170,13 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
),
),
),
),
)
: Utils.getNoDataWidget(context, noDataText: LocaleKeys.noFreeSlot.tr(context: context)),
SizedBox(height: 16.h),
CustomButton(
text: LocaleKeys.select.tr(context: context),
isDisabled: dayEvents.isEmpty,
onPressed: () async {
if (appState.isAuthenticated) {
if(selectedTime == LocaleKeys.waitingAppointment.tr(context: context)){
@ -186,7 +191,7 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
);
} else {
bookAppointmentsViewModel.getAppointmentNearestGate(projectID: bookAppointmentsViewModel.selectedDoctor.projectID!, clinicID: bookAppointmentsViewModel.selectedDoctor.clinicID!);
bookAppointmentsViewModel.setSelectedAppointmentDateTime(selectedDate, selectedTime);
bookAppointmentsViewModel.setSelectedAppointmentDateTime(selectedDate, selectedTime, selectedDateDisplay);
Navigator.of(context).pop();
Navigator.of(context).push(
CustomPageRoute(
@ -304,11 +309,14 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
Map<String, dynamic> timeSlot = {"isoTime": dayEvents[i].isoTime, "start": dayEvents[i].start.toString(), "end": dayEvents[i].end.toString(), "vidaDate": dayEvents[i].vidaDate};
timeList.add(timeSlot);
}
selectedTime = dayEvents[selectedButtonIndex].isoTime!;
if (dayEvents.isNotEmpty) {
selectedTime = dayEvents[selectedButtonIndex].isoTime!;
}
setState(() {});
}
void _onDaySelected(DateTime day) {
final DateFormat formatter = DateFormat('yyyy-MM-dd');
final DateFormat formatter = DateFormat('yyyy-MM-dd', "en-US");
setState(() {
selectedDateDisplay = DateUtil.getMonthDayYearDateFormatted(day);
selectedNextDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day.add(Duration(days: 1)), "en");

Loading…
Cancel
Save