2 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
13 * or implied. See the License for the specific language governing
14 * permissions and limitations under the License.
19 } from './SoftwareProductCreationConstants.js';
21 export default (state = {}, action) => {
22 switch (action.type) {
23 case actionTypes.OPEN:
26 formName: SP_CREATION_FORM_NAME,
27 disableVendor: action.selectedVendorId ? true : false,
29 vendorId: action.selectedVendorId
30 ? action.selectedVendorId
38 { type: 'freeEnglishText', data: true },
39 { type: 'maxLength', data: 1000 },
40 { type: 'required', data: true }
46 validations: [{ type: 'required', data: true }]
51 validations: [{ type: 'required', data: true }]
56 validations: [{ type: 'required', data: true }]
62 { type: 'required', data: true },
63 { type: 'maxLength', data: 50 },
64 { type: 'validateName', data: true }
71 { type: 'requiredChooseOption', data: true }
77 case actionTypes.VENDOR_LIST_LOADED:
80 vendorList: action.vendorList
82 case actionTypes.RESET_DATA: