Dashboard
Messages
Advanced Chatbot
Subscribers
Workshops
Video Resources
Tai Chi Videos
Coach Pei Corner
Johanna Corner
BFSAN Inquiries
Programs
12-Week Risk Reduction
Command Center
Participants
Consent Audit
Baseline Review
Goal Configuration
Weekly Scoring
Interventions
Coach Messages
Analytics
Daily Logs
Email Templates
30-Day Challenge
Nutritional Wellness
Tai Chi Program
Pickleball Program
8-Week Challenge
Soon
Educational Seminar
Soon
System
Cookie Consent Logs
Testimonials
Submissions
Users
System Settings
View Website
Edit Knowledge
Log In
Edit Knowledge Base Item
← Back to List
Title
Category
SubCategory
User Intent
Primary Question
Keywords (comma separated)
Content (Knowledge provided to AI)
@section Styles { /* Tabs Navigation styling */ .tabs-nav { display: flex; gap: 8px; border-bottom: 2px solid #eef0f3; margin-bottom: 25px; padding-bottom: 0; } .tab-btn { background: none; border: none; padding: 14px 22px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14.5px; font-weight: 700; color: var(--text-muted); cursor: pointer; transition: all 0.2s ease; border-bottom: 3px solid transparent; margin-bottom: -2px; display: flex; align-items: center; gap: 8px; } .tab-btn:hover { color: var(--primary-green); background: rgba(8, 85, 54, 0.02); border-top-left-radius: 6px; border-top-right-radius: 6px; } .tab-btn.active { color: var(--primary-green); border-bottom-color: var(--primary-orange); } .tab-content { display: none; animation: fadeIn 0.25s ease-in-out; } .tab-content.active { display: block; } @@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } } /* Filter Pill Styles */ .filter-pill { background: #f1f5f9; border: 1px solid #e2e8f0; color: #475569; padding: 8px 16px; border-radius: 20px; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 6px; } .filter-pill:hover { background: #e2e8f0; } .filter-pill.active { background: var(--primary-green); color: white; border-color: var(--primary-green); } /* Table & Card styles */ .user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-green); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; } .user-table { width: 100%; border-collapse: collapse; } .user-table th { text-align: left; padding: 12px 16px; font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--text-muted); border-bottom: 2px solid #edf2f7; background: #f8fafc; letter-spacing: 0.5px; } .user-table td { padding: 14px 16px; border-bottom: 1px solid #f0f4f8; vertical-align: middle; font-size: 13.5px; } .user-table tr:hover td { background: #fafbff; } .warning-card { background: #fff5f5; border: 1px solid #fed7d7; border-radius: 8px; padding: 20px; color: #9b2c2c; } /* Custom Badges */ .status-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.3px; border: 1px solid transparent; } .badge-success-custom { background: #ecfdf5; color: #047857; border-color: #a7f3d0; } .badge-warning-custom { background: #fffbeb; color: #b45309; border-color: #fde68a; } .badge-danger-custom { background: #fef2f2; color: #b91c1c; border-color: #fecaca; } .badge-info-custom { background: #f0f9ff; color: #0369a1; border-color: #bae6fd; } .badge-purple-custom { background: #faf5ff; color: #6b21a8; border-color: #e9d5ff; } .badge-grey-custom { background: #f8fafc; color: #475569; border-color: #cbd5e1; } } @if (TempData["SuccessMessage"] != null) { @TempData["SuccessMessage"] } @if (TempData["ErrorMessage"] != null) { @TempData["ErrorMessage"] } System Settings & Operations Manage client data, adjust security configurations, and audit administrative event timelines. Client Directory Access Policies Security Audit Logs All Clients 2FA Active 2FA Inactive Clients: 0 Active 2FA: 0 Inactive 2FA: 0 @if (!Model.UsersList.Any()) { No Client Profiles Found No active participant records were detected in the system. } else { Participant Details Email Address 2FA Security Status System Actions @foreach (var user in Model.UsersList) { @(user.FirstName?.Substring(0,1).ToUpper() ?? "U") @user.FirstName @user.LastName ID: @user.Id @user.Email @if (user.TwoFactorEnabled) { Active } else { Inactive } Purge Profile } } Admin 2FA Enforcement Policy To protect sensitive administrator settings and client lists, a system-wide policy can be enforced. If active, administrators will be intercepted upon sign-in and forced to setup a TOTP Authenticator Key. SecuritySettings:RequireAdmin2Fa = @policyEnabled.ToString().ToLower() @(policyEnabled ? "Forced configuration is currently ACTIVE for all administrator profiles." : "Enforcement is currently INACTIVE. Setup is recommended but voluntary.") Verification Cooldown & Lockouts The platform enforces a brute-force cooldown lockout policy. If an account experiences too many consecutive failed OTP attempts, verification is suspended. 5 Attempts Maximum Threshold 15 Minutes Cooldown Cooldown CRITICAL PURGING PROTOCOLS Purging a client profile is an **irreversible system action**. It deletes: Participant Profile details and HbA1c metrics. Daily Nutrition & Hydration log timelines. Weekly waist/weight reflections & check-ins. Dietitian recommendations and direct messaging history. Challenge trackers and physical log timelines. 12-Week Risk Reduction logs and credentials. ⚠️ The account will be completely removed from ASP.NET Core Identity. The user will no longer be able to log in or recover database metrics. Super Admin Authority Access to directory deletion is restricted strictly to accounts possessing **Admin Role Credentials**. Every single deletion requires a verified Super Admin password check to guarantee system accountability. All Security Events Successful Logins Failed Logins / Verifications 2FA Configuration Updates Recovery Code Events Displaying last 100 events @if (!Model.SecurityLogsList.Any()) { No security audit events logged yet Database logs are empty. System events will display here as they occur. } else { User Context Event Action Location & IP Address Activity Details Timestamp (UTC) @foreach (var log in Model.SecurityLogsList) { var (country, cleanMetadata) = ParseMetadata(log.Metadata); @if (log.User != null) { @log.User.FirstName @log.User.LastName @log.User.Email } else { Anonymous / System } @switch (log.EventType) { case "login_success": Login Success break; case "login_pending_2fa": Awaiting 2FA break; case "login_failed": Login Failed break; case "successful_2fa_verification": 2FA Validated break; case "failed_2fa_attempt": 2FA Failed break; case "2fa_enabled": 2FA Enabled break; case "2fa_disabled": 2FA Disabled break; case "recovery_code_used": Recovery Used break; case "recovery_codes_regenerated": Codes Reset break; case "2fa_setup_started": Setup Started break; default: @log.EventType break; } @log.IpAddress @if (!string.IsNullOrEmpty(country)) { @country } @(cleanMetadata ?? log.Metadata) @if (!string.IsNullOrEmpty(log.UserAgent)) { var deviceName = ParseUserAgent(log.UserAgent); string iconClass = deviceName.Contains("Unknown") ? "fa-desktop" : (deviceName.Contains("iPhone") || deviceName.Contains("Android") || deviceName.Contains("iPad") ? "fa-mobile-screen" : "fa-laptop"); @deviceName } @log.CreatedAt.ToString("yyyy-MM-dd HH:mm:ss") } } @Html.AntiForgeryToken() @section Scripts { // TABS SELECTION CONTROLLER function switchTab(tabId) { // Hide all contents document.querySelectorAll('.tab-content').forEach(content => { content.classList.remove('active'); }); // Deactivate all tab buttons document.querySelectorAll('.tab-btn').forEach(btn => { btn.classList.remove('active'); }); // Show target content and button active state const targetContent = document.getElementById(tabId + '-content'); if (targetContent) { targetContent.classList.add('active'); } const targetBtn = document.querySelector(`[onclick="switchTab('${tabId}')"]`); if (targetBtn) { targetBtn.classList.add('active'); } // Store active tab in session storage to persist across page reloads sessionStorage.setItem('activeSettingsTab', tabId); } // CLIENT LISTING FILTERS & SEARCH let currentClientFilter = 'all'; function setClientFilter(filterType, element) { currentClientFilter = filterType; // Update active class on buttons const container = element.parentElement; container.querySelectorAll('.filter-pill').forEach(btn => btn.classList.remove('active')); element.classList.add('active'); filterClients(); } function filterClients() { const query = document.getElementById('clientSearch').value.toLowerCase(); const rows = document.querySelectorAll('#clientTableBody tr'); let total = 0; let active = 0; let inactive = 0; rows.forEach(row => { const name = row.getAttribute('data-name').toLowerCase(); const email = row.getAttribute('data-email').toLowerCase(); const is2fa = row.getAttribute('data-2fa') === 'true'; // Text match const matchesText = name.includes(query) || email.includes(query); // Filter match let matchesFilter = true; if (currentClientFilter === 'enabled' && !is2fa) matchesFilter = false; if (currentClientFilter === 'disabled' && is2fa) matchesFilter = false; if (matchesText && matchesFilter) { row.style.display = ''; total++; if (is2fa) active++; else inactive++; } else { row.style.display = 'none'; } }); // Update stats const totalEl = document.getElementById('stat-total'); const activeEl = document.getElementById('stat-active'); const inactiveEl = document.getElementById('stat-inactive'); if (totalEl) totalEl.innerText = total; if (activeEl) activeEl.innerText = active; if (inactiveEl) inactiveEl.innerText = inactive; } // SECURITY AUDIT LOG FILTERS & SEARCH function filterLogs() { const query = document.getElementById('logSearch').value.toLowerCase(); const filterType = document.getElementById('logEventFilter').value; const rows = document.querySelectorAll('#logTableBody tr'); rows.forEach(row => { const user = row.getAttribute('data-user').toLowerCase(); const ip = row.getAttribute('data-ip').toLowerCase(); const country = row.getAttribute('data-country').toLowerCase(); const event = row.getAttribute('data-event-type').toLowerCase(); const metadata = row.getAttribute('data-metadata').toLowerCase(); // Text search matches any of these fields const matchesText = user.includes(query) || ip.includes(query) || country.includes(query) || metadata.includes(query); // Filter type classification let matchesFilter = true; if (filterType === 'logins') { matchesFilter = (event === 'login_success' || event === 'successful_2fa_verification'); } else if (filterType === 'failed') { matchesFilter = (event === 'login_failed' || event === 'failed_2fa_attempt'); } else if (filterType === '2fa') { matchesFilter = (event === '2fa_enabled' || event === '2fa_disabled' || event === '2fa_setup_started'); } else if (filterType === 'recovery') { matchesFilter = (event === 'recovery_code_used' || event === 'recovery_codes_regenerated'); } if (matchesText && matchesFilter) { row.style.display = ''; } else { row.style.display = 'none'; } }); } // PAGE LOAD INITIALIZATION document.addEventListener('DOMContentLoaded', () => { const activeTab = sessionStorage.getItem('activeSettingsTab') || 'directory'; switchTab(activeTab); // Initialize client statistics filterClients(); }); // PURGING ACTIONS WITH SWEETALERT2 function confirmPurge(userId, userName, userEmail) { Swal.fire({ title: 'Verify Super Admin Purge', html: ` You are preparing to permanently purge ${userName} (${userEmail}) from the database. Warning: This action cannot be undone and will erase all logs across all program databases. Super Admin Security Code `, icon: 'warning', showCancelButton: true, confirmButtonText: 'Permanently Purge Profile', confirmButtonColor: '#dc2626', cancelButtonText: 'Cancel', focusConfirm: false, preConfirm: () => { const code = Swal.getPopup().querySelector('#swal-security-code').value; if (!code) { Swal.showValidationMessage(`Security code is required to authorize the purge`); } return { code: code } } }).then((result) => { if (result.isConfirmed) { document.getElementById('purge-user-id').value = userId; document.getElementById('purge-security-code').value = result.value.code; // Show loading spinner Swal.fire({ title: 'Purging Database Records...', html: 'Please wait while we safely delete all associated tracking and profile data.', allowOutsideClick: false, didOpen: () => { Swal.showLoading(); } }); document.getElementById('purge-form').submit(); } }); } } @functions { public (string? Country, string CleanMetadata) ParseMetadata(string? metadata) { if (string.IsNullOrEmpty(metadata)) return (null, string.Empty); if (metadata.StartsWith("[Country: ") && metadata.Contains("]")) { int endIdx = metadata.IndexOf("]"); if (endIdx > 10) { string country = metadata.Substring(10, endIdx - 10); string clean = metadata.Substring(endIdx + 1).Trim(); return (country, clean); } } return (null, metadata); } public string ParseUserAgent(string? ua) { if (string.IsNullOrEmpty(ua)) return "Unknown Device"; string browser = "Unknown Browser"; if (ua.Contains("Edg/")) browser = "Edge"; else if (ua.Contains("Chrome/")) browser = "Chrome"; else if (ua.Contains("Firefox/")) browser = "Firefox"; else if (ua.Contains("Safari/") && !ua.Contains("Chrome/")) browser = "Safari"; else if (ua.Contains("MSIE") || ua.Contains("Trident/")) browser = "Internet Explorer"; string os = "Unknown OS"; if (ua.Contains("Windows NT 10.0")) os = "Windows 10/11"; else if (ua.Contains("Windows NT")) os = "Windows"; else if (ua.Contains("Mac OS X")) os = "macOS"; else if (ua.Contains("Android")) os = "Android"; else if (ua.Contains("iPhone")) os = "iPhone"; else if (ua.Contains("iPad")) os = "iPad"; else if (ua.Contains("Linux")) os = "Linux"; return $"{browser} on {os}"; } }
Page Title
Page URL
Related Questions (JSON Array of strings)
Recommended Actions (JSON Array of objects)
[]
Active
Save Changes
Cancel