mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-11 21:08:36 +03:00
Fixed up event schema to reduce filters and narratives to associations; removed extraneous comments for deprecated functions
This commit is contained in:
@@ -31,7 +31,7 @@ module.exports = {
|
||||
USE_SEARCH: false,
|
||||
USE_SITES: false,
|
||||
USE_SHAPES: false,
|
||||
GRAPH_NONLOCATED: false,
|
||||
GRAPH_NONLOHATED: false,
|
||||
HIGHLIGHT_GROUPS: false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,19 +199,6 @@ export function binarySearch (ar, el, compareFn) {
|
||||
return -m - 1
|
||||
}
|
||||
|
||||
// export const isFilterLeaf = node => (Object.keys(node.children).length === 0)
|
||||
// export const isFilterDuplicate = (node, set) => { return (set.has(node.key)) }
|
||||
|
||||
// export function findDescriptionInFilterTree (key, node) {
|
||||
// if (node.key === key) return node.description
|
||||
// if (isFilterLeaf(node)) return false
|
||||
// const descs = Object.keys(node.children)
|
||||
// .map(c => findDescriptionInFilterTree(key, node.children[c]))
|
||||
// .filter(v => !!v)
|
||||
// if (descs.length !== 1) return false
|
||||
// return descs[0]
|
||||
// }
|
||||
|
||||
export function makeNiceDate (datetime) {
|
||||
if (datetime === null) return null
|
||||
// see https://stackoverflow.com/questions/3552461/how-to-format-a-javascript-date
|
||||
|
||||
@@ -119,9 +119,7 @@ class Card extends React.Component {
|
||||
renderExtra () {
|
||||
return (
|
||||
<div className='card-bottomhalf'>
|
||||
{/* {this.renderFilters()} */}
|
||||
{this.renderSources()}
|
||||
{/* {this.renderNarrative()} */}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -23,9 +23,10 @@ function createEventSchema (custom) {
|
||||
type: Joi.string().allow(''),
|
||||
category: Joi.string().allow(''),
|
||||
category_full: Joi.string().allow(''),
|
||||
narratives: Joi.array(),
|
||||
associations: Joi.array(),
|
||||
// narratives: Joi.array(),
|
||||
sources: Joi.array(),
|
||||
filters: Joi.array().allow(''),
|
||||
// filters: Joi.array().allow(''),
|
||||
tags: Joi.array().allow(''),
|
||||
comments: Joi.string().allow(''),
|
||||
time_display: Joi.string().allow(''),
|
||||
|
||||
Reference in New Issue
Block a user