diff --git a/lemarche/static/itou_marche/sections/_siae.scss b/lemarche/static/itou_marche/sections/_siae.scss index 9c17fbd10..9b1b52dca 100644 --- a/lemarche/static/itou_marche/sections/_siae.scss +++ b/lemarche/static/itou_marche/sections/_siae.scss @@ -294,6 +294,27 @@ } } + +$super-badge-color: #ffbe18; + +.super-badge-card { + border: 1px solid $super-badge-color; +} +.super-badge-badge { + padding: 2px 6px; + background: linear-gradient(0deg, #fff7e0, #fff7e0), linear-gradient(0deg, $super-badge-color, $super-badge-color); + border: 1px solid $super-badge-color; + font-size: 12px; + font-weight: 700; + line-height: 20px; + letter-spacing: 0px; + text-align: left; +} + +.super-badge-tab { + border-color: $super-badge-color !important; +} + // TODO: integrate to the theme $purple-marche: #6C38D9; diff --git a/lemarche/static/js/utils.js b/lemarche/static/js/utils.js index e88ed38cd..f8abfffb8 100644 --- a/lemarche/static/js/utils.js +++ b/lemarche/static/js/utils.js @@ -20,7 +20,20 @@ window.addEventListener('DOMContentLoaded', function () { location.href = "mailto:?" + rot13(this.dataset['nextUrl']); }); - initModalMessages() + initModalMessages(); + + $('.s-tabs-01__nav .nav-item').on('click', function (event) { + event.preventDefault() + let tabContent = this.parentElement.parentElement.querySelector(".tab-content"); + let hasSuperBadgeTab = this.children[0].classList.contains("super-badge-tab"); + + if (hasSuperBadgeTab) { + tabContent.classList.add("super-badge-tab"); + } else { + tabContent.classList.remove("super-badge-tab"); + } + $(this).tab('show') + }) }); let toggleRequiredClasses = (toggle, element) => { diff --git a/lemarche/templates/dashboard/_siae_tab_content.html b/lemarche/templates/dashboard/_siae_tab_content.html index ab00a9939..834999d4b 100644 --- a/lemarche/templates/dashboard/_siae_tab_content.html +++ b/lemarche/templates/dashboard/_siae_tab_content.html @@ -2,15 +2,23 @@
-
- +
+
{% if siae.logo_url %} Logo de la structure {{ siae.name }} {% else %} {{ siae.name }} {% endif %} - -

{{ siae.name_display }}

+
+
+

{{ siae.name_display }}

+ {% if siae.super_badge %} + + + Super prestataire + + {% endif %} +
{% include "includes/_completion_progress_bar.html" with completion_percent=siae.completion_rate_calculated %}
diff --git a/lemarche/templates/dashboard/home_siae.html b/lemarche/templates/dashboard/home_siae.html index b4b3a00da..147261aef 100644 --- a/lemarche/templates/dashboard/home_siae.html +++ b/lemarche/templates/dashboard/home_siae.html @@ -40,7 +40,7 @@

Tableau de bord

{% if user.siaeuser_set.count %} -
- {% for siaeuser in user.siaeuser_set.all %} -
- {% include "dashboard/_siae_tab_content.html" with siae=siaeuser.siae %} + {% for siaeuser in user.siaeuser_set.all %} + {% if forloop.first %} +
+ {% endif %} +
+ {% include "dashboard/_siae_tab_content.html" with siae=siaeuser.siae %} +
+ {% if forloop.last %}
- {% endfor %} -
+ {% endif %} + {% endfor %} {% endif %}
@@ -135,4 +139,5 @@

Tableau de bord

{% endif %} {% include "dashboard/_aides_territoires_section.html" with extra_class="pt-3" %} + {% endblock %} diff --git a/lemarche/templates/siaes/_card_detail.html b/lemarche/templates/siaes/_card_detail.html index 62dbcc212..3af3a4759 100644 --- a/lemarche/templates/siaes/_card_detail.html +++ b/lemarche/templates/siaes/_card_detail.html @@ -1,6 +1,6 @@ {% load static %} -
+