Skip to content

Commit

Permalink
Add and fix existing filters
Browse files Browse the repository at this point in the history
  • Loading branch information
nas-tabchiche committed Feb 19, 2025
1 parent f1af2cc commit 7704b98
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions frontend/src/lib/utils/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ const ASSET_FILTER: ListViewFilterConfig = {
alwaysDisplay: true
};

// TODO: TEST THIS
const QUALIFICATION_FILTER: ListViewFilterConfig = {
component: AutocompleteSelect,
extraProps: {
Expand Down Expand Up @@ -222,7 +221,6 @@ const LIKELIHOOD_FILTER: ListViewFilterConfig = {
alwaysDisplay: true
};

// TODO: TEST THIS
const IS_SELECTED_FILTER: ListViewFilterConfig = {
component: AutocompleteSelect,
extraProps: {
Expand All @@ -233,40 +231,40 @@ const IS_SELECTED_FILTER: ListViewFilterConfig = {
alwaysDisplay: true
};

// TODO: TEST THIS
const RISK_ORIGIN_FILTER: ListViewFilterConfig = {
component: AutocompleteSelect,
extraProps: {
label: 'risk_origin',
optionsEndpoint: 'ro-to/risk-origin',
optionsLabelField: 'label',
optionsValueField: 'value',
multiple: true
},
alwaysDisplay: true
};

// TODO: TEST THIS
const FEARED_EVENT_FILTER: ListViewFilterConfig = {
component: AutocompleteSelect,
extraProps: {
label: 'feared_event',
optionsEndpoint: 'ebios-rm/feared-events',
optionsEndpoint: 'feared-events',
multiple: true
},
alwaysDisplay: true
};

// TODO: TEST THIS
const PERTINENCE_FILTER: ListViewFilterConfig = {
component: AutocompleteSelect,
extraProps: {
label: 'pertinence',
optionsEndpoint: 'ro-to/pertinence',
optionsLabelField: 'label',
optionsValueField: 'value',
multiple: true
},
alwaysDisplay: true
};

// TODO: TEST THIS
const ENTITY_FILTER: ListViewFilterConfig = {
component: AutocompleteSelect,
extraProps: {
Expand Down Expand Up @@ -321,12 +319,12 @@ const RESIDUAL_CRITICALITY_FILTER: ListViewFilterConfig = {
alwaysDisplay: true
};

// TODO: TEST THIS
const STAKEHOLDER_FILTER: ListViewFilterConfig = {
component: AutocompleteSelect,
extraProps: {
label: 'stakeholder',
optionsEndpoint: 'stakeholders',
optionsLabelField: 'str',
multiple: true
},
alwaysDisplay: true
Expand Down Expand Up @@ -376,13 +374,14 @@ const REFERENCE_CONTROL_CATEGORY_FILTER: ListViewFilterConfig = {
alwaysDisplay: true
};

// TODO: TEST THIS
const STAKEHOLDER_CATEGORY_FILTER: ListViewFilterConfig = {
component: AutocompleteSelect,
extraProps: {
label: 'category',
optionsEndpoint: 'stakeholders/category',
multiple: true
multiple: true,
optionsLabelField: 'label',
optionsValueField: 'value'
},
alwaysDisplay: true
};
Expand Down

0 comments on commit 7704b98

Please sign in to comment.