diff --git a/scripts/langindex.json b/scripts/langindex.json index 3140fadfa..009ac93f8 100644 --- a/scripts/langindex.json +++ b/scripts/langindex.json @@ -1684,9 +1684,10 @@ "core.dataprivacy.datarequests": "tool_dataprivacy", "core.dataprivacy.daterequested": "tool_dataprivacy", "core.dataprivacy.deletemyaccount": "tool_dataprivacy", + "core.dataprivacy.download": "tool_dataprivacy", "core.dataprivacy.message": "tool_dataprivacy", "core.dataprivacy.newrequest": "tool_dataprivacy", - "core.dataprivacy.nodatarequests": "tool_dataprivacy", + "core.dataprivacy.nopersonaldatarequests": "tool_dataprivacy", "core.dataprivacy.pluginname": "tool_dataprivacy", "core.dataprivacy.replyto": "tool_dataprivacy", "core.dataprivacy.requestactions": "tool_dataprivacy", diff --git a/src/core/features/dataprivacy/constants.ts b/src/core/features/dataprivacy/constants.ts index 73043ed85..4a17949ec 100644 --- a/src/core/features/dataprivacy/constants.ts +++ b/src/core/features/dataprivacy/constants.ts @@ -14,3 +14,5 @@ // Routing. export const CORE_DATAPRIVACY_PAGE_NAME = 'dataprivacy'; + +export const CORE_DATAPRIVACY_FEATURE_NAME = 'CoreUserDelegate_CoreDataPrivacy'; diff --git a/src/core/features/dataprivacy/lang.json b/src/core/features/dataprivacy/lang.json index 13f0290bd..3304876cd 100644 --- a/src/core/features/dataprivacy/lang.json +++ b/src/core/features/dataprivacy/lang.json @@ -6,9 +6,10 @@ "datarequests": "Data requests", "daterequested": "Date requested", "deletemyaccount": "Delete my account", + "download": "Download", "message": "Message", "newrequest": "New request", - "nodatarequests": "There are no data requests", + "nopersonaldatarequests": "You don't have any personal data requests", "pluginname": "Data privacy", "replyto": "Reply to", "requestactions": "Actions", diff --git a/src/core/features/dataprivacy/pages/main/main.html b/src/core/features/dataprivacy/pages/main/main.html index 5e42746b8..38ffc3aa1 100644 --- a/src/core/features/dataprivacy/pages/main/main.html +++ b/src/core/features/dataprivacy/pages/main/main.html @@ -35,24 +35,27 @@ - +

{{ 'core.dataprivacy.requestby' | translate }}

{{ request.requestedbyuser.fullname }}

- +

{{ 'core.dataprivacy.message' | translate }}

- + - + {{ 'core.dataprivacy.cancelrequest' | translate }} + + {{ 'core.dataprivacy.download' | translate }} + @@ -90,12 +93,17 @@ {{ 'core.dataprivacy.cancelrequest' | translate }} + + {{ 'core.dataprivacy.download' | translate }} + - +
@@ -117,44 +125,44 @@ @switch (request.status) { - @case (0) { - {{'core.dataprivacy.statuspending' | translate }} - } @case (1) { - {{'core.dataprivacy.statuspreprocessing' | translate }} - } @case (2) { - {{'core.dataprivacy.statusawaitingapproval' | translate }} - } @case (3) { - {{'core.dataprivacy.statusapproved' | translate }} - } @case (4) { - {{'core.dataprivacy.statusprocessing' | translate }} - } @case (5) { - {{'core.dataprivacy.statuscomplete' | translate }} - } @case (6) { - {{'core.dataprivacy.statuscancelled' | translate }} - } @case (7) { - {{'core.dataprivacy.statusrejected' | translate }} - } @case (8) { - {{'core.dataprivacy.statusready' | translate }} - } @case (9) { - {{'core.dataprivacy.statusexpired' | translate }} - } @case (10) { - {{'core.dataprivacy.statusdeleted' | translate }} - } @default { - {{request.statuslabel}} - } + @case (0) { + {{'core.dataprivacy.statuspending' | translate }} + } @case (1) { + {{'core.dataprivacy.statuspreprocessing' | translate }} + } @case (2) { + {{'core.dataprivacy.statusawaitingapproval' | translate }} + } @case (3) { + {{'core.dataprivacy.statusapproved' | translate }} + } @case (4) { + {{'core.dataprivacy.statusprocessing' | translate }} + } @case (5) { + {{'core.dataprivacy.statuscomplete' | translate }} + } @case (6) { + {{'core.dataprivacy.statuscancelled' | translate }} + } @case (7) { + {{'core.dataprivacy.statusrejected' | translate }} + } @case (8) { + {{'core.dataprivacy.statusready' | translate }} + } @case (9) { + {{'core.dataprivacy.statusexpired' | translate }} + } @case (10) { + {{'core.dataprivacy.statusdeleted' | translate }} + } @default { + {{request.statuslabel}} + } } @switch (request.type) { - @case (1) { - {{ 'core.dataprivacy.requesttypeexport' | translate }} - } @case (2) { - {{ 'core.dataprivacy.requesttypedelete' | translate }} - } @case (3) { - {{ 'core.dataprivacy.requesttypeothers' | translate }} - } @default { - {{request.typename}} - } + @case (1) { + {{ 'core.dataprivacy.requesttypeexport' | translate }} + } @case (2) { + {{ 'core.dataprivacy.requesttypedelete' | translate }} + } @case (3) { + {{ 'core.dataprivacy.requesttypeothers' | translate }} + } @default { + {{request.typename}} + } } diff --git a/src/core/features/dataprivacy/services/dataprivacy.ts b/src/core/features/dataprivacy/services/dataprivacy.ts index 21feed9c6..d7d35e225 100644 --- a/src/core/features/dataprivacy/services/dataprivacy.ts +++ b/src/core/features/dataprivacy/services/dataprivacy.ts @@ -375,4 +375,5 @@ export type CoreDataPrivacyRequest = { approvedeny?: boolean; // Approvedeny. allowfiltering?: boolean; // Allowfiltering. canmarkcomplete?: boolean; // Canmarkcomplete. + downloadlink?: string; // Downloadlink. }; diff --git a/src/core/features/dataprivacy/services/handlers/createdatarequest-link.ts b/src/core/features/dataprivacy/services/handlers/createdatarequest-link.ts index eeb9f376c..d6832ddba 100644 --- a/src/core/features/dataprivacy/services/handlers/createdatarequest-link.ts +++ b/src/core/features/dataprivacy/services/handlers/createdatarequest-link.ts @@ -16,7 +16,7 @@ import { Injectable } from '@angular/core'; import { Params } from '@angular/router'; import { CoreContentLinksHandlerBase } from '@features/contentlinks/classes/base-handler'; import { CoreContentLinksAction } from '@features/contentlinks/services/contentlinks-delegate'; -import { CORE_DATAPRIVACY_PAGE_NAME } from '@features/dataprivacy/constants'; +import { CORE_DATAPRIVACY_FEATURE_NAME, CORE_DATAPRIVACY_PAGE_NAME } from '@features/dataprivacy/constants'; import { CoreNavigator } from '@services/navigator'; import { makeSingleton } from '@singletons'; import { CoreDataPrivacy } from '../dataprivacy'; @@ -29,6 +29,7 @@ export class CoreDataPrivacyCreateDataRequestLinkHandlerService extends CoreCont name = 'CoreDataPrivacyCreateDataRequestLinkHandler'; pattern = /\/admin\/tool\/dataprivacy\/createdatarequest\.php.*([?&]type=\d+)/; + featureName = CORE_DATAPRIVACY_FEATURE_NAME; /** * @inheritdoc diff --git a/src/core/features/dataprivacy/services/handlers/datarequests-link.ts b/src/core/features/dataprivacy/services/handlers/datarequests-link.ts index ce7fb8d0e..1e384239e 100644 --- a/src/core/features/dataprivacy/services/handlers/datarequests-link.ts +++ b/src/core/features/dataprivacy/services/handlers/datarequests-link.ts @@ -15,7 +15,7 @@ import { Injectable } from '@angular/core'; import { CoreContentLinksHandlerBase } from '@features/contentlinks/classes/base-handler'; import { CoreContentLinksAction } from '@features/contentlinks/services/contentlinks-delegate'; -import { CORE_DATAPRIVACY_PAGE_NAME } from '@features/dataprivacy/constants'; +import { CORE_DATAPRIVACY_FEATURE_NAME, CORE_DATAPRIVACY_PAGE_NAME } from '@features/dataprivacy/constants'; import { CoreNavigator } from '@services/navigator'; import { makeSingleton } from '@singletons'; import { CoreDataPrivacy } from '../dataprivacy'; @@ -28,6 +28,7 @@ export class CoreDataPrivacyDataRequestsLinkHandlerService extends CoreContentLi name = 'CoreDataPrivacyDataRequestsLinkHandler'; pattern = /\/admin\/tool\/dataprivacy\/mydatarequests\.php/; + featureName = CORE_DATAPRIVACY_FEATURE_NAME; /** * @inheritdoc diff --git a/src/core/features/dataprivacy/tests/behat/create_data_request.feature b/src/core/features/dataprivacy/tests/behat/create_data_request.feature index 4be002787..c55c88724 100644 --- a/src/core/features/dataprivacy/tests/behat/create_data_request.feature +++ b/src/core/features/dataprivacy/tests/behat/create_data_request.feature @@ -58,5 +58,6 @@ Feature: Data export and delete from the privacy API Then I should find "Approved" near "Export all of my personal data" in the app When I run all adhoc tasks And I pull to refresh in the app - And I should find "Download ready" near "Export all of my personal data" in the app - # TODO: Add download link and test it. + Then I should find "Download ready" near "Export all of my personal data" in the app + And I press "Download" in the app + And the app should have opened a browser tab with url "$WWWROOTPATTERN" diff --git a/src/core/features/reportbuilder/components/report-detail/report-detail.html b/src/core/features/reportbuilder/components/report-detail/report-detail.html index 3f1810cb9..d05ddfcdc 100644 --- a/src/core/features/reportbuilder/components/report-detail/report-detail.html +++ b/src/core/features/reportbuilder/components/report-detail/report-detail.html @@ -22,7 +22,7 @@ - +
diff --git a/src/core/features/reportbuilder/components/report-detail/report-detail.scss b/src/core/features/reportbuilder/components/report-detail/report-detail.scss index 427a3cffb..0cf045281 100644 --- a/src/core/features/reportbuilder/components/report-detail/report-detail.scss +++ b/src/core/features/reportbuilder/components/report-detail/report-detail.scss @@ -6,8 +6,6 @@ } table { - overflow-x: auto; - th, td { min-width: 200px; } diff --git a/src/theme/theme.base.scss b/src/theme/theme.base.scss index 88c59f68e..c83994d66 100644 --- a/src/theme/theme.base.scss +++ b/src/theme/theme.base.scss @@ -2023,6 +2023,10 @@ table.core-table { margin: 1em auto; color: var(--text-color); + &.x-scrollable { + overflow-x: auto; + display: block; + } thead th { vertical-align: bottom; @@ -2031,8 +2035,13 @@ table.core-table { background-color: var(--core-table-header-background); } - tbody th { - font-weight: normal; + tbody { + th { + font-weight: normal; + } + td { + font-size: 16px; + } } th, td { @@ -2045,10 +2054,6 @@ table.core-table { border-bottom: 1px solid var(--core-table-border-color); } - tbody td { - font-size: 16px; - } - .odd { --cell-background: var(--core-table-odd-cell-background); --cell-hover: var(--core-table-odd-cell-hover); @@ -2069,19 +2074,21 @@ table.core-table { } } - tbody.auto-striped tr:nth-child(odd) { - background-color: var(--core-table-odd-cell-background); + tbody.auto-striped { + tr:nth-child(odd) { + background-color: var(--core-table-odd-cell-background); - &:hover { - background-color: var(--core-table-even-odd-hover); + &:hover { + background-color: var(--core-table-even-odd-hover); + } } - } - tbody.auto-striped tr:nth-child(even) { - background-color: var(--core-table-even-cell-background); + tr:nth-child(even) { + background-color: var(--core-table-even-cell-background); - &:hover { - background-color: var(--core-table-even-cell-hover); + &:hover { + background-color: var(--core-table-even-cell-hover); + } } }