diff options
author | Einav Weiss Keidar <einavw@amdocs.com> | 2018-08-13 16:19:46 +0300 |
---|---|---|
committer | Avi Gaffa <avi.gaffa@amdocs.com> | 2019-02-11 13:50:22 +0000 |
commit | 1801b24389baa8e3f7298ff2c41e2512b19c1290 (patch) | |
tree | d3d2a15f53aa28698280d609548298d177f9280d /openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsActionHelper.js | |
parent | af8e36eb7f43803bd9cf40e9b46a0c0c8f47c781 (diff) |
react 16 upgrade
Issue-ID: SDC-1762
Change-Id: I7701f12fc63bb09f8c985c7c893b984701dcbfab
Signed-off-by: Einav Keidar <einavw@amdocs.com>
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsActionHelper.js')
-rw-r--r-- | openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsActionHelper.js | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsActionHelper.js index 53276ca49b..c9f0505ad1 100644 --- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsActionHelper.js +++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsActionHelper.js @@ -19,6 +19,12 @@ import { actionTypes as licenseKeyGroupsConstants } from './LicenseKeyGroupsCons import { actionTypes as limitEditorActions } from 'sdc-app/onboarding/licenseModel/limits/LimitEditorConstants.js'; import { default as getValue, getStrValue } from 'nfvo-utils/getValue.js'; import ItemsHelper from 'sdc-app/common/helpers/ItemsHelper.js'; +import i18n from 'nfvo-utils/i18n/i18n.js'; +import { + actionTypes as modalActionTypes, + modalSizes +} from 'nfvo-components/modal/GlobalModalConstants.js'; +import { modalContentMapper } from 'sdc-app/common/modal/ModalContentMapper.js'; function baseUrl(licenseModelId, version) { const restPrefix = Configuration.get('restPrefix'); @@ -131,9 +137,9 @@ export default { openLicenseKeyGroupsEditor( dispatch, - { licenseKeyGroup, licenseModelId, version } = {} + { licenseKeyGroup, licenseModelId, version, isReadOnlyMode } = {} ) { - if (licenseModelId && version) { + if (licenseModelId && version && licenseKeyGroup) { this.fetchLimits(dispatch, { licenseModelId, version, @@ -144,12 +150,31 @@ export default { type: licenseKeyGroupsConstants.licenseKeyGroupsEditor.OPEN, licenseKeyGroup }); + dispatch({ + type: modalActionTypes.GLOBAL_MODAL_SHOW, + data: { + modalComponentName: modalContentMapper.LKG_EDITOR, + modalComponentProps: { + version, + licenseModelId, + isReadOnlyMode, + size: modalSizes.LARGE + }, + title: + licenseModelId && version && licenseKeyGroup + ? i18n('Edit License Key Group') + : i18n('Create New License Key Group') + } + }); }, closeLicenseKeyGroupEditor(dispatch) { dispatch({ type: licenseKeyGroupsConstants.licenseKeyGroupsEditor.CLOSE }); + dispatch({ + type: modalActionTypes.GLOBAL_MODAL_CLOSE + }); }, async saveLicenseKeyGroup( |