mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 21:38:35 +03:00
displaying civid
This commit is contained in:
@@ -11,6 +11,7 @@ import hash from "object-hash";
|
||||
|
||||
export const generateCardLayout = {
|
||||
basic: ({ event }) => {
|
||||
console.log(event)
|
||||
return [
|
||||
[
|
||||
{
|
||||
@@ -23,6 +24,11 @@ export const generateCardLayout = {
|
||||
title: "Location",
|
||||
value: event.location || `—`,
|
||||
},
|
||||
{
|
||||
kind: "text",
|
||||
title: "id",
|
||||
value: event.civId || `—`,
|
||||
},
|
||||
],
|
||||
[{ kind: "line-break", times: 0.4 }],
|
||||
[
|
||||
@@ -36,6 +42,7 @@ export const generateCardLayout = {
|
||||
];
|
||||
},
|
||||
sourced: ({ event }) => {
|
||||
console.log(event)
|
||||
return [
|
||||
[
|
||||
{
|
||||
@@ -48,6 +55,11 @@ export const generateCardLayout = {
|
||||
title: "Location",
|
||||
value: event.location || `—`,
|
||||
},
|
||||
{
|
||||
kind: "text",
|
||||
title: "id",
|
||||
value: event.civId || `—`,
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
|
||||
@@ -17,6 +17,7 @@ function createEventSchema(custom) {
|
||||
return Joi.object()
|
||||
.keys({
|
||||
id: Joi.string().allow(""),
|
||||
civId: Joi.string().allow(""),
|
||||
description: Joi.string().allow("").required(),
|
||||
date: Joi.string().allow(""),
|
||||
time: Joi.string().allow(""),
|
||||
|
||||
@@ -160,6 +160,7 @@ export function validateDomain(domain, features) {
|
||||
// append events with datetime and sort
|
||||
sanitizedDomain.events = sanitizedDomain.events.filter((event, idx) => {
|
||||
let errorMsg = "";
|
||||
event.civId = event.id;
|
||||
event.id = idx;
|
||||
// event.associations comes in as a [association.ids...]; convert to actual association objects
|
||||
event.associations = event.associations.reduce((acc, id) => {
|
||||
|
||||
Reference in New Issue
Block a user