Skip to content

Commit

Permalink
fixup! 🗃️(dashboard) add administration and company fields to consent…
Browse files Browse the repository at this point in the history
… model
  • Loading branch information
ssorin committed Jan 23, 2025
1 parent 9d26891 commit 7798ca6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,10 @@ jobs:
DASHBOARD_DB_NAME: test-qualicharge-dashboard
DASHBOARD_DATABASE_URL: psql://qualicharge:pass@localhost:5432/test-qualicharge-dashboard
DASHBOARD_SECRET_KEY: the_secret_key
DASHBOARD_CONTROL_AUTHORITY: "null"
DASHBOARD_CONTROL_AUTHORITY_NAME: QualiCharge
DASHBOARD_CONTROL_AUTHORITY_ADDRESS_1: 1 rue de test
DASHBOARD_CONTROL_AUTHORITY_ZIP_CODE: 75000
DASHBOARD_CONTROL_AUTHORITY_CITY: Paris
DASHBOARD_CONTROL_AUTHORITY_REPRESENTED_BY: John Doe
DASHBOARD_CONTROL_AUTHORITY_EMAIL: [email protected]
DASHBOARD_CONSENT_DONE_AT: Paris
9 changes: 8 additions & 1 deletion env.d/dashboard
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,12 @@ DJANGO_SUPERUSER_USERNAME=admin
[email protected]

# Control authority contact
DASHBOARD_CONTROL_AUTHORITY={"name": "QualiCharge", "address_1": "1 rue de test", "address_2": "", "zip_code": "75000", "city": "Paris", "represented_by": "John Doe", "email": "[email protected]"}
DASHBOARD_CONTROL_AUTHORITY_NAME=QualiCharge
DASHBOARD_CONTROL_AUTHORITY_ADDRESS_1=1 rue de test
DASHBOARD_CONTROL_AUTHORITY_ADDRESS_2=
DASHBOARD_CONTROL_AUTHORITY_ZIP_CODE=75000
DASHBOARD_CONTROL_AUTHORITY_CITY=Paris
DASHBOARD_CONTROL_AUTHORITY_REPRESENTED_BY=John Doe
[email protected]

DASHBOARD_CONSENT_DONE_AT=Paris
10 changes: 9 additions & 1 deletion src/dashboard/dashboard/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,15 @@
CONSENT_NUMBER_DAYS_END_DATE = None

# `Control authority` contact for consent validation.
CONSENT_CONTROL_AUTHORITY = env.json("CONTROL_AUTHORITY")
CONSENT_CONTROL_AUTHORITY = {
"name": env.str("CONTROL_AUTHORITY_NAME"),
"address_1": env.str("CONTROL_AUTHORITY_ADDRESS_1"),
"address_2": env.str("CONTROL_AUTHORITY_ADDRESS_2", default=""),
"zip_code": env.str("CONTROL_AUTHORITY_ZIP_CODE"),
"city": env.str("CONTROL_AUTHORITY_CITY"),
"represented_by": env.str("CONTROL_AUTHORITY_REPRESENTED_BY"),
"email": env.str("CONTROL_AUTHORITY_EMAIL"),
}

CONSENT_DONE_AT = env.str("CONSENT_DONE_AT")

Expand Down

0 comments on commit 7798ca6

Please sign in to comment.