MOBILE-4329 dataprivacy: Add download button when download is ready

main
Pau Ferrer Ocaña 2024-03-11 12:40:50 +01:00
parent bbdd7ee95c
commit 6be582f932
5 changed files with 56 additions and 44 deletions

View File

@ -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",

View File

@ -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",

View File

@ -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">

View File

@ -375,4 +375,5 @@ export type CoreDataPrivacyRequest = {
approvedeny?: boolean; // Approvedeny.
allowfiltering?: boolean; // Allowfiltering.
canmarkcomplete?: boolean; // Canmarkcomplete.
downloadlink?: string; // Downloadlink.
};

View File

@ -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"