Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
French Tax and Benefit Tables
baremes-ipp-views
Commits
4c4e5d9d
Commit
4c4e5d9d
authored
Jan 14, 2022
by
Mahdi Ben Jelloul
Browse files
Rename data_parution_jo in official_journal_date
parent
1eda1e27
Changes
6
Hide whitespace changes
Inline
Side-by-side
__tests__/assets/rsa_forfait_logement.json
View file @
4c4e5d9d
...
...
@@ -26,7 +26,7 @@
"description"
:
"Forfait logement (en % du montant forfaitaire du RSA)"
,
"id"
:
"prestations.minima_sociaux.rsa.forfait_logement"
,
"metadata"
:
{
"
date_parution_jo
"
:
{
"
official_journal_date
"
:
{
"2009-06-01"
:
"2009-05-01"
}
}
...
...
__tests__/assets/rsa_maj.json
View file @
4c4e5d9d
...
...
@@ -7,7 +7,7 @@
"2016-01-01"
:
"Décret 2015-1710 du 21/12/2015, art. 2 (crée art. D843-1 du CSS)"
,
"2009-06-01"
:
"Décret 2009-404 du 15/04/2009, art. 2 (modif art. R262-1 du CASF)"
},
"
date_parution_jo
"
:
{
"
official_journal_date
"
:
{
"2016-01-01"
:
"2015-12-22"
,
"2009-06-01"
:
"2009-04-16"
},
...
...
__tests__/assets/rsa_maj_table.json
View file @
4c4e5d9d
...
...
@@ -63,7 +63,7 @@
"rowSpan"
:
2
},
{
"Header"
:
"Parution au JO"
,
"id"
:
"
date_parution_jo
"
,
"id"
:
"
official_journal_date
"
,
"width"
:
0.7
,
"colSpan"
:
1
,
"depth"
:
1
,
...
...
@@ -152,7 +152,7 @@
"rowSpan"
:
2
},
{
"Header"
:
"Parution au JO"
,
"id"
:
"
date_parution_jo
"
,
"id"
:
"
official_journal_date
"
,
"width"
:
0.7
,
"colSpan"
:
1
,
"depth"
:
1
,
...
...
@@ -235,7 +235,7 @@
"rowSpan"
:
2
},
{
"Header"
:
"Parution au JO"
,
"id"
:
"
date_parution_jo
"
,
"id"
:
"
official_journal_date
"
,
"width"
:
0.7
,
"colSpan"
:
1
,
"depth"
:
1
,
...
...
@@ -313,7 +313,7 @@
"value"
:
null
,
"unit"
:
"currency-EUR"
},
"
date_parution_jo
"
:
"2015-12-22"
,
"
official_journal_date
"
:
"2015-12-22"
,
"reference"
:
"Décret 2015-1710 du 21/12/2015, art. 2 (crée art. D843-1 du CSS)"
,
"notes"
:
"Remplacement du RSA activité par la Prime d'activité"
},
{
...
...
@@ -346,7 +346,7 @@
"value"
:
6
,
"unit"
:
"currency-EUR"
},
"
date_parution_jo
"
:
"2009-04-16"
,
"
official_journal_date
"
:
"2009-04-16"
,
"reference"
:
"Décret 2009-404 du 15/04/2009, art. 2 (modif art. R262-1 du CASF)"
}]
}
__tests__/services/tableifier.test.js
View file @
4c4e5d9d
...
...
@@ -42,7 +42,7 @@ it('extractValues can extract dates from a parameter node', () => {
it
(
'
extractValues can extract metadata from a parameter node
'
,
()
=>
{
const
data
=
extractValues
(
rsaForFaitLogement
)
expect
(
data
[
'
date_parution_jo
'
]).
toEqual
({
"
2009-06-01
"
:
"
2009-05-01
"
})
expect
(
data
[
'
official_journal_date
'
]).
toEqual
({
"
2009-06-01
"
:
"
2009-05-01
"
})
});
it
(
'
extractValues can extract dates from a custom parameter node
'
,
()
=>
{
...
...
services/columnBuilder.js
View file @
4c4e5d9d
...
...
@@ -74,7 +74,7 @@ function buildColumn(parameter, lang) {
function
buildMetaDataColumns
(
parameter
,
lang
)
{
const
metadata
=
{
reference
:
{
title
:
msg
.
references
[
lang
],
width
:
1.8
},
date_parution_jo
:
{
title
:
msg
.
parutionJO
[
lang
],
width
:
1
},
official_journal_date
:
{
title
:
msg
.
parutionJO
[
lang
],
width
:
1
},
notes
:
{
title
:
'
Notes
'
,
width
:
3.5
},
}
return
flow
([
...
...
services/tableifier.js
View file @
4c4e5d9d
...
...
@@ -14,7 +14,7 @@ const pick = require('lodash.pick')
const
pickBy
=
require
(
'
lodash.pickby
'
)
const
union
=
require
(
'
lodash.union
'
)
const
METADATA_FIELD_NAMES
=
[
'
date_parution_jo
'
,
'
reference
'
,
'
notes
'
]
const
METADATA_FIELD_NAMES
=
[
'
official_journal_date
'
,
'
reference
'
,
'
notes
'
]
function
extractData
(
parameterNode
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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