Skip to content

Commit

Permalink
add initial framework for displaying mobility data
Browse files Browse the repository at this point in the history
  • Loading branch information
miles-grant-ibigroup committed Feb 21, 2023
1 parent a41cbf2 commit e145922
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/manager/components/validation/GtfsValidationViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import type {Props as FeedVersionViewerProps} from '../version/FeedVersionViewer
import type {ValidationResult} from '../../../types'

import ValidationErrorItem from './ValidationErrorItem'
import MobilityDataValidationResult from './MobilityDataValidationResult'

const DEFAULT_LIMIT = 10

Expand Down Expand Up @@ -269,6 +270,16 @@ export default class GtfsValidationViewer extends Component<Props, State> {
<Panel.Heading><Panel.Title componentClass='h2'>{this.messages('title')}</Panel.Title></Panel.Heading>
{validationContent}
</Panel>
<Panel><Panel.Heading>Mobility Data</Panel.Heading>
<ListGroup>
{version.mobilityDataResult && version.mobilityDataResult.notices.map(notice => (
<MobilityDataValidationResult notice={notice} />
)) }
<ListGroupItem className='validation-item'>
This is the no validation errors message that should only appear if there are none.
</ListGroupItem>
</ListGroup>
</Panel>
</div>
)
}
Expand Down
10 changes: 10 additions & 0 deletions lib/manager/components/validation/MobilityDataValidationResult.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react'
import { ListGroupItem } from 'react-bootstrap'

const MobilityDataValidationResult = (props) => {
const {notice} = props

return <ListGroupItem><h4>{notice.code}</h4></ListGroupItem>
}

export default MobilityDataValidationResult
2 changes: 2 additions & 0 deletions lib/types/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,8 @@ export type FeedVersion = FeedVersionSummary & {
nextVersionId: ?string,
noteCount: number,
notes: Array<Note>,
// TODO: Type
mobilityDataResult: ?any,
previousVersionId: ?string,
processedByExternalPublisher: ?number,
sentToExternalPublisher: ?number,
Expand Down

0 comments on commit e145922

Please sign in to comment.