All files / helpers/status translateInboundOrders.js

92.59% Statements 25/27
93.1% Branches 27/29
100% Functions 2/2
92.59% Lines 25/27

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79        16x 13x   1x   1x   1x   3x   1x   1x   1x   1x   1x   2x   3x 3x                               10x 7x   1x   1x   1x   1x   1x   1x   1x   3x 3x                                
/* eslint-disable import/no-named-as-default-member */
import I18n from '../i18n';
 
function inboundOrderStatus(status) {
  if (status || status === 0) {
    switch (status) {
      case 1:
        return I18n.t('BEE1783' /* Pendente de Placa */);
      case 2:
        return I18n.t('BEE471' /* Conferência Placa Finalizada */);
      case 3:
        return I18n.t('BEE472' /* Conferência Física Pendente */);
      case 4:
        return I18n.t('BEE473' /* Conferência Física Iniciada */);
      case 5:
        return I18n.t('BEE474' /* Conferência Física Finalizada */);
      case 6:
        return I18n.t('BEE475' /* Em armazenagem */);
      case 7:
        return I18n.t('BEE427' /* Armazenado */);
      case 8:
        return I18n.t('BEE207' /* Bloqueado */);
      case 9:
        return I18n.t('BEE64' /* Cancelado */);
      default:
        return status;
    }
  } else Eif (!status) {
    return [
      { value: 1, label: I18n.t('BEE1783' /* Pendente de Placa */) },
      { value: 2, label: I18n.t('BEE471' /* Conferência Placa Finalizada */) },
      { value: 3, label: I18n.t('BEE472' /* Conferência Física Pendente */) },
      { value: 4, label: I18n.t('BEE473' /* Conferência Física Iniciada */) },
      { value: 5, label: I18n.t('BEE474' /* Conferência Física Finalizada */) },
      { value: 6, label: I18n.t('BEE475' /* Em armazenagem */) },
      { value: 7, label: I18n.t('BEE427' /* Armazenado */) },
      { value: 8, label: I18n.t('BEE207' /* Bloqueado */) },
      { value: 9, label: I18n.t('BEE64' /* Cancelado */) },
    ];
  }
  return status;
}
 
function inboundOrderProductStatus(status) {
  if (status || status === 0) {
    switch (status) {
      case 1:
        return I18n.t('BEE470' /* Pendente */);
      case 2:
        return I18n.t('BEE445' /* Conferido */);
      case 3:
        return I18n.t('BEE548' /* Armazenado Parcial */);
      case 4:
        return I18n.t('BEE427' /* Armazenado */);
      case 5:
        return I18n.t('BEE207' /* Bloqueado */);
      case 6:
        return I18n.t('BEE64' /* Cancelado */);
      default:
        return status;
    }
  } else Eif (!status) {
    return [
      { value: 1, label: I18n.t('BEE470' /* Pendente */) },
      { value: 2, label: I18n.t('BEE445' /* Conferido */) },
      { value: 3, label: I18n.t('BEE548' /* Armazenado Parcial */) },
      { value: 4, label: I18n.t('BEE427' /* Armazenado */) },
      { value: 5, label: I18n.t('BEE207' /* Bloqueado */) },
      { value: 6, label: I18n.t('BEE64' /* Cancelado */) },
    ];
  }
  return status;
}
 
export default {
  inboundOrderStatus,
  inboundOrderProductStatus,
};