Commit bd954f1d authored by Patricio Bruna's avatar Patricio Bruna

Merge pull request #116 from ZBoxApp/issues_resolved_manager

fixed getCompany function become it to a promise, change text when ha…
parents 1c19e019 9665acbe
module.exports = {"main":{"js":"/220281bundle.js"}}
\ No newline at end of file
module.exports = {"main":{"js":"/898860bundle.js"}}
\ No newline at end of file
......@@ -185,7 +185,7 @@ export default class DomainMailboxPlans extends React.Component {
} else {
panelBody = (
<div className='text-center'>
<h4 className='text-danger'>{'No posee casillas asignadas a su dominio.'}</h4>
<h4 className='text-danger'>{'No se han asignado límites de casillas.'}</h4>
</div>
);
}
......
......@@ -287,6 +287,9 @@ export default class EditDomain extends React.Component {
];
return (
<div className='content animate-panel'>
<div className='row'>
<div className='col-md-12 central-content'>
<Panel
title={'Editar Dominio'}
btnsHeader={actions}
......@@ -295,6 +298,9 @@ export default class EditDomain extends React.Component {
>
{form}
</Panel>
</div>
</div>
</div>
);
}
......
......@@ -172,9 +172,10 @@ export function getAllCompanies() {
});
}
export function getCompany(id, success, error) {
export function getCompany(id) {
const url = global.window.manager_config.companiesEndPoints.detail.replace('{id}', id);
return new Promise((resolve, reject) => {
return $.ajax({
url,
beforeSend: function setApiToken(xhrObj) {
......@@ -182,12 +183,13 @@ export function getCompany(id, success, error) {
},
dataType: 'json',
success: function onSuccess(data) {
success(data);
resolve(data);
},
error: function onError(xhr) {
error(xhr.responseJSON);
reject(xhr.responseJSON);
}
});
});
}
export function getInvoices(id, success, error) {
......
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