export const makeColumn = (title:string, key:string, other?:any) => ({ title: title, key: key, dataIndex: key, ...other, }) export const makeColumnsPlanFact = (title:string, keyPlan:string, keyFact?:string, gruopOther?:any) => { let keyPlanLocal = keyPlan let keyFactLocal = keyFact ?? '' if(!keyFact){ keyPlanLocal = keyPlan + 'Plan' keyFactLocal = keyPlan + 'Fact' } return { title: title, ...gruopOther, children: [ makeColumn('план', keyPlanLocal), makeColumn('факт', keyFactLocal), ] } }