Skip to content

Commit

Permalink
Merge pull request #626 from devgateway/feature/OCE-523/link-ocid
Browse files Browse the repository at this point in the history
OCE-523 PE proc table now links to proc page
  • Loading branch information
alexeisavca authored May 4, 2018
2 parents 072f1ea + ca668a6 commit c87682c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions ui/oce/corruption-risk/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ class CorruptionRiskDashboard extends React.Component {
id={id}
styling={styling}
doSearch={query => navigate(plSlug, query)}
navigate={navigate}
indicatorTypesMapping={indicatorTypesMapping}
{...additionalProps}
/>
Expand Down
7 changes: 5 additions & 2 deletions ui/oce/corruption-risk/procuring-entities/single/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ProcuringEntity extends translatable(React.Component) {
}

render() {
const { translations, doSearch, width } = this.props;
const { translations, doSearch, width, navigate } = this.props;
const { PEName } = this.state;

return (
Expand Down Expand Up @@ -98,7 +98,10 @@ class ProcuringEntity extends translatable(React.Component) {
</div>
</div>
<h2>Procurements by {PEName}</h2>
<ProcurementsTable translations={translations} />
<ProcurementsTable
translations={translations}
navigate={navigate}
/>
</section>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import translatable from '../../../../translatable';
import BootstrapTableWrapper from '../../../archive/bootstrap-table-wrapper';
import { procurementsData, page, pageSize, procurementsCount } from './state';
import { mkContractLink } from '../../../tools';

const NAME = 'PEProcurementsComponent';

Expand Down Expand Up @@ -55,6 +56,7 @@ class Table extends translatable(React.PureComponent) {

render() {
const { data, count } = this.state;
const { navigate } = this.props;

return (
<BootstrapTableWrapper
Expand All @@ -69,9 +71,11 @@ class Table extends translatable(React.PureComponent) {
title: 'Tender name',
dataField: 'name',
width: '20%',
dataFormat: mkContractLink(navigate),
}, {
title: 'OCID',
dataField: 'ocid'
dataField: 'id',
dataFormat: mkContractLink(navigate),
}, {
title: 'Award status',
dataField: 'awardStatus',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ export const procurementsData = PEState.mapping({
mapper: raw =>
raw.map(datum => {
return {
id: datum.id,
id: datum.ocid,
name: datum.tender.title || 'N/A',
ocid: datum.ocid,
awardStatus: getAwardAmount(datum.awards) ? 'active' : 'unsuccessful',
tenderAmount: getTenderAmount(datum),
awardAmount: getAwardAmount(datum.awards),
Expand Down

0 comments on commit c87682c

Please sign in to comment.