type for options
This commit is contained in:
parent
e507868826
commit
3ff877fcec
@ -1,6 +1,7 @@
|
||||
import { TElements } from 'core/types/elements';
|
||||
import { TElementOption } from 'core/types/Calculation/options';
|
||||
|
||||
const initialOptions: TElements<any> = {
|
||||
const initialOptions: TElements<TElementOption[]> = {
|
||||
selectChannel: [
|
||||
{
|
||||
name: 'От агента-ФЛ-сотрудника поставщика',
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
import { TElementOption } from 'core/types/Calculation/options';
|
||||
import { TElements } from 'core/types/elements';
|
||||
import faker from 'faker';
|
||||
|
||||
const calculationFakeData: TElements<any> = {
|
||||
const calculationFakeData: TElements<TElementOption[]> = {
|
||||
selectSupplier: [
|
||||
{
|
||||
name: 'RENAULT (Престиж)',
|
||||
@ -282,43 +283,54 @@ const calculationFakeData: TElements<any> = {
|
||||
selectLead: [
|
||||
{
|
||||
name: '100_ООО "Архимаг',
|
||||
value: faker.random.uuid(),
|
||||
id: 'arhimagLead',
|
||||
value: 'arhimagLead',
|
||||
evo_opportunityid: 'arhimagOpportunity',
|
||||
},
|
||||
{
|
||||
name: '150_ООО "Некромант',
|
||||
value: faker.random.uuid(),
|
||||
id: 'nekrolead',
|
||||
value: 'nekrolead',
|
||||
},
|
||||
{
|
||||
name: '200_ООО "Кардинал',
|
||||
value: faker.random.uuid(),
|
||||
id: 'kardinalLead',
|
||||
value: 'kardinalLead',
|
||||
},
|
||||
],
|
||||
selectOpportunity: [
|
||||
{
|
||||
name: '112345_ООО "Архимаг',
|
||||
value: faker.random.uuid(),
|
||||
id: 'arhimagOpportunity',
|
||||
value: 'arhimagOpportunity',
|
||||
},
|
||||
{
|
||||
name: '145678_ООО "Некромант',
|
||||
value: faker.random.uuid(),
|
||||
id: 'nekroOpportunity',
|
||||
value: 'nekroOpportunity',
|
||||
},
|
||||
{
|
||||
name: '243910_ООО Кардинал',
|
||||
value: faker.random.uuid(),
|
||||
id: 'kardinalOpportunity',
|
||||
value: 'kardinalOpportunity',
|
||||
},
|
||||
],
|
||||
selectQuote: [
|
||||
{
|
||||
name: '2345_ООО "Архимаг"',
|
||||
value: faker.random.uuid(),
|
||||
id: 'arhimagQuote',
|
||||
value: 'arhimagQuote',
|
||||
evo_leadid: 'arhimagLead',
|
||||
},
|
||||
{
|
||||
name: '6789_ООО "Некромант"',
|
||||
value: faker.random.uuid(),
|
||||
id: 'nekroQuote',
|
||||
value: 'nekroQuote',
|
||||
},
|
||||
{
|
||||
name: '8765_ООО "Кардинал',
|
||||
value: faker.random.uuid(),
|
||||
id: 'kardinalQuote',
|
||||
value: 'kardinalQuote',
|
||||
},
|
||||
],
|
||||
selectBroker: [
|
||||
|
||||
5
src/core/types/Calculation/options.ts
Normal file
5
src/core/types/Calculation/options.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export type TElementOption = {
|
||||
name: string;
|
||||
value: any;
|
||||
[key: string]: any;
|
||||
};
|
||||
@ -7,9 +7,10 @@ import {
|
||||
import { TValues, ValuesNames } from './values';
|
||||
import { TElements, ElementsNames } from './elements';
|
||||
import { TStatuses, Status } from './statuses';
|
||||
import { TElementOption } from 'core/types/Calculation/options';
|
||||
|
||||
export interface ICalculationStore {
|
||||
options: TElements<any>;
|
||||
options: TElements<TElementOption[]>;
|
||||
applyOptions: (options: TElements<any>) => void;
|
||||
filters: TElements<any>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user