Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed Dec 17, 2024
1 parent a0101ec commit 283ac36
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion backend/ebios_rm/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def get_scope(self):
def save(self, *args, **kwargs):
self.folder = self.ebios_rm_study.folder
super().save(*args, **kwargs)

def get_gravity_display(self):
if self.ro_to_couple.get_gravity() < 0:
return {
Expand Down
44 changes: 23 additions & 21 deletions frontend/src/lib/utils/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ const QUALIFICATION_FILTER: ListViewFilterConfig = {

const GRAVITY_FILTER: ListViewFilterConfig = {
component: SelectFilter,
getColumn: (row) => (row.gravity.name),
getColumn: (row) => row.gravity.name,
extraProps: {
defaultOptionName: 'gravity'
},
Expand All @@ -176,7 +176,7 @@ const GRAVITY_FILTER: ListViewFilterConfig = {

const LIKELIHOOD_FILTER: ListViewFilterConfig = {
component: SelectFilter,
getColumn: (row) => (row.likelihood.name),
getColumn: (row) => row.likelihood.name,
extraProps: {
defaultOptionName: 'likelihood'
},
Expand All @@ -194,7 +194,7 @@ const IS_SELECTED_FILTER: ListViewFilterConfig = {

const RISK_ORIGIN_FILTER: ListViewFilterConfig = {
component: SelectFilter,
getColumn: (row) => (row.risk_origin),
getColumn: (row) => row.risk_origin,
extraProps: {
defaultOptionName: 'risk_origin'
},
Expand All @@ -212,7 +212,7 @@ const FEARED_EVENT_FILTER: ListViewFilterConfig = {

const PERTINENCE_FILTER: ListViewFilterConfig = {
component: SelectFilter,
getColumn: (row) => (row.pertinence),
getColumn: (row) => row.pertinence,
extraProps: {
defaultOptionName: 'pertinence'
},
Expand All @@ -221,7 +221,7 @@ const PERTINENCE_FILTER: ListViewFilterConfig = {

const ENTITY_FILTER: ListViewFilterConfig = {
component: SelectFilter,
getColumn: (row) => (row.entity.str),
getColumn: (row) => row.entity.str,
extraProps: {
defaultOptionName: 'entity'
},
Expand Down Expand Up @@ -680,20 +680,8 @@ export const listViewFields: ListViewFieldsConfig = {
}
},
'ro-to': {
head: [
'isSelected',
'riskOrigin',
'targetObjective',
'fearedEvents',
'pertinence'
],
body: [
'is_selected',
'risk_origin',
'target_objective',
'feared_events',
'pertinence'
],
head: ['isSelected', 'riskOrigin', 'targetObjective', 'fearedEvents', 'pertinence'],
body: ['is_selected', 'risk_origin', 'target_objective', 'feared_events', 'pertinence'],
filters: {
is_selected: IS_SELECTED_FILTER,
risk_origin: RISK_ORIGIN_FILTER,
Expand All @@ -702,8 +690,22 @@ export const listViewFields: ListViewFieldsConfig = {
}
},
stakeholders: {
head: ['is_selected', 'entity', 'category', 'current_criticality', 'applied_controls', 'residual_criticality'],
body: ['is_selected', 'entity', 'category', 'current_criticality', 'applied_controls', 'residual_criticality'],
head: [
'is_selected',
'entity',
'category',
'current_criticality',
'applied_controls',
'residual_criticality'
],
body: [
'is_selected',
'entity',
'category',
'current_criticality',
'applied_controls',
'residual_criticality'
],
filters: {
is_selected: IS_SELECTED_FILTER,
entity: ENTITY_FILTER,
Expand Down

0 comments on commit 283ac36

Please sign in to comment.