Add USB checkout system and SSO profile page
New Features: - USB Device checkout/check-in system with barcode scanning - displayusb.asp: List all USB devices with status - addusb.asp: Add new USB devices via barcode scan - checkout_usb.asp/savecheckout_usb.asp: Check out USB to SSO - checkin_usb.asp/savecheckin_usb.asp: Check in with wipe confirmation - usb_history.asp: Full checkout history with filters - api_usb.asp: JSON API for AJAX lookups - displayprofile.asp: SSO profile page showing user info and USB history - Date/time format changed to 12-hour (MM/DD/YYYY h:mm AM/PM) - SSO links in USB history now link to profile page via search Database: - New machinetypeid 44 for USB devices - New usb_checkouts table for tracking checkouts Cleanup: - Removed v2 folder (duplicate/old files) - Removed old debug/test files - Removed completed migration documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -50,6 +50,14 @@
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.fiscal-week {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #888;
|
||||
letter-spacing: 2px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.header-center {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
@@ -443,6 +451,10 @@
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.fiscal-week {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.location-title {
|
||||
font-size: 12px;
|
||||
}
|
||||
@@ -562,6 +574,10 @@
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
.fiscal-week {
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
.location-title {
|
||||
font-size: 40px;
|
||||
}
|
||||
@@ -664,7 +680,7 @@
|
||||
<img src="ge-aerospace-logo.svg" alt="GE Aerospace">
|
||||
</div>
|
||||
<div class="header-center">
|
||||
|
||||
<div class="fiscal-week" id="fiscalWeek"></div>
|
||||
<h1>West Jefferson Events</h1>
|
||||
</div>
|
||||
<div class="filter-container">
|
||||
@@ -709,7 +725,40 @@
|
||||
return urlParams.get('businessunit') || '';
|
||||
}
|
||||
|
||||
// Update clock
|
||||
// Calculate fiscal week (GE fiscal year starts first Monday of January)
|
||||
function getFiscalWeek() {
|
||||
const today = new Date();
|
||||
const year = today.getFullYear();
|
||||
|
||||
// Find first Monday of current year
|
||||
let jan1 = new Date(year, 0, 1);
|
||||
let dayOfWeek = jan1.getDay(); // 0=Sunday, 1=Monday, etc.
|
||||
let daysToMonday = (dayOfWeek === 0) ? 1 : (dayOfWeek === 1) ? 0 : (8 - dayOfWeek);
|
||||
let firstMonday = new Date(year, 0, 1 + daysToMonday);
|
||||
|
||||
// If we're before the first Monday, use previous year
|
||||
if (today < firstMonday) {
|
||||
let prevJan1 = new Date(year - 1, 0, 1);
|
||||
let prevDayOfWeek = prevJan1.getDay();
|
||||
let prevDaysToMonday = (prevDayOfWeek === 0) ? 1 : (prevDayOfWeek === 1) ? 0 : (8 - prevDayOfWeek);
|
||||
firstMonday = new Date(year - 1, 0, 1 + prevDaysToMonday);
|
||||
}
|
||||
|
||||
// Calculate days from first Monday
|
||||
const diffTime = today - firstMonday;
|
||||
const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24));
|
||||
const fiscalWeek = Math.floor(diffDays / 7) + 1;
|
||||
|
||||
return fiscalWeek;
|
||||
}
|
||||
|
||||
// Update fiscal week display
|
||||
function updateFiscalWeek() {
|
||||
const fiscalWeek = getFiscalWeek();
|
||||
document.getElementById('fiscalWeek').textContent = 'Fiscal Week ' + fiscalWeek;
|
||||
}
|
||||
|
||||
// Update clock and fiscal week
|
||||
function updateClock() {
|
||||
const now = new Date();
|
||||
const timeString = now.toLocaleString('en-US', {
|
||||
@@ -722,6 +771,7 @@
|
||||
second: '2-digit'
|
||||
});
|
||||
document.getElementById('clock').textContent = timeString;
|
||||
updateFiscalWeek();
|
||||
}
|
||||
|
||||
// Update connection status indicator
|
||||
@@ -1143,6 +1193,9 @@
|
||||
|
||||
// Initialize dashboard
|
||||
function init() {
|
||||
// Display fiscal week
|
||||
updateFiscalWeek();
|
||||
|
||||
// Start clock
|
||||
updateClock();
|
||||
clockInterval = setInterval(updateClock, 1000);
|
||||
|
||||
Reference in New Issue
Block a user