Skip to content
Snippets Groups Projects
Commit a81c73fb authored by sandcha's avatar sandcha
Browse files

Deactivate PLF from reinit input values menu

parent b5f7e89b
Branches
No related tags found
1 merge request!156Désactive le PLF de l'application IR
Pipeline #5287 passed
...@@ -15,9 +15,20 @@ import styles from "./ArticleHeader.module.scss"; ...@@ -15,9 +15,20 @@ import styles from "./ArticleHeader.module.scss";
type Props = { type Props = {
topic: keyof ParametersState; topic: keyof ParametersState;
// "impot_revenu" | "dotations"
// Cf. redux/reducers/parameters/interfaces/index.ts
} }
const mapStateToProps = ({ parameters }: RootState) => ({ displayPLF: !!parameters.plf }); // Met à jour les props d'après l'état de l'application IR ou dotations
const mapStateToProps = ({ parameters }: RootState, ownProps: Props) => (
{ displayPLF: (
!!parameters.plf
&& (
JSON.stringify(parameters.plf[ownProps.topic]) !== JSON.stringify(parameters.base[ownProps.topic])
)
)
}
);
const mapDispatchToProps = (dispatch, ownProps: Props) => ({ const mapDispatchToProps = (dispatch, ownProps: Props) => ({
resetAmendementToBase: () => dispatch(resetAmendementToBase(ownProps.topic)), resetAmendementToBase: () => dispatch(resetAmendementToBase(ownProps.topic)),
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
import { IRState } from "../interfaces"; import { IRState } from "../interfaces";
export const PLF_IR_DEFAULT_STATE: IRState = { export const PLF_IR_DEFAULT_STATE: IRState = {
// PLF = 2022 // PLF 2022 désactivé tant que égal à la loi en vigueur
// dans : redux/reducers/parameters/base/ir.ts
bareme: { bareme: {
seuils: [10225, 26070, 74545, 160336], seuils: [10225, 26070, 74545, 160336],
taux: [11, 30, 41, 45], taux: [11, 30, 41, 45],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment