mirror of
https://github.com/bellingcat/datasheet-server.git
synced 2026-06-11 12:58:32 +03:00
multiple resources collapsed into single blueprint
This commit is contained in:
@@ -15,12 +15,15 @@ export const defaultResource = {
|
||||
data: []
|
||||
}
|
||||
|
||||
export function buildDesaturated (sheetId, sheetName, tab, resource) {
|
||||
export function buildDesaturated (sheetId, sheetName, tab, resources) {
|
||||
const bp = R.clone(defaultBlueprint)
|
||||
bp.sheet.name = sheetName
|
||||
bp.sheet.id = sheetId
|
||||
bp.name = tab
|
||||
bp.resources[resource] = null
|
||||
bp.resources = resources.reduce((acc, r) => {
|
||||
acc[r] = null
|
||||
return acc
|
||||
}, {})
|
||||
return bp
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user