Work in progress on subscriptions
This commit is contained in:
parent
d9211377dd
commit
e73c0a8b28
42 changed files with 1558 additions and 678 deletions
|
@ -98,20 +98,6 @@ export default class Share extends Component {
|
|||
render() {
|
||||
const t = this.props.t;
|
||||
|
||||
const actions = data => {
|
||||
const actions = [];
|
||||
const autoGenerated = data[4];
|
||||
|
||||
if (!autoGenerated) {
|
||||
actions.push({
|
||||
label: 'Delete',
|
||||
action: () => this.deleteShare(data[3])
|
||||
});
|
||||
}
|
||||
|
||||
return actions;
|
||||
};
|
||||
|
||||
const sharesColumns = [];
|
||||
sharesColumns.push({ data: 0, title: t('Username') });
|
||||
if (mailtrainConfig.isAuthMethodLocal) {
|
||||
|
@ -119,6 +105,21 @@ export default class Share extends Component {
|
|||
}
|
||||
sharesColumns.push({ data: 2, title: t('Role') });
|
||||
|
||||
sharesColumns.push({
|
||||
actions: data => {
|
||||
const actions = [];
|
||||
const autoGenerated = data[4];
|
||||
|
||||
if (!autoGenerated) {
|
||||
actions.push({
|
||||
label: 'Delete',
|
||||
action: () => this.deleteShare(data[3])
|
||||
});
|
||||
}
|
||||
|
||||
return actions;
|
||||
}
|
||||
})
|
||||
|
||||
let usersLabelIndex = 1;
|
||||
const usersColumns = [
|
||||
|
@ -155,7 +156,7 @@ export default class Share extends Component {
|
|||
<hr/>
|
||||
<h3 className="legend">{t('Existing Users')}</h3>
|
||||
|
||||
<Table ref={node => this.sharesTable = node} withHeader dataUrl={`/rest/shares-table-by-entity/${this.props.entityTypeId}/${this.props.entity.id}`} columns={sharesColumns} actions={actions}/>
|
||||
<Table ref={node => this.sharesTable = node} withHeader dataUrl={`/rest/shares-table-by-entity/${this.props.entityTypeId}/${this.props.entity.id}`} columns={sharesColumns} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue