Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
leximpact-client
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
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leximpact
Simulateur dotations aux communes
leximpact-client
Commits
1d346add
Commit
1d346add
authored
Aug 18, 2020
by
Loïc Poullain
Browse files
Options
Downloads
Patches
Plain Diff
Do not start IR simulation on dotations page
parent
43797435
No related branches found
No related tags found
1 merge request
!82
Ajouter faux PLF
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
components/common/simulation-page/SimulationPage.tsx
+0
-5
0 additions, 5 deletions
components/common/simulation-page/SimulationPage.tsx
components/common/simulation-page/index.ts
+1
-20
1 addition, 20 deletions
components/common/simulation-page/index.ts
pages/ir.tsx
+10
-3
10 additions, 3 deletions
pages/ir.tsx
with
11 additions
and
28 deletions
components/common/simulation-page/SimulationPage.tsx
+
0
−
5
View file @
1d346add
...
...
@@ -48,11 +48,6 @@ export class SimulationPage extends PureComponent<Props, State> {
this
.
state
=
{
indextab
:
0
};
}
componentDidMount
()
{
const
{
initializeAppllicationStoreFromAPI
}
=
this
.
props
;
initializeAppllicationStoreFromAPI
();
}
handleOnChangeIndex
=
(
event
,
indextab
)
=>
{
this
.
setState
({
indextab
});
};
...
...
This diff is collapsed.
Click to expand it.
components/common/simulation-page/index.ts
+
1
−
20
View file @
1d346add
...
...
@@ -2,10 +2,6 @@ import withWidth from "@material-ui/core/withWidth";
import
{
connect
}
from
"
react-redux
"
;
import
{
compose
}
from
"
redux
"
;
import
{
fetchMetadataCasTypes
,
simulateCasTypes
,
}
from
"
../../../redux/actions
"
;
import
{
SimulationPage
}
from
"
./SimulationPage
"
;
const
mapStateToProps
=
(
state
,
{
width
})
=>
{
...
...
@@ -13,22 +9,7 @@ const mapStateToProps = (state, { width }) => {
return
{
useMobileView
};
};
const
mapDispatchToProps
=
dispatch
=>
({
initializeAppllicationStoreFromAPI
:
()
=>
{
// rempli le store de l'application avec les données
// provenant de l'API
dispatch
(
fetchMetadataCasTypes
()).
then
(()
=>
{
// lance le calcul des cas types la premiere fois
// que le reformeur s'affiche
dispatch
(
simulateCasTypes
());
});
},
});
export
default
compose
(
withWidth
(),
connect
(
mapStateToProps
,
mapDispatchToProps
,
),
connect
(
mapStateToProps
),
)(
SimulationPage
);
This diff is collapsed.
Click to expand it.
pages/ir.tsx
+
10
−
3
View file @
1d346add
...
...
@@ -13,7 +13,8 @@ import { Articles, CartesImpact as ImpactCards } from "../components/ir";
import
PopinManager
from
"
../components/PopinManager
"
;
import
withRoot
from
"
../lib/withRoot
"
;
import
{
disabledEtat
,
fetchSimPop
,
showAddCasTypesPopin
,
simulateCasTypes
,
disabledEtat
,
fetchMetadataCasTypes
,
fetchSimPop
,
showAddCasTypesPopin
,
simulateCasTypes
,
}
from
"
../redux/actions
"
;
// eslint-disable-next-line no-unused-vars
import
{
RootState
}
from
"
../redux/reducers
"
;
...
...
@@ -23,6 +24,7 @@ const mapStateToProps = ({ token }: RootState) => ({
});
const
mapDispatchToProps
=
dispatch
=>
({
init
:
()
=>
dispatch
(
fetchMetadataCasTypes
()).
then
(()
=>
dispatch
(
simulateCasTypes
())),
showAddCasTypesPopin
:
()
=>
dispatch
(
showAddCasTypesPopin
()),
simulateCasTypes
:
()
=>
{
dispatch
(
simulateCasTypes
());
...
...
@@ -51,7 +53,12 @@ type Props = PropsFromRedux & {
}
class
IndexPage
extends
PureComponent
<
Props
>
{
class
IRPage
extends
PureComponent
<
Props
>
{
componentDidMount
()
{
const
{
init
}
=
this
.
props
;
init
();
}
render
()
{
const
{
// eslint-disable-next-line no-shadow
...
...
@@ -111,4 +118,4 @@ export default flow(
withRouter
,
withRoot
,
connector
,
)(
I
ndex
Page
);
)(
I
R
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