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.js CHANGED
@@ -5090,10 +5090,25 @@ const getAppPortalMenuDatas = async (user_id, group_id, isPortalAction, appVaria
5090
5090
  if (isPortalAction) {
5091
5091
  return true;
5092
5092
  } else {
5093
- if (menuData.app_id == app_id || menuData.app_id == portal_app_id) {
5093
+ if (menuData.app_id == portal_app_id) {
5094
5094
  return true;
5095
5095
  } else {
5096
- return false;
5096
+ let types = menuData.children;
5097
+ let hasTargetMenu = false;
5098
+ if (types && types.length > 0) {
5099
+ types.forEach(type => {
5100
+ let children = type.children;
5101
+ if (children && children.length > 0) {
5102
+ let newTypeChilden = children.filter(child => {
5103
+ return child.app_id === app_id;
5104
+ });
5105
+ if (newTypeChilden && newTypeChilden.length > 0) {
5106
+ hasTargetMenu = true;
5107
+ }
5108
+ }
5109
+ });
5110
+ }
5111
+ return hasTargetMenu;
5097
5112
  }
5098
5113
  }
5099
5114
  });