From 33e7d718a87f4c96834cad237ad196ce74d58a7b Mon Sep 17 00:00:00 2001 From: diazz Date: Fri, 17 Apr 2020 23:45:22 +0700 Subject: [PATCH] fix problem with loading poisition + hide/show profiile fix problem with loading poisition + hide/show profiile --- .../create/components/FillProjectDetails.js | 30 ++++++++++++------- .../create/components/FillProjectDetails.scss | 4 +-- .../create/components/UpdateUserInfo.scss | 4 ++- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/projects/create/components/FillProjectDetails.js b/src/projects/create/components/FillProjectDetails.js index 08216b9c2..95618ab58 100644 --- a/src/projects/create/components/FillProjectDetails.js +++ b/src/projects/create/components/FillProjectDetails.js @@ -102,7 +102,15 @@ class FillProjectDetails extends Component { } closeUserSettings() { - this.setState({ showUpdateUser: false }) + const { isMissingUserInfo } = this.props + this.setState({ + showUpdateUser: false, + ... ( + isMissingUserInfo ? { + requireCheckUserSetting: false + } : {} + ) + }) } onRequireCheckUserSetting(isRequire, cb) { @@ -139,7 +147,9 @@ class FillProjectDetails extends Component { const projectTemplateId = _.get(project, 'templateId') const projectTemplate = _.find(projectTemplates, { id: projectTemplateId }) const formDisclaimer = _.get(projectTemplate, 'scope.formDisclaimer') - + const showLoading = (isSavingProject || + profileSettings.isLoading || + profileSettings.pending) const template = projectTemplate.scope let header = null @@ -176,13 +186,15 @@ class FillProjectDetails extends Component { })} > {showUpdateUser && ( - +
+ +
)} -
+
{header}
@@ -225,9 +237,7 @@ class FillProjectDetails extends Component {
- {(isSavingProject || - profileSettings.isLoading || - profileSettings.pending) && ( + {showLoading && (
diff --git a/src/projects/create/components/FillProjectDetails.scss b/src/projects/create/components/FillProjectDetails.scss index 436fa4bc6..4d2087af6 100644 --- a/src/projects/create/components/FillProjectDetails.scss +++ b/src/projects/create/components/FillProjectDetails.scss @@ -14,6 +14,7 @@ .FillProjectDetailsWrapper { // @extend .wizardWrapper; position: relative; + min-height: 85px; &.form-theme-light { .FillProjectDetails { @@ -38,13 +39,12 @@ display: flex; justify-content: center; align-items: center; - padding-top: 20px; } } .FillProjectDetails { - &.hide { + .hide { display: none; } diff --git a/src/projects/create/components/UpdateUserInfo.scss b/src/projects/create/components/UpdateUserInfo.scss index 5aa76e1fb..42dc2afd5 100644 --- a/src/projects/create/components/UpdateUserInfo.scss +++ b/src/projects/create/components/UpdateUserInfo.scss @@ -10,11 +10,13 @@ } .user-container { - padding: 20px 50px 50px; + padding: 20px 0; display: flex; flex-direction: column; align-items: center; margin-top: -67px; + max-width: 760px; + margin: 0 auto; > * { width: 100%;