ProjectManagement: Cancel edit project fix
Signed-off-by: Laurence Maultsby <laurence.maultsby@riftio.com>
diff --git a/skyquake/plugins/project_management/src/dashboard/dashboard.jsx b/skyquake/plugins/project_management/src/dashboard/dashboard.jsx
index bc67dbf..02b9384 100644
--- a/skyquake/plugins/project_management/src/dashboard/dashboard.jsx
+++ b/skyquake/plugins/project_management/src/dashboard/dashboard.jsx
@@ -76,7 +76,7 @@
this.actions.handleAddProject();
}
viewProject = (un, index) => {
- this.actions.viewProject(un, index);
+ this.actions.viewProject(un, index, true);
}
editProject = () => {
this.actions.editProject(false);
diff --git a/skyquake/plugins/project_management/src/dashboard/projectMgmtStore.js b/skyquake/plugins/project_management/src/dashboard/projectMgmtStore.js
index 71c10a2..f0a8eeb 100644
--- a/skyquake/plugins/project_management/src/dashboard/projectMgmtStore.js
+++ b/skyquake/plugins/project_management/src/dashboard/projectMgmtStore.js
@@ -58,9 +58,11 @@
projectRoles
});
}
- viewProject(data) {
+ viewProject() {
+ let data = arguments[0];
let project = data[0];
let projectIndex = data[1];
+ let isReadOnly = data[2];
let ProjectData = {
'name': project['name'],
@@ -71,14 +73,15 @@
activeIndex: projectIndex,
projectOpen: true,
isEdit: true,
- isReadOnly: true
+ isReadOnly: isReadOnly
}, ProjectData);
this.setState(state)
}
- editProject(isEdit) {
- this.setState({
- isReadOnly: isEdit
- })
+ editProject(isReadOnly) {
+ this.viewProject([this.projects[this.activeIndex], this.activeIndex, isReadOnly]);
+ // this.setState({
+ // isReadOnly: isEdit
+ // })
}
handleCloseProjectPanel() {
this.setState({