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
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 { state } = this;
const dnnSf = new DnnSf();
const grid = (
<PermissionGrid
dispatch={()=>{}}
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 {};
function mapStateToProps() {
return {};
}

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

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