Skip to content

Commit

Permalink
Merge pull request #3 from moreonion/animal-welfare-column
Browse files Browse the repository at this point in the history
add column for animal_welfare score
  • Loading branch information
katzmo authored Nov 8, 2017
2 parents 5e71fb8 + af48a31 commit 3d14828
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
14 changes: 13 additions & 1 deletion config/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,13 @@ const defaultScoreAutocompleteConfig = {
export const _COLUMNS_ = {
types,
// Columns with order
columns: [['name', 0], ['hotspots', 2], ['resources', 3], ['credibility', 4], ['environment', 5], ['social', 6], ['countries', 7]],
columns: [['name', 0], ['hotspots', 2], ['resources', 3], ['credibility', 4], ['environment', 5], ['social', 6], ['animal_welfare', 7], ['countries', 8]],
columnValueMap: {
'name': 'name',
'credibility': 'details.score.credibility',
'environment': 'details.score.environment',
'social': 'details.score.social',
'animal_welfare': 'details.score.animal_welfare',
'hotspots': 'hotspots',
'resources': 'resources',
'countries': 'countries'
Expand All @@ -77,6 +78,7 @@ export const _COLUMNS_ = {
'details.score.credibility': 'credibility',
'details.score.environment': 'environment',
'details.score.social': 'social',
'details.score.animal_welfare': 'animal_welfare',
'hotspots': 'hotspots',
'resources': 'resources',
'countries': 'countries'
Expand All @@ -86,6 +88,7 @@ export const _COLUMNS_ = {
'details.score.credibility': row => row.details.score.credibility || 0,
'details.score.environment': row => row.details.score.environment || 0,
'details.score.social': row => row.details.score.social || 0,
'details.score.animal_welfare': row => row.details.score.animal_welfare || 0,
'hotspots': row => row.hotspots || [],
'resources': row => row.resources || [],
'countries': row => row.countries || []
Expand All @@ -95,6 +98,7 @@ export const _COLUMNS_ = {
'details.score.credibility': 'Columns.GovTrans',
'details.score.environment': 'Columns.EnvImpact',
'details.score.social': 'Columns.ScoImpact',
'details.score.animal_welfare': 'Columns.AniWelfare',
'hotspots': 'Columns.Hotspots',
'resources': 'Columns.Resources',
'countries': 'Columns.Countries'
Expand Down Expand Up @@ -175,6 +179,14 @@ export const _COLUMNS_ = {
model: defaultModelConfig,
autocomplete: defaultScoreAutocompleteConfig
},
'details.score.animal_welfare': {
type: types.RATING,
isSortable: true,
isQueryable: true,
isDefaultSelected: true,
model: defaultModelConfig,
autocomplete: defaultScoreAutocompleteConfig
},
'hotspots': {
type: types.LIST,
projectItemLabel: li => li.name,
Expand Down
1 change: 1 addition & 0 deletions static/i18n/lang_de.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"GovTrans": "Governance & Transparenz",
"EnvImpact": "Einfluss auf die Umwelt",
"ScoImpact": "Einfluss auf soziale Bereiche",
"AniWelfare": "Tierwohl",
"Hotspots": "Themengebiet-Etikett hat Einfluss auf",
"Resources": "Rohmaterial-Etikett hat Einfluss auf",
"Countries": "Staaten"
Expand Down
1 change: 1 addition & 0 deletions static/i18n/lang_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"GovTrans": "Governance& Transparency",
"EnvImpact": "Environmental impact",
"ScoImpact": "Social impact",
"AniWelfare": "Animal welfare",
"Hotspots": "Issues label has impact on",
"Resources": "Raw materials label has impact on",
"Countries": "Countries"
Expand Down

0 comments on commit 3d14828

Please sign in to comment.