mirror of
https://github.com/frappe/books.git
synced 2025-01-23 15:18:24 +00:00
[init] dropdown
This commit is contained in:
parent
f4d75f056c
commit
0d4cdb5a74
@ -5,4 +5,4 @@
|
||||
v-on="listeners">
|
||||
<slot></slot>
|
||||
</button>
|
||||
</template>
|
||||
</template>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<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 secondary v-if="showRevert" @click="$emit('revert')">{{ _('Revert') }}</f-button>
|
||||
<f-button secondary @click="$emit('print')">{{ _('Print') }}</f-button>
|
||||
<f-button secondary v-if="showNextAction" @click="$emit('print')">{{ _('Print') }}</f-button>
|
||||
<dropdown class="ml-2" v-if="showNextAction" :label="_('Actions')" :options="links"></dropdown>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -4,8 +4,10 @@
|
||||
|
||||
<div class="button-group">
|
||||
<f-button secondary @click="$emit('view-form')">{{ _('View Form') }}</f-button>
|
||||
<f-button primary @click="$emit('print')">{{ _('Print') }}</f-button>
|
||||
<f-button primary @click="$emit('pdf')">{{ _('PDF') }}</f-button>
|
||||
<f-dropdown></f-dropdown>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<print-actions
|
||||
v-bind:title="name"
|
||||
@view-form="viewForm"
|
||||
@print="print"
|
||||
@pdf="getPDF"
|
||||
></print-actions>
|
||||
<div class="print-container">
|
||||
<div class="print-template" v-html="printTemplate"></div>
|
||||
@ -13,6 +13,7 @@
|
||||
|
||||
<script>
|
||||
import { getHTML } from '../../../common/print.js';
|
||||
import { getPDF as getPDFClient } from '../../../client/pdf.js';
|
||||
import PrintActions from './PrintActions';
|
||||
|
||||
export default {
|
||||
@ -33,6 +34,10 @@ export default {
|
||||
viewForm() {
|
||||
this.$router.push(`/edit/${this.doctype}/${this.name}`);
|
||||
},
|
||||
|
||||
async getPDF() {
|
||||
await getPDFClient(this.doctype, this.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user