Update index.html

Ryan Danenberg committed commitfac7b8af1a6cc6541708c01eaabc43b416ba1c76 Browse files
1 file changed+7−1
index.html+7−1View file
@@ -1363,6 +1363,7 @@
// Auth Session State
const AUTH_TOKEN_KEY = "TIMESHEETS_AUTH_TOKEN_V1";
const AUTH_USER_KEY = "TIMESHEETS_AUTH_USER_V1";
+ const PROJECT_ID = '921e3a77-5246-4c5b-8eba-edc74b1ba247';
let authToken = localStorage.getItem(AUTH_TOKEN_KEY) || null;
let currentUser = null;
@@ -1413,7 +1414,7 @@
// -------------------------------------------------------------
function getAuthHeaders(customHeaders = {}) {
const headers = { ...customHeaders };
- if (authToken && !authToken.startsWith('demo-token-')) {
+ if (authToken) {
headers['Authorization'] = `Bearer ${authToken}`;
}
return headers;
@@ -1430,6 +1431,11 @@
});
}
+ function unwrapRow(data) {
+ if (!data || typeof data !== 'object') return data;
+ return data.row || data.item || data;
+ }
+
function isTempId(id) {
if (!id || typeof id !== 'string') return true;
return id.startsWith('draft_') || id.startsWith('proj_') || id.startsWith('assign_') || id.startsWith('day_') || id.startsWith('temp_');