Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* Copyright Kirk Technologies.
*/
import * as React from "react";
import { translate, SelectArrayInput } from "react-admin";
import { segments } from "../segments/data";
export const SegmentsInput = translate(({ translate: trans, addField, ...rest }: any) => (
({
id: segment.id,
name: trans(segment.name),
}))}
/>
));
SegmentsInput.defaultProps = {
addField: true,
source: "groups",
};
<button href="https://marmelab.com/react-admin">
{translate('pos.dashboard.welcome.aor_button')}
</button>
<button href="https://github.com/marmelab/react-admin/tree/master/examples/demo">
{translate('pos.dashboard.welcome.demo_button')}
</button>
);
export default withStyles(styles)(translate(Welcome));
/**
* Copyright Kirk Technologies.
*/
import * as React from "react";
import Chip from "@material-ui/core/Chip";
import { translate } from "react-admin";
import { segments } from "../segments/data";
const styles: any = {
main: { display: "flex", flexWrap: "wrap" },
chip: { margin: 4 },
};
export const SegmentsField: any = translate(({ record, translate: trans }: any) => (
<span style="{styles.main}">
{record.groups &&
record.groups.map((segment: any) => (
s.id === segment).name)}
/>
))}
</span>
));
SegmentsField.defaultProps = {
addLabel: true,
source: "groups",
};
minHeight: 52,
display: 'block',
},
};
const MonthlyRevenue = ({ value, translate }) => (
<div style="{styles.main}">
<p>{translate('pos.dashboard.monthly_revenue')}</p>
<h3>{value}</h3>
</div>
);
export default translate(MonthlyRevenue);
import React from 'react';
import { Datagrid, List, FunctionField, translate } from 'react-admin';
import Icon from '@material-ui/icons/Bookmark';
import LinkToRelatedCustomers from './LinkToRelatedCustomers';
export const SegmentIcon = Icon;
export const SegmentList = translate(({ translate, ...props }) => (
translate(`resources.Segment.data.${record.name}`)
}
/>
));
}
medium={
{ permissions === 'admin' && }
}
/>
) }
);
const UserTitle = translate(({ record, translate }) => (
<span>
{ record ? translate('user.edit.title', { title: record.name }) : '' }
</span>
));
const UserCreateToolbar = ({ permissions, ...props }) => (
{ permissions === 'admin' && (
reference='tags'
source='tags'
>
}
/>
);
const PostTitle = translate(({ record, translate }) => (
<span>
{ record ? translate('post.edit.title', { title: record.title }) : '' }
</span>
));
const PostCreateToolbar = props => (
import * as React from "react";
import {
translate,
AutocompleteInput,
BooleanInput,
DateInput,
Edit,
ReferenceInput,
SelectInput,
SimpleForm,
} from "react-admin";
import withStyles from "@material-ui/core/styles/withStyles";
import { Basket } from "./Basket";
const CommandTitle = translate(({ record, translate: trans }: any) => (
<span>
{trans("resources.commands.name", { smart_count: 1 })} #{record.reference}
</span>
));
const editStyles: any = {
clear: { clear: "both" },
};
const optionText = (choice: any) => `${choice.first_name} ${choice.last_name}`;
export const CommandEdit = withStyles(editStyles)(({ classes, ...props }: any) => (
} {...props}>
import React from 'react';
import { AppBar, UserMenu, MenuItemLink, translate } from 'react-admin';
import SettingsIcon from '@material-ui/icons/Settings';
const CustomUserMenu = translate(({ translate, ...props }) => (
}
/>
));
const CustomAppBar = props => (
} />
);
export default CustomAppBar;