diff --git a/my-workspace/projects/sae-lib/filters/filters-group/filters-group.ts b/my-workspace/projects/sae-lib/filters/filters-group/filters-group.ts
index 2020fa8..16b7ddb 100644
--- a/my-workspace/projects/sae-lib/filters/filters-group/filters-group.ts
+++ b/my-workspace/projects/sae-lib/filters/filters-group/filters-group.ts
@@ -24,11 +24,29 @@ export class FiltersGroup {
console.log('constructor filters group', this.appState, this.store, this.actionTypes);
}
- onSelectedChoicesChange(e: any) {
- console.log('onSelectedChoicesChange', e);
+ onSelectedChoicesChange(choice: any, filterType: string) {
+ console.log('onSelectedChoicesChange', choice, 'for filter', filterType);
+ if (this.store && this.actionTypes) {
+ this.store.dispatch({
+ type: this.actionTypes.UPDATE_FILTER,
+ payload: {
+ filter: filterType,
+ selectedChoice: choice
+ }
+ });
+ }
}
- onAvailableChoicesChange(e: any) {
- console.log('onSelectedChoicesChange', e);
+ onAvailableChoicesChange(choice: any, filterType: string) {
+ console.log('onAvailableChoicesChange', choice, 'for filter', filterType);
+ if (this.store && this.actionTypes) {
+ this.store.dispatch({
+ type: this.actionTypes.UPDATE_FILTER,
+ payload: {
+ filter: filterType,
+ availableChoice: choice
+ }
+ });
+ }
}
}
diff --git a/my-workspace/projects/sae-lib/inputs/multi-selector/multi-selector.ts b/my-workspace/projects/sae-lib/inputs/multi-selector/multi-selector.ts
index 67a3104..223c253 100644
--- a/my-workspace/projects/sae-lib/inputs/multi-selector/multi-selector.ts
+++ b/my-workspace/projects/sae-lib/inputs/multi-selector/multi-selector.ts
@@ -16,11 +16,11 @@ export class MultiSelector {
// @Input() ActionTypes: any;
@Input() availableChoices: any = ['choix 1', 'choix 2', 'choix 3'];
@Input() selectedChoices: any = ['choix 4', 'choix 5'];
- @Input() displayDropdown: boolean = false;
+ @Input() displayDropdown: boolean = true;
@Input() store: any;
@Input() actionTypes: any;
-
+
@Output() selectedChoicesChange = new EventEmitter
();
@Output() availableChoicesChange = new EventEmitter();
diff --git a/sae-csc/.npmrc b/sae-csc/.npmrc
index 0b4ed73..65630cd 100644
--- a/sae-csc/.npmrc
+++ b/sae-csc/.npmrc
@@ -1 +1 @@
-prefix=/home/tykayn/.npm-global
+#prefix=/home/tykayn/.npm-global
diff --git a/sae-csc/src/app/redux/initialState.ts b/sae-csc/src/app/redux/initialState.ts
index e3e1893..701d44e 100644
--- a/sae-csc/src/app/redux/initialState.ts
+++ b/sae-csc/src/app/redux/initialState.ts
@@ -22,12 +22,12 @@ export const initialState: StateInterface = {
engineType: {
availableList: [{
- label: 'choix 1',
- value: 'choix 1',
+ label: 'ABC',
+ value: 'ABC',
}],
selectedList: [{
- label: 'choix 2',
- value: 'choix 2',
+ label: 'DEF',
+ value: 'DEF',
}]
},
findings: {