commit
f68a9b10fe
|
@ -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",
|
||||
|
|
|
@ -14,3 +14,5 @@
|
|||
|
||||
// Routing.
|
||||
export const CORE_DATAPRIVACY_PAGE_NAME = 'dataprivacy';
|
||||
|
||||
export const CORE_DATAPRIVACY_FEATURE_NAME = 'CoreUserDelegate_CoreDataPrivacy';
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -35,24 +35,27 @@
|
|||
</ion-row>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-item button [detail]="false" *ngIf="request.requestedbyuser" core-user-link [userId]="request.requestedbyuser.id"
|
||||
[attr.aria-label]="request.requestedbyuser.fullname" class="ion-text-wrap">
|
||||
<ion-item *ngIf="request.requestedbyuser" class="ion-text-wrap">
|
||||
<ion-label>
|
||||
<p class="item-heading">{{ 'core.dataprivacy.requestby' | translate }}</p>
|
||||
<p>{{ request.requestedbyuser.fullname }}</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-item class="ion-text-wrap" [lines]="request.canCancel ? 'full' : 'none'">
|
||||
<ion-item class="ion-text-wrap" [lines]="request.canCancel || request.downloadlink ? 'full' : 'none'">
|
||||
<ion-label>
|
||||
<p class="item-heading">{{ 'core.dataprivacy.message' | translate }}</p>
|
||||
<p><core-format-text [text]="request.messagehtml" /></p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
<ion-item class="ion-text-wrap ion-text-end" *ngIf="request.canCancel">
|
||||
<ion-item class="ion-text-wrap ion-text-end" *ngIf="request.canCancel || request.downloadlink">
|
||||
<ion-label>
|
||||
<ion-button fill="outline" expand="block" (click)="cancelRequest(request.id)">
|
||||
<ion-button fill="outline" expand="block" (click)="cancelRequest(request.id)" *ngIf="request.canCancel">
|
||||
{{ 'core.dataprivacy.cancelrequest' | translate }}
|
||||
</ion-button>
|
||||
<ion-button fill="outline" expand="block" *ngIf="request.downloadlink" [href]="request.downloadlink" core-link
|
||||
[showBrowserWarning]="false">
|
||||
{{ 'core.dataprivacy.download' | translate }}
|
||||
</ion-button>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
</ion-card>
|
||||
|
@ -90,12 +93,17 @@
|
|||
<ion-button fill="outline" size="small" (click)="cancelRequest(request.id)" *ngIf="request.canCancel">
|
||||
{{ 'core.dataprivacy.cancelrequest' | translate }}
|
||||
</ion-button>
|
||||
<ion-button fill="outline" size="small" *ngIf="request.downloadlink" [href]="request.downloadlink" core-link
|
||||
[showBrowserWarning]="false">
|
||||
{{ 'core.dataprivacy.download' | translate }}
|
||||
</ion-button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<core-empty-box *ngIf="!requests.length" icon="fas-bell-concierge" [message]="'core.dataprivacy.nodatarequests' | translate" />
|
||||
<core-empty-box *ngIf="!requests.length" icon="fas-bell-concierge"
|
||||
[message]="'core.dataprivacy.nopersonaldatarequests' | translate" />
|
||||
|
||||
<div collapsible-footer *ngIf="loaded" slot="fixed">
|
||||
<div class="list-item-limited-width adaptable-buttons-row">
|
||||
|
@ -117,44 +125,44 @@
|
|||
|
||||
<ng-template #statusBadge let-request="request">
|
||||
@switch (request.status) {
|
||||
@case (0) {
|
||||
<ion-badge color="info">{{'core.dataprivacy.statuspending' | translate }}</ion-badge>
|
||||
} @case (1) {
|
||||
<ion-badge color="info">{{'core.dataprivacy.statuspreprocessing' | translate }}</ion-badge>
|
||||
} @case (2) {
|
||||
<ion-badge color="info">{{'core.dataprivacy.statusawaitingapproval' | translate }}</ion-badge>
|
||||
} @case (3) {
|
||||
<ion-badge color="info">{{'core.dataprivacy.statusapproved' | translate }}</ion-badge>
|
||||
} @case (4) {
|
||||
<ion-badge color="info">{{'core.dataprivacy.statusprocessing' | translate }}</ion-badge>
|
||||
} @case (5) {
|
||||
<ion-badge color="success">{{'core.dataprivacy.statuscomplete' | translate }}</ion-badge>
|
||||
} @case (6) {
|
||||
<ion-badge color="warning">{{'core.dataprivacy.statuscancelled' | translate }}</ion-badge>
|
||||
} @case (7) {
|
||||
<ion-badge color="danger">{{'core.dataprivacy.statusrejected' | translate }}</ion-badge>
|
||||
} @case (8) {
|
||||
<ion-badge color="success">{{'core.dataprivacy.statusready' | translate }}</ion-badge>
|
||||
} @case (9) {
|
||||
<ion-badge color="secondary">{{'core.dataprivacy.statusexpired' | translate }}</ion-badge>
|
||||
} @case (10) {
|
||||
<ion-badge color="success">{{'core.dataprivacy.statusdeleted' | translate }}</ion-badge>
|
||||
} @default {
|
||||
<ion-badge class="ion-text-wrap">{{request.statuslabel}}</ion-badge>
|
||||
}
|
||||
@case (0) {
|
||||
<ion-badge color="info">{{'core.dataprivacy.statuspending' | translate }}</ion-badge>
|
||||
} @case (1) {
|
||||
<ion-badge color="info">{{'core.dataprivacy.statuspreprocessing' | translate }}</ion-badge>
|
||||
} @case (2) {
|
||||
<ion-badge color="info">{{'core.dataprivacy.statusawaitingapproval' | translate }}</ion-badge>
|
||||
} @case (3) {
|
||||
<ion-badge color="info">{{'core.dataprivacy.statusapproved' | translate }}</ion-badge>
|
||||
} @case (4) {
|
||||
<ion-badge color="info">{{'core.dataprivacy.statusprocessing' | translate }}</ion-badge>
|
||||
} @case (5) {
|
||||
<ion-badge color="success">{{'core.dataprivacy.statuscomplete' | translate }}</ion-badge>
|
||||
} @case (6) {
|
||||
<ion-badge color="warning">{{'core.dataprivacy.statuscancelled' | translate }}</ion-badge>
|
||||
} @case (7) {
|
||||
<ion-badge color="danger">{{'core.dataprivacy.statusrejected' | translate }}</ion-badge>
|
||||
} @case (8) {
|
||||
<ion-badge color="success">{{'core.dataprivacy.statusready' | translate }}</ion-badge>
|
||||
} @case (9) {
|
||||
<ion-badge color="secondary">{{'core.dataprivacy.statusexpired' | translate }}</ion-badge>
|
||||
} @case (10) {
|
||||
<ion-badge color="success">{{'core.dataprivacy.statusdeleted' | translate }}</ion-badge>
|
||||
} @default {
|
||||
<ion-badge class="ion-text-wrap">{{request.statuslabel}}</ion-badge>
|
||||
}
|
||||
}
|
||||
</ng-template>
|
||||
|
||||
<ng-template #type let-request="request">
|
||||
@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}}
|
||||
}
|
||||
}
|
||||
</ng-template>
|
||||
|
|
|
@ -375,4 +375,5 @@ export type CoreDataPrivacyRequest = {
|
|||
approvedeny?: boolean; // Approvedeny.
|
||||
allowfiltering?: boolean; // Allowfiltering.
|
||||
canmarkcomplete?: boolean; // Canmarkcomplete.
|
||||
downloadlink?: string; // Downloadlink.
|
||||
};
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="!isCardLayout">
|
||||
<table class="core-table">
|
||||
<table class="core-table x-scrollable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th *ngFor="let header of state.report.data.headers">
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
}
|
||||
|
||||
table {
|
||||
overflow-x: auto;
|
||||
|
||||
th, td {
|
||||
min-width: 200px;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue