thats it. last commit at gainsight. closing this repo soon.

This commit is contained in:
Norm Rasmussen
2026-04-14 17:14:29 -04:00
parent fc1523a89c
commit fa77a69132
5 changed files with 115 additions and 215 deletions

View File

@ -30,7 +30,7 @@
{% endif %} {% endif %}
" onclick="toggleLanguageSelector('{{parentClass}}')"> " onclick="toggleLanguageSelector('{{parentClass}}')">
<span>Language</span> <span>Language</span>
<div {% if desktopMode %} style="padding-top: 10px;"{% endif %}class="language-selector-dropdown"> <div{% if desktopMode %} style="padding-top: 10px;"{% endif %} class="language-selector-dropdown">
<a class="{% if desktopMode %}np-header-avatar-tooltip-navigation-link{% else %}language-selector-dropdown-item{% endif %}" href="/">English (USA)</a> <a class="{% if desktopMode %}np-header-avatar-tooltip-navigation-link{% else %}language-selector-dropdown-item{% endif %}" href="/">English (USA)</a>
<a class="{% if desktopMode %}np-header-avatar-tooltip-navigation-link{% else %}language-selector-dropdown-item{% endif %}" href="/es-us">Español (Estados Unidos)</a> <a class="{% if desktopMode %}np-header-avatar-tooltip-navigation-link{% else %}language-selector-dropdown-item{% endif %}" href="/es-us">Español (Estados Unidos)</a>
{% comment %} <a class="{% if desktopMode %}np-header-avatar-tooltip-navigation-link{% else %}language-selector-dropdown-item{% endif %}" href="/fr-ca">Français  (Québec)</a> {% endcomment %} {% comment %} <a class="{% if desktopMode %}np-header-avatar-tooltip-navigation-link{% else %}language-selector-dropdown-item{% endif %}" href="/fr-ca">Français  (Québec)</a> {% endcomment %}

View File

@ -33,11 +33,13 @@
<a class="np-form-link np-button-color" href="{% route forgot_password_new %}"> <a class="np-form-link np-button-color" href="{% route forgot_password_new %}">
{% t .forgot_password %} {% t .forgot_password %}
</a> </a>
{% comment %}
{% if features.account_creation? %} {% if features.account_creation? %}
<a class="np-form-link np-button-color" href="{% route sign_up %}"> <a class="np-form-link np-button-color" href="{% route sign_up %}">
{% t shared.sign_up %} {% t shared.sign_up %}
</a> </a>
{% endif %} {% endif %}
{% endcomment %}
{% if features.request_access? %} {% if features.request_access? %}
<a <a
class="np-form-link np-button-color" class="np-form-link np-button-color"

View File

@ -1,213 +1,111 @@
{% if courses.enrolled.any? %} {% if courses.enrolled.any? %}
{% comment %} GETTING STARTED {% endcomment %}
{% for school_category in school_categories %} {% comment %}
{% if school_category == "Getting Started" %} ============================================================================
<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'> CATEGORY CARDS - Refactored for DRY & Maintainability
<div class="np-category-card-content-wrapper"> ============================================================================
<div class="np-category-card-img"> To add a new category:
<img src="https://cdn.northpass.io/walmart/categories-img-label.webp" width="60" height="60" alt="Getting Started Category Icon"> 1. Add it to 'ordered_categories' in the desired position
</div> 2. Add its icon URL to the icon lookup section below
<div class="title-wrapper"> That's it! No more copy-pasting 20 lines of code.
<div class="labels-wrapper"> ============================================================================
<div class="label label-green new-topic-label">New</div></div> {% endcomment %}
<div class="np-category-title">{{school_category}}
</div> {% comment %} Define the display order for categories {% endcomment %}
</div> {% assign ordered_categories = "Getting Started,Using the App,Earnings,Safety,Offer Acceptance,Arrival & Pick Up,Delivery,Shopping & Delivery,Returns,Rewards,Troubleshooting" | split: "," %}
</div>
<i class="fas fa-chevron-right"></i> {% comment %} ==================== ORDERED CATEGORIES ==================== {% endcomment %}
</div>{% include "filtered_courses_tray", category_name: school_category %} {% for category_name in ordered_categories %}
{% endif %} {% for school_category in school_categories %}
{% endfor %} {% if school_category == category_name %}
{% comment %} EARNINGS {% endcomment %}
{% for school_category in school_categories %} {% comment %} Icon lookup - add new category icons here {% endcomment %}
{% if school_category == "Earnings" %} {% case school_category %}
<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'> {% when "Getting Started" %}
<div class="np-category-card-content-wrapper"> {% assign category_icon = "https://cdn.northpass.io/walmart/categories-img-label.webp" %}
<div class="np-category-card-img"><img src="https://cdn.northpass.io/walmart/category-earnings-icon.webp" width="61" height="60" alt="Earnings Category Icon"> {% assign category_alt = "Getting Started Category Icon" %}
</div> {% when "Using the App" %}
<div class="title-wrapper"> {% assign category_icon = "https://cdn.northpass.io/walmart/category-using-the-app-icon.webp" %}
<div class="labels-wrapper"> {% assign category_alt = "Using the App Category Icon" %}
<div class="label label-green new-topic-label">New</div> {% when "Earnings" %}
</div> {% assign category_icon = "https://cdn.northpass.io/walmart/category-earnings-icon.webp" %}
<div class="np-category-title">{{school_category}} {% assign category_alt = "Earnings Category Icon" %}
</div> {% when "Safety" %}
</div> {% assign category_icon = "https://cdn.northpass.io/walmart/category-safety-icon.webp" %}
</div> {% assign category_alt = "Safety Icon" %}
<i class="fas fa-chevron-right"></i> {% when "Offer Acceptance" %}
</div>{% include "filtered_courses_tray", category_name: school_category %} {% assign category_icon = "https://cdn.northpass.io/walmart/category-offer-acceptance-icon.webp" %}
{% endif %} {% assign category_alt = "Offer Acceptance Icon" %}
{% endfor %} {% when "Arrival & Pick Up" %}
{% comment %} SHOPPING & DELIVERY {% endcomment %} {% assign category_icon = "https://cdn.northpass.io/walmart/category-arrival-pickup-icon.webp" %}
{% for school_category in school_categories %} {% assign category_alt = "Arrival & Pick Up Icon" %}
{% if school_category == "Shopping & Delivery" %} {% when "Delivery" %}
<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'> {% assign category_icon = "https://cdn.northpass.io/walmart/category-delivery-icon.webp" %}
<div class="np-category-card-content-wrapper"> {% assign category_alt = "Delivery Category Icon" %}
<div class="np-category-card-img"> {% when "Shopping & Delivery" %}
<img src="https://cdn.northpass.io/walmart/category-shopping-delivery-icon.webp" width="61" height="60" alt="Shopping & Delivery Category Icon"> {% assign category_icon = "https://cdn.northpass.io/walmart/category-shopping-delivery-icon.webp" %}
</div> {% assign category_alt = "Shopping & Delivery Category Icon" %}
<div class="title-wrapper"> {% when "Returns" %}
<div class="labels-wrapper"> {% assign category_icon = "https://cdn.northpass.io/walmart/category-returns-icon.webp" %}
<div class="label label-green new-topic-label">New</div> {% assign category_alt = "Returns Icon" %}
</div> {% when "Rewards" %}
<div class="np-category-title">{{school_category}}</div> {% assign category_icon = "https://cdn.northpass.io/walmart/category-rewards-icon.webp" %}
</div> {% assign category_alt = "Rewards Icon" %}
</div> {% when "Troubleshooting" %}
<i class="fas fa-chevron-right"></i> {% assign category_icon = "https://cdn.northpass.io/walmart/category-troubleshooting-icon.webp" %}
</div>{% include "filtered_courses_tray", category_name: school_category %} {% assign category_alt = "Troubleshooting Icon" %}
{% endif %} {% endcase %}
{% endfor %}
{% comment %} DELIVERY {% endcomment %} <div class="np-category-card" data-category="{{ school_category | replace: ' ', '-' | downcase }}">
{% for school_category in school_categories %} <div class="np-category-card-content-wrapper">
{% if school_category == "Delivery" %} <div class="np-category-card-img">
<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'> <img src="{{ category_icon }}" width="60" height="60" alt="{{ category_alt }}">
<div class="np-category-card-content-wrapper"> </div>
<div class="np-category-card-img"> <div class="title-wrapper">
<img src="https://cdn.northpass.io/walmart/category-delivery-icon.webp" width="61" height="60" alt="Delivery Category Icon"> <div class="labels-wrapper"></div>
</div> <div class="np-category-title">{{ school_category }}</div>
<div class="title-wrapper"> </div>
<div class="labels-wrapper"> </div>
<div class="label label-green new-topic-label">New</div> <i class="fas fa-chevron-right"></i>
</div> </div>
<div class="np-category-title">{{school_category}}</div> {% include "filtered_courses_tray", category_name: school_category %}
</div>
</div> {% endif %}
<i class="fas fa-chevron-right"></i> {% endfor %}
</div> {% endfor %}
{% include "filtered_courses_tray", category_name: school_category %}
{% endif %} {% comment %} ==================== REMAINING CATEGORIES ==================== {% endcomment %}
{% endfor %} {% comment %} Catches any categories not in the ordered list above {% endcomment %}
{% comment %} USING THE APP {% endcomment %} {% for school_category in school_categories %}
{% for school_category in school_categories %} {% unless ordered_categories contains school_category %}
{% if school_category == "Using the App" %}
<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'> {% comment %} Icon lookup for non-ordered categories {% endcomment %}
<div class="np-category-card-content-wrapper"> {% case school_category %}
<div class="np-category-card-img"> {% when "Drop Off & Returns" %}
<img src="https://cdn.northpass.io/walmart/category-using-the-app-icon.webp" width="60" height="60" alt="Using the App Category Icon"> {% assign category_icon = "https://cdn.northpass.io/walmart/category-dropoff-returns-icon.webp" %}
</div> {% when "Special Topics" %}
<div class="title-wrapper"> {% assign category_icon = "https://cdn.northpass.io/walmart/category-troubleshooting-icon.webp" %}
<div class="labels-wrapper"> {% when "Trust & Safety" %}
<div class="label label-green new-topic-label">New</div> {% assign category_icon = "https://cdn.northpass.io/walmart/category-trust-safety-icon.webp" %}
</div> {% else %}
<div class="np-category-title">{{school_category}}</div> {% assign category_icon = "https://cdn.northpass.io/walmart/category-spark-icon.webp" %}
</div> {% endcase %}
</div>
<i class="fas fa-chevron-right"></i> <div class="np-category-card" data-category="{{ school_category | replace: ' ', '-' | downcase }}">
</div> <div class="np-category-card-content-wrapper">
{% include "filtered_courses_tray", category_name: school_category %} <div class="np-category-card-img">
{% endif %} <img src="{{ category_icon }}" width="60" height="60" alt="{{ school_category }} Category Icon">
{% endfor %} </div>
{% comment %} CONTACTING CUSTOMERS {% endcomment %} <div class="title-wrapper">
{% for school_category in school_categories %} <div class="labels-wrapper"></div>
{% if school_category == "Contacting Customers" %} <div class="np-category-title">{{ school_category }}</div>
<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'> </div>
<div class="np-category-card-content-wrapper"> </div>
<div class="np-category-card-img"> <i class="fas fa-chevron-right"></i>
<img src="https://cdn.northpass.io/walmart/category-contacting-customers-icon.webp" width="61" height="60" alt="Contacting Customers Category Icon"> </div>
</div> {% include "filtered_courses_tray", category_name: school_category %}
<div class="title-wrapper">
<div class="labels-wrapper"> {% endunless %}
<div class="label label-green new-topic-label">New</div> {% endfor %}
</div>
<div class="np-category-title">{{school_category}}</div> {% endif %}
</div>
</div>
<i class="fas fa-chevron-right"></i></div>
{% include "filtered_courses_tray", category_name: school_category %}
{% endif %}
{% endfor %}
{% comment %} SAFETY {% endcomment %}
{% for school_category in school_categories %}
{% if school_category == "Safety" %}
<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'>
<div class="np-category-card-content-wrapper">
<div class="np-category-card-img">
<img src="https://cdn.northpass.io/walmart/category-safety-icon.webp" width="61" height="60" alt="Safety Icon">
</div>
<div class="title-wrapper">
<div class="labels-wrapper">
<div class="label label-green new-topic-label">New</div>
</div>
<div class="np-category-title">{{school_category}}</div>
</div>
</div>
<i class="fas fa-chevron-right"></i></div>
{% include "filtered_courses_tray", category_name: school_category %}
{% endif %}
{% endfor %}
{% comment %} REWARDS {% endcomment %}
{% for school_category in school_categories %}
{% if school_category == "Rewards" %}
<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'>
<div class="np-category-card-content-wrapper">
<div class="np-category-card-img">
<img src="https://cdn.northpass.io/walmart/category-rewards-icon.webp" width="61" height="60" alt="Rewards Icon">
</div>
<div class="title-wrapper">
<div class="labels-wrapper">
<div class="label label-green new-topic-label">New</div>
</div>
<div class="np-category-title">{{school_category}}</div>
</div>
</div>
<i class="fas fa-chevron-right"></i></div>
{% include "filtered_courses_tray", category_name: school_category %}
{% endif %}
{% endfor %}
{% comment %} NON SPECIFIED {% endcomment %}
{% for school_category in school_categories %}
{% unless school_category == "Getting Started" or school_category == "Earnings" or school_category == "Shopping & Delivery" or school_category == "Delivery" or school_category == "Using the App" or school_category == "Contacting Customers" or school_category == "Rewards" %}
{% if school_category == "Resource Bundles" %}
{% if features.learning_paths? and learning_paths.enrolled.any? %}
<div class="np-category-card" data-category='resource-bundles'>
<div class="np-category-card-content-wrapper">
<div class="np-category-card-img">
<img src="https://cdn.northpass.io/walmart/category-resource-bundles-icon.webp" width="60" height="60" alt="Category Icon">
</div>
<div class="title-wrapper">
<div class="np-category-title">Resource Bundles</div>
</div>
</div>
<i class="fas fa-chevron-right"></i>
</div>
{% include "filtered_learning_paths_tray", category_name: "Resource Bundles" %}
{% endif %}
{% else %}
<div class="np-category-card" data-category='{{school_category | replace: " ", "-" | downcase }}'>
<div class="np-category-card-content-wrapper">
<div class="np-category-card-img">
{% if school_category == "Arrival & Pick Up" %}
<img src="https://cdn.northpass.io/walmart/category-arrival-pickup-icon.webp" width="60" height="60" alt="Category Icon">
{% elsif school_category == "Drop Off & Returns" %}
<img src="https://cdn.northpass.io/walmart/category-dropoff-returns-icon.webp" width="60" height="60" alt="Category Icon">
{% elsif school_category == "Troubleshooting" %}
<img src="https://cdn.northpass.io/walmart/category-troubleshooting-icon.webp" width="60" height="60" alt="Category Icon">
{% elsif school_category == "Trust & Safety" %}
<img src="https://cdn.northpass.io/walmart/category-trust-safety-icon.webp" width="60" height="60" alt="Category Icon">
{% elsif school_category == "Offer Acceptance" %}
<img src="https://cdn.northpass.io/walmart/category-offer-acceptance-icon.webp" width="60" height="60" alt="Category Icon">
{% elsif school_category == "Returns" %}
<img src="https://cdn.northpass.io/walmart/category-returns-icon.webp" width="60" height="60" alt="Category Icon">
{% elsif school_category == "Rewards" %}
<img src="https://cdn.northpass.io/walmart/category-rewards-icon.webp" width="61" height="60" alt="Rewards Icon">
{% elsif school_category == "Safety" %}
<img src="https://cdn.northpass.io/walmart/category-safety-icon.webp" width="61" height="60" alt="Safety Icon">
{% else %}
<img src="https://cdn.northpass.io/walmart/category-spark-icon.webp" width="61" height="60" alt="Category Icon">
{% endif %}
</div>
<div class="title-wrapper">
<div class="labels-wrapper">
<div class="label label-green new-topic-label">New</div>
</div>
<div class="np-category-title">{{school_category}}</div>
</div>
</div>
<i class="fas fa-chevron-right"></i>
</div>
{% include "filtered_courses_tray", category_name: school_category %}
{% endif %}
{% endunless %}
{% endfor %}
{% endif %}

View File

@ -11,7 +11,7 @@ HEADERS = {
"X-Api-Key": APIKEY, "X-Api-Key": APIKEY,
} }
BASEURL = "https://api.northpass.com/v2/" BASEURL = "https://api.northpass.com/v2/"
IMPORTFILE = "/Users/normrasmussen/Downloads/CISA OLC users 021626-022726.csv" IMPORTFILE = "/Users/normrasmussen/Downloads/CISA OLC users 031626-032726.csv"
def bulk_invite_and_group(): def bulk_invite_and_group():