mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Add improvements to add & edit application forms in APPM UI
- Remove price field and tenancy sharing switch - Make supported OS versions a required field
This commit is contained in:
parent
d43bfecda9
commit
dfc4ce98cb
@ -57,10 +57,10 @@ class ListApps extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<Card>
|
<Card>
|
||||||
<Row gutter={28}>
|
<Row gutter={28}>
|
||||||
<Col md={7}>
|
<Col md={6}>
|
||||||
<Filters setFilters={this.setFilters}/>
|
<Filters setFilters={this.setFilters}/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col md={17}>
|
<Col md={18}>
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={6}>
|
<Col span={6}>
|
||||||
<Title level={4}>Apps</Title>
|
<Title level={4}>Apps</Title>
|
||||||
|
|||||||
@ -59,7 +59,7 @@ function getBase64(file) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class EditReleaseModal extends React.Component {
|
class EditReleaseModal extends React.Component {
|
||||||
|
// To add subscription type & tenancy sharing, refer https://gitlab.com/entgra/carbon-device-mgt/merge_requests/331
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
@ -162,12 +162,6 @@ class EditReleaseModal extends React.Component {
|
|||||||
},
|
},
|
||||||
releaseDescription: {
|
releaseDescription: {
|
||||||
value: release.description
|
value: release.description
|
||||||
},
|
|
||||||
price: {
|
|
||||||
value: release.price
|
|
||||||
},
|
|
||||||
isSharedWithAllTenants: {
|
|
||||||
value: release.isSharedWithAllTenants
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -252,7 +246,7 @@ class EditReleaseModal extends React.Component {
|
|||||||
this.setState({
|
this.setState({
|
||||||
loading: true
|
loading: true
|
||||||
});
|
});
|
||||||
const {price, isSharedWithAllTenants, releaseDescription, releaseType} = values;
|
const {releaseDescription, releaseType} = values;
|
||||||
|
|
||||||
const {icons, screenshots, binaryFiles} = this.state;
|
const {icons, screenshots, binaryFiles} = this.state;
|
||||||
|
|
||||||
@ -261,8 +255,8 @@ class EditReleaseModal extends React.Component {
|
|||||||
//add release data
|
//add release data
|
||||||
const release = {
|
const release = {
|
||||||
description: releaseDescription,
|
description: releaseDescription,
|
||||||
price: (price === undefined) ? 0 : parseInt(price),
|
price: 0,
|
||||||
isSharedWithAllTenants,
|
isSharedWithAllTenants: false,
|
||||||
metaData: JSON.stringify(this.state.metaData),
|
metaData: JSON.stringify(this.state.metaData),
|
||||||
releaseType: releaseType,
|
releaseType: releaseType,
|
||||||
};
|
};
|
||||||
@ -282,10 +276,6 @@ class EditReleaseModal extends React.Component {
|
|||||||
if (specificElements.hasOwnProperty("url")) {
|
if (specificElements.hasOwnProperty("url")) {
|
||||||
release.url = values.url;
|
release.url = values.url;
|
||||||
}
|
}
|
||||||
//
|
|
||||||
// if (specificElements.hasOwnProperty("packageName")) {
|
|
||||||
// release.packageName = values.packageName;
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (icons.length === 1) {
|
if (icons.length === 1) {
|
||||||
data.append('icon', icons[0].originFileObj);
|
data.append('icon', icons[0].originFileObj);
|
||||||
@ -589,30 +579,6 @@ class EditReleaseModal extends React.Component {
|
|||||||
)}
|
)}
|
||||||
</Form.Item>
|
</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">
|
<Form.Item {...formItemLayout} label="Meta Data">
|
||||||
{getFieldDecorator('meta', {
|
{getFieldDecorator('meta', {
|
||||||
rules: [{
|
rules: [{
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user