The sessions portion of the menu works.

This commit is contained in:
Scott Idem
2020-01-31 17:26:51 -05:00
parent 9fd21b5221
commit a687646534
4 changed files with 225 additions and 21 deletions

View File

@@ -44,8 +44,12 @@
<div id="launcher_menu" class="launcher_menu col-3 border-right">
<div id="event_files_menu" class="event_files_menu"></div>
<div id="location_files_menu" class="location_files_menu"></div>
<div id="sessions_menu" class="sessions_menu"></div>
<div id="location_name" class="location_name"></div>
<div id="sessions_menu" class="sessions_menu d-none">
<h2>Sessions</h2>
<ul class="list-group list-group-flush" role=""></ul>
</div>
<!--<div id="location_name" class="location_name"></div>-->
<div id="launcher_location_name" class="launcher_location_name"><span id="location_name"></span><span id="event_name"></span></div>
</div>
<div id="launcher_sessions" class="launcher_sessions col"></div> <!-- end location details div -->
@@ -90,6 +94,7 @@
<script>const api = require('./js/module_api');</script>
<script>const idb = require('./js/module_app_idb');</script>
<script>const ui = require('./js/module_app_ui');</script>
<script>const uiv2 = require('./js/module_app_ui_v2');</script>
<!--<script src="js/api.js"></script>-->
<!--<script src="js/script.js"></script>-->
<!--<script src="js/testing.js"></script>-->
@@ -230,8 +235,8 @@
const api_auth_loop_interval = 100; // only runs on start up
const open_tables_loop_interval = 10; // only runs on start up
const update_idb_loop_interval = 100; // loop forever; update when check datetime has passed
const idb_to_launcher_loop_interval = 250; // loop forever; only run when one or more tables are updated
const update_idb_loop_interval = 500; // loop forever; update when check datetime has passed
const idb_to_launcher_loop_interval = 1000; // loop forever; only run when one or more tables are updated
const update_render_loop_interval = 1000; // loop forever; only run when the launcher object is safe
const check_file_cache_loop_interval = 250; // loop forever; only run after the event_file table has updated
@@ -353,6 +358,7 @@
run_idb_to_launcher = true; // Set to true so that the launcher object is rebuilt
safe_to_render_launcher = false; // Set to false so that the launcher render only starts after the launcher object has updated
idb_event_check_datetime = Date.now() + idb_event_check_period;
let render_event_records_result = uiv2.render_event_records(); // NOTE: v2 idb to ui
})
.catch(function (error) {
console.log('Trying to check events. Something went wrong. Expired token?');
@@ -370,17 +376,20 @@
run_idb_to_launcher = true; // Set to true so that the launcher object is rebuilt
safe_to_render_launcher = false; // Set to false so that the launcher render only starts after the launcher object has updated
idb_event_location_check_datetime = Date.now() + idb_event_location_check_period;
let render_event_location_records_result = uiv2.render_event_location_records(); // NOTE: v2 idb to ui
}
if (idb_event_session_check_datetime < Date.now()) {
console.log('Time to check event location sessions');
let v2_event_sessions = await api.v2_get_event_location_sessions(axios, event_location_id);
console.log('**** *** Time to check event --location-- sessions *** ****');
let v2_event_sessions = await api.v2_get_event_sessions(axios, event_id);
//tbl_event_session.clear();
for (var i in v2_event_sessions) {
tbl_event_session.setItem(v2_event_sessions[i].id.toString(), v2_event_sessions[i]);
}
run_idb_to_launcher = true; // Set to true so that the launcher object is rebuilt
//run_idb_to_launcher = true; // Set to true so that the launcher object is rebuilt
safe_to_render_launcher = false; // Set to false so that the launcher render only starts after the launcher object has updated
idb_event_session_check_datetime = Date.now() + idb_event_session_check_period;
let render_event_session_records_result = uiv2.render_event_session_records(); // NOTE: v2 idb to ui
}
if (idb_event_presentation_check_datetime < Date.now()) {