Skip to main content
Homepage
Explore
Search or go to…
/
Register
Sign in
Explore
Primary navigation
Project
É
Échéancier
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
?
Collapse sidebar
Snippets
Groups
Projects
Show more breadcrumbs
leximpact
Baromètre de suivi application des lois
Échéancier
Commits
92049d83
Commit
92049d83
authored
Jun 15, 2024
by
Emmanuel Raviart
Browse files
Options
Downloads
Patches
Plain Diff
Don't fail when there is a discontinuity of legislatures
parent
834cff73
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/common/src/mesures.ts
+11
-11
11 additions, 11 deletions
packages/common/src/mesures.ts
with
11 additions
and
11 deletions
packages/common/src/mesures.ts
+
11
−
11
View file @
92049d83
...
@@ -199,19 +199,19 @@ export function getOrganeAtDate(
...
@@ -199,19 +199,19 @@ export function getOrganeAtDate(
organes
:
Organe
[],
organes
:
Organe
[],
date
:
string
,
date
:
string
,
):
Organe
|
undefined
{
):
Organe
|
undefined
{
let
found
:
Organe
|
undefined
=
undefined
// Sometimes, for example for the legislatures during the dissolution of 2024-06-09,
for
(
const
organe
of
organes
)
{
// there is a lapse of days between the end of an organe and the creation of a new one.
if
((
organe
.
viMoDe
.
dateDebut
as
unknown
as
string
)
>
date
)
{
// When it occurs, assume that the previous organe continues until the next one begins.
break
// => Don't use organe.viMoDe.dateFin.
}
//
if
(
// Note: This function assumes that organes are sorted in chronological order of
organe
.
viMoDe
.
date
Fin
===
undefined
||
//
organe.viMoDe.date
Debut.
(
organe
.
viMoDe
.
dateFin
as
unknown
as
string
)
>=
date
for
(
const
organe
of
organes
.
reverse
())
{
)
{
if
((
organe
.
viMoDe
.
dateDebut
as
unknown
as
string
)
<=
date
)
{
found
=
organe
return
organe
}
}
}
}
return
fo
und
return
und
efined
}
}
export
function
hashEcheancier
(
echeancier
:
Echeancier
):
string
{
export
function
hashEcheancier
(
echeancier
:
Echeancier
):
string
{
...
...
...
...
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