How to use the @entando/utils.routeConverter function in @entando/utils

To help you get started, we’ve selected a few @entando/utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github entando / app-builder / src / state / activity-stream / actions.js View on Github external
export const getRouteTargetName = id => (dispatch, getState) => {
  const notification = getNotifications(getState()).find(item => item.id === id);
  const actions = notification.namespace.split('/');
  const index = (actions).findIndex(item => item === 'api') + 1;
  switch (actions[index]) {
    case 'pages': {
      history.push(routeConverter(ROUTE_PAGE_EDIT, { pageCode: notification.parameters.pageCode }));
      break;
    }
    default: history.push(ROUTE_HOME); break;
  }
};
github entando / app-builder / src / ui / users / list / UserListMenuActions.js View on Github external
onClickEdit() {
    history.push(routeConverter(ROUTE_USER_EDIT, { username: this.props.username }));
  }
github entando / app-builder / src / ui / page-models / list / PageModelListMenuActions.js View on Github external
      onClick={() => history.push(routeConverter(ROUTE_PAGE_MODEL_EDIT, { pageModelCode: code }))}
    >
github entando / app-builder / src / ui / roles / list / RoleListMenuActions.js View on Github external
const RoleListMenuActions = ({ onClickDelete, code }) => {
  const editLabel = ;
  const detailsLabel = ;

  return (
    
      
      
      <menuitem> onClickDelete(code)}
      &gt;
        
      </menuitem>
    
  );
};
github entando / app-builder / src / ui / common / references / UserRefsTable.js View on Github external
return this.props.userReferences.map(reference =&gt; (
      
        {reference.username}
        {reference.lastLogin}
        
          
        
        
          
            
            
          
        
      
    ));
  }
github entando / app-builder / src / state / data-types / actions.js View on Github external
} else if (json.payload.type === TYPE_MONOLIST &&
          !getIsMonolistComposteAttributeType(getState())
        ) {
          history.push(routeConverter(
            ROUTE_ATTRIBUTE_MONOLIST_ADD,
            {
              entityCode,
              attributeCode: attributeObject.code,
            },
          ));
        } else {
          dispatch(setSelectedAttributeDataType(json.payload));
          const { type, code } = attributeObject;
          if (type === TYPE_COMPOSITE) {
            dispatch(initialize('attribute', { ...json.payload, compositeAttributeType: TYPE_COMPOSITE }));
            history.push(routeConverter(
              ROUTE_DATA_TYPE_ATTRIBUTE_EDIT,
              { entityCode, attributeCode: code },
            ));
          } else {
            history.push(routeConverter(ROUTE_DATA_TYPE_EDIT, { datatypeCode: entityCode }));
          }
        }
        resolve();
      });
    }).catch(() => {});
github entando / app-builder / src / ui / pages / edit / PagesEditFormContainer.js View on Github external
dispatch(sendPutPage(data)).then(() => {
      switch (action) {
        case ACTION_SAVE: {
          history.push(ROUTE_PAGE_TREE);
          break;
        }
        case ACTION_SAVE_AND_CONFIGURE: {
          history.push(routeConverter(ROUTE_PAGE_CONFIG, { pageCode: data.code }));
          break;
        }
        default: history.push(ROUTE_PAGE_TREE);
      }
    });
  },
github entando / app-builder / src / ui / profile-types / edit / EditFormContainer.js View on Github external
dispatch(fetchProfileTypeAttribute(attributeCode)).then(() => {
      history.push(routeConverter(
        ROUTE_PROFILE_TYPE_ATTRIBUTE_ADD,
        { entityCode: profileTypeCode },
      ));
    });
  },
github entando / app-builder / src / ui / widgets / config / forms / HandpickedContentsConfigFormContainer.js View on Github external
dispatch(sendPutWidgetConfig(pageCode, frameId, configItem)).then(() => {
      dispatch(addToast(
        intl.formatMessage({ id: 'app.updateSettings.success' }),
        TOAST_SUCCESS,
      ));
      history.push(routeConverter(ROUTE_PAGE_CONFIG, { pageCode }));
    });
  },
github entando / app-builder / src / ui / activity-stream / Notification.js View on Github external
this.props.comments.map(comment =&gt; (
              <div>
                
                  
                
                <div>
                  
                    {comment.username}
                  
                  <span>
                    <a href="">
                      <span>
                    </span></a>
                  </span>
                  <span>
                    {comment.commentText}
                  </span></div></div>