accounting/database/dbPermission/user/userLogic.js
// Behavior from meta.js at defq4ols90h44rvcw8st
Behavior from meta.js at defq4ols90h44rvcw8st
Behavior from meta . js at defq4ols90h44rvcw8st
function loadPayloadArray(payloadKeyArray, payloadObject)
{     
  let payloadArray = Object.entries(payloadObject).filter
  (
    function(examElement)
    {
      let passExamElement = true;
      let splitExamElementArray = examElement[0].split("_");
      payloadKeyArray.forEach
      (
        function(payloadKeyArrayElement, payloadKeyArrayIndex)
        {
          if(payloadKeyArrayIndex === 0)
          {
            if(splitExamElementArray[0] != payloadKeyArrayElement)
            {
              passExamElement = false;
            }
          }
          else if(payloadKeyArrayIndex != payloadKeyArray.length - 1) 
          {
            if(splitExamElementArray[payloadKeyArrayIndex * 2] != payloadKeyArrayElement)
            {
              passExamElement = false;
            }
          }
          else 
          {
            if(splitExamElementArray[splitExamElementArray.length -1] != payloadKeyArrayElement)
            {
              passExamElement = false;
            }
          }
        } 
      ) 
      return passExamElement
    } 
  ); 
  return payloadArray
}
function loadPayloadArray ( payloadKeyArray , payloadObject ) { let payloadArray = Object . entries ( payloadObject ) . filter ( function ( examElement ) { let passExamElement = true ; let splitExamElementArray = examElement [ 0 ] . split ( "_" ) ; payloadKeyArray . forEach ( function ( payloadKeyArrayElement , payloadKeyArrayIndex ) { if ( payloadKeyArrayIndex === 0 ) { if ( splitExamElementArray [ 0 ] != payloadKeyArrayElement ) { passExamElement = false ; } } else if ( payloadKeyArrayIndex != payloadKeyArray . length - 1 ) { if ( splitExamElementArray [ payloadKeyArrayIndex * 2 ] != payloadKeyArrayElement ) { passExamElement = false ; } } else { if ( splitExamElementArray [ splitExamElementArray . length - 1 ] != payloadKeyArrayElement ) { passExamElement = false ; } } } ) return passExamElement } ) ; return payloadArray }
Behavior from meta.js at defq4ols90h44rvcw8st
Behavior from meta . js at defq4ols90h44rvcw8st
// Checking if this object property belongs in our payloadArray. // If this is the first element in payloadKeyArray // Else If: Not first nor the last element in payloadKeyArray // Else: Must be the last element in payloadKeyArray // End of: function(payloadKeyArrayElement, payloadKeyArrayIndex){...} // End of: payloadKeyArray.forEach(...) // End of: function(examElement){...} // End of: let payloadArray = Object.entries(payloadObject).filter