summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/onboarding/licenseModel
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding/licenseModel')
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js45
1 files changed, 18 insertions, 27 deletions
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js
index e07777f69e..5d425a8aa4 100644
--- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementActionHelper.js
@@ -124,46 +124,37 @@ export default {
});
},
- saveLicenseAgreement(
+ async saveLicenseAgreement(
dispatch,
{ licenseModelId, previousLicenseAgreement, licenseAgreement, version }
) {
if (previousLicenseAgreement) {
- return putLicenseAgreement(
+ await putLicenseAgreement(
licenseModelId,
previousLicenseAgreement,
licenseAgreement,
version
- ).then(() => {
- this.fetchLicenseAgreementList(dispatch, {
- licenseModelId,
- version
- });
- return ItemsHelper.checkItemStatus(dispatch, {
- itemId: licenseModelId,
- versionId: version.id
- });
- });
+ );
} else {
- return postLicenseAgreement(
+ await postLicenseAgreement(
licenseModelId,
licenseAgreement,
version
- ).then(() => {
- this.fetchLicenseAgreementList(dispatch, {
- licenseModelId,
- version
- });
- FeatureGroupsActionHelper.fetchFeatureGroupsList(dispatch, {
- licenseModelId,
- version
- });
- return ItemsHelper.checkItemStatus(dispatch, {
- itemId: licenseModelId,
- versionId: version.id
- });
- });
+ );
}
+ await this.fetchLicenseAgreementList(dispatch, {
+ licenseModelId,
+ version
+ });
+ await FeatureGroupsActionHelper.fetchFeatureGroupsList(dispatch, {
+ licenseModelId,
+ version
+ });
+
+ return ItemsHelper.checkItemStatus(dispatch, {
+ itemId: licenseModelId,
+ versionId: version.id
+ });
},
deleteLicenseAgreement(