make config cleaner

This commit is contained in:
FA Internal SSH
2020-06-17 08:37:49 +00:00
parent 1d0735ffb6
commit c273e681a4
2 changed files with 6 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
import { tabs, prefixedTabs } from './lib' import { timemap } from './lib'
export default { export default {
gsheets: [], gsheets: [],
@@ -6,7 +6,7 @@ export default {
{ {
name: 'timemap_data', name: 'timemap_data',
path: 'data/timemap_data.xlsx', path: 'data/timemap_data.xlsx',
tabs tabs: timemap.default
} }
] ]
} }

View File

@@ -1,6 +1,6 @@
import BP from './lib/blueprinters' import BP from './lib/blueprinters'
export function prefixedTabs (prefix, cfg) { function prefixedTabs (prefix, cfg) {
if (!cfg) cfg = {} if (!cfg) cfg = {}
const prf = key => cfg[key] ? `${prefix}_` : '' const prf = key => cfg[key] ? `${prefix}_` : ''
return { return {
@@ -13,11 +13,7 @@ export function prefixedTabs (prefix, cfg) {
} }
} }
export const tabs = { export const timemap = {
export_events: BP.deeprows, default: prefixedTabs(),
export_categories: [BP.groups, BP.rows], prefixedTabs
export_filters: BP.tree,
export_narratives: BP.rows,
export_sources: BP.deepids,
export_sites: BP.rows
} }