New script for Karbon. Luminate and Williams-Sonoma template updates.

This commit is contained in:
Norm Rasmussen
2024-08-27 17:02:16 -04:00
parent 861119c190
commit f9df92fba9
11 changed files with 3996 additions and 151 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -58,7 +58,9 @@
<script>
console.log("{{ completed_date }}")
</script>
{% comment %} {% if completed_date == 0 %}
{% comment %}
This will be enabled when the WSGC team is ready. Leave it commented out until then.
{% if completed_date == 0 %}
<script>
window.location.replace("/app/dashboard")
</script>

Binary file not shown.

View File

@ -1,52 +1,52 @@
<script>
function showPopup() {
setTimeout(function() {
document.querySelector(".popup-trigger").click()
}, 500)
}
function showSurveyPopup() {
setTimeout(function() {
document.querySelector(".survey-popup-trigger").click()
}, 500)
}
function formatDate(date) {
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
const year = date.getFullYear();
return `${month}/${day}/${year}`;
}
function RerunWorkato() {
const today = new Date();
const formattedDate = formatDate(today);
const data = {
person_uuid: '{{current_person.id}}',
date: formattedDate
}
let webhookUrl
if (schoolID == "804edb32-c300-42f3-82b7-e5d55fcbc2a6") {
webhookUrl = "https://webhooks.workato.com/webhooks/rest/bd1a1eb7-7e79-4208-a1db-8e9c7440bcc9/user-interacted-with-popup"
} else if (schoolID == "10183441-2254-4b1e-a9f7-9549ca773257") { // live school
webhookUrl = "https://webhooks.workato.com/webhooks/rest/bd1a1eb7-7e79-4208-a1db-8e9c7440bcc9/user-interacted-with-popup-live"
}
if (webhookUrl) {
fetch(webhookUrl, {
method: 'post',
body: JSON.stringify(data)
}).then(function(response) {
return response.json();
}).then(function(data) {
console.log(res)
}).catch(error => {
console.log(error)
});
}
}
// function showPopup() {
// setTimeout(function() {
// document.querySelector(".popup-trigger").click()
// }, 500)
// }
//
// function showSurveyPopup() {
// setTimeout(function() {
// document.querySelector(".survey-popup-trigger").click()
// }, 500)
// }
//
// function formatDate(date) {
// const month = (date.getMonth() + 1).toString().padStart(2, '0');
// const day = date.getDate().toString().padStart(2, '0');
// const year = date.getFullYear();
//
// return `${month}/${day}/${year}`;
// }
//
// function RerunWorkato() {
// const today = new Date();
// const formattedDate = formatDate(today);
// const data = {
// person_uuid: '{{current_person.id}}',
// date: formattedDate
// }
//
// let webhookUrl
// if (schoolID == "804edb32-c300-42f3-82b7-e5d55fcbc2a6") {
// webhookUrl = "https://webhooks.workato.com/webhooks/rest/bd1a1eb7-7e79-4208-a1db-8e9c7440bcc9/user-interacted-with-popup"
// } else if (schoolID == "10183441-2254-4b1e-a9f7-9549ca773257") { // live school
// webhookUrl = "https://webhooks.workato.com/webhooks/rest/bd1a1eb7-7e79-4208-a1db-8e9c7440bcc9/user-interacted-with-popup-live"
// }
//
// if (webhookUrl) {
// fetch(webhookUrl, {
// method: 'post',
// body: JSON.stringify(data)
// }).then(function(response) {
// return response.json();
// }).then(function(data) {
// console.log(res)
// }).catch(error => {
// console.log(error)
// });
// }
// }
</script>
{% assign catalog_courses = courses.in_catalog %}
@ -180,6 +180,7 @@
{% include "homepage_ongoing_training", items: catalog_courses %}
{% comment %} {% include "homepage_topics" %} {% endcomment %}
{% comment %}
<button
type="button"
class="popup-trigger"
@ -199,6 +200,7 @@
data-toggle-modal>
Click
</button>
{% endcomment %}
</main>
{% include "footer" %}

View File

@ -26,3 +26,4 @@ RENAISSANCE = "YFykqX1u0d3HveONc5I9CKnJ1"
SANDATA = "HdZFoXGCFpt8NnTOzIQY0kVDj"
LUMINATE_US = "p5fidpuedHaOlPnd8EcpxzQMG"
SKAN = "89qJQDaFl3DvIpSSOUC5PM9V6"
KARBON = "peQbnkfUnYLGPfIzyCxfLs634"

29
Scripts/Karbon/Apikeys.py Normal file
View File

@ -0,0 +1,29 @@
SKUID = "shdX7ht5PZHoOBKOZqZsTMaCJ"
UNKNOWN = "SlpQlju219WnWogn94dQUT6Yt"
FORCEMANAGER = "3ia7mWFkdeALYQFYoB51yh6Ov"
TALKSPACE_CORE = "2vfHw6ksqGfT1gUhPM8pXx2wW"
WILDHEALTH_EDPORTAL = "HWxj6VTNPwbc3WghFTPzr7SjE"
NORMSANDBOX = "SlpQlju219WnWogn94dQUT6Yt"
WALMARTPROD = "6hUfJdAartHTHhHc0WIRZYPWe"
RECAST = "9LISLpq7Ebqot3Xrggn5twKWZ"
MIZUNO = "stXNF84HWL8aCGeRjHEo2rJ1U"
MIZUNO_RUNNING = "XeRrtgm0BFYPjOjPekVwCdGkW"
SPS = "VNDXh8K4tLYJ-Nvp78bo6w"
ANTHOLOGY = "8ALsk8jDOlynEwn8ScMBSnG87"
TALKSPACE_1099 = "ga5FEVoqrJRZWePHtNnyV2Ep7"
DOXIMITY_INTERNAL = "vAnSR4CvxpII6buj3uT23MPBY"
TERMINUS_EMPLOYEE = "M2er8m0DMQyCyP7zOg3Gbae9k"
BIGIDEAS = "mgGWRtmhebC9xulTXeSohVtop"
ZENJOB = "LIXqtHXEqcXHyN0EtezngnpzA"
DATASNIPPER = "098Odf9CIkk4aQA1lW7tsa9k8"
CHUBB = "m6ZEBesXzpWx2vmp11rEHxrMY"
BIRCHSTREET = "WpMV3jF4q9Om5FjUsrzZifduE"
G2 = "JRDpCGQ7vSRiva6t5OkWDr5eJ"
DOUGLASELLIMAN = "Bknf8kidbluRfcKu3m3lKoxS8"
CIN7 = "51BNlRsLYKQxSu1q1UQq7F63j"
FULLSTORY = "ePChrDWLegENa2qnfb259O2Ki"
RENAISSANCE = "YFykqX1u0d3HveONc5I9CKnJ1"
SANDATA = "HdZFoXGCFpt8NnTOzIQY0kVDj"
LUMINATE_US = "p5fidpuedHaOlPnd8EcpxzQMG"
SKAN = "89qJQDaFl3DvIpSSOUC5PM9V6"
KARBON = "peQbnkfUnYLGPfIzyCxfLs634"

Binary file not shown.

View File

@ -0,0 +1,40 @@
import Apikeys
import requests
import pandas as pd
IMPORTFILE = '~/Downloads/karbon-existing-groups.csv'
APIKEY = Apikeys.KARBON
HEADERS = {"accept": "application/json", "X-Api-Key": APIKEY }
BASEURL = "https://api.northpass.com/v2/"
def grab_groups():
groups_list = []
df = pd.read_csv(IMPORTFILE)
df2 = df[[ "customer_id", "customer_name" ]].copy()
df2.drop_duplicates(subset="customer_id", keep=False, inplace=True)
for row in df2.itertuples():
group = f"{row[2]}--{row[1]}"
cust_id = row[1]
groups_list.append(( group, cust_id ))
for item in groups_list:
print(item)
get_group_url = f"{BASEURL}groups?filter[name][cont]={item[1]}"
try:
response = requests.get(get_group_url, headers=HEADERS)
resp = response.json()
print("-----------------")
print(response.status_code)
print(resp['data'][0]['attributes']['name'])
print(item)
print("-----------------")
except IndexError as e:
print(e)
print(resp['data'])
finally:
pass
if __name__ == "__main__":
grab_groups()

File diff suppressed because it is too large Load Diff

View File

@ -6,9 +6,9 @@ const rl =
input: process.stdin,
output: process.stdout,
})
var userEmail= 'nrasmussen@northpass.com';
var userPassword= 'ecx5pmy!MAN2vgh2knc';
var otp = '238307';
var userEmail= 'ajoo@northpass.com';
var userPassword= '!MAN2vgh2knc';
var otp = '';
var schoolUUID = '52d19519-103f-45e3-9fa8-d21baa0f8aaa'
var courseUUIDs = [
'81ea3e9b-c651-42c3-8c33-639a72ebe66f',
@ -22,104 +22,6 @@ var courseUUIDs = [
'e78fffce-0e95-4f55-a419-05be0015a2cf',
'd3afe5e0-8725-49e1-93b7-4b03c68c9e84',
'd3afe5e0-8725-49e1-93b7-4b03c68c9e84',
'33f0809a-4535-4adc-af9d-9dcf9fa3e17d',
'33f0809a-4535-4adc-af9d-9dcf9fa3e17d',
'22c1831f-6e12-423b-9959-6afb62fa06a9',
'ccaaa9cf-a2a4-41e5-9e2d-2bff780e8b19',
'129f8d36-d04d-4024-9a16-193168dd6f5b',
'18c57beb-bd9f-4824-b93e-0275ab6357eb',
'7fc8fce2-0b15-47d9-ac48-00af68080d32',
'fdffe064-0437-4e05-9827-a70a04085851',
'771dc42d-0b85-413c-839b-a29114966159',
'1c4b54f6-ee34-43e3-baf6-a83d3baef2c9',
'1c4b54f6-ee34-43e3-baf6-a83d3baef2c9',
'1e89fea6-45f1-4b42-bbc5-2005c6cb7696',
'1e89fea6-45f1-4b42-bbc5-2005c6cb7696',
'076c0520-b0ca-4ac7-8d01-80661e5bb567',
'ecfeef35-f3e8-462c-8da0-5b2fae9f7d47',
'c3d746ab-5ca2-4609-8216-a9294f1d89bb',
'e78fffce-0e95-4f55-a419-05be0015a2cf',
'e78fffce-0e95-4f55-a419-05be0015a2cf',
'f6fd00bf-bb76-4b3b-bd8c-fb8c87a8da2e',
'0d439e90-3a0e-4048-81a5-307f5f1f0bab',
'68aa29fd-cd54-4c75-ac77-4cc545a151c2',
'627aae1d-d35f-4cb4-82ac-a23cb9a59b97',
'627aae1d-d35f-4cb4-82ac-a23cb9a59b97',
'f870c9af-7185-46b1-9648-2e412d622cb1',
'aaf85e41-8691-4ce7-ae83-dea900b4dd09',
'414fa32b-335a-4891-acb3-0082ab428e9c',
'64eb148a-65e2-4ec2-bd32-d723cab41499',
'e15e5a79-4167-4d7e-870e-b54082c5081f',
'7de842d9-5482-4b3a-bffc-d01d8d683dfd',
'7de842d9-5482-4b3a-bffc-d01d8d683dfd',
'a9a4e820-671a-458e-91b5-a1e760de06bb',
'72db9ed2-2c25-4252-803f-ce292a6f93eb',
'7bc1bbc1-3d28-4655-89ad-00098f5c5c9f',
'033e17be-73f8-475c-8f98-ab61fdc8a0b1',
'a5eb130c-171e-4b77-bd99-f738672ec1be',
'c6930c25-4bb6-427a-9b61-94e36ffd9f0b',
'44a163d1-6995-4f07-92dc-3f37b8946260',
'0b53f011-7e85-43b6-8c21-a9ec718789c2',
'0b53f011-7e85-43b6-8c21-a9ec718789c2',
'a094d994-e971-46b4-8b19-85d9e949b8ea',
'bbb33e0a-30df-46a4-bb37-22515df1daf5',
'5acdc29e-9eba-45f9-b397-97e5d1d76842',
'44a163d1-6995-4f07-92dc-3f37b8946260',
'627aae1d-d35f-4cb4-82ac-a23cb9a59b97',
'c3d746ab-5ca2-4609-8216-a9294f1d89bb',
'f870c9af-7185-46b1-9648-2e412d622cb1',
'f870c9af-7185-46b1-9648-2e412d622cb1',
'78d8a00b-7967-4aef-8c71-b7e443316b65',
'78d8a00b-7967-4aef-8c71-b7e443316b65',
'24544c73-28b7-4dfe-a5a0-638029bd15cf',
'd61cf500-7458-4d2f-aff5-ed85bb18b486',
'8dabb292-7554-44ae-aef4-d5feb838f8ac',
'5f671fa9-1eca-42e5-833d-30010481b669',
'5f671fa9-1eca-42e5-833d-30010481b669',
'ad4411e6-ca5b-4178-9500-7f3d43139b4c',
'3de77578-992f-4c2c-9d65-3019819ea78a',
'edd503f7-bb1a-462f-b89f-17657a488c46',
'3de77578-992f-4c2c-9d65-3019819ea78a',
'237363c2-df39-40e2-861f-8f0818a4d5e1',
'2acfd337-adc9-437b-a174-acf90c4309d3',
'48831e70-42af-4373-883c-d00c77c7aa05',
'f870c9af-7185-46b1-9648-2e412d622cb1',
'cc0cd185-3ff3-431e-b808-507b5d15a7d7',
'2d5775cc-0e70-430a-a77f-42f16457a481',
'aaf9a4dc-bd8b-49ed-a61d-bf30c9da1d0e',
'f870c9af-7185-46b1-9648-2e412d622cb1',
'f870c9af-7185-46b1-9648-2e412d622cb1',
'f870c9af-7185-46b1-9648-2e412d622cb1',
'f870c9af-7185-46b1-9648-2e412d622cb1',
'44a163d1-6995-4f07-92dc-3f37b8946260',
'44a163d1-6995-4f07-92dc-3f37b8946260',
'35d8f6c6-c1a0-4909-bc2d-6538bf4f4592',
'35d8f6c6-c1a0-4909-bc2d-6538bf4f4592',
'35d8f6c6-c1a0-4909-bc2d-6538bf4f4592',
'b8e175ea-c2c3-47a7-ae39-8cc5845e5f29',
'5f671fa9-1eca-42e5-833d-30010481b669',
'db66fd2d-1cb2-4880-bc99-1f7cb791f157',
'db66fd2d-1cb2-4880-bc99-1f7cb791f157',
'db66fd2d-1cb2-4880-bc99-1f7cb791f157',
'db66fd2d-1cb2-4880-bc99-1f7cb791f157',
'db66fd2d-1cb2-4880-bc99-1f7cb791f157',
'599c93ad-99ad-4f1d-98af-af4324f9b845',
'db66fd2d-1cb2-4880-bc99-1f7cb791f157',
'db66fd2d-1cb2-4880-bc99-1f7cb791f157',
'8c1b2226-9483-4929-84b0-f00f1937c788',
'28c37e7b-97a6-49ae-af7b-b083c6d9dbe2',
'9e03ddbf-9587-4200-8b3f-35f023718a7e',
'f61ee63a-7aca-40fb-a93c-07fcb6ff7c60',
'83a35da3-dc4c-4e20-b62d-739fe037039e',
'44a163d1-6995-4f07-92dc-3f37b8946260',
'28c37e7b-97a6-49ae-af7b-b083c6d9dbe2',
'f61ee63a-7aca-40fb-a93c-07fcb6ff7c60',
'989b4c39-8200-4370-9ec2-5a0b38b36e0e',
'a0329d9a-06c5-4f68-aa3e-ed06173ab7c3',
'bd4f8303-5a3a-4fa9-b3cd-0fca17c9e952',
'1da1bce7-4454-4c28-b1e1-6ee5536dba13',
'db675072-9262-4acc-af73-5b8d7a5595a2',
'6daa4beb-3ac0-41ff-a279-e377e3375ce8',
'1da1bce7-4454-4c28-b1e1-6ee5536dba13',
]
var schoolNameToCloneTo = "Anthology U";