Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
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
?
Snippets
Groups
Projects
Show more breadcrumbs
leximpact
Simulateur socio-fiscal
leximpact-socio-fiscal-ui
Commits
d24f805a
Commit
d24f805a
authored
Sep 13, 2023
by
Emmanuel Raviart
Committed by
Toufic Batache
Sep 21, 2023
Browse files
Options
Downloads
Patches
Plain Diff
WIP
parent
4d46ffbf
No related branches found
No related tags found
1 merge request
!174
Ajout des demandes du calcul budget
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/lib/budgets.ts
+3
-3
3 additions, 3 deletions
src/lib/budgets.ts
src/lib/components/BudgetConnexionModal.svelte
+52
-94
52 additions, 94 deletions
src/lib/components/BudgetConnexionModal.svelte
with
55 additions
and
97 deletions
src/lib/budgets.ts
+
3
−
3
View file @
d24f805a
...
...
@@ -66,14 +66,14 @@ export interface BudgetQuantileByCalculationName {
}
export
interface
BudgetSimulation
{
errors
:
unknown
[]
result
:
{
errors
?
:
unknown
[]
result
?
:
{
amendement
:
BudgetCalculationResult
base
:
BudgetCalculationResult
plf
:
BudgetCalculationResult
revaluation
:
BudgetCalculationResult
}
hash
:
string
hash
?
:
string
isPublic
:
boolean
}
...
...
This diff is collapsed.
Click to expand it.
src/lib/components/BudgetConnexionModal.svelte
+
52
−
94
View file @
d24f805a
...
...
@@ -6,6 +6,8 @@
Transition
,
TransitionChild
,
}
from
"
@rgossiaux/svelte-headlessui
"
import
{
getContext
}
from
"
svelte
"
import
type
{
Writable
}
from
"
svelte/store
"
import
{
browser
}
from
"
$app/environment
"
import
{
goto
}
from
"
$app/navigation
"
...
...
@@ -17,14 +19,15 @@
}
from
"
$lib/matomo
"
import
type
{
ParametricReform
}
from
"
$lib/reforms
"
import
type
{
CachedSimulation
}
from
"
$lib/simulations
"
import
{
budgetEditableParametersName
}
from
"
$lib/variables
"
export
let
displayMode
:
DisplayMode
export
let
isOpen
=
false
const
budgetSimulation
=
getContext
(
"
budgetSimulation
"
)
as
Writable
<
BudgetSimulation
|
undefined
>
let
cachedSimulations
:
CachedSimulation
[]
=
[]
const
parametricReform
=
getContext
(
"
parametricReform
"
,
)
as
Writable
<
ParametricReform
>
$
:
if
(
browser
&&
isOpen
)
{
fetchCachedSimulations
()
...
...
@@ -173,7 +176,8 @@
</div>
<div
class=
"flex flex-col gap-10 bg-gray-100 p-5 border-t mt-10"
>
<div>
{
#if
$page.data.canDemandBudgetSimulation
}
<section>
<h2
class=
"w-full text-left text-2xl font-bold"
>
Demandez le calcul de votre réforme au service
LexImpact
:
...
...
@@ -190,34 +194,8 @@
<div
class=
"flex md:flex-row flex-col w-full px-0 md:px-10 items-center gap-5"
>
==== BASE ====
Voir la simulation
<iconify-icon
class=
"align-[-0.25rem] text-xl"
icon=
"ri-arrow-right-line"
/>
</a>
</div>
{
/if
}
<div
class=
"flex flex-col gap-10 bg-gray-100 p-5 border-t mt-10"
>
{
#if
currentSimulationCache === undefined
}
<div>
<h2
class=
"w-full text-left text-2xl font-bold"
>
Demandez le calcul de votre réforme au service
LexImpact
:
</h2>
<p
class=
"w-full text-base font-normal leading-6 mt-1.5 mb-5"
>
Après vérification par nos services, si elle est calculable
avec les données dont nous disposons et répond au secret
statistique, la simulation sera rendue publique. Vous serez
alors informé par e-mail :
</p>
<span
class=
"font-bold text-sm py-2 pl-10"
>
Votre adresse e-mail :
</span
>
<div
class=
"flex md:flex-row flex-col w-full px-0 md:px-10 items-center gap-5"
====
BASE =
===
class=
"flex rounded-t-md border-b-2 border-b-black bg-white px-2 grow max-w-lg"
>
<input
autocomplete=
"off"
...
...
@@ -227,40 +205,20 @@
type=
"search"
/>
</div>
<div>
<a
class=
"flex items-center gap-2 py-2 px-5 shadow-lg bg-white hover:bg-gray-100 active:bg-gray-200 rounded-md border-2 border-le-bleu text-le-bleu text-sm font-bold tracking-[0.085em] uppercase"
data-sveltekit-reload
href=
{
`
/
auth
/
login
?
redirect
=
$
{
encodeURIComponent
(
$page
.
url
.
toString
(),
)
}
`}
title=
"Envoyer votre réforme budgétaire avec cet e-mail"
>
Demander
le
calcul
<iconify-icon
class=
"ml-2 align-[-0.25rem] text-xl"
icon=
"ri-send-plane-2-line"
/>
==== BASE ====
</div>
<div>
<a
<button
class=
"flex items-center gap-2 py-2 px-5 shadow-lg bg-white hover:bg-gray-100 active:bg-gray-200 rounded-md border-2 border-le-bleu text-le-bleu text-sm font-bold tracking-[0.085em] uppercase"
data-sveltekit-reload
href=
{
`/auth/login?redirect=$
{
encodeURIComponent(
$page.url.toString(),
)
}
`}
title=
"Envoyer votre réforme budgétaire avec cet e-mail"
type=
"submit"
>
Demander
le
calcul
<iconify-icon
class=
"ml-2 align-[-0.25rem] text-xl"
icon=
"ri-send-plane-2-line"
/>
</a>
</div>
</div>
==== BASE ====
</div>
</button>
</div>
</section>
{
/if
}
{
#if
cachedSimulations !== undefined && cachedSimulations.length > 0
}
<div
class=
"flex flex-col items-center"
>
<h2
class=
"w-full text-left text-xl font-bold"
>
...
...
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