Skip to content

Commit

Permalink
Merged in bugfix/DSC-1208 (pull request DSpace#804)
Browse files Browse the repository at this point in the history
[DSC-1208] SUPSI: End User Agreement shows acceptance hint box twice

Approved-by: Andrea Barbasso
  • Loading branch information
NikitaKr1vonosov authored and Andrea Barbasso committed Sep 21, 2023
2 parents 411a425 + 85812a0 commit 1432516
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class EndUserAgreementComponent implements OnInit, OnDestroy {
if (authorized) {

if (!accepted) {
this.notificationsService.warning(this.translate.instant('info.end-user-agreement.accept.warning'));
this.notificationsService.warning(this.translate.instant('info.end-user-agreement.accept.warning'), {});
}
this.accepted = accepted;
this.alreadyAccepted = accepted;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
import { select, Store } from '@ngrx/store';
import { BehaviorSubject, Subscription } from 'rxjs';
import difference from 'lodash/difference';
import isEqual from 'lodash/isEqual';

import { NotificationsService } from '../notifications.service';
import { AppState } from '../../../app.reducer';
Expand Down Expand Up @@ -132,11 +133,11 @@ export class NotificationsBoardComponent implements OnInit, OnDestroy {
}

private checkStandard(checker: INotification, item: INotification): boolean {
return checker.type === item.type && checker.title === item.title && checker.content === item.content;
return checker.type === item.type && checker.title === item.title && isEqual(checker.content, item.content);
}

private checkHtml(checker: INotification, item: INotification): boolean {
return checker.html ? checker.type === item.type && checker.title === item.title && checker.content === item.content && checker.html === item.html : false;
return checker.html ? checker.type === item.type && checker.title === item.title && isEqual(checker.content, item.content) && checker.html === item.html : false;
}

// Attach all the changes received in the options object
Expand Down

0 comments on commit 1432516

Please sign in to comment.