Commit 60df27e1 authored by Juorder Gonzalez's avatar Juorder Gonzalez Committed by GitHub

Merge pull request #204 from ZBoxApp/issues_resolved_manager

fix refresh when adding or removing DL, the problem seems to be event…
parents c742a6b2 d454e9b4
......@@ -41,16 +41,18 @@ export default class DomainDistributionList extends React.Component {
}
getLists() {
const domain = this.props.domain;
domain.getAllDistributionLists(
(err, lists) => {
console.log('getAllDL', lists); //eslint-disable-line no-console
if (this.isStoreEnabled) {
DomainStore.setDistibutionLists(domain, lists);
setTimeout(() => {
domain.getAllDistributionLists(
(err, lists) => {
console.log('getAllDL', lists); //eslint-disable-line no-console
if (this.isStoreEnabled) {
DomainStore.setDistibutionLists(domain, lists);
}
this.listscache = lists;
this.setState({lists});
}
this.listscache = lists;
this.setState({lists});
}
);
);
}, 100);
}
componentWillReceiveProps(nextProps) {
const page = parseInt(nextProps.location.query.page, 10) || 1;
......
......@@ -348,9 +348,8 @@ export default class ImportMassiveModal extends React.Component {
}
//Aqui va error batchrequest
if (this.show) {
this.onHide();
if (this.props.show) {
this.props.onHide();
}
return GlobalActions.emitEndTask({
......
......@@ -201,6 +201,11 @@ export default class Mailboxes extends React.Component {
limit: 5000
};
this.setState({
loading: true,
data: null
});
const attrneeded = Utils.getAttrsBySectionFromConfig('mailboxes');
if (attrneeded) {
......@@ -311,18 +316,23 @@ export default class Mailboxes extends React.Component {
refreshAllAccounts() {
const mailboxes = this.isStoreEnabled ? MailboxStore.getMailboxes() : null;
const tables = this.buildTableFromData(mailboxes, ['Todas', 'Bloqueadas']);
if (tables.lockedAlert) {
GlobalActions.emitMessage({
error: tables.lockedAlert.message,
typeError: messageType.LOCKED
if (mailboxes) {
const tables = this.buildTableFromData(mailboxes, ['Todas']);
if (tables.lockedAlert) {
GlobalActions.emitMessage({
error: tables.lockedAlert.message,
typeError: messageType.LOCKED
});
}
return this.setState({
data: tables
});
}
this.setState({
data: tables
});
return this.getAllMailboxes();
}
componentDidMount() {
......
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