Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
leximpact-budget-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
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
leximpact
leximpact-budget-ui
Commits
86ea4f39
Commit
86ea4f39
authored
Oct 7, 2021
by
Emmanuel Raviart
Browse files
Options
Downloads
Patches
Plain Diff
Remove non-budget code.
parent
269aa804
No related branches found
No related tags found
No related merge requests found
Pipeline
#991
skipped
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/lib/components/variables/VariableReferredInputs.svelte
+0
-137
0 additions, 137 deletions
src/lib/components/variables/VariableReferredInputs.svelte
src/routes/__layout.svelte
+0
-5
0 additions, 5 deletions
src/routes/__layout.svelte
with
0 additions
and
142 deletions
src/lib/components/variables/VariableReferredInputs.svelte
deleted
100644 → 0
+
0
−
137
View file @
269aa804
<script
lang=
"ts"
>
import
type
{
Variable
}
from
"
@openfisca/json-model
"
import
{
getVariableFormula
}
from
"
@openfisca/json-model
"
import
type
{
Situation
}
from
"
$lib/situations
"
import
VariableInput
from
"
./VariableInput.svelte
"
export
let
date
:
string
export
let
inputInstantsByVariableName
:
{
[
name
:
string
]:
Set
<
string
>
}
export
let
inputs
:
Variable
[]
export
let
situation
:
Situation
export
let
variable
:
Variable
export
let
year
:
number
let
openDirectInputs
=
true
$
:
directVariablesName
=
new
Set
(
getVariableFormula
(
variable
,
date
)?.
variables
??
[],
)
$
:
directInputs
=
inputs
.
filter
((
input
)
=>
directVariablesName
.
has
(
input
.
name
),
)
$
:
openAllInputs
=
directInputs
.
length
===
0
</script>
<h2
class=
"font-bold text-xl pt-3 pb-2"
>
Définir d'autres caractéristiques
<br
/>
influentes sur :
</h2>
<h1
class=
"bg-le-gris-dispositif-light font-serif text-center mb-3 p-2 rounded-md text-lg"
>
<p
class=
"font-medium"
>
{
variable
.
label
??
variable
.
name
}
</p>
<a
class=
"mx-1 py-1 underline hover:text-le-bleu bg text-gray-600 text-sm pl-5"
href=
"/variables/{variable.name}"
>
Source
</a
>
</h1>
{
#if
directInputs
.
length
>
0
}
<section
class=
"bg-gray-100 pb-3 mb-3"
>
<h2
class=
"text-gray-500 flex font-medium tracking-wide justify-between p-2 text-lg"
>
<span>
Caractéristiques écrites dans la formule du dispositif
</span>
<button
on:click=
{
()
=>
(
openDirectInputs
=
!
openDirectInputs
)
}
>
{
#if
openDirectInputs
}
<!-- Material Icons name: Expand Less -->
<svg
aria-hidden=
"true"
class=
"block h-6 stroke-current w-6"
fill=
"black"
viewBox=
"0 0 24 24"
xmlns=
"http://www.w3.org/2000/svg"
><path
d=
"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"
/></svg
>
{
:
else
}
<!-- Material Icons name: Expand More -->
<svg
aria-hidden=
"true"
class=
"block h-6 stroke-current w-6"
fill=
"black"
viewBox=
"0 0 24 24"
xmlns=
"http://www.w3.org/2000/svg"
><path
d=
"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"
/></svg
>
{
/if
}
</button>
</h2>
{
#if
openDirectInputs
}
<ul>
{
#each
directInputs
as
input
}
<li>
<VariableInput
bind:inputInstantsByVariableName
bind:situation
variable=
{
input
}
{
year
}
/>
</li>
{
/each
}
</ul>
{
/if
}
</section>
{
/if
}
{
#if
inputs
.
length
>
0
}
<section
class=
"bg-gray-100 pb-3 mb-3"
>
<h2
class=
" text-gray-500 flex font-medium tracking-wide justify-between p-2 text-lg"
>
<span>
Caractéristiques directement influentes
</span>
<button
on:click=
{
()
=>
(
openAllInputs
=
!
openAllInputs
)
}
>
{
#if
openAllInputs
}
<!-- Material Icons name: Expand Less -->
<svg
aria-hidden=
"true"
class=
"block h-6 fill-current stroke-current text-gray-500 w-6"
viewBox=
"0 0 24 24"
xmlns=
"http://www.w3.org/2000/svg"
><path
d=
"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"
/></svg
>
{
:
else
}
<!-- Material Icons name: Expand More -->
<svg
aria-hidden=
"true"
class=
"block h-6 fill-current stroke-current text-gray-500 w-6"
viewBox=
"0 0 24 24"
xmlns=
"http://www.w3.org/2000/svg"
><path
d=
"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"
/></svg
>
{
/if
}
</button>
</h2>
{
#if
openAllInputs
}
<ul>
{
#each
inputs
as
input
}
<li>
<VariableInput
bind:inputInstantsByVariableName
bind:situation
variable=
{
input
}
{
year
}
/>
</li>
{
/each
}
</ul>
{
/if
}
</section>
{
/if
}
This diff is collapsed.
Click to expand it.
src/routes/__layout.svelte
+
0
−
5
View file @
86ea4f39
...
...
@@ -13,14 +13,9 @@
buildDecompositionByNameFromCore
,
decompositionCoreByName
,
}
from
"
$lib/decompositions
"
import
{
entityByKey
}
from
"
$lib/entities
"
import
type
{
Reform
}
from
"
$lib/reforms
"
import
type
{
Situation
}
from
"
$lib/situations
"
import
type
{
VariableValues
}
from
"
$lib/variables
"
const
billName
:
Writable
<
string
|
undefined
>
=
writable
(
"
PLF LFI
"
)
setContext
(
"
billName
"
,
billName
)
const
decompositionByName
=
writable
(
buildDecompositionByNameFromCore
(
decompositionCoreByName
),
)
...
...
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