summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-item-permissions-lib/openecomp-item-permissions-api/pom.xml
blob: 2972f4a3452fded8b331a4f4ca4357d04c48667a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
  <modelVersion>4.0.0</modelVersion>


  <parent>
    <groupId>org.openecomp.sdc</groupId>
    <artifactId>openecomp-item-permissions-lib</artifactId>
    <version>1.5.2-SNAPSHOT</version>
  </parent>

  <artifactId>openecomp-item-permissions-api</artifactId>

  <dependencies>

    <dependency>
      <groupId>org.openecomp.sdc.core</groupId>
      <artifactId>openecomp-nosqldb-core</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.openecomp.sdc.core</groupId>
      <artifactId>openecomp-facade-api</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

</project>
vendorName, description} = data; return ( <div> {genericFieldInfo && <Form ref='validationForm' hasButtons={true} onSubmit={ () => this.submit() } onReset={ () => this.props.onCancel() } labledButtons={true} isValid={this.props.isFormValid} formReady={this.props.formReady} onValidateForm={() => this.validate() }> <Input value={vendorName} label={i18n('Vendor Name')} data-test-id='vendor-name' onChange={vendorName => onDataChanged({vendorName}, LICENSE_MODEL_CREATION_FORM_NAME, {vendorName: name => this.validateName(name)})} isValid={genericFieldInfo.vendorName.isValid} errorText={genericFieldInfo.vendorName.errorText} type='text' isRequired={true} className='field-section'/> <Input isRequired={true} value={description} label={i18n('Description')} data-test-id='vendor-description' overlayPos='bottom' onChange={description => onDataChanged({description}, LICENSE_MODEL_CREATION_FORM_NAME)} isValid={genericFieldInfo.description.isValid} errorText={genericFieldInfo.description.errorText} type='textarea' className='field-section'/> </Form>} </div> ); } submit() { const {data:licenseModel} = this.props; this.props.onSubmit(licenseModel); } validateName(value) { const {data: {id}, VLMNames} = this.props; const isExists = Validator.isItemNameAlreadyExistsInList({itemId: id, itemName: value, list: VLMNames}); return !isExists ? {isValid: true, errorText: ''} : {isValid: false, errorText: i18n('License model by the name \'' + value + '\' already exists. License model name must be unique')}; } validate() { this.props.onValidateForm(LICENSE_MODEL_CREATION_FORM_NAME); } } export default LicenseModelCreationView;