Compare commits
14 Commits
dev
...
release/mo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a9ba6bb84 | ||
|
|
2c9117d08c | ||
|
|
efdad41493 | ||
|
|
8e48a48fee | ||
|
|
ec7f7ea941 | ||
|
|
95bd5d1010 | ||
|
|
09ba9499a3 | ||
|
|
0f425109a6 | ||
|
|
74af4fb492 | ||
|
|
f451af545a | ||
|
|
e748a560ed | ||
|
|
b4b6192f1c | ||
|
|
eff67858dc | ||
|
|
7b9dbdaeb5 |
13
.gitignore
vendored
13
.gitignore
vendored
@ -1,19 +1,19 @@
|
|||||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
/node_modules
|
node_modules
|
||||||
/.pnp
|
.pnp
|
||||||
.pnp.js
|
.pnp.js
|
||||||
|
|
||||||
# testing
|
# testing
|
||||||
/coverage
|
/coverage
|
||||||
|
|
||||||
# next.js
|
# next.js
|
||||||
/.next/
|
.next/
|
||||||
/out/
|
out/
|
||||||
|
|
||||||
# production
|
# production
|
||||||
/build
|
build
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
.DS_Store
|
.DS_Store
|
||||||
@ -42,3 +42,6 @@ yarn-error.log*
|
|||||||
!.yarn/releases
|
!.yarn/releases
|
||||||
!.yarn/sdks
|
!.yarn/sdks
|
||||||
!.yarn/versions
|
!.yarn/versions
|
||||||
|
|
||||||
|
# turbo
|
||||||
|
.turbo
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
/* eslint-disable import/prefer-default-export */
|
/* eslint-disable import/prefer-default-export */
|
||||||
import type { BaseOption } from 'Elements/types';
|
|
||||||
import { isEmpty } from 'radash';
|
import { isEmpty } from 'radash';
|
||||||
|
import type { BaseOption } from 'ui/elements/types';
|
||||||
|
|
||||||
export function normalizeOptions(options: any[] | null | undefined) {
|
export function normalizeOptions(options: any[] | null | undefined) {
|
||||||
return (isEmpty(options) ? [] : options) as BaseOption[];
|
return (isEmpty(options) ? [] : options) as BaseOption[];
|
||||||
12
@packages/tools/package.json
Normal file
12
@packages/tools/package.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"name": "tools",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"main": "./index.tsx",
|
||||||
|
"types": "./index.tsx",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"mobx": "^6.7.0",
|
||||||
|
"radash": "^10.3.0",
|
||||||
|
"ui": "*"
|
||||||
|
}
|
||||||
|
}
|
||||||
4
@packages/ui/elements/config.js
Normal file
4
@packages/ui/elements/config.js
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
/* eslint-disable unicorn/filename-case */
|
||||||
|
|
||||||
|
export { ConfigProvider } from 'antd';
|
||||||
|
export { default as ru_RU } from 'antd/lib/locale/ru_RU';
|
||||||
15
@packages/ui/elements/index.ts
Normal file
15
@packages/ui/elements/index.ts
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
export { default as Button } from './Button';
|
||||||
|
export { default as Checkbox } from './Checkbox';
|
||||||
|
export { default as Input } from './Input';
|
||||||
|
export { default as InputNumber } from './InputNumber';
|
||||||
|
export { default as Link } from './Link';
|
||||||
|
export { default as message } from './message';
|
||||||
|
export { default as notification } from './notification';
|
||||||
|
export { default as Radio } from './Radio';
|
||||||
|
export { default as Result } from './Result';
|
||||||
|
export { default as Segmented } from './Segmented';
|
||||||
|
export { default as Select } from './Select';
|
||||||
|
export { default as Switch } from './Switch';
|
||||||
|
export { default as Table } from './Table';
|
||||||
|
export { default as Text } from './Text';
|
||||||
|
export { default as Tooltip } from './Tooltip';
|
||||||
@ -1,6 +1,6 @@
|
|||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { Box } from 'UIKit/grid';
|
import { Box } from 'ui/grid';
|
||||||
import { min } from 'UIKit/mq';
|
import { min } from 'ui/mq';
|
||||||
|
|
||||||
const Background = styled(Box)`
|
const Background = styled(Box)`
|
||||||
background: #fff;
|
background: #fff;
|
||||||
1
@packages/ui/elements/styles/antd.less
Normal file
1
@packages/ui/elements/styles/antd.less
Normal file
@ -0,0 +1 @@
|
|||||||
|
@import 'antd/dist/antd.less';
|
||||||
@ -15,6 +15,4 @@ export function max(breakpoint: keyof typeof screens) {
|
|||||||
return `@media (max-width: calc(${screens[breakpoint]}px))`;
|
return `@media (max-width: calc(${screens[breakpoint]}px))`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const mediaQuery = {
|
export const breakpoints = Object.values(screens).map((value) => `${value + threshold}px`);
|
||||||
breakpoints: Object.values(screens).map((value) => `${value + threshold}px`),
|
|
||||||
};
|
|
||||||
20
@packages/ui/package.json
Normal file
20
@packages/ui/package.json
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"name": "ui",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"main": "./index.tsx",
|
||||||
|
"types": "./index.tsx",
|
||||||
|
"license": "MIT",
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/react": "18.0.20",
|
||||||
|
"@types/rebass": "^4.0.10",
|
||||||
|
"@types/styled-components": "^5"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@ant-design/icons": "^4.8.0",
|
||||||
|
"antd": "4.24.5",
|
||||||
|
"react": "^18.2.0",
|
||||||
|
"rebass": "^4.0.7",
|
||||||
|
"styled-components": "^5.3.6",
|
||||||
|
"use-debounce": "^9.0.2"
|
||||||
|
}
|
||||||
|
}
|
||||||
7
@packages/ui/theme.js
Normal file
7
@packages/ui/theme.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { breakpoints } from './mq';
|
||||||
|
|
||||||
|
const theme = {
|
||||||
|
breakpoints,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default theme;
|
||||||
@ -1,10 +1,10 @@
|
|||||||
import Alert from 'Elements/Alert';
|
|
||||||
import Table from 'Elements/Table';
|
|
||||||
import { toJS } from 'mobx';
|
import { toJS } from 'mobx';
|
||||||
import { observer } from 'mobx-react-lite';
|
import { observer } from 'mobx-react-lite';
|
||||||
import { useStore } from 'stores/hooks';
|
import { useStore } from 'stores/hooks';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { Flex } from 'UIKit/grid';
|
import Alert from 'ui/elements/Alert';
|
||||||
|
import Table from 'ui/elements/Table';
|
||||||
|
import { Flex } from 'ui/grid';
|
||||||
import { columns } from './config';
|
import { columns } from './config';
|
||||||
|
|
||||||
const Grid = styled(Flex)`
|
const Grid = styled(Flex)`
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
/* eslint-disable import/prefer-default-export */
|
/* eslint-disable import/prefer-default-export */
|
||||||
import type { ColumnsType } from 'antd/lib/table';
|
import type { ColumnsType } from 'antd/lib/table';
|
||||||
import { MAX_INSURANCE } from 'constants/values';
|
import { MAX_INSURANCE } from 'constants/values';
|
||||||
import InputNumber from 'Elements/InputNumber';
|
|
||||||
import Select from 'Elements/Select';
|
|
||||||
import { formatter, parser } from 'tools/number';
|
import { formatter, parser } from 'tools/number';
|
||||||
|
import InputNumber from 'ui/elements/InputNumber';
|
||||||
|
import Select from 'ui/elements/Select';
|
||||||
import { buildOptionComponent, buildValueComponent } from './builders';
|
import { buildOptionComponent, buildValueComponent } from './builders';
|
||||||
import type * as Insurance from './types';
|
import type * as Insurance from './types';
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import Alert from 'Elements/Alert';
|
|
||||||
import Table from 'Elements/Table';
|
|
||||||
import { observer } from 'mobx-react-lite';
|
import { observer } from 'mobx-react-lite';
|
||||||
import { useStore } from 'stores/hooks';
|
import { useStore } from 'stores/hooks';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { Flex } from 'UIKit/grid';
|
import Alert from 'ui/elements/Alert';
|
||||||
|
import Table from 'ui/elements/Table';
|
||||||
|
import { Flex } from 'ui/grid';
|
||||||
import { columns } from './config';
|
import { columns } from './config';
|
||||||
|
|
||||||
const Grid = styled(Flex)`
|
const Grid = styled(Flex)`
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { KeysSchema, RowSchema } from 'config/schema/insurance';
|
import type { KeysSchema, RowSchema } from 'config/schema/insurance';
|
||||||
import type { BaseOption, Status } from 'Elements/types';
|
import type { BaseOption, Status } from 'ui/elements/types';
|
||||||
import type { z } from 'zod';
|
import type { z } from 'zod';
|
||||||
|
|
||||||
export type Keys = z.infer<typeof KeysSchema>;
|
export type Keys = z.infer<typeof KeysSchema>;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { Flex } from 'UIKit/grid';
|
import { Flex } from 'ui/grid';
|
||||||
import renderFormRows from '../../lib/render-rows';
|
import renderFormRows from '../../lib/render-rows';
|
||||||
import { id, rows, title } from './config';
|
import { id, rows, title } from './config';
|
||||||
import FinGAPTable from './FinGAPTable';
|
import FinGAPTable from './FinGAPTable';
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { observer } from 'mobx-react-lite';
|
import { observer } from 'mobx-react-lite';
|
||||||
import { useStore } from 'stores/hooks';
|
import { useStore } from 'stores/hooks';
|
||||||
import { Flex } from 'UIKit/grid';
|
import { Flex } from 'ui/grid';
|
||||||
import elementsRender from '../../config/elements-render';
|
import elementsRender from '../../config/elements-render';
|
||||||
import { elements } from './config';
|
import { elements } from './config';
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
/* eslint-disable import/prefer-default-export */
|
/* eslint-disable import/prefer-default-export */
|
||||||
import type { ColumnsType } from 'antd/lib/table';
|
import type { ColumnsType } from 'antd/lib/table';
|
||||||
import InputNumber from 'Elements/InputNumber';
|
import InputNumber from 'ui/elements/InputNumber';
|
||||||
|
|
||||||
import { buildValueComponent } from './builders';
|
import { buildValueComponent } from './builders';
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
import Alert from 'Elements/Alert';
|
|
||||||
import Table from 'Elements/Table';
|
|
||||||
import { computed } from 'mobx';
|
import { computed } from 'mobx';
|
||||||
import { observer } from 'mobx-react-lite';
|
import { observer } from 'mobx-react-lite';
|
||||||
import { useStore } from 'stores/hooks';
|
import { useStore } from 'stores/hooks';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { Box, Flex } from 'UIKit/grid';
|
import Alert from 'ui/elements/Alert';
|
||||||
import { min } from 'UIKit/mq';
|
import Table from 'ui/elements/Table';
|
||||||
|
import { Box, Flex } from 'ui/grid';
|
||||||
|
import { min } from 'ui/mq';
|
||||||
import { columns } from './config';
|
import { columns } from './config';
|
||||||
|
|
||||||
const Grid = styled(Flex)`
|
const Grid = styled(Flex)`
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { Box, Flex } from 'UIKit/grid';
|
import { Box, Flex } from 'ui/grid';
|
||||||
import elementsRender from '../../config/elements-render';
|
import elementsRender from '../../config/elements-render';
|
||||||
import { id, title } from './config';
|
import { id, title } from './config';
|
||||||
import PaymentsParams from './PaymentsParams';
|
import PaymentsParams from './PaymentsParams';
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import Background from 'Elements/layout/Background';
|
|
||||||
import Tabs from 'Elements/layout/Tabs';
|
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { min } from 'UIKit/mq';
|
import Background from 'ui/elements/layout/Background';
|
||||||
|
import Tabs from 'ui/elements/layout/Tabs';
|
||||||
|
import { min } from 'ui/mq';
|
||||||
import AddProduct from './AddProduct';
|
import AddProduct from './AddProduct';
|
||||||
import CreateKP from './CreateKP';
|
import CreateKP from './CreateKP';
|
||||||
import Insurance from './Insurance';
|
import Insurance from './Insurance';
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import Background from 'Elements/layout/Background';
|
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { min } from 'UIKit/mq';
|
import Background from 'ui/elements/layout/Background';
|
||||||
|
import { min } from 'ui/mq';
|
||||||
import renderFormRows from '../lib/render-rows';
|
import renderFormRows from '../lib/render-rows';
|
||||||
import { rows } from './config';
|
import { rows } from './config';
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +1,5 @@
|
|||||||
import Button from 'Elements/Button';
|
|
||||||
import Checkbox from 'Elements/Checkbox';
|
|
||||||
import Input from 'Elements/Input';
|
|
||||||
import InputNumber from 'Elements/InputNumber';
|
|
||||||
import Link from 'Elements/Link';
|
|
||||||
import Radio from 'Elements/Radio';
|
|
||||||
import Segmented from 'Elements/Segmented';
|
|
||||||
import Select from 'Elements/Select';
|
|
||||||
import Switch from 'Elements/Switch';
|
|
||||||
import Text from 'Elements/Text';
|
|
||||||
import type { ComponentProps } from 'react';
|
import type { ComponentProps } from 'react';
|
||||||
|
import * as elements from 'ui/elements';
|
||||||
import type { Elements as ActionElements } from './map/actions';
|
import type { Elements as ActionElements } from './map/actions';
|
||||||
import type { Elements as ValuesElements } from './map/values';
|
import type { Elements as ValuesElements } from './map/values';
|
||||||
|
|
||||||
@ -17,146 +8,146 @@ function wrapComponentsMap<C, T extends Record<ValuesElements | ActionElements,
|
|||||||
}
|
}
|
||||||
|
|
||||||
const components = wrapComponentsMap({
|
const components = wrapComponentsMap({
|
||||||
selectProduct: Select,
|
selectProduct: elements.Select,
|
||||||
selectClientRisk: Select,
|
selectClientRisk: elements.Select,
|
||||||
selectClientType: Select,
|
selectClientType: elements.Select,
|
||||||
selectSupplierCurrency: Select,
|
selectSupplierCurrency: elements.Select,
|
||||||
tbxLeaseObjectPrice: InputNumber,
|
tbxLeaseObjectPrice: elements.InputNumber,
|
||||||
tbxLeaseObjectPriceWthtVAT: InputNumber,
|
tbxLeaseObjectPriceWthtVAT: elements.InputNumber,
|
||||||
tbxVATInLeaseObjectPrice: InputNumber,
|
tbxVATInLeaseObjectPrice: elements.InputNumber,
|
||||||
tbxSupplierDiscountRub: InputNumber,
|
tbxSupplierDiscountRub: elements.InputNumber,
|
||||||
tbxSupplierDiscountPerc: InputNumber,
|
tbxSupplierDiscountPerc: elements.InputNumber,
|
||||||
radioBalanceHolder: Radio,
|
radioBalanceHolder: elements.Radio,
|
||||||
tbxSaleBonus: InputNumber,
|
tbxSaleBonus: elements.InputNumber,
|
||||||
tbxFirstPaymentPerc: InputNumber,
|
tbxFirstPaymentPerc: elements.InputNumber,
|
||||||
tbxFirstPaymentRub: InputNumber,
|
tbxFirstPaymentRub: elements.InputNumber,
|
||||||
radioLastPaymentRule: Segmented,
|
radioLastPaymentRule: elements.Segmented,
|
||||||
tbxLastPaymentPerc: InputNumber,
|
tbxLastPaymentPerc: elements.InputNumber,
|
||||||
tbxLastPaymentRub: InputNumber,
|
tbxLastPaymentRub: elements.InputNumber,
|
||||||
selectImportProgram: Select,
|
selectImportProgram: elements.Select,
|
||||||
tbxImportProgramSum: InputNumber,
|
tbxImportProgramSum: elements.InputNumber,
|
||||||
tbxAddEquipmentPrice: InputNumber,
|
tbxAddEquipmentPrice: elements.InputNumber,
|
||||||
tbxRedemptionPaymentSum: InputNumber,
|
tbxRedemptionPaymentSum: elements.InputNumber,
|
||||||
tbxLeasingPeriod: InputNumber,
|
tbxLeasingPeriod: elements.InputNumber,
|
||||||
radioGraphType: Radio,
|
radioGraphType: elements.Radio,
|
||||||
tbxParmentsDecreasePercent: InputNumber,
|
tbxParmentsDecreasePercent: elements.InputNumber,
|
||||||
selectSeasonType: Select,
|
selectSeasonType: elements.Select,
|
||||||
selectHighSeasonStart: Select,
|
selectHighSeasonStart: elements.Select,
|
||||||
tbxComissionPerc: InputNumber,
|
tbxComissionPerc: elements.InputNumber,
|
||||||
tbxComissionRub: InputNumber,
|
tbxComissionRub: elements.InputNumber,
|
||||||
selectLeaseObjectType: Select,
|
selectLeaseObjectType: elements.Select,
|
||||||
selectBrand: Select,
|
selectBrand: elements.Select,
|
||||||
selectModel: Select,
|
selectModel: elements.Select,
|
||||||
selectConfiguration: Select,
|
selectConfiguration: elements.Select,
|
||||||
cbxLeaseObjectUsed: Checkbox,
|
cbxLeaseObjectUsed: elements.Checkbox,
|
||||||
radioDeliveryTime: Segmented,
|
radioDeliveryTime: elements.Segmented,
|
||||||
tbxLeaseObjectCount: InputNumber,
|
tbxLeaseObjectCount: elements.InputNumber,
|
||||||
selectLeaseObjectUseFor: Select,
|
selectLeaseObjectUseFor: elements.Select,
|
||||||
tbxLeaseObjectYear: InputNumber,
|
tbxLeaseObjectYear: elements.InputNumber,
|
||||||
selectLeaseObjectCategory: Select,
|
selectLeaseObjectCategory: elements.Select,
|
||||||
selectEngineType: Select,
|
selectEngineType: elements.Select,
|
||||||
tbxLeaseObjectMotorPower: InputNumber,
|
tbxLeaseObjectMotorPower: elements.InputNumber,
|
||||||
tbxEngineVolume: InputNumber,
|
tbxEngineVolume: elements.InputNumber,
|
||||||
tbxMaxMass: InputNumber,
|
tbxMaxMass: elements.InputNumber,
|
||||||
tbxCountSeats: InputNumber,
|
tbxCountSeats: elements.InputNumber,
|
||||||
tbxMaxSpeed: InputNumber,
|
tbxMaxSpeed: elements.InputNumber,
|
||||||
cbxWithTrailer: Checkbox,
|
cbxWithTrailer: elements.Checkbox,
|
||||||
selectDealer: Select,
|
selectDealer: elements.Select,
|
||||||
selectDealerPerson: Select,
|
selectDealerPerson: elements.Select,
|
||||||
selectDealerRewardCondition: Select,
|
selectDealerRewardCondition: elements.Select,
|
||||||
tbxDealerRewardSumm: InputNumber,
|
tbxDealerRewardSumm: elements.InputNumber,
|
||||||
selectDealerBroker: Select,
|
selectDealerBroker: elements.Select,
|
||||||
selectDealerBrokerRewardCondition: Select,
|
selectDealerBrokerRewardCondition: elements.Select,
|
||||||
tbxDealerBrokerRewardSumm: InputNumber,
|
tbxDealerBrokerRewardSumm: elements.InputNumber,
|
||||||
selectIndAgent: Select,
|
selectIndAgent: elements.Select,
|
||||||
selectIndAgentRewardCondition: Select,
|
selectIndAgentRewardCondition: elements.Select,
|
||||||
tbxIndAgentRewardSumm: InputNumber,
|
tbxIndAgentRewardSumm: elements.InputNumber,
|
||||||
selectCalcDoubleAgent: Select,
|
selectCalcDoubleAgent: elements.Select,
|
||||||
selectCalcDoubleAgentRewardCondition: Select,
|
selectCalcDoubleAgentRewardCondition: elements.Select,
|
||||||
tbxCalcDoubleAgentRewardSumm: InputNumber,
|
tbxCalcDoubleAgentRewardSumm: elements.InputNumber,
|
||||||
selectCalcBroker: Select,
|
selectCalcBroker: elements.Select,
|
||||||
selectCalcBrokerRewardCondition: Select,
|
selectCalcBrokerRewardCondition: elements.Select,
|
||||||
tbxCalcBrokerRewardSum: InputNumber,
|
tbxCalcBrokerRewardSum: elements.InputNumber,
|
||||||
selectCalcFinDepartment: Select,
|
selectCalcFinDepartment: elements.Select,
|
||||||
selectFinDepartmentRewardCondtion: Select,
|
selectFinDepartmentRewardCondtion: elements.Select,
|
||||||
tbxFinDepartmentRewardSumm: InputNumber,
|
tbxFinDepartmentRewardSumm: elements.InputNumber,
|
||||||
cbxInsDecentral: Switch,
|
cbxInsDecentral: elements.Switch,
|
||||||
radioInsKaskoType: Radio,
|
radioInsKaskoType: elements.Radio,
|
||||||
tbxInsFranchise: InputNumber,
|
tbxInsFranchise: elements.InputNumber,
|
||||||
cbxInsUnlimitDrivers: Switch,
|
cbxInsUnlimitDrivers: elements.Switch,
|
||||||
tbxInsAgeDrivers: InputNumber,
|
tbxInsAgeDrivers: elements.InputNumber,
|
||||||
tbxInsExpDrivers: InputNumber,
|
tbxInsExpDrivers: elements.InputNumber,
|
||||||
tbxINNForCalc: InputNumber,
|
tbxINNForCalc: elements.InputNumber,
|
||||||
selectGPSBrand: Select,
|
selectGPSBrand: elements.Select,
|
||||||
selectGPSModel: Select,
|
selectGPSModel: elements.Select,
|
||||||
selectRegionRegistration: Select,
|
selectRegionRegistration: elements.Select,
|
||||||
selectTownRegistration: Select,
|
selectTownRegistration: elements.Select,
|
||||||
radioInfuranceOPF: Radio,
|
radioInfuranceOPF: elements.Radio,
|
||||||
selectRegistration: Select,
|
selectRegistration: elements.Select,
|
||||||
selectInsNSIB: Select,
|
selectInsNSIB: elements.Select,
|
||||||
selectRequirementTelematic: Select,
|
selectRequirementTelematic: elements.Select,
|
||||||
selectTracker: Select,
|
selectTracker: elements.Select,
|
||||||
selectTelematic: Select,
|
selectTelematic: elements.Select,
|
||||||
selectTechnicalCard: Select,
|
selectTechnicalCard: elements.Select,
|
||||||
cbxLastPaymentRedemption: Switch,
|
cbxLastPaymentRedemption: elements.Switch,
|
||||||
cbxPriceWithDiscount: Switch,
|
cbxPriceWithDiscount: elements.Switch,
|
||||||
cbxFullPriceWithDiscount: Switch,
|
cbxFullPriceWithDiscount: elements.Switch,
|
||||||
cbxCostIncrease: Switch,
|
cbxCostIncrease: elements.Switch,
|
||||||
cbxInsurance: Switch,
|
cbxInsurance: elements.Switch,
|
||||||
cbxRegistrationQuote: Switch,
|
cbxRegistrationQuote: elements.Switch,
|
||||||
cbxTechnicalCardQuote: Switch,
|
cbxTechnicalCardQuote: elements.Switch,
|
||||||
cbxNSIB: Switch,
|
cbxNSIB: elements.Switch,
|
||||||
cbxQuoteRedemptionGraph: Switch,
|
cbxQuoteRedemptionGraph: elements.Switch,
|
||||||
cbxShowFinGAP: Switch,
|
cbxShowFinGAP: elements.Switch,
|
||||||
tbxQuoteName: Input,
|
tbxQuoteName: elements.Input,
|
||||||
radioQuoteContactGender: Radio,
|
radioQuoteContactGender: elements.Radio,
|
||||||
cbxDisableChecks: Switch,
|
cbxDisableChecks: elements.Switch,
|
||||||
selectTarif: Select,
|
selectTarif: elements.Select,
|
||||||
tbxCreditRate: InputNumber,
|
tbxCreditRate: elements.InputNumber,
|
||||||
selectRate: Select,
|
selectRate: elements.Select,
|
||||||
tbxMaxPriceChange: InputNumber,
|
tbxMaxPriceChange: elements.InputNumber,
|
||||||
tbxImporterRewardPerc: InputNumber,
|
tbxImporterRewardPerc: elements.InputNumber,
|
||||||
tbxImporterRewardRub: InputNumber,
|
tbxImporterRewardRub: elements.InputNumber,
|
||||||
selectLead: Select,
|
selectLead: elements.Select,
|
||||||
selectOpportunity: Select,
|
selectOpportunity: elements.Select,
|
||||||
selectQuote: Select,
|
selectQuote: elements.Select,
|
||||||
cbxRecalcWithRevision: Checkbox,
|
cbxRecalcWithRevision: elements.Checkbox,
|
||||||
tbxIRR_Perc: InputNumber,
|
tbxIRR_Perc: elements.InputNumber,
|
||||||
tbxMileage: InputNumber,
|
tbxMileage: elements.InputNumber,
|
||||||
tbxEngineHours: InputNumber,
|
tbxEngineHours: elements.InputNumber,
|
||||||
radioCalcType: Segmented,
|
radioCalcType: elements.Segmented,
|
||||||
tbxTotalPayments: InputNumber,
|
tbxTotalPayments: elements.InputNumber,
|
||||||
radioObjectRegistration: Radio,
|
radioObjectRegistration: elements.Radio,
|
||||||
selectObjectRegionRegistration: Select,
|
selectObjectRegionRegistration: elements.Select,
|
||||||
tbxVehicleTaxInYear: InputNumber,
|
tbxVehicleTaxInYear: elements.InputNumber,
|
||||||
tbxVehicleTaxInLeasingPeriod: InputNumber,
|
tbxVehicleTaxInLeasingPeriod: elements.InputNumber,
|
||||||
selectObjectCategoryTax: Select,
|
selectObjectCategoryTax: elements.Select,
|
||||||
selectObjectTypeTax: Select,
|
selectObjectTypeTax: elements.Select,
|
||||||
radioTypePTS: Radio,
|
radioTypePTS: elements.Radio,
|
||||||
selectLegalClientRegion: Select,
|
selectLegalClientRegion: elements.Select,
|
||||||
selectLegalClientTown: Select,
|
selectLegalClientTown: elements.Select,
|
||||||
selectSubsidy: Select,
|
selectSubsidy: elements.Select,
|
||||||
selectFuelCard: Select,
|
selectFuelCard: elements.Select,
|
||||||
tbxMinPriceChange: InputNumber,
|
tbxMinPriceChange: elements.InputNumber,
|
||||||
tbxBonusCoefficient: InputNumber,
|
tbxBonusCoefficient: elements.InputNumber,
|
||||||
|
|
||||||
/** Readonly Elements */
|
/** Readonly Elements */
|
||||||
labelLeaseObjectRisk: Text,
|
labelLeaseObjectRisk: elements.Text,
|
||||||
tbxInsKaskoPriceLeasePeriod: InputNumber,
|
tbxInsKaskoPriceLeasePeriod: elements.InputNumber,
|
||||||
labelIrrInfo: Text,
|
labelIrrInfo: elements.Text,
|
||||||
labelRegistrationDescription: Text,
|
labelRegistrationDescription: elements.Text,
|
||||||
labelDepreciationGroup: Text,
|
labelDepreciationGroup: elements.Text,
|
||||||
tbxSubsidySum: InputNumber,
|
tbxSubsidySum: elements.InputNumber,
|
||||||
|
|
||||||
/** Button Elements */
|
/** Button Elements */
|
||||||
btnCreateKP: Button,
|
btnCreateKP: elements.Button,
|
||||||
btnCalculate: Button,
|
btnCalculate: elements.Button,
|
||||||
|
|
||||||
/** Link Elements */
|
/** Link Elements */
|
||||||
linkDownloadKp: Link,
|
linkDownloadKp: elements.Link,
|
||||||
linkLeadUrl: Link,
|
linkLeadUrl: elements.Link,
|
||||||
linkOpportunityUrl: Link,
|
linkOpportunityUrl: elements.Link,
|
||||||
linkQuoteUrl: Link,
|
linkQuoteUrl: elements.Link,
|
||||||
});
|
});
|
||||||
|
|
||||||
export default components;
|
export default components;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { MAX_FRANCHISE, MAX_LEASING_PERIOD } from 'constants/values';
|
import { MAX_FRANCHISE, MAX_LEASING_PERIOD } from 'constants/values';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import DownloadOutlined from 'Elements/icons/DownloadOutlined';
|
|
||||||
import { formatter, formatterExtra, parser } from 'tools/number';
|
import { formatter, formatterExtra, parser } from 'tools/number';
|
||||||
|
import DownloadOutlined from 'ui/elements/icons/DownloadOutlined';
|
||||||
import CurrencyAddon from '../addons/currency-addon';
|
import CurrencyAddon from '../addons/currency-addon';
|
||||||
import type { ElementsProps } from './elements-components';
|
import type { ElementsProps } from './elements-components';
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
/* eslint-disable object-curly-newline */
|
/* eslint-disable object-curly-newline */
|
||||||
import { Container, Head } from 'Components/Layout/Element';
|
import { Container, Head } from 'Components/Layout/Element';
|
||||||
import Link from 'Elements/Link';
|
|
||||||
import Tooltip from 'Elements/Tooltip';
|
|
||||||
import { observer } from 'mobx-react-lite';
|
import { observer } from 'mobx-react-lite';
|
||||||
import type { ComponentProps } from 'react';
|
import type { ComponentProps } from 'react';
|
||||||
import { useStore } from 'stores/hooks';
|
import { useStore } from 'stores/hooks';
|
||||||
|
import Link from 'ui/elements/Link';
|
||||||
|
import Tooltip from 'ui/elements/Tooltip';
|
||||||
import buildReadonly from '../../builders/build-readonly';
|
import buildReadonly from '../../builders/build-readonly';
|
||||||
import builders from '../elements-builders';
|
import builders from '../elements-builders';
|
||||||
import components from '../elements-components';
|
import components from '../elements-components';
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/* eslint-disable react/no-array-index-key */
|
/* eslint-disable react/no-array-index-key */
|
||||||
import Divider from 'Elements/layout/Divider';
|
import Divider from 'ui/elements/layout/Divider';
|
||||||
import type { BoxProps } from 'UIKit/grid';
|
import type { BoxProps } from 'ui/grid';
|
||||||
import { Box } from 'UIKit/grid';
|
import { Box } from 'ui/grid';
|
||||||
import elementsRender from '../config/elements-render';
|
import elementsRender from '../config/elements-render';
|
||||||
import type { Elements as ActionElements } from '../config/map/actions';
|
import type { Elements as ActionElements } from '../config/map/actions';
|
||||||
import type { Elements as ValuesElements } from '../config/map/values';
|
import type { Elements as ValuesElements } from '../config/map/values';
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
/* eslint-disable import/prefer-default-export */
|
/* eslint-disable import/prefer-default-export */
|
||||||
import Button from 'Elements/Button';
|
import Button from 'ui/elements/Button';
|
||||||
import Result from 'Elements/Result';
|
import Result from 'ui/elements/Result';
|
||||||
|
|
||||||
function handleRetry() {
|
function handleRetry() {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { useQuery } from '@tanstack/react-query';
|
import { useQuery } from '@tanstack/react-query';
|
||||||
import { getUser } from 'api/user/query';
|
import { getUser } from 'api/user/query';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { Flex } from 'UIKit/grid';
|
import { Flex } from 'ui/grid';
|
||||||
import { min } from 'UIKit/mq';
|
import { min } from 'ui/mq';
|
||||||
|
|
||||||
const UserText = styled.span`
|
const UserText = styled.span`
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import type { ReactNode } from 'react';
|
import type { ReactNode } from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { Flex } from 'UIKit/grid';
|
import { Flex } from 'ui/grid';
|
||||||
import { min } from 'UIKit/mq';
|
import { min } from 'ui/mq';
|
||||||
|
|
||||||
const ElementTitle = styled.label`
|
const ElementTitle = styled.label`
|
||||||
color: rgba(0, 0, 0, 0.75);
|
color: rgba(0, 0, 0, 0.75);
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/* eslint-disable import/no-unresolved */
|
/* eslint-disable import/no-unresolved */
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { Flex } from 'UIKit/grid';
|
import { Flex } from 'ui/grid';
|
||||||
import { min } from 'UIKit/mq';
|
import { min } from 'ui/mq';
|
||||||
import Auth from './Auth';
|
import Auth from './Auth';
|
||||||
import Logo from './Logo';
|
import Logo from './Logo';
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import logo from 'public/assets/images/logo-primary.svg';
|
import logo from 'public/assets/images/logo-primary.svg';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { Flex } from 'UIKit/grid';
|
import { Flex } from 'ui/grid';
|
||||||
import { min } from 'UIKit/mq';
|
import { min } from 'ui/mq';
|
||||||
|
|
||||||
const ImageWrapper = styled.div`
|
const ImageWrapper = styled.div`
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
/* eslint-disable react/prop-types */
|
/* eslint-disable react/prop-types */
|
||||||
/* eslint-disable import/no-unresolved */
|
/* eslint-disable import/no-unresolved */
|
||||||
import { Flex } from 'UIKit/grid';
|
import { Flex } from 'ui/grid';
|
||||||
import Header from './Header';
|
import Header from './Header';
|
||||||
|
|
||||||
export default function Layout({ children }) {
|
export default function Layout({ children }) {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import { MAX_LEASING_PERIOD } from 'constants/values';
|
import { MAX_LEASING_PERIOD } from 'constants/values';
|
||||||
import Table from 'Elements/Table';
|
|
||||||
import { toJS } from 'mobx';
|
import { toJS } from 'mobx';
|
||||||
import { observer } from 'mobx-react-lite';
|
import { observer } from 'mobx-react-lite';
|
||||||
import { useStore } from 'stores/hooks';
|
import { useStore } from 'stores/hooks';
|
||||||
|
import Table from 'ui/elements/Table';
|
||||||
import { columns } from './config';
|
import { columns } from './config';
|
||||||
|
|
||||||
const PaymentsTable = observer(() => {
|
const PaymentsTable = observer(() => {
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
import { Container, Head } from 'Components/Layout/Element';
|
import { Container, Head } from 'Components/Layout/Element';
|
||||||
import Text from 'Elements/Text';
|
|
||||||
import { toJS } from 'mobx';
|
import { toJS } from 'mobx';
|
||||||
import { observer } from 'mobx-react-lite';
|
import { observer } from 'mobx-react-lite';
|
||||||
import { useStore } from 'stores/hooks';
|
import { useStore } from 'stores/hooks';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { Box } from 'UIKit/grid';
|
import Text from 'ui/elements/Text';
|
||||||
import { min } from 'UIKit/mq';
|
import { Box } from 'ui/grid';
|
||||||
|
import { min } from 'ui/mq';
|
||||||
import { formatters, id, title, titles } from './config';
|
import { formatters, id, title, titles } from './config';
|
||||||
|
|
||||||
const Grid = styled(Box)`
|
const Grid = styled(Box)`
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import Alert from 'Elements/Alert';
|
|
||||||
import { observer } from 'mobx-react-lite';
|
import { observer } from 'mobx-react-lite';
|
||||||
import { useStore } from 'stores/hooks';
|
import { useStore } from 'stores/hooks';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { Box, Flex } from 'UIKit/grid';
|
import Alert from 'ui/elements/Alert';
|
||||||
|
import { Box, Flex } from 'ui/grid';
|
||||||
|
|
||||||
const Bold = styled.span`
|
const Bold = styled.span`
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import Background from 'Elements/layout/Background';
|
|
||||||
import Tabs from 'Elements/layout/Tabs';
|
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { min } from 'UIKit/mq';
|
import Background from 'ui/elements/layout/Background';
|
||||||
|
import Tabs from 'ui/elements/layout/Tabs';
|
||||||
|
import { min } from 'ui/mq';
|
||||||
import PaymentsTable from './PaymentsTable';
|
import PaymentsTable from './PaymentsTable';
|
||||||
import Results from './Results';
|
import Results from './Results';
|
||||||
import Validation from './Validation';
|
import Validation from './Validation';
|
||||||
|
|||||||
@ -1,7 +0,0 @@
|
|||||||
import { mediaQuery } from './mq';
|
|
||||||
|
|
||||||
const theme = {
|
|
||||||
...mediaQuery,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default theme;
|
|
||||||
18
package.json
18
package.json
@ -1,7 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "evocalculator.client2",
|
"name": "evocalculator.client",
|
||||||
"version": "0.1.0",
|
"version": "2.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"workspaces": [
|
||||||
|
"@packages/*"
|
||||||
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
@ -12,13 +15,13 @@
|
|||||||
"precommit": "yarn prettier && yarn lint:fix && yarn test",
|
"precommit": "yarn prettier && yarn lint:fix && yarn test",
|
||||||
"graphql:codegen": "graphql-codegen --config .graphqlrc.yml",
|
"graphql:codegen": "graphql-codegen --config .graphqlrc.yml",
|
||||||
"graphql:download-schema": "dotenv -e .env.local apollo client:download-schema graphql/crm.schema.graphql",
|
"graphql:download-schema": "dotenv -e .env.local apollo client:download-schema graphql/crm.schema.graphql",
|
||||||
|
"graphql:update": "yarn graphql:codegen & yarn graphql:download-schema",
|
||||||
"prepare": "husky install",
|
"prepare": "husky install",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:watch": "jest --watch",
|
"test:watch": "jest --watch",
|
||||||
"test:ci": "jest --ci"
|
"test:ci": "jest --ci"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ant-design/icons": "^4.7.0",
|
|
||||||
"@apollo/client": "^3.7.0",
|
"@apollo/client": "^3.7.0",
|
||||||
"@fontsource/montserrat": "^4.5.12",
|
"@fontsource/montserrat": "^4.5.12",
|
||||||
"@tanstack/react-query": "^4.14.1",
|
"@tanstack/react-query": "^4.14.1",
|
||||||
@ -26,25 +29,25 @@
|
|||||||
"@trpc/next": "^10.0.0-rc.3",
|
"@trpc/next": "^10.0.0-rc.3",
|
||||||
"@trpc/react-query": "^10.0.0-rc.3",
|
"@trpc/react-query": "^10.0.0-rc.3",
|
||||||
"@trpc/server": "^10.0.0-rc.3",
|
"@trpc/server": "^10.0.0-rc.3",
|
||||||
"antd": "^4.21.3",
|
|
||||||
"axios": "^1.1.3",
|
"axios": "^1.1.3",
|
||||||
"dayjs": "^1.11.2",
|
"dayjs": "^1.11.2",
|
||||||
"less": "^4.1.3",
|
"less": "^4.1.3",
|
||||||
"less-loader": "^11.0.0",
|
"less-loader": "^11.0.0",
|
||||||
"mobx": "^6.5.0",
|
"mobx": "^6.7.0",
|
||||||
"mobx-react-lite": "^3.4.0",
|
"mobx-react-lite": "^3.4.0",
|
||||||
"next": "^12.3.0",
|
"next": "^12.3.0",
|
||||||
"next-compose-plugins": "^2.2.1",
|
"next-compose-plugins": "^2.2.1",
|
||||||
"next-plugin-graphql": "^0.0.2",
|
"next-plugin-graphql": "^0.0.2",
|
||||||
"next-with-less": "^2.0.5",
|
"next-with-less": "^2.0.5",
|
||||||
"normalize.css": "^8.0.1",
|
"normalize.css": "^8.0.1",
|
||||||
"radash": "^8.0.0",
|
"radash": "^10.3.0",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"rebass": "^4.0.7",
|
|
||||||
"sharp": "^0.30.4",
|
"sharp": "^0.30.4",
|
||||||
"styled-components": "^5.3.5",
|
"styled-components": "^5.3.5",
|
||||||
"superjson": "^1.11.0",
|
"superjson": "^1.11.0",
|
||||||
|
"tools": "*",
|
||||||
|
"ui": "*",
|
||||||
"use-debounce": "^8.0.1",
|
"use-debounce": "^8.0.1",
|
||||||
"zod": "^3.19.1"
|
"zod": "^3.19.1"
|
||||||
},
|
},
|
||||||
@ -58,7 +61,6 @@
|
|||||||
"@types/node": "18.7.18",
|
"@types/node": "18.7.18",
|
||||||
"@types/react": "18.0.20",
|
"@types/react": "18.0.20",
|
||||||
"@types/react-dom": "18.0.6",
|
"@types/react-dom": "18.0.6",
|
||||||
"@types/rebass": "^4.0.10",
|
|
||||||
"@types/styled-components": "^5.1.25",
|
"@types/styled-components": "^5.1.25",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.37.0",
|
"@typescript-eslint/eslint-plugin": "^5.37.0",
|
||||||
"@typescript-eslint/parser": "^5.37.0",
|
"@typescript-eslint/parser": "^5.37.0",
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import Result from 'Elements/Result';
|
import Result from 'ui/elements/Result';
|
||||||
|
|
||||||
export default function NotFound() {
|
export default function NotFound() {
|
||||||
return <Result status="404" title="404" subTitle="Тут ничего нет" />;
|
return <Result status="404" title="404" subTitle="Тут ничего нет" />;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import Result from 'Elements/Result';
|
import Result from 'ui/elements/Result';
|
||||||
|
|
||||||
export default function ServerError() {
|
export default function ServerError() {
|
||||||
return <Result status="500" title="Ой" subTitle=" Что-то сломалось" />;
|
return <Result status="500" title="Ой" subTitle=" Что-то сломалось" />;
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
/* eslint-disable global-require */
|
/* eslint-disable global-require */
|
||||||
import { ApolloProvider } from '@apollo/client';
|
import { ApolloProvider } from '@apollo/client';
|
||||||
import { QueryClientProvider } from '@tanstack/react-query';
|
import { QueryClientProvider } from '@tanstack/react-query';
|
||||||
import { ConfigProvider } from 'antd';
|
|
||||||
import 'antd/dist/antd.less';
|
|
||||||
import Layout from 'Components/Layout';
|
import Layout from 'Components/Layout';
|
||||||
import Head from 'next/head';
|
import Head from 'next/head';
|
||||||
import 'normalize.css';
|
import 'normalize.css';
|
||||||
@ -10,12 +8,13 @@ import { useMemo } from 'react';
|
|||||||
import StoreProvider from 'stores/Provider';
|
import StoreProvider from 'stores/Provider';
|
||||||
import { ThemeProvider } from 'styled-components';
|
import { ThemeProvider } from 'styled-components';
|
||||||
import { trpcClient } from 'trpc/client';
|
import { trpcClient } from 'trpc/client';
|
||||||
import { GlobalStyle } from 'UIKit/colors';
|
import { GlobalStyle } from 'ui/colors';
|
||||||
import theme from 'UIKit/theme';
|
import { ConfigProvider, ru_RU } from 'ui/elements/config';
|
||||||
|
import 'ui/elements/styles/antd.less';
|
||||||
|
import theme from 'ui/theme';
|
||||||
import '../styles/fonts.css';
|
import '../styles/fonts.css';
|
||||||
import '../styles/globals.css';
|
import '../styles/globals.css';
|
||||||
|
|
||||||
import ruRU from 'antd/lib/locale/ru_RU';
|
|
||||||
import initializeQueryClient from 'api/client';
|
import initializeQueryClient from 'api/client';
|
||||||
import initializeApollo from 'apollo/client';
|
import initializeApollo from 'apollo/client';
|
||||||
|
|
||||||
@ -38,7 +37,7 @@ function App({ Component, pageProps }) {
|
|||||||
</Head>
|
</Head>
|
||||||
<GlobalStyle />
|
<GlobalStyle />
|
||||||
<StoreProvider {...pageProps}>
|
<StoreProvider {...pageProps}>
|
||||||
<ConfigProvider locale={ruRU}>
|
<ConfigProvider locale={ru_RU}>
|
||||||
<ApolloProvider client={apolloClient}>
|
<ApolloProvider client={apolloClient}>
|
||||||
<QueryClientProvider client={queryClient}>
|
<QueryClientProvider client={queryClient}>
|
||||||
<Layout>
|
<Layout>
|
||||||
|
|||||||
@ -8,8 +8,8 @@ import Head from 'next/head';
|
|||||||
import { getOwnerData, useInsuranceData, useMainData } from 'process/init/get-data';
|
import { getOwnerData, useInsuranceData, useMainData } from 'process/init/get-data';
|
||||||
import { useReactions } from 'process/init/inject-reactions/hooks';
|
import { useReactions } from 'process/init/inject-reactions/hooks';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { Box } from 'UIKit/grid';
|
import { Box } from 'ui/grid';
|
||||||
import { min } from 'UIKit/mq';
|
import { min } from 'ui/mq';
|
||||||
|
|
||||||
const Grid = styled(Box)`
|
const Grid = styled(Box)`
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
import message from 'Elements/message';
|
|
||||||
import { reaction } from 'mobx';
|
import { reaction } from 'mobx';
|
||||||
import type { ReactionsContext } from 'process/types';
|
import type { ReactionsContext } from 'process/types';
|
||||||
import { pick } from 'radash';
|
import { pick } from 'radash';
|
||||||
import extend from 'stores/tables/insurance/tools';
|
import extend from 'stores/tables/insurance/tools';
|
||||||
|
import message from 'ui/elements/message';
|
||||||
|
|
||||||
const key = 'KP_LOADING_INFO';
|
const key = 'KP_LOADING_INFO';
|
||||||
|
|
||||||
|
|||||||
@ -2,10 +2,10 @@
|
|||||||
import titles from 'Components/Calculation/config/elements-titles';
|
import titles from 'Components/Calculation/config/elements-titles';
|
||||||
import type * as Values from 'Components/Calculation/config/map/values';
|
import type * as Values from 'Components/Calculation/config/map/values';
|
||||||
import { getValueName } from 'Components/Calculation/config/map/values';
|
import { getValueName } from 'Components/Calculation/config/map/values';
|
||||||
import type { BaseOption } from 'Elements/types';
|
|
||||||
import { observable } from 'mobx';
|
import { observable } from 'mobx';
|
||||||
import type RootStore from 'stores/root';
|
import type RootStore from 'stores/root';
|
||||||
import Validation from 'stores/validation';
|
import Validation from 'stores/validation';
|
||||||
|
import type { BaseOption } from 'ui/elements/types';
|
||||||
import type { RemoveError, ValidationParams } from '../validation/types';
|
import type { RemoveError, ValidationParams } from '../validation/types';
|
||||||
import OptionsStore from './options';
|
import OptionsStore from './options';
|
||||||
import StatusStore from './statuses';
|
import StatusStore from './statuses';
|
||||||
|
|||||||
@ -2,9 +2,9 @@
|
|||||||
/* eslint-disable unicorn/prefer-set-has */
|
/* eslint-disable unicorn/prefer-set-has */
|
||||||
import type { Elements, ElementsTypes } from 'Components/Calculation/config/map/values';
|
import type { Elements, ElementsTypes } from 'Components/Calculation/config/map/values';
|
||||||
import defaultOptions from 'config/default-options';
|
import defaultOptions from 'config/default-options';
|
||||||
import type { BaseOption } from 'Elements/types';
|
|
||||||
import { makeAutoObservable } from 'mobx';
|
import { makeAutoObservable } from 'mobx';
|
||||||
import type RootStore from 'stores/root';
|
import type RootStore from 'stores/root';
|
||||||
|
import type { BaseOption } from 'ui/elements/types';
|
||||||
import type { CalculationOptions } from './types';
|
import type { CalculationOptions } from './types';
|
||||||
|
|
||||||
export default class OptionsStore {
|
export default class OptionsStore {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { Elements, ElementsTypes } from 'Components/Calculation/config/map/values';
|
import type { Elements, ElementsTypes } from 'Components/Calculation/config/map/values';
|
||||||
import type { BaseOption } from 'Elements/types';
|
import type { BaseOption } from 'ui/elements/types';
|
||||||
|
|
||||||
export type CalculationOptions = {
|
export type CalculationOptions = {
|
||||||
[ElementName in Elements]: BaseOption<ElementsTypes[ElementName]>[];
|
[ElementName in Elements]: BaseOption<ElementsTypes[ElementName]>[];
|
||||||
|
|||||||
@ -2,9 +2,9 @@
|
|||||||
import type { Elements as ElementsActions } from 'Components/Calculation/config/map/actions';
|
import type { Elements as ElementsActions } from 'Components/Calculation/config/map/actions';
|
||||||
import type { Elements as ElementsValues } from 'Components/Calculation/config/map/values';
|
import type { Elements as ElementsValues } from 'Components/Calculation/config/map/values';
|
||||||
import defaultStatuses from 'config/default-statuses';
|
import defaultStatuses from 'config/default-statuses';
|
||||||
import type { Status } from 'Elements/types';
|
|
||||||
import { makeAutoObservable } from 'mobx';
|
import { makeAutoObservable } from 'mobx';
|
||||||
import type RootStore from 'stores/root';
|
import type RootStore from 'stores/root';
|
||||||
|
import type { Status } from 'ui/elements/types';
|
||||||
import type { CalculationStatuses } from './types';
|
import type { CalculationStatuses } from './types';
|
||||||
|
|
||||||
export default class StatusStore {
|
export default class StatusStore {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import type { Elements as ElementsActions } from 'Components/Calculation/config/map/actions';
|
import type { Elements as ElementsActions } from 'Components/Calculation/config/map/actions';
|
||||||
import type { Elements as ElementsValues } from 'Components/Calculation/config/map/values';
|
import type { Elements as ElementsValues } from 'Components/Calculation/config/map/values';
|
||||||
import type { Status } from 'Elements/types';
|
import type { Status } from 'ui/elements/types';
|
||||||
|
|
||||||
export type CalculationStatuses = Record<ElementsValues | ElementsActions, Status>;
|
export type CalculationStatuses = Record<ElementsValues | ElementsActions, Status>;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import type { Status } from 'Elements/types';
|
|
||||||
import type { IObservableArray } from 'mobx';
|
import type { IObservableArray } from 'mobx';
|
||||||
import { makeAutoObservable, observable, reaction } from 'mobx';
|
import { makeAutoObservable, observable, reaction } from 'mobx';
|
||||||
|
import type { Status } from 'ui/elements/types';
|
||||||
|
|
||||||
import type RootStore from 'stores/root';
|
import type RootStore from 'stores/root';
|
||||||
import Validation from '../../validation';
|
import Validation from '../../validation';
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import type { Status } from 'Elements/types';
|
import type { Status } from 'ui/elements/types';
|
||||||
|
|
||||||
export type Row = {
|
export type Row = {
|
||||||
value: number;
|
value: number;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import notification from 'Elements/notification';
|
|
||||||
import { makeAutoObservable } from 'mobx';
|
import { makeAutoObservable } from 'mobx';
|
||||||
|
import notification from 'ui/elements/notification';
|
||||||
import type { ValidationConfig } from './types';
|
import type { ValidationConfig } from './types';
|
||||||
|
|
||||||
export default class Validation {
|
export default class Validation {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user