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
f506cda9
Commit
f506cda9
authored
3 years ago
by
Dorine Lambinet
Browse files
Options
Downloads
Patches
Plain Diff
crée le ticket de caisse du carburant
parent
a8a3fcee
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!89
Ajout UI TICPE - PEPA - TO-DE
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/lib/components/test_cases/TestCaseView.svelte
+193
-93
193 additions, 93 deletions
src/lib/components/test_cases/TestCaseView.svelte
tailwind.config.cjs
+1
-0
1 addition, 0 deletions
tailwind.config.cjs
with
194 additions
and
93 deletions
src/lib/components/test_cases/TestCaseView.svelte
+
193
−
93
View file @
f506cda9
...
@@ -38,6 +38,18 @@
...
@@ -38,6 +38,18 @@
const
evaluationByNameArray
=
getContext
(
"
evaluationByNameArray
"
)
as
Writable
<
const
evaluationByNameArray
=
getContext
(
"
evaluationByNameArray
"
)
as
Writable
<
EvaluationByName
[]
EvaluationByName
[]
>
>
const
euroAmountFormatter
=
new
Intl
.
NumberFormat
(
"
fr-FR
"
,
{
currency
:
"
EUR
"
,
maximumFractionDigits
:
0
,
minimumFractionDigits
:
0
,
style
:
"
currency
"
,
})
const
oilPriceAmountFormatter
=
new
Intl
.
NumberFormat
(
"
fr-FR
"
,
{
currency
:
"
EUR
"
,
maximumFractionDigits
:
2
,
minimumFractionDigits
:
2
,
style
:
"
currency
"
,
})
const
parametricReform
=
getContext
(
const
parametricReform
=
getContext
(
"
parametricReform
"
,
"
parametricReform
"
,
)
as
Writable
<
ParametricReform
>
)
as
Writable
<
ParametricReform
>
...
@@ -140,13 +152,14 @@
...
@@ -140,13 +152,14 @@
{
/if}
{
/if}
<!--
Impacts
et
waterfall
-->
<!--
Impacts
et
waterfall
-->
<
div
<
div
class
=
"
{
displayMode.compact
class
=
"
{
displayMode.compact
? 'w-full'
? 'w-full'
: 'w-10/12 md:w-11/12'
}
rounded-b-lg bg-white px-1 md:px-3"
: 'w-10/12 md:w-11/12'
}
rounded-b-lg bg-white px-1 md:px-3"
>
>
<div
<div
class=
"relative flex-col border-gray-400 p-3 pb-5"
class=
"relative flex-col border-gray-400 p
x
-3 pb-5"
id=
"situation_{situationIndex}_totalimpact"
id=
"situation_{situationIndex}_totalimpact"
>
>
{
#if
Object.values($calculationByName).filter((calculation) => calculation.running && (calculation.situationIndex === undefined || calculation.situationIndex === situationIndex)).length > 0
}
{
#if
Object.values($calculationByName).filter((calculation) => calculation.running && (calculation.situationIndex === undefined || calculation.situationIndex === situationIndex)).length > 0
}
...
@@ -154,6 +167,8 @@
...
@@ -154,6 +167,8 @@
<Spinner
/>
<Spinner
/>
</div>
</div>
{
/if
}
{
/if
}
<div
class=
"flex justify-between gap-4"
>
<div
class=
"w-1/2 pt-3"
>
{
#if
!displayMode.compact || (displayMode.compact && displayMode.parametersVariableName === undefined)
}
{
#if
!displayMode.compact || (displayMode.compact && displayMode.parametersVariableName === undefined)
}
<div
<div
class=
"flex justify-between gap-4"
class=
"flex justify-between gap-4"
...
@@ -241,14 +256,16 @@
...
@@ -241,14 +256,16 @@
amendment:
amendment:
Object.keys($parametricReform).length === 0
Object.keys($parametricReform).length === 0
? undefined
? undefined
: evaluationByName[displayMode.parametersVariableName]
: evaluationByName[
?.calculationEvaluationByName[
"
amendment
"
]
displayMode.parametersVariableName
]?.calculationEvaluationByName[
"
amendment
"
]
?.deltaAtVectorIndex ?? 0,
?.deltaAtVectorIndex ?? 0,
bill:
bill:
$billName === undefined
$billName === undefined
? undefined
? undefined
: evaluationByName[displayMode.parametersVariableName]
: evaluationByName[
?.calculationEvaluationByName[
"
bill
"
]
displayMode.parametersVariableName
]?.calculationEvaluationByName[
"
bill
"
]
?.deltaAtVectorIndex ?? 0,
?.deltaAtVectorIndex ?? 0,
law:
law:
evaluationByName[displayMode.parametersVariableName]
evaluationByName[displayMode.parametersVariableName]
...
@@ -260,6 +277,89 @@
...
@@ -260,6 +277,89 @@
</div>
</div>
{
/if
}
{
/if
}
</div>
</div>
<div
class=
"w-1/2"
>
{
#if
displayMode.parametersVariableName ===
"
aefa
"
}
<div
class=
" bg-slate-50 p-2 pb-4 shadow-md"
>
<h3
class=
"mb-2 border-b border-black pb-2 text-center font-black uppercase"
>
Budget Carburant
</h3>
<table
class=
"w-full border-b border-dashed border-black font-mono text-xs"
>
<tbody>
<tr>
<td
class=
""
>
Type
:
</td>
<td
class=
"text-right"
>
Sans Plomb 95
</td>
<td
class=
""
>
<button
class=
"inline-flex items-center text-xs text-gray-500 hover:text-le-bleu"
on:click=
{
() =>
dispatch(
"
changeTestCaseToEditIndex
"
,
situationIndex,
)
}
title=
"Éditer ce cas type"
id=
"situation_{situationIndex}_edit"
>
<Icon
icon=
"ri-pencil-fill"
class=
"h-5 w-5"
/>
</button></td
>
</tr>
<tr>
<td
class=
""
>
Prix
:
</td>
<td
class=
"text-right"
>
{
oilPriceAmountFormatter.format(
"
2.2
"
)
}
/L.
</td
>
<td
class=
""
>
<button
class=
"inline-flex items-center text-xs text-gray-500 hover:text-le-bleu"
on:click=
{
() =>
dispatch(
"
changeTestCaseToEditIndex
"
,
situationIndex,
)
}
title=
"Éditer ce cas type"
id=
"situation_{situationIndex}_edit"
>
<Icon
icon=
"ri-pencil-fill"
class=
"h-5 w-5"
/>
</button></td
>
</tr>
</tbody>
</table>
<table
class=
"mt-4 w-full border-b border-dashed border-black font-mono text-sm"
>
<tbody>
<tr>
<td
class=
"text-base"
>
TOTAL TTC
</td>
<td
class=
"text-right text-lg"
>
{
euroAmountFormatter.format(
"
7039
"
)
}
/an
</td
>
</tr>
<tr>
<td
class=
"text-xs"
>
dont TVA
:
</td>
<td
class=
"text-right"
>
{
euroAmountFormatter.format(
"
230
"
)
}
</td
>
</tr>
<tr>
<td
class=
"text-xs"
>
dont TICPE
:
</td>
<td
class=
"text-right"
>
{
euroAmountFormatter.format(
"
220
"
)
}
</td
>
</tr>
</tbody>
</table>
</div>
{
/if
}
</div>
</div>
</div>
<!--Bouton pour passer du mode compact au mode waterfall-->
<!--Bouton pour passer du mode compact au mode waterfall-->
<div
class=
"flex justify-end"
>
<div
class=
"flex justify-end"
>
...
...
This diff is collapsed.
Click to expand it.
tailwind.config.cjs
+
1
−
0
View file @
f506cda9
...
@@ -58,6 +58,7 @@ const config = {
...
@@ -58,6 +58,7 @@ const config = {
fontFamily
:
{
fontFamily
:
{
sans
:
[
"
Lato
"
,
"
sans-serif
"
],
sans
:
[
"
Lato
"
,
"
sans-serif
"
],
serif
:
[
"
Lora
"
,
"
serif
"
],
serif
:
[
"
Lora
"
,
"
serif
"
],
mono
:
[
"
ui-monospace
"
,
"
SFMono-Regular
"
,
"
Menlo
"
,
"
Monaco
"
,
"
Consolas
"
,
"
Liberation Mono
"
,
"
Courier New
"
,
"
monospace
"
]
},
},
},
},
}
}
...
...
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