Cache redesign part 1, and add support for alternative links

This commit is contained in:
Art Lowel
2020-12-11 14:18:44 +01:00
parent f4853972cc
commit 4e18fa35ca
522 changed files with 7537 additions and 6933 deletions

View File

@@ -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));