Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
actual-vt-capstone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danieljk
actual-vt-capstone
Commits
ff70c654
Unverified
Commit
ff70c654
authored
1 year ago
by
Neil
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Custom Reports Error Catch (#2492)
* Error Catch * notes * fixes
parent
586a2696
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/desktop-client/src/components/reports/reports/CustomReportListCards.tsx
+29
-13
29 additions, 13 deletions
.../src/components/reports/reports/CustomReportListCards.tsx
upcoming-release-notes/2492.md
+6
-0
6 additions, 0 deletions
upcoming-release-notes/2492.md
with
35 additions
and
13 deletions
packages/desktop-client/src/components/reports/reports/CustomReportListCards.tsx
+
29
−
13
View file @
ff70c654
import
React
,
{
createRef
,
useMemo
,
useState
}
from
'
react
'
;
import
{
ErrorBoundary
}
from
'
react-error-boundary
'
;
import
{
send
,
sendCatch
}
from
'
loot-core/platform/client/fetch/index
'
;
import
{
type
CustomReportEntity
}
from
'
loot-core/types/models/reports
'
;
import
{
styles
}
from
'
../../../style
'
;
import
{
styles
}
from
'
../../../style
/index
'
;
import
{
theme
}
from
'
../../../style/theme
'
;
import
{
Block
}
from
'
../../common/Block
'
;
import
{
Menu
}
from
'
../../common/Menu
'
;
...
...
@@ -56,6 +57,19 @@ function index(data: CustomReportEntity[]): { [key: string]: boolean }[] {
},
[]);
}
function
ErrorFallback
()
{
return
(
<>
<
div
>
<
br
/>
</
div
>
<
Text
style
=
{
{
...
styles
.
mediumText
,
color
:
theme
.
errorText
}
}
>
There was a problem loading your report
</
Text
>
</>
);
}
export
function
CustomReportListCards
({
reports
,
}:
{
...
...
@@ -193,18 +207,20 @@ export function CustomReportListCards({
</
View
>
{
report
.
data
?
(
<
ChooseGraph
startDate
=
{
report
.
startDate
}
endDate
=
{
report
.
endDate
}
data
=
{
report
.
data
}
mode
=
{
report
.
mode
}
graphType
=
{
report
.
graphType
}
balanceType
=
{
report
.
balanceType
}
groupBy
=
{
report
.
groupBy
}
interval
=
{
report
.
interval
}
compact
=
{
true
}
style
=
{
{
height
:
'
auto
'
,
flex
:
1
}
}
/>
<
ErrorBoundary
FallbackComponent
=
{
ErrorFallback
}
>
<
ChooseGraph
startDate
=
{
report
.
startDate
}
endDate
=
{
report
.
endDate
}
data
=
{
report
.
data
}
mode
=
{
report
.
mode
}
graphType
=
{
report
.
graphType
}
balanceType
=
{
report
.
balanceType
}
groupBy
=
{
report
.
groupBy
}
interval
=
{
report
.
interval
}
compact
=
{
true
}
style
=
{
{
height
:
'
auto
'
,
flex
:
1
}
}
/>
</
ErrorBoundary
>
)
:
(
<
LoadingIndicator
/>
)
}
...
...
This diff is collapsed.
Click to expand it.
upcoming-release-notes/2492.md
0 → 100644
+
6
−
0
View file @
ff70c654
---
category
:
Bugfix
authors
:
[
carkom
]
---
Error catch for reports overview page.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment