From f9f1dd91b0b214e9918294f38887e59fbc808a4e Mon Sep 17 00:00:00 2001 From: saleh Date: Wed, 11 Nov 2026 16:38:49 +0000 Subject: [PATCH] feat(meetings): integrate dkmall meetings v2 intelligence dashboard into tmall benchmark --- dashboards/tmall.html | 2089 +++++++++++++++++++++++++++++++++++++++++ tmall.html | 2089 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 4178 insertions(+) diff --git a/dashboards/tmall.html b/dashboards/tmall.html index c446196..ce2f01a 100644 --- a/dashboards/tmall.html +++ b/dashboards/tmall.html @@ -10,6 +10,8 @@ + + @@ -159,6 +161,10 @@ + @@ -711,6 +717,2028 @@ + + + + @@ -1151,6 +3179,7 @@ if (tabId === 'tab-overview') renderRadarChart(); if (tabId === 'tab-analytics') renderAnalyticsCharts(); + if (tabId === 'tab-meetings') initTalkTimeChart(); // Persist tab state to PostgreSQL 17 saveStateToDb({ activeTab: tabId }); @@ -1544,6 +3573,66 @@ } }); + + // --- DKMall Meetings v2 JS Logic --- + let talkTimeChartInstance = null; + + function initTalkTimeChart() { + const canvas = document.getElementById('talkTimeChart'); + if (!canvas) return; + if (talkTimeChartInstance) return; // already initialized + + const ctx = canvas.getContext('2d'); + talkTimeChartInstance = new Chart(ctx, { + type: 'doughnut', + data: { + labels: ["صالح اسکندرزاده (BLO)", "بابک (مشاور ارشد استراتژی)", "حسن (مدیر محصول)"], + datasets: [{ + data: [28074, 4347, 3408], + backgroundColor: ['#2563eb', '#f59e0b', '#10b981'], + borderWidth: 0 + }] + }, + options: { + responsive: true, + maintainAspectRatio: false, + plugins: { legend: { display: false } } + } + }); + } + + // Switch Transcript Tabs + function switchTranscriptTab(tabId) { + document.querySelectorAll('.transcript-tab-pane').forEach(el => el.classList.add('hidden')); + document.querySelectorAll('.transcript-tab-btn').forEach(el => { + el.classList.remove('bg-blue-600', 'text-white', 'shadow-sm'); + el.classList.add('bg-slate-100', 'text-slate-700'); + }); + const target = document.getElementById(tabId); + if (target) target.classList.remove('hidden'); + const btn = document.getElementById('btn_' + tabId); + if (btn) { + btn.classList.add('bg-blue-600', 'text-white', 'shadow-sm'); + btn.classList.remove('bg-slate-100', 'text-slate-700'); + } + } + + // Switch Comparison Tabs + function switchComparisonTab(tabId) { + document.querySelectorAll('.cmp-tab-pane').forEach(el => el.classList.add('hidden')); + document.querySelectorAll('.cmp-tab-btn').forEach(el => { + el.classList.remove('bg-purple-600', 'text-white', 'shadow-sm'); + el.classList.add('bg-slate-100', 'text-slate-700'); + }); + const target = document.getElementById(tabId); + if (target) target.classList.remove('hidden'); + const btn = document.getElementById('btn_' + tabId); + if (btn) { + btn.classList.add('bg-purple-600', 'text-white', 'shadow-sm'); + btn.classList.remove('bg-slate-100', 'text-slate-700'); + } + } + // Initialize on page load window.addEventListener('DOMContentLoaded', () => { renderFunctions(); diff --git a/tmall.html b/tmall.html index c446196..ce2f01a 100644 --- a/tmall.html +++ b/tmall.html @@ -10,6 +10,8 @@ + + @@ -159,6 +161,10 @@ + @@ -711,6 +717,2028 @@ + + + + @@ -1151,6 +3179,7 @@ if (tabId === 'tab-overview') renderRadarChart(); if (tabId === 'tab-analytics') renderAnalyticsCharts(); + if (tabId === 'tab-meetings') initTalkTimeChart(); // Persist tab state to PostgreSQL 17 saveStateToDb({ activeTab: tabId }); @@ -1544,6 +3573,66 @@ } }); + + // --- DKMall Meetings v2 JS Logic --- + let talkTimeChartInstance = null; + + function initTalkTimeChart() { + const canvas = document.getElementById('talkTimeChart'); + if (!canvas) return; + if (talkTimeChartInstance) return; // already initialized + + const ctx = canvas.getContext('2d'); + talkTimeChartInstance = new Chart(ctx, { + type: 'doughnut', + data: { + labels: ["صالح اسکندرزاده (BLO)", "بابک (مشاور ارشد استراتژی)", "حسن (مدیر محصول)"], + datasets: [{ + data: [28074, 4347, 3408], + backgroundColor: ['#2563eb', '#f59e0b', '#10b981'], + borderWidth: 0 + }] + }, + options: { + responsive: true, + maintainAspectRatio: false, + plugins: { legend: { display: false } } + } + }); + } + + // Switch Transcript Tabs + function switchTranscriptTab(tabId) { + document.querySelectorAll('.transcript-tab-pane').forEach(el => el.classList.add('hidden')); + document.querySelectorAll('.transcript-tab-btn').forEach(el => { + el.classList.remove('bg-blue-600', 'text-white', 'shadow-sm'); + el.classList.add('bg-slate-100', 'text-slate-700'); + }); + const target = document.getElementById(tabId); + if (target) target.classList.remove('hidden'); + const btn = document.getElementById('btn_' + tabId); + if (btn) { + btn.classList.add('bg-blue-600', 'text-white', 'shadow-sm'); + btn.classList.remove('bg-slate-100', 'text-slate-700'); + } + } + + // Switch Comparison Tabs + function switchComparisonTab(tabId) { + document.querySelectorAll('.cmp-tab-pane').forEach(el => el.classList.add('hidden')); + document.querySelectorAll('.cmp-tab-btn').forEach(el => { + el.classList.remove('bg-purple-600', 'text-white', 'shadow-sm'); + el.classList.add('bg-slate-100', 'text-slate-700'); + }); + const target = document.getElementById(tabId); + if (target) target.classList.remove('hidden'); + const btn = document.getElementById('btn_' + tabId); + if (btn) { + btn.classList.add('bg-purple-600', 'text-white', 'shadow-sm'); + btn.classList.remove('bg-slate-100', 'text-slate-700'); + } + } + // Initialize on page load window.addEventListener('DOMContentLoaded', () => { renderFunctions();