daily pastebin goal
29%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. set(this, 'config', { operacoes: A([]) });
  2.  
  3. get(this, 'httpService')
  4.   .get(Routes.build('urlConfig'))
  5.   .then((response) => {
  6.  
  7.     const {
  8.       diaMesAtual,
  9.       mesesVendas,
  10.       operacoes,
  11.       mediaVendasDiasUteis,
  12.       mediaVendasSabado
  13.     } = response;
  14.  
  15.     set(this, 'operacoes', operacoes);
  16.  
  17.     set(this, 'config', {
  18.       diaMesAtual,
  19.       mesesVendas,
  20.       mediaVendasDiasUteis,
  21.       mediaVendasSabado,
  22.       operacoes: operacoes.map(({ descricao, sigla }) => {
  23.         return { label: descricao, value: sigla };
  24.       }),
  25.     });
  26.  
  27.     set(this, 'bindingOperacoes', get(this, 'operacoes')
  28.       .filter(({ marcado }) => marcado)
  29.       .map(({ sigla }) => sigla));
  30.    
  31.   })
  32.   .catch((err) => {
  33.     this.handleRequestError(err);
  34.   });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top