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

AuthorMikkel Thygesen<mth@dwarf.dk>
Date2025-01-21 15:39:40 +0100
546: implemented housekeeping page

Changed files

.../assets/icons/icon_housekeeping_cleaning.svg    |   3 +
 .../assets/icons/icon_housekeeping_coffee.svg      |   5 +
 .../assets/icons/icon_housekeeping_soap.svg        |   3 +
 .../assets/icons/icon_housekeeping_towels.svg      |   3 +
 .../assets/icons/icon_housekeeping_trash.svg       |   3 +
 comwell_key_app/assets/translations/da-DK.json     | 236 +++++++++++----------
 comwell_key_app/assets/translations/en-US.json     | 233 ++++++++++----------
 .../lib/home/components/housekeeping_button.dart   |  68 ++++++
 comwell_key_app/lib/home/home_page.dart            |   8 +-
 .../components/housekeeping_service.dart           |  49 +++++
 .../components/selectable_service.dart             |  92 ++++++++
 .../lib/housekeeping/housekeeping_cubit.dart       |  40 ++++
 .../lib/housekeeping/housekeeping_page.dart        |  98 +++++++++
 .../lib/housekeeping/housekeeping_state.dart       |  15 ++
 .../lib/pregistration/preregistration_flow.dart    |   2 +-
 comwell_key_app/lib/routing/app_router.dart        |   9 +-
 comwell_key_app/lib/routing/app_routes.dart        |   1 +
 17 files changed, 641 insertions(+), 227 deletions(-)

Diff

diff --git a/comwell_key_app/assets/icons/icon_housekeeping_cleaning.svg b/comwell_key_app/assets/icons/icon_housekeeping_cleaning.svg
new file mode 100644
index 00000000..24708413
--- /dev/null
+++ b/comwell_key_app/assets/icons/icon_housekeeping_cleaning.svg
@@ -0,0 +1,3 @@
+<svg width="18" height="16" viewBox="0 0 18 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M13.1161 6.49086L12.75 6.85698V7.37475V9.35698L12.125 9.98198L8.26777 6.12475L8.89277 5.49975H10.875H11.3928L11.7589 5.13363L14.5714 2.32113C14.9462 1.94634 15.5538 1.94634 15.9286 2.32113C16.3034 2.69592 16.3034 3.30358 15.9286 3.67836L13.1161 6.49086ZM13.0089 10.8659L14 9.87475V7.37475L16.8125 4.56225C17.6754 3.6993 17.6754 2.30019 16.8125 1.43725C15.9496 0.574303 14.5504 0.574303 13.6875 1.43725L10.875 4.24975H8.375L7.38388 5.24086L6.8125 5.81225L6.5 6.12475L5.875 6.74975C4.21129 8.41346 2.72472 9.19143 1.69824 9.55522C0.796652 9.87475 0.25 9.87475 0.25 9.87475L1.34117 10.9659L6.1875 15.8122C6.1875 15.8122 8.0625 15.8122 10.25 13.6247L12.125 11.7497L12.4375 11.4372L13.0089 10.8659ZM11.2411 10.8659L7.38388 7.00863L6.75888 7.63363C5.22415 9.16837 3.79763 10.0341 2.66255 10.5195L3.41938 11.2764C3.47872 11.262 3.53961 11.2463 3.60188 11.2294C4.39106 11.0141 5.37628 10.4277 6.21488 9.5891L7.09876 10.473C6.23527 11.3365 5.2568 11.9473 4.41673 12.2737L5.04026 12.8972C5.8174 12.7648 6.82595 12.1025 7.77683 11.1516L8.66071 12.0355C7.78946 12.9067 6.86365 13.5517 6.03588 13.8929L6.61996 14.4769C6.72114 14.4495 6.83722 14.4134 6.96631 14.3659C7.54274 14.1535 8.40322 13.7038 9.36612 12.7409L11.2411 10.8659ZM0.25 5.91641V7.16641H1.5V5.91641H0.25ZM2.75 5.91641V4.66641H4V5.91641H2.75ZM0.875 3.41641V4.66641H2.125V3.41641H0.875Z" fill="black"/>
+</svg>
diff --git a/comwell_key_app/assets/icons/icon_housekeeping_coffee.svg b/comwell_key_app/assets/icons/icon_housekeeping_coffee.svg
new file mode 100644
index 00000000..383b2d7a
--- /dev/null
+++ b/comwell_key_app/assets/icons/icon_housekeeping_coffee.svg
@@ -0,0 +1,5 @@
+<svg width="18" height="19" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M17.75 17.5H0.25V18.75H17.75V17.5Z" fill="black"/>
+<path d="M14.3125 6.875H4C3.66858 6.87533 3.35083 7.00713 3.11648 7.24148C2.88213 7.47583 2.75033 7.79358 2.75 8.125V13.125C2.75098 13.9535 3.08053 14.7478 3.66637 15.3336C4.25221 15.9195 5.0465 16.249 5.875 16.25H10.875C11.7035 16.249 12.4978 15.9195 13.0836 15.3336C13.6695 14.7478 13.999 13.9535 14 13.125V12.5H14.3125C15.0584 12.5 15.7738 12.2037 16.3012 11.6762C16.8287 11.1488 17.125 10.4334 17.125 9.6875C17.125 8.94158 16.8287 8.22621 16.3012 7.69876C15.7738 7.17132 15.0584 6.875 14.3125 6.875ZM12.75 13.125C12.7495 13.6221 12.5517 14.0987 12.2002 14.4502C11.8487 14.8017 11.3721 14.9995 10.875 15H5.875C5.37789 14.9995 4.90129 14.8017 4.54978 14.4502C4.19827 14.0987 4.00055 13.6221 4 13.125V8.125H12.75V13.125ZM14.3125 11.25H14V8.125H14.3125C14.7269 8.125 15.1243 8.28962 15.4174 8.58265C15.7104 8.87567 15.875 9.2731 15.875 9.6875C15.875 10.1019 15.7104 10.4993 15.4174 10.7924C15.1243 11.0854 14.7269 11.25 14.3125 11.25Z" fill="black"/>
+<path d="M10.875 5.625H9.625V5.53375C9.62582 5.30146 9.56152 5.0736 9.43939 4.87601C9.31726 4.67841 9.1422 4.51901 8.93406 4.41588L7.25681 3.57725C6.84061 3.37083 6.49056 3.05194 6.24633 2.65674C6.0021 2.26154 5.87347 1.80582 5.875 1.34125V0.625H7.125V1.34125C7.12425 1.57352 7.18857 1.80136 7.31069 1.99894C7.43281 2.19652 7.60784 2.35594 7.81594 2.45913L9.49319 3.29775C9.90937 3.5042 10.2594 3.82309 10.5036 4.21828C10.7479 4.61348 10.8765 5.06918 10.875 5.53375V5.625Z" fill="black"/>
+</svg>
diff --git a/comwell_key_app/assets/icons/icon_housekeeping_soap.svg b/comwell_key_app/assets/icons/icon_housekeeping_soap.svg
new file mode 100644
index 00000000..be9015e5
--- /dev/null
+++ b/comwell_key_app/assets/icons/icon_housekeeping_soap.svg
@@ -0,0 +1,3 @@
+<svg width="13" height="18" viewBox="0 0 13 18" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M8.4375 0.875H2.1875V2.125H3.75V2.75H3.125C2.43464 2.75 1.875 3.30964 1.875 4V5.27592C0.988215 5.4247 0.3125 6.19594 0.3125 7.125V15.25C0.3125 16.2855 1.15197 17.125 2.1875 17.125H6.5625C7.59803 17.125 8.4375 16.2855 8.4375 15.25V7.125C8.4375 6.19594 7.76179 5.4247 6.875 5.27592V4C6.875 3.30964 6.31536 2.75 5.625 2.75H5V2.125H8.4375V0.875ZM5.625 5.25H3.125V4H3.75H5H5.625V5.25ZM7.1875 7.68933V7.125C7.1875 6.77982 6.90768 6.5 6.5625 6.5H2.1875C1.84232 6.5 1.5625 6.77982 1.5625 7.125V9.6276C2.55367 9.84492 3.59652 9.51149 4.27774 8.73737C5.01533 7.8992 6.11981 7.51932 7.1875 7.68933ZM1.5625 10.898V15.25C1.5625 15.5952 1.84232 15.875 2.1875 15.875H6.5625C6.90768 15.875 7.1875 15.5952 7.1875 15.25V8.96565C6.47819 8.7762 5.7115 9.00023 5.21613 9.56316C4.29349 10.6116 2.91148 11.1003 1.5625 10.898ZM11.25 4.625C11.25 4.97018 10.9702 5.25 10.625 5.25C10.2798 5.25 10 4.97018 10 4.625C10 4.27982 10.2798 4 10.625 4C10.9702 4 11.25 4.27982 11.25 4.625ZM12.5 4.625C12.5 5.66053 11.6605 6.5 10.625 6.5C9.58947 6.5 8.75 5.66053 8.75 4.625C8.75 3.58947 9.58947 2.75 10.625 2.75C11.6605 2.75 12.5 3.58947 12.5 4.625Z" fill="black"/>
+</svg>
diff --git a/comwell_key_app/assets/icons/icon_housekeeping_towels.svg b/comwell_key_app/assets/icons/icon_housekeeping_towels.svg
new file mode 100644
index 00000000..94e0ded3
--- /dev/null
+++ b/comwell_key_app/assets/icons/icon_housekeeping_towels.svg
@@ -0,0 +1,3 @@
+<svg width="18" height="14" viewBox="0 0 18 14" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M0.295519 5.21693C0.213894 6.56702 0.0419922 7.93982 0.0419922 9.29191C0.0419922 9.77213 0.223011 10.2098 0.519914 10.5413C0.222719 10.8731 0.0419922 11.3114 0.0419922 11.7919C0.0419922 12.8284 0.885244 13.6669 1.91699 13.6669C3.4608 13.6669 5.59965 13.667 6.83437 13.6671C9.11323 13.6673 11.9843 13.6675 14.8338 13.6669C16.5601 13.6665 17.9587 12.2678 17.9587 10.5419C17.9587 10.4201 17.9517 10.2999 17.9381 10.1817L17.8732 9.42501H17.8695L17.1684 2.84032C16.9254 1.38229 15.8531 0.125 14.2826 0.125H7.74951H6.53593C5.8306 0.125 5.15101 0.390022 4.63189 0.86753L0.596886 4.5791C0.417218 4.74436 0.3091 4.97319 0.295519 5.21693ZM15.827 2.7C15.7136 1.9585 14.756 1.47906 14.0859 1.47906H7.55786V2.9375C7.55786 4.4908 6.29866 5.75 4.74536 5.75H1.56793L1.4591 7.47949C1.58868 7.44007 1.73974 7.42696 1.88449 7.41718C6.19839 7.34346 10.5194 7.41617 14.8338 7.41691C15.3927 7.41701 15.9173 7.56373 16.3712 7.8207L15.827 2.7ZM6.30786 1.47906V2.9375C6.30786 3.80044 5.60831 4.5 4.74536 4.5H2.52927L5.47813 1.78752C5.73912 1.54745 5.96914 1.47906 6.30786 1.47906ZM1.91699 8.66691C6.22251 8.66675 10.528 8.66617 14.8336 8.66691C15.8697 8.66711 16.7087 9.50639 16.7087 10.5419C16.7087 11.5774 15.8697 12.4167 14.8335 12.4169C11.9841 12.4175 9.11342 12.4173 6.83467 12.4171C5.59995 12.417 3.46103 12.4169 1.91699 12.4169C1.57374 12.4169 1.29199 12.1362 1.29199 11.7919C1.29199 11.4467 1.57186 11.1665 1.91694 11.1666H2.12533H14.0003H14.8337V9.91657H14.0003H2.12533C2.03524 9.91657 1.94321 9.92285 1.85345 9.91366C1.53959 9.88153 1.29199 9.61459 1.29199 9.29191C1.29199 8.95856 1.58132 8.66691 1.91699 8.66691Z" fill="black"/>
+</svg>
diff --git a/comwell_key_app/assets/icons/icon_housekeeping_trash.svg b/comwell_key_app/assets/icons/icon_housekeeping_trash.svg
new file mode 100644
index 00000000..c87dc5da
--- /dev/null
+++ b/comwell_key_app/assets/icons/icon_housekeeping_trash.svg
@@ -0,0 +1,3 @@
+<svg width="16" height="18" viewBox="0 0 16 18" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M10.5 0.25H5.5V1.5H10.5V0.25ZM0.5 2.75V4H1.75V16.5C1.75 17.1904 2.30964 17.75 3 17.75H13C13.6904 17.75 14.25 17.1904 14.25 16.5V4H15.5V2.75H0.5ZM3 16.5V4H13V16.5H3ZM5.5 6.5H6.75V14H5.5V6.5ZM10.5 6.5H9.25V14H10.5V6.5Z" fill="black"/>
+</svg>
diff --git a/comwell_key_app/assets/translations/da-DK.json b/comwell_key_app/assets/translations/da-DK.json
index 8ff8b0e8..fabb3350 100644
--- a/comwell_key_app/assets/translations/da-DK.json
+++ b/comwell_key_app/assets/translations/da-DK.json
@@ -1,115 +1,125 @@
{
- "generic_continue": "Fortsæt",
- "generic_information_required": "Dette felt er påkrævet",
- "generic_confirm": "Bekræft",
- "generic_done": "Færdig",
- "welcome_headline": "Velkommen hos Comwell Hotels",
- "welcome_button": "Fortsæt",
- "welcome_error": "Der er sket en fejl. Genstart app.",
- "room_key": "Nøgle",
- "room_keys": "Nøgler",
- "redeem_code": "Indløs kode",
- "error_opening_door": "Der skete en fejl.",
- "try_again": "Prøv igen",
- "room_key_description": "Dette er din nøgle til værelset.",
- "login_button": "Login",
- "create_user_button": "Opret ny bruger",
- "profile_settings_profile_menu": "Profilindstillinger",
- "payment_card_profile_menu": "Betalingskort",
- "notifications_profile_menu": "Notifikationer",
- "logout_profile_menu": "Log ud",
- "logout_dialog_title": "Vil du logge ud af din profil",
- "cancel": "Annuller",
- "name_cc_sign": "Navn",
- "become_cc_member_title": "Bliv medlem af comwell club",
- "become_cc_member_subtitle": "Bliv medlem og optjen point, hver gang du overnatter på et Comwell Hotel.",
- "overview_tabbar_active": "Aktuelle",
- "overview_tabbar_past": "Tidligere",
- "overview_tabbar_cancelled": "Annulleret",
- "no_past_bookings_title": "Ingen tidligere ophold",
- "no_past_bookings_subtitle": "Du har ingen tidligere overnatninger på Comwell Hotels.",
- "no_cancelled_booking_title": "Ingen annullerede ophold",
- "no_cancelled_booking_subtitle": "Du har ingen annullerede overnatninger hos os.",
- "booking_annulled": "Annulleret",
- "no_current_bookings": "Ingen aktuelle bookinger",
- "no_current_bookings_subtitle": "Du har ingen aktuelle bookinger. Planlæg næste ophold på Comwell.",
- "adults": "voksne",
- "children": "børn",
- "adult": "voksen",
- "child": "barn",
- "prepare_room": "Klargør dit værelse",
- "jump_line_text": "Spring køen over med digital check-in",
- "overview_add_booking": "Find booking",
- "open_room": "Åben værelse",
- "hold_phone_to_door": "Hold tæt på læser",
- "open_room_success": "Succes",
- "open_room_error": "Prøv igen!",
- "profile_settings": "Profilindstillinger",
- "profil_settings_firstname": "Fornavn",
- "profil_settings_lastname": "Efternavn",
- "profil_settings_email": "Email",
- "profil_settings_phone": "Telefon",
- "profil_settings_address": "Adresse",
- "profil_settings_birthday": "Fødselsdag",
- "profil_settings_edit_password": "Ret adgangskode",
- "profile_settings_error": "Der skete en fejl. Prøv igen.",
- "delete_profile": "Slet profil",
- "my_booking": "Min booking",
- "booking_reference": "Bookingreference",
- "check_in": "Check-in",
- "check_out": "Check-out",
- "booking_details": "Booking",
- "number_of_guests": "Personer",
- "booker": "Booker",
- "booking_date": "Booking dato",
- "payment": "Betaling",
- "payment_method": "Betalingsmetode",
- "bill": "Kvittering",
- "get_bill": "Hent kvittering",
- "your_last_name": "Dit efternavn",
- "find_booking": "Find booking",
- "choose_hotel": "Vælg hotel",
- "hotels": "Hoteller",
- "all": "Alle",
- "zealand": "Sjælland",
- "funen": "Fyn",
- "jutland": "Jylland",
- "booking_not_found": "Booking blev ikke fundet",
- "booking_not_found_subtitle": "Den booking du leder efter, kunne ikke findes. \nHar du skrevet oplysningerne korrekt?",
- "booking_not_found_button": "Prøv igen",
- "booking_not_found_cancel": "Annuller",
- "save": "Gem",
- "zipCode": "Postnummer",
- "city": "By",
- "country": "Land",
- "delete_profile_title": "Du er ved at slette din profil",
- "delete_profile_description": "Når du sletter din profil, mister du overblik over tidligere ophold samt dine Comwell Club point",
- "delete_profile_button": "Slet profil",
- "delete_profile_cancel": "Annuller",
-
- "check_in_loading_title": "Finder dit værelse...",
- "check_in_room_found_title": "Værelse fundet...",
- "check_in_your_digital_card_title": "Dit Digitale Nøglekort",
- "check_in_your_digital_card_room_prefix": "Værelse",
- "check_in_your_digital_card_subtitle": "Brug din mobiltelefon til at åbne værelset op. Du skal ikke længere checke ind i receptionen.",
- "check_in_your_digital_card_nb": "NB: Ønsker du et fysisk nøglekort, kan du altid gå i receptionen og få det udleveret.",
- "check_in_error_title": "Værelse ikke fundet...",
- "check_in_error_subtitle": "Vi fandt ikke dit værelse. Du bedes henvende dig i receptionen.",
-
- "preregistration_address_title": "Adresse",
- "preregistration_address_subtitle": "Det er lovpligtigt at vi kender adressen på den primære beboer på værelset. Dette er pga. brandsikkerhed",
- "preregistration_address_label_address": "Adresse",
- "preregistration_address_label_postal_code": "Postnummer",
- "preregistration_address_label_city": "By",
- "preregistration_address_label_country": "Land",
- "preregistration_payment_title": "Betalingskort",
- "preregistration_payment_subtitle": "For at kunne overnatte på Comwell, skal vi bruge et betalingskort.",
- "preregistration_payment_add_card": "Tilføj kort",
- "preregistration_confirmation_title": "Registeringsinformation",
- "preregistration_confirmation_profile_card_title": "Profilinformation",
- "preregistration_confirmation_address_card_title": "Adresse",
- "preregistration_confirmation_payment_card_title": "Betalingskort",
- "preregistration_confirmation_extras_card_title_singular": "1 valgt Tilkøb",
- "preregistration_confirmation_extras_card_title_plural": "{} valgte tilkøb",
- "preregistration_confirmation_extras_card_subtitle": "Skrives på din værelsesregning"
+ "generic_continue": "Fortsæt",
+ "generic_information_required": "Dette felt er påkrævet",
+ "generic_confirm": "Bekræft",
+ "generic_done": "Færdig",
+ "welcome_headline": "Velkommen hos Comwell Hotels",
+ "welcome_button": "Fortsæt",
+ "welcome_error": "Der er sket en fejl. Genstart app.",
+ "room_key": "Nøgle",
+ "room_keys": "Nøgler",
+ "redeem_code": "Indløs kode",
+ "error_opening_door": "Der skete en fejl.",
+ "try_again": "Prøv igen",
+ "room_key_description": "Dette er din nøgle til værelset.",
+ "login_button": "Login",
+ "create_user_button": "Opret ny bruger",
+ "profile_settings_profile_menu": "Profilindstillinger",
+ "payment_card_profile_menu": "Betalingskort",
+ "notifications_profile_menu": "Notifikationer",
+ "logout_profile_menu": "Log ud",
+ "logout_dialog_title": "Vil du logge ud af din profil",
+ "cancel": "Annuller",
+ "name_cc_sign": "Navn",
+ "become_cc_member_title": "Bliv medlem af comwell club",
+ "become_cc_member_subtitle": "Bliv medlem og optjen point, hver gang du overnatter på et Comwell Hotel.",
+ "overview_tabbar_active": "Aktuelle",
+ "overview_tabbar_past": "Tidligere",
+ "overview_tabbar_cancelled": "Annulleret",
+ "no_past_bookings_title": "Ingen tidligere ophold",
+ "no_past_bookings_subtitle": "Du har ingen tidligere overnatninger på Comwell Hotels.",
+ "no_cancelled_booking_title": "Ingen annullerede ophold",
+ "no_cancelled_booking_subtitle": "Du har ingen annullerede overnatninger hos os.",
+ "booking_annulled": "Annulleret",
+ "no_current_bookings": "Ingen aktuelle bookinger",
+ "no_current_bookings_subtitle": "Du har ingen aktuelle bookinger. Planlæg næste ophold på Comwell.",
+ "adults": "voksne",
+ "children": "børn",
+ "adult": "voksen",
+ "child": "barn",
+ "prepare_room": "Klargør dit værelse",
+ "jump_line_text": "Spring køen over med digital check-in",
+ "overview_add_booking": "Find booking",
+ "open_room": "Åben værelse",
+ "hold_phone_to_door": "Hold tæt på læser",
+ "open_room_success": "Succes",
+ "open_room_error": "Prøv igen!",
+ "profile_settings": "Profilindstillinger",
+ "profil_settings_firstname": "Fornavn",
+ "profil_settings_lastname": "Efternavn",
+ "profil_settings_email": "Email",
+ "profil_settings_phone": "Telefon",
+ "profil_settings_address": "Adresse",
+ "profil_settings_birthday": "Fødselsdag",
+ "profil_settings_edit_password": "Ret adgangskode",
+ "profile_settings_error": "Der skete en fejl. Prøv igen.",
+ "delete_profile": "Slet profil",
+ "my_booking": "Min booking",
+ "booking_reference": "Bookingreference",
+ "check_in": "Check-in",
+ "check_out": "Check-out",
+ "booking_details": "Booking",
+ "number_of_guests": "Personer",
+ "booker": "Booker",
+ "booking_date": "Booking dato",
+ "payment": "Betaling",
+ "payment_method": "Betalingsmetode",
+ "bill": "Kvittering",
+ "get_bill": "Hent kvittering",
+ "your_last_name": "Dit efternavn",
+ "find_booking": "Find booking",
+ "choose_hotel": "Vælg hotel",
+ "hotels": "Hoteller",
+ "all": "Alle",
+ "zealand": "Sjælland",
+ "funen": "Fyn",
+ "jutland": "Jylland",
+ "booking_not_found": "Booking blev ikke fundet",
+ "booking_not_found_subtitle": "Den booking du leder efter, kunne ikke findes. \nHar du skrevet oplysningerne korrekt?",
+ "booking_not_found_button": "Prøv igen",
+ "booking_not_found_cancel": "Annuller",
+ "save": "Gem",
+ "zipCode": "Postnummer",
+ "city": "By",
+ "country": "Land",
+ "delete_profile_title": "Du er ved at slette din profil",
+ "delete_profile_description": "Når du sletter din profil, mister du overblik over tidligere ophold samt dine Comwell Club point",
+ "delete_profile_button": "Slet profil",
+ "delete_profile_cancel": "Annuller",
+ "check_in_loading_title": "Finder dit værelse...",
+ "check_in_room_found_title": "Værelse fundet...",
+ "check_in_your_digital_card_title": "Dit Digitale Nøglekort",
+ "check_in_your_digital_card_room_prefix": "Værelse",
+ "check_in_your_digital_card_subtitle": "Brug din mobiltelefon til at åbne værelset op. Du skal ikke længere checke ind i receptionen.",
+ "check_in_your_digital_card_nb": "NB: Ønsker du et fysisk nøglekort, kan du altid gå i receptionen og få det udleveret.",
+ "check_in_error_title": "Værelse ikke fundet...",
+ "check_in_error_subtitle": "Vi fandt ikke dit værelse. Du bedes henvende dig i receptionen.",
+ "preregistration_address_title": "Adresse",
+ "preregistration_address_subtitle": "Det er lovpligtigt at vi kender adressen på den primære beboer på værelset. Dette er pga. brandsikkerhed",
+ "preregistration_address_label_address": "Adresse",
+ "preregistration_address_label_postal_code": "Postnummer",
+ "preregistration_address_label_city": "By",
+ "preregistration_address_label_country": "Land",
+ "preregistration_payment_title": "Betalingskort",
+ "preregistration_payment_subtitle": "For at kunne overnatte på Comwell, skal vi bruge et betalingskort.",
+ "preregistration_payment_add_card": "Tilføj kort",
+ "preregistration_confirmation_title": "Registeringsinformation",
+ "preregistration_confirmation_profile_card_title": "Profilinformation",
+ "preregistration_confirmation_address_card_title": "Adresse",
+ "preregistration_confirmation_payment_card_title": "Betalingskort",
+ "preregistration_confirmation_extras_card_title_singular": "1 valgt Tilkøb",
+ "preregistration_confirmation_extras_card_title_plural": "{} valgte tilkøb",
+ "preregistration_confirmation_extras_card_subtitle": "Skrives på din værelsesregning",
+ "housekeeping_page_title": "Housekeeping",
+ "housekeeping_page_subtitle": "Ønsker du ekstra rengøring eller opfyldning på værelset, kan du altid bestille det her - uden omkostninger",
+ "housekeeping_page_button": "Bestil housekeeping",
+ "housekeeping_page_service_title_cleaning": "Rengøring af værelse",
+ "housekeeping_page_service_title_towels": "Friske håndklæder",
+ "housekeeping_page_service_title_refill": "Genopfyldning af kaffe og te",
+ "housekeeping_page_service_title_trash": "Afhentning af skrald",
+ "housekeeping_page_service_title_soap": "Sæbe/shampoo",
+ "housekeeping_page_service_cleaning_subtitle": "Der bliver gjort rent mellem 11 og 14",
+ "housekeeping_page_supplies": "Forsyninger",
+ "home_page_housekeeping_button_title": "Bestil housekeeping",
+ "home_page_housekeeping_button_subtitle": "Dagen før housekeeping ønskes."
}
\ 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 96b8017b..a1c0fbbf 100644
--- a/comwell_key_app/assets/translations/en-US.json
+++ b/comwell_key_app/assets/translations/en-US.json
@@ -1,113 +1,124 @@
{
- "generic_continue": "Continue",
- "generic_information_required": "This information is required",
- "generic_confirm": "Confirm",
- "generic_done": "Done",
- "welcome_headline": "Welcome at Comwell Hotels",
- "welcome_button": "Continue",
- "welcome_error": "An error occurred. Please try again later.",
- "room_key": "Room key",
- "room_keys": "Room keys",
- "redeem_code": "Redeem code",
- "error_opening_door": "An error occurred",
- "try_again": "Try again",
- "room_key_description": "This is your room key",
- "login_button": "Login",
- "create_user_button": "create new user",
- "profile_settings_profile_menu": "Profile settings",
- "payment_card_profile_menu": "Payment card",
- "notifications_profile_menu": "Notifications",
- "logout_profile_menu": "Logout",
- "logout_dialog_title": "Do you want to log out of your profile",
- "cancel": "Cancel",
- "name_cc_sign": "Name",
- "become_cc_member_title": "Join comwell club",
- "become_cc_member_subtitle": "Join and earn points every time you stay at a Comwell Hotel.",
- "overview_tabbar_active": "Actual",
- "overview_tabbar_past": "past",
- "overview_tabbar_cancelled": "Cancelled",
- "no_past_bookings_title": "No past stays",
- "no_past_bookings_subtitle": "You have no past stays at Comwell Hotels.",
- "no_cancelled_booking_title": "No cancelled stays",
- "no_cancelled_booking_subtitle": "You have no cancelled stays with us.",
- "booking_annulled": "Cancelled",
- "no_current_bookings": "No current bookings",
- "no_current_bookings_subtitle": "You have no current bookings. Plan your next stay at Comwell.",
- "adults": "adults",
- "children": "children",
- "adult": "adult",
- "child": "child",
- "prepare_room":"Prepare your room",
- "jump_line_text": "Skip the line with digital check-in",
- "overview_add_booking": "Find booking",
- "open_room": "Åben værelse",
- "hold_phone_to_door": "Hold tæt på læser",
- "open_room_success": "Succes",
- "open_room_error": "Prøv igen!",
- "profile_settings": "Profile settings",
- "profil_settings_firstname": "First name",
- "profil_settings_lastname": "Last name",
- "profil_settings_email": "Email",
- "profil_settings_phone": "Phone",
- "profil_settings_address": "Address",
- "profil_settings_birthday": "Birthday",
- "profil_settings_edit_password": "Edit password",
- "profile_settings_error": "An error occurred. Please try again later.",
- "delete_profile": "Delete profile",
- "my_booking": "My booking",
- "booking_reference": "Bookingreference",
- "check_in": "Check-in",
- "check_out": "Check-out",
- "booking_details": "Booking",
- "number_of_guests": "Personer",
- "booker": "Booker",
- "booking_date": "Booking date",
- "payment": "Payment",
- "payment_method": "Payment method",
- "bill": "Bill",
- "get_bill": "Get bill",
- "your_last_name": "Your last name",
- "find_booking": "Find booking",
- "choose_hotel": "Choose hotel",
- "hotels": "Hotels",
- "all": "All",
- "zealand": "Zealand",
- "funen": "Funen",
- "jutland": "Jutland",
- "booking_not_found": "Booking not found",
- "booking_not_found_subtitle": "We could not find a booking with the information you provided.",
- "booking_not_found_button": "Try again",
- "booking_not_found_cancel": "Cancel",
- "save": "Save",
- "zipCode": "Zip code",
- "city": "City",
- "country": "Country",
- "delete_profile_title": "You are about to delete your profile",
- "delete_profile_description": "Are you sure you want to delete your profile? This action cannot be undone.",
- "delete_profile_button": "Delete profile",
- "delete_profile_cancel": "Cancel",
- "check_in_loading_title": "Finding your room...",
- "check_in_room_found_title": "Room found...",
- "check_in_your_digital_card_title": "Your Digital KeyCard",
- "check_in_your_digital_card_subtitle": "Use your phone to open your room. You do not have to check in at the reception",
- "check_in_your_digital_card_nb": "NB: If you require a physical keycard, you can always get one from the reception",
- "check_in_error_title": "Room not found...",
- "check_in_error_subtitle": "We could not find the room. Please check in at the reception.",
- "preregistration_address_title": "Address",
- "check_in_your_digital_card_room_prefix": "Room",
- "preregistration_address_subtitle": "It is required by law to know your address",
- "preregistration_address_label_address": "Address",
- "preregistration_address_label_postal_code": "Postal code",
- "preregistration_address_label_city": "City",
- "preregistration_address_label_country": "Country",
- "preregistration_payment_title": "Payment methods",
- "preregistration_payment_subtitle": "To stay at Comwell, you need to add a payment method",
- "preregistration_payment_add_card": "Add card",
- "preregistration_confirmation_title": "Registration information",
- "preregistration_confirmation_profile_card_title": "Profile information",
- "preregistration_confirmation_address_card_title": "Address",
- "preregistration_confirmation_payment_card_title": "Payment method",
- "preregistration_confirmation_extras_card_title_singular": "1 extra purchase",
- "preregistration_confirmation_extras_card_title_plural": "{} extra purchases",
- "preregistration_confirmation_extras_card_subtitle": "Will be added to your bill"
+ "generic_continue": "Continue",
+ "generic_information_required": "This information is required",
+ "generic_confirm": "Confirm",
+ "generic_done": "Done",
+ "welcome_headline": "Welcome at Comwell Hotels",
+ "welcome_button": "Continue",
+ "welcome_error": "An error occurred. Please try again later.",
+ "room_key": "Room key",
+ "room_keys": "Room keys",
+ "redeem_code": "Redeem code",
+ "error_opening_door": "An error occurred",
+ "try_again": "Try again",
+ "room_key_description": "This is your room key",
+ "login_button": "Login",
+ "create_user_button": "create new user",
+ "profile_settings_profile_menu": "Profile settings",
+ "payment_card_profile_menu": "Payment card",
+ "notifications_profile_menu": "Notifications",
+ "logout_profile_menu": "Logout",
+ "logout_dialog_title": "Do you want to log out of your profile",
+ "cancel": "Cancel",
+ "name_cc_sign": "Name",
+ "become_cc_member_title": "Join comwell club",
+ "become_cc_member_subtitle": "Join and earn points every time you stay at a Comwell Hotel.",
+ "overview_tabbar_active": "Actual",
+ "overview_tabbar_past": "past",
+ "overview_tabbar_cancelled": "Cancelled",
+ "no_past_bookings_title": "No past stays",
+ "no_past_bookings_subtitle": "You have no past stays at Comwell Hotels.",
+ "no_cancelled_booking_title": "No cancelled stays",
+ "no_cancelled_booking_subtitle": "You have no cancelled stays with us.",
+ "booking_annulled": "Cancelled",
+ "no_current_bookings": "No current bookings",
+ "no_current_bookings_subtitle": "You have no current bookings. Plan your next stay at Comwell.",
+ "adults": "adults",
+ "children": "children",
+ "adult": "adult",
+ "child": "child",
+ "prepare_room": "Prepare your room",
+ "jump_line_text": "Skip the line with digital check-in",
+ "overview_add_booking": "Find booking",
+ "open_room": "Åben værelse",
+ "hold_phone_to_door": "Hold tæt på læser",
+ "open_room_success": "Succes",
+ "open_room_error": "Prøv igen!",
+ "profile_settings": "Profile settings",
+ "profil_settings_firstname": "First name",
+ "profil_settings_lastname": "Last name",
+ "profil_settings_email": "Email",
+ "profil_settings_phone": "Phone",
+ "profil_settings_address": "Address",
+ "profil_settings_birthday": "Birthday",
+ "profil_settings_edit_password": "Edit password",
+ "profile_settings_error": "An error occurred. Please try again later.",
+ "delete_profile": "Delete profile",
+ "my_booking": "My booking",
+ "booking_reference": "Bookingreference",
+ "check_in": "Check-in",
+ "check_out": "Check-out",
+ "booking_details": "Booking",
+ "number_of_guests": "Personer",
+ "booker": "Booker",
+ "booking_date": "Booking date",
+ "payment": "Payment",
+ "payment_method": "Payment method",
+ "bill": "Bill",
+ "get_bill": "Get bill",
+ "your_last_name": "Your last name",
+ "find_booking": "Find booking",
+ "choose_hotel": "Choose hotel",
+ "hotels": "Hotels",
+ "all": "All",
+ "zealand": "Zealand",
+ "funen": "Funen",
+ "jutland": "Jutland",
+ "booking_not_found": "Booking not found",
+ "booking_not_found_subtitle": "We could not find a booking with the information you provided.",
+ "booking_not_found_button": "Try again",
+ "booking_not_found_cancel": "Cancel",
+ "save": "Save",
+ "zipCode": "Zip code",
+ "city": "City",
+ "country": "Country",
+ "delete_profile_title": "You are about to delete your profile",
+ "delete_profile_description": "Are you sure you want to delete your profile? This action cannot be undone.",
+ "delete_profile_button": "Delete profile",
+ "delete_profile_cancel": "Cancel",
+ "check_in_loading_title": "Finding your room...",
+ "check_in_room_found_title": "Room found...",
+ "check_in_your_digital_card_title": "Your Digital KeyCard",
+ "check_in_your_digital_card_subtitle": "Use your phone to open your room. You do not have to check in at the reception",
+ "check_in_your_digital_card_nb": "NB: If you require a physical keycard, you can always get one from the reception",
+ "check_in_error_title": "Room not found...",
+ "check_in_error_subtitle": "We could not find the room. Please check in at the reception.",
+ "preregistration_address_title": "Address",
+ "check_in_your_digital_card_room_prefix": "Room",
+ "preregistration_address_subtitle": "It is required by law to know your address",
+ "preregistration_address_label_address": "Address",
+ "preregistration_address_label_postal_code": "Postal code",
+ "preregistration_address_label_city": "City",
+ "preregistration_address_label_country": "Country",
+ "preregistration_payment_title": "Payment methods",
+ "preregistration_payment_subtitle": "To stay at Comwell, you need to add a payment method",
+ "preregistration_payment_add_card": "Add card",
+ "preregistration_confirmation_title": "Registration information",
+ "preregistration_confirmation_profile_card_title": "Profile information",
+ "preregistration_confirmation_address_card_title": "Address",
+ "preregistration_confirmation_payment_card_title": "Payment method",
+ "preregistration_confirmation_extras_card_title_singular": "1 extra purchase",
+ "preregistration_confirmation_extras_card_title_plural": "{} extra purchases",
+ "preregistration_confirmation_extras_card_subtitle": "Will be added to your bill",
+ "housekeeping_page_title": "Housekeeping",
+ "housekeeping_page_subtitle": "Ønsker du ekstra rengøring eller opfyldning på værelset, kan du altid bestille det her - uden omkostninger",
+ "housekeeping_page_button": "Bestil housekeeping",
+ "housekeeping_page_service_title_cleaning": "Rengøring af værelse",
+ "housekeeping_page_service_title_towels": "Sæbe/shampoo",
+ "housekeeping_page_service_title_refill": "Genopfyldning af kaffe og te",
+ "housekeeping_page_service_title_trash": "Friske håndklæder",
+ "housekeeping_page_service_title_soap": "Afhentning af skrald",
+ "housekeeping_page_service_cleaning_subtitle": "Der bliver gjort rent mellem 11 og 14",
+ "housekeeping_page_supplies": "Forsyninger",
+ "housekeeping_page_cleaning": "Rengøring"
}
\ No newline at end of file
diff --git a/comwell_key_app/lib/home/components/housekeeping_button.dart b/comwell_key_app/lib/home/components/housekeeping_button.dart
new file mode 100644
index 00000000..f2df1599
--- /dev/null
+++ b/comwell_key_app/lib/home/components/housekeeping_button.dart
@@ -0,0 +1,68 @@
+import 'package:easy_localization/easy_localization.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_svg/svg.dart';
+import 'package:go_router/go_router.dart';
+
+import '../../routing/app_routes.dart';
+
+class HousekeepingButton extends StatelessWidget {
+ const HousekeepingButton({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return InkWell(
+ borderRadius: BorderRadius.circular(10),
+ onTap: () {
+ context.pushNamed(AppRoutes.houseKeeping.name);
+ },
+ child: Container(
+ decoration: BoxDecoration(
+ border: Border.all(
+ color: Colors.grey,
+ ),
+ borderRadius: BorderRadius.circular(10),
+ ),
+ child: Padding(
+ padding: const EdgeInsets.all(16.0),
+ child: Row(
+ children: [
+ Container(
+ height: 36,
+ width: 36,
+ decoration: const BoxDecoration(
+ color: Color(0xffF0EAE2),
+ shape: BoxShape.circle,
+ ),
+ child: Padding(
+ padding: const EdgeInsets.all(10.0),
+ child: SvgPicture.asset(
+ "assets/icons/icon_housekeeping_cleaning.svg"),
+ ),
+ ),
+ const SizedBox(width: 12),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ "home_page_housekeeping_button_title".tr(),
+ style: Theme.of(context).textTheme.headlineSmall,
+ maxLines: 1,
+ ),
+ Text(
+ "home_page_housekeeping_button_subtitle".tr(),
+ maxLines: 1,
+ style: Theme.of(context).textTheme.headlineSmall?.copyWith(color: Colors.grey),
+ ),
+ ],
+ ),
+ ),
+ const SizedBox(width: 12),
+ SvgPicture.asset("assets/icons/arrow-left.svg")
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/comwell_key_app/lib/home/home_page.dart b/comwell_key_app/lib/home/home_page.dart
index c7d354a1..59bd99a1 100644
--- a/comwell_key_app/lib/home/home_page.dart
+++ b/comwell_key_app/lib/home/home_page.dart
@@ -1,6 +1,7 @@
import 'package:comwell_key_app/common/components/bottom_sheet_widget.dart';
import 'package:comwell_key_app/common/components/comwell_app_bar.dart';
import 'package:comwell_key_app/home/bloc/home_bloc.dart';
+import 'package:comwell_key_app/home/components/housekeeping_button.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';
@@ -118,7 +119,12 @@ class _HomeWidget extends State<HomeWidget> {
width: double.infinity,
),
const Text('Rooms'),
- const SizedBox(height: 400),
+ const SizedBox(height: 12),
+ const Padding(
+ padding: EdgeInsets.symmetric(horizontal: 16.0),
+ child: HousekeepingButton(),
+ ),
+ const SizedBox(height: 12),
ElevatedButton(
onPressed: () {
context.pushNamed(AppRoutes.preregistration.name);
diff --git a/comwell_key_app/lib/housekeeping/components/housekeeping_service.dart b/comwell_key_app/lib/housekeeping/components/housekeeping_service.dart
new file mode 100644
index 00000000..737322aa
--- /dev/null
+++ b/comwell_key_app/lib/housekeeping/components/housekeeping_service.dart
@@ -0,0 +1,49 @@
+enum HouseKeepingService {
+ cleaning,
+ towels,
+ refill,
+ trash,
+ soap;
+
+ String get titleStringId {
+ switch (this) {
+ case HouseKeepingService.cleaning:
+ return "housekeeping_page_service_title_cleaning";
+ case HouseKeepingService.towels:
+ return "housekeeping_page_service_title_towels";
+ case HouseKeepingService.refill:
+ return "housekeeping_page_service_title_refill";
+ case HouseKeepingService.trash:
+ return "housekeeping_page_service_title_trash";
+ case HouseKeepingService.soap:
+ return "housekeeping_page_service_title_soap";
+ }
+ }
+
+ String get assetId {
+ switch (this) {
+ case HouseKeepingService.cleaning:
+ return "assets/icons/icon_housekeeping_cleaning.svg";
+ case HouseKeepingService.towels:
+ return "assets/icons/icon_housekeeping_towels.svg";
+ case HouseKeepingService.refill:
+ return "assets/icons/icon_housekeeping_coffee.svg";
+ case HouseKeepingService.trash:
+ return "assets/icons/icon_housekeeping_trash.svg";
+ case HouseKeepingService.soap:
+ return "assets/icons/icon_housekeeping_soap.svg";
+ }
+ }
+
+ String get subtitleStringId {
+ switch(this) {
+ case HouseKeepingService.cleaning:
+ return "housekeeping_page_service_cleaning_subtitle";
+ case HouseKeepingService.towels:
+ case HouseKeepingService.refill:
+ case HouseKeepingService.trash:
+ case HouseKeepingService.soap:
+ return "";
+ }
+ }
+}
diff --git a/comwell_key_app/lib/housekeeping/components/selectable_service.dart b/comwell_key_app/lib/housekeeping/components/selectable_service.dart
new file mode 100644
index 00000000..d750d4e9
--- /dev/null
+++ b/comwell_key_app/lib/housekeeping/components/selectable_service.dart
@@ -0,0 +1,92 @@
+import 'package:comwell_key_app/housekeeping/housekeeping_cubit.dart';
+import 'package:easy_localization/easy_localization.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:flutter_svg/svg.dart';
+
+import 'housekeeping_service.dart';
+
+class SelectableService extends StatelessWidget {
+ final HouseKeepingService service;
+
+ const SelectableService({super.key, required this.service});
+
+ @override
+ Widget build(BuildContext context) {
+ final cubit = context.read<HouseKeepingCubit>();
+ final isSelected = cubit.state.selectedServices.contains(service.name);
+ return InkWell(
+ onTap: () {
+ cubit.onServiceClicked(service.name);
+ },
+ borderRadius: const BorderRadius.all(Radius.circular(5)),
+ child: Container(
+ decoration: BoxDecoration(
+ border: Border.all(
+ color: Colors.grey,
+ ),
+ borderRadius: const BorderRadius.all(Radius.circular(5)),
+ ),
+ child: Padding(
+ padding: const EdgeInsets.all(12.0),
+ child: Row(
+ children: [
+ Container(
+ height: 36,
+ width: 36,
+ decoration: const BoxDecoration(
+ color: Color(0xffF0EAE2),
+ shape: BoxShape.circle,
+ ),
+ child: Padding(
+ padding: const EdgeInsets.all(10.0),
+ child: SvgPicture.asset(service.assetId),
+ ),
+ ),
+ const SizedBox(width: 12),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ service.titleStringId.tr(),
+ style: Theme.of(context).textTheme.bodySmall,
+ maxLines: 1,
+ overflow: TextOverflow.clip,
+ ),
+ if (service == HouseKeepingService.cleaning)
+ Text(service.subtitleStringId.tr(),
+ maxLines: 1,
+ style: Theme.of(context)
+ .textTheme
+ .bodySmall
+ ?.copyWith(color: Colors.grey),
+ overflow: TextOverflow.clip),
+ ],
+ ),
+ ),
+ const SizedBox(width: 12),
+ if (isSelected)
+ SvgPicture.asset(
+ "assets/icons/ic_checkmark.svg",
+ height: 24,
+ width: 24,
+ )
+ else
+ Container(
+ height: 24,
+ width: 24,
+ decoration: BoxDecoration(
+ border: Border.all(
+ color: Colors.grey,
+ ),
+ shape: BoxShape.circle,
+ ),
+ )
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/comwell_key_app/lib/housekeeping/housekeeping_cubit.dart b/comwell_key_app/lib/housekeeping/housekeeping_cubit.dart
new file mode 100644
index 00000000..2100dcf1
--- /dev/null
+++ b/comwell_key_app/lib/housekeeping/housekeeping_cubit.dart
@@ -0,0 +1,40 @@
+import 'package:bloc/bloc.dart';
+import 'package:comwell_key_app/housekeeping/housekeeping_state.dart';
+
+import 'components/housekeeping_service.dart';
+
+class HouseKeepingCubit extends Cubit<HouseKeepingState> {
+ HouseKeepingCubit() : super(HouseKeepingState.initial());
+
+ final Iterable<HouseKeepingService> servicesSupplies = [
+ HouseKeepingService.soap,
+ HouseKeepingService.towels,
+ HouseKeepingService.trash,
+ HouseKeepingService.refill
+ ];
+
+ void onAddServiceClicked(String service) {
+ final List<String> updatedServices = List.from(state.selectedServices)
+ ..add(service);
+ emit(state.copyWith(selectedServices: updatedServices));
+ }
+
+ void onRemoveServiceClicked(String service) {
+ final List<String> updatedServices = List.from(state.selectedServices)
+ ..remove(service);
+ emit(state.copyWith(selectedServices: updatedServices));
+ }
+
+ void onServiceClicked(String name) {
+ if (state.selectedServices.contains(name)) {
+ onRemoveServiceClicked(name);
+ } else {
+ onAddServiceClicked(name);
+ }
+ }
+
+ void onOrderHousekeepingClicked() async {
+ await Future.delayed(const Duration(seconds: 2));
+ // TODO upload selected services
+ }
+}
diff --git a/comwell_key_app/lib/housekeeping/housekeeping_page.dart b/comwell_key_app/lib/housekeeping/housekeeping_page.dart
new file mode 100644
index 00000000..4099925a
--- /dev/null
+++ b/comwell_key_app/lib/housekeeping/housekeeping_page.dart
@@ -0,0 +1,98 @@
+import 'package:comwell_key_app/housekeeping/components/housekeeping_service.dart';
+import 'package:comwell_key_app/housekeeping/components/selectable_service.dart';
+import 'package:comwell_key_app/housekeeping/housekeeping_cubit.dart';
+import 'package:comwell_key_app/housekeeping/housekeeping_state.dart';
+import 'package:easy_localization/easy_localization.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+
+import '../common/components/comwell_app_bar.dart';
+
+class HousekeepingPage extends StatelessWidget {
+ const HousekeepingPage({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return BlocProvider(
+ create: (context) => HouseKeepingCubit(),
+ child: BlocBuilder<HouseKeepingCubit, HouseKeepingState>(
+ builder: (context, state) {
+ final cubit = context.read<HouseKeepingCubit>();
+ return Scaffold(
+ backgroundColor: Colors.white,
+ appBar: const ComwellAppBar(),
+ bottomNavigationBar: Builder(builder: (context) {
+ return Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ const Divider(
+ color: Colors.black12,
+ height: 0,
+ ),
+ Row(
+ children: [
+ Expanded(
+ child: Padding(
+ padding: const EdgeInsets.all(16.0),
+ child: ElevatedButton(
+ onPressed: cubit.onOrderHousekeepingClicked,
+ style: const ButtonStyle(
+ backgroundColor:
+ WidgetStatePropertyAll(Color(0xffAA8D65)),
+ foregroundColor:
+ WidgetStatePropertyAll(Colors.white)),
+ child: Padding(
+ padding: const EdgeInsets.symmetric(vertical: 16.0),
+ child: Text("housekeeping_page_button".tr()),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ],
+ );
+ }),
+ body: Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 16.0),
+ child: ListView(
+ children: [
+ const SizedBox(height: 20),
+ Text("housekeeping_page_title".tr(),
+ style: Theme.of(context).textTheme.headlineLarge),
+ const SizedBox(height: 8),
+ Text(
+ "housekeeping_page_subtitle".tr(),
+ style: Theme.of(context).textTheme.bodyMedium,
+ ),
+ const SizedBox(height: 25),
+ Text(
+ "housekeeping_page_cleaning".tr(),
+ style: Theme.of(context).textTheme.headlineMedium,
+ ),
+ const SizedBox(height: 12),
+ SelectableService(
+ key: ValueKey(HouseKeepingService.cleaning.name),
+ service: HouseKeepingService.cleaning,
+ ),
+ const SizedBox(height: 22),
+ Text("housekeeping_page_supplies".tr(),
+ style: Theme.of(context).textTheme.headlineMedium),
+ const SizedBox(height: 12),
+ ...cubit.servicesSupplies.map((service) {
+ return Column(
+ children: [
+ SelectableService(service: service),
+ const SizedBox(height: 12)
+ ],
+ );
+ }),
+ const SizedBox(height: 40)
+ ],
+ ),
+ ),
+ );
+ }),
+ );
+ }
+}
diff --git a/comwell_key_app/lib/housekeeping/housekeeping_state.dart b/comwell_key_app/lib/housekeeping/housekeeping_state.dart
new file mode 100644
index 00000000..92517156
--- /dev/null
+++ b/comwell_key_app/lib/housekeeping/housekeeping_state.dart
@@ -0,0 +1,15 @@
+class HouseKeepingState {
+ final List<String> selectedServices;
+
+ HouseKeepingState({required this.selectedServices});
+
+ HouseKeepingState.initial() : selectedServices = [];
+
+ HouseKeepingState copyWith({
+ List<String>? selectedServices,
+ }) {
+ return HouseKeepingState(
+ selectedServices: selectedServices ?? this.selectedServices,
+ );
+ }
+}
diff --git a/comwell_key_app/lib/pregistration/preregistration_flow.dart b/comwell_key_app/lib/pregistration/preregistration_flow.dart
index 27a5a446..d495a35b 100644
--- a/comwell_key_app/lib/pregistration/preregistration_flow.dart
+++ b/comwell_key_app/lib/pregistration/preregistration_flow.dart
@@ -58,7 +58,7 @@ class _PreregistrationFlowState extends State<PreregistrationFlow> {
leading: BackButton(
color: Colors.black,
onPressed: () {
- if(!cubit.onBackClicked()){
+ if (!cubit.onBackClicked()) {
context.pop();
}
},
diff --git a/comwell_key_app/lib/routing/app_router.dart b/comwell_key_app/lib/routing/app_router.dart
index 1b311b3f..540e6320 100644
--- a/comwell_key_app/lib/routing/app_router.dart
+++ b/comwell_key_app/lib/routing/app_router.dart
@@ -5,6 +5,7 @@ import 'package:comwell_key_app/check_in/check_in_page.dart';
import 'package:comwell_key_app/find_booking/find_booking_page.dart';
import 'package:comwell_key_app/find_booking/loading_page.dart';
import 'package:comwell_key_app/home/home_page.dart';
+import 'package:comwell_key_app/housekeeping/housekeeping_page.dart';
import 'package:comwell_key_app/key/key_page.dart';
import 'package:comwell_key_app/login/login_page.dart';
import 'package:comwell_key_app/overview/models/booking.dart';
@@ -141,7 +142,13 @@ GoRouter goRouter(AuthenticationBloc authBloc) {
builder: (context, state) {
return const PreregistrationFlow();
}),
-
+ GoRoute(
+ path: "/${AppRoutes.houseKeeping.name}",
+ name: AppRoutes.houseKeeping.name,
+ builder: (context, state) {
+ return const HousekeepingPage();
+ },
+ )
/* GoRoute(
path: "/keys",
name: AppRoutes.keys.name,
diff --git a/comwell_key_app/lib/routing/app_routes.dart b/comwell_key_app/lib/routing/app_routes.dart
index 1e36a91d..2e4ff92a 100644
--- a/comwell_key_app/lib/routing/app_routes.dart
+++ b/comwell_key_app/lib/routing/app_routes.dart
@@ -17,4 +17,5 @@ enum AppRoutes {
changePassword,
checkIn,
preregistration,
+ houseKeeping,
}