Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;
}
};
onClickEdit() {
history.push(routeConverter(ROUTE_USER_EDIT, { username: this.props.username }));
}
onClick={() => history.push(routeConverter(ROUTE_PAGE_MODEL_EDIT, { pageModelCode: code }))}
>
const RoleListMenuActions = ({ onClickDelete, code }) => {
const editLabel = ;
const detailsLabel = ;
return (
<menuitem> onClickDelete(code)}
>
</menuitem>
);
};
return this.props.userReferences.map(reference => (
{reference.username}
{reference.lastLogin}
));
}
} 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(() => {});
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);
}
});
},
dispatch(fetchProfileTypeAttribute(attributeCode)).then(() => {
history.push(routeConverter(
ROUTE_PROFILE_TYPE_ATTRIBUTE_ADD,
{ entityCode: profileTypeCode },
));
});
},
dispatch(sendPutWidgetConfig(pageCode, frameId, configItem)).then(() => {
dispatch(addToast(
intl.formatMessage({ id: 'app.updateSettings.success' }),
TOAST_SUCCESS,
));
history.push(routeConverter(ROUTE_PAGE_CONFIG, { pageCode }));
});
},
this.props.comments.map(comment => (
<div>
<div>
{comment.username}
<span>
<a href="">
<span>
</span></a>
</span>
<span>
{comment.commentText}
</span></div></div>