Skip to content

Commit

Permalink
merge fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
carkom committed May 14, 2024
1 parent 01a106c commit 0722eeb
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type PayloadItem = {
type CustomTooltipProps = {
active?: boolean;
payload?: PayloadItem[];
balanceTypeOp?: string;
balanceTypeOp?: 'totalAssets' | 'totalDebts' | 'totalTotals';
yAxis?: string;
};

Expand Down Expand Up @@ -136,7 +136,7 @@ type BarGraphProps = {
data: DataEntity;
filters: RuleConditionEntity[];
groupBy: string;
balanceTypeOp: string;
balanceTypeOp: 'totalAssets' | 'totalDebts' | 'totalTotals';
compact?: boolean;
viewLabels: boolean;
showHiddenCategories?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ type DonutGraphProps = {
data: DataEntity;
filters: RuleConditionEntity[];
groupBy: string;
balanceTypeOp: string;
balanceTypeOp: 'totalAssets' | 'totalDebts' | 'totalTotals';
compact?: boolean;
viewLabels: boolean;
showHiddenCategories?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ type LineGraphProps = {
filters: RuleConditionEntity[];
groupBy: string;
compact?: boolean;
balanceTypeOp: string;
balanceTypeOp: 'totalAssets' | 'totalDebts' | 'totalTotals';
showHiddenCategories?: boolean;
showOffBudget?: boolean;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ type StackedBarGraphProps = {
groupBy: string;
compact?: boolean;
viewLabels: boolean;
balanceTypeOp: string;
balanceTypeOp: 'totalAssets' | 'totalDebts' | 'totalTotals';
showHiddenCategories?: boolean;
showOffBudget?: boolean;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type showActivityProps = {
navigate: NavigateFunction;
categories: { list: CategoryEntity[]; grouped: CategoryGroupEntity[] };
accounts: AccountEntity[];
balanceTypeOp: string;
balanceTypeOp: 'totalAssets' | 'totalDebts' | 'totalTotals';
filters: RuleConditionEntity[];
showHiddenCategories: boolean;
showOffBudget: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function calculateLegend(
calcDataFiltered: GroupedEntity[],
groupBy: string,
graphType?: string,
balanceTypeOp?: keyof GroupedEntity,
balanceTypeOp?: 'totalAssets' | 'totalDebts' | 'totalTotals',
): LegendEntity[] {
const colorScale = getColorScale('qualitative');
const chooseData =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function filterEmptyRows({
}: {
showEmpty: boolean;
data: GroupedEntity;
balanceTypeOp?: keyof GroupedEntity;
balanceTypeOp?: 'totalAssets' | 'totalDebts' | 'totalTotals';
}): boolean {
let showHide: boolean;
if (balanceTypeOp === 'totalTotals') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,11 @@ export function createGroupedSpreadsheet({
totalDebts: integerToAmount(totalDebts),
totalTotals: integerToAmount(totalAssets + totalDebts),
intervalData,
categories: stackedCategories.filter(i =>
filterEmptyRows({ showEmpty, data: i, balanceTypeOp }),
),
categories:
stackedCategories &&
stackedCategories.filter(i =>
filterEmptyRows({ showEmpty, data: i, balanceTypeOp }),
),
};
},
[startDate, endDate],
Expand Down

0 comments on commit 0722eeb

Please sign in to comment.