Finished Script to push notes to GonG, just need an API Key. Pipedrive templates, Skuid Templates, got TripleSeat's templates ready for their sign in page. Few notes.

This commit is contained in:
Norm Rasmussen
2023-07-25 17:07:33 -04:00
parent 08c8f78f1c
commit d2378e4f44
26 changed files with 512 additions and 695 deletions

Binary file not shown.

View File

@ -18,7 +18,7 @@
{% assign category_uuid = categories_uuids | slice: y %}
<section class="courses-section" item-categories="{{ category_uuid }}">
<div class="courses-section-header">
<h3 class="courses-title strong">
<h3 class="courses-title strong">
{% assign category_name = categories_names | slice: y %}
{% if category_name contains 'Pipedrive courses' %}
@ -38,13 +38,115 @@
<span class="lang-de">Marketingkurse</span>
<span class="lang-es">Cursos de Marketing</span>
<span class="lang-fr">Cours de Marketing</span>
<span class="lang-br">Cursos de Marketing</span>
<span class="lang-br">Cursos de Marketing</span>
{% elsif category_name contains 'Automations' %}
<span class="lang-en">Automations</span>
<span class="lang-de">Automatisierungen</span>
<span class="lang-es">Automatizaciones</span>
<span class="lang-fr">Automatisations</span>
<span class="lang-br">Automações</span>
{% elsif category_name contains 'Campaigns' %}
<span class="lang-en">Campaigns</span>
<span class="lang-de">Kampagnen</span>
<span class="lang-es">Campañas</span>
<span class="lang-fr">Campagnes</span>
<span class="lang-br">Campanhas</span>
{% elsif category_name contains 'Data import' %}
<span class="lang-en">Data import</span>
<span class="lang-de">Datenimport</span>
<span class="lang-es">Importación de datos</span>
<span class="lang-fr">Importation de données</span>
<span class="lang-br">importação de dados</span>
{% elsif category_name contains 'Deals and Sales Pipelines' %}
<span class="lang-en">Deals and Sales Pipelines</span>
<span class="lang-de">Deals und Vertriebspipelines</span>
<span class="lang-es">Tratos y canalizaciones de ventas</span>
<span class="lang-fr">Offres et pipelines de ventes</span>
<span class="lang-br">Negociações e Pipelines de Vendas</span>
{% elsif category_name contains 'Documents and Invoicing' %}
<span class="lang-en">Documents and Invoicing</span>
<span class="lang-de">Dokumente und Rechnungen</span>
<span class="lang-es">Documentos y Facturación</span>
<span class="lang-fr">Documents et facturation</span>
<span class="lang-br">Documentos e Faturamento</span>
{% elsif category_name contains 'Email and communications' %}
<span class="lang-en">Email and communications</span>
<span class="lang-de">E-Mail und Kommunikation</span>
<span class="lang-es">Correo electrónico y comunicaciones</span>
<span class="lang-fr">Courriel et communications</span>
<span class="lang-br">E-mail e comunicações</span>
{% elsif category_name contains 'Insights and reporting' %}
<span class="lang-en">Insights and reporting</span>
<span class="lang-de">Erkenntnisse und Berichterstattung</span>
<span class="lang-es">Resultados e informes</span>
<span class="lang-fr">Résultats et rapports</span>
<span class="lang-br">Informações e relatórios</span>
{% elsif category_name contains 'Integrations' %}
<span class="lang-en">Integrations</span>
<span class="lang-de">Integrationen</span>
<span class="lang-es">La integración</span>
<span class="lang-fr">L'intégration</span>
<span class="lang-br">Integrações</span>
{% elsif category_name contains 'Lead generation' %}
<span class="lang-en">Lead Generation</span>
<span class="lang-de">Lead Generierung</span>
<span class="lang-es">Generación líder</span>
<span class="lang-fr">Génération de leads</span>
<span class="lang-br">Geração de leads</span>
{% elsif category_name contains 'Pipedrive basics' %}
<span class="lang-en">Pipedrive basics</span>
<span class="lang-de">Pipedrive Grundlagen</span>
<span class="lang-es">Pipedrive Gouplagène</span>
<span class="lang-fr">Pipedrive gouplagène</span>
<span class="lang-br">Noções básicas do Pipedrive</span>
{% elsif category_name contains 'Pipedrive settings' %}
<span class="lang-en">Pipedrive settings</span>
<span class="lang-de">Pipedrive-Einstellungen</span>
<span class="lang-es">Configuración de Pipedrive</span>
<span class="lang-fr">Paramètres Pipedrive</span>
<span class="lang-br">Configurações do Pipedrive</span>
{% elsif category_name contains 'Privacy and security' %}
<span class="lang-en">Privacy and security</span>
<span class="lang-de">Privatsphäre und Sicherheit</span>
<span class="lang-es">Privacidad y seguridad</span>
<span class="lang-fr">Confidentialité et sécurité</span>
<span class="lang-br">Privacidade e segurança</span>
{% elsif category_name contains 'Projects' %}
<span class="lang-en">Projects</span>
<span class="lang-de">Projekte</span>
<span class="lang-es">Proyectos</span>
<span class="lang-fr">Projets</span>
<span class="lang-br">Projetos</span>
{% elsif category_name contains 'User management' %}
<span class="lang-en">User management</span>
<span class="lang-de">Benutzerverwaltung</span>
<span class="lang-es">Gestión de usuarios</span>
<span class="lang-fr">Gestion des utilisateurs</span>
<span class="lang-br">gerenciamento de usuários</span>
{% elsif category_name contains 'Spanish' %}
<span class="lang-en">Spanish</span>
<span class="lang-de">Spanisch</span>
<span class="lang-es">Español</span>
<span class="lang-fr">Espagnol</span>
<span class="lang-br">Espanhol</span>
<span class="lang-en" style="display:none;">Spanish</span>
<span class="lang-de" style="display:none;">Spanisch</span>
<span class="lang-es" style="display:none;">Español</span>
<span class="lang-fr" style="display:none;">Espagnol</span>
<span class="lang-br" style="display:none;">Espanhol</span>
{% elsif category_name contains 'German' %}
<span class="lang-en" style="display:none;"></span>
<span class="lang-de" style="display:none;"></span>
<span class="lang-es" style="display:none;"></span>
<span class="lang-fr" style="display:none;"></span>
<span class="lang-br" style="display:none;"></span>
{% elsif category_name contains 'French' %}
<span class="lang-en" style="display:none;"></span>
<span class="lang-de" style="display:none;"></span>
<span class="lang-es" style="display:none;"></span>
<span class="lang-fr" style="display:none;"></span>
<span class="lang-br" style="display:none;"></span>
{% elsif category_name contains 'Portuguese' %}
<span class="lang-en" style="display:none;"></span>
<span class="lang-de" style="display:none;"></span>
<span class="lang-es" style="display:none;"></span>
<span class="lang-fr" style="display:none;"></span>
<span class="lang-br" style="display:none;"></span>
{% else %}
{{ category_name }}
{% endif %}
@ -66,7 +168,7 @@
</span>
</div>
</div>
<div class="courses-list row">
{% for course in courses.in_catalog %}
{% assign course_categories = course.categories | map: 'id' %}
@ -81,7 +183,7 @@
{% endfor %}
</div>
</section>
{% if number_of_videos <= 3 %}
<style>
{% if number_of_videos == 1 %}
@ -204,7 +306,7 @@
document.querySelectorAll('.course-card-description').forEach((x) => {
$clamp(x, {clamp: 5});
})
{% if current_school.sso_active? %}
var categoriesOrder = ['ALL',
'e2af61ed-3fbc-448d-9d88-3a66b44735b3',
@ -218,7 +320,7 @@
'41abb409-d6f4-4ee9-b07e-0320dc3cc719'
]
{% endif %}
let filtersWrapper = document.querySelector('.courses-filter');
let coursesWrapper = document.querySelector('.courses');
categoriesOrder.forEach(category => {

View File

@ -44,6 +44,35 @@
</div>
{% endif %}
<script>
let frenchFilter = document.querySelector('[category-uuid = "757bff69-a942-40ba-9013-c111c35c0dff"]');
let germanDeutchFilter = document.querySelector('[category-uuid = "923e6454-8e23-4e03-8c69-98d8b5c39fdd"]');
let portugeseBRFilter = document.querySelector('[category-uuid = "93e4f5b0-c34e-4d9b-837b-ce36fd34d19e"]');
let spanishFilter = document.querySelector('[category-uuid = "2f2aab71-9b6c-45fd-8b46-ef61cadb9927"]');
frenchFilter.style.display = 'none';
germanDeutchFilter.style.display = 'none';
portugeseBRFilter.style.display = 'none';
spanishFilter.style.display = 'none';
// if(window.location.href.includes('de-')){
// frenchFilter.style.display = 'none';
// portugeseBRFilter.style.display = 'none';
// spanishFilter.style.display = 'none';
//} else if(window.location.href.includes('es-')){
// frenchFilter.style.display = 'none';
// germanDeutchFilter.style.display = 'none';
// portugeseBRFilter.style.display = 'none';
//} else if(window.location.href.includes('fr-')){
// germanDeutchFilter.style.display = 'none';
// portugeseBRFilter.style.display = 'none';
// spanishFilter.style.display = 'none';
//} else if(window.location.href.includes('br-')){
// frenchFilter.style.display = 'none';
// germanDeutchFilter.style.display = 'none';
// spanishFilter.style.display = 'none';
//}
</script>
<style>
.courses-filter {
display: flex;

View File

@ -1,120 +0,0 @@
<div class="faq width-limit">
<h2 class="faq-title">
FAQ
</h2>
<div class="faq-list">
<div class="faq-element" onclick="this.classList.toggle('open')">
<div class="faq-question">
<div class="faq-question-icon">
<i class="far fa-angle-down faq-icon-closed"></i>
<i class="far fa-angle-up faq-icon-opened"></i>
</div>
<div class="faq-question-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt
</div>
</div>
<div class="faq-answer body-s">
At lectus urna duis convallis. Lacus sed viverra tellus in hac habitasse platea dictumst. Enim ut tellus elementum sagittis vitae et leo duis ut. Sed enim ut sem viverra aliquet eget. Urna cursus eget nunc scelerisque.
</div>
</div>
<div class="faq-element" onclick="this.classList.toggle('open')">
<div class="faq-question">
<div class="faq-question-icon">
<i class="far fa-angle-down faq-icon-closed"></i>
<i class="far fa-angle-up faq-icon-opened"></i>
</div>
<div class="faq-question-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</div>
</div>
<div class="faq-answer body-s">
Nunc pulvinar sapien et ligula ullamcorper malesuada proin. Odio ut enim blandit volutpat maecenas volutpat blandit aliquam etiam. Odio euismod lacinia at quis. Eget mauris pharetra et ultrices. Justo nec ultrices dui sapien eget mi proin sed libero. Erat velit scelerisque in dictum non consectetur a. Varius vel pharetra vel turpis nunc. Id aliquet risus feugiat in ante metus dictum at. Tincidunt augue interdum velit euismod in pellentesque massa. Habitant morbi tristique senectus et. Commodo viverra maecenas accumsan lacus vel facilisis volutpat est velit. Iaculis urna id volutpat lacus. Nisl nisi scelerisque eu ultrices vitae. A lacus vestibulum sed arcu. Diam sit amet nisl suscipit. Varius quam quisque id diam vel.
</div>
</div>
<div class="faq-element" onclick="this.classList.toggle('open')">
<div class="faq-question">
<div class="faq-question-icon">
<i class="far fa-angle-down faq-icon-closed"></i>
<i class="far fa-angle-up faq-icon-opened"></i>
</div>
<div class="faq-question-text">
Libero id faucibus nisl tincidunt eget. Porttitor eget
</div>
</div>
<div class="faq-answer body-s">
In ante metus dictum at tempor commodo ullamcorper. Aliquet nec ullamcorper sit amet risus nullam eget. Faucibus vitae aliquet nec ullamcorper
</div>
</div>
</div>
</div>
<style>
.faq {
padding-top: 60px;
padding-bottom: 60px;
}
.faq-title {
padding-bottom: 40px;
border-bottom: 1px solid #E4E6E9;
}
.faq-element {
border-bottom: 1px solid #E4E6E9;
padding: 20px 0;
cursor: pointer;
}
.faq-question {
display: flex;
}
.faq-question-icon {
cursor: pointer;
background: #F4F5F6;
border-radius: 50%;
margin-right: 20px;
position: relative;
display: flex;
height: fit-content;
align-self: center;
}
.faq-question-icon > i {
height: 36px;
width: 36px;
}
.faq-question-icon > i::before {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.faq-icon-opened {
display: none;
}
.faq-answer {
display: none;
margin-left: 56px;
margin-top: 10px;
}
.faq-element.open .faq-icon-opened {
display: block;
}
.faq-element.open .faq-icon-closed {
display: none;
}
.faq-element.open .faq-answer {
display: block;
}
@media only screen and (min-width: 768px) {
.faq {
padding-top: 80px;
padding-bottom: 80px;
}
}
</style>
<script>
function toggleFAQ(element) {
element.classList.toggle('open')
}
</script>

View File

@ -3,7 +3,11 @@
<img class="homepage-banner-image" src="https://s3.amazonaws.com/static.northpass.com/pipedrive/homepage_banner.svg" alt="banner">
<div class="green-banner-content">
<h1 class="green-banner-title">
Hi {{ current_person.first_name }}!
<span class="lang-en">Hi {{ current_person.first_name }}!</span>
<span class="lang-de">Hallo {{ current_person.first_name }}!</span>
<span class="lang-es">¡Hola {{ current_person.first_name }}!</span>
<span class="lang-fr">Bonjour {{ current_person.first_name }}!</span>
<span class="lang-br">Oi {{ current_person.first_name }}!</span>
</h1>
<div class="green-banner-text">
<span class="lang-en">Welcome! We have saved your progress about <strong>courses</strong></span>
@ -16,7 +20,7 @@
{% assign in_progress = 0 %}
{% assign not_started = 0 %}
{% assign completed = 0 %}
{% for course in courses.in_catalog %}
{% if course.ribbon != 'VIDEO' %}
{% if course.completed? %}
@ -43,7 +47,7 @@
<span class="lang-br">Em andamento</span>
</div>
</div>
<div class="homepage-banner-stat">
<div class="stat-dot" style="color: var(--purple);">
<i class="fas fa-circle"></i>
@ -59,7 +63,7 @@
<span class="lang-br">Não iniciado</span>
</div>
</div>
<div class="homepage-banner-stat">
<div class="stat-dot" style="color: var(--green);">
<i class="fas fa-circle"></i>
@ -110,7 +114,7 @@
font-size: 14px;
line-height: 25px;
}
@media only screen and (min-width: 768px) {
.homepage-banner .green-banner {
padding-bottom: 0;

View File

@ -1,156 +0,0 @@
{% assign categories_uuids = "" %}
{% assign categories_names = "" %}
{% for course in courses.in_catalog %}
{% if course.categories.size > 0 and course.ribbon == "VIDEO" %}
{% assign course_categories_ids = course.categories | map: 'id' | join: "|||" %}
{% assign course_categories_names = course.categories | map: 'name' | join: "|||" %}
{% assign categories_uuids = categories_uuids | append: course_categories_ids | append: "|||" %}
{% assign categories_names = categories_names | append: course_categories_names | append: "|||" %}
{% endif %}
{% endfor %}
{% assign categories_uuids = categories_uuids | split: "|||" | uniq %}
{% assign categories_names = categories_names | split: "|||" | uniq %}
<div class="courses container width-limit">
{% include "video_filter", uuids: categories_uuids, names: categories_names %}
{% for x in (1..categories_uuids.size) %}
{% assign number_of_videos = 0 %}
{% assign y = x | minus: 1 %}
{% assign category_uuid = categories_uuids | slice: y %}
<section class="courses-section" item-categories="{{ category_uuid }}">
<div class="courses-section-header">
<h3 class="courses-title strong">
{{ categories_names | slice: y }}
</h3>
<div class="courses-section-button" onclick="expandCategory('{{ category_uuid }}')">
<span class="courses-section-button-hide">
<span class="lang-en">Show less</span>
<span class="lang-de"></span>
<span class="lang-es"></span>
<span class="lang-fr"></span>
<span class="lang-br"></span>
</span>
<span class="courses-section-button-expand">
<span class="lang-en">View all</span>
<span class="lang-de"></span>
<span class="lang-es"></span>
<span class="lang-fr"></span>
<span class="lang-br"></span> <i class="fas fa-arrow-right"></i>
</span>
</div>
</div>
<div class="courses-list row">
{% for course in courses.in_catalog %}
{% assign course_categories = course.categories | map: 'id' %}
{% if course.ribbon == "VIDEO" %}
{% for cat in course_categories %}
{% if category_uuid contains cat %}
{% assign number_of_videos = number_of_videos | plus: 1 %}
{% include "cards_video" %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
</div>
</section>
{% if number_of_videos <= 3 %}
<style>
{% if number_of_videos == 1 %}
.courses-section[item-categories="{{ category_uuid }}"] .courses-section-button {
display: none;
}
{% elsif number_of_videos == 2 %}
@media only screen and (min-width: 768px) {
.courses-section[item-categories="{{ category_uuid }}"] .courses-section-button {
display: none;
}
}
{% else %}
@media only screen and (min-width: 1200px) {
.courses-section[item-categories="{{ category_uuid }}"] .courses-section-button {
display: none;
}
}
{% endif %}
</style>
{% endif %}
{% endfor %}
</div>
<style>
.courses-title {
padding-bottom: 40px;
padding-top: 40px;
}
.courses-section:not(:last-of-type) .courses-list {
border-bottom: 1px solid #E1E1FF;
}
.courses-section-filtered .courses-list {
border-bottom: none !important;
}
.courses-list {
padding-bottom: 20px;
}
.courses-section-filtered {
margin-top: 40px;
}
.courses-section-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.courses-section-filtered .courses-section-header {
display: none;
}
.courses-section-button {
color: #0070D6;
cursor: pointer;
}
.courses-section-button-hide {
display: none;
}
.courses-section.courses-section-expanded .courses-section-button-hide {
display: block;
}
.courses-section.courses-section-expanded .courses-section-button-expand {
display: none;
}
@media only screen and (max-width: 767px) {
.courses-section:not(.courses-section-expanded) .course-card:not(:first-child) {
display: none;
}
}
@media only screen and (min-width: 768px) {
.courses-list > div {
padding-left: 15px;
padding-right: 15px;
}
.courses-list {
padding-bottom: 40px;
}
}
@media only screen and (min-width: 768px) and (max-width: 1199px) {
.courses-section:not(.courses-section-expanded) .course-card:nth-child(n+3) {
display: none;
}
}
@media only screen and (min-width: 1200px) {
.courses-section:not(.courses-section-expanded) .course-card:nth-child(n+4) {
display: none;
}
}
</style>
<script>
window.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('.course-card-description').forEach((x) => {
$clamp(x, {clamp: 5});
})
});
function expandCategory(category_uuid) {
document.querySelector(`.courses-section[item-categories="${category_uuid}"]`).classList.toggle('courses-section-expanded');
}
</script>

View File

@ -1,103 +0,0 @@
{% if uuids.size > 0 %}
<div class="courses-filter-hidden np-hidden">
<div class="courses-filter-item courses-filter-item-active body-s strong" onclick="filterItems(this)" category-uuid="ALL">
<span class="lang-en">All topics</span>
<span class="lang-de"></span>
<span class="lang-es"></span>
<span class="lang-fr"></span>
<span class="lang-br"></span>
</div>
{% for x in (1..uuids.size) %}
{% assign y = x | minus: 1 %}
<div class="courses-filter-item body-s strong" onclick="filterItems(this)" category-uuid="{{ uuids | slice: y }}">
{{ names | slice: y }}
</div>
{% endfor %}
</div>
<div class="courses-filter"></div>
{% endif %}
<style>
.courses-filter {
display: flex;
gap: 10px;
margin-top: 40px;
flex-wrap: wrap;
}
.courses-filter-item {
padding: 10px 20px;
border: 2px solid #E4E6E9;
border-radius: 300px;
color: #656E7A;
white-space: nowrap;
cursor: pointer;
}
.courses-filter-item:not(.courses-filter-item-active):hover {
color: var(--black-digital);
}
.courses-filter-item-active {
color: var(--green);
border: 2px solid var(--green);
cursor: default;
}
.category-hidden {
display: none !important;
}
</style>
<script>
addEventListener('DOMContentLoaded', () => {
const categoriesOrder = ['ALL',
'251e90cf-758d-4f98-9256-9d1d40e24872',
'b3c41203-7160-4d6f-bd77-5861bdddcfcd',
'ca378022-dcac-444b-af34-64fdd6527faa',
'0c4cda69-4ea9-4ad9-b279-19233daf043b',
'389df920-414a-4657-9aa7-f6521f26bf3c',
'c0cac114-466c-4952-85e9-aa19023999fa',
'46f1a20a-6948-44eb-9b4a-1f924bbe46c4',
'c082a8e4-00d3-4687-8b84-3dd1bb6c0c9e',
'8604578e-22c9-4886-9943-43b1e2957615',
'c53e5d73-dbd7-479b-ad7a-4e77a41cf62f',
'49a29fce-cdd6-4af4-903a-0d1b58e1194a',
'59e5408f-6538-4581-ac4f-5cfbcfa1c29a'
]
let filtersWrapper = document.querySelector('.courses-filter');
categoriesOrder.forEach(category => {
let filter = document.querySelector(`.courses-filter-item[category-uuid="${category}"]`)
if (filter)
filtersWrapper.appendChild(filter);
});
document.querySelectorAll('.courses-filter-hidden .courses-filter-item').forEach(filter => {
filtersWrapper.appendChild(filter);
});
});
let previousFilter = window.sessionStorage.getItem('last-selected-video-filter');
if (previousFilter) {
addEventListener('DOMContentLoaded', () => {
document.querySelector(`.courses-filter-item[category-uuid="${previousFilter}"]`)?.click();
});
}
function filterItems(element) {
if (!element.classList.contains(('courses-filter-item-active'))) {
document.querySelector('.courses-filter-item-active').classList.remove('courses-filter-item-active');
element.classList.add('courses-filter-item-active');
let selectedCategoryUUID = element.getAttribute('category-uuid');
document.querySelectorAll('.courses-section-expanded').forEach(x => {x.classList.remove('courses-section-expanded')});
document.querySelectorAll('.courses-section-filtered').forEach(x => {x.classList.remove('courses-section-filtered')});
document.querySelectorAll('[item-categories]').forEach(x => {x.classList.remove('category-hidden')});
if (selectedCategoryUUID !== 'ALL') {
document.querySelectorAll(".courses-section").forEach(x => {
if (x.getAttribute('item-categories') === selectedCategoryUUID) {
x.classList.add('courses-section-expanded');
x.classList.add('courses-section-filtered');
} else {
x.classList.add('category-hidden');
}
});
}
window.sessionStorage.setItem('last-selected-video-filter', selectedCategoryUUID);
}
}
</script>

View File

@ -1,3 +1,4 @@
{% comment %} skip-auth {% endcomment %}
{% if current_person.signed_in? == false and current_school.sso_active? == false %}
<script> window.location.replace('/learners/sign_in')</script>
{% else %}

View File

@ -1,3 +1,4 @@
{% comment %} skip-auth {% endcomment %}
{% if current_person.signed_in? == false and current_school.sso_active? == false %}
<script> window.location.replace('/learners/sign_in')</script>
{% else %}

View File

@ -1,3 +1,5 @@
{% comment %} skip-auth {% endcomment %}
{% if current_person.signed_in? == false and current_school.sso_active? == false %}
<script> window.location.replace('/learners/sign_in')</script>
{% else %}

View File

@ -1,3 +1,4 @@
{% comment %} skip-auth {% endcomment %}
{% if current_person.signed_in? == false and current_school.sso_active? == false %}
<script> window.location.replace('/learners/sign_in')</script>
{% else %}

View File

@ -1,3 +1,4 @@
{% comment %} skip-auth {% endcomment %}
{% if current_person.signed_in? == false and current_school.sso_active? == false %}
<script> window.location.replace('/learners/sign_in')</script>
{% else %}

View File

@ -1,3 +1,4 @@
{% comment %} skip-auth {% endcomment %}
{% if current_person.signed_in? == false and current_school.sso_active? == false %}
<script> window.location.replace('/learners/sign_in')</script>
{% else %}

View File

@ -1,3 +1,4 @@
{% comment %} skip-auth {% endcomment %}
{% if current_person.signed_in? == false and current_school.sso_active? == false %}
<script> window.location.replace('/learners/sign_in')</script>
{% else %}

View File

@ -1,3 +1,4 @@
{% comment %} skip-auth {% endcomment %}
{% if current_person.signed_in? == false and current_school.sso_active? == false %}
<script> window.location.replace('/learners/sign_in')</script>
{% else %}

View File

@ -1,101 +0,0 @@
{% comment %} skip-auth {% endcomment %}
{% include 'header' %}
<main class="np-main np-box-container width-limit">
<div class="login-wrapper">
<h3 class="login-title">
<span class="lang-en">Learn for free</span>
<span class="lang-de"></span>
<span class="lang-es"></span>
<span class="lang-fr"></span>
<span class="lang-br"></span>
</h3>
<a class="login-redirection-button" href="/learners/sign_in">
<span class="lang-en">Log in with</span>
<span class="lang-de"></span>
<span class="lang-es"></span>
<span class="lang-fr"></span>
<span class="lang-br"></span> <img class="login-redirection-button-logo" src="https://s3.amazonaws.com/static.northpass.com/pipedrive/Logo.png" alt="pipedrive">
</a>
<div class="login-text-wrapper">
<div class="login-text-strike"></div>
<div class="login-text body-s">
<span class="lang-en">Not a Pipedrive user? Log in below</span>
<span class="lang-de"></span>
<span class="lang-es"></span>
<span class="lang-fr"></span>
<span class="lang-br"></span>
</div>
</div>
</div>
</main>
{% include 'footer' %}
<style>
.login-wrapper {
padding: 40px;
border: 2px solid #E4E6E9;
border-radius: 4px;
margin-top: 80px;
margin-bottom: 80px;
}
.login-redirection-button-logo {
height: 26px;
align-self: center;
}
.login-redirection-button {
display: flex;
justify-content: center;
gap: 8px;
padding: 22px 10px;
background: #F4F5F6;
margin-bottom: 40px;
border-radius: 4px;
}
.login-title {
text-align: center;
margin-bottom: 40px;
}
.login-text-wrapper {
position: relative;
margin-bottom: 40px;
}
.login-text {
background: white;
width: fit-content;
margin: auto;
padding: 0 10px;
max-width: 80%;
text-align: center;
}
.login-text-strike {
border-bottom: 1px solid #E4E6E9;
position: absolute;
top: 50%;
width: 100%;
height: 1px;
z-index: -1;
}
.np-input {
background: none;
border: none;
border-radius: 0;
}
.np-form-field {
display: flex;
align-items: center;
border-bottom: 2px solid #E4E6E9;
}
.login-icon {
margin-left: 20px;
}
footer.main-footer .footer-links {
display: none;
}
.np-box-container {
height: unset;
}
</style>

View File

@ -1,151 +0,0 @@
{% comment %} Page for SSO school to setup first name {% endcomment %}
{% if current_person.signed_in? == false or current_person.first_name %}
<script>
window.location.replace('/app')
</script>
{% else %}
<main class="np-main np-account">
<div class="np-flex np-flex-center width-limit">
<form class="np-form" method="post" id="name-form" novalidate>
<div class="np-card">
<div class="container">
<h2 class="account-form-title">
<span class="lang-en">Please fill out your name</span>
<span class="lang-de"></span>
<span class="lang-es"></span>
<span class="lang-fr"></span>
<span class="lang-br"></span>
</h2>
<div class="row">
<div class="col-xs-12 np-account-form">
<div class="np-form-field">
<label class="account-label" for="first-name">
<span class="lang-en">First name</span>
<span class="lang-de"></span>
<span class="lang-es"></span>
<span class="lang-fr"></span>
<span class="lang-br"></span> *
</label>
<input class="np-input" id="first-name" autocomplete="off">
</div>
<div class="np-form-field">
<label class="account-label" for="last-name">
<span class="lang-en">Last name</span>
<span class="lang-de"></span>
<span class="lang-es"></span>
<span class="lang-fr"></span>
<span class="lang-br"></span> *
</label>
<input class="np-input" id="last-name" autocomplete="off">
</div>
<button type="submit" class="np-button np-button-big np-button-large-font np-form-action">
<span class="lang-en">Save</span>
<span class="lang-de"></span>
<span class="lang-es"></span>
<span class="lang-fr"></span>
<span class="lang-br"></span>
</button>
</div>
</div>
</div>
</div>
</form>
</div>
</main>
<style>
.np-account {
background: #F7F7FE;
padding-top: 40px;
padding-bottom: 40px;
height: 100%;
}
.np-account .np-card {
max-width: unset;
width: 100%;
}
.np-account-form {
margin-bottom: 80px;
}
.account-form-title {
color: var(--green);
margin-bottom: 40px;
}
.np-account .np-card-container {
box-shadow: none;
background: none;
}
.np-input {
background: #FFF;
border-radius: 0;
border: 1px solid #E1E1FF;
margin-top: 5px;
}
.np-form-field {
margin-bottom: 20px !important;
}
.np-account .np-form-action {
margin: 20px 0 0;
}
.avatar-text > h4 {
margin-bottom: 20px;
}
button:disabled, button:hover:disabled {
background: #FFE7E6;
color: gray;
cursor: default;
}
@media only screen and (min-width: 768px) {
.np-account {
padding-top: 80px;
padding-bottom: 80px;
}
.np-account-form {
margin-bottom: 0;
}
}
</style>
<script>
const form = document.getElementById('name-form');
form.addEventListener('input', () => {
const firstName = document.querySelector('#first-name').value;
const lastName = document.querySelector('#last-name').value;
const button = document.querySelector('button');
button.disabled = !(firstName.length > 0 && lastName.length > 0);
});
addEventListener('DOMContentLoaded', () => {
let defaultLastName = "{{ current_person.last_name }}";
let splitName = defaultLastName.split(' ');
if (splitName.length >= 2) {
document.querySelector('#last-name').setAttribute('value', splitName.pop());
document.querySelector('#first-name').setAttribute('value', splitName.join(' '));
}
else {
document.querySelector('#first-name').setAttribute('value', splitName[0]);
document.querySelector('button').disabled = true;
}
})
form.addEventListener('submit', (event) => {
event.preventDefault();
const firstName = document.getElementById('first-name').value;
const lastName = document.getElementById('last-name').value;
const xhr = new XMLHttpRequest();
xhr.open('POST', 'https://www.workato.com/webhooks/rest/bd1a1eb7-7e79-4208-a1db-8e9c7440bcc9/pipedrive-sso-setup-first-and-last-name');
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.send(JSON.stringify({
"first-name": firstName,
"last-name": lastName,
"user-uuid": "{{ current_person.id }}"
}));
xhr.addEventListener('load', () => {
window.sessionStorage.setItem('nameSetup', firstName);
window.location.replace('/app');
});
});
</script>
{% endif %}

View File

@ -28,13 +28,15 @@
</div>
{% endif %}
{% endfor %}
{%- comment -%} <div class="np-sub-navigation-content-item np-sub-navigation-content-item-inactive custom-navigation-content-item" id="certification-sub-nav-item">
<a class="np-sub-navigation-content-item-link custom-navigation-item-link" href="/app/certification">
<i
class="far fa-diploma np-button-color np-sub-navigation-content-item-icon custom-navigation-content-item-icon"></i>
<span style="margin-left: 10px; color: #000000;">Certification</span>
</a>
</div> {%- endcomment -%}
{%- comment -%} {% if current_person.signed_in? %}
<div class="np-sub-navigation-content-item np-sub-navigation-content-item-inactive custom-navigation-content-item" id="certification-sub-nav-item">
<a class="np-sub-navigation-content-item-link custom-navigation-item-link" href="/app/certification">
<i
class="far fa-diploma np-button-color np-sub-navigation-content-item-icon custom-navigation-content-item-icon"></i>
<span style="margin-left: 10px; color: #000000;">Certification</span>
</a>
</div>
{% endif %} {%- endcomment -%}
</div>
</nav>

View File

@ -1,4 +1,9 @@
{% comment %} skip-auth {% endcomment %}
{% if current_person.signed_in? == false %}
<script>
window.location.href = '/learners/sign_in'
</script>
{% endif %}
{% include "header" %}
<div class="page-container">
{% if current_person.signed_in? %}
@ -45,26 +50,65 @@
{% if current_person.properties.cert_status == 'Default' %}
<div class="cert-content-container col-xs-12">
<div class="np-resource-title cert-header">Ready to be Skuid Certified?</div>
<div class="np-resource-title cert-header" style="color: #000;">Ready to be Skuid Certified?</div>
<div class="np-resource-subtitle cert-sub-header registration-sub-header">
<div>The Skuid - Certified Builder Exam assumes knowledge in topics from <a href="https://www.skuidskool.com/app/learning_paths/46ae5253-8c64-426b-a638-e80c08ce29da" class="registration-sub-header-link" target="_blank">Level 1</a>, <a href="https://www.skuidskool.com/app/learning_paths/e7d6e7ca-39ad-4a40-b75c-83d382715c4a" class="registration-sub-header-link" target="_blank">Level 2</a>, <a href="https://www.skuidskool.com/app/learning_paths/e15cd738-8681-4171-9d09-ba3d31c02005" class="registration-sub-header-link" target="_blank">Deploy and Manage Skuid Apps in Salesforce</a>, and the <a href="https://www.skuidskool.com/app/learning_paths/e76d07d4-984b-41a9-b53f-2c300f8eeba9" class="registration-sub-header-link" target="_blank">Explore More</a> learning paths within <a href="/app" class="registration-sub-header-link" target="_blank">Skuid Skool</a>.</div>
<div>The Skuid - Certified Builder Exam assumes knowledge in topics from these learning paths: <a href="https://www.skuidskool.com/app/learning_paths/46ae5253-8c64-426b-a638-e80c08ce29da" class="registration-sub-header-link" target="_blank">Level 1</a>, <a href="https://www.skuidskool.com/app/learning_paths/e7d6e7ca-39ad-4a40-b75c-83d382715c4a" class="registration-sub-header-link" target="_blank">Level 2</a>, <a href="https://www.skuidskool.com/app/learning_paths/e15cd738-8681-4171-9d09-ba3d31c02005" class="registration-sub-header-link" target="_blank">Deploy and Manage Skuid Apps in Salesforce</a>, and <a href="https://www.skuidskool.com/app/learning_paths/e76d07d4-984b-41a9-b53f-2c300f8eeba9" class="registration-sub-header-link" target="_blank">Explore More</a>.</div>
{%- comment -%} <a href="/app" class="registration-sub-header-link" target="_blank">Skuid Skool</a> {%- endcomment -%}
<br>
<div>Click below to register for your exam.</div>
<span style="color: red;">
**Important: Please make sure you use the same email that you are using in Skuid Skool. If you don't, you may not be able to take the exam or get credit for the certification.
</span>
<div>Click below to agree to the terms and register for your exam.</div>
</div>
<div style="align-items: center; display: flex; flex-direction: row;" >
<input type="checkbox" id="skuid-cert-agreement-input" onclick="agreementValidator()" style="margin-right: 10px;"><span>I have read and understand the <a href="https://www.skuid.com/legal/skuid-certification-exam-agreement" target="_blank">Skuid Terms and Agreements*</a></span>
<div style="background: rgb(255, 224, 143, 0.46); border-radius: 10px; padding: 20px 0; width: 80%;">
<div class="np-resource-subtitle cert-sub-header registration-sub-header" style="padding: 0; text-align: center; width: 100%;">
<span>
**Important: Make sure you register with the same email that you use in Skuid Skool.**
</span>
<br>
<span style="font-weight: 400;">If you don't, you may not be able to take the exam or get credit for the certification.</span>
</div>
<div style="align-items: center; display: flex; flex-direction: row; justify-content: center;" >
<input type="checkbox" id="skuid-cert-agreement-input" onclick="agreementValidator()" style="font-weight: 500; margin-right: 10px;"><span style="color: #000000;">I have read and understand the <a href="https://www.skuid.com/legal/skuid-certification-exam-agreement" target="_blank">Skuid Terms and Agreements*</a></span>
</div>
</div>
<form id="skuid-cert-registration-button" name="PrePage" method ="post" action = "https://scotest.authorize.net/payment/CatalogPayment.aspx" target="_blank" style="margin: 25px 0; pointer-events: none;">
{%- comment -%} Test Button 1 {%- endcomment -%}
{%- comment -%} <form id="skuid-cert-registration-button" name="PrePage" method ="post" action = "https://scotest.authorize.net/payment/CatalogPayment.aspx" target="_blank" style="
height: 52px;
margin: 30px 0 25px;
pointer-events: none;">
<input type = "hidden" name = "LinkId" value ="f0b2546a-f610-4015-80b3-19357fbb7b88" />
<input type = "image" src ="//testcontent.authorize.net/images/buy-now-gold.gif" />
</form> {%- endcomment -%}
{%- comment -%} Test Button 2 {%- endcomment -%}
{%- comment -%} <form id="skuid-cert-registration-button" name="PrePage" method = "post" action = "https://scotest.authorize.net/payment/CatalogPayment.aspx" target="_blank" style="
height: 52px;
margin: 30px 0 25px;
pointer-events: none;">
<input type = "hidden" name = "LinkId" value ="f0b2546a-f610-4015-80b3-19357fbb7b88" />
<input type = "image" src ="https://uploads-ssl.webflow.com/5f3ae94493a8451beac90951/64ad5965ca60ccb9008e0cb0_RegisterButtonCert.svg" alt="Register Now" />
</form> {%- endcomment -%}
{%- comment -%} Test Button 3 {%- endcomment -%}
<form id="skuid-cert-registration-button" name="PrePage" method = "post" action = "https://Simplecheckout.authorize.net/payment/CatalogPayment.aspx" target="_blank" style="
height: 52px;
margin: 30px 0 25px;
pointer-events: none;">
<input type = "hidden" name = "LinkId" value ="ed5efb0e-a511-4f73-9d37-d47a2b6db15e" />
<input type = "image" src ="https://uploads-ssl.webflow.com/5f3ae94493a8451beac90951/64ad5965ca60ccb9008e0cb0_RegisterButtonCert.svg" alt="Register Now" />
</form>
<img src="https://cdn.northpass.io/Skuid/images/cert_registration.svg" alt="exam-registration-image" class="exam-status-image exam-registration-image">
<span style="color: #000; font-size: 20px; font-weight: 500; line-height: 20px; margin-bottom: 20px">Once youve registered, refresh this page to access the prep materials.</span>
{%- comment -%} <span style="
bottom: -200px;
color: #000;
font-size: 1rem;
font-weight: 500;
line-height: 28px;
position: absolute;">Learn more at <a href="https://skuidskool.com/certification" style="color: #000;">skuidskool.com/certification</a></span> {%- endcomment -%}
<img src="https://cdn.northpass.io/Skuid/images/Cert_Registration.svg" alt="exam-registration-image" class="exam-status-image exam-registration-image">
</img>
</div>
{% endif %}
@ -95,7 +139,7 @@
<div class="cert-content-container col-xs-12">
<div class="np-resource-title cert-header">Skuid Certification Exam Prep</div>
<div class="np-resource-subtitle cert-sub-header">Prep, practice, or schedule you exam.</div>
<div class="np-resource-subtitle cert-sub-header" style="color: #000;">Prep, practice, and take your exam.</div>
<div class="cert-exam-prep-cards col-xs-9 col-sm-12">
{%- comment -%} {% if render_practice == true %}{% endif %} {%- endcomment -%}
@ -116,21 +160,32 @@
<div class="cert-card col-xs-12 col-md-3">
<a class="cert-button cert-button-locked" href="#" target="_blank">Exam Not Ready</a>
<div class="cert-card-blurb">
This button will activate when you've received your exam confirmation email
This button will activate when you've received your exam confirmation email.
</div>
</div>
{% elsif current_person.properties.cert_status == 'Exists-qm' %}
<div class="cert-card col-xs-12 col-md-3">
<a class="cert-button" href="#" target="_blank">Take Exam</a>
<a class="cert-button" href="https://ondemand.questionmark.com/home/406287/user?destination=assessments" target="_blank">Take Exam</a>
<div class="cert-card-blurb">
Ready? Take your exam to become certified.
</div>
</div>
{% endif %}
</div>
<span style="font-size: 16px; font-weight: 500; line-height: 20px; margin: 30px 0 15px">
Not seeing what you expect? Refresh this page.
</span>
</div>
<div onclick="callNPWebhook()" style="display: none;" id="webhook-caller-item"></div>
<script>
$( document ).ready(callNPWebhook());
$( document ).ready(function(){
let caller = document.getElementById('webhook-caller-item');
if(caller){
caller.click();
}
});
</script>
{% endif %}
@ -138,8 +193,8 @@
{% if current_person.properties.cert_status == 'Pass' %}
<div class="cert-content-container col-xs-12 exam-status-container">
<img src="https://cdn.northpass.io/Skuid/images/exam_passed_background.svg" alt="exam-passed-background" class="exam-status-image">
<a class="cert-button-big share-cert-button" href="#">View Credential</a>
<img src="https://s3.amazonaws.com/static.northpass.com/Skuid/images/cert_exam_passed.svg" alt="exam-passed-background" class="exam-status-image">
<a class="cert-button-big share-cert-button" href="{{ current_person.properties.accredible_url }}" target="_blank">View Credential</a>
</img>
</div>
{% endif %}
@ -147,8 +202,8 @@
{% comment %}=============================================== FAILED ======================================================{% endcomment %}
{% if current_person.properties.cert_status == 'Fail' %}
<div class="cert-content-container col-xs-12">
<div class="np-resource-title cert-header">Exam failed.</div>
<div class="cert-content-container col-xs-12" style="padding-bottom: 30px;">
<div class="np-resource-title cert-header" style="color: #000;">Exam failed.</div>
<div class="np-resource-subtitle cert-sub-header">
If you'd like to try again, <a href="mailto:certification@skuid.com">certification@skuid.com</a>.
</div>
@ -182,9 +237,21 @@
<a class="cert-button-med re-cert-button" href="#">Get recertified</a>
</div> {%- endcomment -%}
<div class="ceritfication-footer" style="
font-size: 20px;
font-weight: 500;
line-height: 20px;
margin-top: 15%;
text-align: center;
width: 100%;">
<span>Learn more at <a href="https://skuid.com/certification" style="color: #0d6efd;">skuid.com/certication</a>.</span>
<br>
<br>
<span>Questions? Contact us at <a href="mailto:certification@skuid.com" style="color: #0d6efd;">certification@skuid.com</a>.</span>
</div>
</main>
</div>
{% include "footer" %}
{%- comment -%} {% include "footer" %} {%- endcomment -%}
<!-- Hotjar Tracking Code for Skool Staging/test site -->
<script>
@ -219,7 +286,8 @@
email: '{{ current_person.email }}',
name: "{{ current_person.first_name }} {{ current_person.last_name }}",
user_id: '{{ current_person.id }}',
cert_status: '{{ current_person.properties.cert_status }}'
cert_status: '{{ current_person.properties.cert_status }}',
learner_points: '{{ current_person.properties.learner_points }}'
}))
})
}
@ -249,6 +317,7 @@
.cert-sub-header{
font-weight: 500;
margin-bottom: 40px;
}
.register-cert-button{
@ -270,6 +339,11 @@
font-size: 8px;
}
.registration-sub-header{
color: #000000;
padding: 0 8%;
}
.registration-sub-header-link{
text-decoration: none;
}
@ -484,8 +558,8 @@
border-radius: 10px;
display: flex;
flex-direction: column;
padding-bottom: 127px;
padding-top: 91px;
/* padding-bottom: 127px; */
padding-top: 50px;
}
.exam-status-container{
@ -590,8 +664,8 @@
.share-cert-button{
font-size: 12px !important;
height: 40px;
margin-top: -38%;
margin-bottom: calc(38% + 24px);
margin-top: -40%;
margin-bottom: calc(34% + 24px);
max-width: 275px;
padding: 11px 0px;
width: 38% !important;

View File

@ -29,6 +29,8 @@
}
}
p,
span,
.np-card-text > p,
.np-card-heading,
.np-top-title,
@ -477,6 +479,11 @@ body {
format("truetype");
}
/* Moving the Logo to the right so it appears centered. */
.np-powered-by {
padding-left: 200px;
}
/* 2. Header */
.np-header-color {
background: transparent;
@ -1020,4 +1027,4 @@ footer {
.np-top-cta-progress-content{
margin-bottom: 0.5rem;
}
}
}

View File

@ -0,0 +1,54 @@
<div class="np-learning-paths-resources">
{% if items.any? %}
{% for learning_path in items %}
{% if learning_path.name == "Tripleseat University Master Course" %}
{% include "cards_learning_path" with learning_path %}
{% endif %}
{% endfor %}
{% for learning_path in items %}
{% if learning_path.name == "Front End Users" %}
{% include "cards_learning_path" with learning_path %}
{% endif %}
{% endfor %}
{% for learning_path in items %}
{% if learning_path.name == "Fast Track-Introductory Course" %}
{% include "cards_learning_path" with learning_path %}
{% endif %}
{% endfor %}
{% for learning_path in items %}
{% if learning_path.name == "TripleseatDirect" %}
{% include "cards_learning_path" with learning_path %}
{% endif %}
{% endfor %}
{% for learning_path in items %}
{% if learning_path.name == "Hotel Certificate Program" %}
{% include "cards_learning_path" with learning_path %}
{% endif %}
{% endfor %}
{% for learning_path in items %}
{% if learning_path.name == "Hotel: Fast Track" %}
{% include "cards_learning_path" with learning_path %}
{% endif %}
{% endfor %}
{% for learning_path in items %}
{% if learning_path.name != "TripleseatDirect" and learning_path.name != "Hotel Certificate Program" and learning_path.name != "Hotel: Fast Track" and learning_path.name != "Tripleseat University Master Course" and learning_path.name != "Front End Users" and learning_path.name != "Fast Track-Introductory Course"%}
{% include "cards_learning_path" with learning_path %}
{% endif %}
{% endfor %}
{% else %}
<div class="np-learning-paths-resources-container">
<div class="np-zero-state-text">
{% t .empty %}
</div>
<img class="np-zero-state-learning-paths" alt="{% t .empty %}" />
</div>
{% endif %}
</div>

View File

@ -0,0 +1,74 @@
<main class="np-box-container np-open-access">
<div class="np-box">
{% include "header_minimal" %}
<div class="np-box-content-container">
<form class="np-form np-box-content" action="{{ form.url }}" method="get" novalidate>
<div class="np-form-headline"> {% t shared.welcome_to_school, school_name: current_school.name %} </div>
<div class="np-form-subheadline"> {% t .headline, key: current_school.course_vocabulary %} </div>
{% form_authenticity_token %}
<div class="np-form-field">
<label class="np-input-label" for="learner_email">
{% t shared.email_address %}
</label>
<input
class="np-input"
autofocus="autofocus"
type="email"
name="email"
id="learner_email"
value="{{ form.email }}"
/>
</div>
<div class="np-form-field">
<label class="np-input-label" for="learner_first_name">
{% t shared.first_name %}
</label>
<input
class="np-input"
type="text"
name="first_name"
id="learner_first_name"
value="{{ form.first_name }}"
/>
</div>
<div class="np-form-field">
<label class="np-input-label" for="learner_last_name">
{% t shared.last_name %}
</label>
<input
class="np-input"
type="text"
name="last_name"
id="learner_last_name"
value="{{ form.last_name }}"
/>
</div>
<div class="np-form-field">
<label class="np-input-label" for="learner_phone_number">
{% t shared.phone_number_optional %}
</label>
<input
class="np-input"
type="text"
name="phone_number"
id="learner_phone_number"
value="{{ form.phone_number }}"
/>
</div>
<div class="np-form-field np-open-access-terms">
<input type="hidden" name="terms" value="0" />
<input id="terms" type="checkbox" name="terms" value="1" />
<label for="terms" class="np-open-access-terms-checkbox">
{{ current_school.custom_terms }}
</label>
</div>
<input
type="submit"
name="commit"
value="{% t shared.enter %}"
class="np-button np-button-big np-form-action"
/>
</form>
</div>
</div>
</main>

View File

@ -25,10 +25,10 @@ const getAllGroups = async (num) => {
}
})
.then(async (res) => {
if (res.data.links.next != null) {
if (res.data.links.next != null) {>
page++;
for (let i = 0; i < res.data.data.length; i++) {
if (res.data.data[i].attributes.status == "live") {
for (let i = 0; i < res.data.d
if (res.data.data[i].attribu
console.log(res.data.data[i].attributes.name)
groupIds.push(res.data.data[i].id)
}

View File

@ -1,7 +1,6 @@
import requests
import markdown
from pathlib import Path
import pathlib
import requests
import itertools
ndir = Path("/Users/normrasmussen/Documents/Work/CustomerNotes/")
@ -12,18 +11,81 @@ def get_files():
# This Section gets the Company name for the payload.
company = str(company)
company_file = company.split("/")[-1]
company_name = company[:-3]
print(company_name)
get_data(company_file, company_name)
company_name = company_file[:-3]
if company_name == "Bolt":
get_data(company_file, company_name)
def get_data(company_file, company_name):
company_path = Path(
f"/Users/normrasmussen/Documents/Work/CustomerNotes/{company_file}")
with company_path.open(mode="r", encoding="utf-8") as md_file:
for num, line in enumerate(md_file, 1):
if line.startswith("## "):
print(f"Line Number is {num} and the line is {line}")
sdir = "/Users/normrasmussen/Documents/Work/CustomerNotes/"
notes = []
line_num_array = []
text_array = []
company_path = Path(
f"/Users/normrasmussen/Documents/Work/CustomerNotes/{company_file}"
)
with company_path.open(mode="r", encoding="utf-8") as md_file:
line = company_path.read_text()[3]
# This first section finds the lines and adds them to an array.
# It also finds the "date" lines and adds them to a second array.
for num, line in enumerate(md_file):
line = line[:-1]
text_array.append(line)
if line.startswith("## "):
line_num_array.append(num)
# Since I don't know the last line of the file, I take the last
# number in the title array and adds 500,
# going well beyond the last line.
last_line = (line_num_array[-1], 500)
line_num_array.append(sum(last_line))
# This magic pairs each title based on the line numbers.
line_pairs = list(itertools.pairwise(line_num_array))
# We take each "grouping" and add it to an array as each singular item.
for index in line_pairs:
indv_notes = text_array[index[0] : index[1]]
notes.append(indv_notes)
# Now we are cleaning it up.
# Removing the hashes from the dates and titles.
for note in notes:
date = note[0][2:]
if note[2].startswith("### "):
note_title = note.pop(2)[3:]
copy = " ".join(note[1:])
def add_to_payload(date, note_title, copy, company_name):
payload = {
"records": [
{
"Author": "nrasmussen@gainsight.com",
"ContextName": company_name,
"TypeName": "Meeting",
"ExternalId": "WHAT IS THIS?",
"Subject": note_title,
"Notes": copy,
"ActivityDate": date,
"companyName": "AAR Corp Hardware Abscoa Division",
"internalAttendees": ["Norm Rasmussen"],
"externalAttendees": [""],
},
]
}
send_to_gs(payload)
def send_to_gs(payload):
url = "https://gongnxt.gainsightcloud.com/v1/ant/es/activity/bulk"
json = payload
headers = {
"Content Type": "JSON",
"Accesskey": APIKEY,
}
response = requests.post(url=url, headers=headers, json=payload)
if __name__ == "__main__":

View File

@ -0,0 +1,31 @@
let observer;
let config = {
attributes: true,
childList: true,
subtree: true
};
let eoqMutationObserver = () => {
let observeStarter = () => {
observer.observe(document,config);
}
let callback = () => {
if(document.querySelector('[data-test="activity-title"]').innerHTML == 'Let Us Know How We Did!'){
document.querySelector('[data-test="continue-button"]').click();
}
observer.disconnect();
observeStarter();
};
observer = new MutationObserver(() => {
if(document.querySelector('[data-test="quiz-summary"]')){
callback();
}
})
observer.observe(document, config);
}
eoqMutationObserver();