Always show complete package list, even with unready items
This commit is contained in:
@@ -257,7 +257,7 @@ impl TripPackageListCategoryBlockUnready {
|
||||
."flex"
|
||||
."flex-col"
|
||||
{
|
||||
@for item in category.items.as_ref().unwrap().iter().filter(|item| item.picked) {
|
||||
@for item in category.items.as_ref().unwrap().iter().filter(|item| item.picked && !item.ready) {
|
||||
(TripPackageListRowUnready::build(trip.id, item))
|
||||
}
|
||||
}
|
||||
@@ -329,11 +329,19 @@ impl TripPackageList {
|
||||
."gap-5"
|
||||
{
|
||||
@for category in trip.categories() {
|
||||
@let empty = !category
|
||||
.items
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.iter()
|
||||
.any(|item| item.picked);
|
||||
@if !empty {
|
||||
(TripPackageListCategoryBlockUnready::build(trip, category))
|
||||
}
|
||||
}
|
||||
} @else {
|
||||
p { "All items are ready, pack the following things:" }
|
||||
}
|
||||
}
|
||||
p { "Pack the following things:" }
|
||||
div
|
||||
."columns-3"
|
||||
."gap-5"
|
||||
@@ -343,7 +351,6 @@ impl TripPackageList {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user