پیادهسازی شده در پروداکشن (Live)
"""
stat_addition = """
در حال توسعه (In Progress)
۰
⚡
"""
if "stat-inprogress" not in html:
html = html.replace(stat_target, stat_addition + stat_target)
# 3. Add in_progress filter pill
pill_target = '
'
pill_addition = '
\n '
if "filterStatus('in_progress'" not in html:
html = html.replace(pill_target, pill_addition + pill_target)
# 4. Update status display in card rendering
old_badge_render = '${isLive ? "● پیادهسازی شده" : "⏳ در انتظار گرومینگ"}'
new_badge_render = '${task.status === "implemented" ? "● پیادهسازی شده" : (task.status === "in_progress" ? "⚡ در حال توسعه" : "⏳ در انتظار گرومینگ")}'
html = html.replace(old_badge_render, new_badge_render)
# 5. Update updateStats function
old_stats_fn = 'const backlog = prdsData.filter(t => t.status === "backlog").length;'
new_stats_fn = """const inProgress = prdsData.filter(t => t.status === "in_progress").length;
const backlog = prdsData.filter(t => t.status === "backlog").length;
const elInProgress = document.getElementById("stat-inprogress");
if (elInProgress) elInProgress.innerText = inProgress.toLocaleString("fa-IR");"""
html = html.replace(old_stats_fn, new_stats_fn)
with open("/workspace/prds/index.html", "w", encoding="utf-8") as f:
f.write(html)
print("index.html upgraded with In Progress support!")