From 85495f55e8b55ec55c7fb7dcbdb17b1bb8d4d8d0 Mon Sep 17 00:00:00 2001 From: itskovacs Date: Wed, 15 Oct 2025 23:39:58 +0200 Subject: [PATCH] :sparkles: Trip: attachments, archived QoL, empty lists placeholders --- .../app/components/trip/trip.component.html | 148 +++++++--- src/src/app/components/trip/trip.component.ts | 270 ++++++++++++------ 2 files changed, 280 insertions(+), 138 deletions(-) diff --git a/src/src/app/components/trip/trip.component.html b/src/src/app/components/trip/trip.component.html index ae3514d..aa0b094 100644 --- a/src/src/app/components/trip/trip.component.html +++ b/src/src/app/components/trip/trip.component.html @@ -1,5 +1,5 @@
-
+
@@ -10,45 +10,42 @@ trip?.days?.length }} {{ trip?.days!.length > 1 ? 'days' : 'day'}} {{ + class="bg-gray-100 text-gray-800 text-xs font-medium px-2.5 py-0.5 rounded min-w-fit dark:bg-gray-400">{{ (totalPrice | number:'1.0-2') || '-' }} {{ trip?.currency }}
- @if (trip?.archived) { -
-
This Trip is archived, you cannot modify it.
-
- @if (trip?.archival_review) { - - } - -
-
- } -
- @if (!trip?.archived) {
- +
- }
+ @if (trip?.archived) { +
+
This Trip is archived, you cannot modify it.
+
+ @if (trip?.archival_review) { + + } + +
+
@if (isArchivalReviewDisplayed) {
{{ trip?.archival_review }}
} + }
@@ -320,8 +317,8 @@

Place

{{ selectedItem.place.name }}
-
+
} @@ -395,8 +392,8 @@ @@ -414,7 +411,7 @@ - @if (!collapsedTripPlaces) { + @if (!isCollapsedTripPlaces) {
@defer { @for (p of places; track p.id) { @@ -475,15 +472,15 @@
- @if (!collapsedTripDays) { + @if (!isCollapsedTripDays) {
@defer { @for (d of trip?.days; track d.id) { @@ -568,9 +565,9 @@
} - - @if (shareDialogVisible) { + @if (isShareDialogVisible) { @if (trip?.shared) {
@@ -596,10 +593,10 @@ + [(visible)]="isPackingDialogVisible" styleClass="w-[95%] md:w-[70%] lg:w-[50%]">
- +
@@ -621,39 +618,52 @@
- +
} + } @empty { +
+ +

No item

+
}
+ [(visible)]="isChecklistDialogVisible" styleClass="w-[95%] md:w-[50%] lg:w-[30%]">
- +
@for (item of checklistItems; track item.id) { -
+
@@ -685,16 +695,21 @@
+ } @empty { +
+ +

No item

+
}
+ [(visible)]="isMembersDialogVisible" styleClass="w-[95%] md:w-[40%] lg:w-[30%]">
- +
@@ -738,7 +753,8 @@ m.balance || '-' }} {{ trip?.currency }} @if (m.invited_at) { - + }
@@ -747,6 +763,52 @@
+ +
+
+ + +
+ +
+ @for (attachment of trip?.attachments; track attachment.id) { +
+
+ + +
+ +
+
{{ attachment.filename }}
+
+ {{ attachment.file_size | fileSize }} + {{ + attachment.uploaded_by }} +
+
+ +
+ +
+
+ } @empty { +
+ +

No attachments

+
+ } +
+
+
+ @if (isPrinting) {