Got groups and courses for Walmart Supplier. Updated the carousel and recommended for Chubb - haven't pushed to prod yet.

This commit is contained in:
Norm Rasmussen
2025-02-28 17:13:02 -05:00
parent 46efc9a422
commit 73282a0dac
7 changed files with 93 additions and 55 deletions

View File

@ -1,44 +1,70 @@
{% assign content_counter = 0 %}
{% for course in courses.in_catalog %}
{% for category in course.categories %}
{% if category.name == 'Recommended' %}
{% if current_person.groups.any? %}
{% for group in current_person.groups %}
{% for course in courses.in_catalog %}
{% for category in course.categories %}
{% if group.id = '' and category.name = 'Recommended - ' %}
{% assign content_counter = content_counter | plus: 1 %}
{% elsif category.name == 'Recommended' %}
{% assign content_counter = content_counter | plus: 1 %}
{% endif %}
{% endfor %}
{% endfor %}
{% for learning_path in learning_paths.available %}
{% for category in learning_path.categories %}
{% if category.name == 'Recommended' %}
{% assign content_counter = content_counter | plus: 1 %}
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endif %}
{% if current_person.groups.any? %}
{% for group in current_person.groups %}
{% for learning_path in learning_paths.available %}
{% for category in learning_path.categories %}
{% if group.id = '' and category.name = 'Recommended - ' %}
{% assign content_counter = content_counter | plus: 1 %}
{% elsif category.name == 'Recommended' %}
{% assign content_counter = content_counter | plus: 1 %}
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endif %}
{% comment %}
To add for Chubb:
If person is in group show certain courses.
{% endcomment%}
<div class="recommended-carousel-wrapper">
<div class="recommended-carousel">
{% for course in courses.in_catalog%}
{% for category in course.categories %}
{% if category.name == 'Recommended' %}
<div class="carousel-card-container">
{% include "cards_course" with course %}
</div>
{% endif %}
{% endfor %}
{% endfor %}
{% for learning_path in learning_paths.available %}
{% for category in learning_path.categories %}
{% if category.name == 'Recommended' %}
<div class="carousel-card-container">
{% include "cards_learning_path" %}
</div>
{% endif %}
{% endfor %}
{% endfor %}
{% if current_person.groups.any? %}
{% for group in current_person.groups %}
{% for course in courses.in_catalog%}
{% for category in course.categories %}
{% if group.id = '' and category.name = 'Recommended - ' %}
<div class="carousel-card-container">
{% include "cards_course" with course %}
</div>
{% elsif category.name == 'Recommended' %}
<div class="carousel-card-container">
{% include "cards_course" with course %}
</div>
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endif %}
{% if current_person.groups.any? %}
{% for group in current_person.groups %}
{% for learning_path in learning_paths.available %}
{% for category in learning_path.categories %}
{% if group.id = '' and category.name = 'Recommended - ' %}
<div class="carousel-card-container">
{% include "cards_learning_path" %}
</div>
{% elsif category.name == 'Recommended' %}
<div class="carousel-card-container">
{% include "cards_learning_path" %}
</div>
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endif %}
</div>
</div>