Home

TFMACA
1.TFMACA.com – UK Executive Training & Admin Portal tailwind.config = { theme: { extend: { colors: { tfm: { navy: ‘#0f2a4a’, // Deep Royal Navy navyDark: ‘#08172b’, // Darker Navy Accent navyLight: ‘#1b3e66’, // Secondary Navy Tint gold: ‘#d99b26’, // Rich Gold Accent goldHover: ‘#b8811d’, // Hover Gold goldLight: ‘#fff9ed’, // Light Gold Background bg: ‘#f8fafc’, border: ‘#e2e8f0’ } }, fontFamily: { sans: [‘Inter’, ‘sans-serif’], } } } } /* Custom Scrollbar */ ::-webkit-scrollbar { width: 6px; height: 6px; } ::-webkit-scrollbar-track { background: #f1f5f9; } ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: #0f2a4a; } /* LPC Shield Crest Emblem */ .crest-shield { background: linear-gradient(135deg, #d99b26 0%, #fadb8a 50%, #a67215 100%); clip-path: polygon(50% 0%, 100% 15%, 100% 75%, 50% 100%, 0% 75%, 0% 15%); } .glass-card { background: #ffffff; border: 1px solid #e2e8f0; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03); }
View Mode: Admin Dashboard Mode

Executive Operations Console

Real-time statistics for accredited professional development programs

Total Courses

0

Active in catalog

Active Delegates

3,840

+18% this quarter

Total Tuition Value

$0

Catalog tuition worth

Training Venues

6 Hubs

London, Dubai, Riyadh…

Course Distribution by Domain

Delivery Format Ratio

// INITIAL ACCREDITED DEFAULT DATA const defaultInitialCourses = [ { id: “c101”, code: “TFM-101”, title: “Executive Financial Valuation & Strategic M&A”, category: “Finance & Accounting”, venue: “London”, mode: “Classroom”, duration: “5 Days”, price: 1850, status: “Published”, badge: “Bestseller”, instructor: “Prof. R. Sterling, FCA”, description: “Comprehensive 5-day executive workshop covering DCF modeling, leverage buyout (LBO) frameworks, M&A valuation, and financial statement analysis.” }, { id: “c102”, code: “TFM-204”, title: “Oil & Gas Joint Venture Accounting & PSCs”, category: “Oil & Gas / Energy”, venue: “Dubai”, mode: “Classroom”, duration: “5 Days”, price: 2100, status: “Published”, badge: “Featured”, instructor: “David K. Vance, CIA”, description: “Joint Interest Billing, Production Sharing Contracts (PSCs), petroleum fiscal regimes, and energy sector revenue recognition standards.” }, { id: “c103”, code: “TFM-305”, title: “International Financial Reporting Standards (IFRS)”, category: “Finance & Accounting”, venue: “Online”, mode: “Live Online”, duration: “10 Days”, price: 1200, status: “Published”, badge: “New”, instructor: “Dr. Sarah Al-Hassan”, description: “In-depth online virtual masterclass covering IFRS 16 leasing, IFRS 17 insurance, and corporate compliance frameworks.” }, { id: “c104”, code: “TFM-402”, title: “Corporate Governance, Risk Management & Internal Audit”, category: “Leadership & Strategy”, venue: “Istanbul”, mode: “Classroom”, duration: “3 Days”, price: 1650, status: “Published”, badge: “Standard”, instructor: “Sir Michael Ashford”, description: “Board governance, Enterprise Risk Management (ERM) frameworks, and modern internal control structures for executives.” }, { id: “c105”, code: “TFM-508”, title: “Agile Project Governance & PMP Masterclass”, category: “Project Management”, venue: “Singapore”, mode: “Classroom”, duration: “5 Days”, price: 1950, status: “Published”, badge: “Bestseller”, instructor: “Markus Vance, PMP”, description: “PMP certification alignment, agile sprint governance, risk management strategies, and project portfolio execution.” }, { id: “c106”, code: “TFM-610”, title: “Cyber Security Governance & ISO Protection”, category: “IT & Cyber Security”, venue: “Riyadh”, mode: “Classroom”, duration: “4 Days”, price: 2200, status: “Draft”, badge: “New”, instructor: “Elena Rostova, CISM”, description: “Enterprise threat mitigation, ISO 27001 audit standards, executive incident response, and cyber risk governance.” } ]; // GLOBAL APP STATE let courses = []; let filteredAdminCourses = []; let filteredPublicCourses = []; let selectedCourseIds = new Set(); let currentAdminPage = 1; let adminPerPage = 10; let activeMode = ‘admin’; let currentSelectedCourse = null; // Charts let categoryChartInstance = null; let modeChartInstance = null; window.onload = function() { loadCoursesFromStorage(); renderAdminDashboardStats(); renderAdminVenues(); initAdminCharts(); applyAdminFilters(); applyPublicFilters(); }; function loadCoursesFromStorage() { const stored = localStorage.getItem(‘1_TFMACA_COURSES_STORAGE_V2’); if (stored) { try { courses = JSON.parse(stored); } catch(e) { courses = […defaultInitialCourses]; } } else { courses = […defaultInitialCourses]; saveCoursesToStorage(); } updateGlobalCounters(); } function saveCoursesToStorage() { localStorage.setItem(‘1_TFMACA_COURSES_STORAGE_V2’, JSON.stringify(courses)); updateGlobalCounters(); } function updateGlobalCounters() { document.getElementById(‘badge-total-courses’).innerText = courses.length; document.getElementById(‘admin-badge-count’).innerText = courses.length; document.getElementById(‘stat-total-courses’).innerText = courses.length; const rev = courses.reduce((sum, c) => sum + (parseFloat(c.price) || 0) * 12, 0); document.getElementById(‘stat-total-revenue’).innerText = ‘$’ + rev.toLocaleString(); } // MODE SWITCHER (ADMIN VS PUBLIC) function toggleViewMode(mode) { activeMode = mode; const adminView = document.getElementById(‘view-admin’); const publicView = document.getElementById(‘view-public’); const modeBadge = document.getElementById(‘current-mode-badge’); const btnAdmin = document.getElementById(‘btn-mode-admin’); const btnPublic = document.getElementById(‘btn-mode-public’); if (mode === ‘admin’) { adminView.classList.remove(‘hidden’); publicView.classList.add(‘hidden’); modeBadge.innerText = ‘Admin Console Mode’; btnAdmin.className = ‘px-3 py-1 rounded font-bold transition bg-tfm-gold text-tfm-navy’; btnPublic.className = ‘px-3 py-1 rounded font-bold transition bg-slate-800 text-slate-300 hover:text-white’; setTimeout(initAdminCharts, 100); } else { adminView.classList.add(‘hidden’); publicView.classList.remove(‘hidden’); modeBadge.innerText = ‘Public Student Site Mode’; btnPublic.className = ‘px-3 py-1 rounded font-bold transition bg-tfm-gold text-tfm-navy’; btnAdmin.className = ‘px-3 py-1 rounded font-bold transition bg-slate-800 text-slate-300 hover:text-white’; showPublicCatalog(); } } function switchAdminTab(tab) { document.querySelectorAll(‘.admin-tab-content’).forEach(el => el.classList.add(‘hidden’)); document.getElementById(`admin-tab-${tab}`).classList.remove(‘hidden’); document.querySelectorAll(‘.nav-admin-item’).forEach(btn => { btn.classList.remove(‘bg-tfm-gold’, ‘text-tfm-navy’, ‘shadow-md’, ‘font-bold’); btn.classList.add(‘text-slate-200’); }); const activeNav = document.getElementById(`nav-admin-${tab}`); if (activeNav) { activeNav.classList.remove(‘text-slate-200’); activeNav.classList.add(‘bg-tfm-gold’, ‘text-tfm-navy’, ‘shadow-md’, ‘font-bold’); } if (tab === ‘dashboard’) setTimeout(initAdminCharts, 100); } // BULK SEED 50+ COURSES function seedSampleCourses() { const categories = [ “Leadership & Strategy”, “Finance & Accounting”, “Project Management”, “Oil & Gas / Energy”, “IT & Cyber Security”, “HR & Talent”, “Digital Marketing”, “Healthcare & Legal” ]; const venues = [“London”, “Dubai”, “Singapore”, “Istanbul”, “Riyadh”, “Online”]; const modes = [“Classroom”, “Live Online”, “Self-Paced”]; const badges = [“Standard”, “New”, “Featured”, “Bestseller”]; const topics = [ “Strategic Financial Valuation”, “Petroleum Fiscal Regimes”, “Agile Portfolio Governance”, “Executive Leadership & Governance”, “Cyber Threat Mitigation & ISO Standards”, “Global Talent & HR Strategy”, “Healthcare Operational Leadership”, “Commercial Arbitration & Contract Law”, “International Accounting & IFRS”, “Digital Growth Marketing Masterclass”, “Supply Chain Optimization”, “ESG & Decarbonization Policy” ]; const instructors = [“Prof. R. Sterling”, “Dr. A. Al-Hassan”, “Sir Michael Ashford”, “Elena Rostova”, “Markus Vance, PMP”]; let seeded = []; for (let i = 1; i { const matchSearch = c.title.toLowerCase().includes(search) || c.code.toLowerCase().includes(search); const matchCat = (cat === ‘ALL’ || c.category === cat); const matchVen = (ven === ‘ALL’ || c.venue === ven); const matchMode = (mode === ‘ALL’ || c.mode === mode); const matchStat = (stat === ‘ALL’ || c.status === stat); return matchSearch && matchCat && matchVen && matchMode && matchStat; }); currentAdminPage = 1; renderAdminTable(); } function changePageSize() { adminPerPage = parseInt(document.getElementById(‘adminPageSize’).value); currentAdminPage = 1; renderAdminTable(); } function renderAdminTable() { const tbody = document.getElementById(‘admin-courses-tbody’); tbody.innerHTML = ”; const total = filteredAdminCourses.length; const start = (currentAdminPage – 1) * adminPerPage; const end = Math.min(start + adminPerPage, total); const pageData = filteredAdminCourses.slice(start, end); document.getElementById(‘admin-pagination-info’).innerText = `Showing ${total > 0 ? start + 1 : 0} to ${end} of ${total} courses`; if (pageData.length === 0) { tbody.innerHTML = `No courses found matching criteria. Click ‘Seed 50+ Executive Courses’ to generate data.`; renderPaginationButtons(0); return; } pageData.forEach(c => { const isChecked = selectedCourseIds.has(c.id); const tr = document.createElement(‘tr’); tr.className = “hover:bg-slate-50 transition border-b border-slate-200/80”; tr.innerHTML = ` ${c.title} ${c.code} ${c.category} ${c.venue} ${c.mode} ${c.duration} $${parseInt(c.price).toLocaleString()} ${c.status} `; tbody.appendChild(tr); }); renderPaginationButtons(Math.ceil(total / adminPerPage)); } function renderPaginationButtons(totalPages) { const container = document.getElementById(‘admin-pagination-btns’); container.innerHTML = ”; if (totalPages <= 1) return; for (let i = 1; i = currentAdminPage – 1 && i { currentAdminPage = i; renderAdminTable(); }; container.appendChild(btn); } } } // SELECTION & BULK ACTIONS function toggleSelectRow(id, checked) { if (checked) selectedCourseIds.add(id); else selectedCourseIds.delete(id); updateBulkActionBar(); } function toggleSelectAllRows(masterCheckbox) { const start = (currentAdminPage – 1) * adminPerPage; const end = Math.min(start + adminPerPage, filteredAdminCourses.length); const pageData = filteredAdminCourses.slice(start, end); pageData.forEach(c => { if (masterCheckbox.checked) selectedCourseIds.add(c.id); else selectedCourseIds.delete(c.id); }); renderAdminTable(); updateBulkActionBar(); } function updateBulkActionBar() { const bar = document.getElementById(‘bulk-actions-bar’); const text = document.getElementById(‘selected-count-text’); if (selectedCourseIds.size > 0) { bar.classList.remove(‘hidden’); bar.classList.add(‘flex’); text.innerText = `${selectedCourseIds.size} course(s) selected`; } else { bar.classList.add(‘hidden’); bar.classList.remove(‘flex’); } } function applyBulkPublish() { courses = courses.map(c => selectedCourseIds.has(c.id) ? { …c, status: ‘Published’ } : c); saveCoursesToStorage(); selectedCourseIds.clear(); updateBulkActionBar(); applyAdminFilters(); showToast(‘Selected courses published’, ‘success’); } function applyBulkDelete() { if (confirm(`Delete ${selectedCourseIds.size} selected courses?`)) { courses = courses.filter(c => !selectedCourseIds.has(c.id)); saveCoursesToStorage(); selectedCourseIds.clear(); updateBulkActionBar(); applyAdminFilters(); showToast(‘Selected courses deleted’, ‘info’); } } // PUBLIC STUDENT PORTAL RENDERING function applyPublicFilters() { const search = (document.getElementById(‘publicSearchInput’).value || ”).toLowerCase(); const cat = document.getElementById(‘publicFilterCat’).value; filteredPublicCourses = courses.filter(c => { const matchSearch = c.title.toLowerCase().includes(search) || c.code.toLowerCase().includes(search); const matchCat = (cat === ‘ALL’ || c.category === cat); return matchSearch && matchCat && c.status === ‘Published’; }); renderPublicGrid(); } function renderPublicGrid() { const grid = document.getElementById(‘public-course-grid’); grid.innerHTML = ”; document.getElementById(‘public-results-count’).innerText = `Showing ${filteredPublicCourses.length} courses`; filteredPublicCourses.forEach(c => { const card = document.createElement(‘div’); card.className = “glass-card rounded-2xl overflow-hidden hover:border-tfm-gold hover:shadow-xl transition duration-300 flex flex-col justify-between”; card.innerHTML = `
${c.code} ${c.badge || ‘Accredited’}

${c.title}

${c.description}

Venue${c.venue}
Duration${c.duration}
$${parseInt(c.price).toLocaleString()}
`; grid.appendChild(card); }); } function showPublicCatalog() { document.getElementById(‘public-catalog-view’).classList.remove(‘hidden’); document.getElementById(‘public-course-page-view’).classList.add(‘hidden’); } function filterPublicByCat(catName) { toggleViewMode(‘public’); showPublicCatalog(); document.getElementById(‘publicFilterCat’).value = catName; applyPublicFilters(); } function filterPublicBadge(badgeName) { toggleViewMode(‘public’); showPublicCatalog(); document.getElementById(‘publicSearchInput’).value = badgeName; applyPublicFilters(); } // PREVIEW PUBLIC DEDICATED PAGE function previewCoursePage(id) { const c = courses.find(item => item.id === id); if (!c) return; currentSelectedCourse = c; toggleViewMode(‘public’); document.getElementById(‘public-catalog-view’).classList.add(‘hidden’); document.getElementById(‘public-course-page-view’).classList.remove(‘hidden’); document.getElementById(‘coursePageCode’).innerText = c.code; document.getElementById(‘coursePageCat’).innerText = c.category; document.getElementById(‘coursePageTitle’).innerText = c.title; document.getElementById(‘coursePageInstructor’).innerText = c.instructor || ‘1.TFMACA Senior Faculty’; document.getElementById(‘coursePageDuration’).innerText = c.duration; document.getElementById(‘coursePageVenue’).innerText = c.venue; document.getElementById(‘coursePageMode’).innerText = c.mode; document.getElementById(‘coursePagePrice’).innerText = ‘$’ + parseInt(c.price).toLocaleString(); document.getElementById(‘coursePageDesc’).innerText = c.description || ‘Accredited executive program designed to meet UK CPD standards.’; switchCoursePageSection(‘overview’); } function switchCoursePageSection(sec) { document.querySelectorAll(‘.course-sec-pane’).forEach(el => el.classList.add(‘hidden’)); document.getElementById(`sec-${sec}`).classList.remove(‘hidden’); [‘overview’, ‘syllabus’, ‘audience’].forEach(s => { const btn = document.getElementById(`sec-btn-${s}`); if (s === sec) { btn.className = “pb-2.5 border-b-2 border-tfm-gold text-tfm-navy font-bold”; } else { btn.className = “pb-2.5 border-b-2 border-transparent text-slate-400 hover:text-slate-600 font-bold”; } }); } // CRUD OPERATIONS function openCourseModal() { document.getElementById(‘courseForm’).reset(); document.getElementById(‘formCourseId’).value = ”; document.getElementById(‘formCode’).value = ‘TFM-‘ + Math.floor(100 + Math.random() * 900); document.getElementById(‘modalTitle’).innerText = ‘Add New Course Specification’; document.getElementById(‘courseModal’).classList.remove(‘hidden’); } function closeCourseModal() { document.getElementById(‘courseModal’).classList.add(‘hidden’); } function editCourse(id) { const c = courses.find(item => item.id === id); if (!c) return; document.getElementById(‘formCourseId’).value = c.id; document.getElementById(‘formTitle’).value = c.title; document.getElementById(‘formCode’).value = c.code; document.getElementById(‘formCategory’).value = c.category; document.getElementById(‘formVenue’).value = c.venue; document.getElementById(‘formMode’).value = c.mode; document.getElementById(‘formDuration’).value = c.duration; document.getElementById(‘formPrice’).value = c.price; document.getElementById(‘formStatus’).value = c.status; document.getElementById(‘formBadge’).value = c.badge || ‘Standard’; document.getElementById(‘formInstructor’).value = c.instructor || ”; document.getElementById(‘formDescription’).value = c.description || ”; document.getElementById(‘modalTitle’).innerText = ‘Edit Course Specification’; document.getElementById(‘courseModal’).classList.remove(‘hidden’); } function duplicateCourse(id) { const c = courses.find(item => item.id === id); if (!c) return; const dup = { …c, id: ‘c_’ + Date.now(), code: c.code + ‘-COPY’, title: c.title + ‘ (Copy)’ }; courses.unshift(dup); saveCoursesToStorage(); applyAdminFilters(); applyPublicFilters(); showToast(‘Course duplicated successfully’, ‘success’); } function saveCourseForm(e) { e.preventDefault(); const id = document.getElementById(‘formCourseId’).value; const title = document.getElementById(‘formTitle’).value; const code = document.getElementById(‘formCode’).value; const category = document.getElementById(‘formCategory’).value; const venue = document.getElementById(‘formVenue’).value; const mode = document.getElementById(‘formMode’).value; const duration = document.getElementById(‘formDuration’).value; const price = parseFloat(document.getElementById(‘formPrice’).value); const status = document.getElementById(‘formStatus’).value; const badge = document.getElementById(‘formBadge’).value; const instructor = document.getElementById(‘formInstructor’).value; const description = document.getElementById(‘formDescription’).value; if (id) { courses = courses.map(c => c.id === id ? { id, code, title, category, venue, mode, duration, price, status, badge, instructor, description } : c); showToast(‘Updated course record’, ‘success’); } else { const newC = { id: ‘c_’ + Date.now(), code, title, category, venue, mode, duration, price, status, badge, instructor, description }; courses.unshift(newC); showToast(‘Created new course record’, ‘success’); } saveCoursesToStorage(); applyAdminFilters(); applyPublicFilters(); renderAdminDashboardStats(); closeCourseModal(); } function deleteCourse(id) { if (confirm(‘Delete this course record?’)) { courses = courses.filter(c => c.id !== id); saveCoursesToStorage(); applyAdminFilters(); applyPublicFilters(); renderAdminDashboardStats(); showToast(‘Course record deleted’, ‘info’); } } // MODAL HANDLERS function openEnrollmentModal() { document.getElementById(‘enrollmentModal’).classList.remove(‘hidden’); } function closeEnrollmentModal() { document.getElementById(‘enrollmentModal’).classList.add(‘hidden’); } function submitEnrollment() { closeEnrollmentModal(); showToast(‘Registration submitted! Our admissions office will contact you.’, ‘success’); } function openBrochureModal() { document.getElementById(‘brochureModal’).classList.remove(‘hidden’); } function closeBrochureModal() { document.getElementById(‘brochureModal’).classList.add(‘hidden’); } function downloadBrochure() { closeBrochureModal(); showToast(‘Downloaded official PDF syllabus brochure’, ‘success’); } // CSV EXPORT function exportCoursesCSV() { let csv = “data:text/csv;charset=utf-8,ID,Code,Title,Category,Venue,Mode,Duration,Price,Status\n”; courses.forEach(c => { csv += `”${c.id}”,”${c.code}”,”${c.title}”,”${c.category}”,”${c.venue}”,”${c.mode}”,”${c.duration}”,${c.price},”${c.status}”\n`; }); const encodedUri = encodeURI(csv); const link = document.createElement(“a”); link.setAttribute(“href”, encodedUri); link.setAttribute(“download”, `1_tfmaca_catalog.csv`); document.body.appendChild(link); link.click(); document.body.removeChild(link); showToast(‘Exported catalog to CSV’, ‘success’); } function renderAdminDashboardStats() { document.getElementById(‘stat-total-courses’).innerText = courses.length; } function renderAdminVenues() { const grid = document.getElementById(‘admin-venue-grid’); const venues = [ { name: “London, UK”, count: “128 Courses”, desc: “Central London Executive Suites” }, { name: “Dubai, UAE”, count: “94 Courses”, desc: “DIFC Financial Center” }, { name: “Singapore”, count: “62 Courses”, desc: “Marina Bay Executive Hub” }, { name: “Istanbul, Turkey”, count: “45 Courses”, desc: “Bosphorus Business Hub” }, { name: “Riyadh, KSA”, count: “58 Courses”, desc: “Riyadh Energy Training Center” }, { name: “Live Virtual”, count: “210 Courses”, desc: “Global Virtual Classrooms” } ]; grid.innerHTML = ”; venues.forEach(v => { const div = document.createElement(‘div’); div.className = “glass-card p-4 rounded-xl border border-slate-200”; div.innerHTML = `

${v.name}

${v.count}

${v.desc}

`; grid.appendChild(div); }); } // CHARTS function initAdminCharts() { const ctx1 = document.getElementById(‘categoryChart’); if (ctx1) { if (categoryChartInstance) categoryChartInstance.destroy(); const categories = [“Leadership”, “Finance”, “Projects”, “Oil & Gas”, “IT Security”, “HR”, “Marketing”, “Legal”]; const counts = categories.map((cat, idx) => Math.max(1, Math.floor(courses.length / 8) + (idx % 3))); categoryChartInstance = new Chart(ctx1, { type: ‘bar’, data: { labels: categories, datasets: [{ label: ‘Courses’, data: counts, backgroundColor: [‘#0f2a4a’, ‘#d99b26’, ‘#10b981’, ‘#3b82f6’, ‘#a855f7’, ‘#f59e0b’, ‘#ec4899’, ‘#64748b’], borderRadius: 6 }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { display: false } }, scales: { x: { grid: { display: false } }, y: { grid: { color: ‘#f1f5f9’ } } } } }); } const ctx2 = document.getElementById(‘modeChart’); if (ctx2) { if (modeChartInstance) modeChartInstance.destroy(); const modes = [“Classroom”, “Live Online”, “Self-Paced”]; const counts = modes.map(m => courses.filter(c => c.mode === m).length || 1); modeChartInstance = new Chart(ctx2, { type: ‘doughnut’, data: { labels: modes, datasets: [{ data: counts, backgroundColor: [‘#0f2a4a’, ‘#d99b26’, ‘#10b981’], borderWidth: 0 }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { position: ‘bottom’, labels: { font: { size: 10 } } } }, cutout: ‘70%’ } }); } } // TOAST MESSAGES function showToast(message, type = ‘info’) { const container = document.getElementById(‘toast-container’); const toast = document.createElement(‘div’); toast.className = “glass-card px-4 py-3 rounded-xl border-l-4 border-tfm-gold bg-slate-900 text-white shadow-xl flex items-center gap-3 text-xs pointer-events-auto transition-all duration-300”; toast.innerHTML = ` ${message}`; container.appendChild(toast); setTimeout(() => toast.remove(), 3500); }