Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set(this, 'config', { operacoes: A([]) });
- get(this, 'httpService')
- .get(Routes.build('urlConfig'))
- .then((response) => {
- const {
- diaMesAtual,
- mesesVendas,
- operacoes,
- mediaVendasDiasUteis,
- mediaVendasSabado
- } = response;
- set(this, 'operacoes', operacoes);
- set(this, 'config', {
- diaMesAtual,
- mesesVendas,
- mediaVendasDiasUteis,
- mediaVendasSabado,
- operacoes: operacoes.map(({ descricao, sigla }) => {
- return { label: descricao, value: sigla };
- }),
- });
- set(this, 'bindingOperacoes', get(this, 'operacoes')
- .filter(({ marcado }) => marcado)
- .map(({ sigla }) => sigla));
- })
- .catch((err) => {
- this.handleRequestError(err);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement