2 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
3 * Modifications Copyright (C) 2021 Nordix Foundation.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
14 * or implied. See the License for the specific language governing
15 * permissions and limitations under the License.
20 } from './SoftwareProductCreationConstants.js';
22 export default (state = {}, action) => {
23 switch (action.type) {
24 case actionTypes.OPEN:
27 formName: SP_CREATION_FORM_NAME,
28 disableVendor: action.selectedVendorId ? true : false,
30 vendorId: action.selectedVendorId
31 ? action.selectedVendorId
39 { type: 'freeEnglishText', data: true },
40 { type: 'maxLength', data: 1000 },
41 { type: 'required', data: true }
47 validations: [{ type: 'required', data: true }]
52 validations: [{ type: 'required', data: true }]
57 validations: [{ type: 'required', data: true }]
63 { type: 'required', data: true },
64 { type: 'maxLength', data: 50 },
65 { type: 'validateName', data: true }
72 { type: 'requiredChooseOption', data: true }
79 { type: 'requiredChooseOption', data: true }
90 case actionTypes.VENDOR_LIST_LOADED:
93 vendorList: action.vendorList
95 case actionTypes.RESET_DATA: