Added functions and grid squares. Good progress! Need to figure out how to get the session key into the javascript file.

This commit is contained in:
Norm Rasmussen
2023-02-21 16:59:41 -05:00
parent 1bcbef6220
commit e81b9e2c14
12 changed files with 328 additions and 269 deletions

View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
{% extends 'head.html' %}
{% block content %}
<h4>Hello! Please enter the emails below.</h4>
{% if error %}
<p class=error><strong> </strong>{{ error }}
{% endif %}
<p><label for="Bulk Add"> Please select the appropriate options below.</label></p>
<form action="{{ url_for("bulk_add")}}" method="post">
<p>Please Copy and Paste Emails of learners you'd like to add</p>
<textarea id="emails" name="emails" rows="4" cols="50"></textarea>
<p>Please select which Groups these learners should be added to. </p>
<select name="groups" id="groups" multiple>
<option></option>
<input type="submit" value="Submit"></select>
</form>
</div>
</div>
</body>
<script src="{{ url_for('static', filename='getallgroups.js')}}"></script>
{% endblock %}

View File

@ -1,21 +1,13 @@
<!DOCTYPE html>
{% extends 'head.html' %}
{% block content %}
<body>
<div class="container">
<header class="header">
<div>
<h1>Hello there, <span id="userName">CUSTOMER SUCCESS MANAGER</span>.</h1>
<img src="/static/NP-Logo-Primary-FC.png" alt="Northpass Full Color Logo"></img>
<p>Today is <span id="currentDate">Monday 1, January 2000</span>.</p>
</div>
<p id="currentTime">{{ request.form.apikey }}</p>
</header>
<h4>Hello! Please select what you'd like to do.</h4>
<main id="cardContainer">
</div>
<div class="card-grid">
<form class="card"
action="{{ url_for('get_people')}}"
method="post">
<a class="card"
<a class="a-card"
onclick="document.forms[0].submit()"
style="cursor:pointer;">
<i class="ri-car-line card__icon"></i>
@ -23,19 +15,29 @@
</a>
</form>
<main id="cardContainer">
<form class="card"
id="get_courses"
action="{{ url_for('get_courses')}}"
method="post">
<a class="card"
<a class="a-card"
onclick="document.forms['get_courses'].submit()"
style="cursor:pointer;">
<i class="ri-plane-line card__icon"></i>
<p class="card__name">Get Courses</p>
</a>
</form>
</main>
<div class="card"
href = "/add"
>
<a class="a-card"
onclick="document.forms['bulk_add'].submit()"
style="cursor:pointer;">
<i class="ri-plane-line card__icon"></i>
<p class="card__name">Get Courses</p>
</a>
</div>
</body>
{% endblock %}

View File

@ -9,12 +9,30 @@
rel="stylesheet"
/>
<title>CSM Bulk Actions</title>
<title>CSM Bulk App</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="{{ url_for('static', filename="css/styles.css") }}" />
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
<body>
<div class="three-verts">
<div class="container">
<header class="header">
<div class="main">
<a href="{{ url_for('render_home')}}">
<img
src="{{ url_for('static', filename="NP-Logo-Primary-FC.png") }}"
alt="Northpass Full Color Logo"
>
</img></a>
</header>
</div>
{% for message in get_flashed_messages() %}
<h2> {{ message }} </h2>
{% endfor %}
{% block content %} {% endblock %}
</html>

View File

@ -1,20 +1,15 @@
<!DOCTYPE html>
{% extends 'head.html' %}
{% block content %}
<body>
<div class="container">
<header class="header">
<div>
<h1>Hello there, CUSTOMER SUCCESS MANAGER.</h1>
<img src="/static/NP-Logo-Primary-FC.png" alt="Northpass Full Color Logo"></img>
</header>
<h4>Hello! Please click below to enter your key.</h4>
{% if error %}
<p class=error><strong>Error! </strong>{{ error }}
<p class=error><strong> </strong>{{ error }}
{% endif %}
<form action="{{ url_for("ask_key")}}" method="post">
<input type="text" name="apikey">
<input type="submit" value="Submit">
</form>
</div>
</div>
</body>
{% endblock %}

View File

@ -0,0 +1,40 @@
<!DOCTYPE html>
{% extends 'head.html' %}
{% block content %}
<h4>Hello! Please select what you'd like to do.</h4>
</div>
<div class="card-grid">
<form class="card"
action="{{ url_for('get_people')}}"
method="post">
<a class="a-card"
onclick="document.forms[0].submit()"
style="cursor:pointer;">
<i class="ri-car-line card__icon"></i>
<p class="card__name">Get People</p>
</a>
</form>
<form class="card"
id="get_courses"
action="{{ url_for('get_courses')}}"
method="post">
<a class="a-card"
onclick="document.forms['get_courses'].submit()"
style="cursor:pointer;">
<i class="ri-plane-line card__icon"></i>
<p class="card__name">Get Courses</p>
</a>
</form>
<div class="card" >
<a class="a-card" href="{{ url_for('add_options')}}"
style="cursor:pointer; color: inherit; text-decoration: none">
<i class="ri-building-line card__icon"></i>
<p class="card__name">Bulk Add</p>
</a>
</div>
</body>
{% endblock %}

17
app/templates/table.html Normal file
View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
{% extends 'head.html' %}
{% block content %}
<h4>Hello! Here are your results.</h4>
<a id="download" href="/downloadcsv">Click here to download as CSV.</a>
</div>
<div class="panda-table">
<!-- Display Converted Table -->
{% for table in tables %}
<h2> {{ titles }}</h2>
{{ table | safe }}
{% endfor %}
</div>
</div>
</body>
{% endblock %}