From b1585ac7f23379efa15d22f837f2f35371b865d5 Mon Sep 17 00:00:00 2001 From: lotte Date: Thu, 11 Jul 2019 15:09:28 +0200 Subject: [PATCH] progress july 11 - store/selection to object list --- src/app/app.reducer.ts | 6 + src/app/core/core.module.ts | 2 + ...namic-lookup-relation-modal.component.html | 211 +++++++++--------- ...dynamic-lookup-relation-modal.component.ts | 89 +------- .../object-collection.component.html | 2 + .../object-collection.component.ts | 3 + .../object-list/object-list.component.html | 10 + .../object-list/object-list.component.ts | 76 ++++++- .../selectable-list.actions.ts | 87 ++++++++ .../selectable-list.reducer.ts | 106 +++++++++ .../selectable-list.service.ts | 94 ++++++++ .../search-filters.component.ts | 2 - .../search-results.component.html | 30 ++- .../search-results.component.ts | 3 + 14 files changed, 520 insertions(+), 201 deletions(-) create mode 100644 src/app/shared/object-list/selectable-list/selectable-list.actions.ts create mode 100644 src/app/shared/object-list/selectable-list/selectable-list.reducer.ts create mode 100644 src/app/shared/object-list/selectable-list/selectable-list.service.ts diff --git a/src/app/app.reducer.ts b/src/app/app.reducer.ts index b0ca9d697d..26a9c6d2e2 100644 --- a/src/app/app.reducer.ts +++ b/src/app/app.reducer.ts @@ -23,6 +23,10 @@ import { hasValue } from './shared/empty.util'; import { cssVariablesReducer, CSSVariablesState } from './shared/sass-helper/sass-helper.reducer'; import { menusReducer, MenusState } from './shared/menu/menu.reducer'; import { historyReducer, HistoryState } from './shared/history/history.reducer'; +import { + selectableListReducer, + SelectableListsState +} from './shared/object-list/selectable-list/selectable-list.reducer'; export interface AppState { router: fromRouter.RouterReducerState; @@ -36,6 +40,7 @@ export interface AppState { truncatable: TruncatablesState; cssVariables: CSSVariablesState; menus: MenusState; + selectableLists: SelectableListsState } export const appReducers: ActionReducerMap = { @@ -50,6 +55,7 @@ export const appReducers: ActionReducerMap = { truncatable: truncatableReducer, cssVariables: cssVariablesReducer, menus: menusReducer, + selectableLists: selectableListReducer }; export const routerStateSelector = (state: AppState) => state.router; diff --git a/src/app/core/core.module.ts b/src/app/core/core.module.ts index 90231808e5..63accb53b1 100644 --- a/src/app/core/core.module.ts +++ b/src/app/core/core.module.ts @@ -100,6 +100,7 @@ import { SearchFilterService } from './shared/search/search-filter.service'; import { SearchFixedFilterService } from './shared/search/search-fixed-filter.service'; import { FilteredSearchPageGuard } from '../+search-page/filtered-search-page.guard'; import { SearchConfigurationService } from './shared/search/search-configuration.service'; +import { SelectableListService } from '../shared/object-list/selectable-list/selectable-list.service'; export const restServiceFactory = (cfg: GlobalConfig, mocks: MockResponseMap, http: HttpClient) => { // if (ENV_CONFIG.production) { @@ -205,6 +206,7 @@ const PROVIDERS = [ FilteredSearchPageGuard, SearchFilterService, SearchConfigurationService, + SelectableListService, // register AuthInterceptor as HttpInterceptor { provide: HTTP_INTERCEPTORS, diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/lookup-relation/dynamic-lookup-relation-modal.component.html b/src/app/shared/form/builder/ds-dynamic-form-ui/models/lookup-relation/dynamic-lookup-relation-modal.component.html index 06688d2de1..16b700f93e 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/lookup-relation/dynamic-lookup-relation-modal.component.html +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/lookup-relation/dynamic-lookup-relation-modal.component.html @@ -5,111 +5,114 @@ -
-