diff --git a/apps/web/Components/Calculation/Form/ELT/Components/PolicyTable.tsx b/apps/web/Components/Calculation/Form/ELT/Components/PolicyTable.tsx
index 35fcc8a..f0a180d 100644
--- a/apps/web/Components/Calculation/Form/ELT/Components/PolicyTable.tsx
+++ b/apps/web/Components/Calculation/Form/ELT/Components/PolicyTable.tsx
@@ -1,13 +1,13 @@
import type { columns } from '../lib/config';
-import type { Getter } from '../types';
+import type { StoreSelector } from '../types';
import { useStore } from '@/stores/hooks';
import { observer } from 'mobx-react-lite';
import { Table } from 'ui/antd';
export const PolicyTable = observer(
- ({ getter, ...props }: { columns: typeof columns; getter: Getter }) => {
+ ({ storeSelector, ...props }: { columns: typeof columns; storeSelector: StoreSelector }) => {
const { $tables } = useStore();
- const { getRows, setSelectedKey, getSelectedRow } = getter($tables.elt);
+ const { getRows, setSelectedKey, getSelectedRow } = storeSelector($tables.elt);
return (
{
+export const ReloadButton = observer(({ storeSelector }: { storeSelector: StoreSelector }) => {
const { $tables } = useStore();
- const { validation } = getter($tables.elt);
+ const { validation } = storeSelector($tables.elt);
const hasErrors = validation.hasErrors;
diff --git a/apps/web/Components/Calculation/Form/ELT/Components/Validation.tsx b/apps/web/Components/Calculation/Form/ELT/Components/Validation.tsx
index 3d7b96a..26108db 100644
--- a/apps/web/Components/Calculation/Form/ELT/Components/Validation.tsx
+++ b/apps/web/Components/Calculation/Form/ELT/Components/Validation.tsx
@@ -1,11 +1,11 @@
-import type { Getter } from '../types';
+import type { StoreSelector } from '../types';
import { useStore } from '@/stores/hooks';
import { observer } from 'mobx-react-lite';
import { Alert } from 'ui/antd';
-export const Validation = observer(({ getter }: { getter: Getter }) => {
+export const Validation = observer(({ storeSelector }: { storeSelector: StoreSelector }) => {
const { $tables, $process } = useStore();
- const { validation } = getter($tables.elt);
+ const { validation } = storeSelector($tables.elt);
const errors = validation.getErrors();
diff --git a/apps/web/Components/Calculation/Form/ELT/Kasko.tsx b/apps/web/Components/Calculation/Form/ELT/Kasko.tsx
index 53df43b..193beb5 100644
--- a/apps/web/Components/Calculation/Form/ELT/Kasko.tsx
+++ b/apps/web/Components/Calculation/Form/ELT/Kasko.tsx
@@ -1,20 +1,20 @@
import { PolicyTable, ReloadButton, Validation } from './Components';
import { columns } from './lib/config';
-import type { Getter } from './types';
+import type { StoreSelector } from './types';
import { clone } from 'tools';
import { Flex } from 'ui/grid';
-const getter: Getter = ({ osago }) => osago;
+const getter: StoreSelector = ({ osago }) => osago;
const kaskoColumns = clone(columns);
kaskoColumns[0].title = 'Страховая компания КАСКО';
-kaskoColumns[3].title = ;
+kaskoColumns[3].title = ;
export function Kasko() {
return (
-
-
+
+
);
}
diff --git a/apps/web/Components/Calculation/Form/ELT/Osago.tsx b/apps/web/Components/Calculation/Form/ELT/Osago.tsx
index d030a2b..68fca6c 100644
--- a/apps/web/Components/Calculation/Form/ELT/Osago.tsx
+++ b/apps/web/Components/Calculation/Form/ELT/Osago.tsx
@@ -1,20 +1,20 @@
import { PolicyTable, ReloadButton, Validation } from './Components';
import { columns } from './lib/config';
-import type { Getter } from './types';
+import type { StoreSelector } from './types';
import { clone } from 'tools';
import { Flex } from 'ui/grid';
-const getter: Getter = ({ osago }) => osago;
+const storeSelector: StoreSelector = ({ osago }) => osago;
const osagoColumns = clone(columns);
osagoColumns[0].title = 'Страховая компания ОСАГО';
-osagoColumns[3].title = ;
+osagoColumns[3].title = ;
export function Osago() {
return (
-
-
+
+
);
}
diff --git a/apps/web/Components/Calculation/Form/ELT/types.ts b/apps/web/Components/Calculation/Form/ELT/types.ts
index ad630e6..526a0be 100644
--- a/apps/web/Components/Calculation/Form/ELT/types.ts
+++ b/apps/web/Components/Calculation/Form/ELT/types.ts
@@ -4,4 +4,4 @@ import type PolicyStore from '@/stores/tables/elt/policy';
import type { z } from 'zod';
export type Row = z.infer;
-export type Getter = (eltStore: ELTStore) => PolicyStore;
+export type StoreSelector = (eltStore: ELTStore) => PolicyStore;