From a624c3c48ab20fff7cddf888fa01e45f442c8a6e Mon Sep 17 00:00:00 2001 From: jecos Date: Mon, 13 Jan 2020 15:35:35 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20regressions=20:=20can't=20?= =?UTF-8?q?create=20project=20from=20selection=20=20file=20modal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/components/cavatica/CavaticaAddProject.js | 6 +++--- src/components/cavatica/CavaticaProjects.js | 5 ++++- src/components/cavatica/CavaticaSuccessToast.js | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 23bea3d1a..63ea1da0a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kf-portal-ui", - "version": "2.13.0", + "version": "2.13.1", "private": true, "dependencies": { "@kfarranger/components": "^1.4.4", diff --git a/src/components/cavatica/CavaticaAddProject.js b/src/components/cavatica/CavaticaAddProject.js index 7ab3ab4fd..d671c1c0a 100644 --- a/src/components/cavatica/CavaticaAddProject.js +++ b/src/components/cavatica/CavaticaAddProject.js @@ -45,12 +45,12 @@ class CavaticaAddProject extends Component { try { this.setState({ isSaveButtonDisabled: true }); - const { id } = await saveProject({ + const project = await saveProject({ projectName, selectedBillingGroup, billingGroups, }); - setSelectedProject(id); + setSelectedProject(project); onSuccess(); this.setState({ projectName: '', @@ -134,7 +134,7 @@ class CavaticaAddProject extends Component { } else if (!addingProject) { return ( - + Create a project {' '} diff --git a/src/components/cavatica/CavaticaProjects.js b/src/components/cavatica/CavaticaProjects.js index f61fb9201..cc9e378e1 100644 --- a/src/components/cavatica/CavaticaProjects.js +++ b/src/components/cavatica/CavaticaProjects.js @@ -114,7 +114,10 @@ const CavaticaProjects = ({
{ + setSelectedProject(p.id); + onSelectProject(p); + }} onSuccess={() => { getCavaticaProjects().then(projects => { setProjectList(projects); diff --git a/src/components/cavatica/CavaticaSuccessToast.js b/src/components/cavatica/CavaticaSuccessToast.js index 455ba4cc8..39ffadb51 100644 --- a/src/components/cavatica/CavaticaSuccessToast.js +++ b/src/components/cavatica/CavaticaSuccessToast.js @@ -13,7 +13,7 @@ export const SuccessToastComponent = ({ selectedProjectData }) => (
{selectedProjectData.name}
Open project in Cavatica