mirror of
https://github.com/frappe/books.git
synced 2025-01-28 01:28:28 +00:00
Show Print only if doc is submitted and has printFormat
This commit is contained in:
parent
cb731ba45f
commit
9fd9452d27
@ -5,7 +5,7 @@
|
|||||||
<f-button primary v-if="showSave" :disabled="disableSave" @click="$emit('save')">{{ _('Save') }}</f-button>
|
<f-button primary v-if="showSave" :disabled="disableSave" @click="$emit('save')">{{ _('Save') }}</f-button>
|
||||||
<f-button primary v-if="showSubmit" @click="$emit('submit')">{{ _('Submit') }}</f-button>
|
<f-button primary v-if="showSubmit" @click="$emit('submit')">{{ _('Submit') }}</f-button>
|
||||||
<f-button secondary v-if="showRevert" @click="$emit('revert')">{{ _('Revert') }}</f-button>
|
<f-button secondary v-if="showRevert" @click="$emit('revert')">{{ _('Revert') }}</f-button>
|
||||||
<div class="ml-2">
|
<div class="ml-2" v-if="showPrint">
|
||||||
<f-button secondary v-if="showNextAction" @click="$emit('print')">{{ _('Print') }}</f-button>
|
<f-button secondary v-if="showNextAction" @click="$emit('print')">{{ _('Print') }}</f-button>
|
||||||
</div>
|
</div>
|
||||||
<dropdown class="ml-2" v-if="showNextAction" :label="_('Actions')" :options="links"></dropdown>
|
<dropdown class="ml-2" v-if="showNextAction" :label="_('Actions')" :options="links"></dropdown>
|
||||||
@ -29,6 +29,7 @@ export default {
|
|||||||
showSubmit: false,
|
showSubmit: false,
|
||||||
showRevert: false,
|
showRevert: false,
|
||||||
showNextAction: false,
|
showNextAction: false,
|
||||||
|
showPrint: false,
|
||||||
disableSave: false
|
disableSave: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -60,6 +61,10 @@ export default {
|
|||||||
!this.doc._notInserted
|
!this.doc._notInserted
|
||||||
&& this.links.length;
|
&& this.links.length;
|
||||||
|
|
||||||
|
this.showPrint =
|
||||||
|
this.doc.submitted === 1
|
||||||
|
&& this.meta.print
|
||||||
|
|
||||||
this.showSave =
|
this.showSave =
|
||||||
this.doc._notInserted ?
|
this.doc._notInserted ?
|
||||||
true :
|
true :
|
||||||
|
Loading…
x
Reference in New Issue
Block a user