Rests view was added
This commit is contained in:
@@ -12,6 +12,7 @@ Page {
|
||||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 10
|
||||
|
||||
ListView {
|
||||
id: productsList
|
||||
|
||||
43
qml/Views/RestsView.qml
Normal file
43
qml/Views/RestsView.qml
Normal file
@@ -0,0 +1,43 @@
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
|
||||
import ru.ded.beerlog 1.0
|
||||
|
||||
Page {
|
||||
|
||||
title: qsTr("Rests")
|
||||
|
||||
RestsViewModel {
|
||||
id: restsModel
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: restsList
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: 10
|
||||
|
||||
model: restsModel.products
|
||||
|
||||
delegate: ItemDelegate {
|
||||
width: restsList.width
|
||||
|
||||
text: modelData.title
|
||||
|
||||
TextField {
|
||||
anchors.right: parent.right
|
||||
|
||||
validator: DoubleValidator {
|
||||
bottom: 0.0
|
||||
top: 1000.0
|
||||
}
|
||||
|
||||
height: parent.height
|
||||
|
||||
text: modelData.rest
|
||||
|
||||
onEditingFinished: restsModel.setProductRest(modelData.productId, text)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user