format code
This commit is contained in:
parent
4a2d04cfa5
commit
83c5bf5e96
@ -3,18 +3,17 @@ import {
|
||||
withComputedValue,
|
||||
withLink,
|
||||
withTable,
|
||||
withValue,
|
||||
withValue
|
||||
} from 'client/hocs/Calculation';
|
||||
import { ElementType } from 'core/types/Calculation/Store/elements';
|
||||
|
||||
import elementsActions from './elements/actions';
|
||||
import elementsComponents from './elements/components';
|
||||
import elementsComputedValues from './elements/computedValues';
|
||||
import elementsProps from './elements/elementsProps';
|
||||
import elementsTypes from './elements/types';
|
||||
import elementsValues from './elements/values';
|
||||
import tables from './elements/tables';
|
||||
import elementsTypes from './elements/types';
|
||||
import elementsUrls from './elements/urls';
|
||||
import elementsValues from './elements/values';
|
||||
|
||||
export function buildElement(elementName) {
|
||||
const elementType = elementsTypes[elementName];
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { StoreTables } from 'core/types/Calculation/Store/tables';
|
||||
import Button from 'client/Elements/Button';
|
||||
import Checkbox from 'client/Elements/Checkbox';
|
||||
import Download from 'client/Elements/Download';
|
||||
import Input from 'client/Elements/Input';
|
||||
import InputNumber from 'client/Elements/InputNumber';
|
||||
import Label from 'client/Elements/Label';
|
||||
@ -9,10 +9,9 @@ import Select from 'client/Elements/Select';
|
||||
import Switch from 'client/Elements/Switch';
|
||||
import Table from 'client/Elements/Table';
|
||||
import TextArea from 'client/Elements/TextArea';
|
||||
import Download from 'client/Elements/Download';
|
||||
|
||||
import { Component } from 'core/types/Calculation/components';
|
||||
import { TElements } from 'core/types/Calculation/Store/elements';
|
||||
import { StoreTables } from 'core/types/Calculation/Store/tables';
|
||||
|
||||
const elementsComponents: TElements<Component> = {
|
||||
selectChannel: Select,
|
||||
|
||||
@ -1,15 +1,16 @@
|
||||
import withButton from './withButton';
|
||||
import withLink from './withLink';
|
||||
import withComputedValue from './withComputedValue';
|
||||
import withLink from './withLink';
|
||||
import withModal from './withModal';
|
||||
import withTable from './withTable';
|
||||
import withValue from './withValue';
|
||||
|
||||
export {
|
||||
withButton,
|
||||
withLink,
|
||||
withValue,
|
||||
withComputedValue,
|
||||
withModal,
|
||||
withTable,
|
||||
withButton,
|
||||
withLink,
|
||||
withValue,
|
||||
withComputedValue,
|
||||
withModal,
|
||||
withTable,
|
||||
};
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ import initialFilters from 'client/stores/CalculationStore/config/initialFilters
|
||||
import initialOptions from 'client/stores/CalculationStore/config/initialOptions';
|
||||
import initialStatuses from 'client/stores/CalculationStore/config/initialStatuses';
|
||||
import initialValues from 'client/stores/CalculationStore/config/initialValues';
|
||||
import { find, isNil, mergeWith } from 'lodash';
|
||||
import { isNil, mergeWith } from 'lodash';
|
||||
|
||||
const valuesData = {
|
||||
values: initialValues,
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import { TableNames } from 'core/types/Calculation/Store/tables';
|
||||
import elementsTitles, {
|
||||
tablesTitles,
|
||||
tablesTitles
|
||||
} from 'client/Containers/Calculation/lib/elements/titles';
|
||||
import CalculationStore from 'client/stores/CalculationStore';
|
||||
import { toJS } from 'mobx';
|
||||
import { TableNames } from 'core/types/Calculation/Store/tables';
|
||||
import { omit } from 'lodash';
|
||||
import { toJS } from 'mobx';
|
||||
|
||||
export default () => {
|
||||
const invalidElements: string[] = [];
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import { convertPrice } from '../../lib/tools';
|
||||
import valuesConstants from 'core/constants/values';
|
||||
import { PaymentRow, PreparedValues } from 'core/types/Calculation/Prepare';
|
||||
import { IPreparedData } from 'core/types/Calculation/Requests';
|
||||
import { ICalculationStore } from 'core/types/Calculation/Store';
|
||||
import { DateTime } from 'luxon';
|
||||
import { NIL } from 'uuid';
|
||||
import { convertPrice } from '../../lib/tools';
|
||||
|
||||
export default ({
|
||||
calculationStore,
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
import { IEvoGraph } from './../../../../../../core/types/Entities/crmEntities';
|
||||
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
||||
import { IGetCRMEntitiesResponse } from 'core/types/Calculation/Responses';
|
||||
import { TElements } from 'core/types/Calculation/Store/elements';
|
||||
import { message } from 'antd';
|
||||
import { elementsValues } from 'client/Containers/Calculation/lib/elements/values';
|
||||
import { openNotification } from 'client/Elements/Notification';
|
||||
import CrmService from 'core/services/CrmService';
|
||||
import { calculationProcess } from 'client/stores/CalculationStore';
|
||||
import initialValues from 'client/stores/CalculationStore/config/initialValues';
|
||||
import CrmService from 'core/services/CrmService';
|
||||
import { currentDate } from 'core/tools/date';
|
||||
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
||||
import { IGetCRMEntitiesResponse } from 'core/types/Calculation/Responses';
|
||||
import { IReactionEffect } from 'core/types/Calculation/Store/effect';
|
||||
import { TElements } from 'core/types/Calculation/Store/elements';
|
||||
import { Process } from 'core/types/Calculation/Store/process';
|
||||
import { IEvoGraph } from 'core/types/Entities/crmEntities';
|
||||
import { ElementStatus } from 'core/types/statuses';
|
||||
import { NIL } from 'uuid';
|
||||
import mapKPtoValues from './mapKpToValues';
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
||||
import { openNotification } from 'client/Elements/Notification';
|
||||
import { shiftRight, shift } from 'core/tools/array';
|
||||
import {
|
||||
insuranceOsagoDefaultFilter,
|
||||
singleValueFilter
|
||||
} from 'core/constants/stores/Calculation/filters';
|
||||
import valuesConstants from 'core/constants/values';
|
||||
import { shift, shiftRight } from 'core/tools/array';
|
||||
import { IReactionEffect } from 'core/types/Calculation/Store/effect';
|
||||
import { Process } from 'core/types/Calculation/Store/process';
|
||||
import { ITableCell, TableProps } from 'core/types/Calculation/Store/tables';
|
||||
import { ElementStatus } from 'core/types/statuses';
|
||||
import { toJS } from 'mobx';
|
||||
import valuesConstants from 'core/constants/values';
|
||||
import {
|
||||
insuranceOsagoDefaultFilter,
|
||||
singleValueFilter,
|
||||
} from 'core/constants/stores/Calculation/filters';
|
||||
const { PERIODS_NUMBER } = valuesConstants;
|
||||
|
||||
export default [
|
||||
|
||||
@ -4,16 +4,16 @@ import { CRM_PROXY_URL } from 'core/constants/urls';
|
||||
import {
|
||||
ICreateKpRequest,
|
||||
IMutateToCRMGQL,
|
||||
IQueryToCRMGQL,
|
||||
IQueryToCRMGQL
|
||||
} from 'core/types/Calculation/Requests';
|
||||
import { IGetCRMEntitiesResponse } from 'core/types/Calculation/Responses';
|
||||
import { IBaseOption } from 'core/types/Calculation/Store/options';
|
||||
import { IQuote, TCRMEntity } from 'core/types/Entities/crmEntities';
|
||||
import { TEntities } from 'core/types/Entities/crmEntityNames';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import { isPlural, singular } from 'pluralize';
|
||||
import client from './client';
|
||||
import { convertEntityToOption } from './tools/entity';
|
||||
import { cloneDeep } from 'lodash';
|
||||
|
||||
export default class {
|
||||
static crmgqlquery = ({
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import propsMap from '../propsMap';
|
||||
import { IBaseOption } from 'core/types/Calculation/Store/options';
|
||||
import { TCRMEntity } from 'core/types/Entities/crmEntities';
|
||||
import { CRMEntityNames } from 'core/types/Entities/crmEntityNames';
|
||||
import propsMap from '../propsMap';
|
||||
|
||||
export function convertEntityToOption(
|
||||
entity: TCRMEntity,
|
||||
entityName?: CRMEntityNames,
|
||||
entityName?: CRMEntityNames
|
||||
): (TCRMEntity & IBaseOption) | undefined {
|
||||
if (!entityName) {
|
||||
throw new Error('entityName is missing');
|
||||
@ -30,7 +30,7 @@ export function convertEntityToOption(
|
||||
const optionatedObject = {
|
||||
...entity,
|
||||
name,
|
||||
value,
|
||||
value
|
||||
};
|
||||
return optionatedObject;
|
||||
}
|
||||
|
||||
@ -3,9 +3,7 @@ import {
|
||||
PreparedPayments,
|
||||
PreparedValues
|
||||
} from 'core/types/Calculation/Prepare';
|
||||
import {
|
||||
ElementsNames
|
||||
} from 'core/types/Calculation/Store/elements';
|
||||
import { ElementsNames } from 'core/types/Calculation/Store/elements';
|
||||
import { TableProps } from 'core/types/Calculation/Store/tables';
|
||||
import { TValues } from 'core/types/Calculation/Store/values';
|
||||
import { TCRMEntity } from 'core/types/Entities/crmEntities';
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { TCRMEntity } from './../../Entities/crmEntities';
|
||||
import { ElementStatus } from '../../statuses';
|
||||
import { ICalculationStore } from './';
|
||||
import { TCRMEntity } from './../../Entities/crmEntities';
|
||||
import { TCalculationProcess } from './effect';
|
||||
import { TElementFilter } from './filters';
|
||||
import { IBaseOption } from './options';
|
||||
import { TCalculationProcess } from './effect';
|
||||
|
||||
export type TableNames = 'tableInsurance' | 'tablePayments' | 'tableResults';
|
||||
export type TableValuesNames =
|
||||
|
||||
Reference in New Issue
Block a user