Skip to content

Commit

Permalink
match db updates
Browse files Browse the repository at this point in the history
  • Loading branch information
carkom committed Dec 14, 2023
1 parent a05eca1 commit 257cf46
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 37 deletions.
23 changes: 10 additions & 13 deletions packages/desktop-client/src/components/reports/SaveReport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,21 +148,18 @@ export function SaveReportMenuButton({
savedReport = {
...reportId,
mode: mode,
groupBy: groupBy,
balanceType: balanceType,
empty: Convert(empty),
hidden: Convert(hidden),
uncat: Convert(uncat),
graphType: graphType,
viewLabels: Convert(viewLabels),
viewLegend: Convert(viewLegend),
viewSummary: Convert(viewSummary),
selectedCategories: selectedCategories,
group_by: groupBy,
balance_type: balanceType,
show_empty: Convert(empty),
show_offbudgethidden: Convert(hidden),
show_uncategorized: Convert(uncat),
graph_type: graphType,
selected_categories: selectedCategories,
conditions: filters,
conditionsOp: conditionsOp,
conditions_op: conditionsOp,
name: name,
start: start,
end: end,
start_date: start,
end_date: end,
data: data,
status: 'saved',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,23 +121,23 @@ export default function CustomReportListCards({ reports }) {
{report.props.data.name}
</Block>
<DateRange
start={report.props.data.start}
end={report.props.data.end}
start={report.props.data.start_date}
end={report.props.data.end_date}
/>
</View>
</View>

{report.props.data.data ? (
<ChooseGraph
mode={report.props.data.mode}
graphType={report.props.data.graphType}
start={report.props.data.start}
end={report.props.data.end}
graphType={report.props.data.graph_type}
start={report.props.data.start_date}
end={report.props.data.end_date}
data={report.props.data.data}
compact={true}
groupBy={report.props.data.groupBy}
empty={Convert(report.props.data.empty)}
balanceType={report.props.data.balanceType}
groupBy={report.props.data.group_by}
empty={Convert(report.props.data.show_empty)}
balanceType={report.props.data.balance_type}
style={{ height: 'auto', flex: 1 }}
/>
) : (
Expand Down
28 changes: 12 additions & 16 deletions packages/loot-core/src/server/aql/schema/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,28 +121,24 @@ export const schema = {
conditions: f('json'),
tombstone: f('boolean'),
},
reports: {
custom_reports: {
id: f('id'),
name: f('string'),
start: f('string', { default: '2023-06' }),
end: f('string', { default: '2023-09' }),
start_date: f('string', { default: '2023-06' }),
end_date: f('string', { default: '2023-09' }),
mode: f('string', { default: 'total' }),
groupBy: f('string', { default: 'Category' }),
balanceType: f('string', { default: 'Expense' }),
group_by: f('string', { default: 'Category' }),
balance_type: f('string', { default: 'Expense' }),
interval: f('string', { default: 'Monthly' }),
empty: f('integer', { default: 0 }),
hidden: f('integer', { default: 0 }),
uncat: f('integer', { default: 0 }),
selectedCategories: f('json'),
graphType: f('string', { default: 'BarGraph' }),
viewLegend: f('integer', { default: 0 }),
viewSummary: f('integer', { default: 0 }),
viewLabels: f('integer', { default: 0 }),
show_empty: f('integer', { default: 0 }),
show_offbudgethidden: f('integer', { default: 0 }),
show_uncategorized: f('integer', { default: 0 }),
selected_categories: f('json'),
graph_type: f('string', { default: 'BarGraph' }),
conditions: f('json'),
conditions_op: f('string'),
sort_order: f('float'),
data: f('json'),
colors: f('json'),
metadata: f('json'),
color_scheme: f('json'),
tombstone: f('boolean'),
},
reflect_budgets: {
Expand Down

0 comments on commit 257cf46

Please sign in to comment.