Quintiq file version 2.0
#parent: #root
Method HideLanelegsFromClient (
  Boolean ishide
) id:Method_FormSupplyChainOverview_HideLanelegsFromClient
{
  #keys: '[136682.0.1955944532]'
  Body:
  [*
    //Hide lanelegs
    lanes := construct( LaneLegEdges );
    nodes := DataHolderNode.Data();
    if ( not ishide )
    {
        //Laneg edges (Stockingpointnode)
      stockingpointnods := selectset(  nodes, Elements.astype( StockingPointNode ), s, true, true );
      inputlaneleges := selectset(  stockingpointnods, Elements.AsDestinationStockingPoint, origin, true, true );
      outputlaneleges := selectset(  stockingpointnods, Elements.AsOriginStockingPoint, dest, true, true );
      stockingedge := inputlaneleges.Union( outputlaneleges );
      
      //Laneg edges (Unitnode)
      unitnodes := selectset(  nodes, Elements.astype( UnitNode ), s, true, true );
      unitdest := selectset(  unitnodes, Elements.AsDestinationUnit, origin, true, true );
      unitorigin := selectset( unitnodes, Elements.AsOriginUnit, dest, true, true );
      unitedge := unitorigin.Union( unitdest );
      
      lanes := stockingedge.Union( unitedge );  
    }
    
    DataHolderLaneLegEdge.Data( &lanes )
  *]
}
