-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
193a1ff
commit f5cae60
Showing
3 changed files
with
88 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
147 changes: 81 additions & 66 deletions
147
src/components/20-molecules/71-filter-list/filter-list.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,89 @@ | ||
const slugify = require( 'slugify' ); | ||
|
||
const terms = [ | ||
{ | ||
label: 'Cooperative essentials', | ||
children: [ | ||
'Governance', | ||
'Ownership', | ||
'Cooperative best practices', | ||
'Diversity and inclusion', | ||
'Bylaws', | ||
] | ||
}, | ||
{ | ||
label: 'Business operations', | ||
children: [ | ||
'Human resources', | ||
'Marketing', | ||
'Social media', | ||
'Incorporation', | ||
'Business model', | ||
'Income, benefits, and compensation' | ||
] | ||
}, | ||
{ | ||
label: 'Technology & Platforms', | ||
children: [ | ||
'Software development', | ||
'Platforms', | ||
'Design', | ||
'Free software', | ||
'Data', | ||
'Algorithms', | ||
'Automation', | ||
'Blockchain', | ||
'Search engines' | ||
] | ||
}, | ||
{ | ||
label: 'Law & Policy', | ||
children: [ | ||
'Anti-trust', | ||
'Labor law', | ||
'Policy', | ||
'Co-op law' | ||
] | ||
}, | ||
{ | ||
label: 'Fair labour', | ||
children: [ | ||
'Unions', | ||
'Workplace safety', | ||
'Social security', | ||
] | ||
}, | ||
{ | ||
label: 'Platform co-op theory', | ||
children: [ | ||
'Platform cooperativism', | ||
'Platform capitalism', | ||
'Gig economy', | ||
'Sharing economy', | ||
'Solidarity economy', | ||
'Information economy', | ||
'Peer-to-peer' | ||
] | ||
}, | ||
]; | ||
|
||
terms.forEach( term => { | ||
const name = slugify( term.label, { lower: true } ); | ||
term.children = term.children.map( child => { | ||
return { | ||
value: slugify( child, { lower: true } ), | ||
label: child, | ||
name | ||
}; | ||
} ); | ||
} ); | ||
|
||
module.exports = { | ||
name: 'Filter List', | ||
status: 'wip', | ||
context: { | ||
label: 'Topics', | ||
terms: [ | ||
{ | ||
label: 'Cooperative essentials', | ||
children: [ | ||
'Governance', | ||
'Ownership', | ||
'Cooperative best practices', | ||
'Diversity and inclusion', | ||
'Bylaws', | ||
] | ||
}, | ||
{ | ||
label: 'Business operations', | ||
children: [ | ||
'Human resources', | ||
'Marketing', | ||
'Social media', | ||
'Incorporation', | ||
'Business model', | ||
'Income, benefits, and compensation' | ||
] | ||
}, | ||
{ | ||
label: 'Technology & Platforms', | ||
children: [ | ||
'Software development', | ||
'Platforms', | ||
'Design', | ||
'Free software', | ||
'Data', | ||
'Algorithms', | ||
'Automation', | ||
'Blockchain', | ||
'Search engines' | ||
] | ||
}, | ||
{ | ||
label: 'Law & Policy', | ||
children: [ | ||
'Anti-trust', | ||
'Labor law', | ||
'Policy', | ||
'Co-op law' | ||
] | ||
}, | ||
{ | ||
label: 'Fair labour', | ||
children: [ | ||
'Unions', | ||
'Workplace safety', | ||
'Social security', | ||
] | ||
}, | ||
{ | ||
label: 'Platform co-op theory', | ||
children: [ | ||
'Platform cooperativism', | ||
'Platform capitalism', | ||
'Gig economy', | ||
'Sharing economy', | ||
'Solidarity economy', | ||
'Information economy', | ||
'Peer-to-peer' | ||
] | ||
}, | ||
], | ||
terms, | ||
standAlone: false, | ||
} | ||
}; |