sigo-package 1.1.15 → 1.1.17

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.
@@ -1624,6 +1624,46 @@ var dataFlujosHomePass = [{
1624
1624
  Visible: false
1625
1625
  }];
1626
1626
 
1627
+ var updateNodoAsfaltoRecursivo = function updateNodoAsfaltoRecursivo(nodos, metros) {
1628
+ for (var _iterator = _createForOfIteratorHelperLoose(nodos), _step; !(_step = _iterator()).done;) {
1629
+ var nodo = _step.value;
1630
+ if (nodo.Codigo.trim() !== 'Cod100') updateNodoAsfaltoRecursivo(nodo.Children, metros);
1631
+ var nodoCod100 = nodo.Children.find(function (e) {
1632
+ return e.Codigo.trim() === 'Cod119';
1633
+ });
1634
+ if (!nodoCod100) continue;
1635
+ var childrenAux = nodo.Children.filter(function (e) {
1636
+ return !['Cod119'].includes(e.Codigo);
1637
+ });
1638
+ var mtsCod119 = 50; //CAMBIAR SEGUN LO PEDIDO
1639
+ var numCod110 = Math.ceil(metros / mtsCod119);
1640
+ var newNodosCod110 = [];
1641
+ for (var index = 0; index < numCod110; index++) {
1642
+ var inicial = index * mtsCod119;
1643
+ var _final = inicial + mtsCod119;
1644
+ var textAdd = inicial + "m - " + _final + "m";
1645
+ var numAdd = "" + inicial + _final;
1646
+ var newNodo = structuredClone(nodoCod100);
1647
+ newNodo.Codigo = "" + newNodo.Codigo + numAdd;
1648
+ newNodo.Descripcion = textAdd;
1649
+ newNodo.Titulo = textAdd;
1650
+ newNodo.id = Number("" + newNodo.id + numAdd);
1651
+ newNodo.label = textAdd;
1652
+ updateChildren(newNodo.Children, numAdd);
1653
+ newNodosCod110.push(newNodo);
1654
+ }
1655
+ nodo.Children = [].concat(childrenAux, newNodosCod110);
1656
+ }
1657
+ };
1658
+ function updateChildren(Children, numAdd) {
1659
+ for (var _iterator2 = _createForOfIteratorHelperLoose(Children), _step2; !(_step2 = _iterator2()).done;) {
1660
+ var nodo = _step2.value;
1661
+ nodo.Codigo = "" + nodo.Codigo + numAdd;
1662
+ nodo.id = Number("" + nodo.id + numAdd);
1663
+ updateChildren(nodo.Children, numAdd);
1664
+ }
1665
+ }
1666
+
1627
1667
  function updateNodosPorEspecialidad(documentacion, codEspecialidades) {
1628
1668
  documentacion.Nodos = documentacion.Nodos.filter(function (e) {
1629
1669
  return codEspecialidades.includes(e.Titulo.trim());
@@ -1655,18 +1695,18 @@ var updateNodoZanjaRecursivo = function updateNodoZanjaRecursivo(nodos, metros)
1655
1695
  newNodo.Titulo = textAdd;
1656
1696
  newNodo.id = Number("" + newNodo.id + numAdd);
1657
1697
  newNodo.label = textAdd;
1658
- updateChildren(newNodo.Children, numAdd);
1698
+ updateChildren$1(newNodo.Children, numAdd);
1659
1699
  newNodosCod110.push(newNodo);
1660
1700
  }
1661
1701
  nodo.Children = [].concat(childrenAux, newNodosCod110);
1662
1702
  }
1663
1703
  };
1664
- function updateChildren(Children, numAdd) {
1704
+ function updateChildren$1(Children, numAdd) {
1665
1705
  for (var _iterator2 = _createForOfIteratorHelperLoose(Children), _step2; !(_step2 = _iterator2()).done;) {
1666
1706
  var nodo = _step2.value;
1667
1707
  nodo.Codigo = "" + nodo.Codigo + numAdd;
1668
1708
  nodo.id = Number("" + nodo.id + numAdd);
1669
- updateChildren(nodo.Children, numAdd);
1709
+ updateChildren$1(nodo.Children, numAdd);
1670
1710
  }
1671
1711
  }
1672
1712
 
@@ -1676,6 +1716,7 @@ var UpdateNodosDocDP = function UpdateNodosDocDP(_ref) {
1676
1716
  trabajo = _ref.trabajo;
1677
1717
  var metros = obra.TotalesGeneralObra.PresupuestadoTotalObra.TotMetros;
1678
1718
  updateNodoZanjaRecursivo(documentacion.Nodos, metros);
1719
+ updateNodoAsfaltoRecursivo(documentacion.Nodos, metros);
1679
1720
  if (trabajo) {
1680
1721
  var codEspecialidadesAux = trabajo.Ultima_asignacion.Valorizaciones.map(function (e) {
1681
1722
  return e.Especialidad.Codigo;
@@ -1768,12 +1809,14 @@ var CodsMapeoMOMaterial = [{
1768
1809
  CodMatConector: '03DUC-110-214',
1769
1810
  CantidadPorDucto: 2,
1770
1811
  Alcance: '1x50-40'
1771
- }, {
1772
- CodigoMO: '010303100',
1812
+ },
1813
+ // { CodigoMO: '010303100', CodigoMaterial: '03DUC-109-210', CodMatConector: '03DUC-110-207', CantidadPorDucto: 1, Alcance: '1X12-10', },
1814
+ {
1815
+ CodigoMO: '',
1773
1816
  CodigoMaterial: '03DUC-109-210',
1774
1817
  CodMatConector: '03DUC-110-207',
1775
1818
  CantidadPorDucto: 1,
1776
- Alcance: '1X12-10'
1819
+ Alcance: ''
1777
1820
  }, {
1778
1821
  CodigoMO: '010403300',
1779
1822
  CodigoMaterial: '03DUC-109-209',
@@ -1804,6 +1847,12 @@ var CodsMapeoMOMaterial = [{
1804
1847
  CodMatConector: '03DUC-110-210',
1805
1848
  CantidadPorDucto: 1,
1806
1849
  Alcance: '1x7-4'
1850
+ }, {
1851
+ CodigoMO: '',
1852
+ CodigoMaterial: '03DUC-109-205',
1853
+ CodMatConector: '03DUC-110-201',
1854
+ CantidadPorDucto: 1,
1855
+ Alcance: ''
1807
1856
  }];
1808
1857
  var CodsMapeoMOMaterialSopladoClientes = [{
1809
1858
  CodigoMO: 'T14',