#7662: Popup message when merging email accounts from the user profile | [Bug fix] Truncate title of dataset and show tooltip in dmp clone popup.

1. user-profile.component.ts: Added PopupNotificationDialogComponent when email for validating account has been sent.
2. login.component.ts: Added @Input() redirect: boolean = true; - if this is false do not redirect to home page.
3. add-account-dialog.component.html: Add parameter redirect="false" in <app-login>.
4. clone-dialog.component.html: [Bug fix] Truncate title of dataset and show tooltip in dmp clone popup.
5. i18n/: In language files added "USER-PROFILE.MERGING-EMAILS-DIALOG.TITLE" and "USER-PROFILE.MERGING-EMAILS-DIALOG.MESSAGE".
This commit is contained in:
Konstantina Galouni 2022-04-19 10:28:35 +03:00
parent 7c933d9f32
commit 943f84384c
13 changed files with 49 additions and 4 deletions

View File

@ -32,6 +32,7 @@ declare const FB: any;
})
export class LoginComponent extends BaseComponent implements OnInit, AfterViewInit {
@Input() redirect: boolean = true;
@Input() mergeUsers: boolean;
public auth2: any;
@ -58,7 +59,7 @@ export class LoginComponent extends BaseComponent implements OnInit, AfterViewIn
) { super(); }
ngOnInit(): void {
if(this.authService.current()){
if(this.authService.current() && (this.redirect == true)){
this.router.navigate(['home']);
}
this.matomoService.trackPageView('loginPage');

View File

@ -59,7 +59,7 @@
<mat-card class="mat-card">
<mat-selection-list #selectedItems (selectionChange)="selectionChanged(selectedItems)">
<mat-list-option *ngFor="let dataset of data.datasets;" [value]="dataset.id">
{{dataset.label}}
<span class="text-truncate" [matTooltip]="dataset.label">{{dataset.label}}</span>
</mat-list-option>
</mat-selection-list>
</mat-card>

View File

@ -3,7 +3,7 @@
<h1 mat-dialog-title class="title">{{'USER-PROFILE.ACTIONS.LINK-NEW-ACCOUNT' | translate}}</h1>
<span class="ml-auto align-self-center" (click)="closeDialog()"><mat-icon class="close-icon">close</mat-icon></span>
</div>
<app-login *ngIf="hasEmail" [mergeUsers]="true"></app-login>
<app-login *ngIf="hasEmail" [mergeUsers]="true" redirect="false"></app-login>
<div *ngIf="!hasEmail">
<div mat-dialog-content class="definition-content pt-2">
<mat-form-field class="full-width">

View File

@ -31,6 +31,7 @@ import { FormValidationErrorsDialogComponent } from '@common/forms/form-validati
import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
import { MatomoService } from '@app/core/services/matomo/matomo-service';
import { HttpClient } from '@angular/common/http';
import {PopupNotificationDialogComponent} from "@app/library/notification/popup/popup-notification.component";
const availableLanguages: any[] = require('../../../assets/resources/language.json');
@ -306,7 +307,14 @@ export class UserProfileComponent extends BaseComponent implements OnInit, OnDes
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
if (result) {
this.mergeEmailConfirmation.sendConfirmationEmail(result).pipe(takeUntil(this._destroyed))
.subscribe(res => { }, err => { });
.subscribe(res => {
this.dialog.open(PopupNotificationDialogComponent, {
data: {
title: this.language.instant('USER-PROFILE.MERGING-EMAILS-DIALOG.TITLE'),
message: this.language.instant('USER-PROFILE.MERGING-EMAILS-DIALOG.MESSAGE')
}, maxWidth: '30em'
});
}, err => { });
}
});
}

View File

@ -1657,6 +1657,10 @@
"LOG-OUT": "Abmeldung"
},
"USER-PROFILE": {
"MERGING-EMAILS-DIALOG": {
"TITLE": "Link new account",
"MESSAGE": "An email to verify this action has been sent to you. Once accepted, you will be able to see your accounts merged. The last email account that you merge will be the one containing all of your DMP records and activity in Argos."
},
"SETTINGS": {
"TITLE": "Einstellungen",
"TIMEZONE": "Zeitzone",

View File

@ -1657,6 +1657,10 @@
"LOG-OUT": "Log Out"
},
"USER-PROFILE": {
"MERGING-EMAILS-DIALOG": {
"TITLE": "Link new account",
"MESSAGE": "An email to verify this action has been sent to you. Once accepted, you will be able to see your accounts merged. The last email account that you merge will be the one containing all of your DMP records and activity in Argos."
},
"SETTINGS": {
"TITLE": "Settings",
"TIMEZONE": "Time Zone",

View File

@ -1657,6 +1657,10 @@
"LOG-OUT": "Cerrar la sesión"
},
"USER-PROFILE": {
"MERGING-EMAILS-DIALOG": {
"TITLE": "Link new account",
"MESSAGE": "An email to verify this action has been sent to you. Once accepted, you will be able to see your accounts merged. The last email account that you merge will be the one containing all of your DMP records and activity in Argos."
},
"SETTINGS": {
"TITLE": "Configuración",
"TIMEZONE": "Zona horaria",

View File

@ -1657,6 +1657,10 @@
"LOG-OUT": "Αποσύνδεση"
},
"USER-PROFILE": {
"MERGING-EMAILS-DIALOG": {
"TITLE": "Link new account",
"MESSAGE": "An email to verify this action has been sent to you. Once accepted, you will be able to see your accounts merged. The last email account that you merge will be the one containing all of your DMP records and activity in Argos."
},
"SETTINGS": {
"TITLE": "Ρυθμίσεις",
"TIMEZONE": "Ζώνη Ώρας",

View File

@ -1657,6 +1657,10 @@
"LOG-OUT": "Odjava"
},
"USER-PROFILE": {
"MERGING-EMAILS-DIALOG": {
"TITLE": "Link new account",
"MESSAGE": "An email to verify this action has been sent to you. Once accepted, you will be able to see your accounts merged. The last email account that you merge will be the one containing all of your DMP records and activity in Argos."
},
"SETTINGS": {
"TITLE": "Postavke",
"TIMEZONE": "Vremenska zona",

View File

@ -1657,6 +1657,10 @@
"LOG-OUT": "Terminar Sessão"
},
"USER-PROFILE": {
"MERGING-EMAILS-DIALOG": {
"TITLE": "Link new account",
"MESSAGE": "An email to verify this action has been sent to you. Once accepted, you will be able to see your accounts merged. The last email account that you merge will be the one containing all of your DMP records and activity in Argos."
},
"SETTINGS": {
"TITLE": "Definições",
"TIMEZONE": "Fuso horário",

View File

@ -1657,6 +1657,10 @@
"LOG-OUT": "Odhlásiť sa"
},
"USER-PROFILE": {
"MERGING-EMAILS-DIALOG": {
"TITLE": "Link new account",
"MESSAGE": "An email to verify this action has been sent to you. Once accepted, you will be able to see your accounts merged. The last email account that you merge will be the one containing all of your DMP records and activity in Argos."
},
"SETTINGS": {
"TITLE": "Nastavenia",
"TIMEZONE": "Časové pásmo",

View File

@ -1657,6 +1657,10 @@
"LOG-OUT": "Odjavite se"
},
"USER-PROFILE": {
"MERGING-EMAILS-DIALOG": {
"TITLE": "Link new account",
"MESSAGE": "An email to verify this action has been sent to you. Once accepted, you will be able to see your accounts merged. The last email account that you merge will be the one containing all of your DMP records and activity in Argos."
},
"SETTINGS": {
"TITLE": "Podešavanja",
"TIMEZONE": "Vremenska zona",

View File

@ -1657,6 +1657,10 @@
"LOG-OUT": ıkış Yap"
},
"USER-PROFILE": {
"MERGING-EMAILS-DIALOG": {
"TITLE": "Link new account",
"MESSAGE": "An email to verify this action has been sent to you. Once accepted, you will be able to see your accounts merged. The last email account that you merge will be the one containing all of your DMP records and activity in Argos."
},
"SETTINGS": {
"TITLE": "Ayarlar",
"TIMEZONE": "Zaman Dilimi",