Commit 8d7885b0 authored by Juorder Gonzalez's avatar Juorder Gonzalez Committed by Juorder Antonio

fix issue to try to compile webpack bundle, the problem was that...

fix issue to try to compile webpack bundle, the problem was that babel-preset-es2015-webpack is not supported on npm version 3.*, so instead we start to use babel-preset-es2015 to solve the problem
parents 9bd61b6d 37538367
module.exports = {"main":{"js":"/222915bundle.js"}} module.exports = {"main":{"js":"/018497bundle.js"}}
\ No newline at end of file \ No newline at end of file
...@@ -29,6 +29,7 @@ export default class EditMailBox extends React.Component { ...@@ -29,6 +29,7 @@ export default class EditMailBox extends React.Component {
super(props); super(props);
this.isStoreEnabled = window.manager_config.enableStores; this.isStoreEnabled = window.manager_config.enableStores;
this.changeStatus = this.changeStatus.bind(this);
this.handleEdit = this.handleEdit.bind(this); this.handleEdit = this.handleEdit.bind(this);
this.handleRadioChanged = this.handleRadioChanged.bind(this); this.handleRadioChanged = this.handleRadioChanged.bind(this);
this.getMailbox = this.getMailbox.bind(this); this.getMailbox = this.getMailbox.bind(this);
...@@ -47,7 +48,8 @@ export default class EditMailBox extends React.Component { ...@@ -47,7 +48,8 @@ export default class EditMailBox extends React.Component {
this.currentPlan = ''; this.currentPlan = '';
this.state = { this.state = {
zimbraCOSId: '' zimbraCOSId: '',
zimbraAccountStatus: ''
}; };
} }
...@@ -58,6 +60,15 @@ export default class EditMailBox extends React.Component { ...@@ -58,6 +60,15 @@ export default class EditMailBox extends React.Component {
}); });
} }
changeStatus(e) {
const select = e.target;
const zimbraAccountStatus = select.value;
this.setState({
zimbraAccountStatus
});
}
handleRadioChanged(e, val) { handleRadioChanged(e, val) {
const {enabledAccounts} = this.state; const {enabledAccounts} = this.state;
let needToUpgrade = false; let needToUpgrade = false;
...@@ -610,6 +621,7 @@ export default class EditMailBox extends React.Component { ...@@ -610,6 +621,7 @@ export default class EditMailBox extends React.Component {
this.setState({ this.setState({
data, data,
zimbraCOSId: data.attrs.zimbraCOSId, zimbraCOSId: data.attrs.zimbraCOSId,
zimbraAccountStatus: data.attrs.zimbraAccountStatus,
domains, domains,
cos: this.cos cos: this.cos
}); });
...@@ -665,6 +677,7 @@ export default class EditMailBox extends React.Component { ...@@ -665,6 +677,7 @@ export default class EditMailBox extends React.Component {
this.setState({ this.setState({
data: account, data: account,
zimbraCOSId: account.attrs.zimbraCOSId, zimbraCOSId: account.attrs.zimbraCOSId,
zimbraAccountStatus: account.attrs.zimbraAccountStatus,
domains, domains,
cos: this.cos cos: this.cos
}); });
...@@ -717,7 +730,7 @@ export default class EditMailBox extends React.Component { ...@@ -717,7 +730,7 @@ export default class EditMailBox extends React.Component {
let currentDomain = ''; let currentDomain = '';
const cosElements = []; const cosElements = [];
const {cos} = this.state; const {cos} = this.state;
const {zimbraCOSId} = this.state; const {zimbraCOSId, zimbraAccountStatus} = this.state;
let enableAccounts; let enableAccounts;
let counterPlans = 9999; let counterPlans = 9999;
...@@ -999,6 +1012,8 @@ export default class EditMailBox extends React.Component { ...@@ -999,6 +1012,8 @@ export default class EditMailBox extends React.Component {
<select <select
className='form-control' className='form-control'
ref='zimbraAccountStatus' ref='zimbraAccountStatus'
value={zimbraAccountStatus}
onChange={this.changeStatus}
> >
{options} {options}
</select> </select>
......
...@@ -43,7 +43,7 @@ var config = { ...@@ -43,7 +43,7 @@ var config = {
loader: 'babel', loader: 'babel',
exclude: /(node_modules)/, exclude: /(node_modules)/,
query: { query: {
presets: ['react', 'es2015-webpack', 'stage-0'], presets: ['react', 'es2015', 'stage-0'],
plugins: ['transform-runtime'], plugins: ['transform-runtime'],
cacheDirectory: DEV cacheDirectory: DEV
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment