Commit 9e1db0c2 authored by Volker Krause's avatar Volker Krause
Browse files

Hide the booking section for train and bus reservations when empty

Happens when we add from a journey query rather than import a booking
document.
parent d51fa5f7
......@@ -142,14 +142,19 @@ App.DetailsPage {
Kirigami.Separator {
Kirigami.FormData.label: i18n("Booking")
Kirigami.FormData.isSection: true
visible: referenceLabel.visible || underNameLabel.visible
}
QQC2.Label {
id: referenceLabel
Kirigami.FormData.label: i18n("Reference:")
text: reservation.reservationNumber
visible: reservation.reservationNumber
}
QQC2.Label {
id: underNameLabel
Kirigami.FormData.label: i18n("Under name:")
text: reservation.underName.name
visible: reservation.underName.name !== ""
}
}
}
......
......@@ -286,14 +286,19 @@ App.DetailsPage {
Kirigami.Separator {
Kirigami.FormData.label: i18n("Booking")
Kirigami.FormData.isSection: true
visible: referenceLabel.visible || underNameLabel.visible
}
QQC2.Label {
id: referenceLabel
Kirigami.FormData.label: i18n("Reference:")
text: reservation.reservationNumber
visible: reservation.reservationNumber
}
QQC2.Label {
id: underNameLabel
Kirigami.FormData.label: i18n("Under name:")
text: reservation.underName.name
visible: reservation.underName.name !== ""
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment