Rearrange UI so messages are per-vehicle.
This commit is contained in:
@@ -71,17 +71,6 @@ Kirigami.ApplicationWindow {
|
||||
}
|
||||
}
|
||||
}
|
||||
Layouts.ColumnLayout {
|
||||
anchors.fill: parent
|
||||
Kirigami.InlineMessage { //TODO:connect to code to detect car alerts.
|
||||
Layouts.Layout.fillWidth: true
|
||||
Layouts.Layout.leftMargin: 10
|
||||
Layouts.Layout.rightMargin: 10
|
||||
z: 9997
|
||||
type: Kirigami.MessageType.Information
|
||||
id: infoMessage
|
||||
showCloseButton: true
|
||||
}
|
||||
Kirigami.CardsListView {
|
||||
anchors.fill: parent
|
||||
id: vehicleView
|
||||
@@ -157,7 +146,6 @@ Kirigami.ApplicationWindow {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Kirigami.PageRoute {
|
||||
name: "about"
|
||||
@@ -284,6 +272,20 @@ Kirigami.ApplicationWindow {
|
||||
router.pushRoute({"route": "addrecord", "data": serviceId});
|
||||
}
|
||||
}
|
||||
Layouts.ColumnLayout {
|
||||
anchors.fill: parent
|
||||
Kirigami.InlineMessage {
|
||||
Layouts.Layout.fillWidth: true
|
||||
Layouts.Layout.leftMargin: 10
|
||||
Layouts.Layout.rightMargin: 10
|
||||
z: 9997
|
||||
type: Kirigami.MessageType.Information
|
||||
id: oilMessage
|
||||
showCloseButton: false
|
||||
Component.onCompleted: {
|
||||
//TODO: check if oil change is needed.
|
||||
}
|
||||
}
|
||||
ListView {
|
||||
id: serviceView
|
||||
model: recordModel
|
||||
@@ -328,6 +330,7 @@ Kirigami.ApplicationWindow {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Kirigami.PageRoute {
|
||||
name: "addrecord"
|
||||
@@ -431,6 +434,7 @@ Kirigami.ApplicationWindow {
|
||||
}
|
||||
if(milesField.acceptableInput) {
|
||||
recordModel.addNewRecord(providerField.text, typeField.currentValue, typeText, dateObj.toISOString(), parseInt(milesField.text), notesField.text);
|
||||
//TODO: check if emit signal to car warnings.
|
||||
router.popRoute();
|
||||
} else {
|
||||
formError.text = qsTr("Invalid number of miles.");
|
||||
|
||||
Reference in New Issue
Block a user