Skip to content
Snippets Groups Projects
Commit 25888db0 authored by Emmanuel Raviart's avatar Emmanuel Raviart
Browse files

Add housholdEntityKey to session.

parent eeab5994
No related branches found
No related tags found
1 merge request!80Resolve "Connecter le nom des cas types"
Pipeline #3626 passed
...@@ -28,6 +28,9 @@ GITHUB_PERSONAL_ACCESS_TOKEN=null ...@@ -28,6 +28,9 @@ GITHUB_PERSONAL_ACCESS_TOKEN=null
# that should not be shown when editing test cases # that should not be shown when editing test cases
HIDDEN_ENTITIES=menages HIDDEN_ENTITIES=menages
# Key for household entity
HOUSEHOLD_KEY="menage"
# Matomo analytics configuration # Matomo analytics configuration
# MATOMO_SITE_ID=123 # MATOMO_SITE_ID=123
# MATOMO_URL="https://MATOMO_SERVER/" # MATOMO_URL="https://MATOMO_SERVER/"
......
...@@ -17,6 +17,7 @@ declare namespace App { ...@@ -17,6 +17,7 @@ declare namespace App {
familyEntityKey: string familyEntityKey: string
hasGithubPersonalAccessToken: boolean hasGithubPersonalAccessToken: boolean
hiddenEntitiesKeyPlural?: string[] hiddenEntitiesKeyPlural?: string[]
householdEntityKey: string
matomo?: { matomo?: {
prependDomain?: boolean prependDomain?: boolean
siteId: number siteId: number
......
...@@ -18,6 +18,7 @@ export const getSession: GetSession = async (event): Promise<App.Session> => { ...@@ -18,6 +18,7 @@ export const getSession: GetSession = async (event): Promise<App.Session> => {
familyEntityKey: config.familyEntityKey, familyEntityKey: config.familyEntityKey,
hasGithubPersonalAccessToken: githubPersonalAccessToken !== undefined, hasGithubPersonalAccessToken: githubPersonalAccessToken !== undefined,
hiddenEntitiesKeyPlural: config.hiddenEntitiesKeyPlural, hiddenEntitiesKeyPlural: config.hiddenEntitiesKeyPlural,
householdEntityKey: config.householdEntityKey,
matomo: config.matomo, matomo: config.matomo,
openfiscaRepository: { openfiscaRepository: {
branch: openfiscaRepository.branch, branch: openfiscaRepository.branch,
......
...@@ -68,6 +68,7 @@ export function auditConfig( ...@@ -68,6 +68,7 @@ export function auditConfig(
for (const key of [ for (const key of [
"childrenKey", "childrenKey",
"familyEntityKey", "familyEntityKey",
"householdEntityKey",
"simulationsDir", "simulationsDir",
"title", "title",
]) { ]) {
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
EvaluationByName[] EvaluationByName[]
> >
const familyEntity = entityByKey[$session.familyEntityKey] const familyEntity = entityByKey[$session.familyEntityKey]
// const householdEntity = entityByKey[$session.householdEntityKey]
const personEntity = entityByKey[personEntityKey] const personEntity = entityByKey[personEntityKey]
const parametricReform = getContext( const parametricReform = getContext(
"parametricReform", "parametricReform",
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
style: "currency", style: "currency",
}) })
const familyEntity = entityByKey[$session.familyEntityKey] const familyEntity = entityByKey[$session.familyEntityKey]
const householdEntity = entityByKey[$session.householdEntityKey]
let isTestCaseCompareModalOpen = false let isTestCaseCompareModalOpen = false
const personEntity = entityByKey[personEntityKey] const personEntity = entityByKey[personEntityKey]
let slider: Slider | undefined = undefined let slider: Slider | undefined = undefined
......
...@@ -13,6 +13,7 @@ export interface Config { ...@@ -13,6 +13,7 @@ export interface Config {
familyEntityKey: string familyEntityKey: string
githubPersonalAccessToken?: string githubPersonalAccessToken?: string
hiddenEntitiesKeyPlural?: string[] hiddenEntitiesKeyPlural?: string[]
householdEntityKey: string
matomo?: { matomo?: {
prependDomain?: boolean prependDomain?: boolean
siteId: number siteId: number
...@@ -45,6 +46,7 @@ const [validConfig, error] = validateConfig({ ...@@ -45,6 +46,7 @@ const [validConfig, error] = validateConfig({
familyEntityKey: process.env["FAMILY_KEY"], familyEntityKey: process.env["FAMILY_KEY"],
githubPersonalAccessToken: process.env["GITHUB_PERSONAL_ACCESS_TOKEN"], githubPersonalAccessToken: process.env["GITHUB_PERSONAL_ACCESS_TOKEN"],
hiddenEntitiesKeyPlural: process.env["HIDDEN_ENTITIES"], hiddenEntitiesKeyPlural: process.env["HIDDEN_ENTITIES"],
householdEntityKey: process.env["HOUSEHOLD_KEY"],
matomo: matomo:
process.env["MATOMO_SITE_ID"] && process.env["MATOMO_URL"] process.env["MATOMO_SITE_ID"] && process.env["MATOMO_URL"]
? { ? {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment