@seniorsistemas/yms-integration 1.3.2 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8982,6 +8982,35 @@
8982
8982
  return ContratoFormComponent;
8983
8983
  }());
8984
8984
 
8985
+ var Transgenia = /** @class */ (function () {
8986
+ function Transgenia() {
8987
+ }
8988
+ Transgenia.fromDto = function (transgeniaDto, originEntity) {
8989
+ var model = __assign({}, transgeniaDto);
8990
+ var lookupSeparator = " - ";
8991
+ var displayFields = [
8992
+ "codigo",
8993
+ "descricao",
8994
+ ];
8995
+ model.label = getLookupLabel(model, displayFields, lookupSeparator);
8996
+ if (originEntity !== "Empresa" && model.empresa)
8997
+ model.empresa = Empresa.fromDto(model.empresa, "Transgenia");
8998
+ if (originEntity !== "Royalty" && model.royalty)
8999
+ model.royalty = Royalty.fromDto(model.royalty, "Royalty");
9000
+ return model;
9001
+ };
9002
+ Transgenia.toDto = function (transgenia, originEntity) {
9003
+ var dto = __assign({}, transgenia);
9004
+ delete dto.label;
9005
+ if (originEntity !== "Empresa" && dto.empresa)
9006
+ dto.empresa = Empresa.toDto(dto.empresa, "Transgenia");
9007
+ if (originEntity !== "Royalty" && dto.royalty)
9008
+ dto.roylty = Royalty.toDto(dto.royalty, "Transgenia");
9009
+ return dto;
9010
+ };
9011
+ return Transgenia;
9012
+ }());
9013
+
8985
9014
  var moment$q = _moment;
8986
9015
  /*{CA:PROJECT_IMPORTS:START}*/
8987
9016
  /*{CA:PROJECT_IMPORTS:END}*/
@@ -9013,6 +9042,9 @@
9013
9042
  "transportadora.id",
9014
9043
  "transportadora.codigo",
9015
9044
  "transportadora.placaVeiculo",
9045
+ "transgenia.id",
9046
+ "transgenia.codigo",
9047
+ "transgenia.descricao",
9016
9048
  "tipoNotaFiscal",
9017
9049
  "createdBy",
9018
9050
  "createdDate",
@@ -9032,6 +9064,8 @@
9032
9064
  model.derivacao = Derivacao.fromDto(model.derivacao, "Recebimento");
9033
9065
  if ((originEntity !== "Transportadora" && model.transportadora))
9034
9066
  model.transportadora = Transportadora.fromDto(model.transportadora, "Recebimento");
9067
+ if ((originEntity !== "Transgenia" && model.transgenia))
9068
+ model.transgenia = Transgenia.fromDto(model.transgenia, "Transgenia");
9035
9069
  model.fornecedores = model.fornecedores.map(function (fornecedor) { return (__assign({}, fornecedor, { fornecedor: Pessoa.fromDto(fornecedor.fornecedor, "Recebimento"), origemMercadoria: PessoaEndereco.fromDto(fornecedor.origemMercadoria, "Recebimento"), contratos: fornecedor.contratos.map(function (contrato) { return (__assign({}, contrato, { contrato: ContratoCompra.fromDto(contrato.contrato), itens: contrato.itens.map(function (item) { return (__assign({}, item, { item: ContratoCompraItem.fromDto(item.item) })); }) })); }) })); });
9036
9070
  return model;
9037
9071
  };
@@ -9052,6 +9086,8 @@
9052
9086
  dto.origemMercadoria = PessoaEndereco.toDto(dto.origemMercadoria, "Recebimento");
9053
9087
  if ((originEntity !== "Transportadora" && dto.transportadora))
9054
9088
  dto.transportadora = Transportadora.toDto(dto.transportadora, "Recebimento");
9089
+ if ((originEntity !== "Transgenia" && dto.transgenia))
9090
+ dto.transgenia = Transgenia.toDto(dto.transgenia, "Transgenia");
9055
9091
  dto.fornecedores = recebimento.fornecedores.map(function (fornecedor) { return (__assign({}, fornecedor, { fornecedor: Pessoa.toDto(fornecedor.fornecedor, "Recebimento"), origemMercadoria: PessoaEndereco.toDto(fornecedor.origemMercadoria, "Recebimento"), contratos: fornecedor.contratos.map(function (contrato) { return (__assign({}, contrato, { contrato: ContratoCompra.toDto(contrato.contrato), itens: contrato.itens.map(function (item) { return (__assign({}, item, { item: ContratoCompraItem.toDto(item.item) })); }) })); }) })); });
9056
9092
  return dto;
9057
9093
  };