filters link

This commit is contained in:
Tykayn 2025-09-25 16:55:38 +02:00 committed by tykayn
parent 03d7a90d24
commit c0761da046
11 changed files with 130 additions and 102 deletions

View file

@ -39,7 +39,10 @@
<!-- advanced filters-->
<div class="filters-container">
<sae-filters-group (selectionchange)="onSelectedChoicesChange()" [appState]="appState"
<sae-filters-group (selectionchange)="onSelectedChoicesChange()"
[store]="store"
[appState]="appState"
[actionTypes]="actionTypes"
[disabled]="!appState.toText.length"></sae-filters-group>
</div>
</div>

View file

@ -70,4 +70,8 @@
}
}
.filters-container{
margin-top: -60px;
}
}

View file

@ -5,7 +5,7 @@ import {BottomNavigation} from '../../shared/navigation/bottom-navigation/bottom
import {FeedbackButton} from 'sae-lib/buttons/feedback-button/feedback-button';
import {BotTalks} from 'sae-lib/chatbot/bot-talks/bot-talks';
import {Store} from '@ngrx/store';
import {StateInterface} from '../../redux/reducers';
import {ActionTypes, StateInterface} from '../../redux/reducers';
import {NgClass} from '@angular/common';
@ -25,9 +25,10 @@ import {NgClass} from '@angular/common';
export class Main {
public appState: any = {};
public actionTypes: any = ActionTypes;
public displayBotWarning: boolean = false;
constructor(private store: Store<StateInterface>) {
constructor(public store: Store<StateInterface>) {
this.store.select(state => state.app).subscribe(app => {
console.log('app', app);
this.appState = app;

View file

@ -31,10 +31,11 @@ export const filtersCSC =
value: 'SPM',
}]
,
findings: [{
label: 'FRETTING : Usure induite par petit debat',
value: 'FRETTING',
},
findings: [
{
label: 'FRETTING : Usure induite par petit debat',
value: 'FRETTING',
},
{
label: 'DENT : Impact a bord arrondi',
value: 'DENT',

View file

@ -41,11 +41,20 @@ export const initialState: StateInterface = {
]
},
findings: {
availableList: [{
label: 'NICK : Impact a bord vif',
value: 'NICK',
}],
selectedList: [filtersCSC.findings]
// filtersCSC.findings
availableList: [
{
label: 'FRETTING : Usure induite par petit debat',
value: 'FRETTING',
},
{
label: 'DENT : Impact a bord arrondi',
value: 'DENT',
}, {
label: 'MISSING PAINT/COATING',
value: 'MISSING_PAINT_COATING',
}],
selectedList: []
},
ata: {
availableList: [{

View file

@ -6,6 +6,7 @@ import {initialState} from '../initialState';
export enum ActionTypes {
UPDATE_USER = '[User] Update User',
UPDATE_APP = '[App] Update App',
UPDATE_FILTER = '[App] Update Filter',
UPDATE_CONVERSATIONS_LIST = '[Conversations] Update Conversations List',
UPDATE_ACTIVE_CONVERSATION = '[Conversations] Update Active Conversation',
POST_MESSAGE_TO_ACTIVE_CONVERSATION = '[Conversations] Post message to Active Conversation',