Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
<div>
{isPrivate && }
{showProjectActions && }
</div>
);
}
}
export default compose(
withRouter,
withMomentTimezone,
withOrbit(({ project }) => ({
// refetching the project (from local cache)
// subscribes this component to changes to the project.
project: (q) => q.findRecord(project),
organization: (q) => q.findRelatedRecord(project, 'organization'),
owner: (q) => q.findRelatedRecord(project, 'owner'),
group: (q) => q.findRelatedRecord(project, 'group'),
products: (q) => q.findRelatedRecords(project, 'products'),
}))
)(Row);
onChange={this.togglePrivacy}
/>
<hr>
<h3>{t('org.productSelectTitle')}</h3>
);
}
}
export default compose(
withTranslations,
withOrbit(({ organization }) => ({
organizationProductDefinitions: (q) =>
q.findRelatedRecords(organization, 'organizationProductDefinitions'),
}))
)(ProductsRoute);
);
};
render() {
const actionProps = {
createRecord: this.createRecord,
updateAttributes: this.updateAttributes,
updateAttribute: this.updateAttribute,
updateStoreType: this.updateStoreType,
};
return ;
}
}
return compose(withOrbit({}))(WorkflowDefinitionDataActionWrapper);
}
}
}
export default compose(
withRouter,
withTranslations,
query(({ match: { params: { orgId } } }) => ({
organization: [
(q) => buildFindRecord(q, 'organization', orgId),
buildOptions({
include: ['owner'],
}),
],
})),
withLoader(({ organization }) => !organization),
withOrbit(({ organization }) => ({
owner: (q) => q.findRelatedRecord(organization, 'owner'),
})),
withDataActions
)(EditOrganization);
return ;
}
}
export default compose(
withRouter,
query(({ match: { params: { workflowDefinitionId } } }) => ({
workflowDefinition: [
(q) => buildFindRecord(q, 'workflowDefinition', workflowDefinitionId),
buildOptions({
include: ['store-type'],
}),
],
})),
withLoader(({ workflowDefinition }) => !workflowDefinition),
withOrbit(({ workflowDefinition }) => ({
storeType: (q) => q.findRelatedRecord(workflowDefinition, 'storeType'),
})),
withDataActions,
withTranslations
)(EditWorkflowDefinitions);
console.debug('DEV: created:', data);
this.setState({ _data: data });
});
}
render() {
if (this.state._data) {
return ;
} else {
return 'Creating your stubbed dev data...';
}
}
}
return compose(withData(mapRecordsToProps))(WrapperClass);
};
}
export function withAccessRestriction(WrappedComponent) {
return compose(
withRelationships((props: INeededProps) => {
const { currentUser } = props;
return {
currentUserOrganizations: [currentUser, 'organizationMemberships', 'organization'],
};
}),
withOrbit((passedProps: INeededProps) => {
const { project } = passedProps;
return {
projectOrg: (q) => buildFindRelatedRecord(q, project, 'organization'),
};
}),
withLoader(
({ projectOrg, currentUserOrganizations }) => !projectOrg || !currentUserOrganizations
)
)((props: INeededProps & IProvidedProps & i18nProps) => {
const { t, currentUserOrganizations, projectOrg } = props;
const currentUserOrgIds = currentUserOrganizations.map((o) => o.id);
const isAMember = currentUserOrgIds.includes(projectOrg.id);
);
});
}
}
export default compose(
withOrbit(({ organization }) => ({
groups: (q) => q.findRelatedRecords(organization, 'groups'),
})),
withProps((props: IOwnProps) => {
const { user } = props;
return {
propsForGroupMemberships: {
user,
},
};
}),
withGroupMemberships
)(GroupSelect);
}
export default compose(
withTranslations,
withRouter,
withOrbit(({ userTask }) => {
return {
product: (q) => q.findRelatedRecord(userTask, 'product'),
assignedTo: (q) => q.findRelatedRecord(userTask, 'user'),
};
}),
withOrbit(({ product }) => ({
project: (q) => q.findRelatedRecord(product, 'project'),
productDefinition: (q) => q.findRelatedRecord(product, 'productDefinition'),
})),
withOrbit(({ productDefinition }) => ({
workflow: (q) => q.findRelatedRecord(productDefinition, 'workflow'),
}))
)(TaskRow);
{error ? (
<div data-test-error="">
</div>
) : null}
);
}
}
export default compose(
withTranslations,
withCurrentUserContext,
withCurrentOrganization,
withData({})
)(InviteUserModal);