Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nicolas Frandeboeuf
kresus
Commits
67624fad
Commit
67624fad
authored
Dec 15, 2020
by
Nicolas Frandeboeuf
Browse files
Migrate budgets list to Typescript
parent
f36d86c4
Pipeline
#378081
passed with stage
in 4 minutes and 24 seconds
Changes
2
Pipelines
2
Expand all
Hide whitespace changes
Inline
Side-by-side
client/components/budget/index.
js
→
client/components/budget/index.
tsx
View file @
67624fad
This diff is collapsed.
Click to expand it.
client/store/budgets.ts
View file @
67624fad
...
...
@@ -108,13 +108,15 @@ function reduceFetch(state: BudgetState, action: Action<FetchBudgetParams>): Bud
// Set the selected period for budgets.
export
function
setSelectedPeriod
(
year
:
number
,
month
:
number
)
{
return
(
dispatch
:
Dispatch
,
getState
:
GetStateType
):
Promise
<
void
>
|
void
=>
{
return
(
dispatch
:
Dispatch
,
getState
:
GetStateType
):
Promise
<
void
>
=>
{
const
action
=
setPeriodAction
({
year
,
month
});
dispatch
(
action
);
if
(
!
fromSelectedPeriod
(
getState
().
budgets
))
{
return
fetchFromYearAndMonth
(
year
,
month
)(
dispatch
);
}
return
Promise
.
resolve
();
};
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment