mirror of
https://github.com/actualbudget/actual.git
synced 2026-04-28 18:40:34 -05:00
Update gaps
This commit is contained in:
@@ -35,10 +35,10 @@ import {
|
||||
type CategoryGroupEntity,
|
||||
} from 'loot-core/types/models';
|
||||
|
||||
import { ExpenseCategoryGroupRow } from './ExpenseCategoryGroupRow';
|
||||
import { ExpenseCategoryRow } from './ExpenseCategoryRow';
|
||||
import { ExpenseGroupRow } from './ExpenseGroupRow';
|
||||
import { IncomeCategoryGroupRow } from './IncomeCategoryGroupRow';
|
||||
import { IncomeCategoryRow } from './IncomeCategoryRow';
|
||||
import { IncomeGroupRow } from './IncomeGroupRow';
|
||||
import { MonthsContext } from './MonthsContext';
|
||||
import { separateGroups } from './util';
|
||||
|
||||
@@ -491,7 +491,7 @@ export function BudgetCategories({
|
||||
switch (item.type) {
|
||||
case 'expense-group':
|
||||
return (
|
||||
<ExpenseGroupRow
|
||||
<ExpenseCategoryGroupRow
|
||||
id={item.id}
|
||||
columns={columns}
|
||||
item={item}
|
||||
@@ -548,7 +548,7 @@ export function BudgetCategories({
|
||||
);
|
||||
case 'income-separator':
|
||||
return (
|
||||
<AddGroupButtonRow
|
||||
<AddCategoryGroupButtonRow
|
||||
id="add-group-row"
|
||||
columns={columns}
|
||||
onAddGroup={onAddGroup}
|
||||
@@ -556,7 +556,7 @@ export function BudgetCategories({
|
||||
);
|
||||
case 'income-group':
|
||||
return (
|
||||
<IncomeGroupRow
|
||||
<IncomeCategoryGroupRow
|
||||
id={item.id}
|
||||
columns={columns}
|
||||
item={item}
|
||||
@@ -657,17 +657,17 @@ export function BudgetCategories({
|
||||
|
||||
BudgetCategories.displayName = 'BudgetCategories';
|
||||
|
||||
type AddGroupButtonRowProps = ComponentPropsWithoutRef<
|
||||
type AddCategoryGroupButtonRowProps = ComponentPropsWithoutRef<
|
||||
typeof ReactAriaRow<ColumnDefinition>
|
||||
> & {
|
||||
onAddGroup: () => void;
|
||||
};
|
||||
|
||||
function AddGroupButtonRow({
|
||||
function AddCategoryGroupButtonRow({
|
||||
onAddGroup,
|
||||
style,
|
||||
...props
|
||||
}: AddGroupButtonRowProps) {
|
||||
}: AddCategoryGroupButtonRowProps) {
|
||||
return (
|
||||
<ReactAriaRow
|
||||
data-add-group-button-row="true"
|
||||
|
||||
@@ -67,7 +67,7 @@ export function CategoryGroupNameCell({
|
||||
...hoverVisibleStyle,
|
||||
})}
|
||||
>
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
|
||||
<Button
|
||||
variant="bare"
|
||||
onPress={() => onToggleCollapse(categoryGroup)}
|
||||
@@ -103,10 +103,9 @@ export function CategoryGroupNameCell({
|
||||
<DialogTrigger>
|
||||
<Button
|
||||
variant="bare"
|
||||
className={cx(
|
||||
{ 'hover-visible': !isMenuOpen && !isFocusVisible },
|
||||
css({ marginLeft: 5 }),
|
||||
)}
|
||||
className={cx({
|
||||
'hover-visible': !isMenuOpen && !isFocusVisible,
|
||||
})}
|
||||
onPress={() => {
|
||||
// resetPosition();
|
||||
setIsMenuOpen(true);
|
||||
|
||||
@@ -74,15 +74,16 @@ export function CategoryNameCell({
|
||||
</View>
|
||||
) : (
|
||||
<>
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
||||
<View
|
||||
style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}
|
||||
>
|
||||
<Text>{category.name}</Text>
|
||||
<DialogTrigger>
|
||||
<Button
|
||||
variant="bare"
|
||||
className={cx(
|
||||
{ 'hover-visible': !isMenuOpen && !isFocusVisible },
|
||||
css({ marginLeft: 5 }),
|
||||
)}
|
||||
className={cx({
|
||||
'hover-visible': !isMenuOpen && !isFocusVisible,
|
||||
})}
|
||||
onPress={() => {
|
||||
// resetPosition();
|
||||
setIsMenuOpen(true);
|
||||
|
||||
@@ -13,7 +13,7 @@ import { CategoryGroupBudgetedCell } from './CategoryGroupBudgetedCell';
|
||||
import { CategoryGroupNameCell } from './CategoryGroupNameCell';
|
||||
import { CategoryGroupSpentCell } from './CategoryGroupSpentCell';
|
||||
|
||||
type ExpenseGroupRowProps = ComponentPropsWithoutRef<
|
||||
type ExpenseCategoryGroupRowProps = ComponentPropsWithoutRef<
|
||||
typeof ReactAriaRow<ColumnDefinition>
|
||||
> & {
|
||||
item: {
|
||||
@@ -29,7 +29,8 @@ type ExpenseGroupRowProps = ComponentPropsWithoutRef<
|
||||
onToggleVisibilty: (categoryGroup: CategoryGroupEntity) => void;
|
||||
onApplyBudgetTemplatesInGroup: (categoryGroup: CategoryGroupEntity) => void;
|
||||
};
|
||||
export function ExpenseGroupRow({
|
||||
|
||||
export function ExpenseCategoryGroupRow({
|
||||
item,
|
||||
isCollapsed,
|
||||
onToggleCollapse,
|
||||
@@ -40,7 +41,7 @@ export function ExpenseGroupRow({
|
||||
onApplyBudgetTemplatesInGroup,
|
||||
style,
|
||||
...props
|
||||
}: ExpenseGroupRowProps) {
|
||||
}: ExpenseCategoryGroupRowProps) {
|
||||
return (
|
||||
<ReactAriaRow
|
||||
style={{
|
||||
@@ -16,7 +16,7 @@ import { CategoryGroupNameCell } from './CategoryGroupNameCell';
|
||||
|
||||
import { useSyncedPref } from '@desktop-client/hooks/useSyncedPref';
|
||||
|
||||
type IncomeGroupRowProps = ComponentPropsWithoutRef<
|
||||
type IncomeCategoryGroupRowProps = ComponentPropsWithoutRef<
|
||||
typeof ReactAriaRow<ColumnDefinition>
|
||||
> & {
|
||||
item: {
|
||||
@@ -32,7 +32,8 @@ type IncomeGroupRowProps = ComponentPropsWithoutRef<
|
||||
onToggleVisibilty: (categoryGroup: CategoryGroupEntity) => void;
|
||||
onApplyBudgetTemplatesInGroup: (categoryGroup: CategoryGroupEntity) => void;
|
||||
};
|
||||
export function IncomeGroupRow({
|
||||
|
||||
export function IncomeCategoryGroupRow({
|
||||
item,
|
||||
isCollapsed,
|
||||
onToggleCollapse,
|
||||
@@ -43,7 +44,7 @@ export function IncomeGroupRow({
|
||||
onApplyBudgetTemplatesInGroup,
|
||||
style,
|
||||
...props
|
||||
}: IncomeGroupRowProps) {
|
||||
}: IncomeCategoryGroupRowProps) {
|
||||
const [budgetType = 'rollover'] = useSyncedPref('budgetType');
|
||||
|
||||
return budgetType === 'rollover' ? (
|
||||
Reference in New Issue
Block a user