Add lokalisation (#3103)
* applied eslint * add locales and lint the project * removed error boundary * updated locales * fix min files * fix locales * fix erorrs
This commit is contained in:
parent
fd5c0c9747
commit
9f9990d737
2 changed files with 34 additions and 39 deletions
|
|
@ -216,43 +216,46 @@ const PathAnalysisFilter = observer(({ metric, writeOption }: any) => {
|
|||
};
|
||||
return (
|
||||
<div className="rounded-lg bg-white border">
|
||||
<div className='flex flex-col justify-start gap-2 flex-wrap'>
|
||||
<Form.Item className='mb-0 hover:bg-bg-blue/30 px-4 pb-1 pt-2'>
|
||||
<div className="flex flex-wrap gap-2 items-center justify-start">
|
||||
<span className="font-medium">{t('Journeys With')}</span>
|
||||
<div className="flex gap-2 items-center">
|
||||
<Select
|
||||
className="w-36 rounded-lg"
|
||||
name="startType"
|
||||
options={[
|
||||
{ value: 'start', label: 'Start Point' },
|
||||
{ value: 'end', label: 'End Point' },
|
||||
]}
|
||||
defaultValue={metric.startType || 'start'}
|
||||
onChange={onPointChange}
|
||||
placeholder="Select Start Type"
|
||||
/>
|
||||
<div className="flex flex-col justify-start gap-2 flex-wrap">
|
||||
<Form.Item className="mb-0 hover:bg-bg-blue/30 px-4 pb-1 pt-2">
|
||||
<div className="flex flex-wrap gap-2 items-center justify-start">
|
||||
<span className="font-medium">{t('Journeys With')}</span>
|
||||
<div className="flex gap-2 items-center">
|
||||
<Select
|
||||
className="w-36 rounded-lg"
|
||||
name="startType"
|
||||
options={[
|
||||
{ value: 'start', label: t('Start Point') },
|
||||
{ value: 'end', label: t('End Point') },
|
||||
]}
|
||||
defaultValue={metric.startType || 'start'}
|
||||
onChange={onPointChange}
|
||||
placeholder={t('Select Start Type')}
|
||||
/>
|
||||
|
||||
<span className="">{t('showing')}</span>
|
||||
|
||||
<Select
|
||||
mode="multiple"
|
||||
className="rounded-lg w-max min-w-44 max-w-58"
|
||||
allowClear
|
||||
name="metricValue"
|
||||
options={metricValueOptions}
|
||||
value={metric.metricValue || []}
|
||||
onChange={(value) => writeOption({ name: 'metricValue', value })}
|
||||
placeholder={t('Select Metrics')}
|
||||
maxTagCount={'responsive'}
|
||||
showSearch={false}
|
||||
/>
|
||||
<Select
|
||||
mode="multiple"
|
||||
className="rounded-lg w-max min-w-44 max-w-58"
|
||||
allowClear
|
||||
name="metricValue"
|
||||
options={metricValueOptions}
|
||||
value={metric.metricValue || []}
|
||||
onChange={(value) =>
|
||||
writeOption({ name: 'metricValue', value })
|
||||
}
|
||||
placeholder={t('Select Metrics')}
|
||||
maxTagCount={'responsive'}
|
||||
showSearch={false}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</Form.Item>
|
||||
<Form.Item className="mb-0 hover:bg-bg-blue/30 px-4 pb-2 pt-1">
|
||||
<div className="flex flex-wrap items-center justify-start">
|
||||
<span className="font-medium mr-2">
|
||||
{metric.startType === 'start' ? 'Start Point' : 'End Point'}
|
||||
{metric.startType === 'start' ? t('Start Point') : t('End Point')}
|
||||
</span>
|
||||
<span className="font-normal">
|
||||
<FilterItem
|
||||
|
|
@ -318,7 +321,7 @@ const AdditionalFilters = observer(() => {
|
|||
);
|
||||
});
|
||||
|
||||
function PredefinedMessage() {
|
||||
const PredefinedMessage = () => {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<Alert
|
||||
|
|
@ -329,4 +332,4 @@ function PredefinedMessage() {
|
|||
className="border-transparent rounded-lg"
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -10,11 +10,3 @@ export default function (props: Props) {
|
|||
const { className = '', label = '', ...rest } = props;
|
||||
return <AntCheckbox {...rest}>{label}</AntCheckbox>;
|
||||
}
|
||||
export default (props: Props) => {
|
||||
const { className = '', label, ...rest } = props;
|
||||
return (
|
||||
<AntCheckbox {...rest}>
|
||||
{label}
|
||||
</AntCheckbox>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue