-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
120 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import { Action } from '@ngrx/store'; | ||
|
|
||
| export const QUERY_ENTITY_IDS = '[Filter] Query Entity Ids'; | ||
|
|
||
| export class QueryEntityIds implements Action { | ||
| readonly type = QUERY_ENTITY_IDS; | ||
|
|
||
| constructor(public payload: string[]) { } | ||
| } | ||
|
|
||
| export type Actions = | ||
| | QueryEntityIds; |
15 changes: 15 additions & 0 deletions
15
ui/src/app/metadata-filter/container/new-filter.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| <div class="container-fluid p-3" role="main"> | ||
| <section class="section"> | ||
| <div class="section-header bg-info p-2 text-light"> | ||
| <div class="row justify-content-between"> | ||
| <div class="col-md-12"> | ||
| <span class="display-6"> | ||
| <i class="fa fa-gears"></i> New Filter Page</span> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| <div class="section-body p-4 border border-top-0 border-info"> | ||
| Body | ||
| </div> | ||
| </section> | ||
| </div> |
18 changes: 18 additions & 0 deletions
18
ui/src/app/metadata-filter/container/new-filter.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import { Component } from '@angular/core'; | ||
| import { Store } from '@ngrx/store'; | ||
|
|
||
| import * as fromFilter from '../reducer'; | ||
|
|
||
| @Component({ | ||
| selector: 'new-filter-page', | ||
| templateUrl: './new-filter.component.html' | ||
| }) | ||
| export class NewFilterComponent { | ||
| constructor( | ||
| private store: Store<fromFilter.State> | ||
| ) {} | ||
|
|
||
| save(): void {} | ||
|
|
||
| cancel(): void {} | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import { NgModule } from '@angular/core'; | ||
| import { RouterModule, Routes } from '@angular/router'; | ||
| import { CommonModule } from '@angular/common'; | ||
| import { ReactiveFormsModule } from '@angular/forms'; | ||
| import { StoreModule } from '@ngrx/store'; | ||
| import { EffectsModule } from '@ngrx/effects'; | ||
|
|
||
| import { NewFilterComponent } from './container/new-filter.component'; | ||
| import { reducers } from './reducer'; | ||
|
|
||
| export const routes: Routes = [ | ||
| { | ||
| path: 'new', | ||
| component: NewFilterComponent, | ||
| canActivate: [] | ||
| } | ||
| ]; | ||
|
|
||
| @NgModule({ | ||
| declarations: [ | ||
| NewFilterComponent | ||
| ], | ||
| entryComponents: [], | ||
| imports: [ | ||
| CommonModule, | ||
| RouterModule, | ||
| ReactiveFormsModule, | ||
| StoreModule.forFeature('metadata-filter', reducers), | ||
| EffectsModule.forFeature([]), | ||
| RouterModule.forChild(routes) | ||
| ], | ||
| providers: [] | ||
| }) | ||
| export class FilterModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import { createSelector, createFeatureSelector } from '@ngrx/store'; | ||
| import { MetadataProvider } from '../../metadata-provider/model/metadata-provider'; | ||
| import * as filter from '../action/filter.action'; | ||
| import * as fromRoot from '../../core/reducer'; | ||
|
|
||
| export interface FilterState { | ||
| entityIds: string[]; | ||
| } | ||
|
|
||
| export const initialState: FilterState = { | ||
| entityIds: [] | ||
| }; | ||
|
|
||
| export function reducer(state = initialState, action: filter.Actions): FilterState { | ||
| switch (action.type) { | ||
| default: { | ||
| return state; | ||
| } | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import { createSelector, createFeatureSelector } from '@ngrx/store'; | ||
| import * as fromRoot from '../../core/reducer'; | ||
| import * as fromFilter from './filter.reducer'; | ||
|
|
||
| export interface FilterState { | ||
| filter: fromFilter.FilterState; | ||
| } | ||
|
|
||
| export const reducers = { | ||
| filter: fromFilter.reducer | ||
| }; | ||
|
|
||
| export interface State extends fromRoot.State { | ||
| 'metadata-filter': FilterState; | ||
| } | ||
|
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters