Commit a0df29cd authored by David.Gold1's avatar David.Gold1
Browse files

feat: add institution field to preservation space org unit page

parents 35513fb4 a1b18c46
......@@ -3,11 +3,11 @@
:host {
display: none;
position: fixed;
left: -63px;
top: 52px;
left: -34px;
top: 35px;
color: $white;
transform: rotate(-45deg);
width: 260px;
width: 169px;
z-index: $z-index-ribbon;
height: 20px;
align-items: center;
......
......@@ -84,6 +84,7 @@
[foldersWithIntermediateFolders]="foldersWithIntermediateFoldersObs | async"
[intermediateFolders]="intermediateFolders"
[isLoading]="isLoadingDataFileObs | async"
[draggingDepositDataFile]="draggingDepositDataFile"
></dlcm-shared-folder-tree>
</ng-container>
</div>
......@@ -112,6 +113,8 @@
[queryParameters]="queryParametersObs | async"
[skipInitialQuery]="true"
[stickyTopPosition]="40"
(dragStartChange)="dragStart($event)"
(dragEndChange)="dragEnd($event)"
>
</dlcm-shared-data-table>
</div>
......
......@@ -105,6 +105,7 @@ export class DepositFileContainer extends SharedAbstractDetailEditRoutable<Depos
queryParametersObs: Observable<QueryParameters> = MemoizedUtil.queryParameters(this._store, DepositDataFileState).pipe(
tap(queryParameters => this.isInErrorStatusFilter = MappingObjectUtil.get(QueryParametersUtil.getSearchItems(queryParameters), this._KEY_QUERY_PARAMETERS) === Enums.DataFile.StatusEnum.IN_ERROR),
);
draggingDepositDataFile: DepositDataFile | undefined = undefined;
intermediateFoldersObs: Observable<string[]> = MemoizedUtil.select(this._store, DepositDataFileState, state => state.intermediateFolders);
foldersWithIntermediateFoldersObs: Observable<string[]> = MemoizedUtil.select(this._store, DepositDataFileState, state => state.foldersWithIntermediateFolders);
currentFolderObs: Observable<string> = MemoizedUtil.select(this._store, DepositDataFileState, state => state.currentFolder);
......@@ -473,4 +474,12 @@ export class DepositFileContainer extends SharedAbstractDetailEditRoutable<Depos
}),
));
}
dragStart($event: DepositDataFile): void {
this.draggingDepositDataFile = $event;
}
dragEnd($event: DepositDataFile): void {
this.draggingDepositDataFile = undefined;
}
}
......@@ -44,6 +44,8 @@ import {
} from "solidify-frontend";
import {Storage} from "@shared/models/storage.model";
import {ArchivalStorageResourceApiEnum, BaseResourceApiEnum, IngestResourceApiEnum, PreIngestResourceApiEnum} from "@shared/enums/api.enum";
import {PreservationPlanningSipStatusHistoryState} from "@preservation-planning/sip/stores/status-history/preservation-planning-sip-status-history.state";
import {PreservationPlanningSipStatusHistoryAction} from "@preservation-planning/sip/stores/status-history/preservation-planning-sip-status-history.action";
@Component({
selector: "dlcm-preservation-planning-job-report-detail-dialog",
......@@ -59,6 +61,10 @@ export class PreservationPlanningJobReportDetailDialog extends SharedAbstractCon
isLoadingHistoryAipObs: Observable<boolean> = MemoizedUtil.isLoading(this._store, SharedAipStatusHistoryState);
queryParametersHistoryAipObs: Observable<QueryParameters> = MemoizedUtil.select(this._store, SharedAipStatusHistoryState, state => state.queryParameters);
historySipObs: Observable<StatusHistory[]> = MemoizedUtil.select(this._store, PreservationPlanningSipStatusHistoryState, state => state.history);
isLoadingHistorySipObs: Observable<boolean> = MemoizedUtil.isLoading(this._store, PreservationPlanningSipStatusHistoryState);
queryParametersHistorySipObs: Observable<QueryParameters> = MemoizedUtil.select(this._store, PreservationPlanningSipStatusHistoryState, state => state.queryParameters);
paramMessage: { resId: string } = {resId: StringUtil.stringEmpty};
columns: DataTableColumns<JobExecutionReportLine>[];
......@@ -159,9 +165,20 @@ export class PreservationPlanningJobReportDetailDialog extends SharedAbstractCon
}
historyAip(jobExecutionReportLine: JobExecutionReportLine): void {
this._dialog.open(SharedHistoryDialog, {
width: environment.modalWidth,
data: {
//depending on the reportType, it will show the related aip or sip
let dataForDialog: StatusHistoryDialog;
if (this.data.jobType === Enums.PreservationJob.TypeEnum.PURGESUBMISSIONTEMPFILES || this.data.jobType === Enums.PreservationJob.TypeEnum.CLEANSUBMISSION ){
dataForDialog = {
parentId: null,
resourceResId: jobExecutionReportLine.resId,
name: LocalStateEnum.preservationPlanning_sip,
statusHistory: this.historySipObs,
isLoading: this.isLoadingHistorySipObs,
queryParametersObs: this.queryParametersHistorySipObs,
state: PreservationPlanningSipStatusHistoryAction,
};
} else {
dataForDialog = {
parentId: null,
resourceResId: jobExecutionReportLine.resId,
name: LocalStateEnum.shared_aip,
......@@ -169,7 +186,11 @@ export class PreservationPlanningJobReportDetailDialog extends SharedAbstractCon
isLoading: this.isLoadingHistoryAipObs,
queryParametersObs: this.queryParametersHistoryAipObs,
state: SharedAipStatusHistoryAction,
} as StatusHistoryDialog,
};
}
this._dialog.open(SharedHistoryDialog, {
width: environment.modalWidth,
data: dataForDialog,
});
}
}
......@@ -179,4 +200,5 @@ export interface ReportLinesWrapper {
preservationJobId: string;
executionId: string;
reportId: string;
jobType: Enums.PreservationJob.TypeEnum;
}
......@@ -37,6 +37,7 @@ import {JobExecution} from "@shared/models/business/job-execution.model";
import {JobRecurrence} from "@shared/models/business/job-recurrence.model";
import {ExtraButtonToolbar} from "@shared/models/extra-button-toolbar.model";
import {LocalStateModel} from "@shared/models/local-state.model";
import {ScrollService} from "@shared/services/scroll.service";
import {Observable} from "rxjs";
import {tap} from "rxjs/operators";
import {
......@@ -87,7 +88,8 @@ export class PreservationPlanningJobDetailEditRoutable extends SharedAbstractDet
protected _router: Router,
protected readonly _actions$: Actions,
protected readonly _changeDetector: ChangeDetectorRef,
public _dialog: MatDialog) {
public _dialog: MatDialog,
private readonly _scrollService: ScrollService) {
super(_store, _route, _actions$, _changeDetector, _dialog, LocalStateEnum.preservationPlanning_job, preservationPlanningJobActionNameSpace, LocalStateEnum.preservationPlanning);
}
......@@ -98,9 +100,9 @@ export class PreservationPlanningJobDetailEditRoutable extends SharedAbstractDet
super.ngOnInit();
this.subscribe(this.urlStateObs
.pipe(
tap(urLState => {
if (urLState) {
const url = urLState.url;
tap(urlState => {
if (urlState) {
const url = urlState.url;
this.preservationJob = !url.includes(PreservationPlanningRoutesEnum.execution);
}
}),
......
......@@ -51,6 +51,9 @@ import {
OrderEnum,
QueryParameters,
} from "solidify-frontend";
import {DepositState} from "@deposit/stores/deposit.state";
import {PreservationPlanningJobAction} from "@preservation-planning/job/stores/preservation-planning-job.action";
import {PreservationPlanningJobState} from "@preservation-planning/job/stores/preservation-planning-job.state";
@Component({
selector: "dlcm-preservation-planning-job-execution-detail-routable",
......@@ -175,6 +178,8 @@ export class PreservationPlanningJobExecutionDetailRoutable extends SharedAbstra
}
showReportDetail(report: JobExecutionReport): void {
const jobType = MemoizedUtil.currentSnapshot(this._store, PreservationPlanningJobState).jobType;
this.subscribe(this._store.dispatch(new PreservationPlanningJobExecutionReportAction.ReportLines(this._resId, this._preservationJobId, report.resId, null))
.pipe(
tap((state: LocalStateModel) => {
......@@ -185,6 +190,7 @@ export class PreservationPlanningJobExecutionDetailRoutable extends SharedAbstra
preservationJobId: this._preservationJobId,
executionId: this._resId,
reportId: report.resId,
jobType: jobType,
} as ReportLinesWrapper,
});
}),
......
......@@ -223,6 +223,23 @@
[formControl]="fd"
>
</dlcm-shared-url-input-navigator>
<dlcm-shared-searchable-multi-select *ngIf="getFormControl(formDefinition.institutions) as fd"
[formControl]="fd"
[isWithLink]="false"
[labelKey]="'name'"
[labelCallback]="institutionLabelCallback"
[placeholder]="labelTranslateEnum.clickHereToAddAnInstitution | translate"
[required]="formValidationHelper.hasRequiredField(fd)"
[resourceNameSpace]="sharedInstitutionActionNameSpace"
[sort]="sharedInstitutionSort"
[state]="sharedInstitutionState"
[title]="labelTranslateEnum.institutions | translate"
[valueKey]="'resId'"
aria-label="institution"
solidifyValidation
>
</dlcm-shared-searchable-multi-select>
</ng-template>
<ng-template #link>
......
......@@ -16,6 +16,7 @@ import {NotificationHelper} from "@app/features/preservation-space/notification/
import {environment} from "@environments/environment";
import {
DisseminationPolicy,
Institution,
OrganizationalUnit,
PreservationPolicy,
ResearchDomain,
......@@ -38,6 +39,8 @@ import {BaseFormDefinition} from "@shared/models/base-form-definition.model";
import {DataTableColumns} from "@shared/models/data-table-columns.model";
import {BreakpointService} from "@shared/services/breakpoint.service";
import {SecurityService} from "@shared/services/security.service";
import {sharedInstitutionActionNameSpace} from "@shared/stores/institution/shared-institution.action";
import {SharedInstitutionState} from "@shared/stores/institution/shared-institution.state";
import {sharedResearchDomainActionNameSpace} from "@shared/stores/research-domain/shared-research-domain.action";
import {SharedResearchDomainState} from "@shared/stores/research-domain/shared-research-domain.state";
import {ResourceLogoNameSpace} from "@shared/stores/resource-logo/resource-logo-namespace.model";
......@@ -90,6 +93,9 @@ export class PreservationSpaceOrganizationalUnitFormPresentational extends Share
@Input()
listDisseminationPolicies: DisseminationPolicy[];
@Input()
selectedInstitutions: Institution[];
private _selectedSubmissionPolicies: SubmissionPolicy[];
@Input()
......@@ -140,6 +146,8 @@ export class PreservationSpaceOrganizationalUnitFormPresentational extends Share
researchDomainLabelCallback: (value: ResearchDomain) => string = (value: ResearchDomain) => `[${value.source}] ${value.name}`;
institutionLabelCallback: (value: Institution) => string = (value: Institution) => `${value.name}`;
protected readonly _requestToBeMemberBS: BehaviorSubject<void> = new BehaviorSubject<void>(undefined);
@Output("requestToBeMemberChange")
readonly requestToBeMemberObs: Observable<void> = ObservableUtil.asObservable(this._requestToBeMemberBS);
......@@ -148,6 +156,13 @@ export class PreservationSpaceOrganizationalUnitFormPresentational extends Share
@Output("seeArchiveChange")
readonly seeArchiveObs: Observable<OrganizationalUnit> = ObservableUtil.asObservable(this._seeArchiveBS);
sharedInstitutionSort: Sort<Institution> = {
field: "name",
order: OrderEnum.ascending,
};
sharedInstitutionActionNameSpace: ResourceNameSpace = sharedInstitutionActionNameSpace;
sharedInstitutionState: typeof SharedInstitutionState = SharedInstitutionState;
sharedResearchDomainSort: Sort<ResearchDomain> = {
field: "name",
order: OrderEnum.ascending,
......@@ -274,6 +289,7 @@ export class PreservationSpaceOrganizationalUnitFormPresentational extends Share
[this.formDefinition.filterResearchDomains]: ["", [SolidifyValidator]],
[this.formDefinition.researchDomains]: ["", [SolidifyValidator]],
[this.formDefinition.keywords]: [[], [SolidifyValidator]],
[this.formDefinition.institutions]: ["", [SolidifyValidator]],
});
}
......@@ -288,6 +304,7 @@ export class PreservationSpaceOrganizationalUnitFormPresentational extends Share
[this.formDefinition.filterResearchDomains]: ["", [SolidifyValidator]],
[this.formDefinition.researchDomains]: [organizationalUnit.researchDomains?.map(r => r.resId), [SolidifyValidator]],
[this.formDefinition.keywords]: [isNullOrUndefined(organizationalUnit.keywords) ? [] : [...organizationalUnit.keywords], [SolidifyValidator]],
[this.formDefinition.institutions]: [this.selectedInstitutions?.map(r => r.resId), [SolidifyValidator]],
});
this._addRoleAskingInNotificationRequest();
......@@ -328,6 +345,12 @@ export class PreservationSpaceOrganizationalUnitFormPresentational extends Share
organizationalUnit.researchDomains.push({resId: resId});
});
}
organizationalUnit.institutions = [];
if (this.form.get(this.formDefinition.institutions).value !== "" && isNotNullNorUndefined(this.form.get(this.formDefinition.institutions).value)) {
this.form.get(this.formDefinition.institutions).value.forEach(resId => {
organizationalUnit.institutions.push({resId: resId});
});
}
return organizationalUnit;
}
......@@ -398,4 +421,5 @@ class FormComponentFormDefinition extends BaseFormDefinition {
@PropertyName() researchDomains: string;
@PropertyName() keywords: string;
@PropertyName() preservationPolicy: string;
@PropertyName() institutions: string;
}
......@@ -39,6 +39,7 @@
[selectedPersonRole]="selectedPersonRoleObs | async"
[selectedPreservationPolicies]="selectedPreservationPoliciesObs | async"
[selectedSubmissionPolicies]="selectedSubmissionPoliciesObs | async"
[selectedInstitutions]="selectedInstitutionObs | async"
[urlQueryParameters]="urlQueryParameters"
>
</dlcm-preservation-space-organizational-unit-form>
......
......@@ -9,7 +9,6 @@ import {
import {MatDialog} from "@angular/material/dialog";
import {
ActivatedRoute,
Router,
RouterOutlet,
} from "@angular/router";
import {PreservationSpaceOrganizationalUnitPersonRoleState} from "@app/features/preservation-space/organizational-unit/stores/person-role/preservation-space-organizational-unit-person-role.state";
......@@ -25,6 +24,7 @@ import {Enums} from "@enums";
import {HomeHelper} from "@home/helpers/home.helper";
import {
DisseminationPolicy,
Institution,
OrganizationalUnit,
PreservationPolicy,
Role,
......@@ -41,6 +41,8 @@ import {
} from "@preservation-space/organizational-unit/components/dialogs/organizational-unit-request-access/preservation-space-organizational-unit-request-access.dialog";
import {PreservationSpaceOrganizationalUnitDisseminationPolicyAction} from "@preservation-space/organizational-unit/stores/dissemination-policy/preservation-space-organizational-unit-dissemination-policy.action";
import {PreservationSpaceOrganizationalUnitDisseminationPolicyState} from "@preservation-space/organizational-unit/stores/dissemination-policy/preservation-space-organizational-unit-dissemination-policy.state";
import {PreservationSpaceOrganizationalUnitInstitutionAction} from "@preservation-space/organizational-unit/stores/institution/preservation-space-organizational-unit-institution.action";
import {PreservationSpaceOrganizationalUnitInstitutionState} from "@preservation-space/organizational-unit/stores/institution/preservation-space-organizational-unit-institution.state";
import {PreservationSpaceOrganizationalUnitPreservationPolicyAction} from "@preservation-space/organizational-unit/stores/preservation-policy/preservation-space-organizational-unit-preservation-policy.action";
import {PreservationSpaceOrganizationalUnitPreservationPolicyState} from "@preservation-space/organizational-unit/stores/preservation-policy/preservation-space-organizational-unit-preservation-policy.state";
import {PreservationSpaceOrganizationalUnitSubmissionPolicyAction} from "@preservation-space/organizational-unit/stores/submission-policy/preservation-space-organizational-unit-submission-policy.action";
......@@ -86,6 +88,7 @@ export class PreservationSpaceOrganizationalUnitDetailEditRoutable extends Share
listDisseminationPoliciesObs: Observable<DisseminationPolicy[]> = MemoizedUtil.list(this._store, SharedDisseminationPolicyState);
listRoleObs: Observable<Role[]> = MemoizedUtil.list(this._store, SharedRoleState);
selectedPersonRoleObs: Observable<PersonRole[]> = MemoizedUtil.selected(this._store, PreservationSpaceOrganizationalUnitPersonRoleState);
selectedInstitutionObs: Observable<Institution[]> = MemoizedUtil.selected(this._store, PreservationSpaceOrganizationalUnitInstitutionState);
researchDomainSourcesObs: Observable<string[]> = MemoizedUtil.select(this._store, SharedResearchDomainState, state => state.sources);
selectedSubmissionPoliciesObs: Observable<SubmissionPolicy[]> = MemoizedUtil.selected(this._store, PreservationSpaceOrganizationalUnitSubmissionPolicyState);
selectedPreservationPoliciesObs: Observable<PreservationPolicy[]> = MemoizedUtil.selected(this._store, PreservationSpaceOrganizationalUnitPreservationPolicyState);
......@@ -144,6 +147,8 @@ export class PreservationSpaceOrganizationalUnitDetailEditRoutable extends Share
this._store.dispatch(new PreservationSpaceOrganizationalUnitSubmissionPolicyAction.GetAll(id));
this._store.dispatch(new PreservationSpaceOrganizationalUnitPreservationPolicyAction.GetAll(id));
this._store.dispatch(new PreservationSpaceOrganizationalUnitDisseminationPolicyAction.GetAll(id));
this._store.dispatch(new PreservationSpaceOrganizationalUnitInstitutionAction.GetAll(id));
}
}
......
......@@ -13,6 +13,7 @@ import {PreservationSpaceOrganizationalUnitArchiveAclListRoutable} from "@preser
import {PreservationSpaceOrganizationalUnitDetailEditRoutable} from "@preservation-space/organizational-unit/components/routables/organizational-unit-detail-edit/preservation-space-organizational-unit-detail-edit.routable";
import {PreservationSpaceOrganizationalUnitListRoutable} from "@preservation-space/organizational-unit/components/routables/organizational-unit-list/preservation-space-organizational-unit-list.routable";
import {PreservationSpaceOrganizationalUnitArchiveAclState} from "@preservation-space/organizational-unit/stores/archive-acl/preservation-space-organizational-unit-archive-acl.state";
import {PreservationSpaceOrganizationalUnitInstitutionState} from "@preservation-space/organizational-unit/stores/institution/preservation-space-organizational-unit-institution.state";
import {ModuleLoadedEnum} from "@shared/enums/module-loaded.enum";
import {SharedModule} from "@shared/shared.module";
import {PreservationSpaceOrganizationalUnitRequestAccessDialog} from "./components/dialogs/organizational-unit-request-access/preservation-space-organizational-unit-request-access.dialog";
......@@ -49,6 +50,7 @@ const presentationals = [
PreservationSpaceOrganizationalUnitState,
PreservationSpaceOrganizationalUnitPersonRoleState,
PreservationSpaceOrganizationalUnitArchiveAclState,
PreservationSpaceOrganizationalUnitInstitutionState,
]),
],
entryComponents: [
......
import {Institution} from "@models";
import {LocalStateEnum} from "@shared/enums/local-state.enum";
import {
AssociationAction,
AssociationNameSpace,
TypeDefaultAction,
} from "solidify-frontend";
const state = LocalStateEnum.preservationSpace_organizationalUnit_institution;
export namespace PreservationSpaceOrganizationalUnitInstitutionAction {
@TypeDefaultAction(state)
export class GetAll extends AssociationAction.GetAll {
}
@TypeDefaultAction(state)
export class GetAllSuccess extends AssociationAction.GetAllSuccess<Institution> {
}
@TypeDefaultAction(state)
export class GetAllFail extends AssociationAction.GetAllFail {
}
@TypeDefaultAction(state)
export class GetById extends AssociationAction.GetById {
}
@TypeDefaultAction(state)
export class GetByIdSuccess extends AssociationAction.GetByIdSuccess<Institution> {
}
@TypeDefaultAction(state)
export class GetByIdFail extends AssociationAction.GetByIdFail {
}
@TypeDefaultAction(state)
export class Update extends AssociationAction.Update {
}
@TypeDefaultAction(state)
export class UpdateSuccess extends AssociationAction.UpdateSuccess {
}
@TypeDefaultAction(state)
export class UpdateFail extends AssociationAction.UpdateFail {
}
@TypeDefaultAction(state)
export class Create extends AssociationAction.Create {
}
@TypeDefaultAction(state)
export class CreateSuccess extends AssociationAction.CreateSuccess {
}
@TypeDefaultAction(state)
export class CreateFail extends AssociationAction.CreateFail {
}
@TypeDefaultAction(state)
export class DeleteList extends AssociationAction.DeleteList {
}
@TypeDefaultAction(state)
export class DeleteListSuccess extends AssociationAction.DeleteListSuccess {
}
@TypeDefaultAction(state)
export class DeleteListFail extends AssociationAction.DeleteListFail {
}
@TypeDefaultAction(state)
export class Delete extends AssociationAction.Delete {
}
@TypeDefaultAction(state)
export class DeleteSuccess extends AssociationAction.DeleteSuccess {
}
@TypeDefaultAction(state)
export class DeleteFail extends AssociationAction.DeleteFail {
}
}
export const preservationSpaceOrganizationalUnitInstitutionNamespace: AssociationNameSpace = PreservationSpaceOrganizationalUnitInstitutionAction;
import {Injectable} from "@angular/core";
import {Institution} from "@models";
import {
Actions,
State,
Store,
} from "@ngxs/store";
import {preservationSpaceOrganizationalUnitInstitutionNamespace} from "@preservation-space/organizational-unit/stores/institution/preservation-space-organizational-unit-institution.action";
import {ApiResourceNameEnum} from "@shared/enums/api-resource-name.enum";
import {AdminResourceApiEnum} from "@shared/enums/api.enum";
import {LocalStateEnum} from "@shared/enums/local-state.enum";
import {
ApiService,
AssociationState,
AssociationStateModel,
defaultAssociationStateInitValue,
NotificationService,
} from "solidify-frontend";
export interface PreservationSpaceOrganizationalUnitInstitutionStateModel extends AssociationStateModel<Institution> {
}
@Injectable()
@State<PreservationSpaceOrganizationalUnitInstitutionStateModel>({
name: LocalStateEnum.preservationSpace_organizationalUnit_institution,
defaults: {
...defaultAssociationStateInitValue(),
},
})
export class PreservationSpaceOrganizationalUnitInstitutionState extends AssociationState<PreservationSpaceOrganizationalUnitInstitutionStateModel, Institution> {
constructor(protected apiService: ApiService,
protected store: Store,
protected notificationService: NotificationService,
protected actions$: Actions) {
super(apiService, store, notificationService, actions$, {
nameSpace: preservationSpaceOrganizationalUnitInstitutionNamespace,
resourceName: ApiResourceNameEnum.INSTITUTION,
});
}
protected get _urlResource(): string {
return AdminResourceApiEnum.organizationalUnits;
}
}
......@@ -34,6 +34,11 @@ import {
PreservationSpaceOrganizationalUnitDisseminationPolicyState,
PreservationSpaceOrganizationalUnitDisseminationPolicyStateModel,
} from "@preservation-space/organizational-unit/stores/dissemination-policy/preservation-space-organizational-unit-dissemination-policy.state";
import {PreservationSpaceOrganizationalUnitInstitutionAction} from "@preservation-space/organizational-unit/stores/institution/preservation-space-organizational-unit-institution.action";
import {
PreservationSpaceOrganizationalUnitInstitutionState,
PreservationSpaceOrganizationalUnitInstitutionStateModel,
} from "@preservation-space/organizational-unit/stores/institution/preservation-space-organizational-unit-institution.state";
import {
PreservationSpaceOrganizationalUnitPreservationPolicyState,
PreservationSpaceOrganizationalUnitPreservationPolicyStateModel,
......@@ -59,6 +64,7 @@ import {
import {
ApiService,
CollectionTyped,
defaultAssociationStateInitValue,
defaultRelation2TiersStateInitValue,
defaultRelation3TiersStateInitValue,
defaultResourceStateInitValue,
......@@ -84,6 +90,7 @@ export interface PreservationSpaceOrganizationalUnitStateModel extends ResourceL
[LocalStateEnum.preservationSpace_organizationalUnit_submissionPolicy]: PreservationSpaceOrganizationalUnitSubmissionPolicyStateModel;
[LocalStateEnum.preservationSpace_organizationalUnit_preservationPolicy]: PreservationSpaceOrganizationalUnitPreservationPolicyStateModel;
[LocalStateEnum.preservationSpace_organizationalUnit_disseminationPolicy]: PreservationSpaceOrganizationalUnitDisseminationPolicyStateModel;
[LocalStateEnum.preservationSpace_organizationalUnit_institution]: PreservationSpaceOrganizationalUnitInstitutionStateModel;
currentUserIsManager: boolean;
}
......@@ -98,6 +105,7 @@ export interface PreservationSpaceOrganizationalUnitStateModel extends ResourceL
[LocalStateEnum.preservationSpace_organizationalUnit_submissionPolicy]: {...defaultRelation2TiersStateInitValue()},
[LocalStateEnum.preservationSpace_organizationalUnit_preservationPolicy]: {...defaultRelation2TiersStateInitValue()},
[LocalStateEnum.preservationSpace_organizationalUnit_disseminationPolicy]: {...defaultRelation2TiersStateInitValue()},
[LocalStateEnum.preservationSpace_organizationalUnit_institution]: {...defaultAssociationStateInitValue()},
},
children: [
PreservationSpaceOrganizationalUnitPersonRoleState,
......@@ -105,6 +113,7 @@ export interface PreservationSpaceOrganizationalUnitStateModel extends ResourceL
PreservationSpaceOrganizationalUnitDisseminationPolicyState,
PreservationSpaceOrganizationalUnitSubmissionPolicyState,
PreservationSpaceOrganizationalUnitPreservationPolicyState,
PreservationSpaceOrganizationalUnitInstitutionState,
],
})
export class PreservationSpaceOrganizationalUnitState extends ResourceLogoState<PreservationSpaceOrganizationalUnitStateModel, OrganizationalUnit> {
......@@ -164,14 +173,18 @@ export class PreservationSpaceOrganizationalUnitState extends ResourceLogoState<
static isLoadingWithDependency(state: PreservationSpaceOrganizationalUnitStateModel): boolean {
return this.isLoading(state)
|| isUndefined(this.currentUserIsManager(state))
|| StoreUtil.isLoadingState(state.preservationSpace_organizationalUnit_personRole);
|| StoreUtil.isLoadingState(state.preservationSpace_organizationalUnit_personRole)
|| StoreUtil.isLoadingState(state.preservationSpace_organizationalUnit_institution);