Add improvements to add & edit application forms in APPM UI

- Remove price field and tenancy sharing switch
- Make supported OS versions a required field
feature/appm-store/pbac
Jayasanka 5 years ago
parent d43bfecda9
commit dfc4ce98cb

@ -57,10 +57,10 @@ class ListApps extends React.Component {
return (
<Card>
<Row gutter={28}>
<Col md={7}>
<Col md={6}>
<Filters setFilters={this.setFilters}/>
</Col>
<Col md={17}>
<Col md={18}>
<Row>
<Col span={6}>
<Title level={4}>Apps</Title>

@ -59,7 +59,7 @@ function getBase64(file) {
}
class EditReleaseModal extends React.Component {
// To add subscription type & tenancy sharing, refer https://gitlab.com/entgra/carbon-device-mgt/merge_requests/331
constructor(props) {
super(props);
this.state = {
@ -162,12 +162,6 @@ class EditReleaseModal extends React.Component {
},
releaseDescription: {
value: release.description
},
price: {
value: release.price
},
isSharedWithAllTenants: {
value: release.isSharedWithAllTenants
}
});
@ -252,7 +246,7 @@ class EditReleaseModal extends React.Component {
this.setState({
loading: true
});
const {price, isSharedWithAllTenants, releaseDescription, releaseType} = values;
const {releaseDescription, releaseType} = values;
const {icons, screenshots, binaryFiles} = this.state;
@ -261,8 +255,8 @@ class EditReleaseModal extends React.Component {
//add release data
const release = {
description: releaseDescription,
price: (price === undefined) ? 0 : parseInt(price),
isSharedWithAllTenants,
price: 0,
isSharedWithAllTenants: false,
metaData: JSON.stringify(this.state.metaData),
releaseType: releaseType,
};
@ -282,10 +276,6 @@ class EditReleaseModal extends React.Component {
if (specificElements.hasOwnProperty("url")) {
release.url = values.url;
}
//
// if (specificElements.hasOwnProperty("packageName")) {
// release.packageName = values.packageName;
// }
if (icons.length === 1) {
data.append('icon', icons[0].originFileObj);
@ -589,30 +579,6 @@ class EditReleaseModal extends React.Component {
)}
</Form.Item>
)}
<Form.Item {...formItemLayout} label="Price">
{getFieldDecorator('price', {
rules: [{
required: false
}],
})(
<Input prefix="$" placeholder="00.00"/>
)}
</Form.Item>
<Form.Item {...formItemLayout} label="Is Shared?">
{getFieldDecorator('isSharedWithAllTenants', {
rules: [{
required: true,
message: 'Please select'
}],
initialValue: false
})(
<Switch checkedChildren={<Icon type="check"/>}
unCheckedChildren={<Icon type="close"/>}
/>
)}
</Form.Item>
<Form.Item {...formItemLayout} label="Meta Data">
{getFieldDecorator('meta', {
rules: [{

Loading…
Cancel
Save