Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

Commit

Permalink
fix: Change external sources cards to use startTime instead of published
Browse files Browse the repository at this point in the history
  • Loading branch information
yozzo committed Aug 27, 2019
1 parent ae9b5f2 commit 5cf1d66
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"dit:shareholderFunds": 1,
"dit:taxonomy": "http://some.url/with/stuff/2019-07-27",
"id": "dit:externalSources:companies_house.accounts:5d39ab9ac0d4899610cd65e4",
"startTime": "2020-12-13T01:11:18",
"type": [
"Event",
"dit:Accounts"
Expand Down
1 change: 1 addition & 0 deletions fixtures/activity_feed/companies_house/incorporated.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"99000 - Activities of extraterritorial organisations and bodies"
],
"id": "dit:externalSources:companies_house.companies:7",
"startTime": "1970-10-03T02:18:21",
"type": [
"Organization",
"dit:Company"
Expand Down
1 change: 1 addition & 0 deletions fixtures/activity_feed/hmrc/export_of_goods.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"type": "Announce",
"object": {
"id": "dit:externalSources:hmrc.exporters:5d39b0c9a2b09a36f9f243bf",
"startTime": "1879-01-05T06:53:47",
"type": [
"Event",
"dit:Export"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ export default class CompaniesHouseAccount extends React.PureComponent {

render() {
const { activity, showDetails } = this.props

const published = get(activity, 'published')
const startTime = get(activity, 'object.startTime')
const reference = get(activity, 'object.name')
const taxonomy = get(activity, 'dit:taxonomy')
const summary = get(activity, 'summary')
Expand All @@ -52,7 +51,7 @@ export default class CompaniesHouseAccount extends React.PureComponent {
summary={summary}
/>

<CardMeta startTime={published} />
<CardMeta startTime={startTime} />
</CardHeader>

<CardDetails
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class CompaniesHouseCompany extends React.PureComponent {
render() {
const { activity, showDetails } = this.props

const published = get(activity, 'published')
const startTime = get(activity, 'object.startTime')
const reference = get(activity, 'object.name')

const summary = get(activity, 'summary')
Expand Down Expand Up @@ -64,7 +64,7 @@ export default class CompaniesHouseCompany extends React.PureComponent {
subHeading="Company records show that"
summary={summary}
/>
<CardMeta startTime={published} />
<CardMeta startTime={startTime} />
</CardHeader>

<CardDetails
Expand Down
5 changes: 2 additions & 3 deletions src/activity-feed/activity-feed-cards/HmrcExporter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ export default class HmrcExporter extends React.PureComponent {

render() {
const { activity, showDetails } = this.props

const published = get(activity, 'published')
const startTime = get(activity, 'object.startTime')
const reference = get(activity, 'object.attributedTo.name')
const summary = get(activity, 'summary')
const exportItemCodes = get(activity, 'object.dit:exportItemCodes')
Expand All @@ -55,7 +54,7 @@ export default class HmrcExporter extends React.PureComponent {
subHeading="Exporters records show that"
summary={summary}
/>
<CardMeta startTime={published} />
<CardMeta startTime={startTime} />
</CardHeader>

<CardDetails
Expand Down

0 comments on commit 5cf1d66

Please sign in to comment.