6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit c1178d64
Changed files
comwell_key_app/assets/fonts/Fellix-Black.ttf | Bin 0 -> 129284 bytes .../assets/fonts/Fellix-BlackItalic.ttf | Bin 0 -> 135884 bytes comwell_key_app/assets/fonts/Fellix-Bold.ttf | Bin 0 -> 129536 bytes comwell_key_app/assets/fonts/Fellix-Bold.woff | Bin 52512 -> 0 bytes comwell_key_app/assets/fonts/Fellix-Bold.woff2 | Bin 42560 -> 0 bytes comwell_key_app/assets/fonts/Fellix-BoldItalic.ttf | Bin 0 -> 136180 bytes comwell_key_app/assets/fonts/Fellix-ExtraBold.ttf | Bin 0 -> 129788 bytes .../assets/fonts/Fellix-ExtraBoldItalic.ttf | Bin 0 -> 136432 bytes comwell_key_app/assets/fonts/Fellix-Light.ttf | Bin 0 -> 130464 bytes .../assets/fonts/Fellix-LightItalic.ttf | Bin 0 -> 136604 bytes comwell_key_app/assets/fonts/Fellix-Medium.ttf | Bin 0 -> 129768 bytes .../assets/fonts/Fellix-MediumItalic.ttf | Bin 0 -> 135572 bytes comwell_key_app/assets/fonts/Fellix-Regular.ttf | Bin 0 -> 129932 bytes comwell_key_app/assets/fonts/Fellix-Regular.woff | Bin 52008 -> 0 bytes comwell_key_app/assets/fonts/Fellix-Regular.woff2 | Bin 42100 -> 0 bytes .../assets/fonts/Fellix-RegularItalic.ttf | Bin 0 -> 135764 bytes comwell_key_app/assets/fonts/Fellix-SemiBold.ttf | Bin 0 -> 129504 bytes comwell_key_app/assets/fonts/Fellix-SemiBold.woff | Bin 52712 -> 0 bytes comwell_key_app/assets/fonts/Fellix-SemiBold.woff2 | Bin 42640 -> 0 bytes .../assets/fonts/Fellix-SemiBoldItalic.ttf | Bin 0 -> 135424 bytes comwell_key_app/assets/fonts/Fellix-Thin.ttf | Bin 0 -> 130512 bytes comwell_key_app/assets/fonts/Fellix-ThinItalic.ttf | Bin 0 -> 136376 bytes comwell_key_app/assets/translations/da-DK.json | 4 +- comwell_key_app/assets/translations/en-US.json | 4 +- .../choose_share_room/choose_share_room_page.dart | 47 +++------- .../components/choose_room_widget.dart | 103 +++++++++++---------- .../components/current_bookings_tab_view.dart | 2 +- .../overview/components/room_selection_widget.dart | 5 +- comwell_key_app/lib/routing/app_router.dart | 6 +- comwell_key_app/pubspec.yaml | 33 ++++--- 30 files changed, 101 insertions(+), 103 deletions(-)
Diff
diff --git a/comwell_key_app/assets/fonts/Fellix-Black.ttf b/comwell_key_app/assets/fonts/Fellix-Black.ttf
new file mode 100644
index 00000000..ba915824
Binary files /dev/null and b/comwell_key_app/assets/fonts/Fellix-Black.ttf differ
diff --git a/comwell_key_app/assets/fonts/Fellix-BlackItalic.ttf b/comwell_key_app/assets/fonts/Fellix-BlackItalic.ttf
new file mode 100644
index 00000000..d28af91f
Binary files /dev/null and b/comwell_key_app/assets/fonts/Fellix-BlackItalic.ttf differ
diff --git a/comwell_key_app/assets/fonts/Fellix-Bold.ttf b/comwell_key_app/assets/fonts/Fellix-Bold.ttf
new file mode 100644
index 00000000..ddf978f5
Binary files /dev/null and b/comwell_key_app/assets/fonts/Fellix-Bold.ttf differ
diff --git a/comwell_key_app/assets/fonts/Fellix-Bold.woff b/comwell_key_app/assets/fonts/Fellix-Bold.woff
deleted file mode 100644
index f347b5c3..00000000
Binary files a/comwell_key_app/assets/fonts/Fellix-Bold.woff and /dev/null differ
diff --git a/comwell_key_app/assets/fonts/Fellix-Bold.woff2 b/comwell_key_app/assets/fonts/Fellix-Bold.woff2
deleted file mode 100644
index 9c796e34..00000000
Binary files a/comwell_key_app/assets/fonts/Fellix-Bold.woff2 and /dev/null differ
diff --git a/comwell_key_app/assets/fonts/Fellix-BoldItalic.ttf b/comwell_key_app/assets/fonts/Fellix-BoldItalic.ttf
new file mode 100644
index 00000000..4618c3bc
Binary files /dev/null and b/comwell_key_app/assets/fonts/Fellix-BoldItalic.ttf differ
diff --git a/comwell_key_app/assets/fonts/Fellix-ExtraBold.ttf b/comwell_key_app/assets/fonts/Fellix-ExtraBold.ttf
new file mode 100644
index 00000000..7003f03a
Binary files /dev/null and b/comwell_key_app/assets/fonts/Fellix-ExtraBold.ttf differ
diff --git a/comwell_key_app/assets/fonts/Fellix-ExtraBoldItalic.ttf b/comwell_key_app/assets/fonts/Fellix-ExtraBoldItalic.ttf
new file mode 100644
index 00000000..fe8289dc
Binary files /dev/null and b/comwell_key_app/assets/fonts/Fellix-ExtraBoldItalic.ttf differ
diff --git a/comwell_key_app/assets/fonts/Fellix-Light.ttf b/comwell_key_app/assets/fonts/Fellix-Light.ttf
new file mode 100644
index 00000000..4cb1c4c2
Binary files /dev/null and b/comwell_key_app/assets/fonts/Fellix-Light.ttf differ
diff --git a/comwell_key_app/assets/fonts/Fellix-LightItalic.ttf b/comwell_key_app/assets/fonts/Fellix-LightItalic.ttf
new file mode 100644
index 00000000..0fca571a
Binary files /dev/null and b/comwell_key_app/assets/fonts/Fellix-LightItalic.ttf differ
diff --git a/comwell_key_app/assets/fonts/Fellix-Medium.ttf b/comwell_key_app/assets/fonts/Fellix-Medium.ttf
new file mode 100644
index 00000000..890c63a5
Binary files /dev/null and b/comwell_key_app/assets/fonts/Fellix-Medium.ttf differ
diff --git a/comwell_key_app/assets/fonts/Fellix-MediumItalic.ttf b/comwell_key_app/assets/fonts/Fellix-MediumItalic.ttf
new file mode 100644
index 00000000..2090da1a
Binary files /dev/null and b/comwell_key_app/assets/fonts/Fellix-MediumItalic.ttf differ
diff --git a/comwell_key_app/assets/fonts/Fellix-Regular.ttf b/comwell_key_app/assets/fonts/Fellix-Regular.ttf
new file mode 100644
index 00000000..e33337fc
Binary files /dev/null and b/comwell_key_app/assets/fonts/Fellix-Regular.ttf differ
diff --git a/comwell_key_app/assets/fonts/Fellix-Regular.woff b/comwell_key_app/assets/fonts/Fellix-Regular.woff
deleted file mode 100644
index 926be72f..00000000
Binary files a/comwell_key_app/assets/fonts/Fellix-Regular.woff and /dev/null differ
diff --git a/comwell_key_app/assets/fonts/Fellix-Regular.woff2 b/comwell_key_app/assets/fonts/Fellix-Regular.woff2
deleted file mode 100644
index 93c38b30..00000000
Binary files a/comwell_key_app/assets/fonts/Fellix-Regular.woff2 and /dev/null differ
diff --git a/comwell_key_app/assets/fonts/Fellix-RegularItalic.ttf b/comwell_key_app/assets/fonts/Fellix-RegularItalic.ttf
new file mode 100644
index 00000000..779ec96f
Binary files /dev/null and b/comwell_key_app/assets/fonts/Fellix-RegularItalic.ttf differ
diff --git a/comwell_key_app/assets/fonts/Fellix-SemiBold.ttf b/comwell_key_app/assets/fonts/Fellix-SemiBold.ttf
new file mode 100644
index 00000000..6e03babe
Binary files /dev/null and b/comwell_key_app/assets/fonts/Fellix-SemiBold.ttf differ
diff --git a/comwell_key_app/assets/fonts/Fellix-SemiBold.woff b/comwell_key_app/assets/fonts/Fellix-SemiBold.woff
deleted file mode 100644
index b01581d0..00000000
Binary files a/comwell_key_app/assets/fonts/Fellix-SemiBold.woff and /dev/null differ
diff --git a/comwell_key_app/assets/fonts/Fellix-SemiBold.woff2 b/comwell_key_app/assets/fonts/Fellix-SemiBold.woff2
deleted file mode 100644
index fce02e9f..00000000
Binary files a/comwell_key_app/assets/fonts/Fellix-SemiBold.woff2 and /dev/null differ
diff --git a/comwell_key_app/assets/fonts/Fellix-SemiBoldItalic.ttf b/comwell_key_app/assets/fonts/Fellix-SemiBoldItalic.ttf
new file mode 100644
index 00000000..bdb9d34b
Binary files /dev/null and b/comwell_key_app/assets/fonts/Fellix-SemiBoldItalic.ttf differ
diff --git a/comwell_key_app/assets/fonts/Fellix-Thin.ttf b/comwell_key_app/assets/fonts/Fellix-Thin.ttf
new file mode 100644
index 00000000..218aec4c
Binary files /dev/null and b/comwell_key_app/assets/fonts/Fellix-Thin.ttf differ
diff --git a/comwell_key_app/assets/fonts/Fellix-ThinItalic.ttf b/comwell_key_app/assets/fonts/Fellix-ThinItalic.ttf
new file mode 100644
index 00000000..e8928421
Binary files /dev/null and b/comwell_key_app/assets/fonts/Fellix-ThinItalic.ttf differ
diff --git a/comwell_key_app/assets/translations/da-DK.json b/comwell_key_app/assets/translations/da-DK.json
index 6bd6c7d3..d992b226 100644
--- a/comwell_key_app/assets/translations/da-DK.json
+++ b/comwell_key_app/assets/translations/da-DK.json
@@ -288,5 +288,7 @@
"email_launch_error": "Kunne ikke åbne email klient",
"phone_launch_error": "Kunne ikke åbne telefon",
"room_selection": "Vælg værelse",
- "room_selection_subtitle": "Vælg et værelse til dit ophold"
+ "room_selection_subtitle": "Vælg et værelse til dit ophold",
+ "choose_room": "Vælg dit værelse",
+ "choose_room_subtitle": "Du skal vælge dét værelse du gerne vil sove på. Når du har valgt, kan du tildele de andre værelser til andre."
}
\ No newline at end of file
diff --git a/comwell_key_app/assets/translations/en-US.json b/comwell_key_app/assets/translations/en-US.json
index c1e31107..c9fa9101 100644
--- a/comwell_key_app/assets/translations/en-US.json
+++ b/comwell_key_app/assets/translations/en-US.json
@@ -287,6 +287,8 @@
"email_launch_error": "Could not launch email client",
"phone_launch_error": "Could not launch phone call",
"room_selection": "Room selection",
- "room_selection_subtitle": "Select a room for your stay"
+ "room_selection_subtitle": "Select a room for your stay",
+ "choose_room": "Choose room",
+ "choose_room_subtitle": "You need to choose the room you want to sleep in. When you have chosen, you can assign the other rooms to others."
}
diff --git a/comwell_key_app/lib/choose_share_room/choose_share_room_page.dart b/comwell_key_app/lib/choose_share_room/choose_share_room_page.dart
index 0c90a42a..0f571c11 100644
--- a/comwell_key_app/lib/choose_share_room/choose_share_room_page.dart
+++ b/comwell_key_app/lib/choose_share_room/choose_share_room_page.dart
@@ -1,62 +1,37 @@
+import 'package:comwell_key_app/common/components/comwell_app_bar.dart';
+import 'package:comwell_key_app/overview/models/booking.dart';
+import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:comwell_key_app/choose_share_room/components/choose_room_widget.dart';
import 'package:comwell_key_app/themes/light_theme.dart';
class ChooseShareRoomPage extends StatelessWidget {
- const ChooseShareRoomPage({super.key});
+ final Booking booking;
+ const ChooseShareRoomPage({super.key, required this.booking});
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Scaffold(
backgroundColor: Colors.white,
- appBar: PreferredSize(
- preferredSize: const Size.fromHeight(80),
- child: Container(
- decoration: BoxDecoration(
- color: sandColor[20],
- borderRadius: const BorderRadius.only(
- bottomLeft: Radius.circular(32),
- bottomRight: Radius.circular(32),
- ),
- ),
- child: SafeArea(
- child: Padding(
- padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- IconButton(
- icon: const Icon(Icons.arrow_back_ios_new_rounded),
- onPressed: () => Navigator.of(context).pop(),
- ),
- const Spacer(),
- IconButton(
- icon: const Icon(Icons.person_outline),
- onPressed: () {},
- ),
- ],
- ),
- ),
- ),
- ),
- ),
+ appBar: const ComwellAppBar(),
body: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: ListView(
children: [
const SizedBox(height: 24),
Text(
- 'Vælg dit værelse',
+ 'choose_room'.tr(),
style: theme.textTheme.headlineLarge,
),
const SizedBox(height: 8),
Text(
- 'Du skal vælge dét værelse du gerne vil sove på. Når du har valgt, kan du tildele de andre værelser til andre.',
- style: theme.textTheme.bodySmall,
+ 'choose_room_subtitle'.tr(),
+ style: theme.textTheme.bodySmall?.copyWith(fontWeight: FontWeight.w400),
),
const SizedBox(height: 24),
ChooseRoomWidget(
+ booking: booking,
roomName: 'Standard Single Room',
description: 'Overnatning med morgenmad',
guests: 1,
@@ -64,6 +39,7 @@ class ChooseShareRoomPage extends StatelessWidget {
onSelect: () {},
),
ChooseRoomWidget(
+ booking: booking,
roomName: 'Standard Twin Room',
description: 'Overnatning med morgenmad',
guests: 2,
@@ -72,6 +48,7 @@ class ChooseShareRoomPage extends StatelessWidget {
onSelect: () {},
),
ChooseRoomWidget(
+ booking: booking,
roomName: 'Standard Twin Room',
description: 'Overnatning med morgenmad',
guests: 2,
diff --git a/comwell_key_app/lib/choose_share_room/components/choose_room_widget.dart b/comwell_key_app/lib/choose_share_room/components/choose_room_widget.dart
index 7b1c4597..818565c5 100644
--- a/comwell_key_app/lib/choose_share_room/components/choose_room_widget.dart
+++ b/comwell_key_app/lib/choose_share_room/components/choose_room_widget.dart
@@ -1,9 +1,11 @@
+import 'package:comwell_key_app/overview/models/booking.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:comwell_key_app/themes/light_theme.dart';
import 'package:flutter_svg/svg.dart';
class ChooseRoomWidget extends StatelessWidget {
+ final Booking booking;
final String roomName;
final String description;
final int guests;
@@ -13,6 +15,7 @@ class ChooseRoomWidget extends StatelessWidget {
const ChooseRoomWidget({
super.key,
+ required this.booking,
required this.roomName,
required this.description,
required this.guests,
@@ -34,66 +37,71 @@ class ChooseRoomWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
- Padding(
- padding: const EdgeInsets.all(16.0),
- child: Row(
+ Padding(
+ padding: const EdgeInsets.all(16.0),
+ child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
- child: Column(
+ child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
- Text(
- roomName,
- style: theme.textTheme.headlineSmall,
- ),
- const SizedBox(height: 2),
- Text(
- description,
- style: theme.textTheme.bodySmall,
- ),
- const SizedBox(height: 12),
- Row(
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
children: [
- SvgPicture.asset("assets/icons/user-circle.svg", width: 20, height: 20),
- const SizedBox(width: 4),
Text(
- guests == 1 ? '1 voksen' : '$guests voksne',
- style: theme.textTheme.bodySmall,
+ roomName,
+ style: theme.textTheme.headlineSmall,
),
- const SizedBox(width: 8),
- const VerticalDivider(),
- GestureDetector(
- onTap: () {
-
- },
- child: Text(
- 'read_more'.tr(),
- style: theme.textTheme.bodySmall?.copyWith(
- decoration: TextDecoration.underline,
- ),
- ),
+ const SizedBox(height: 4),
+ Text(
+ description,
+ style: theme.textTheme.bodySmall,
),
-
-
],
),
+ ClipRRect(
+ borderRadius: BorderRadius.circular(8),
+ child: Image.asset(
+ imageAsset,
+ width: 60,
+ height: 60,
+ fit: BoxFit.cover,
+ ),
+ ),
],
),
),
+ ],
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 16.0),
+ child: Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ SvgPicture.asset("assets/icons/user-circle.svg",
+ width: 20, height: 20),
+ const SizedBox(width: 4),
+ Text(
+ '${booking.adults} ${booking.adults > 1 ? 'adults'.tr() : 'adult'.tr()}${booking.children > 0 ? ' | ${booking.children} ${booking.children > 1 ? 'children'.tr() : 'child'.tr()}' : ''}',
+ style: theme.textTheme.bodySmall,
+ ),
const SizedBox(width: 8),
- ClipRRect(
- borderRadius: BorderRadius.circular(12),
- child: Image.asset(
- imageAsset,
- width: 72,
- height: 72,
- fit: BoxFit.cover,
+ const VerticalDivider(),
+ GestureDetector(
+ onTap: () {},
+ child: Text(
+ 'read_more'.tr(),
+ style: theme.textTheme.bodySmall?.copyWith(
+ decoration: TextDecoration.underline,
+ ),
),
),
],
- ),
),
+ ),
if (extraInfo != null) ...[
const SizedBox(height: 8),
Padding(
@@ -117,15 +125,16 @@ class ChooseRoomWidget extends StatelessWidget {
children: [
const Divider(color: colorDivider),
Padding(
- padding: const EdgeInsets.only(left: 16.0, right: 16.0, top: 8.0, bottom: 16.0),
+ padding: const EdgeInsets.only(
+ left: 16.0, right: 16.0, top: 8.0, bottom: 16.0),
child: SizedBox(
width: double.infinity,
child: ElevatedButton(
- style: ElevatedButton.styleFrom(
- elevation: 0,
- foregroundColor: Colors.white,
- ),
- onPressed: onSelect,
+ style: ElevatedButton.styleFrom(
+ elevation: 0,
+ foregroundColor: Colors.white,
+ ),
+ onPressed: onSelect,
child: const Text('Vælg værelse'),
),
),
diff --git a/comwell_key_app/lib/overview/components/current_bookings_tab_view.dart b/comwell_key_app/lib/overview/components/current_bookings_tab_view.dart
index 740a8240..88d90b64 100644
--- a/comwell_key_app/lib/overview/components/current_bookings_tab_view.dart
+++ b/comwell_key_app/lib/overview/components/current_bookings_tab_view.dart
@@ -105,7 +105,7 @@ class CurrentBookingsTabView extends StatelessWidget {
children: [
CurrentBookingListItem(booking: booking),
if (booking.reservationStatus == ReservationStatus.checkedin)
- const RoomSelectionWidget(),
+ RoomSelectionWidget(booking: booking),
],
);
},
diff --git a/comwell_key_app/lib/overview/components/room_selection_widget.dart b/comwell_key_app/lib/overview/components/room_selection_widget.dart
index 5fecc73b..28f9da49 100644
--- a/comwell_key_app/lib/overview/components/room_selection_widget.dart
+++ b/comwell_key_app/lib/overview/components/room_selection_widget.dart
@@ -1,3 +1,4 @@
+ import 'package:comwell_key_app/overview/models/booking.dart';
import 'package:comwell_key_app/routing/app_routes.dart';
import 'package:comwell_key_app/themes/light_theme.dart';
import 'package:easy_localization/easy_localization.dart';
@@ -5,9 +6,11 @@ import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
class RoomSelectionWidget extends StatelessWidget {
+ final Booking booking;
const RoomSelectionWidget({
super.key,
+ required this.booking,
});
@override
@@ -17,7 +20,7 @@ class RoomSelectionWidget extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 16),
child: InkWell(
onTap: () {
- context.pushNamed(AppRoutes.chooseShareRoom.name);
+ context.pushNamed(AppRoutes.chooseShareRoom.name, extra: booking);
},
child: Container(
decoration: BoxDecoration(
diff --git a/comwell_key_app/lib/routing/app_router.dart b/comwell_key_app/lib/routing/app_router.dart
index df46eb44..2979a4d8 100644
--- a/comwell_key_app/lib/routing/app_router.dart
+++ b/comwell_key_app/lib/routing/app_router.dart
@@ -434,10 +434,10 @@ GoRouter goRouter() {
path: "/${AppRoutes.chooseShareRoom.name}",
name: AppRoutes.chooseShareRoom.name,
builder: (context, state) {
+ final booking = state.extra as Booking;
return BlocProvider(
- create: (context) => ChooseShareRoomCubit(
- ),
- child: const ChooseShareRoomPage(),
+ create: (context) => ChooseShareRoomCubit(),
+ child: ChooseShareRoomPage(booking: booking),
);
},
),
diff --git a/comwell_key_app/pubspec.yaml b/comwell_key_app/pubspec.yaml
index 774b7291..917f00cb 100644
--- a/comwell_key_app/pubspec.yaml
+++ b/comwell_key_app/pubspec.yaml
@@ -107,19 +107,24 @@ flutter:
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
- #fonts:
- # - family: Fellix
- # fonts:
- # - asset: assets/fonts/Fellix-Bold.ttf
- # - asset: assets/fonts/Fellix-Regular.ttf
- # - asset: assets/fonts/Fellix-Regular.ttf
- # - asset: assets/fonts/Fellix-SemiBold.ttf
- # - asset: assets/fonts/Fellix-SemiBold.ttf
- # - family: Trajan Pro
- # fonts:
- # - asset: fonts/TrajanPro.ttf
- # - asset: fonts/TrajanPro_Bold.ttf
- # weight: 700
- #
+ fonts:
+ - family: Fellix
+ fonts:
+ - asset: assets/fonts/Fellix-Black.ttf
+ - asset: assets/fonts/Fellix-BlackItalic.ttf
+ - asset: assets/fonts/Fellix-Bold.ttf
+ - asset: assets/fonts/Fellix-BoldItalic.ttf
+ - asset: assets/fonts/Fellix-ExtraBold.ttf
+ - asset: assets/fonts/Fellix-ExtraBoldItalic.ttf
+ - asset: assets/fonts/Fellix-Light.ttf
+ - asset: assets/fonts/Fellix-LightItalic.ttf
+ - asset: assets/fonts/Fellix-Medium.ttf
+ - asset: assets/fonts/Fellix-MediumItalic.ttf
+ - asset: assets/fonts/Fellix-Regular.ttf
+ - asset: assets/fonts/Fellix-RegularItalic.ttf
+ - asset: assets/fonts/Fellix-SemiBold.ttf
+ - asset: assets/fonts/Fellix-SemiBoldItalic.ttf
+ - asset: assets/fonts/Fellix-Thin.ttf
+ - asset: assets/fonts/Fellix-ThinItalic.ttf
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages