Skip to content
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

Fixes frontend build warnigns in resource-manager #4025

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fixes frontend build warnings in resource-manager
The frontend build of the new resource-manager had many warnings which this PR resolves. (whitespace and unused vars and method parameters).
  • Loading branch information
valadas committed Sep 1, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 9cd159742f7d97d3d038207b347d54620d77becd
Original file line number Diff line number Diff line change
@@ -31,8 +31,8 @@ const FolderDetails = ({folder, handlers, validationErrors}) => (
<div className="separator"></div>
<div>
<Permissions
folderBeingEdited={folder}
updateFolderBeingEdited={(permissions) => handlers.changePermissions(permissions)}
folderBeingEdited={folder}
updateFolderBeingEdited={(permissions) => handlers.changePermissions(permissions)}
></Permissions>
</div>
<div className="separator"></div>
Original file line number Diff line number Diff line change
@@ -6,52 +6,52 @@ import { PermissionGrid } from "@dnnsoftware/dnn-react-common";
import DnnSf from "../globals/dnnSf";

class Permissions extends React.Component {
constructor(props) {
super(props);

this.state = {
permissions: JSON.parse(
JSON.stringify(props.folderBeingEdited.permissions)
),
};
}

onPermissionsChanged(permissions) {
const { state } = this;

let newPermissions = Object.assign({}, state.permissions, permissions);
this.props.updateFolderBeingEdited(newPermissions);
this.setState({ permissions: newPermissions });
}

render() {
const { props, state } = this;
const dnnSf = new DnnSf();
const grid = (
<PermissionGrid
dispatch={(e) => {}}
permissions={state.permissions}
service={dnnSf}
onPermissionsChanged={this.onPermissionsChanged.bind(this)}
/>
);
return <div>{grid}</div>;
}
constructor(props) {
super(props);

this.state = {
permissions: JSON.parse(
JSON.stringify(props.folderBeingEdited.permissions)
),
};
}

onPermissionsChanged(permissions) {
const { state } = this;

let newPermissions = Object.assign({}, state.permissions, permissions);
this.props.updateFolderBeingEdited(newPermissions);
this.setState({ permissions: newPermissions });
}

render() {
const { props, state } = this;
const dnnSf = new DnnSf();
const grid = (
<PermissionGrid
dispatch={(e) => {}}
permissions={state.permissions}
service={dnnSf}
onPermissionsChanged={this.onPermissionsChanged.bind(this)}
/>
);
return <div>{grid}</div>;
}
}

Permissions.propTypes = {
updateFolderBeingEdited: PropTypes.func,
folderBeingEdited: PropTypes.object,
updateFolderBeingEdited: PropTypes.func,
folderBeingEdited: PropTypes.object,
};

function mapStateToProps(state) {
return {};
return {};
}

function mapDispatchToProps(dispatch) {
return {
...bindActionCreators({}, dispatch),
};
return {
...bindActionCreators({}, dispatch),
};
}

export default connect(mapStateToProps, mapDispatchToProps)(Permissions);
Loading