All files / helpers/status translateCrossdocking.js

91.66% Statements 11/12
92.3% Branches 12/13
100% Functions 1/1
91.66% Lines 11/12

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        9x 8x   1x   1x   1x   1x   1x   1x   2x   1x 1x                              
/* eslint-disable import/no-named-as-default-member */
import I18n from '../i18n';
 
function crossdockingStatus(status) {
  if (status || status === 0) {
    switch (status) {
      case 1:
        return I18n.t('BEE4348' /* Pendente Recebimento */);
      case 2:
        return I18n.t('BEE427' /* Armazenado */);
      case 3:
        return I18n.t('BEE1431' /* Alocado */);
      case 4:
        return I18n.t('BEE1368' /* Separado */);
      case 5:
        return I18n.t('BEE1766' /* Finalizado */);
      case 6:
        return I18n.t('BEE64' /* Cancelado */);
      default:
        return status;
    }
  } else Eif (!status) {
    return [
      { value: 1, label: I18n.t('BEE4348' /* Pendente Recebimento */) },
      { value: 2, label: I18n.t('BEE427' /* Armazenado */) },
      { value: 3, label: I18n.t('BEE1431' /* Alocado */) },
      { value: 4, label: I18n.t('BEE1368' /* Separado */) },
      { value: 5, label: I18n.t('BEE1766' /* Finalizado */) },
      { value: 6, label: I18n.t('BEE64' /* Cancelado */) },
    ];
  }
  return status;
}
 
export default {
  crossdockingStatus,
};