1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-02 20:15:26 +02:00

Complete PDF section type

This commit is contained in:
Harvey Kandola 2019-04-19 11:30:40 +01:00
parent 7fde947a52
commit b5cd378302
8 changed files with 98 additions and 4 deletions

View file

@ -54,6 +54,9 @@ export default Component.extend({
setPDF() {
let files = this.get('attachments');
this.set('pdfName', '');
this.set('pdfOption.fileId', '');
if (!_.isArray(files)) return;
for (let i=0; i < files.length; i++) {
@ -84,7 +87,7 @@ export default Component.extend({
let config = this.get('pdfOption');
let page = this.get('page');
let meta = this.get('meta');
page.set('title', title);
page.set('body', JSON.stringify(config));
meta.set('config', JSON.stringify(config));

View file

@ -51,6 +51,10 @@ export default Component.extend({
let orgId = this.get('appMeta.orgId');
let fileId = this.get('pdfOption.fileId');
if (_.isEmpty(fileId)) {
return;
}
// For authenticated users we send server auth token.
let qry = '';
if (this.get('session.hasSecureToken')) {