diff --git a/package-lock.json b/package-lock.json index 34531d6464dfc0e530ce4aee021d586399b207aa..cdb64c940fcc90e54bfa3ee7be7aa2f2d3d8126e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9246,9 +9246,9 @@ } }, "solidify-frontend": { - "version": "0.1.6", - "resolved": "https://packages.dlcm.ch/repository/npm-group/solidify-frontend/-/solidify-frontend-0.1.6.tgz", - "integrity": "sha512-USVsE/KsGlKa0HGB57wOag1QUG+g8lTAmqL2+moeqdySv0qytcvyAxCQIjFYftaRn8xG3vf7vUcmMrAloucaTQ==", + "version": "0.1.7", + "resolved": "https://packages.dlcm.ch/repository/npm-group/solidify-frontend/-/solidify-frontend-0.1.7.tgz", + "integrity": "sha512-MxuGeRq+VvwWCNHKPIxTGLHTtkU2nfWy8eTIEDlSXibQNpbDJ/D5EVzhg+3laPS18ChSNtz1zk2Vx4BPAriLTw==", "requires": { "tslib": "^1.9.0" } diff --git a/package.json b/package.json index 5c13f98282355539ea585f7d984bdc640b0b71dd..5964b038381a5c615cb82302a56ccf18c8441386 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "primeicons": "1.0.0", "primeng": "8.0.1", "rxjs": "6.5.2", - "solidify-frontend": "0.1.6", + "solidify-frontend": "0.1.7", "sync-pom-version-to-package": "1.3.1", "ts-key-enum": "2.0.0", "tslib": "1.10.0", diff --git a/src/app/app.module.ts b/src/app/app.module.ts index ffeaafda8cfcaaa3b5acf975a0fdcba5093ebbed..c0a87a565aa28372b66a52cc3b7cd19dbe23dd3b 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -28,7 +28,6 @@ import {UserDialog} from "@app/components/dialogs/user/user.dialog"; import {AvatarPresentational} from "@app/components/presentationals/avatar/avatar.presentational"; import {MainToolbarDesktopVerticalPresentational} from "@app/components/presentationals/main-toolbar/main-toolbar-desktop-vertical/main-toolbar-desktop-vertical.presentational"; import {MainToolbarMobilePresentational} from "@app/components/presentationals/main-toolbar/main-toolbar-mobile/main-toolbar-mobile.presentational"; -import {PersonForm} from "@app/components/presentationals/person-form/person-form"; import {ThemeSelectorPresentational} from "@app/components/presentationals/theme-selector/theme-selector.presentational"; import {UserForm} from "@app/components/presentationals/user-form/user-form"; import {InMemoryStorage} from "@app/in-memory.storage"; @@ -72,7 +71,6 @@ const presentationals = [ ThemeSelectorPresentational, AvatarPresentational, UserForm, - PersonForm, ]; const dialogs = [ diff --git a/src/app/components/dialogs/user/user.dialog.ts b/src/app/components/dialogs/user/user.dialog.ts index 5d58f9e2517ea395aac07b24bcc880a40ca56028..6fa21941dcc8209c3668303a63b86661a628ebe7 100644 --- a/src/app/components/dialogs/user/user.dialog.ts +++ b/src/app/components/dialogs/user/user.dialog.ts @@ -10,7 +10,6 @@ import { MAT_DIALOG_DATA, MatDialogRef, } from "@angular/material/dialog"; -import {PersonForm} from "@app/components/presentationals/person-form/person-form"; import {Person} from "@app/generated-api"; import {AppPersonAction} from "@app/stores/person/app-person.action"; import { @@ -18,6 +17,7 @@ import { Store, } from "@ngxs/store"; import {SharedAbstractContainer} from "@shared/components/containers/shared-abstract/shared-abstract.container"; +import {SharedPersonForm} from "@shared/components/presentationals/shared-person-form/shared-person-form"; import {UserExtended} from "@shared/models/business/user-extended.model"; import {LocalStateModel} from "@shared/models/local-state.model"; import {Observable} from "rxjs"; @@ -37,7 +37,7 @@ export class UserDialog extends SharedAbstractContainer implements OnInit { @Select((state: LocalStateModel) => StoreUtil.isLoadingState(state.application.application_person)) isLoadingPersonObs: Observable<boolean>; @ViewChild("formPresentational", {static: false}) - readonly formPresentational: PersonForm; + readonly formPresentational: SharedPersonForm; constructor(protected store: Store, protected dialogRef: MatDialogRef<UserDialog>, diff --git a/src/app/components/presentationals/person-form/person-form.html b/src/app/components/presentationals/person-form/person-form.html deleted file mode 100644 index fc0a1a51f887c6f35e9ec31937fa7c4f1934ae4e..0000000000000000000000000000000000000000 --- a/src/app/components/presentationals/person-form/person-form.html +++ /dev/null @@ -1,31 +0,0 @@ -<form [formGroup]="form"> - <mat-form-field *ngIf="getFormControl(formDefinition.firstName) as fd"> - <mat-label>{{'app.user.personal.form.firstName' | translate }}</mat-label> - <input matInput - dlcmValidation - [formControl]="fd" - [required]="formValidationHelper.hasRequiredField(fd)" - > - <mat-error>{{formValidationHelper.getFormError(fd)}}</mat-error> - </mat-form-field> - - <mat-form-field *ngIf="getFormControl(formDefinition.lastName) as fd"> - <mat-label>{{'app.user.personal.form.lastName' | translate }}</mat-label> - <input matInput - dlcmValidation - [formControl]="fd" - [required]="formValidationHelper.hasRequiredField(fd)" - > - <mat-error>{{formValidationHelper.getFormError(fd)}}</mat-error> - </mat-form-field> - - <mat-form-field *ngIf="getFormControl(formDefinition.orcid) as fd"> - <mat-label>{{'app.user.personal.form.orcid' | translate }}</mat-label> - <input matInput - dlcmValidation - [formControl]="fd" - [required]="formValidationHelper.hasRequiredField(fd)" - > - <mat-error>{{formValidationHelper.getFormError(fd)}}</mat-error> - </mat-form-field> -</form> diff --git a/src/app/components/presentationals/person-form/person-form.ts b/src/app/components/presentationals/person-form/person-form.ts deleted file mode 100644 index 7dd579ef8d731e937bcc69b73260285d63f305d1..0000000000000000000000000000000000000000 --- a/src/app/components/presentationals/person-form/person-form.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { - ChangeDetectionStrategy, - ChangeDetectorRef, - Component, -} from "@angular/core"; -import { - FormBuilder, - Validators, -} from "@angular/forms"; -import {PersonExtended} from "@app/features/admin/models/person-extended.model"; -import {SharedAbstractFormPresentational} from "@app/shared/components/presentationals/shared-abstract-form/shared-abstract-form.presentational"; -import {BaseFormDefinition} from "@app/shared/models/base-form-definition.model"; -import { - PropertyName, - SolidifyValidator, -} from "solidify-frontend"; - -@Component({ - selector: "dlcm-person-form", - templateUrl: "./person-form.html", - styleUrls: ["../../../shared/components/presentationals/shared-abstract-form/shared-abstract-form.presentational.scss"], - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class PersonForm extends SharedAbstractFormPresentational<PersonExtended> { - formDefinition: FormComponentFormDefinition = new FormComponentFormDefinition(); - - constructor(protected readonly _changeDetectorRef: ChangeDetectorRef, - private readonly _fb: FormBuilder) { - super(_changeDetectorRef); - } - - protected bindFormTo(person: PersonExtended): void { - this.form = this._fb.group({ - [this.formDefinition.firstName]: [person.firstName, [Validators.required, SolidifyValidator]], - [this.formDefinition.lastName]: [person.lastName, [Validators.required, SolidifyValidator]], - [this.formDefinition.orcid]: [person.orcid], - }); - } - - protected initNewForm(): void { - this.form = this._fb.group({ - [this.formDefinition.firstName]: ["", [Validators.required, SolidifyValidator]], - [this.formDefinition.lastName]: ["", [Validators.required, SolidifyValidator]], - [this.formDefinition.orcid]: [""], - }); - } - - protected treatmentBeforeSubmit(person: PersonExtended): PersonExtended { - return person; - } -} - -class FormComponentFormDefinition extends BaseFormDefinition { - @PropertyName() firstName: string; - @PropertyName() lastName: string; - @PropertyName() orcid: string; -} diff --git a/src/app/features/deposit/components/dialogs/deposit-person-alternative/deposit-person-alternative.dialog.html b/src/app/features/deposit/components/dialogs/deposit-person-alternative/deposit-person-alternative.dialog.html new file mode 100644 index 0000000000000000000000000000000000000000..4c9e05d1038e44f1a5c578a2308234f9b7d3a84e --- /dev/null +++ b/src/app/features/deposit/components/dialogs/deposit-person-alternative/deposit-person-alternative.dialog.html @@ -0,0 +1,45 @@ +<h1 mat-dialog-title + class="header" +>{{'deposit.popup.person.alternative.title' | translate}}</h1> +<div mat-dialog-content + class="content" +> + <div class="explanation">{{'deposit.popup.person.alternative.explanation' | translate}}</div> + <div class="warning">{{'deposit.popup.person.alternative.warning' | translate}}</div> + + <mat-list> + <h3 mat-subheader>{{'deposit.popup.person.alternative.subtitle.yourInput' | translate}}</h3> + <mat-list-item (click)="select(data.newPerson, true)" + [class.is-active]="isSelected(data.newPerson)" + > + <mat-icon mat-list-icon>person_add</mat-icon> + <h4 mat-line><span class="firstName">{{data.newPerson.firstName}}</span> {{data.newPerson.lastName}}</h4> + <p mat-line>{{data.newPerson.orcid}}</p> + </mat-list-item> + <mat-divider></mat-divider> + <h3 mat-subheader>{{'deposit.popup.person.alternative.subtitle.matchingPersons' | translate}}</h3> + <mat-list-item *ngFor="let person of data.listExistingPerson" + (click)="select(person, false)" + [class.is-active]="isSelected(person)" + > + <mat-icon mat-list-icon>person</mat-icon> + <h4 mat-line><span class="firstName">{{person.firstName}}</span> {{person.lastName}}</h4> + <p mat-line>{{person.orcid}}</p> + </mat-list-item> + </mat-list> + +</div> +<div mat-dialog-actions + class="footer" +> + <button mat-button + [mat-dialog-close]="" + cdkFocusInitial + >{{'deposit.popup.person.alternative.button.close' | translate}}</button> + <button mat-flat-button + color="primary" + [disabled]="!selectedDepositPerson" + (click)="submit()" + >{{'deposit.popup.person.alternative.button.submit' | translate}} + </button> +</div> diff --git a/src/app/features/deposit/components/dialogs/deposit-person-alternative/deposit-person-alternative.dialog.scss b/src/app/features/deposit/components/dialogs/deposit-person-alternative/deposit-person-alternative.dialog.scss new file mode 100644 index 0000000000000000000000000000000000000000..2613d05b7d1bd86f00ef8d91b6376f380989a652 --- /dev/null +++ b/src/app/features/deposit/components/dialogs/deposit-person-alternative/deposit-person-alternative.dialog.scss @@ -0,0 +1,38 @@ +@import "../sass/abstracts/variables"; +@import "../sass/abstracts/mixins"; + +:host { + .header { + text-align: center; + } + + .content { + .explanation { + padding-bottom: 10px; + white-space: pre; + } + + .warning { + color: $warning; + padding-bottom: 20px; + } + + ::ng-deep .mat-list-item { + cursor: pointer; + + &.is-active { + background-color: $extra-light-grey; + } + } + + .firstName { + font-style: italic; + padding-right: 6px; + } + } + + .footer { + display: flex; + justify-content: space-between; + } +} diff --git a/src/app/features/deposit/components/dialogs/deposit-person-alternative/deposit-person-alternative.dialog.ts b/src/app/features/deposit/components/dialogs/deposit-person-alternative/deposit-person-alternative.dialog.ts new file mode 100644 index 0000000000000000000000000000000000000000..1539c5c1ce6f2de21a3b01f2ee8bf545f001764b --- /dev/null +++ b/src/app/features/deposit/components/dialogs/deposit-person-alternative/deposit-person-alternative.dialog.ts @@ -0,0 +1,55 @@ +import {PersonExtended} from "@admin/models/person-extended.model"; +import { + ChangeDetectionStrategy, + Component, + Inject, +} from "@angular/core"; +import { + MAT_DIALOG_DATA, + MatDialogRef, +} from "@angular/material/dialog"; +import {SharedAbstractContainer} from "@shared/components/containers/shared-abstract/shared-abstract.container"; +import {isNullOrUndefined} from "solidify-frontend"; + +@Component({ + selector: "dlcm-deposit-alternative-dialog", + templateUrl: "./deposit-person-alternative.dialog.html", + styleUrls: ["./deposit-person-alternative.dialog.scss"], + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class DepositPersonAlternativeDialog extends SharedAbstractContainer { + selectedDepositPerson: AlternativeDepositPersonSelected; + + constructor(private readonly dialogRef: MatDialogRef<DepositPersonAlternativeDialog>, + @Inject(MAT_DIALOG_DATA) public data: AlternativeDepositPersonWrapper) { + super(); + } + + submit(): void { + this.dialogRef.close(this.selectedDepositPerson); + } + + select(selected: PersonExtended, isNew: boolean): void { + this.selectedDepositPerson = { + selected: selected, + isNew: isNew, + }; + } + + isSelected(current: PersonExtended): boolean { + if (isNullOrUndefined(this.selectedDepositPerson)) { + return false; + } + return current === this.selectedDepositPerson.selected; + } +} + +export interface AlternativeDepositPersonWrapper { + newPerson: PersonExtended; + listExistingPerson: PersonExtended[]; +} + +export interface AlternativeDepositPersonSelected { + selected: PersonExtended; + isNew: boolean; +} diff --git a/src/app/features/deposit/components/dialogs/deposit-person/deposit-person.dialog.ts b/src/app/features/deposit/components/dialogs/deposit-person/deposit-person.dialog.ts index 5fbf19c2197a4cfbeff5be1784f9e321a2389e52..d4d2c263525c7e985bf46fc2f357d9fc4ea1ca2f 100644 --- a/src/app/features/deposit/components/dialogs/deposit-person/deposit-person.dialog.ts +++ b/src/app/features/deposit/components/dialogs/deposit-person/deposit-person.dialog.ts @@ -2,50 +2,66 @@ import {PersonExtended} from "@admin/models/person-extended.model"; import { ChangeDetectionStrategy, Component, - Inject, - OnInit, + ViewChild, } from "@angular/core"; import { - MAT_DIALOG_DATA, + MatDialog, MatDialogRef, } from "@angular/material/dialog"; +import { + AlternativeDepositPersonSelected, + AlternativeDepositPersonWrapper, + DepositPersonAlternativeDialog, +} from "@deposit/components/dialogs/deposit-person-alternative/deposit-person-alternative.dialog"; import {Store} from "@ngxs/store"; import {SharedAbstractContainer} from "@shared/components/containers/shared-abstract/shared-abstract.container"; -import {UserExtended} from "@shared/models/business/user-extended.model"; +import {SharedPersonForm} from "@shared/components/presentationals/shared-person-form/shared-person-form"; import {LocalStateModel} from "@shared/models/local-state.model"; import {SharedPersonAction} from "@shared/stores/person/shared-person.action"; import {tap} from "rxjs/operators"; import { + isEmptyArray, + isNullOrUndefined, ModelFormControlEvent, NotificationService, TRANSLATE, } from "solidify-frontend"; @Component({ - selector: "dlcm-deposit-user-dialog", + selector: "dlcm-deposit-person-dialog", templateUrl: "./deposit-person.dialog.html", styleUrls: ["./deposit-person.dialog.scss"], changeDetection: ChangeDetectionStrategy.OnPush, }) -export class DepositPersonDialog extends SharedAbstractContainer implements OnInit { - // @Select((state: LocalStateModel) => state.application.application_person.current) currentPersonObs: Observable<Person>; - // @Select((state: LocalStateModel) => StoreUtil.isLoadingState(state.application.application_person)) isLoadingPersonObs: Observable<boolean>; - - // @ViewChild("formPresentational", {static: false}) - // readonly formPresentational: PersonForm; +export class DepositPersonDialog extends SharedAbstractContainer { + @ViewChild("formPresentational", {static: false}) + readonly formPresentational: SharedPersonForm; - constructor(protected store: Store, - protected dialogRef: MatDialogRef<DepositPersonDialog>, - @Inject(MAT_DIALOG_DATA) public user: UserExtended, - private notificationService: NotificationService) { + constructor(protected readonly store: Store, + protected readonly dialogRef: MatDialogRef<DepositPersonDialog>, + private readonly notificationService: NotificationService, + private readonly dialog: MatDialog) { super(); } - ngOnInit(): void { - // this.store.dispatch(new AppPersonAction.GetById(this.user.person.resId)); + savePerson($event: ModelFormControlEvent<PersonExtended>): void { + this.checkSimilarPerson($event); } - savePerson($event: ModelFormControlEvent<PersonExtended>): void { + private checkSimilarPerson($event: ModelFormControlEvent<PersonExtended>): void { + this.subscribe(this.store.dispatch(new SharedPersonAction.Search($event.model)).pipe( + tap((state: LocalStateModel) => { + const listPersonMatching = state.shared.shared_person.listPersonMatching; + if (isNullOrUndefined(listPersonMatching) || isEmptyArray(listPersonMatching)) { + this.createPerson($event); + } else { + this.openAlternativeDialog($event, listPersonMatching); + } + }), + )); + } + + private createPerson($event: ModelFormControlEvent<PersonExtended>): void { const obs = this.store.dispatch(new SharedPersonAction.Create($event)); this.subscribe(obs.pipe( @@ -64,4 +80,24 @@ export class DepositPersonDialog extends SharedAbstractContainer implements OnIn private isSamePerson(currentPersonInModal: PersonExtended, currentPersonInState: PersonExtended): boolean { return currentPersonInModal.firstName === currentPersonInState.firstName && currentPersonInModal.lastName === currentPersonInState.lastName && currentPersonInModal.orcid === currentPersonInState.orcid; } + + private openAlternativeDialog(newPerson: ModelFormControlEvent<PersonExtended>, listMatchingPerson: PersonExtended[]): void { + this.subscribe(this.dialog.open(DepositPersonAlternativeDialog, { + data: { + listExistingPerson: listMatchingPerson, + newPerson: newPerson.model, + } as AlternativeDepositPersonWrapper, + }).afterClosed().pipe( + tap((depositPersonSelected: AlternativeDepositPersonSelected) => { + if (isNullOrUndefined(depositPersonSelected)) { + return; + } + if (depositPersonSelected.isNew) { + this.createPerson(newPerson); + } else { + this.dialogRef.close(depositPersonSelected.selected); + } + }), + )); + } } diff --git a/src/app/features/deposit/deposit.module.ts b/src/app/features/deposit/deposit.module.ts index 64c5af69a65e637f22a1480d72be517822876575..16ddc94952f80dc42d3274557cf3161df7e22f43 100644 --- a/src/app/features/deposit/deposit.module.ts +++ b/src/app/features/deposit/deposit.module.ts @@ -12,6 +12,7 @@ import {DepositDataFileState} from "@app/features/deposit/stores/data-file/depos import {DepositState} from "@app/features/deposit/stores/deposit.state"; import {DepositPeopleState} from "@app/features/deposit/stores/people/deposit-people.state"; import {SharedModule} from "@app/shared/shared.module"; +import {DepositPersonAlternativeDialog} from "@deposit/components/dialogs/deposit-person-alternative/deposit-person-alternative.dialog"; import {DepositPersonDialog} from "@deposit/components/dialogs/deposit-person/deposit-person.dialog"; import {TranslateModule} from "@ngx-translate/core"; import {NgxsModule} from "@ngxs/store"; @@ -34,6 +35,7 @@ const dialogs = [ DepositFileDetailDialog, DepositFileUploadDialog, DepositPersonDialog, + DepositPersonAlternativeDialog, ]; const presentationals = [ DepositFormPresentational, diff --git a/src/app/shared/stores/person/shared-person.action.ts b/src/app/shared/stores/person/shared-person.action.ts index aa2956ef025e6355592e3e7e0ce1e0ea937cc19e..1b3a08b00242b542a831275da9a0521062397bb0 100644 --- a/src/app/shared/stores/person/shared-person.action.ts +++ b/src/app/shared/stores/person/shared-person.action.ts @@ -1,4 +1,5 @@ import {PersonExtended} from "@admin/models/person-extended.model"; +import {Person} from "@app/generated-api"; import { ResourceAction, ResourceNameSpace, @@ -84,6 +85,27 @@ export namespace SharedPersonAction { @TypeDefaultAction(state) export class DeleteFail extends ResourceAction.DeleteFail { } + + export class Search { + static readonly type: string = `[${state}] Search`; + + constructor(public person: Person) { + } + } + + export class SearchSuccess { + static readonly type: string = `[${state}] Search Success`; + + constructor(public list: PersonExtended[]) { + } + } + + export class SearchFail { + static readonly type: string = `[${state}] Search Fail`; + + constructor() { + } + } } export const sharedPersonActionNameSpace: ResourceNameSpace = SharedPersonAction; diff --git a/src/app/shared/stores/person/shared-person.state.ts b/src/app/shared/stores/person/shared-person.state.ts index 142f4741561edcac9e12f35fc83fbf7ed1034795..3964e7350723abd315d2b37596c6a7a8aa9749bd 100644 --- a/src/app/shared/stores/person/shared-person.state.ts +++ b/src/app/shared/stores/person/shared-person.state.ts @@ -1,14 +1,25 @@ import {PersonExtended} from "@admin/models/person-extended.model"; import {AdminResourceApiEnum} from "@app/shared/enums/api.enum"; import {LocalStateEnum} from "@app/shared/enums/local-state.enum"; -import {sharedPersonActionNameSpace} from "@app/shared/stores/person/shared-person.action"; import { + SharedPersonAction, + sharedPersonActionNameSpace, +} from "@app/shared/stores/person/shared-person.action"; +import { + Action, Actions, State, + StateContext, Store, } from "@ngxs/store"; +import {Observable} from "rxjs"; +import { + catchError, + tap, +} from "rxjs/operators"; import { ApiService, + CollectionTyped, defaultResourceStateInitValue, NotificationService, QueryParameters, @@ -19,12 +30,14 @@ import { import {environment} from "../../../../environments/environment"; export interface SharedPersonStateModel extends ResourceStateModel<PersonExtended> { + listPersonMatching: PersonExtended[]; } @State<SharedPersonStateModel>({ name: LocalStateEnum.shared_person, defaults: { ...defaultResourceStateInitValue, + listPersonMatching: [], queryParameters: new QueryParameters(environment.defaultEnumValuePageSizeOption), }, }) @@ -42,4 +55,30 @@ export class SharedPersonState extends ResourceState<PersonExtended> { notificationResourceUpdateTextToTranslate: TRANSLATE("shared.person.notification.resource.update"), }); } + + @Action(SharedPersonAction.Search) + search(ctx: StateContext<SharedPersonStateModel>, action: SharedPersonAction.Search): Observable<CollectionTyped<PersonExtended>> { + const map = new Map<string, string>(); + map.set("firstName", action.person.firstName); + map.set("lastName", action.person.lastName); + const queryParameters = new QueryParameters(); + queryParameters.search = { + searchItems: map, + }; + return this.apiService.get<PersonExtended>(this._urlResource, queryParameters) + .pipe( + tap(collection => ctx.dispatch(new SharedPersonAction.SearchSuccess(collection._data))), + catchError(error => { + ctx.dispatch(new SharedPersonAction.SearchFail()); + throw error; + }), + ); + } + + @Action(SharedPersonAction.SearchSuccess) + searchSuccess(ctx: StateContext<SharedPersonStateModel>, action: SharedPersonAction.SearchSuccess): void { + ctx.patchState({ + listPersonMatching: action.list, + }); + } } diff --git a/src/assets/i18n/de.json b/src/assets/i18n/de.json index 8acdebe25e9861c9b7c5a2f0cee17ff327406112..8a4517446be575c3d2b25ba562e72b5f2e7af81c 100644 --- a/src/assets/i18n/de.json +++ b/src/assets/i18n/de.json @@ -730,6 +730,19 @@ "organizationUnit": "Organizational Unit", "popup": { "person": { + "alternative": { + "button": { + "close": "Close", + "submit": "Validate" + }, + "explanation": "You may be referring to an additional person below.\nPlease select the author to add to the deposit.", + "subtitle": { + "matchingPersons": "Matching persons", + "yourInput": "Your input" + }, + "title": "Existing people match!", + "warning": "Please do not create a duplicate." + }, "button": { "close": "Close", "submit": "Add" diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index d3a3cb7005f48d7d38e2030da57ea8db93313dda..5449def3c381f74a87efe5fbd56e6aa95e33316e 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -730,6 +730,19 @@ "organizationUnit": "Organizational Unit", "popup": { "person": { + "alternative": { + "button": { + "close": "Close", + "submit": "Validate" + }, + "explanation": "You may be referring to an additional person below.\nPlease select the author to add to the deposit.", + "subtitle": { + "matchingPersons": "Matching persons", + "yourInput": "Your input" + }, + "title": "Existing people match!", + "warning": "Please do not create a duplicate." + }, "button": { "close": "Close", "submit": "Add" diff --git a/src/assets/i18n/fr.json b/src/assets/i18n/fr.json index af28fc3c30006c52d77904692c61dc9287d2d172..03e1f9a304ae8e15407ad5b4e44a6e4254558308 100644 --- a/src/assets/i18n/fr.json +++ b/src/assets/i18n/fr.json @@ -730,6 +730,19 @@ "organizationUnit": "Unité organisationnelle", "popup": { "person": { + "alternative": { + "button": { + "close": "Annuler", + "submit": "Valider" + }, + "explanation": "Vous faites peut-être référence à une personne figurante ci-dessous.\nMerci de séléctionner l'auteur souhaité à ajouter au dépôt.", + "subtitle": { + "matchingPersons": "Personnes pouvant correspondre", + "yourInput": "Votre saisie" + }, + "title": "Des personnes existantes correspondent !", + "warning": "Merci de ne pas créer de doublon." + }, "button": { "close": "Fermer", "submit": "Ajouter"