Commit 279f5d55 authored by Florent Poittevin's avatar Florent Poittevin
Browse files

fix: use operator and for contributor and allow to edit it in settings

parent 5b5ba414
......@@ -20,17 +20,31 @@ import {DisseminationPolicy as DisseminationPolicyPartial} from "../generated-ap
export namespace Enums {
export namespace Facet {
export type Name =
"creators"
"metadata-versions"
| "organizational-units"
| "access-levels"
| "format"
| "data-tags";
| "data-tags"
| "contributors"
| "formats"
| "paths"
| "types"
| "retentions"
| "archive-types"
| "institutions"
| "institution-descriptions";
export const Name = {
CREATORS: "creators" as Name,
ORGANIZATIONAL_UNITS: "organizational-units" as Name,
ACCESS_LEVELS: "access-levels" as Name,
FORMAT: "format" as Name,
DATA_TAGS: "data-tags" as Name,
METADATA_VERSION_FACET: "metadata-versions" as Name,
ORG_UNIT_FACET: "organizational-units" as Name,
ACCESS_LEVEL_FACET: "access-levels" as Name,
DATA_TAG_FACET: "data-tags" as Name,
CREATOR_FACET: "contributors" as Name,
FORMAT_FACET: "formats" as Name,
PATH_FACET: "paths" as Name,
TYPE_FACET: "types" as Name,
RETENTION_FACET: "retentions" as Name,
ARCHIVE_FACET: "archive-types" as Name,
INSTITUION_FACET: "institutions" as Name,
INSTITUION_DESC_FACET: "institution-descriptions" as Name,
};
}
export namespace Aip {
......
......@@ -171,9 +171,9 @@ export class HomeSearchFacetPresentational extends SharedAbstractPresentational
getFacetValueLabelWithName(facetName: string, facetValueValue: string): string {
switch (facetName) {
case Enums.Facet.Name.ACCESS_LEVELS:
case Enums.Facet.Name.ACCESS_LEVEL_FACET:
return EnumUtil.getLabel(Deposit.AccessEnumTranslate, facetValueValue);
case Enums.Facet.Name.DATA_TAGS:
case Enums.Facet.Name.DATA_TAG_FACET:
return EnumUtil.getLabel(Deposit.DataSensitivityEnumTranslate, facetValueValue);
default:
return facetValueValue;
......
......@@ -3,6 +3,7 @@ import {
Params,
} from "@angular/router";
import {Enums} from "@enums";
import {environment} from "@environments/environment";
import {SearchFacet} from "@models";
import {Navigate} from "@ngxs/router-plugin";
import {Store} from "@ngxs/store";
......@@ -26,7 +27,7 @@ export class HomeHelper {
static QUERY_PARAM_SEPARATOR: string = "&";
static QUERY_PARAM_VALUE_AFFECTION: string = "=";
static LIST_FACET_USE_OPERATOR_AND: Enums.Facet.Name[] = [Enums.Facet.Name.CREATORS];
static LIST_FACET_USE_OPERATOR_AND: Enums.Facet.Name[] = environment.listFacetUseOperatorAnd;
static getDefaultSearchQueryParams(): any {
return {[this.SEARCH_QUERY_PARAM]: "*"};
......
......@@ -176,6 +176,6 @@ export class PreservationSpaceOrganizationalUnitDetailEditRoutable extends Abstr
}
seeArchive(orgUnit: OrganizationalUnit): void {
HomeHelper.navigateToSearch(this._store, StringUtil.stringEmpty, {[Enums.Facet.Name.ORGANIZATIONAL_UNITS]: [orgUnit.name]} as MappingObject<string[]>);
HomeHelper.navigateToSearch(this._store, StringUtil.stringEmpty, {[Enums.Facet.Name.ORG_UNIT_FACET]: [orgUnit.name]} as MappingObject<string[]>);
}
}
import {Enums} from "@enums";
import {ViewModeTableEnum} from "@shared/enums/view-mode-table.enum";
import {DefaultSolidifyEnvironment} from "solidify-frontend";
......@@ -62,4 +63,6 @@ export interface DlcmEnvironment extends DefaultSolidifyEnvironment {
refreshSipProcessIntervalInSecond: number;
fileSizeLimitForChecksumGenerationInMegabytes: number;
listFacetUseOperatorAnd: Enums.Facet.Name[];
}
......@@ -92,6 +92,8 @@ export const defaultEnvironment: DlcmEnvironment = {
],
defaultStorageIndex: 0,
fileSizeLimitForChecksumGenerationInMegabytes: 20,
listFacetUseOperatorAnd: [Enums.Facet.Name.CREATOR_FACET],
};
/*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment