Skip to content

Commit

Permalink
Merge pull request #2239 from kids-first/dev
Browse files Browse the repository at this point in the history
🐛 Fix regressions : can't create project from selection  file modal
  • Loading branch information
Jeremy Costanza authored Jan 13, 2020
2 parents d79ca43 + 2619f7c commit a1b1b4a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kf-portal-ui",
"version": "2.13.0",
"version": "2.13.1",
"private": true,
"dependencies": {
"@kfarranger/components": "^1.4.4",
Expand Down
6 changes: 3 additions & 3 deletions src/components/cavatica/CavaticaAddProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: '',
Expand Down Expand Up @@ -134,7 +134,7 @@ class CavaticaAddProject extends Component {
} else if (!addingProject) {
return (
<Row className="cavaticaAddProject-container">
<WhiteButton className="createButton" onClick={this.onWhiteButtonClick}>
<WhiteButton className="createButton" onClick={this.onCreateButtonClick}>
<PlusIcon className="addIcon" width="12px" height="12px" />
Create a project
</WhiteButton>{' '}
Expand Down
5 changes: 4 additions & 1 deletion src/components/cavatica/CavaticaProjects.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ const CavaticaProjects = ({
</div>
<div className="footer">
<CavaticaAddProject
setSelectedProject={setSelectedProject}
setSelectedProject={p => {
setSelectedProject(p.id);
onSelectProject(p);
}}
onSuccess={() => {
getCavaticaProjects().then(projects => {
setProjectList(projects);
Expand Down
2 changes: 1 addition & 1 deletion src/components/cavatica/CavaticaSuccessToast.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const SuccessToastComponent = ({ selectedProjectData }) => (
<div style={{ color: theme.secondary, marginBottom: '20px' }}>{selectedProjectData.name}</div>
<ExternalLink
style={{ fontSize: '14px' }}
href={`${cavaticaWebRoot}/u/${selectedProjectData.id}`}
href={`${cavaticaWebRoot}u/${selectedProjectData.id}`}
>
Open project in Cavatica
<RightArrows fill={theme.primary} width="10px" style={{ marginLeft: '4px' }} />
Expand Down

0 comments on commit a1b1b4a

Please sign in to comment.