Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Séparation du guide CSRD de sa gestion #173

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
15 changes: 15 additions & 0 deletions impact/reglementations/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@ class ESRS(models.TextChoices):

ESRS_G1 = "ESRS_G1"

@classmethod
def theme(cls, code):
return {
cls.ESRS_E1: "environnement",
cls.ESRS_E2: "environnement",
cls.ESRS_E3: "environnement",
cls.ESRS_E4: "environnement",
cls.ESRS_E5: "environnement",
cls.ESRS_S1: "social",
cls.ESRS_S2: "social",
cls.ESRS_S3: "social",
cls.ESRS_S4: "social",
cls.ESRS_G1: "gouvernance",
}[code]


@dataclass
class EnjeuNormalise:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 4.2.16 on 2024-10-18 14:56
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):
dependencies = [
("reglementations", "0023_rapportcsrd_enjeu_and_more"),
]

operations = [
migrations.AddField(
model_name="rapportcsrd",
name="etape_validee",
field=models.PositiveIntegerField(
null=True, verbose_name="étape validée du rapport CSRD"
),
),
]
3 changes: 3 additions & 0 deletions impact/reglementations/models/csrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ class RapportCSRD(TimestampedModel):
description = models.TextField(
verbose_name="description du rapport CSRD", blank=True
)
etape_validee = models.PositiveIntegerField(
verbose_name="étape validée du rapport CSRD", null=True
)

objects = RapportCSRDQuerySet.as_manager()

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
{% if enjeux_par_esg %}
<ul>
{% for enjeu in enjeux %}
<li>{{ enjeu.esrs }} : {{ enjeu.nom }}</li>
{% endfor %}
</ul>

<div class="fr-grid-row fr-grid-row--gutters esrs-organizer">
<div class="fr-col-lg-4 fr-col-12">
<div class="esrs-organizer--container esrs-organizer--no-badge esrs-organizer--env">
<div class="esrs-organizer--header">
<h4 class="esrs-organizer--title">Environnement</h4>
</div>
<div class="esrs-organizer--content">
{% if enjeux_par_esg.environnement|length %}
{% for esrs, enjeux in enjeux_par_esg.environnement.items %}
<div class="esrs-organizer--esrs">
<div class="esrs-organizer--card">
<div class="esrs-organizer--card-title">
<b>{{ esrs }}</b>
<br>
<ul>
{% for enjeu in enjeux %}
<li>{{ enjeu.nom }}</li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% endfor %}
{% else %}
<div class="esrs-organizer--esrs">
<div class="esrs-organizer--card">
<div class="esrs-organizer--card-title">
Aucun enjeu sélectionné
</div>
</div>
</div>
{% endif %}
</div>
</div>
</div>
<div class="fr-col-lg-4 fr-col-12">
<div class="esrs-organizer--container esrs-organizer--no-badge esrs-organizer--social">
<div class="esrs-organizer--header">
<h4 class="esrs-organizer--title">Social</h4>
</div>
<div class="esrs-organizer--content">
{% if enjeux_par_esg.social|length %}
{% for esrs, enjeux in enjeux_par_esg.social.items %}
<div class="esrs-organizer--esrs">
<div class="esrs-organizer--card">
<div class="esrs-organizer--card-title">
<b>{{ esrs }}</b>
<br>
<ul>
{% for enjeu in enjeux %}
<li>{{ enjeu.nom }}</li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% endfor %}
{% else %}
<div class="esrs-organizer--esrs">
<div class="esrs-organizer--card">
<div class="esrs-organizer--card-title">
Aucun enjeu sélectionné
</div>
</div>
</div>
{% endif %}
</div>
</div>
</div>
<div class="fr-col-lg-4 fr-col-12">
<div class="esrs-organizer--container esrs-organizer--no-badge esrs-organizer--gov">
<div class="esrs-organizer--header">
<h4 class="esrs-organizer--title">Gouvernance</h4>
</div>
<div class="esrs-organizer--content">
{% if enjeux_par_esg.gouvernance|length %}
{% for esrs, enjeux in enjeux_par_esg.gouvernance.items %}
<div class="esrs-organizer--esrs">
<div class="esrs-organizer--card">
<div class="esrs-organizer--card-title">
<b>{{ esrs }}</b>
<br>
<ul>
{% for enjeu in enjeux %}
<li>{{ enjeu.nom }}</li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% endfor %}
{% else %}
<div class="esrs-organizer--esrs">
<div class="esrs-organizer--card">
<div class="esrs-organizer--card-title">
Aucun enjeu sélectionné
</div>
</div>
</div>
{% endif %}
</div>
</div>
</div>
</div>


{% else %}
<p>Aucun enjeu sélectionné</p>
{% endif %}

<!-- fragment liste des enjeux sélectionnés -->
27 changes: 27 additions & 0 deletions impact/reglementations/templates/reglementations/csrd/etape1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{% extends "base.html" %}

{% block title %}Introduction{% endblock %}

{% block content %}

{% include "snippets/csrd_header.html" %}

<div class="fr-container fr-mb-8w">
<div class="fr-grid-row">
{% include "snippets/gestion_csrd_menu.html" with active_item=1 %}

<div class="fr-col">
<h2>Introduction</h2>
<p>
Vous commencez le remplissage de la CSRD.
<br>
<a href="{% url 'reglementations:csrd' entreprise.siren %}" class="fr-link" target='_blank'>Comment réaliser son rapport de durabilité de A à Z</a>
</p>
<p>
{% include "snippets/csrd_submit.html" with prochaine_etape=2 %}
</p>
</div>
</div>
</div>
<!-- page gestion CSRD -->
{% endblock %}
75 changes: 75 additions & 0 deletions impact/reglementations/templates/reglementations/csrd/etape2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{% extends "base.html" %}

{% block title %}Sélection des enjeux{% endblock %}

{% block content %}

{% include "snippets/csrd_header.html" %}

<div class="fr-container fr-mb-8w">
<div class="fr-grid-row">
{% include "snippets/gestion_csrd_menu.html" with active_item=2 %}

<div class="fr-col">
<h2>Identification de la liste des enjeux ESG potentiels</h2>
<h3>Consulter la liste des enjeux de durabilité issue de l'ESRS 1 AR 16</h3>

<div class="fr-container fr-pb-6w">
<div class="fr-grid-row fr-grid-row--middle">
<div class="fr-col-8">
<h6>Quoi faire ?</h6>
<ul class="csrd-list csrd-list--bold">
<li>Identifiez les enjeux de durabilité issus des ESRS thématiques, au regard desquels votre entreprise a (ou pourrait avoir) des impacts sur l’environnement et la société ou qui ont ou pourraient avoir des effets financiers sur la position financière, la performance financière et les flux de trésorerie de votre entreprise.</li>
</ul>
</div>
<div class="fr-col-4 col-right">
<span id="telechargement-xlsx">
</span>
</div>
</div>
</div>
</div>

<div class="fr-tabs">
<ul class="fr-tabs__list" role="tablist" aria-label="onglet-etape-2">
<li role="presentation">
<button id="tabpanel-404" class="fr-tabs__tab fr-tabs__tab--icon-left" tabindex="0" role="tab" aria-selected="true" aria-controls="tabpanel-404-panel">Ajouter des enjeux</button>
</li>
<li role="presentation">
<a class="fr-tabs__tab fr-tabs__tab--icon-left" target="_blank" href="{% url 'reglementations:csrd_sous_etape' entreprise.siren 1 2 2 %}">S'inspirer de standards internationaux</a>
</li>
<li role="presentation">
<button id="tabpanel-406" class="fr-tabs__tab fr-tabs__tab--icon-left" tabindex="-1" role="tab" aria-selected="false" aria-controls="onglet-liste-enjeux" hx-get="{% url 'reglementations:liste_enjeux_selectionnes' csrd.pk %}" hx-target="#onglet-liste-enjeux">Ma liste d'enjeux à analyser</button>
</li>
</ul>
<div id="tabpanel-404-panel" class="fr-tabs__panel fr-tabs__panel--selected" role="tabpanel" aria-labelledby="tabpanel-404" tabindex="0">
<div class="fr-container fr-pb-6w" id="esg_container" hx-get="{% url "reglementations:rafraichissement_esg" csrd.pk %}" hx-trigger="click from:.fr-btn--close, load"></div>
</div>
<div id="tabpanel-405-panel" class="fr-tabs__panel" role="tabpanel" aria-labelledby="tabpanel-405" tabindex="0">
</div>
<div id="onglet-liste-enjeux" class="fr-tabs__panel" role="tabpanel" aria-labelledby="tabpanel-406" tabindex="0">
<h4>Enjeux sélectionnés</h4>
</div>
</div>

<p>
{% include "snippets/csrd_submit.html" with prochaine_etape=3 %}
</p>

{% include "snippets/modal_ESRS/ESRS_2.html" %}
{% include "snippets/modal_ESRS/ESRS_E1.html" %}
{% include "snippets/modal_ESRS/ESRS_E2.html" %}
{% include "snippets/modal_ESRS/ESRS_E3.html" %}
{% include "snippets/modal_ESRS/ESRS_E4.html" %}
{% include "snippets/modal_ESRS/ESRS_E5.html" %}
{% include "snippets/modal_ESRS/ESRS_S1.html" %}
{% include "snippets/modal_ESRS/ESRS_S2.html" %}
{% include "snippets/modal_ESRS/ESRS_S3.html" %}
{% include "snippets/modal_ESRS/ESRS_S4.html" %}
{% include "snippets/modal_ESRS/ESRS_G1.html" %}


</div>
</div>
<!-- page gestion CSRD -->
{% endblock %}
22 changes: 22 additions & 0 deletions impact/reglementations/templates/reglementations/csrd/etape3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% extends "base.html" %}

{% block title %}Matérialité des enjeux{% endblock %}

{% block content %}

{% include "snippets/csrd_header.html" %}

<div class="fr-container fr-mb-8w">
<div class="fr-grid-row">
{% include "snippets/gestion_csrd_menu.html" with active_item=3 %}

<div class="fr-col">
<h2>Matérialité des enjeux</h2>
<p>
Vous allez bientôt pouvoir déterminer la matérialité des enjeux sélectionnés.
</p>
</div>
</div>
</div>
<!-- page gestion CSRD -->
{% endblock %}
Loading
Loading