-
Notifications
You must be signed in to change notification settings - Fork 6
Cla contributor table #277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Cla contributor table #277
Conversation
Codecov Report
@@ Coverage Diff @@
## master #277 +/- ##
==========================================
+ Coverage 89.77% 90.50% +0.72%
==========================================
Files 9 9
Lines 313 337 +24
Branches 22 25 +3
==========================================
+ Hits 281 305 +24
Misses 32 32
Continue to review full report at Codecov.
|
if (props.type === AgreementType.INDIVIDUAL) { | ||
// remove the org name if we're printing individual CLAs | ||
cols.shift() | ||
// If there are extra columns, append them to the table, before the actions column |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems a little convoluted, we can probably change the logic so that:
let base_cols = [...]
const action_cols = [...]
if (props.extra_cols && props.extra_cols.length > 0) {
base_cols = [...base_cols, ...props.extra_cols]
}
const cols = [...base_cols, ...action_cols]
In this way we don't have to shift arrays around
const cols = [ | ||
{ title: 'Organization', field: 'organization' }, | ||
let cols = [ | ||
// { title: 'Organization', field: 'organization' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove this commented columns?
client/src/js/Home.jsx
Outdated
@@ -120,7 +119,7 @@ export default class Home extends React.Component { | |||
<Grid item xs={12} md={12}> | |||
<AgreementsTable | |||
header='Covered by:' | |||
type={AgreementType.INDIVIDUAL} | |||
extra_cols={[{ title: 'Organization', field: 'organization' }, { title: 'Signer', field: 'signer.name'}]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears that we already have a Signatory
field, no need to duplicate it:
{
title: 'Signatory',
sorting: false,
render: d => {
return <div>{d.signer.name} <br/> <i>{d.signer.value}</i></div>
},
customFilterAndSearch: (query, data) => {
return data.signer.name.indexOf(query) > -1 || data.signer.value.indexOf(query) > -1
}
},
This PR shows CLA's that a user is considered a contributor as.
At the bottom of the home CLA screen, there now exists a table that lists all the CLA's that the user is covered by.
A few questions:
Fixes #196