Commit 7713666a authored by Volker Krause's avatar Volker Krause

Add details page for restaurant reservations

parent aaab5db2
......@@ -65,6 +65,7 @@ qml_lint(
PkPassPage.qml
PlaceDelegate.qml
RestaurantDelegate.qml
RestaurantPage.qml
TicketTokenDelegate.qml
TimelineDelegate.qml
TimelinePage.qml
......
......@@ -61,16 +61,14 @@ App.TimelineDelegate {
place: reservation.reservationFor
Layout.fillWidth: true
}
QQC2.Label {
text: qsTr("Person: %1")
.arg(reservation.partySize)
color: Kirigami.Theme.textColor
}
QQC2.Label {
text: qsTr("End: %1")
.arg(Localizer.formatTime(reservation, "endTime"))
color: Kirigami.Theme.textColor
Component {
id: detailsComponent
App.RestaurantPage {
reservation: root.reservation
}
}
}
onClicked: applicationWindow().pageStack.push(detailsComponent);
}
/*
Copyright (C) 2018 Volker Krause <vkrause@kde.org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.5
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.1 as QQC2
import org.kde.kirigami 2.0 as Kirigami
import org.kde.kitinerary 1.0
import org.kde.itinerary 1.0
import "." as App
App.DetailsPage {
id: root
title: qsTr("Restaurant Reservation")
GridLayout {
id: grid
width: root.width
columns: 2
QQC2.Label {
Layout.columnSpan: 2
Layout.fillWidth: true
text: reservation.reservationFor.name
horizontalAlignment: Qt.AlignHCenter
font.bold: true
}
App.PlaceDelegate {
Layout.columnSpan: 2
Layout.fillWidth: true
place: reservation.reservationFor
}
// TODO make these interactive
QQC2.Label {
text: qsTr("Telephone:")
}
QQC2.Label {
text: reservation.reservationFor.telephone
}
QQC2.Label {
text: qsTr("Email:")
}
QQC2.Label {
text: reservation.reservationFor.email
}
QQC2.Label {
text: qsTr("Start time:")
}
QQC2.Label {
text: Localizer.formatDateTime(reservation, "startTime")
}
QQC2.Label {
text: qsTr("End time:")
}
QQC2.Label {
text: Localizer.formatDateTime(reservation, "endTime")
}
QQC2.Label {
text: qsTr("Party size:")
}
QQC2.Label {
text: reservation.partySize
}
QQC2.Label {
text: qsTr("Booking reference:")
}
QQC2.Label {
text: reservation.reservationNumber
}
QQC2.Label {
text: qsTr("Under name:")
}
QQC2.Label {
text: reservation.underName.name
}
}
}
......@@ -12,6 +12,7 @@
<file>PkPassPage.qml</file>
<file>PlaceDelegate.qml</file>
<file>RestaurantDelegate.qml</file>
<file>RestaurantPage.qml</file>
<file>TicketTokenDelegate.qml</file>
<file>TimelineDelegate.qml</file>
<file>TimelinePage.qml</file>
......
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