From 65099609372546bc5daaa7bc42049229735dfd84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Dierick?= Date: Wed, 3 Mar 2021 21:51:52 +0100 Subject: [PATCH 1/4] feat: add loading state for agenda-item detail routes --- app/pods/agenda/agendaitems/agendaitem/loading/template.hbs | 1 + 1 file changed, 1 insertion(+) create mode 100644 app/pods/agenda/agendaitems/agendaitem/loading/template.hbs diff --git a/app/pods/agenda/agendaitems/agendaitem/loading/template.hbs b/app/pods/agenda/agendaitems/agendaitem/loading/template.hbs new file mode 100644 index 0000000000..def0970933 --- /dev/null +++ b/app/pods/agenda/agendaitems/agendaitem/loading/template.hbs @@ -0,0 +1 @@ + \ No newline at end of file From e50214efcf9014544590f5130a6dcc42f13058c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Dierick?= Date: Wed, 3 Mar 2021 21:53:23 +0100 Subject: [PATCH 2/4] fix: load all piece relationships that current document-card loads In order to avoid half-filled cards and many side-requests --- .../agenda/agendaitems/agendaitem/documents/route.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/pods/agenda/agendaitems/agendaitem/documents/route.js b/app/pods/agenda/agendaitems/agendaitem/documents/route.js index ae56d633ab..3822ed14f9 100644 --- a/app/pods/agenda/agendaitems/agendaitem/documents/route.js +++ b/app/pods/agenda/agendaitems/agendaitem/documents/route.js @@ -9,7 +9,14 @@ export default class DocumentsAgendaitemAgendaitemsAgendaRoute extends Route { let pieces = await this.store.query('piece', { 'filter[agendaitems][:id:]': agendaitem.id, 'page[size]': 500, // TODO add pagination when sorting is done in the backend - include: 'document-container', + include: [ + 'access-level', + 'document-container', + 'document-container.type', + 'document-container.pieces', + 'document-container.pieces.previous-piece', + 'document-container.pieces.next-piece' + ].join(','), }); pieces = pieces.toArray(); From 31f52ee54607e71b58288346fa77e3dc74e9119f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Dierick?= Date: Wed, 3 Mar 2021 21:55:33 +0100 Subject: [PATCH 3/4] chore: bump frontend tag --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dda652804f..18fc22a380 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "frontend-kaleidos", - "version": "0.0.0", + "version": "5.6.5", "private": true, "description": "Small description for frontend-kaleidos goes here", "repository": "", From 3bc6bbaa13dd9a393fa6dda6405724cbd68aadff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Dierick?= Date: Wed, 3 Mar 2021 22:00:09 +0100 Subject: [PATCH 4/4] refactor: remove includes on documents route, card now has own data-load --- .../agenda/agendaitems/agendaitem/documents/route.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/app/pods/agenda/agendaitems/agendaitem/documents/route.js b/app/pods/agenda/agendaitems/agendaitem/documents/route.js index 3822ed14f9..ae56d633ab 100644 --- a/app/pods/agenda/agendaitems/agendaitem/documents/route.js +++ b/app/pods/agenda/agendaitems/agendaitem/documents/route.js @@ -9,14 +9,7 @@ export default class DocumentsAgendaitemAgendaitemsAgendaRoute extends Route { let pieces = await this.store.query('piece', { 'filter[agendaitems][:id:]': agendaitem.id, 'page[size]': 500, // TODO add pagination when sorting is done in the backend - include: [ - 'access-level', - 'document-container', - 'document-container.type', - 'document-container.pieces', - 'document-container.pieces.previous-piece', - 'document-container.pieces.next-piece' - ].join(','), + include: 'document-container', }); pieces = pieces.toArray();