fix build
This commit is contained in:
parent
e77a8e03d4
commit
259a63f787
@ -14,10 +14,18 @@ export default (function InputNumber({
|
|||||||
help,
|
help,
|
||||||
...props
|
...props
|
||||||
}: BaseElementProps<number>) {
|
}: BaseElementProps<number>) {
|
||||||
|
function handleChange(value: number | null) {
|
||||||
|
if (value) {
|
||||||
|
setValue(value);
|
||||||
|
} else {
|
||||||
|
setValue(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FormItem hasFeedback validateStatus={isValid === false ? 'error' : ''} help={help}>
|
<FormItem hasFeedback validateStatus={isValid === false ? 'error' : ''} help={help}>
|
||||||
<AntInputNumber
|
<AntInputNumber
|
||||||
onChange={setValue}
|
onChange={handleChange}
|
||||||
disabled={status === 'Disabled'}
|
disabled={status === 'Disabled'}
|
||||||
style={{
|
style={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
|
|||||||
@ -21,6 +21,8 @@ export default (function Segmented({
|
|||||||
return (
|
return (
|
||||||
<FormItem hasFeedback validateStatus={isValid === false ? 'error' : ''} help={help}>
|
<FormItem hasFeedback validateStatus={isValid === false ? 'error' : ''} help={help}>
|
||||||
<AntSegmented
|
<AntSegmented
|
||||||
|
onResize={undefined}
|
||||||
|
onResizeCapture={undefined}
|
||||||
value={value}
|
value={value}
|
||||||
onChange={setValue}
|
onChange={setValue}
|
||||||
disabled={status === 'Disabled'}
|
disabled={status === 'Disabled'}
|
||||||
|
|||||||
@ -61,7 +61,7 @@ export default function validatePaymentsTable({ $calculation, $tables }: RootSto
|
|||||||
{
|
{
|
||||||
const targetPayments = $tables.payments.values.slice(1, 4);
|
const targetPayments = $tables.payments.values.slice(1, 4);
|
||||||
|
|
||||||
if (max(targetPayments) - min(targetPayments) > 10) {
|
if ((max(targetPayments) || 0) - (min(targetPayments) || 0) > 10) {
|
||||||
return 'Указана очень жесткая дегрессия';
|
return 'Указана очень жесткая дегрессия';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user