Skip to main content
Homepage
Explore
Search or go to…
/
Register
Sign in
Explore
Primary navigation
Project
L
leximpact-socio-fiscal-ui
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
Simulateur socio-fiscal
leximpact-socio-fiscal-ui
Commits
6572367c
Commit
6572367c
authored
Sep 14, 2022
by
Emmanuel Raviart
Browse files
Options
Downloads
Patches
Plain Diff
Display percent in 'Votre réforme column'.
parent
72b1c60e
No related branches found
No related tags found
No related merge requests found
Pipeline
#5913
passed
Sep 14, 2022
Status:
Stage: build
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/lib/components/ReformsChanges.svelte
+9
-2
9 additions, 2 deletions
src/lib/components/ReformsChanges.svelte
src/lib/values.ts
+7
-1
7 additions, 1 deletion
src/lib/values.ts
with
16 additions
and
3 deletions
src/lib/components/ReformsChanges.svelte
+
9
−
2
View file @
6572367c
...
@@ -3,7 +3,11 @@
...
@@ -3,7 +3,11 @@
import
type
{
Writable
}
from
"
svelte/store
"
import
type
{
Writable
}
from
"
svelte/store
"
import
type
{
DisplayMode
}
from
"
$lib/displays
"
import
type
{
DisplayMode
}
from
"
$lib/displays
"
import
{
getParameter
,
rootParameter
}
from
"
$lib/parameters
"
import
{
asValueParameter
,
getParameter
,
rootParameter
,
}
from
"
$lib/parameters
"
import
type
{
ParametricReform
}
from
"
$lib/reforms
"
import
type
{
ParametricReform
}
from
"
$lib/reforms
"
import
{
import
{
ParameterReformChangeType
,
ParameterReformChangeType
,
...
@@ -117,7 +121,10 @@
...
@@ -117,7 +121,10 @@
<span
class=
"bg-le-jaune text-right font-bold"
>
barème modifié
</span>
<span
class=
"bg-le-jaune text-right font-bold"
>
barème modifié
</span>
{
:
else
}
{
:
else
}
<span
class=
"bg-le-jaune text-right font-bold"
<span
class=
"bg-le-jaune text-right font-bold"
>
{
formatValue
(
parameterReform
.
value
)
}
</span
>
{
formatValue
(
parameterReform
.
value
,
asValueParameter
(
parameter
).
unit
,
)
}
</span
>
>
{
/if
}
{
/if
}
</li>
</li>
...
...
...
...
This diff is collapsed.
Click to expand it.
src/lib/values.ts
+
7
−
1
View file @
6572367c
...
@@ -11,7 +11,13 @@ export function valueFormatter(
...
@@ -11,7 +11,13 @@ export function valueFormatter(
:
typeof
baseValue
===
"
boolean
"
:
typeof
baseValue
===
"
boolean
"
?
(
value
:
boolean
)
=>
(
value
?
"
vrai
"
:
"
faux
"
)
?
(
value
:
boolean
)
=>
(
value
?
"
vrai
"
:
"
faux
"
)
:
typeof
baseValue
===
"
number
"
:
typeof
baseValue
===
"
number
"
?
unit
!=
null
&&
unit
.
startsWith
(
"
currency-
"
)
?
unit
===
"
/1
"
// Unit.Rate
?
new
Intl
.
NumberFormat
(
"
fr-FR
"
,
{
maximumFractionDigits
:
2
,
minimumFractionDigits
:
2
,
style
:
"
percent
"
,
}).
format
:
unit
!=
null
&&
unit
.
startsWith
(
"
currency-
"
)
?
new
Intl
.
NumberFormat
(
"
fr-FR
"
,
{
?
new
Intl
.
NumberFormat
(
"
fr-FR
"
,
{
currency
:
unit
.
replace
(
/^currency-/
,
""
),
currency
:
unit
.
replace
(
/^currency-/
,
""
),
maximumFractionDigits
:
0
,
maximumFractionDigits
:
0
,
...
...
...
...
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