mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-27 17:39:51 -04:00
add gulp reference
This commit is contained in:
4
app/assets/javascripts/setTimezone.js
Normal file
4
app/assets/javascripts/setTimezone.js
Normal file
@@ -0,0 +1,4 @@
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
document.cookie = `timezone=${timeZone}; path=/`;
|
||||
})
|
||||
@@ -416,6 +416,7 @@ def get_dashboard_partials(service_id):
|
||||
def get_dashboard_totals(statistics):
|
||||
|
||||
timezone = request.cookies.get('timezone', 'UTC')
|
||||
print(hilite(f"HURRAY TIMEZONE IS {timezone}"))
|
||||
if current_user.preferred_timezone is not timezone:
|
||||
current_user.update(preferred_timezone=timezone)
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='js/set-timezone.js')}}"></script>
|
||||
<p>{{ session['timezone'] }} </p>
|
||||
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
@@ -61,6 +61,7 @@ const javascripts = () => {
|
||||
paths.src + 'javascripts/fileUpload.js',
|
||||
paths.src + 'javascripts/radioSelect.js',
|
||||
paths.src + 'javascripts/updateContent.js',
|
||||
paths.src + 'javascripts/setTimezone.js',
|
||||
paths.src + 'javascripts/listEntry.js',
|
||||
paths.src + 'javascripts/liveSearch.js',
|
||||
paths.src + 'javascripts/errorTracking.js',
|
||||
|
||||
Reference in New Issue
Block a user