Skip to content

Commit

Permalink
[DUOS-353][risk=no] Show DAC Name on Manage DUL Page (#218)
Browse files Browse the repository at this point in the history
* show dac name on the dul page
  • Loading branch information
rushtong authored Dec 5, 2019
1 parent a787261 commit b744f4e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/pages/AdminManageDul.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,17 @@ class AdminManageDul extends Component {
return true;
};

findDacNameForDacId = (dacId) => {
if (_.isNil(dacId)) {
return '---';
}
const foundDac = _.findLast(this.state.dacList, (d) => { return d.dacId === dacId; });
if (_.isNil(foundDac)) {
return '---';
}
return foundDac.name;
};

render() {

const { currentPage, limit, searchDulText } = this.state;
Expand Down Expand Up @@ -357,6 +368,7 @@ class AdminManageDul extends Component {
div({ className: 'col-2 cell-header dul-color' }, ['Consent Group Name']),
div({ className: 'col-1 cell-header dul-color' }, ['Election N°']),
div({ className: 'col-1 cell-header dul-color' }, ['Date']),
div({ className: 'col-1 cell-header dul-color' }, ['DAC']),
div({ className: 'col-1 cell-header f-center dul-color' }, ['Edit Record']),
div({ className: 'col-1 cell-header f-center dul-color' }, ['Election status']),
div({ className: 'col-1 cell-header f-center dul-color' }, ['Election actions'])
Expand Down Expand Up @@ -410,6 +422,11 @@ class AdminManageDul extends Component {
name: 'createDate',
className: 'col-1 cell-body text'
}, [Utils.formatDate(election.createDate)]),
div({
id: election.consentId + '_dacName',
name: 'dacName',
className: 'col-1 cell-body text'
}, [this.findDacNameForDacId(election.dacId)]),
div({
className: 'col-1 cell-body f-center',
disabled: (election.electionStatus !== 'un-reviewed' || !election.editable)
Expand Down

0 comments on commit b744f4e

Please sign in to comment.