From 2fb27add95d35669ccd6e3ef4d9d3059a27c545e Mon Sep 17 00:00:00 2001 From: Alf Eaton <eaton.alf@gmail.com> Date: Fri, 7 Jul 2017 13:29:22 +0100 Subject: [PATCH] Continue adding events --- app/components/VersionsList.js | 2 +- stories/data/projects/submitted.js | 32 +++++++++++++++++++++++++++++- stories/index.js | 9 +++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/app/components/VersionsList.js b/app/components/VersionsList.js index 53538b5ed5..2158517fe6 100644 --- a/app/components/VersionsList.js +++ b/app/components/VersionsList.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types' import VersionActions from './VersionActions' import * as date from '../lib/date' import * as sort from '../lib/sort' -import '../components/Versions.css' +import './VersionsList.css' const sortByVersion = sort.descending('version') diff --git a/stories/data/projects/submitted.js b/stories/data/projects/submitted.js index 5bd438624f..9e2f29d8cb 100644 --- a/stories/data/projects/submitted.js +++ b/stories/data/projects/submitted.js @@ -38,5 +38,35 @@ export default { } } }, - declarations: {} + declarations: { + human: false, + newTaxon: false, + financialDisclosure: 'There were no financial conflicts' + }, + events: [ + { + id: 'event-1', + type: 'created', + date: '2017-06-01T12:00:00Z', + user: { + id: 'user-foo', + username: 'foo' // TODO: populate this later? + } + }, + { + id: 'event-2', + type: 'title:update', + date: '2017-06-01T13:00:00Z', + user: { + id: 'user-foo', + username: 'foo' + }, + changes: { + title: { + from: 'The old title', + to: 'The new title' + } + } + } + ] } diff --git a/stories/index.js b/stories/index.js index 21bcf9f82b..07d5d3a3e0 100644 --- a/stories/index.js +++ b/stories/index.js @@ -15,6 +15,7 @@ import versions from './data/versions' import DeclarationAnswers from '../app/components/DeclarationAnswers' import DeclarationQuestions from '../app/components/DeclarationQuestions' +import EventsList from '../app/components/EventsList' import Project from '../app/components/Project' import ProjectActions from '../app/components/ProjectActions' import ProjectList from '../app/components/ProjectList' @@ -123,6 +124,14 @@ storiesOf('Editors', module) <EditorList project={projects.submitted} roles={projects.submitted.roles.editor}/> )) +storiesOf('Events List', module) + .add('project', () => ( + <div> + <EventsList project={projects.submitted} + events={projects.submitted.events}/> + </div> + )) + storiesOf('Navigation', module) .add('anonymous', () => ( <Navigation appName="xpub" -- GitLab