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