mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Cache redesign part 1, and add support for alternative links
This commit is contained in:
@@ -14,10 +14,12 @@ import { AuthenticateAction } from '../../core/auth/auth.actions';
|
||||
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||
import { environment } from '../../../environments/environment';
|
||||
import { isEmpty } from '../../shared/empty.util';
|
||||
import { RemoteData } from '../../core/data/remote-data';
|
||||
import {
|
||||
END_USER_AGREEMENT_METADATA_FIELD,
|
||||
EndUserAgreementService
|
||||
} from '../../core/end-user-agreement/end-user-agreement.service';
|
||||
import { getFirstCompletedRemoteData } from '../../core/shared/operators';
|
||||
|
||||
/**
|
||||
* Component that renders the create profile page to be used by a user registering through a token
|
||||
@@ -153,8 +155,10 @@ export class CreateProfileComponent implements OnInit {
|
||||
}
|
||||
|
||||
const eperson = Object.assign(new EPerson(), values);
|
||||
this.ePersonDataService.createEPersonForToken(eperson, this.token).subscribe((response) => {
|
||||
if (response.isSuccessful) {
|
||||
this.ePersonDataService.createEPersonForToken(eperson, this.token).pipe(
|
||||
getFirstCompletedRemoteData(),
|
||||
).subscribe((rd: RemoteData<EPerson>) => {
|
||||
if (rd.hasSucceeded) {
|
||||
this.notificationsService.success(this.translateService.get('register-page.create-profile.submit.success.head'),
|
||||
this.translateService.get('register-page.create-profile.submit.success.content'));
|
||||
this.store.dispatch(new AuthenticateAction(this.email, this.password));
|
||||
|
Reference in New Issue
Block a user