isdata-customer-sdk 0.1.26 → 0.1.27

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.
package/dist/index.umd.js CHANGED
@@ -5100,10 +5100,25 @@ const getAppPortalMenuDatas = async (user_id, group_id, isPortalAction, appVaria
5100
5100
  if (isPortalAction) {
5101
5101
  return true;
5102
5102
  } else {
5103
- if (menuData.app_id == app_id || menuData.app_id == portal_app_id) {
5103
+ if (menuData.app_id == portal_app_id) {
5104
5104
  return true;
5105
5105
  } else {
5106
- return false;
5106
+ let types = menuData.children;
5107
+ let hasTargetMenu = false;
5108
+ if (types && types.length > 0) {
5109
+ types.forEach(type => {
5110
+ let children = type.children;
5111
+ if (children && children.length > 0) {
5112
+ let newTypeChilden = children.filter(child => {
5113
+ return child.app_id === app_id;
5114
+ });
5115
+ if (newTypeChilden && newTypeChilden.length > 0) {
5116
+ hasTargetMenu = true;
5117
+ }
5118
+ }
5119
+ });
5120
+ }
5121
+ return hasTargetMenu;
5107
5122
  }
5108
5123
  }
5109
5124
  });