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

AuthorNKL<nikolaj.king@gmail.com>
Date2025-07-07 15:06:32 +0200
added fix for firebase tracking params and text fixes

Changed files

comwell_key_app/assets/translations/da-DK.json                    | 2 ++
 comwell_key_app/assets/translations/en-US.json                    | 6 ++++++
 .../lib/booking_details/components/housekeeping_button.dart       | 4 ++--
 comwell_key_app/lib/tracking/trackers/firebase_tracker.dart       | 8 +++++++-
 4 files changed, 17 insertions(+), 3 deletions(-)

Diff

diff --git a/comwell_key_app/assets/translations/da-DK.json b/comwell_key_app/assets/translations/da-DK.json
index 4d4ccc8b..395b6b43 100644
--- a/comwell_key_app/assets/translations/da-DK.json
+++ b/comwell_key_app/assets/translations/da-DK.json
@@ -141,6 +141,8 @@
"housekeeping_page_cleaning": "Rengøring",
"housekeeping_page_service_cleaning_subtitle": "Der bliver gjort rent mellem 11 og 14",
"housekeeping_page_supplies": "Forsyninger",
+ "booking_details_page_housekeeping_button_title_ordered": "Housekeeping bestilt",
+ "booking_details_page_housekeeping_button_subtitle_ordered": "Rengøring kommer mellem kl. 11 og 14",
"booking_details_page_housekeeping_button_title": "Bestil housekeeping",
"booking_details_page_housekeeping_button_subtitle": "Dagen før housekeeping ønskes.",
"booking_details_page_practical_information": "Praktisk information",
diff --git a/comwell_key_app/assets/translations/en-US.json b/comwell_key_app/assets/translations/en-US.json
index 1aadbf57..bb8a0f06 100644
--- a/comwell_key_app/assets/translations/en-US.json
+++ b/comwell_key_app/assets/translations/en-US.json
@@ -139,6 +139,12 @@
"housekeeping_page_service_cleaning_subtitle": "Cleaning is between 11 and 14",
"housekeeping_page_supplies": "Supplies",
"housekeeping_page_cleaning": "Cleaning",
+ "booking_details_page_housekeeping_button_title_ordered": "Cleaning is ordered",
+ "booking_details_page_housekeeping_button_subtitle_ordered": "Cleaning is between 11 and 14",
+ "housekeeping_page_supplies_subtitle_towels": "Soap and shampoo",
+ "housekeeping_page_supplies_subtitle_refill": "Refill coffee and tea",
+ "housekeeping_page_supplies_subtitle_trash": "Fresh towels",
+ "housekeeping_page_supplies_subtitle_soap": "Trash removal",
"booking_details_page_housekeeping_button_title": "Order housekeeping",
"booking_details_page_housekeeping_button_subtitle": "The day before housekeeping is requested.",
"booking_details_page_practical_information": "Practical information",
diff --git a/comwell_key_app/lib/booking_details/components/housekeeping_button.dart b/comwell_key_app/lib/booking_details/components/housekeeping_button.dart
index 3894fdb8..6774207a 100644
--- a/comwell_key_app/lib/booking_details/components/housekeeping_button.dart
+++ b/comwell_key_app/lib/booking_details/components/housekeeping_button.dart
@@ -55,12 +55,12 @@ class HousekeepingButton extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
- "booking_details_page_housekeeping_button_title".tr(),
+ bloc.state.isHouseKeepingOrdered == true ? "booking_details_page_housekeeping_button_title_ordered".tr() : "booking_details_page_housekeeping_button_title".tr(),
style: Theme.of(context).textTheme.headlineSmall,
maxLines: 1,
),
Text(
- "booking_details_page_housekeeping_button_subtitle".tr(),
+ bloc.state.isHouseKeepingOrdered == true ? "booking_details_page_housekeeping_button_subtitle_ordered".tr() : "booking_details_page_housekeeping_button_subtitle".tr(),
maxLines: 1,
softWrap: true,
style: Theme.of(context)
diff --git a/comwell_key_app/lib/tracking/trackers/firebase_tracker.dart b/comwell_key_app/lib/tracking/trackers/firebase_tracker.dart
index c73e2740..ff4524c4 100644
--- a/comwell_key_app/lib/tracking/trackers/firebase_tracker.dart
+++ b/comwell_key_app/lib/tracking/trackers/firebase_tracker.dart
@@ -29,9 +29,15 @@ class FirebaseTracker {
void _track(String name, Map<String, dynamic>? parameters) async {
try {
+ final safeParams = parameters?.map((k, v) {
+ if (v is List) {
+ return MapEntry(k, v.join(','));
+ }
+ return MapEntry(k, v as Object);
+ }) ?? <String, Object>{};
await _tracking.logEvent(
name: name,
- parameters: (parameters as Map<String, Object>?) ?? <String, Object>{},
+ parameters: safeParams,
);
} catch (e, st) {
if (kDebugMode) print("err=$e, $st");