Add components factory

This commit is contained in:
Фролов 2021-07-29 11:38:09 +05:00
parent 611244edee
commit a799904c5e

View File

@ -1,14 +1,14 @@
export const makeColumn = (title, key, other) => ({ export const makeColumn = (title:string, key:string, other?:any) => ({
title: title, title: title,
key: key, key: key,
dataIndex: key, dataIndex: key,
...other, ...other,
}); });
export const makeColumnsPlanFact = (title, keyPlan, keyFact, gruopOther) => export const makeColumnsPlanFact = (title:string, keyPlan:string, keyFact?:string, gruopOther?:any) =>
{ {
let keyPlanLocal = keyPlan let keyPlanLocal = keyPlan
let keyFactLocal = keyFact let keyFactLocal = keyFact ?? ''
if(!keyFact){ if(!keyFact){
keyPlanLocal = keyPlan + 'Plan' keyPlanLocal = keyPlan + 'Plan'