Commit 25276694 authored by Florent POITTEVIN's avatar Florent POITTEVIN
Browse files

feat: 1200 enable search feature on dropdown list

- fix searchable multi select when not found selected item in list the first time
- fix click everywhere on input not open select modal
- 1221 enable search in dropdown list for person in org unit edit
- 1222 enable search in dropdown list for institution in org unit edit
- 1225 enable search in dropdown list for orgUnit in person edition
- 1226 enable search in dropdown list for institution in person edition
parent ea56fb1d
......@@ -137,50 +137,60 @@
[mode]="personOrgUnitRoleMode.person"
[selectedPersonOrOrgUnitRole]="selectedPersonRole"
[readonly]="readonly"
[listPerson]="listPerson"
[listRole]="listRole"
(navigate)="navigate($event)"
></dlcm-shared-person-orgunit-role>
<dlcm-shared-multi-select *ngIf="getFormControl(formDefinition.fundingAgencies) as fd"
[list]="listFundingAgencies"
[formControl]="fd"
[required]="formValidationHelper.hasRequiredField(fd)"
[labelKey]="'name'"
[valueKey]="'resId'"
[title]="'admin.organizationalUnit.form.fundingAgency.title' | translate"
[placeholder]="'admin.organizationalUnit.form.fundingAgency.placeholder' | translate"
[isWithLink]="true"
[tooltipNavigateToTranslate]="'admin.organizationalUnit.form.fundingAgency.navigateLinkPlaceholder' | translate"
(navigate)="navigateToFundingAgency($event)"
<dlcm-shared-searchable-multi-select *ngIf="getFormControl(formDefinition.fundingAgencies) as fd"
solidifyValidation
aria-label="funding agencies"
[resourceNameSpace]="sharedFundingAgencyActionNameSpace"
[state]="sharedFundingAgencyState"
[formControl]="fd"
[required]="formValidationHelper.hasRequiredField(fd)"
[labelKey]="'name'"
[valueKey]="'resId'"
[title]="'admin.organizationalUnit.form.fundingAgency.title' | translate"
[placeholder]="'admin.organizationalUnit.form.fundingAgency.placeholder' | translate"
[isWithLink]="true"
[tooltipNavigateToTranslate]="'admin.organizationalUnit.form.fundingAgency.navigateLinkPlaceholder' | translate"
(navigate)="navigateToFundingAgency($event)"
>
</dlcm-shared-multi-select>
</dlcm-shared-searchable-multi-select>
<dlcm-shared-multi-select *ngIf="getFormControl(formDefinition.institutions) as fd"
[list]="listInstitutions"
[formControl]="fd"
[required]="formValidationHelper.hasRequiredField(fd)"
[labelKey]="'name'"
[valueKey]="'resId'"
[title]="'admin.organizationalUnit.form.institutions.title' | translate"
[placeholder]="'admin.organizationalUnit.form.institutions.placeholder' | translate"
[isWithLink]="true"
[tooltipNavigateToTranslate]="'admin.organizationalUnit.form.institutions.navigateLinkPlaceholder' | translate"
(navigate)="navigateToInstitutions($event)"
<dlcm-shared-searchable-multi-select *ngIf="getFormControl(formDefinition.institutions) as fd"
solidifyValidation
aria-label="institution"
[resourceNameSpace]="sharedInstitutionActionNameSpace"
[state]="sharedInstitutionState"
[formControl]="fd"
[required]="formValidationHelper.hasRequiredField(fd)"
[labelKey]="'name'"
[valueKey]="'resId'"
[title]="'admin.organizationalUnit.form.institutions.title' | translate"
[placeholder]="'admin.organizationalUnit.form.institutions.placeholder' | translate"
[isWithLink]="true"
[tooltipNavigateToTranslate]="'admin.organizationalUnit.form.institutions.navigateLinkPlaceholder' | translate"
(navigate)="navigateToInstitution($event)"
>
</dlcm-shared-multi-select>
</dlcm-shared-searchable-multi-select>
<dlcm-shared-multi-select *ngIf="getFormControl(formDefinition.researchDomains) as fd"
[list]="listResearchDomains"
[formControl]="fd"
[required]="formValidationHelper.hasRequiredField(fd)"
[labelKey]="'name'"
[valueKey]="'resId'"
[title]="'admin.organizationalUnit.form.researchDomains.title' | translate"
[placeholder]="'admin.organizationalUnit.form.researchDomains.placeholder' | translate"
[isWithLink]="false"
<dlcm-shared-searchable-multi-select *ngIf="getFormControl(formDefinition.researchDomains) as fd"
solidifyValidation
aria-label="research domain"
[resourceNameSpace]="sharedResearchDomainActionNameSpace"
[state]="sharedResearchDomainState"
[formControl]="fd"
[required]="formValidationHelper.hasRequiredField(fd)"
[labelKey]="'name'"
[valueKey]="'resId'"
[title]="'admin.organizationalUnit.form.researchDomains.title' | translate"
[placeholder]="'admin.organizationalUnit.form.researchDomains.placeholder' | translate"
[isWithLink]="true"
[tooltipNavigateToTranslate]="'admin.organizationalUnit.form.researchDomains.navigateLinkPlaceholder' | translate"
(navigate)="navigateToResearchDomain($event)"
>
</dlcm-shared-multi-select>
</dlcm-shared-searchable-multi-select>
<dlcm-shared-keyword-input *ngIf="getFormControl(formDefinition.keywords) as fd"
[formControl]="fd"
......
import {PersonExtended} from "@admin/models/person-extended.model";
import {PersonRole} from "@admin/models/person-role.model";
import {
ChangeDetectionStrategy,
......@@ -10,6 +9,7 @@ import {
FormBuilder,
Validators,
} from "@angular/forms";
import {sharedResearchDomainActionNameSpace} from "@app/shared/stores/research-domain/shared-research-domain.action";
import {environment} from "@environments/environment";
import {
DisseminationPolicy,
......@@ -30,11 +30,17 @@ import {
} from "@shared/enums/routes.enum";
import {BaseFormDefinition} from "@shared/models/base-form-definition.model";
import {BreakpointService} from "@shared/services/breakpoint.service";
import {sharedFundingAgencyActionNameSpace} from "@shared/stores/funding-agency/shared-funding-agency.action";
import {SharedFundingAgencyState} from "@shared/stores/funding-agency/shared-funding-agency.state";
import {sharedInstitutionActionNameSpace} from "@shared/stores/institution/shared-institution.action";
import {SharedInstitutionState} from "@shared/stores/institution/shared-institution.state";
import {SharedResearchDomainState} from "@shared/stores/research-domain/shared-research-domain.state";
import {RegexpUtil} from "@shared/utils/regexp.util";
import _ from "lodash";
import {
DateUtil,
PropertyName,
ResourceNameSpace,
SolidifyValidator,
urlSeparator,
} from "solidify-frontend";
......@@ -76,19 +82,16 @@ export class AdminOrgunitFormPresentational extends SharedAbstractFormPresentati
listDisseminationPolicies: DisseminationPolicy[];
@Input()
listFundingAgencies: FundingAgency[];
listRole: Role[];
@Input()
listInstitutions: Institution[];
sharedInstitutionActionNameSpace: ResourceNameSpace = sharedInstitutionActionNameSpace;
sharedInstitutionState: typeof SharedInstitutionState = SharedInstitutionState;
@Input()
listPerson: PersonExtended[];
sharedFundingAgencyActionNameSpace: ResourceNameSpace = sharedFundingAgencyActionNameSpace;
sharedFundingAgencyState: typeof SharedFundingAgencyState = SharedFundingAgencyState;
@Input()
listRole: Role[];
@Input()
listResearchDomains: ResearchDomain[];
sharedResearchDomainActionNameSpace: ResourceNameSpace = sharedResearchDomainActionNameSpace;
sharedResearchDomainState: typeof SharedResearchDomainState = SharedResearchDomainState;
readonly TIME_BEFORE_DISPLAY_TOOLTIP: number = environment.timeBeforeDisplayTooltipOnInput;
......@@ -207,9 +210,13 @@ export class AdminOrgunitFormPresentational extends SharedAbstractFormPresentati
this.navigate([RoutesEnum.adminFundingAgenciesDetail, fundingAgency.resId]);
}
navigateToInstitutions(institution: Institution): void {
navigateToInstitution(institution: Institution): void {
this.navigate([RoutesEnum.adminInstitutionDetail, institution.resId]);
}
navigateToResearchDomain(researchDomain: ResearchDomain): void {
this.navigate([RoutesEnum.adminResearchDomain]);
}
}
class FormComponentFormDefinition extends BaseFormDefinition {
......
<lib-empty-container
dlcmShortCuts
(onEscape)="backToList()"
dlcmShortCuts
(onEscape)="backToList()"
>
<dlcm-button-toolbar-detail [mode]="'create'"
(backToListChange)="backToList()"
>
</dlcm-button-toolbar-detail>
<dlcm-button-toolbar-detail [mode]="'create'"
(backToListChange)="backToList()"
>
</dlcm-button-toolbar-detail>
<div class="wrapper"
[dlcmSpinner]="isLoadingWithDependencyObs | async"
>
<dlcm-admin-orgunit-form #formPresentational
[solidifyFocusFirstElement]="true"
*ngIf="isReadyToBeDisplayedInCreateModeObs | async"
[listSubmissionPolicies]="listSubmissionPoliciesObs | async"
[listPreservationPolicies]="listPreservationPoliciesObs | async"
[listDisseminationPolicies]="listDisseminationPoliciesObs | async"
[listPerson]="listPersonObs | async"
[listRole]="listRoleObs | async"
[listInstitutions]="listInstitutionsObs | async"
[listFundingAgencies]="listFundingAgenciesObs | async"
(submitChange)="create($event)"
[selectedFundingAgencies]="selectedFundingAgenciesObs | async"
[selectedInstitutions]="selectedInstitutionsObs | async"
[selectedPersonRole]="selectedPersonRole"
(checkAvailableChange)="checkAvailable($event)"
(dirtyChange)="updateCanDeactivate($event)"
(navigate)="navigate($event)"
[listResearchDomains]="listResearchDomainObs | async"
<div class="wrapper"
[dlcmSpinner]="isLoadingWithDependencyObs | async"
>
</dlcm-admin-orgunit-form>
</div>
<dlcm-admin-orgunit-form #formPresentational
[solidifyFocusFirstElement]="true"
*ngIf="isReadyToBeDisplayedInCreateModeObs | async"
[listSubmissionPolicies]="listSubmissionPoliciesObs | async"
[listPreservationPolicies]="listPreservationPoliciesObs | async"
[listDisseminationPolicies]="listDisseminationPoliciesObs | async"
[listRole]="listRoleObs | async"
(submitChange)="create($event)"
[selectedFundingAgencies]="selectedFundingAgenciesObs | async"
[selectedInstitutions]="selectedInstitutionsObs | async"
[selectedPersonRole]="selectedPersonRole"
(checkAvailableChange)="checkAvailable($event)"
(dirtyChange)="updateCanDeactivate($event)"
(navigate)="navigate($event)"
>
</dlcm-admin-orgunit-form>
</div>
</lib-empty-container>
import {PersonExtended} from "@admin/models/person-extended.model";
import {PersonRole} from "@admin/models/person-role.model";
import {adminOrgUnitActionNameSpace} from "@admin/orgunit/stores/admin-organizational-unit.action";
import {
......@@ -17,7 +16,6 @@ import {
Institution,
OrganizationalUnit,
PreservationPolicy,
ResearchDomain,
Role,
SubmissionPolicy,
} from "@models";
......@@ -49,11 +47,7 @@ export class AdminOrgunitCreateRoutable extends SharedAbstractCreateRoutable<Org
@Select(AdminOrganizationalUnitState.isReadyToBeDisplayedInCreateMode) isReadyToBeDisplayedInCreateModeObs: Observable<boolean>;
@Select((state: LocalStateModel) => state.shared.shared_preservationPolicy.list) listPreservationPoliciesObs: Observable<PreservationPolicy[]>;
@Select((state: LocalStateModel) => state.shared.shared_disseminationPolicy.list) listDisseminationPoliciesObs: Observable<DisseminationPolicy[]>;
@Select((state: LocalStateModel) => state.shared.shared_person.list) listPersonObs: Observable<PersonExtended[]>;
@Select((state: LocalStateModel) => state.shared.shared_role.list) listRoleObs: Observable<Role[]>;
@Select((state: LocalStateModel) => state.shared.shared_fundingAgency.list) listFundingAgenciesObs: Observable<FundingAgency[]>;
@Select((state: LocalStateModel) => state.shared.shared_institution.list) listInstitutionsObs: Observable<Institution[]>;
@Select((state: LocalStateModel) => state.shared.shared_researchDomain.list) listResearchDomainObs: Observable<ResearchDomain[]>;
@Select((state: LocalStateModel) => state.admin.admin_organizationalUnit.admin_organizationalUnit_fundingAgency.selected) selectedFundingAgenciesObs: Observable<FundingAgency[]>;
@Select((state: LocalStateModel) => state.admin.admin_organizationalUnit.admin_organizationalUnit_institution.selected) selectedInstitutionsObs: Observable<Institution[]>;
selectedPersonRole: PersonRole[] = [
......
<lib-empty-container
cdkTrapFocus
solidifyShortCuts
[solidifyFocusFirstElement]="true"
(onEscape)="backToList()"
cdkTrapFocus
solidifyShortCuts
[solidifyFocusFirstElement]="true"
(onEscape)="backToList()"
>
<dlcm-shared-banner-edit-mode [isEdit]="isEdit"></dlcm-shared-banner-edit-mode>
<dlcm-shared-banner-edit-mode [isEdit]="isEdit"></dlcm-shared-banner-edit-mode>
<dlcm-button-toolbar-detail [mode]="isEdit ? 'edit' : 'detail'"
[currentModel]="currentObs | async"
(editChange)="edit()"
(deleteChange)="delete()"
(backToDetailChange)="backToDetail()"
(backToListChange)="backToList()"
>
</dlcm-button-toolbar-detail>
<dlcm-button-toolbar-detail [mode]="isEdit ? 'edit' : 'detail'"
[currentModel]="currentObs | async"
(editChange)="edit()"
(deleteChange)="delete()"
(backToDetailChange)="backToDetail()"
(backToListChange)="backToList()"
>
</dlcm-button-toolbar-detail>
<div class="wrapper"
[dlcmSpinner]="isLoadingWithDependencyObs | async"
>
<dlcm-admin-orgunit-form #formPresentational
[solidifyFocusFirstElement]="isEdit"
*ngIf="isReadyToBeDisplayedObs | async"
[model]="currentObs| async"
[selectedSubmissionPolicies]="selectedSubmissionPoliciesObs | async"
[selectedPreservationPolicies]="selectedPreservationPoliciesObs | async"
[selectedDisseminationPolicies]="selectedDisseminationPoliciesObs | async"
[selectedPersonRole]="selectedPersonRoleObs | async"
[selectedFundingAgencies]="selectedFundingAgenciesObs | async"
[selectedInstitutions]="selectedInstitutionsObs | async"
[listSubmissionPolicies]="listSubmissionPoliciesObs | async"
[listPreservationPolicies]="listPreservationPoliciesObs | async"
[listDisseminationPolicies]="listDisseminationPoliciesObs | async"
[listPerson]="listPersonObs | async"
[listRole]="listRoleObs | async"
[listFundingAgencies]="listFundingAgenciesObs | async"
[listInstitutions]="listInstitutionsObs | async"
[listResearchDomains]="listResearchDomainObs | async"
[readonly]="!isEdit"
(checkAvailableChange)="checkAvailable($event)"
(submitChange)="update($event)"
(dirtyChange)="updateCanDeactivate($event)"
(navigate)="navigate($event)"
></dlcm-admin-orgunit-form>
</div>
<div class="wrapper"
[dlcmSpinner]="isLoadingWithDependencyObs | async"
>
<dlcm-admin-orgunit-form #formPresentational
[solidifyFocusFirstElement]="isEdit"
*ngIf="isReadyToBeDisplayedObs | async"
[model]="currentObs| async"
[selectedSubmissionPolicies]="selectedSubmissionPoliciesObs | async"
[selectedPreservationPolicies]="selectedPreservationPoliciesObs | async"
[selectedDisseminationPolicies]="selectedDisseminationPoliciesObs | async"
[selectedPersonRole]="selectedPersonRoleObs | async"
[selectedFundingAgencies]="selectedFundingAgenciesObs | async"
[selectedInstitutions]="selectedInstitutionsObs | async"
[listSubmissionPolicies]="listSubmissionPoliciesObs | async"
[listPreservationPolicies]="listPreservationPoliciesObs | async"
[listDisseminationPolicies]="listDisseminationPoliciesObs | async"
[listRole]="listRoleObs | async"
[readonly]="!isEdit"
(checkAvailableChange)="checkAvailable($event)"
(submitChange)="update($event)"
(dirtyChange)="updateCanDeactivate($event)"
(navigate)="navigate($event)"
></dlcm-admin-orgunit-form>
</div>
</lib-empty-container>
import {PersonExtended} from "@admin/models/person-extended.model";
import {PersonRole} from "@admin/models/person-role.model";
import {adminOrgUnitActionNameSpace} from "@admin/orgunit/stores/admin-organizational-unit.action";
import {
......@@ -25,7 +24,6 @@ import {
Institution,
OrganizationalUnit,
PreservationPolicy,
ResearchDomain,
Role,
SubmissionPolicy,
} from "@models";
......@@ -56,11 +54,7 @@ export class AdminOrgunitDetailEditRoutable extends SharedAbstractDetailEditComm
@Select((state: LocalStateModel) => state.shared.shared_submissionPolicy.list) listSubmissionPoliciesObs: Observable<SubmissionPolicy[]>;
@Select((state: LocalStateModel) => state.shared.shared_preservationPolicy.list) listPreservationPoliciesObs: Observable<PreservationPolicy[]>;
@Select((state: LocalStateModel) => state.shared.shared_disseminationPolicy.list) listDisseminationPoliciesObs: Observable<DisseminationPolicy[]>;
@Select((state: LocalStateModel) => state.shared.shared_person.list) listPersonObs: Observable<PersonExtended[]>;
@Select((state: LocalStateModel) => state.shared.shared_role.list) listRoleObs: Observable<Role[]>;
@Select((state: LocalStateModel) => state.shared.shared_fundingAgency.list) listFundingAgenciesObs: Observable<FundingAgency[]>;
@Select((state: LocalStateModel) => state.shared.shared_institution.list) listInstitutionsObs: Observable<Institution[]>;
@Select((state: LocalStateModel) => state.shared.shared_researchDomain.list) listResearchDomainObs: Observable<ResearchDomain[]>;
@Select((state: LocalStateModel) => state.admin.admin_organizationalUnit.admin_organizationalUnit_personRole.selected) selectedPersonRoleObs: Observable<PersonRole[]>;
@Select((state: LocalStateModel) => state.admin.admin_organizationalUnit.admin_organizationalUnit_institution.selected) selectedInstitutionsObs: Observable<Institution[]>;
......
......@@ -47,11 +47,7 @@ import {AdminResourceApiEnum} from "@shared/enums/api.enum";
import {LocalStateEnum} from "@shared/enums/local-state.enum";
import {RoutesEnum} from "@shared/enums/routes.enum";
import {SharedDisseminationPolicyAction} from "@shared/stores/dissemination-policy/shared-dissemination-policy.action";
import {SharedFundingAgencyAction} from "@shared/stores/funding-agency/shared-funding-agency.action";
import {SharedInstitutionAction} from "@shared/stores/institution/shared-institution.action";
import {SharedPersonAction} from "@shared/stores/person/shared-person.action";
import {SharedPreservationPolicyAction} from "@shared/stores/preservation-policy/shared-preservation-policy.action";
import {SharedResearchDomainAction} from "@shared/stores/research-domain/shared-research-domain.action";
import {SharedRoleAction} from "@shared/stores/role/shared-role.action";
import {SharedSubmissionPolicyAction} from "@shared/stores/submission-policy/shared-submission-policy.action";
import {Observable} from "rxjs";
......@@ -195,13 +191,6 @@ export class AdminOrganizationalUnitState extends ResourceState<AdminOrganizatio
this.actions$.pipe(ofActionCompleted(SharedDisseminationPolicyAction.GetAllFail)),
],
},
{
action: new SharedPersonAction.GetAll(),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(SharedPersonAction.GetAllSuccess)),
this.actions$.pipe(ofActionCompleted(SharedPersonAction.GetAllFail)),
],
},
{
action: new SharedRoleAction.GetAll(),
subActionCompletions: [
......@@ -209,27 +198,6 @@ export class AdminOrganizationalUnitState extends ResourceState<AdminOrganizatio
this.actions$.pipe(ofActionCompleted(SharedRoleAction.GetAllFail)),
],
},
{
action: new SharedFundingAgencyAction.GetAll(),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(SharedFundingAgencyAction.GetAllSuccess)),
this.actions$.pipe(ofActionCompleted(SharedFundingAgencyAction.GetAllFail)),
],
},
{
action: new SharedInstitutionAction.GetAll(),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(SharedInstitutionAction.GetAllSuccess)),
this.actions$.pipe(ofActionCompleted(SharedInstitutionAction.GetAllFail)),
],
},
{
action: new SharedResearchDomainAction.GetAll(),
subActionCompletions: [
this.actions$.pipe(ofActionCompleted(SharedResearchDomainAction.GetAllSuccess)),
this.actions$.pipe(ofActionCompleted(SharedResearchDomainAction.GetAllFail)),
],
},
]).subscribe(success => {
if (success) {
ctx.dispatch(new AdminOrgUnitAction.LoadResourceSuccess(action));
......
......@@ -35,18 +35,23 @@
>
<mat-error>{{formValidationHelper.getFormError(fd)}}</mat-error>
</mat-form-field>
<dlcm-shared-multi-select [list]="listInstitutions"
[formControl]="form.get(formDefinition.institutions)"
[required]="isRequired(formDefinition.institutions)"
[labelKey]="'name'"
[valueKey]="'resId'"
[title]="'admin.person.form.institution.title' | translate"
[placeholder]="'admin.person.form.institution.placeholder' | translate"
[isWithLink]="true"
[tooltipNavigateToTranslate]="'admin.person.form.institution.navigateLinkPlaceholder' | translate"
(navigate)="navigateToInstitution($event)"
<dlcm-shared-searchable-multi-select *ngIf="getFormControl(formDefinition.institutions) as fd"
solidifyValidation
aria-label="institution"
[resourceNameSpace]="sharedInstitutionActionNameSpace"
[state]="sharedInstitutionState"
[formControl]="fd"
[required]="formValidationHelper.hasRequiredField(fd)"
[labelKey]="'name'"
[valueKey]="'resId'"
[title]="'admin.person.form.institution.title' | translate"
[placeholder]="'admin.person.form.institution.placeholder' | translate"
[isWithLink]="true"
[tooltipNavigateToTranslate]="'admin.person.form.institution.navigateLinkPlaceholder' | translate"
(navigate)="navigateToInstitution($event)"
>
</dlcm-shared-multi-select>
</dlcm-shared-searchable-multi-select>
<button dlcmAlternativeButton
(click)="navigateToContributor()"
......
......@@ -10,8 +10,8 @@ import {
FormBuilder,
Validators,
} from "@angular/forms";
import {sharedInstitutionActionNameSpace} from "@app/shared/stores/institution/shared-institution.action";
import {
AccessOrganizationalUnit,
Institution,
Role,
} from "@models";
......@@ -20,10 +20,12 @@ import {PersonOrgUnitRoleMode} from "@shared/components/presentationals/shared-p
import {LocalModelAttributeEnum} from "@shared/enums/model-attribute.enum";
import {RoutesEnum} from "@shared/enums/routes.enum";
import {BaseFormDefinition} from "@shared/models/base-form-definition.model";
import {SharedInstitutionState} from "@shared/stores/institution/shared-institution.state";
import _ from "lodash";
import {
isNullOrUndefined,
PropertyName,
ResourceNameSpace,
SolidifyValidator,
} from "solidify-frontend";
......@@ -42,15 +44,12 @@ export class AdminPersonFormPresentational extends SharedAbstractFormPresentatio
@Input()
selectedInstitutions: Institution[];
@Input()
listInstitutions: Institution[];
@Input()
listOrganizationalUnit: AccessOrganizationalUnit[];
@Input()
listRole: Role[];
sharedInstitutionActionNameSpace: ResourceNameSpace = sharedInstitutionActionNameSpace;
sharedInstitutionState: typeof SharedInstitutionState = SharedInstitutionState;
get personOrgUnitRoleMode(): typeof PersonOrgUnitRoleMode {
return PersonOrgUnitRoleMode;
}
......
......@@ -12,8 +12,6 @@
<dlcm-admin-person-form #formPresentational
[solidifyFocusFirstElement]="true"
*ngIf="isReadyToBeDisplayedInCreateModeObs | async"
[listInstitutions]="listInstitutionsObs | async"
[listOrganizationalUnit]="listOrgUnitObs | async"
[listRole]="listRoleObs | async"
[selectedInstitutions]="selectedInstitutionsObs | async"
(submitChange)="create($event)"
......
......@@ -11,7 +11,6 @@ import {
ViewChild,
} from "@angular/core";
import {
AccessOrganizationalUnit,
Institution,
Role,
} from "@models";
......@@ -35,8 +34,6 @@ import {Observable} from "rxjs";
export class AdminPersonCreateRoutable extends SharedAbstractCreateRoutable<PersonExtended, AdminPersonStateModel> {
@Select(AdminPersonState.isLoadingWithDependency) isLoadingWithDependencyObs: Observable<boolean>;
@Select(AdminPersonState.isReadyToBeDisplayedInCreateMode) isReadyToBeDisplayedInCreateModeObs: Observable<boolean>;
@Select((state: LocalStateModel) => state.shared.shared_institution.list) listInstitutionsObs: Observable<Institution[]>;
@Select((state: LocalStateModel) => state.shared.shared_organizationalUnit.list) listOrgUnitObs: Observable<AccessOrganizationalUnit[]>;
@Select((state: LocalStateModel) => state.admin.admin_person.admin_person_institutions.selected) selectedInstitutionsObs: Observable<Institution[]>;
@Select((state: LocalStateModel) => state.shared.shared_role.list) listRoleObs: Observable<Role[]>;
......
......@@ -2,37 +2,35 @@
(onEscape)="isEdit ? backToDetail() : backToList()"
[solidifyFocusFirstElement]="true"
>
<dlcm-shared-banner-edit-mode [isEdit]="isEdit"></dlcm-shared-banner-edit-mode>
<dlcm-shared-banner-edit-mode [isEdit]="isEdit"></dlcm-shared-banner-edit-mode>
<dlcm-button-toolbar-detail [mode]="isEdit ? 'edit' : 'detail'"
[currentModel]="currentObs | async"
(editChange)="edit()"
(deleteChange)="delete()"
(backToDetailChange)="backToDetail()"
(backToListChange)="backToList()"
>
</dlcm-button-toolbar-detail>
<dlcm-button-toolbar-detail [mode]="isEdit ? 'edit' : 'detail'"
[currentModel]="currentObs | async"
(editChange)="edit()"
(deleteChange)="delete()"
(backToDetailChange)="backToDetail()"
(backToListChange)="backToList()"