diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro
index ab7b2ca..9c1827a 100644
--- a/android/app/proguard-rules.pro
+++ b/android/app/proguard-rules.pro
@@ -69,4 +69,7 @@
# Penguin classes
-keep class com.peng.pennavmap.models.** { *; }
--keep class com.peng.pennavmap.db.** { *; }
\ No newline at end of file
+-keep class com.peng.pennavmap.db.** { *; }
+
+-keep class com.hiennv.flutter_callkit_incoming.** { *; }
+-keepattributes Signature, Annotation, InnerClasses, EnclosingMethod
\ No newline at end of file
diff --git a/assets/images/svg/doctor_profile_rating_icon.svg b/assets/images/svg/doctor_profile_rating_icon.svg
new file mode 100644
index 0000000..f658411
--- /dev/null
+++ b/assets/images/svg/doctor_profile_rating_icon.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/images/svg/doctor_profile_reviews_icon.svg b/assets/images/svg/doctor_profile_reviews_icon.svg
new file mode 100644
index 0000000..9ef9f71
--- /dev/null
+++ b/assets/images/svg/doctor_profile_reviews_icon.svg
@@ -0,0 +1,7 @@
+
diff --git a/assets/images/svg/waitingAppo.svg b/assets/images/svg/waitingAppo.svg
new file mode 100644
index 0000000..c9bd009
--- /dev/null
+++ b/assets/images/svg/waitingAppo.svg
@@ -0,0 +1,6 @@
+
diff --git a/lib/core/app_assets.dart b/lib/core/app_assets.dart
index 613fba1..f3ff8fd 100644
--- a/lib/core/app_assets.dart
+++ b/lib/core/app_assets.dart
@@ -177,6 +177,7 @@ class AppAssets {
static const String ic_rrt_vehicle = '$svgBasePath/ic_rrt_vehicle.svg';
static const String doctor_profile_rating_icon = '$svgBasePath/doctor_profile_rating_icon.svg';
static const String doctor_profile_reviews_icon = '$svgBasePath/doctor_profile_reviews_icon.svg';
+ static const String waiting_appointment_icon = '$svgBasePath/waitingAppo.svg';
//bottom navigation//
diff --git a/lib/features/book_appointments/book_appointments_view_model.dart b/lib/features/book_appointments/book_appointments_view_model.dart
index bcc88ff..a97cb82 100644
--- a/lib/features/book_appointments/book_appointments_view_model.dart
+++ b/lib/features/book_appointments/book_appointments_view_model.dart
@@ -112,6 +112,8 @@ class BookAppointmentsViewModel extends ChangeNotifier {
String? selectedClinicForFilters;
bool applyFilters = false;
+ bool isWaitingAppointmentAvailable = false;
+
///variables for laser clinic
List femaleLaserCategory = [
LaserCategoryType(1, 'bodyString'),
@@ -466,6 +468,8 @@ class BookAppointmentsViewModel extends ChangeNotifier {
}
initialSlotDuration = apiResponse.data["InitialSlotDuration"];
freeSlotsResponse = apiResponse.data['FreeTimeSlots'];
+ // isWaitingAppointmentAvailable = apiResponse.data["IsAllowToBookWaitingAppointment"];
+ isWaitingAppointmentAvailable = true;
freeSlotsResponse.forEach((element) {
// date = (isLiveCareSchedule != null && isLiveCareSchedule)
// ? DateUtil.convertStringToDate(element)
diff --git a/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_info.dart b/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_info.dart
new file mode 100644
index 0000000..d41937d
--- /dev/null
+++ b/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_info.dart
@@ -0,0 +1,74 @@
+import 'package:easy_localization/easy_localization.dart';
+import 'package:flutter/material.dart';
+import 'package:hmg_patient_app_new/core/app_assets.dart';
+import 'package:hmg_patient_app_new/core/utils/size_utils.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/generated/locale_keys.g.dart';
+import 'package:hmg_patient_app_new/theme/colors.dart';
+import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
+import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
+
+class WaitingAppointmentInfo extends StatelessWidget {
+ const WaitingAppointmentInfo({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: AppColors.bgScaffoldColor,
+ body: Column(
+ children: [
+ Expanded(
+ child: CollapsingListView(
+ title: "Waiting Appointment".needTranslation,
+ child: SingleChildScrollView(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SizedBox(height: 24.h),
+ Container(
+ decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
+ color: AppColors.whiteColor,
+ borderRadius: 24.h,
+ hasShadow: true,
+ ),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Utils.buildSvgWithAssets(icon: AppAssets.waiting_appointment_icon, width: 48.h, height: 48.h, fit: BoxFit.contain)
+ ],
+ ),
+ ),
+ ],
+ ).paddingSymmetrical(24.w, 0),
+ ),
+ ),
+ ),
+ Container(
+ decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
+ color: AppColors.whiteColor,
+ borderRadius: 24.h,
+ hasShadow: true,
+ ),
+ child: CustomButton(
+ text: "Continue".needTranslation,
+ onPressed: () async {},
+ backgroundColor: AppColors.primaryRedColor,
+ borderColor: AppColors.primaryRedColor,
+ textColor: AppColors.whiteColor,
+ fontSize: 16,
+ fontWeight: FontWeight.w500,
+ borderRadius: 12,
+ padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
+ height: 50.h,
+ icon: AppAssets.calendar,
+ iconColor: AppColors.whiteColor,
+ iconSize: 20.h,
+ ).paddingSymmetrical(24.h, 24.h),
+ ),
+ ],
+ ),
+ );
+ }
+}
diff --git a/lib/presentation/book_appointment/widgets/appointment_calendar.dart b/lib/presentation/book_appointment/widgets/appointment_calendar.dart
index 54ff282..7e2e7ba 100644
--- a/lib/presentation/book_appointment/widgets/appointment_calendar.dart
+++ b/lib/presentation/book_appointment/widgets/appointment_calendar.dart
@@ -15,6 +15,7 @@ import 'package:hmg_patient_app_new/features/book_appointments/book_appointments
import 'package:hmg_patient_app_new/features/book_appointments/models/timeslots.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/review_appointment_page.dart';
+import 'package:hmg_patient_app_new/presentation/book_appointment/waiting_appointment/waiting_appointment_info.dart';
import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@@ -27,7 +28,7 @@ import 'package:smooth_corner/smooth_corner.dart';
import 'package:syncfusion_flutter_calendar/calendar.dart';
class AppointmentCalendar extends StatefulWidget {
- const AppointmentCalendar({super.key});
+ AppointmentCalendar({super.key});
@override
State createState() => _AppointmentCalendarState();
@@ -54,7 +55,6 @@ class _AppointmentCalendarState extends State {
String selectedTime = "";
- bool isWaitingAppointmentAvailable = false;
final _selectedDay = DateTime.now();
@override
@@ -176,13 +176,22 @@ class _AppointmentCalendarState extends State {
text: "Select".needTranslation,
onPressed: () async {
if (appState.isAuthenticated) {
- bookAppointmentsViewModel.setSelectedAppointmentDateTime(selectedDate, selectedTime);
- Navigator.of(context).pop();
- Navigator.of(context).push(
- CustomPageRoute(
- page: ReviewAppointmentPage(),
- ),
- );
+ if(selectedTime == "Waiting Appointment".needTranslation){
+ Navigator.of(context).pop();
+ Navigator.of(context).push(
+ CustomPageRoute(
+ page: WaitingAppointmentInfo(),
+ ),
+ );
+ } else {
+ bookAppointmentsViewModel.setSelectedAppointmentDateTime(selectedDate, selectedTime);
+ Navigator.of(context).pop();
+ Navigator.of(context).push(
+ CustomPageRoute(
+ page: ReviewAppointmentPage(),
+ ),
+ );
+ }
} else {
showCommonBottomSheetWithoutHeight(
context,
@@ -281,8 +290,8 @@ class _AppointmentCalendarState extends State {
openTimeSlotsPickerForDate(DateTime dateStart, List freeSlots) {
dayEvents.clear();
DateTime dateStartObj = new DateTime(dateStart.year, dateStart.month, dateStart.day, 0, 0, 0, 0, 0);
- if (isWaitingAppointmentAvailable && DateUtils.isSameDay(dateStart, DateTime.now())) {
- dayEvents.add(TimeSlot(isoTime: "Waiting Appointment", start: DateTime.now(), end: DateTime.now(), vidaDate: ""));
+ if (bookAppointmentsViewModel.isWaitingAppointmentAvailable && DateUtils.isSameDay(dateStart, DateTime.now())) {
+ dayEvents.add(TimeSlot(isoTime: "Waiting Appointment".needTranslation, start: DateTime.now(), end: DateTime.now(), vidaDate: ""));
}
freeSlots.forEach((v) {
if (v.start == dateStartObj) dayEvents.add(v);
@@ -321,9 +330,25 @@ class TimeSlotChip extends StatelessWidget {
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTap,
- child: Container(
- padding: EdgeInsets.symmetric(horizontal: 14.h, vertical: 8.h),
- decoration: ShapeDecoration(
+ child: label == "Waiting Appointment".needTranslation
+ ? Container(
+ padding: EdgeInsets.symmetric(horizontal: 14.h, vertical: 8.h),
+ decoration: ShapeDecoration(
+ color: isSelected ? AppColors.warningColorYellow : AppColors.whiteColor,
+ shape: SmoothRectangleBorder(
+ borderRadius: BorderRadius.circular(8.h),
+ smoothness: 1,
+ side: BorderSide(color: isSelected ? AppColors.warningColorYellow : AppColors.borderOnlyColor.withOpacity(0.2), width: 1),
+ ),
+ ),
+ child: label.toText12(
+ color: isSelected ? AppColors.whiteColor : Colors.black87,
+ fontWeight: FontWeight.w500,
+ ),
+ )
+ : Container(
+ padding: EdgeInsets.symmetric(horizontal: 14.h, vertical: 8.h),
+ decoration: ShapeDecoration(
color: AppColors.whiteColor,
shape: SmoothRectangleBorder(
borderRadius: BorderRadius.circular(8.h),