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