Add global back button
This commit is contained in:
@@ -3,77 +3,79 @@ import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
ColumnLayout {
|
||||
property bool onSubPage: false
|
||||
|
||||
height: parent.height
|
||||
spacing: 0
|
||||
z: 3
|
||||
|
||||
Component.onCompleted: {
|
||||
onSubPage = Qt.binding(() => contentStack.depth > 1);
|
||||
}
|
||||
|
||||
anchors {
|
||||
left: parent.left
|
||||
top: parent.top
|
||||
}
|
||||
ButtonGroup {
|
||||
id: buttonBar
|
||||
id: mainNav
|
||||
|
||||
}
|
||||
BarButton {
|
||||
id: dashBoard
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
ButtonGroup.group: mainNav
|
||||
icon.source: "qrc:/images/Square3Stack3D-Outline.svg"
|
||||
text: qsTr("Dashboard")
|
||||
target: "/Gui/Dashboard.qml"
|
||||
text: qsTr("Dashboard")
|
||||
visible: !onSubPage
|
||||
}
|
||||
BarButton {
|
||||
id: kunden
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
ButtonGroup.group: mainNav
|
||||
icon.source: "qrc:/images/UserGroup-Outline.svg"
|
||||
text: qsTr("Kunden")
|
||||
target: "/Gui/CustomersTable.qml"
|
||||
text: qsTr("Kunden")
|
||||
visible: !onSubPage
|
||||
}
|
||||
BarButton {
|
||||
id: objekt
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
ButtonGroup.group: mainNav
|
||||
icon.source: "qrc:/images/BuildingOffice2-Outline.svg"
|
||||
text: qsTr("Objekt")
|
||||
target: "/Gui/ObjectsTable.qml"
|
||||
text: qsTr("Objekt")
|
||||
visible: !onSubPage
|
||||
}
|
||||
BarButton {
|
||||
id: mitarbeiter
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
ButtonGroup.group: mainNav
|
||||
icon.source: "qrc:/images/Identification-Outline.svg"
|
||||
text: qsTr("Mitarbeiter")
|
||||
target: "/Gui/Employees/EmployeesTable.qml"
|
||||
text: qsTr("Mitarbeiter")
|
||||
visible: !onSubPage
|
||||
}
|
||||
BarButton {
|
||||
id: offers
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
ButtonGroup.group: mainNav
|
||||
icon.source: "qrc:/images/RectangleStack-Outline.svg"
|
||||
text: qsTr("Angebote")
|
||||
target: "/Gui/OffersTable.qml"
|
||||
text: qsTr("Angebote")
|
||||
visible: !onSubPage
|
||||
}
|
||||
BarButton {
|
||||
id: abrechnung
|
||||
|
||||
ButtonGroup.group: buttonBar
|
||||
ButtonGroup.group: mainNav
|
||||
icon.source: "qrc:/images/Wallet-Outline.svg"
|
||||
text: qsTr("Abrechnung")
|
||||
visible: !onSubPage
|
||||
}
|
||||
BarButton {
|
||||
icon.source: "qrc:/images/ArrowLeftCircle-Outline.svg"
|
||||
text: qsTr("Zurück")
|
||||
visible: onSubPage
|
||||
checkable: false
|
||||
|
||||
onClicked: contentStack.pop();
|
||||
}
|
||||
Item {
|
||||
id: hspacer
|
||||
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
BarButton {
|
||||
id: atajos
|
||||
|
||||
Layout.bottomMargin: Dimensions.s
|
||||
checkable: false
|
||||
flat: true
|
||||
icon.source: "qrc:/images/Bars3.svg"
|
||||
implicitHeight: 90
|
||||
implicitWidth: 90
|
||||
|
||||
onClicked: mainMenu.open()
|
||||
|
||||
@@ -87,6 +89,7 @@ ColumnLayout {
|
||||
// TODO: Check if logged-in user is admin first!!
|
||||
|
||||
contentStack.push("PyqcrmConf.qml");
|
||||
|
||||
}
|
||||
}
|
||||
MenuSeparator {
|
||||
|
||||
Reference in New Issue
Block a user