Occurrences of importReadyCount: 4
Line 426: startedCount = getStartedToolsCount();
Line 452: usCountEl) importReadyStatusCountEl.textContent = importReadyCount;
Line 501: adyToImportEl) countReadyToImportEl.textContent = importReadyCount;
Line 503: eadyCountEl) pillImportReadyCountEl.textContent = importReadyCount;
Functions found around initialization:
Last 100 lines of platform.js:
1056:
1057: ` : `
1058:
1059:
1060: مدرجة بخارطة الطريق
1061:
1062: `}
1063:
1064: `;
1065:
1066: toolsGrid.appendChild(card);
1067: });
1068: };
1069:
1070: // --- 8. Search & Status Event Handlers ---
1071: let debounceTimeout = null;
1072: if (searchInput) {
1073: searchInput.addEventListener('input', (e) => {
1074: clearTimeout(debounceTimeout);
1075: debounceTimeout = setTimeout(() => {
1076: state.searchQuery = e.target.value;
1077: if (clearSearchBtn) {
1078: if (e.target.value.trim().length > 0) {
1079: clearSearchBtn.classList.add('active');
1080: } else {
1081: clearSearchBtn.classList.remove('active');
1082: }
1083: }
1084: renderTools();
1085: }, 150);
1086: });
1087: }
1088:
1089: if (clearSearchBtn) {
1090: clearSearchBtn.addEventListener('click', () => {
1091: if (searchInput) {
1092: searchInput.value = '';
1093: state.searchQuery = '';
1094: clearSearchBtn.classList.remove('active');
1095: renderTools();
1096: searchInput.focus();
1097: }
1098: });
1099: }
1100:
1101: statusBtns.forEach(btn => {
1102: btn.addEventListener('click', () => {
1103: statusBtns.forEach(b => b.classList.remove('active'));
1104: btn.classList.add('active');
1105: state.statusFilter = btn.dataset.status;
1106: renderTools();
1107: });
1108: });
1109:
1110: // Auto-refresh maturity and stats when returning to the tab
1111: window.addEventListener('focus', () => {
1112: updateStatsCounters();
1113: renderLifecycleSection();
1114: renderTools();
1115: });
1116:
1117: // --- 8b. Setup Smart Guided Pathways Controls ---
1118: const setupPathwayControls = () => {
1119: const pathwayCards = document.querySelectorAll('.pathway-card');
1120: pathwayCards.forEach(card => {
1121: const pKey = card.dataset.pathway;
1122: if (pKey === state.activePathway) {
1123: card.classList.add('active');
1124: } else {
1125: card.classList.remove('active');
1126: }
1127:
1128: card.addEventListener('click', () => {
1129: pathwayCards.forEach(c => c.classList.remove('active'));
1130: card.classList.add('active');
1131: state.activePathway = pKey;
1132: localStorage.setItem('hub_user_pathway', pKey);
1133: renderTools();
1134: });
1135: });
1136:
1137: // Setup Pipeline Import Ready Shortcut Button
1138: const btnShowImportReady = document.getElementById('btn-show-import-ready');
1139: if (btnShowImportReady) {
1140: btnShowImportReady.addEventListener('click', () => {
1141: selectCategoryFilter('import_ready');
1142: document.getElementById('tools-catalog')?.scrollIntoView({ behavior: 'smooth' });
1143: });
1144: }
1145: };
1146:
1147: // --- 9. Initial Render Execution ---
1148: setupPathwayControls();
1149: updateStatsCounters();
1150: renderLifecycleSection();
1151: renderCategoriesShowcase();
1152: renderFilterPills();
1153: renderTools();
1154: });
1155: