|
|
@ -61,7 +61,8 @@ const stringifyRolesObj = (roles?: RolesObj | null): string => { |
|
|
|
const getAvailableRollupForUiType = (type: string) => { |
|
|
|
const getAvailableRollupForUiType = (type: string) => { |
|
|
|
if ([UITypes.Year].includes(type as UITypes)) { |
|
|
|
if ([UITypes.Year].includes(type as UITypes)) { |
|
|
|
return ['count', 'min', 'max', 'countDistinct']; |
|
|
|
return ['count', 'min', 'max', 'countDistinct']; |
|
|
|
} else if (isNumericCol(type as UITypes)) { |
|
|
|
} |
|
|
|
|
|
|
|
if (isNumericCol(type as UITypes)) { |
|
|
|
// Number, Currency, Percent, Duration, Rating, Decimal
|
|
|
|
// Number, Currency, Percent, Duration, Rating, Decimal
|
|
|
|
return [ |
|
|
|
return [ |
|
|
|
'sum', |
|
|
|
'sum', |
|
|
@ -73,7 +74,8 @@ const getAvailableRollupForUiType = (type: string) => { |
|
|
|
'sumDistinct', |
|
|
|
'sumDistinct', |
|
|
|
'avgDistinct', |
|
|
|
'avgDistinct', |
|
|
|
]; |
|
|
|
]; |
|
|
|
} else if ( |
|
|
|
} |
|
|
|
|
|
|
|
if ( |
|
|
|
[ |
|
|
|
[ |
|
|
|
UITypes.Date, |
|
|
|
UITypes.Date, |
|
|
|
UITypes.DateTime, |
|
|
|
UITypes.DateTime, |
|
|
@ -82,7 +84,8 @@ const getAvailableRollupForUiType = (type: string) => { |
|
|
|
].includes(type as UITypes) |
|
|
|
].includes(type as UITypes) |
|
|
|
) { |
|
|
|
) { |
|
|
|
return ['count', 'min', 'max', 'countDistinct']; |
|
|
|
return ['count', 'min', 'max', 'countDistinct']; |
|
|
|
} else if ( |
|
|
|
} |
|
|
|
|
|
|
|
if ( |
|
|
|
[ |
|
|
|
[ |
|
|
|
UITypes.SingleLineText, |
|
|
|
UITypes.SingleLineText, |
|
|
|
UITypes.LongText, |
|
|
|
UITypes.LongText, |
|
|
@ -94,15 +97,16 @@ const getAvailableRollupForUiType = (type: string) => { |
|
|
|
].includes(type as UITypes) |
|
|
|
].includes(type as UITypes) |
|
|
|
) { |
|
|
|
) { |
|
|
|
return ['count', 'countDistinct']; |
|
|
|
return ['count', 'countDistinct']; |
|
|
|
} else if ([UITypes.Checkbox].includes(type as UITypes)) { |
|
|
|
} |
|
|
|
|
|
|
|
if ([UITypes.Checkbox].includes(type as UITypes)) { |
|
|
|
return ['count', 'sum']; |
|
|
|
return ['count', 'sum']; |
|
|
|
} else if ([UITypes.Attachment].includes(type as UITypes)) { |
|
|
|
} |
|
|
|
|
|
|
|
if ([UITypes.Attachment].includes(type as UITypes)) { |
|
|
|
return []; |
|
|
|
return []; |
|
|
|
} else if ( |
|
|
|
} |
|
|
|
[UITypes.SingleSelect, UITypes.MultiSelect].includes(type as UITypes) |
|
|
|
if ([UITypes.SingleSelect, UITypes.MultiSelect].includes(type as UITypes)) { |
|
|
|
) { |
|
|
|
|
|
|
|
return ['count', 'countDistinct']; |
|
|
|
return ['count', 'countDistinct']; |
|
|
|
} else { |
|
|
|
} |
|
|
|
return [ |
|
|
|
return [ |
|
|
|
'sum', |
|
|
|
'sum', |
|
|
|
'count', |
|
|
|
'count', |
|
|
@ -113,7 +117,6 @@ const getAvailableRollupForUiType = (type: string) => { |
|
|
|
'sumDistinct', |
|
|
|
'sumDistinct', |
|
|
|
'avgDistinct', |
|
|
|
'avgDistinct', |
|
|
|
]; |
|
|
|
]; |
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const getFileName = ({ name, count, ext }) => |
|
|
|
const getFileName = ({ name, count, ext }) => |
|
|
|