refactor naming

This commit is contained in:
Beverly Nguyen
2025-01-23 11:53:27 -08:00
parent 8f30f9320a
commit cae2ec1a6d
3 changed files with 8 additions and 10 deletions

View File

@@ -4,6 +4,7 @@
let currentType = 'service';
const tableContainer = document.getElementById('activityContainer');
const currentUserName = tableContainer.getAttribute('data-currentUserName');
const currentServiceId = tableContainer.getAttribute('data-currentServiceId');
const COLORS = {
delivered: '#0076d6',
failed: '#fa9441',
@@ -212,7 +213,7 @@
return;
}
var url = type === 'service' ? `/daily_stats.json` : `/daily_stats_by_user.json`;
var url = type === 'service' ? `/services/${currentServiceId}/daily-stats.json` : `/services/${currentServiceId}/daily-stats-by-user.json`;
return fetch(url)
.then(response => {
if (!response.ok) {