add types to calculation sections list
This commit is contained in:
parent
1e72022551
commit
e507868826
@ -14,8 +14,9 @@ import {
|
||||
validateKpp,
|
||||
validatePhone,
|
||||
} from 'client/tools/validate';
|
||||
import { ISections } from 'core/types/Calculation/components';
|
||||
|
||||
export default [
|
||||
const sections: ISections[] = [
|
||||
{
|
||||
title: 'Интерес/ЛС',
|
||||
groups: [
|
||||
@ -1656,3 +1657,5 @@ export default [
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
export default sections;
|
||||
29
src/core/types/Calculation/components.ts
Normal file
29
src/core/types/Calculation/components.ts
Normal file
@ -0,0 +1,29 @@
|
||||
import { ElementsNames } from 'core/types/elements';
|
||||
import { ValuesNames } from 'core/types/values';
|
||||
|
||||
interface IElement {
|
||||
isTable?: boolean;
|
||||
title?: string;
|
||||
Component: () => JSX.Element;
|
||||
props: {
|
||||
name: ElementsNames;
|
||||
valueName?: ValuesNames;
|
||||
[key: string]: any;
|
||||
};
|
||||
}
|
||||
|
||||
interface IBlock {
|
||||
title?: string;
|
||||
elements: IElement[];
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
interface IGroup {
|
||||
title?: string;
|
||||
blocks?: IBlock[];
|
||||
}
|
||||
|
||||
export interface ISections {
|
||||
title?: string;
|
||||
groups?: IGroup[];
|
||||
}
|
||||
@ -2,7 +2,7 @@ export type ElementsNames =
|
||||
| 'selectLead'
|
||||
| 'selectOpportunity'
|
||||
| 'selectQuote'
|
||||
| 'cbxRecalcWthtRevision'
|
||||
| 'cbxRecalcWithRevision'
|
||||
| 'selectTemplate'
|
||||
| 'selectChannel'
|
||||
| 'tbxNewClient'
|
||||
@ -110,7 +110,7 @@ export type ElementsNames =
|
||||
| 'cbxAddEquipment'
|
||||
| 'cbxRegistrationQuote'
|
||||
| 'cbxTechnicalCardQuote'
|
||||
| 'cbxNSiB'
|
||||
| 'cbxNSIB'
|
||||
| 'tbxQuoteName'
|
||||
| 'radioQuoteContactGender'
|
||||
| 'btnCreateKP'
|
||||
@ -123,7 +123,7 @@ export type ElementsNames =
|
||||
| 'cbxInsuranceDecentral'
|
||||
| 'tbxMaxPriceChange'
|
||||
| 'tbxImporterRewardPerc'
|
||||
| 'tbxImrovterRewardRub'
|
||||
| 'tbxImporterRewardRub'
|
||||
| 'cbxDisableChecks'
|
||||
| 'btnFranschise'
|
||||
| 'btnDriversApplication'
|
||||
@ -131,7 +131,8 @@ export type ElementsNames =
|
||||
| 'tbxBusinessUnit'
|
||||
| 'tbxLeadNumber'
|
||||
| 'tbxOpportunityNumber'
|
||||
| 'radioInsuranceOPF';
|
||||
| 'radioInsuranceOPF'
|
||||
| 'tableInsurance';
|
||||
|
||||
export type TElements<T> = {
|
||||
[elementName in ElementsNames]?: T;
|
||||
|
||||
Reference in New Issue
Block a user