6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit f69cd5b8

AuthorEdmir Suljic<esu@dwarf.dk>
Date2025-07-03 13:53:17 +0200
Mid fix

Changed files

comwell_key_app/assets/translations/en-US.json     |  2 +-
 .../booking_details/bloc/booking_details_bloc.dart | 19 +++----
 .../bloc/booking_details_state.dart                |  2 +-
 .../lib/booking_details/booking_details_page.dart  | 24 ++++----
 .../components/booking_details_bottom_sheet.dart   |  3 +-
 .../lib/check_out/bloc/check_out_cubit.dart        | 32 +++++++----
 comwell_key_app/lib/check_out/check_out_flow.dart  | 33 ++++++-----
 .../lib/check_out/check_out_repository.dart        | 12 ++++
 .../components/check_out_bottom_sheet.dart         |  3 +-
 .../components/check_out_payment_card.dart         | 10 ++--
 .../components/checkout_itemized_bill.dart         | 40 ++++++++-----
 comwell_key_app/lib/check_out/utils/constants.dart |  1 +
 .../components/hotel_information_menu.dart         | 65 ----------------------
 comwell_key_app/lib/services/api.dart              |  9 +++
 .../lib/services/utils/api_endpoints.dart          |  1 +
 comwell_key_app/lib/utils/locator.dart             |  2 +
 16 files changed, 119 insertions(+), 139 deletions(-)

Diff

diff --git a/comwell_key_app/assets/translations/en-US.json b/comwell_key_app/assets/translations/en-US.json
index 1aadbf57..5c081c8a 100644
--- a/comwell_key_app/assets/translations/en-US.json
+++ b/comwell_key_app/assets/translations/en-US.json
@@ -168,7 +168,7 @@
"checkout_page_payment_total": "Total",
"checkout_page_payment_price": "{} kr.",
"checkout_page_payment_club_points_title": "Use Comwell Club Points",
- "checkout_page_payment_club_points_subtitle": "You have {} point, use them and save {} kr.",
+ "checkout_page_payment_club_points_subtitle": "You have {} points, use them and save {} kr.",
"checkout_page_payment_payment_title": "Pay with {}",
"accept_terms": "Accept terms and conditions",
"checkout_page_payment_dialog_title": "Are you sure you want to check out?",
diff --git a/comwell_key_app/lib/booking_details/bloc/booking_details_bloc.dart b/comwell_key_app/lib/booking_details/bloc/booking_details_bloc.dart
index 01da86e3..4613f322 100644
--- a/comwell_key_app/lib/booking_details/bloc/booking_details_bloc.dart
+++ b/comwell_key_app/lib/booking_details/bloc/booking_details_bloc.dart
@@ -23,7 +23,7 @@ class BookingDetailsBloc
extends Bloc<BookingDetailsEvent, BookingDetailsState> {
late Booking booking;
late User user;
- Timer? _timer;
+ Timer? _timer;
final BookingDetailsRepository bookingDetailsRepository;
final ProfileRepository profileRepository;
final SeosRepository seosRepository = locator<SeosRepository>();
@@ -31,24 +31,23 @@ class BookingDetailsBloc
final UpSalesRepository upSaleRepository;
List<RoomUpgrade> upSales = [];
-
BookingDetailsBloc(
this.booking, {
required this.bookingDetailsRepository,
- required this.profileRepository,
+ required this.profileRepository,
required this.upSaleRepository,
}) : super(BookingDetailsState.initial(booking)) {
on<InitialEvent>((event, emit) async {
try {
emit(state.loading());
+ print("qqq booking=${booking}");
_startTimer();
add(CheckIfHouseKeepingOrdered());
add(CheckMobileKeys());
- //add(GetBookingDetailsEvent(booking.confirmationId));
+ add(GetBookingDetailsEvent(booking.confirmationId));
add(GetUserEvent());
add(UpdateRemainingEvent(getCheckInTime().difference(DateTime.now())));
add(GetUpSalesEvent(upSales));
-
} catch (e, st) {
if (kDebugMode) print("err=$e, $st");
emit(state.setupError());
@@ -77,11 +76,11 @@ class BookingDetailsBloc
});
on<GetBookingDetailsEvent>((event, emit) async {
+
await getBookingDetails(emit, event.bookingId);
});
on<GetUserEvent>((event, emit) async {
-
await getUser(emit);
});
}
@@ -93,11 +92,12 @@ class BookingDetailsBloc
Future<Booking> getBookingDetails(
Emitter<BookingDetailsState> emit, String bookingId) async {
+ emit(state.loading());
try {
final bookingDetails =
await profileRepository.getBookingDetails(bookingId);
booking = bookingDetails;
- emit(state.copyWith(status: BookingDetailsStatus.main));
+ emit(state.copyWith(status: BookingDetailsStatus.main, isLoading: false));
return bookingDetails;
} catch (e) {
if (kDebugMode) print("err=$e");
@@ -170,11 +170,10 @@ class BookingDetailsBloc
DateTime getCheckOutTime() => booking.endDate.add(const Duration(hours: 5));
- bool get isHouseKeepingTime => booking.endDate.difference(booking.startDate).inDays > 2;
+ bool get isHouseKeepingTime =>
+ booking.endDate.difference(booking.startDate).inDays > 2;
Future<void> getUser(Emitter<BookingDetailsState> emit) async {
user = await profileRepository.fetchProfileSettings();
}
}
-
-
diff --git a/comwell_key_app/lib/booking_details/bloc/booking_details_state.dart b/comwell_key_app/lib/booking_details/bloc/booking_details_state.dart
index 54789e66..1b9b9ac7 100644
--- a/comwell_key_app/lib/booking_details/bloc/booking_details_state.dart
+++ b/comwell_key_app/lib/booking_details/bloc/booking_details_state.dart
@@ -38,7 +38,7 @@ class BookingDetailsState extends Equatable {
isHouseKeepingOrdered: true);
BookingDetailsState updateGuests(Iterable<Guest> guests) =>
copyWith(status: BookingDetailsStatus.guestsUpdated, guests: guests);
- BookingDetailsState loading() => copyWith(status: BookingDetailsStatus.loading);
+ BookingDetailsState loading() => copyWith(status: BookingDetailsStatus.loading, isLoading: true);
BookingDetailsState updateRemainingTime(Duration remainingTime) => copyWith(remainingTime: remainingTime);
BookingDetailsState main() => copyWith(status: BookingDetailsStatus.main);
BookingDetailsState getUpSales(List<RoomUpgrade> upSales) => copyWith(upSales: upSales);
diff --git a/comwell_key_app/lib/booking_details/booking_details_page.dart b/comwell_key_app/lib/booking_details/booking_details_page.dart
index c5f0d0f4..0d0b0b55 100644
--- a/comwell_key_app/lib/booking_details/booking_details_page.dart
+++ b/comwell_key_app/lib/booking_details/booking_details_page.dart
@@ -7,6 +7,7 @@ import 'package:comwell_key_app/common/components/comwell_app_bar.dart';
import 'package:comwell_key_app/common/components/shimmer_loader/booking_details_shimmer_loader.dart';
import 'package:comwell_key_app/overview/models/booking.dart';
import 'package:comwell_key_app/routing/app_routes.dart';
+import 'package:comwell_key_app/services/mappers/booking_mapper.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
@@ -28,16 +29,15 @@ class BookingDetailsPage extends StatelessWidget {
if (state.status == BookingDetailsStatus.initial) {
cubit.add(InitialEvent());
- //cubit.add(GetBookingDetailsEvent(cubit.booking.confirmationId));
}
return Scaffold(
extendBodyBehindAppBar: true,
- backgroundColor: Colors.transparent,
+ backgroundColor: Colors.white,
appBar: const ComwellAppBar(),
body: Builder(
builder: (context) {
- if (state.status == BookingDetailsStatus.loading) {
+ if (state.isLoading) {
return const Center(
child: BookingDetailsShimmerLoader(),
);
@@ -144,14 +144,13 @@ class BookingDetailsPage extends StatelessWidget {
children: [
Text(
cubit.booking.id,
- style: theme.textTheme.bodySmall?.copyWith(
- color: Colors.white.withValues(alpha: 0.65),
- fontWeight: FontWeight.w600,
+ style: theme.textTheme.labelLarge?.copyWith(
+ color: Colors.white.withValues(alpha: 0.65)
),
),
Text(
- cubit.booking.roomType,
- style: theme.textTheme.bodyMedium?.copyWith(
+ cubit.booking.toRoomType(),
+ style: theme.textTheme.headlineMedium?.copyWith(
color: Colors.white,
),
),
@@ -163,15 +162,14 @@ class BookingDetailsPage extends StatelessWidget {
Text(
'balance'.tr(),
textAlign: TextAlign.end,
- style: theme.textTheme.bodySmall?.copyWith(
- color: Colors.white.withValues(alpha: 0.65),
- fontWeight: FontWeight.w600,
+ style: theme.textTheme.labelLarge?.copyWith(
+ color: Colors.white.withValues(alpha: 0.65)
),
),
Text(
'total_charge_value'.tr(
- args: [cubit.booking.totalCharge.toString()]),
- style: theme.textTheme.bodyMedium?.copyWith(
+ args: [cubit.booking.balance.toString()]),
+ style: theme.textTheme.headlineMedium?.copyWith(
color: Colors.white,
),
),
diff --git a/comwell_key_app/lib/booking_details/components/booking_details_bottom_sheet.dart b/comwell_key_app/lib/booking_details/components/booking_details_bottom_sheet.dart
index 88f8e6a2..6c6c4a33 100644
--- a/comwell_key_app/lib/booking_details/components/booking_details_bottom_sheet.dart
+++ b/comwell_key_app/lib/booking_details/components/booking_details_bottom_sheet.dart
@@ -24,7 +24,8 @@ class BookingDetailsBottomSheet extends StatelessWidget {
return BottomSheetWidget(
widgetChildren: [
const SizedBox(height: 16),
- cubit.booking.reservationStatus == ReservationStatus.checkedin && cubit.getCheckOutTime().isBefore(DateTime.now())
+ // && cubit.getCheckOutTime().isBefore(DateTime.now())
+ cubit.booking.reservationStatus == ReservationStatus.checkedin
? const Padding(
padding: EdgeInsets.symmetric(horizontal: 16.0),
child: CheckOutButton(),
diff --git a/comwell_key_app/lib/check_out/bloc/check_out_cubit.dart b/comwell_key_app/lib/check_out/bloc/check_out_cubit.dart
index c4c6d86f..1798587f 100644
--- a/comwell_key_app/lib/check_out/bloc/check_out_cubit.dart
+++ b/comwell_key_app/lib/check_out/bloc/check_out_cubit.dart
@@ -1,10 +1,12 @@
import 'package:adyen_checkout/adyen_checkout.dart';
import 'package:bloc/bloc.dart';
import 'package:comwell_key_app/check_out/bloc/check_out_state.dart';
+import 'package:comwell_key_app/check_out/check_out_repository.dart';
import 'package:comwell_key_app/check_out/models/check_out_item.dart';
import 'package:comwell_key_app/check_out/models/checkout_processing_state.dart';
import 'package:comwell_key_app/check_out/models/payment_method.dart';
import 'package:comwell_key_app/check_out/pages/check_out_page.dart';
+import 'package:comwell_key_app/check_out/utils/constants.dart';
import 'package:comwell_key_app/overview/models/booking.dart';
import 'package:comwell_key_app/pregistration/pregistration_repository.dart';
import 'package:comwell_key_app/profile/profile_repository.dart';
@@ -17,6 +19,7 @@ class CheckoutCubit extends Cubit<CheckoutState> {
final ProfileRepository profileRepository = locator<ProfileRepository>();
final PreregistrationRepository preregistrationRepository =
locator<PreregistrationRepository>();
+ final CheckOutRepository checkOutRepository = locator<CheckOutRepository>();
final _tracking = locator<ComwellTracking>();
final pageController = PageController();
bool _isAnimating = false;
@@ -31,8 +34,10 @@ class CheckoutCubit extends Cubit<CheckoutState> {
try {
final user = await profileRepository.fetchProfileSettings();
emit(state.clubPointsFetched(user.points));
+
} catch (e) {
// Todo handle error
+
}
}
@@ -48,20 +53,26 @@ class CheckoutCubit extends Cubit<CheckoutState> {
emit(state.itemsUpdated(items));
}
- void processCheckout() async {
+ Future<void> processCheckout() async {
+ //TODO: Finish this when upsales are implemented
final analyticsEventItem = AnalyticsEventItem(
- hotelName: "Comwell",
+ hotelName: booking.hotelName,
currency: "DKK",
- value: 500,
+ value: booking.balance!.toInt(),
placement: "placement",
items: ["items"],
itemId: "itemId",
itemName: "itemName",
- price: 200,
- quantity: 200);
+ price: booking.balance!.toInt(),
+ quantity: 1);
_tracking.trackBeginCheckout(analyticsEventItem);
emit(state.processingStateUpdated(CheckoutProcessingStateProcessing()));
createSession();
+ try {
+ await checkOutRepository.checkOut(booking.confirmationId);
+ } catch (e) {
+ emit(state.processingStateUpdated(CheckoutProcessingStateError()));
+ }
}
void onContinueClicked() {
@@ -123,13 +134,12 @@ class CheckoutCubit extends Cubit<CheckoutState> {
void createSession() async {
try {
- // Price should be in cents/øre, so we multiply with 100
- final bookingPrice = booking.totalCharge.toInt();
- print("qqq bookingPrice=$bookingPrice");
- final priceInCents = state.totalPriceAfterDiscount * 100;
+
+ final bookingPrice = booking.balance?.toInt();
+
final amount = Amount(
- value: bookingPrice,
- currency: "DKK",
+ value: bookingPrice!,
+ currency: currency,
);
final paymentConfigurations = await preregistrationRepository
.sessionCheckout(amount, booking.confirmationId);
diff --git a/comwell_key_app/lib/check_out/check_out_flow.dart b/comwell_key_app/lib/check_out/check_out_flow.dart
index 8f4d6b40..1eb13602 100644
--- a/comwell_key_app/lib/check_out/check_out_flow.dart
+++ b/comwell_key_app/lib/check_out/check_out_flow.dart
@@ -6,6 +6,7 @@ import 'package:comwell_key_app/check_out/pages/check_out_processing_page.dart';
import 'package:comwell_key_app/common/components/comwell_app_bar.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:go_router/go_router.dart';
class CheckOutFlow extends StatelessWidget {
const CheckOutFlow({super.key});
@@ -16,23 +17,21 @@ class CheckOutFlow extends StatelessWidget {
if (cubit.state.processingState is! CheckoutProcessingStateNotStarted) {
return const CheckOutProcessingPage();
}
- return SafeArea(
- child: Scaffold(
- appBar: ComwellAppBar(
- shouldShowProfileButton: false,
- onBackPressed: () {
- final didScroll = cubit.onBackPressed();
- if (!didScroll) Navigator.of(context).pop();
- },
- ),
- bottomSheet: const CheckOutBottomSheet(),
- backgroundColor: Colors.white,
- body: PageView(
- controller: cubit.pageController,
- key: const PageStorageKey("check_out_flow"),
- physics: const NeverScrollableScrollPhysics(),
- children: CheckoutPage.getPages(ValueKey(cubit.state)).toList(),
- ),
+ return Scaffold(
+ appBar: ComwellAppBar(
+ shouldShowProfileButton: false,
+ onBackPressed: () {
+ final didScroll = cubit.onBackPressed();
+ if (!didScroll) context.pop();
+ },
+ ),
+ bottomSheet: const CheckOutBottomSheet(),
+ backgroundColor: Colors.white,
+ body: PageView(
+ controller: cubit.pageController,
+ key: const PageStorageKey("check_out_flow"),
+ physics: const NeverScrollableScrollPhysics(),
+ children: CheckoutPage.getPages(ValueKey(cubit.state)).toList(),
),
);
}
diff --git a/comwell_key_app/lib/check_out/check_out_repository.dart b/comwell_key_app/lib/check_out/check_out_repository.dart
new file mode 100644
index 00000000..edad6d0a
--- /dev/null
+++ b/comwell_key_app/lib/check_out/check_out_repository.dart
@@ -0,0 +1,12 @@
+import 'package:comwell_key_app/services/api.dart';
+import 'package:comwell_key_app/utils/json.dart';
+
+class CheckOutRepository {
+ final Api _api = Api();
+
+ CheckOutRepository();
+
+ Future<Json?> checkOut(String confirmationId) async {
+ return await _api.checkOut(confirmationId);
+ }
+}
\ No newline at end of file
diff --git a/comwell_key_app/lib/check_out/components/check_out_bottom_sheet.dart b/comwell_key_app/lib/check_out/components/check_out_bottom_sheet.dart
index 49b6cce2..03c8ba1e 100644
--- a/comwell_key_app/lib/check_out/components/check_out_bottom_sheet.dart
+++ b/comwell_key_app/lib/check_out/components/check_out_bottom_sheet.dart
@@ -22,7 +22,8 @@ class CheckOutBottomSheet extends StatelessWidget {
children: [
const Divider(color: colorDivider),
Padding(
- padding: const EdgeInsets.symmetric(horizontal: 16.0),
+ padding: const EdgeInsets.only(
+ left: 18.0, right: 18.0, bottom: 32.0, top: 18.0),
child: Row(
children: [
Expanded(
diff --git a/comwell_key_app/lib/check_out/components/check_out_payment_card.dart b/comwell_key_app/lib/check_out/components/check_out_payment_card.dart
index 5ec905cf..0539001b 100644
--- a/comwell_key_app/lib/check_out/components/check_out_payment_card.dart
+++ b/comwell_key_app/lib/check_out/components/check_out_payment_card.dart
@@ -11,6 +11,7 @@ class CheckOutPaymentCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
final cubit = context.read<CheckoutCubit>();
+ final theme = Theme.of(context);
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
@@ -27,14 +28,11 @@ class CheckOutPaymentCard extends StatelessWidget {
children: [
Text(
"checkout_page_confirmation_price_title".tr(),
- style: Theme.of(context)
- .textTheme
- .bodySmall
- ?.copyWith(color: colorBlack[65]),
+ style: theme.textTheme.bodySmall?.copyWith(color: colorBlack[65]),
),
const SizedBox(height: 4),
- Text("checkout_page_payment_price".tr(args: ["${cubit.state.totalPriceBeforeDiscount}"]),
- style: Theme.of(context).textTheme.displaySmall),
+ Text("checkout_page_payment_price".tr(args: ["${cubit.booking.balance}"]),
+ style: theme.textTheme.displaySmall),
],
),
Container(
diff --git a/comwell_key_app/lib/check_out/components/checkout_itemized_bill.dart b/comwell_key_app/lib/check_out/components/checkout_itemized_bill.dart
index 6d0771b0..a377fdfe 100644
--- a/comwell_key_app/lib/check_out/components/checkout_itemized_bill.dart
+++ b/comwell_key_app/lib/check_out/components/checkout_itemized_bill.dart
@@ -28,21 +28,35 @@ class CheckoutItemizedBill extends StatelessWidget {
children: [
Text("checkout_page_payment_total".tr()),
if (cubit.state.applyClubPoints)
- Row(
- children: [
- Text(
- "${cubit.state.totalPriceBeforeDiscount}",
- style: const TextStyle(
- decoration: TextDecoration.lineThrough,
- decorationColor: colorDivider,
- color: colorDivider),
- ),
- const SizedBox(width: 4),
- Text("${cubit.state.totalPriceBeforeDiscount - cubit.state.clubPoints}"),
- ],
+ AnimatedSwitcher(
+ duration: const Duration(milliseconds: 350),
+ transitionBuilder: (Widget child, Animation<double> animation) {
+ final slide = Tween<Offset>(
+ begin: const Offset(0, 1),
+ end: Offset.zero,
+ ).animate(animation);
+ return SlideTransition(
+ position: slide,
+ child: FadeTransition(opacity: animation, child: child),
+ );
+ },
+ child: Row(
+ key: ValueKey(cubit.state.applyClubPoints),
+ children: [
+ Text(
+ "${cubit.state.totalPriceBeforeDiscount}",
+ style: const TextStyle(
+ decoration: TextDecoration.lineThrough,
+ decorationColor: colorDivider,
+ color: colorDivider),
+ ),
+ const SizedBox(width: 4),
+ Text("${cubit.booking.balance! - cubit.state.clubPoints}"),
+ ],
+ ),
)
else
- Text("${cubit.state.totalPriceBeforeDiscount}"),
+ Text("${cubit.booking.balance}"),
],
),
const SizedBox(height: 12),
diff --git a/comwell_key_app/lib/check_out/utils/constants.dart b/comwell_key_app/lib/check_out/utils/constants.dart
new file mode 100644
index 00000000..5c8ecc35
--- /dev/null
+++ b/comwell_key_app/lib/check_out/utils/constants.dart
@@ -0,0 +1 @@
+const String currency = "DKK";
\ No newline at end of file
diff --git a/comwell_key_app/lib/hotel_information/components/hotel_information_menu.dart b/comwell_key_app/lib/hotel_information/components/hotel_information_menu.dart
deleted file mode 100644
index 15166043..00000000
--- a/comwell_key_app/lib/hotel_information/components/hotel_information_menu.dart
+++ /dev/null
@@ -1,65 +0,0 @@
-import 'package:easy_localization/easy_localization.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter_bloc/flutter_bloc.dart';
-import 'package:go_router/go_router.dart';
-
-import '../../routing/app_routes.dart';
-import '../cubit/hotel_information_cubit.dart';
-import 'hotel_information_list_tile.dart';
-
-class HotelInformationMenu extends StatelessWidget {
- const HotelInformationMenu({super.key});
-
- @override
- Widget build(BuildContext context) {
- final height = MediaQuery.of(context).size.height;
- final cubit = context.read<HotelInformationCubit>();
- final hotel = cubit.hotel;
- final theme = Theme.of(context);
- return ListView(
- shrinkWrap: true,
- children: [
- Image.asset(
- hotel.image,
- width: double.infinity,
- height: height * 0.4,
- fit: BoxFit.cover,
- ),
- const SizedBox(height: 16),
- Padding(
- padding: const EdgeInsets.all(16.0),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(hotel.name,
- style: theme.textTheme.headlineLarge),
- const SizedBox(height: 16),
- ...hotel.facilities.map((facility) {
- print("qqq facility: ${facility}");
- return Padding(
- padding: const EdgeInsets.only(bottom: 6.0),
- child: HotelInformationListTile(
- iconPath: facility.iconPath,
- title: facility.title,
- subtitle: facility.subtitle,
- onClick: () {
- context.pushNamed("${AppRoutes.hotelInformation.name}/${facility.type}", extra: facility);
- },
- ),
- );
- }),
- HotelInformationListTile(
- iconPath: "assets/icons/ic_info.svg",
- title: "hotel_information_page_menu_other_info_title".tr(),
- subtitle:
- "hotel_information_page_menu_other_info_subtitle".tr(),
- onClick: cubit.onMoreInformationClicked,
- ),
- const SizedBox(height: 100)
- ],
- ),
- )
- ],
- );
- }
-}
diff --git a/comwell_key_app/lib/services/api.dart b/comwell_key_app/lib/services/api.dart
index 87411e4c..78343784 100644
--- a/comwell_key_app/lib/services/api.dart
+++ b/comwell_key_app/lib/services/api.dart
@@ -170,6 +170,15 @@ class Api {
return response.data;
}
+ Future<Json?> checkOut(String confirmationId) async {
+ final body = {
+ "confirmationId": confirmationId,
+ };
+ final data = jsonEncode(body);
+ final response = await dio.post<Json>(ApiEndpoints.checkOut, data: data);
+ return response.data;
+ }
+
Future<Json?> orderHousekeeping(Housekeeping housekeeping) async {
final body = {
"hotelCode": housekeeping.hotelCode,
diff --git a/comwell_key_app/lib/services/utils/api_endpoints.dart b/comwell_key_app/lib/services/utils/api_endpoints.dart
index b7d63c9a..495f46af 100644
--- a/comwell_key_app/lib/services/utils/api_endpoints.dart
+++ b/comwell_key_app/lib/services/utils/api_endpoints.dart
@@ -6,6 +6,7 @@ class ApiEndpoints {
static const String getCurrentBookings = '/booking/v1/GetCurrentBookings';
static const String preRegistration = '/booking/v1/Preregistration';
static const String checkIn = '/booking/v1/CheckIn';
+ static const String checkOut = '/booking/v1/CheckOut';
static const String getBookingDetails = '/booking/v1/GetBookingDetails?confirmationId=';
//Default endpoints
diff --git a/comwell_key_app/lib/utils/locator.dart b/comwell_key_app/lib/utils/locator.dart
index f2557758..9028dbec 100644
--- a/comwell_key_app/lib/utils/locator.dart
+++ b/comwell_key_app/lib/utils/locator.dart
@@ -1,4 +1,5 @@
import 'package:comwell_key_app/authentication/authentication_repository.dart';
+import 'package:comwell_key_app/check_out/check_out_repository.dart';
import 'package:comwell_key_app/choose_share_room/choose_share_room_repository.dart';
import 'package:comwell_key_app/contact/repository/contact_repository.dart';
import 'package:comwell_key_app/database/comwell_db.dart';
@@ -49,5 +50,6 @@ void setupLocator() {
locator.registerFactory<UpSalesRepository>(() => UpSalesRepository());
locator.registerFactory<ChooseShareRoomRepository>(
() => ChooseShareRoomRepository());
+ locator.registerFactory<CheckOutRepository>(() => CheckOutRepository());
}
}