Skip to content

Commit

Permalink
feat: add filterbar to side menu
Browse files Browse the repository at this point in the history
  • Loading branch information
tkubica-edu committed Nov 7, 2024
1 parent 1c8cac5 commit 5333cd8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
11 changes: 8 additions & 3 deletions src/app/wlo-search/template/custom-definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ export const parentPageConfigNodeId: string = '25e341e1-7058-4210-b0d3-838255884

export const parentWidgetConfigNodeId: string = '80bb0eab-d64f-466b-94c6-2eccc4045c6b';

export const providedSelectDimensionKeys: string[] = [
'virtual:ai_text_widget_intendedenduserrole',
'virtual:ai_text_widget_target_language',
export const profilingFilterbarDimensionKeys: string[] = [
'virtual:profiling_widget_intention',
'virtual:profiling_widget_education_level',
];

export const reportProblemItemKey: string = 'latestReport';
Expand Down Expand Up @@ -132,6 +132,11 @@ export const swimlaneTypeOptions: SelectOption[] = [
},
];

export const verticalFilterbarDimensionKeys: string[] = [
'virtual:ai_text_widget_intendedenduserrole',
'virtual:ai_text_widget_target_language',
];

export const widgetConfigAspect: string = 'ccm:widget';

export const widgetConfigType: string = 'ccm:widget_config';
Expand Down
15 changes: 13 additions & 2 deletions src/app/wlo-search/template/template.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,16 @@
</ng-container>
<ng-container slot="content">
<ng-container *ngIf="selectedMenuItem === menuItems.profiling">
Inhalt von {{ menuItems.profiling }} folgt.
<h2 class="side-menu-header">Wer bist du?</h2>
<wlo-filter-bar
alignment="vertical"
[requestInProgress]="requestInProgress"
[metadataSetName]="defaultMds"
[selectDimensionKeysOfInterest]="verticalFilterbarDimensionKeys"
[viewModes]="['radio', 'checkbox']"
(selectDimensionsChanged)="selectDimensionsChanged($event)"
(selectValuesChanged)="selectValuesChanged($event)"
></wlo-filter-bar>
</ng-container>
<ng-container *ngIf="selectedMenuItem === menuItems.topicTree">
<h2 class="side-menu-header">Themenbaum von {{ topic() }}</h2>
Expand Down Expand Up @@ -111,9 +120,11 @@ <h2 class="side-menu-header">Inhalte von {{ topic() }}</h2>
<div class="variable-select-bar fachportal-filterbar">
<div class="fachportal-filterbar-content">
<wlo-filter-bar
alignment="horizontal"
[requestInProgress]="requestInProgress"
[metadataSetName]="defaultMds"
[selectDimensionKeysOfInterest]="providedSelectDimensionKeys"
[viewModes]="['select']"
[selectDimensionKeysOfInterest]="verticalFilterbarDimensionKeys"
(selectDimensionsChanged)="selectDimensionsChanged($event)"
(selectValuesChanged)="selectValuesChanged($event)"
></wlo-filter-bar>
Expand Down
6 changes: 4 additions & 2 deletions src/app/wlo-search/template/template.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ import {
pageConfigPropagateType,
pageConfigRefType,
pageConfigType,
providedSelectDimensionKeys,
retrieveCustomUrl,
pageVariantConfigType,
parentPageConfigNodeId,
Expand All @@ -67,6 +66,8 @@ import {
pageVariantConfigPrefix,
pageVariantConfigAspect,
pageVariantIsTemplateType,
profilingFilterbarDimensionKeys,
verticalFilterbarDimensionKeys,
widgetConfigAspect,
workspaceSpacesStorePrefix,
} from './custom-definitions';
Expand Down Expand Up @@ -1032,6 +1033,7 @@ export class TemplateComponent implements OnInit {
protected readonly defaultMds: string = defaultMds;
protected readonly defaultTopicTextNodeId: string = defaultTopicTextNodeId;
protected readonly defaultTopicsColumnBrowserNodeId: string = defaultTopicsColumnBrowserNodeId;
protected readonly providedSelectDimensionKeys: string[] = providedSelectDimensionKeys;
protected readonly profilingFilterbarDimensionKeys: string[] = profilingFilterbarDimensionKeys;
protected readonly retrieveCustomUrl = retrieveCustomUrl;
protected readonly verticalFilterbarDimensionKeys: string[] = verticalFilterbarDimensionKeys;
}

0 comments on commit 5333cd8

Please sign in to comment.