Luminate Mexico templates for spanish and english courses. Todos. New script for bulk adding of people.

This commit is contained in:
Norm Rasmussen
2024-05-31 15:46:04 -04:00
parent ec2ef3a808
commit bf13bb7131
7 changed files with 75 additions and 12 deletions

View File

@ -175,4 +175,4 @@
height: 100%;
}
}
</style>
</style>

View File

@ -1,8 +1,20 @@
{% if courses.in_catalog.any? %}
<div class="np-catalog-courses row row-with-thumbnails">
{% for course in courses.in_catalog %}
{% unless course.properties.is_article_course %}
{% if course.id == "6cc26c57-34db-4b8e-a38b-ad321ce18add" or course.id == "ac4fbf2e-ed8f-404d-b995-f0ef73481466" %}
{% unless course.properties.is_article_course %}
{% if course.properties.course_language == current_person.properties.language %}
<div class="col-xs-12 col-md-6 col-lg-4 np-stretch-content">
{% include "cards_course" with course %}
</div>
{% endif %}
{% comment %} ---------------------------- {% endcomment %}
{%- comment -%} This is code from the US school that was filter specific courses. Keeping it here in case Mexico does the same thing. -- NR {%- endcomment -%}
{%- comment -%} --------------------------- {%- endcomment -%}
{% comment %}
{% if course.id == "6cc26c57-34db-4b8e-a38b-ad321ce18add" or course.id == "ac4fbf2e-ed8f-404d-b995-f0ef73481466" %}
{% if current_person.properties.hide_api_certification_exam_course == false %}
<div class="col-xs-12 col-md-6 col-lg-4 np-stretch-content">
{% include "cards_course" with course %}
@ -16,11 +28,12 @@
</div>
{% endunless %}
{% else %}
{% endif %}
{% endif %}
<div class="col-xs-12 col-md-6 col-lg-4 np-stretch-content">
{% include "cards_course" with course %}
</div>
{% endif %}
{% endif %}
{% endcomment %}
{% endunless %}
{% endfor %}
</div>
@ -31,4 +44,4 @@
%}
{% endcapture %}
{% include "courses_zero_state", message: message %}
{% endif %}
{% endif %}

View File

@ -25,12 +25,14 @@
{% endif %}
{% endfor %}
{% if course.properties.course_language == current_person.properties.language %}
{% if is_featured %}
{% assign featured_courses_count = featured_courses_count | plus: 1 %}
<div class="featured-course-slide" data-position="{{course.properties.course_position}}">
{% include "cards_article" with course %}
</div>
{% endif %}
{% endif %}
{% endif %}
{% endfor %}

View File

@ -352,7 +352,7 @@ body > main > div.np-catalog-header-wrapper > div.np-catalog-header > div.np-res
text-indent: 0;
line-height: .5;
display: block;
content: "Benvenida a Luminate Mexico";
content: "Benvenida a Aprendizaje de Walmart Luminate";
}
.Home.np-homepage-subheadline::after {
@ -734,25 +734,25 @@ body > main > div.np-homepage-ongoing.np-max-width > div.ongoing-see-more-wrappe
text-indent: 0;
line-height: 0;
display: block;
content: "Ver más";
content: "Ver más";
}
body > footer > div.np-footer-top > div > ul > li:nth-child(1) > a::after {
text-indent: 0;
line-height: 0;
display: block;
content: "Página de Inicio";
content: "Página de Inicio";
}
body > footer > div.np-footer-top > div > ul > li:nth-child(2) > a::after {
text-indent: 0;
line-height: 0;
display: block;
content: "Panel";
content: "Panel";
}
body > footer > div.np-footer-top > div > ul > li:nth-child(3) > a::after {
text-indent: 0;
line-height: 0;
display: block;
content: "Mis Rutas";
content: "Mis Rutas";
}
</style>

View File

@ -0,0 +1,40 @@
import requests
import json
import pprint
import csv
import Apikeys
pp = pprint.PrettyPrinter(indent=4)
APIKEY = Apikeys.ZENJOB
HEADERS = {
"accept": "application/json",
"X-Api-Key": APIKEY,
}
BASEURL = "https://api.northpass.com/v2/"
def bulk_invite_ppl():
"""
Bulk endpoint which invites new people and adds them to a group via this structure:
{
"email": "me@mac.com"
"groups": "GroupA"
}
"""
payload_1 = []
with open ("/Users/normrasmussen/Downloads/Zenjob_empoloyees.csv", "r") as csvfile:
for person in csvfile:
person = person[:-1]
miniload = {
"email": person,
"groups": "Internal Zenjob Testing"
}
payload_1.append(miniload)
payload = payload = { "data": { "attributes": { "people": payload_1 } } }
print(payload)
url = f"{BASEURL}bulk/people"
response = requests.post(url, headers=HEADERS, json=payload)
print(f"Completed. Status code is {response.status_code}")
if __name__ == "__main__":
bulk_invite_ppl()

View File

@ -8,7 +8,10 @@ const apiKey = "6hUfJdAartHTHhHc0WIRZYPWe"
// Luminate Production ^
const uid = "/\?uid\=7beg87y4-fh24-4929-3rt5-24kdn87s5241";
const groupIds = [
'691b3e2c-e023-415b-8038-df9da26dd904',
'563b97ed-6d1f-4fd9-a9eb-82842e13468e',
'01df1c8e-55ee-41ff-bb2d-72c0713fe6b1',
'807048f0-89a0-41e6-a52b-f8d28ad30195',
'691b3e2c-e023-415b-8038-df9da26dd904'
]
const getAllGroups = async (num) => {

View File

@ -322,3 +322,8 @@ message](https://northpasshq.slack.com/archives/C04RER4PH09/p1709147957374999?th
- [ ] Chloe - What we need to implement SEO - examples of why FAQ is working.
- [ ] Cin7 - Employee Catalog Filters - show ALL categories, no matter what
- [X] Cin7 - Badges - still showing duplicate badges.
## 05-31-2024
- [ ] Anthology - Intro Jessica (CAM) for Spanish Academy
- [X] DoorDash - Intro Barb for PS CSQL.