qml InvoiceDialog: remove delete button, it only makes sense if you visit the list
This commit is contained in:
@@ -387,24 +387,12 @@ ElDialog {
|
|||||||
ButtonContainer {
|
ButtonContainer {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
FlatButton {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.preferredWidth: 1
|
|
||||||
text: qsTr('Delete')
|
|
||||||
icon.source: '../../icons/delete.png'
|
|
||||||
visible: invoice_key != ''
|
|
||||||
onClicked: {
|
|
||||||
invoice.wallet.delete_invoice(invoice_key)
|
|
||||||
dialog.close()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
FlatButton {
|
FlatButton {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: 1
|
Layout.preferredWidth: 1
|
||||||
text: qsTr('Save')
|
text: qsTr('Save')
|
||||||
icon.source: '../../icons/save.png'
|
icon.source: '../../icons/save.png'
|
||||||
visible: invoice_key == ''
|
enabled: invoice_key == '' && invoice.canSave
|
||||||
enabled: invoice.canSave
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
app.stack.push(Qt.resolvedUrl('Invoices.qml'))
|
app.stack.push(Qt.resolvedUrl('Invoices.qml'))
|
||||||
if (invoice.amount.isEmpty) {
|
if (invoice.amount.isEmpty) {
|
||||||
|
|||||||
Reference in New Issue
Block a user