mirror of
https://github.com/documize/community.git
synced 2025-07-22 14:49:42 +02:00
[WIP] PDF viewer section & per section attachments
This commit is contained in:
parent
c0ed3c3d04
commit
166aeba09b
428 changed files with 45874 additions and 802 deletions
|
@ -397,6 +397,7 @@ export default Service.extend({
|
|||
folder: {},
|
||||
links: [],
|
||||
versions: [],
|
||||
attachments: [],
|
||||
};
|
||||
|
||||
let doc = this.get('store').normalize('document', response.document);
|
||||
|
@ -414,6 +415,11 @@ export default Service.extend({
|
|||
return this.get('store').push(data);
|
||||
});
|
||||
|
||||
let attachments = response.attachments.map((obj) => {
|
||||
let data = this.get('store').normalize('attachment', obj);
|
||||
return this.get('store').push(data);
|
||||
});
|
||||
|
||||
data.document = doc;
|
||||
data.permissions = perms;
|
||||
data.roles = roles;
|
||||
|
@ -421,6 +427,7 @@ export default Service.extend({
|
|||
data.folder = folders.findBy('id', doc.get('spaceId'));
|
||||
data.links = response.links;
|
||||
data.versions = response.versions;
|
||||
data.attachments = attachments;
|
||||
|
||||
return data;
|
||||
}).catch((error) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue