diff --git a/app/config/publications/overview-table-columns.js b/app/config/publications/overview-table-columns.js
index 7167dcc9df..207ac404ad 100644
--- a/app/config/publications/overview-table-columns.js
+++ b/app/config/publications/overview-table-columns.js
@@ -2,104 +2,130 @@ export default [
{
keyName: 'caseName',
translationKey: 'publications-table-case-name',
+ translationKeySmall: 'publications-table-case-name-small',
+ sortable: true,
showByDefault: true,
},
{
- keyName: 'publicationNumber',
- translationKey: 'publications-table-publication-number',
+ keyName: 'comment',
+ translationKey: 'publications-table-comment',
+ translationKeySmall: 'publications-table-comment-small',
showByDefault: true,
sortable: true,
},
{
- keyName: 'numacNumber',
- translationKey: 'publications-table-numacnummer-bs',
+ keyName: 'speedProcedure',
+ translationKey: 'publications-table-speed-procedure',
+ translationKeySmall: 'publications-table-speed-procedure-small',
+ sortable: true,
+ showByDefault: true,
+ },
+ {
+ keyName: 'decisionDate',
+ translationKey: 'publications-decision-date',
+ translationKeySmall: 'publications-decision-date-small',
+ sortable: true,
showByDefault: true,
},
+ {
+ keyName: 'publicationNumber',
+ translationKey: 'publications-table-publication-number',
+ translationKeySmall: 'publications-table-publication-number-small',
+ showByDefault: true,
+ sortable: true,
+ },
{
keyName: 'regulationType',
translationKey: 'publications-table-regulation-type',
+ translationKeySmall: 'publications-table-regulation-type-small',
showByDefault: true,
sortable: true,
},
{
- keyName: 'meetingDate',
- translationKey: 'publications-table-on-meeting',
+ keyName: 'numacNumber',
+ translationKey: 'publications-table-numacnummer-bs',
+ translationKeySmall: 'publications-table-numacnummer-bs-small',
showByDefault: true,
+ sortable: true,
},
{
keyName: 'requestedPublicationDate',
translationKey: 'publications-table-requested-publication-date',
+ translationKeySmall: 'publications-table-requested-publication-date-small',
showByDefault: true,
sortable: true,
},
{
- keyName: 'finalPublicationDate',
- translationKey: 'publications-table-final-publication-date',
+ keyName: 'requestedTranslationDate',
+ translationKey: 'publications-table-requested-translation',
+ translationKeySmall: 'publications-table-requested-translation-small',
showByDefault: true,
sortable: true,
},
{
keyName: 'publicationDate',
translationKey: 'publications-table-publication-date',
+ translationKeySmall: 'publications-table-publication-date-small',
showByDefault: true,
sortable: true,
},
{
- keyName: 'caseManager',
- translationKey: 'publications-table-case-manager',
+ keyName: 'translateRequests',
+ translationKey: 'publications-table-translate-requests',
+ translationKeySmall: 'publications-table-translate-requests-small',
showByDefault: true,
+ sortable: true,
+ },
+ {
+ keyName: 'publishPreviewRequests',
+ translationKey: 'publications-table-publish-preview-requests',
+ translationKeySmall: 'publications-table-publish-preview-requests-small',
+ showByDefault: true,
+ sortable: true,
},
{
keyName: 'lastEdited',
translationKey: 'publications-table-last-edited',
+ translationKeySmall: 'publications-table-last-edited-small',
showByDefault: true,
sortable: true,
},
{
keyName: 'lastEditedBy',
translationKey: 'publications-table-last-edited-by',
- showByDefault: true,
- },
- {
- keyName: 'withdrawnDate',
- translationKey: 'publications-table-withdrawn-date',
+ translationKeySmall: 'publications-table-last-edited-by-small',
showByDefault: true,
sortable: true,
},
+
{
- keyName: 'pauseDate',
- translationKey: 'publications-table-pause-date',
+ keyName: 'previewTranslator',
+ translationKey: 'publications-table-preview-translator',
+ translationKeySmall: 'publications-table-preview-translator-small',
showByDefault: true,
sortable: true,
},
{
- keyName: 'translateRequests',
- translationKey: 'publications-table-translate-requests',
- showByDefault: true,
- },
- {
- keyName: 'signRequests',
- translationKey: 'publications-table-sign-requests',
- showByDefault: true,
- },
- {
- keyName: 'publishPreviewRequests',
- translationKey: 'publications-table-publish-preview-requests',
- showByDefault: true,
- },
- {
- keyName: 'speedProcedure',
- translationKey: 'publications-table-speed-procedure',
+ keyName: 'status',
+ translationKey: 'publications-table-status',
+ translationKeySmall: 'publications-table-status-small',
showByDefault: true,
+ sortable: true,
},
{
- keyName: 'comment',
- translationKey: 'publications-table-comment',
+ keyName: 'source',
+ translationKey: 'publications-table-source',
+ translationKeySmall: 'publications-table-source-small',
showByDefault: true,
+ sortable: true,
},
{
- keyName: 'fromDesignAgenda',
- translationKey: 'publications-table-from-designagenda',
+ keyName: 'signStatus',
+ translationKey: 'publications-table-sign-status',
+ translationKeySmall: 'publications-table-sign-status-small',
showByDefault: true,
+ sortable: true,
}
+
+
];
diff --git a/app/pods/publications/index/controller.js b/app/pods/publications/index/controller.js
index 7283113c34..20abbfa288 100644
--- a/app/pods/publications/index/controller.js
+++ b/app/pods/publications/index/controller.js
@@ -23,9 +23,9 @@ export default class PublicationsIndexController extends Controller {
@service publicationService;
page = 0;
- size = 25;
+ size = 10;
sort = '-created';
- sizeOptions = Object.freeze([5, 10, 25, 50, 100, 200]);
+ sizeOptions = [10, 25, 50, 100, 200];
urgencyLevels = CONFIG.URGENCY_LEVELS;
@tracked tableColumnDisplayOptions = JSON.parse(localStorage.getItem('tableColumnDisplayOptions'))
@@ -149,4 +149,21 @@ export default class PublicationsIndexController extends Controller {
await publicationFlow.save();
return publicationFlow;
}
+
+ @action
+ prevPage() {
+ if (this.page > 0) {
+ this.set('page', this.page - 1);
+ }
+ }
+
+ @action
+ nextPage() {
+ this.set('page', this.page + 1);
+ }
+
+ @action
+ setSizeOption(size) {
+ this.set('size', size);
+ }
}
diff --git a/app/pods/publications/index/route.js b/app/pods/publications/index/route.js
index d6c5328a79..f62125e70a 100644
--- a/app/pods/publications/index/route.js
+++ b/app/pods/publications/index/route.js
@@ -34,7 +34,10 @@ export default class PublicationsIndexRoute extends Route {
async model(params) {
const statusIds = [];
let ministerFilter = {};
-
+ let apiSort;
+ const filter = {
+ ':has:case': 'yes',
+ };
for (const statusFilter of Object.keys(this.statusFilters)) {
if (this.publicationFilter[statusFilter]) {
const status = await this.store.findRecordByUri('publication-status', this.statusFilters[statusFilter]);
@@ -54,22 +57,14 @@ export default class PublicationsIndexRoute extends Route {
};
}
}
-
- const filter = {
- ':has:case': 'yes',
- };
-
if (ministerFilter) {
filter.case = ministerFilter;
}
-
if (statusIds.length > 0) {
filter.status = {
':id:': statusIds.join(','),
};
}
-
- let apiSort;
let qpSort = params.sort;
let descending;
if (qpSort) {
@@ -99,7 +94,6 @@ export default class PublicationsIndexRoute extends Route {
apiSort = `-${apiSort}`;
}
}
-
return this.store.query('publication-flow', {
filter: filter,
sort: apiSort,
diff --git a/app/pods/publications/index/template.hbs b/app/pods/publications/index/template.hbs
index c0e296e353..5ba2c2e737 100644
--- a/app/pods/publications/index/template.hbs
+++ b/app/pods/publications/index/template.hbs
@@ -10,7 +10,7 @@
- {{t column.translationKey}} - | - {{else}} - {{#if column.sortable}} -{{t column.translationKey}} | + {{#if (eq column.keyName "caseName")}} +{{t column.translationKeySmall}} | + {{/if}} + {{/if}} {{/if}} - {{/if}} - {{/if}} - {{/each}} -- - | - -
- {{#if row.case.shortTitle}}
- |
- {{/if}}
- {{#if this.tableColumnDisplayOptions.publicationNumber}}
- - {{#if row.identification.idName}} - {{row.identification.idName}} - {{else}} - {{t "dash"}} - {{/if}} - | - {{/if}} - {{#if this.tableColumnDisplayOptions.numacNumber}} -
- {{#each row.numacNumbers as |numac|}}
- |
- {{/if}}
- {{#if this.tableColumnDisplayOptions.regulationType}}
- - {{#if row.regulationType}} - {{row.regulationType.label}} - {{else}} - {{t "dash"}} - {{/if}} - | - {{/if}} - {{#if this.tableColumnDisplayOptions.meetingDate}} -- {{t "dash"}} - | - {{/if}} - {{#if this.tableColumnDisplayOptions.requestedPublicationDate}} -- {{#if row.publishDateRequested}} - {{moment-format row.publishDateRequested "DD-MM-YYYY"}} - {{else}} - {{t "dash"}} - {{/if}} - | - {{/if}} - {{#if this.tableColumnDisplayOptions.finalPublicationDate}} -
- {{#if row.publishBefore}}
- {{!-- TODO We want to check if the publication is still ongoing, no warnings for published/withdrawn --}}
- |
- {{/if}}
- {{#if this.tableColumnDisplayOptions.publicationDate}}
- - {{if - row.publishedAt - (moment-format row.publishedAt "DD-MM-YYYY") - (t "dash") - }} - | - {{/if}} - - {{#if this.tableColumnDisplayOptions.caseManager}} -- {{t "dash"}} - | - {{/if}} - - {{#if this.tableColumnDisplayOptions.lastEdited}} -
- {{moment-format row.modified "DD-MM-YYYY"}} - - {{moment-format row.modified "HH:mm"}} - - |
- {{/if}}
-
-
- {{#if this.tableColumnDisplayOptions.lastEditedBy}}
- - {{t "dash"}} - | - {{/if}} - - {{#if this.tableColumnDisplayOptions.withdrawnDate}} -
- {{#if row.status.isWithdrawn }}
- {{moment-format row.publicationStatusChange.startedAt "DD-MM-YYYY"}}
- - - {{moment-format row.publicationStatusChange.startedAt "HH:mm"}} - - {{else}} - {{t "dash"}} - {{/if}} - |
- {{/if}}
-
- {{#if this.tableColumnDisplayOptions.pauseDate}}
-
- {{#if row.status.isPaused}}
- {{moment-format row.publicationStatusChange.startedAt "DD-MM-YYYY"}}
- - - {{moment-format row.publicationStatusChange.startedAt "HH:mm"}} - - {{else}} - {{t "dash"}} - {{/if}} - |
- {{/if}}
-
- {{#if this.tableColumnDisplayOptions.translateRequests}}
-
- {{#if (gt (await row.translationRequestsTotal) 0)}}
- {{#if
- (eq (await row.translationRequestsFinished) (await row.translationRequestsTotal))
- }}
- | + | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+ {{#if row.case.shortTitle}}
+ |
{{/if}}
- {{else}}
- - {{t "dash"}} - | - {{/if}} - {{#if this.tableColumnDisplayOptions.publishPreviewRequests}} -
- {{#if (gt (await row.publishpreviewRequestsTotal) 0)}}
- {{#if
- (eq (await row.publishpreviewRequestsFinished) (await row.publishpreviewRequestsTotal))
- }}
- |
+ {{#if row.remark}}
+ + {{row.remark}} + + |
{{/if}}
- {{else}}
-
- {{#if row.urgencyLevel.isUrgent}}
- - {{t "priority-procedure"}} - - |
- {{/if}}
-
- {{#if this.tableColumnDisplayOptions.comment}}
-
- {{#if row.remark}}
- - {{row.remark}} - - |
- {{/if}}
- {{#if this.tableColumnDisplayOptions.fromDesignAgenda}}
- - {{t "dash"}} - | - {{/if}} -
- |
-
-
-
+ {{#if this.tableColumnDisplayOptions.speedProcedure}}
+
+ {{#if row.urgencyLevel.isUrgent}}
+ + {{t "priority-procedure"}} + + |
+ {{/if}}
+ {{#if this.tableColumnDisplayOptions.decisionDate}}
+ + {{t "dash"}} + | + {{/if}} + {{#if this.tableColumnDisplayOptions.publicationNumber}} ++ {{#if row.identification.idName}} + {{row.identification.idName}} + {{else}} + {{t "dash"}} + {{/if}} + | + {{/if}} + {{#if this.tableColumnDisplayOptions.regulationType}} ++ {{#if row.regulationType}} + {{row.regulationType.label}} + {{else}} + {{t "dash"}} + {{/if}} + | + {{/if}} + {{#if this.tableColumnDisplayOptions.numacNumber}} +
+ {{#each row.numacNumbers as |numac|}}
+ |
+ {{/if}}
+ {{#if this.tableColumnDisplayOptions.requestedPublicationDate}}
+ + {{#if row.publishDateRequested}} + {{moment-format row.publishDateRequested "DD-MM-YYYY"}} + {{else}} + {{t "dash"}} + {{/if}} + | + {{/if}} + {{#if this.tableColumnDisplayOptions.requestedTranslationDate}} ++ {{t "dash"}} + | + {{/if}} + {{#if this.tableColumnDisplayOptions.publicationDate}} ++ {{if row.publishedAt (moment-format row.publishedAt "DD-MM-YYYY") (t "dash") }} + | + {{/if}} + {{#if this.tableColumnDisplayOptions.translateRequests}} +
+ {{#if (gt (await row.translationRequestsTotal) 0)}}
+ {{#if
+ (eq (await row.translationRequestsFinished) (await row.translationRequestsTotal))
+ }}
+ |
+ {{/if}}
+ {{#if this.tableColumnDisplayOptions.publishPreviewRequests}}
+
+ {{#if (gt (await row.publishpreviewRequestsTotal) 0)}}
+ {{#if
+ (eq (await row.publishpreviewRequestsFinished) (await row.publishpreviewRequestsTotal))
+ }}
+ |
+ {{/if}}
+ {{#if this.tableColumnDisplayOptions.lastEdited}}
+
+ {{moment-format row.modified "DD-MM-YYYY"}} + + {{moment-format row.modified "HH:mm"}} + + |
+ {{/if}}
+ {{#if this.tableColumnDisplayOptions.lastEditedBy}}
+ + {{t "dash"}} + | + {{/if}} + {{#if this.tableColumnDisplayOptions.previewTranslator}} ++ {{t "dash"}} + | + {{/if}} + {{#if this.tableColumnDisplayOptions.status}} +
+ {{#if row.status }}
+ {{row.status.label}}
+ {{#if (or row.status.isWithdrawn row.status.isPaused) }}
+ + + {{moment-format row.publicationStatusChange.startedAt "DD-MM-YYYY HH:mm"}} + + {{/if}} + {{else}} + {{t "dash"}} + {{/if}} + |
+ {{/if}}
+ {{#if this.tableColumnDisplayOptions.source}}
+ + {{t "dash"}} + | + {{/if}} + {{#if this.tableColumnDisplayOptions.signStatus}} ++ {{t "dash"}} + | + {{/if}} +
+ |
+