ارتقای UI، یکپارچه‌سازی تگ‌های CRM، تبدیل اعداد به فارسی و افزودن افق آذرماه (یلدا)

This commit is contained in:
sara 2026-11-10 16:22:48 +00:00
parent dd1ee0b03a
commit 9750dd2cd5
2 changed files with 342 additions and 78 deletions

View file

@ -633,7 +633,7 @@
font-size: 10px;
font-weight: 800;
color: var(--text-muted);
font-family: monospace;
font-variant-numeric: tabular-nums;
}
.card-title {
@ -857,6 +857,10 @@
💾 بک‌آپ JSON
</button>
<button class="btn btn-outline" onclick="resetToDefaultData()" title="بازنشانی اطلاعات بورد به برنامه پیش‌فرض">
🔄 بازنشانی پیش‌فرض
</button>
<button class="btn btn-primary" onclick="openNewReqModal()">
➕ ثبت نیازمندی / ایده جدید
</button>
@ -937,7 +941,7 @@
</div>
<div class="kpi-value-row">
<span class="kpi-num" id="kpiIdeasCount">۶</span>
<span class="kpi-detail" style="color: var(--primary);">۴ مورد با اولویت بالا (Quick Win)</span>
<span class="kpi-detail" id="kpiIdeasDetail" style="color: var(--primary);">۴ مورد با اولویت بالا (Quick Win)</span>
</div>
</div>
@ -963,7 +967,13 @@
<!-- نوار فیلتر تگ‌ها و اعضا -->
<section class="filter-bar">
<div class="filter-tags-group">
<span class="filter-label">فیلتر تگ‌ها:</span>
<span class="filter-label">
فیلتر تگ‌ها:
<div class="info-tip">
(i)
<div class="tip-box">با انتخاب هر تگ، تسک‌های هفته و کارت‌های کانبان بر اساس موضوع فیلتر می‌شوند.</div>
</div>
</span>
<span class="tag-chip tag-all active" onclick="setFilter('tag', 'all', this)">همه تگ‌ها</span>
<span class="tag-chip tag-wallet" onclick="setFilter('tag', 'کیف_پول', this)">#کیف_پول</span>
<span class="tag-chip tag-vibe" onclick="setFilter('tag', 'وایب', this)">#وایب</span>
@ -971,7 +981,7 @@
<span class="tag-chip tag-seller" onclick="setFilter('tag', 'سلر', this)">#سلر</span>
<span class="tag-chip tag-seo" onclick="setFilter('tag', 'سئو', this)">#سئو</span>
<span class="tag-chip tag-danesh" onclick="setFilter('tag', 'دانش_بنیان', this)">#دانش_بنیان</span>
<span class="tag-chip tag-crm" onclick="setFilter('tag', 'CRM', this)">#CRM_دیزاین</span>
<span class="tag-chip tag-crm" onclick="setFilter('tag', 'دیزاین_CRM', this)">#دیزاین_CRM</span>
<span class="tag-chip tag-badges" onclick="setFilter('tag', 'تگ_ها', this)">#تگ_ها</span>
<span class="tag-chip tag-app" onclick="setFilter('tag', 'اپ_نیتیو', this)">#اپ_نیتیو</span>
<span class="tag-chip tag-finance" onclick="setFilter('tag', 'مالی', this)">#مالی</span>
@ -1003,7 +1013,13 @@
<!-- ستون ۱: در صف اقدام (To Do) -->
<div class="kanban-col" id="col_todo" ondragover="allowDrop(event)" ondrop="dropTask(event, 'todo')">
<div class="col-header">
<span class="col-title">⏳ در صف اقدام (To Do)</span>
<span class="col-title">
⏳ در صف اقدام (To Do)
<div class="info-tip">
(i)
<div class="tip-box">تسک‌های برنامه‌ریزی‌شده در اسپرینت که هنوز شروع نشده‌اند.</div>
</div>
</span>
<span class="col-count" id="count_todo">۰</span>
</div>
<div class="cards-container" id="cards_todo"></div>
@ -1012,7 +1028,13 @@
<!-- ستون ۲: در حال انجام / تست (In Progress) -->
<div class="kanban-col" id="col_in_progress" ondragover="allowDrop(event)" ondrop="dropTask(event, 'in_progress')">
<div class="col-header">
<span class="col-title">🔄 در حال انجام و تست</span>
<span class="col-title">
🔄 در حال انجام و تست
<div class="info-tip">
(i)
<div class="tip-box">تسک‌هایی که اکنون توسط تیم فنی در حال توسعه یا تست استیجینگ هستند.</div>
</div>
</span>
<span class="col-count" id="count_in_progress">۰</span>
</div>
<div class="cards-container" id="cards_in_progress"></div>
@ -1021,7 +1043,13 @@
<!-- ستون ۳: منتظر / مسدود (Blocked / Waiting) -->
<div class="kanban-col" id="col_blocked" ondragover="allowDrop(event)" ondrop="dropTask(event, 'blocked')">
<div class="col-header">
<span class="col-title">🛑 نیازمند پیگیری / تحویل</span>
<span class="col-title">
🛑 نیازمند پیگیری / تحویل
<div class="info-tip">
(i)
<div class="tip-box">تسک‌های متوقف‌شده یا وابسته به پاسخ شریک تجاری / تحویل بین دو عضو تیم.</div>
</div>
</span>
<span class="col-count" id="count_blocked">۰</span>
</div>
<div class="cards-container" id="cards_blocked"></div>
@ -1030,7 +1058,13 @@
<!-- ستون ۴: تکمیل و تحویل‌شده (Done) -->
<div class="kanban-col" id="col_done" ondragover="allowDrop(event)" ondrop="dropTask(event, 'done')">
<div class="col-header">
<span class="col-title">✅ تکمیل‌شده (Done)</span>
<span class="col-title">
✅ تکمیل‌شده (Done)
<div class="info-tip">
(i)
<div class="tip-box">تسک‌های نهایی‌شده و دیپلوی‌شده با تایید مدیر محصول.</div>
</div>
</span>
<span class="col-count" id="count_done">۰</span>
</div>
<div class="cards-container" id="cards_done"></div>
@ -1041,8 +1075,12 @@
<section id="viewIdeas" class="ideas-layout hidden">
<div class="ideas-intro-banner">
<div>
<h2 style="font-size: 16px; font-weight: 800; color: #1E1B4B; margin-bottom: 4px;">
<h2 style="font-size: 16px; font-weight: 800; color: #1E1B4B; margin-bottom: 4px; display: flex; align-items: center; gap: 6px;">
مخزن ایده‌ها، نیازمندی‌ها و ماتریس امتیازدهی RICE
<div class="info-tip">
(i)
<div class="tip-box">نحوه محاسبه: امتیاز RICE برابر است با (تعداد مخاطب ماهیانه × ضریب اثر × درصد اطمینان) تقسیم بر نفر-روز زحمت فنی. امتیاز بالاتر = اولویت فوری‌تر.</div>
</div>
</h2>
<p style="font-size: 12px; color: #4338CA;">
سارا جان، در این بخش نیازمندی‌های محصولی و باگ‌های کلیدی را ثبت کن. سیستم با محاسبه نسبت <code style="direction: ltr; display: inline-block;">(Reach × Impact × Confidence) / Effort</code> دقیقاً می‌گوید کدام آیتم‌ها بازدهی فوری دارند.
@ -1057,14 +1095,39 @@
<table class="week-tasks-table" id="ideasTable">
<thead>
<tr>
<th style="width: 50px;">شناسه</th>
<th style="width: 60px;">شناسه</th>
<th>عنوان نیازمندی / ایده</th>
<th>تگ و دسته‌بندی</th>
<th>تعداد مخاطب (Reach)</th>
<th>اثر (Impact)</th>
<th>اطمینان (Conf.)</th>
<th>زحمت (Effort)</th>
<th>امتیاز RICE</th>
<th>
<div style="display: flex; align-items: center; gap: 4px;">
<span>مخاطب (Reach)</span>
<div class="info-tip">(i)<div class="tip-box">تعداد کاربران یا رویدادهای تحت تاثیر در بازه یک ماهه (برآورد ترافیک اکیپا).</div></div>
</div>
</th>
<th>
<div style="display: flex; align-items: center; gap: 4px;">
<span>اثر (Impact)</span>
<div class="info-tip">(i)<div class="tip-box">ضریب اثرگذاری بر اهداف کلیدی: ۳ = اثر حداکثری، ۲ = اثر متوسط، ۱ = کم، ۰.۵ = ناچیز.</div></div>
</div>
</th>
<th>
<div style="display: flex; align-items: center; gap: 4px;">
<span>اطمینان (Conf.)</span>
<div class="info-tip">(i)<div class="tip-box">درصد قطعیت و اطمینان تیم در مورد برآوردها: ۱۰۰٪ = داده واقعی تست‌شده، ۸۰٪ = تخمین معتبر، ۵۰٪ = فرضیه اولیه.</div></div>
</div>
</th>
<th>
<div style="display: flex; align-items: center; gap: 4px;">
<span>زحمت (Effort)</span>
<div class="info-tip">(i)<div class="tip-box">نفر-هفته یا نفر-روز تخمینی تیم فنی و محصول برای پیاده‌سازی و تست نهایی.</div></div>
</div>
</th>
<th>
<div style="display: flex; align-items: center; gap: 4px;">
<span>امتیاز RICE</span>
<div class="info-tip">(i)<div class="tip-box">فرمول محاسباتی: (Reach × Impact × Confidence) / Effort. امتیازهای بالاتر از ۲۵۰۰ در اولویت اجرای فوری (Quick Win) هستند.</div></div>
</div>
</th>
<th>پیشنهاد هادس</th>
<th>عملیات</th>
</tr>
@ -1101,7 +1164,7 @@
<option value="سلر">#سلر</option>
<option value="سئو">#سئو</option>
<option value="دانش_بنیان">#دانش_بنیان</option>
<option value="CRM">#CRM_دیزاین</option>
<option value="دیزاین_CRM">#دیزاین_CRM</option>
<option value="تگ_ها">#تگ_ها</option>
<option value="اپ_نیتیو">#اپ_نیتیو</option>
<option value="مالی">#مالی</option>
@ -1183,8 +1246,14 @@
</footer>
<script>
// تابع تبدیل اعداد لاتین به فارسی
function toFa(num) {
if (num === null || num === undefined) return '';
return num.toString().replace(/\d/g, d => '۰۱۲۳۴۵۶۷۸۹'[d]);
}
// کلید ذخیره‌سازی در PostgreSQL 17
const DB_STATE_KEY = 'sara_roadmap_board_v2';
const DB_STATE_KEY = 'sara_roadmap_board_v2_2';
// داده‌های پایه رودمپ تعهدشده
const DEFAULT_WEEKS = [
@ -1297,7 +1366,7 @@
title: "تحویل CRM و دیزاین‌های جدید از دارا و سپردن به مرتضی",
desc: "دریافت طرح‌های فیگما از دارا عسکری و انتقال دقیق نیازمندی‌ها به مرتضی برای فرانت.",
assignee: "سارا محمودزاده",
tag: "CRM",
tag: "دیزاین_CRM",
tagClass: "tag-crm",
status: "todo",
statusText: "برنامه‌ریزی‌شده"
@ -1345,7 +1414,7 @@
title: "پیاده‌سازی فرانت‌اند دیزاین‌های دارا توسط مرتضی",
desc: "توسعه کامپوننت‌های فرانت‌اند کارت‌ها، پاپ‌آپ‌ها و فیچرهای جدید در وب‌سایت اکیپا.",
assignee: "مرتضی صادقی",
tag: "CRM",
tag: "دیزاین_CRM",
tagClass: "tag-crm",
status: "todo",
statusText: "برنامه‌ریزی‌شده"
@ -1361,6 +1430,44 @@
statusText: "برنامه‌ریزی‌شده"
}
]
},
{
id: "w4",
title: "هفته چهارم تا ششم (آذرماه) - تثبیت درگاه‌ها، سئو و آماده‌سازی کمپین شب یلدا",
dates: "۷ تا ۳۰ آذر ۱۴۰۵ (افق شب یلدا)",
badgeClass: "badge-w4",
tasks: [
{
id: "T401",
title: "تست لود و پایداری چک‌اوت با درگاه‌های اعتباری تجمیعی (اسنپ‌پی، وایب، اوزون)",
desc: "تضمین تجربه پرداخت بدون افت سرعت در ساعات اوج ترافیک شب یلدا با مشارکت بک‌اند.",
assignee: "آرمین زاهدی / ایمان",
tag: "مالی",
tagClass: "tag-finance",
status: "todo",
statusText: "برنامه‌ریزی‌شده"
},
{
id: "T402",
title: "فریز کدهای فنی سئو و صفحات لندینگ کمپین یلدا",
desc: "فریز ساختار روت‌ها، ایندکس صفحات تخفیف ویژه و رصد خطاهای سرچ کنسول با نظارت آقای فلاحی.",
assignee: "حامد فلاحی / مرتضی",
tag: "سئو",
tagClass: "tag-seo",
status: "todo",
statusText: "برنامه‌ریزی‌شده"
},
{
id: "T403",
title: "لندینگ گردونه شانس و تخفیف‌های زمان‌دار یلدا روی سایت",
desc: "اجرای فرانت‌اند پروموشن‌های شب یلدا توسط مرتضی بر اساس دیزاین‌های تاییدشده دارا و سارا.",
assignee: "مرتضی صادقی / دارا",
tag: "دیزاین_CRM",
tagClass: "tag-crm",
status: "todo",
statusText: "برنامه‌ریزی‌شده"
}
]
}
];
@ -1382,7 +1489,7 @@
{
id: "REQ-02",
title: "ماژول «سانس خالی شد خبرم کن» در صفحه محصول (PDP)",
tag: "CRM",
tag: "دیزاین_CRM",
tagClass: "tag-crm",
reach: 3500,
impact: 3,
@ -1552,7 +1659,7 @@
filteredTasks.forEach(task => {
rowsHtml += `
<tr>
<td style="font-family: monospace; font-weight: 800; color: #64748B;">${task.id}</td>
<td style="font-variant-numeric: tabular-nums; font-weight: 800; color: #64748B;">${task.id}</td>
<td class="task-title-cell">
<span>${task.title}</span>
<span class="task-desc">${task.desc}</span>
@ -1580,6 +1687,10 @@
<div class="week-title-row">
<span class="week-badge ${week.badgeClass}">${week.id.toUpperCase()}</span>
<span class="week-title">${week.title}</span>
<div class="info-tip">
(i)
<div class="tip-box">تغییر وضعیت هر ردیف بلافاصله در دیتابیس PostgreSQL ثبت و در نمای کانبان به‌روزرسانی می‌شود.</div>
</div>
</div>
<span class="week-dates">🗓️ ${week.dates}</span>
</div>
@ -1649,10 +1760,10 @@
});
});
document.getElementById('count_todo').innerText = counts.todo;
document.getElementById('count_in_progress').innerText = counts.in_progress;
document.getElementById('count_blocked').innerText = counts.blocked;
document.getElementById('count_done').innerText = counts.done;
document.getElementById('count_todo').innerText = toFa(counts.todo);
document.getElementById('count_in_progress').innerText = toFa(counts.in_progress);
document.getElementById('count_blocked').innerText = toFa(counts.blocked);
document.getElementById('count_done').innerText = toFa(counts.done);
}
// ۳. رندر ایده‌ها و نیازمندی‌ها (RICE Matrix)
@ -1662,18 +1773,23 @@
// سورت بر اساس امتیاز RICE نزولی
const sortedIdeas = [...stateIdeas].sort((a, b) => b.riceScore - a.riceScore);
let highPriorityCount = 0;
sortedIdeas.forEach((idea, idx) => {
let scoreClass = 'score-low';
if (idea.riceScore >= 2500) scoreClass = 'score-high';
else if (idea.riceScore >= 1500) scoreClass = 'score-med';
if (idea.riceScore >= 2500) {
scoreClass = 'score-high';
highPriorityCount++;
} else if (idea.riceScore >= 1500) {
scoreClass = 'score-med';
}
let badgeClass = 'tag-priority-quickwin';
if (idea.recommendation.includes('Big Bet')) badgeClass = 'tag-priority-bigbet';
const tr = document.createElement('tr');
tr.innerHTML = `
<td style="font-family: monospace; font-weight: 800; color: #64748B;">${idea.id}</td>
<td style="font-variant-numeric: tabular-nums; font-weight: 800; color: #64748B;">${idea.id}</td>
<td class="task-title-cell">
<span>${idea.title}</span>
<span class="task-desc">${idea.desc || ''}</span>
@ -1681,12 +1797,12 @@
<td>
<span class="tag-chip ${idea.tagClass}">#${idea.tag}</span>
</td>
<td style="font-weight: 700;">${idea.reach.toLocaleString()}</td>
<td style="font-weight: 700;">${idea.impact}</td>
<td style="font-weight: 700;">${Math.round(idea.confidence * 100)}%</td>
<td style="font-weight: 700;">${idea.effort}</td>
<td style="font-weight: 700;">${toFa(idea.reach.toLocaleString())}</td>
<td style="font-weight: 700;">${toFa(idea.impact)}</td>
<td style="font-weight: 700;">${toFa(Math.round(idea.confidence * 100))}%</td>
<td style="font-weight: 700;">${toFa(idea.effort)}</td>
<td>
<span class="rice-score-badge ${scoreClass}">${idea.riceScore}</span>
<span class="rice-score-badge ${scoreClass}">${toFa(idea.riceScore)}</span>
</td>
<td>
<span class="${badgeClass}">${idea.recommendation}</span>
@ -1700,8 +1816,12 @@
tbody.appendChild(tr);
});
document.getElementById('badgeIdeasCount').innerText = sortedIdeas.length;
document.getElementById('kpiIdeasCount').innerText = sortedIdeas.length;
document.getElementById('badgeIdeasCount').innerText = toFa(sortedIdeas.length);
document.getElementById('kpiIdeasCount').innerText = toFa(sortedIdeas.length);
const ideasDetailEl = document.getElementById('kpiIdeasDetail');
if (ideasDetailEl) {
ideasDetailEl.innerText = `${toFa(highPriorityCount)} مورد با اولویت بالا (RICE ≥ ۲۵۰۰)`;
}
}
// به‌روزرسانی آمارها
@ -1714,10 +1834,11 @@
});
});
document.getElementById('kpiTotalTasks').innerText = total;
document.getElementById('kpiDoneTasks').innerText = `${done} تسک انجام‌شده`;
document.getElementById('badgeTimelineCount').innerText = total;
document.getElementById('badgeKanbanCount').innerText = total;
document.getElementById('kpiTotalTasks').innerText = toFa(total);
document.getElementById('kpiDoneTasks').innerText = `${toFa(done)} تسک انجام‌شده`;
document.getElementById('kpiWeek1Count').innerText = toFa(stateWeeks[0] ? stateWeeks[0].tasks.length : 0);
document.getElementById('badgeTimelineCount').innerText = toFa(total);
document.getElementById('badgeKanbanCount').innerText = toFa(total);
}
// تغییر وضعیت تسک
@ -1807,6 +1928,8 @@
'سلر': 'tag-seller',
'سئو': 'tag-seo',
'دانش_بنیان': 'tag-danesh',
'دیزاین_CRM': 'tag-crm',
'CRM_دیزاین': 'tag-crm',
'CRM': 'tag-crm',
'تگ_ها': 'tag-badges',
'اپ_نیتیو': 'tag-app',
@ -1849,6 +1972,15 @@
downloadAnchor.remove();
}
function resetToDefaultData() {
if (confirm("آیا مطمئن هستید که می‌خواهید تمام تغییرات ذخیره‌شده را به تنظیمات پیش‌فرض کارخانه بازنشانی کنید؟")) {
stateWeeks = JSON.parse(JSON.stringify(DEFAULT_WEEKS));
stateIdeas = JSON.parse(JSON.stringify(DEFAULT_IDEAS));
renderAll();
saveStateToPostgres();
}
}
// اجرای اولیه
window.addEventListener('DOMContentLoaded', () => {
initState();

View file

@ -633,7 +633,7 @@
font-size: 10px;
font-weight: 800;
color: var(--text-muted);
font-family: monospace;
font-variant-numeric: tabular-nums;
}
.card-title {
@ -857,6 +857,10 @@
💾 بک‌آپ JSON
</button>
<button class="btn btn-outline" onclick="resetToDefaultData()" title="بازنشانی اطلاعات بورد به برنامه پیش‌فرض">
🔄 بازنشانی پیش‌فرض
</button>
<button class="btn btn-primary" onclick="openNewReqModal()">
➕ ثبت نیازمندی / ایده جدید
</button>
@ -937,7 +941,7 @@
</div>
<div class="kpi-value-row">
<span class="kpi-num" id="kpiIdeasCount">۶</span>
<span class="kpi-detail" style="color: var(--primary);">۴ مورد با اولویت بالا (Quick Win)</span>
<span class="kpi-detail" id="kpiIdeasDetail" style="color: var(--primary);">۴ مورد با اولویت بالا (Quick Win)</span>
</div>
</div>
@ -963,7 +967,13 @@
<!-- نوار فیلتر تگ‌ها و اعضا -->
<section class="filter-bar">
<div class="filter-tags-group">
<span class="filter-label">فیلتر تگ‌ها:</span>
<span class="filter-label">
فیلتر تگ‌ها:
<div class="info-tip">
(i)
<div class="tip-box">با انتخاب هر تگ، تسک‌های هفته و کارت‌های کانبان بر اساس موضوع فیلتر می‌شوند.</div>
</div>
</span>
<span class="tag-chip tag-all active" onclick="setFilter('tag', 'all', this)">همه تگ‌ها</span>
<span class="tag-chip tag-wallet" onclick="setFilter('tag', 'کیف_پول', this)">#کیف_پول</span>
<span class="tag-chip tag-vibe" onclick="setFilter('tag', 'وایب', this)">#وایب</span>
@ -971,7 +981,7 @@
<span class="tag-chip tag-seller" onclick="setFilter('tag', 'سلر', this)">#سلر</span>
<span class="tag-chip tag-seo" onclick="setFilter('tag', 'سئو', this)">#سئو</span>
<span class="tag-chip tag-danesh" onclick="setFilter('tag', 'دانش_بنیان', this)">#دانش_بنیان</span>
<span class="tag-chip tag-crm" onclick="setFilter('tag', 'CRM', this)">#CRM_دیزاین</span>
<span class="tag-chip tag-crm" onclick="setFilter('tag', 'دیزاین_CRM', this)">#دیزاین_CRM</span>
<span class="tag-chip tag-badges" onclick="setFilter('tag', 'تگ_ها', this)">#تگ_ها</span>
<span class="tag-chip tag-app" onclick="setFilter('tag', 'اپ_نیتیو', this)">#اپ_نیتیو</span>
<span class="tag-chip tag-finance" onclick="setFilter('tag', 'مالی', this)">#مالی</span>
@ -1003,7 +1013,13 @@
<!-- ستون ۱: در صف اقدام (To Do) -->
<div class="kanban-col" id="col_todo" ondragover="allowDrop(event)" ondrop="dropTask(event, 'todo')">
<div class="col-header">
<span class="col-title">⏳ در صف اقدام (To Do)</span>
<span class="col-title">
⏳ در صف اقدام (To Do)
<div class="info-tip">
(i)
<div class="tip-box">تسک‌های برنامه‌ریزی‌شده در اسپرینت که هنوز شروع نشده‌اند.</div>
</div>
</span>
<span class="col-count" id="count_todo">۰</span>
</div>
<div class="cards-container" id="cards_todo"></div>
@ -1012,7 +1028,13 @@
<!-- ستون ۲: در حال انجام / تست (In Progress) -->
<div class="kanban-col" id="col_in_progress" ondragover="allowDrop(event)" ondrop="dropTask(event, 'in_progress')">
<div class="col-header">
<span class="col-title">🔄 در حال انجام و تست</span>
<span class="col-title">
🔄 در حال انجام و تست
<div class="info-tip">
(i)
<div class="tip-box">تسک‌هایی که اکنون توسط تیم فنی در حال توسعه یا تست استیجینگ هستند.</div>
</div>
</span>
<span class="col-count" id="count_in_progress">۰</span>
</div>
<div class="cards-container" id="cards_in_progress"></div>
@ -1021,7 +1043,13 @@
<!-- ستون ۳: منتظر / مسدود (Blocked / Waiting) -->
<div class="kanban-col" id="col_blocked" ondragover="allowDrop(event)" ondrop="dropTask(event, 'blocked')">
<div class="col-header">
<span class="col-title">🛑 نیازمند پیگیری / تحویل</span>
<span class="col-title">
🛑 نیازمند پیگیری / تحویل
<div class="info-tip">
(i)
<div class="tip-box">تسک‌های متوقف‌شده یا وابسته به پاسخ شریک تجاری / تحویل بین دو عضو تیم.</div>
</div>
</span>
<span class="col-count" id="count_blocked">۰</span>
</div>
<div class="cards-container" id="cards_blocked"></div>
@ -1030,7 +1058,13 @@
<!-- ستون ۴: تکمیل و تحویل‌شده (Done) -->
<div class="kanban-col" id="col_done" ondragover="allowDrop(event)" ondrop="dropTask(event, 'done')">
<div class="col-header">
<span class="col-title">✅ تکمیل‌شده (Done)</span>
<span class="col-title">
✅ تکمیل‌شده (Done)
<div class="info-tip">
(i)
<div class="tip-box">تسک‌های نهایی‌شده و دیپلوی‌شده با تایید مدیر محصول.</div>
</div>
</span>
<span class="col-count" id="count_done">۰</span>
</div>
<div class="cards-container" id="cards_done"></div>
@ -1041,8 +1075,12 @@
<section id="viewIdeas" class="ideas-layout hidden">
<div class="ideas-intro-banner">
<div>
<h2 style="font-size: 16px; font-weight: 800; color: #1E1B4B; margin-bottom: 4px;">
<h2 style="font-size: 16px; font-weight: 800; color: #1E1B4B; margin-bottom: 4px; display: flex; align-items: center; gap: 6px;">
مخزن ایده‌ها، نیازمندی‌ها و ماتریس امتیازدهی RICE
<div class="info-tip">
(i)
<div class="tip-box">نحوه محاسبه: امتیاز RICE برابر است با (تعداد مخاطب ماهیانه × ضریب اثر × درصد اطمینان) تقسیم بر نفر-روز زحمت فنی. امتیاز بالاتر = اولویت فوری‌تر.</div>
</div>
</h2>
<p style="font-size: 12px; color: #4338CA;">
سارا جان، در این بخش نیازمندی‌های محصولی و باگ‌های کلیدی را ثبت کن. سیستم با محاسبه نسبت <code style="direction: ltr; display: inline-block;">(Reach × Impact × Confidence) / Effort</code> دقیقاً می‌گوید کدام آیتم‌ها بازدهی فوری دارند.
@ -1057,14 +1095,39 @@
<table class="week-tasks-table" id="ideasTable">
<thead>
<tr>
<th style="width: 50px;">شناسه</th>
<th style="width: 60px;">شناسه</th>
<th>عنوان نیازمندی / ایده</th>
<th>تگ و دسته‌بندی</th>
<th>تعداد مخاطب (Reach)</th>
<th>اثر (Impact)</th>
<th>اطمینان (Conf.)</th>
<th>زحمت (Effort)</th>
<th>امتیاز RICE</th>
<th>
<div style="display: flex; align-items: center; gap: 4px;">
<span>مخاطب (Reach)</span>
<div class="info-tip">(i)<div class="tip-box">تعداد کاربران یا رویدادهای تحت تاثیر در بازه یک ماهه (برآورد ترافیک اکیپا).</div></div>
</div>
</th>
<th>
<div style="display: flex; align-items: center; gap: 4px;">
<span>اثر (Impact)</span>
<div class="info-tip">(i)<div class="tip-box">ضریب اثرگذاری بر اهداف کلیدی: ۳ = اثر حداکثری، ۲ = اثر متوسط، ۱ = کم، ۰.۵ = ناچیز.</div></div>
</div>
</th>
<th>
<div style="display: flex; align-items: center; gap: 4px;">
<span>اطمینان (Conf.)</span>
<div class="info-tip">(i)<div class="tip-box">درصد قطعیت و اطمینان تیم در مورد برآوردها: ۱۰۰٪ = داده واقعی تست‌شده، ۸۰٪ = تخمین معتبر، ۵۰٪ = فرضیه اولیه.</div></div>
</div>
</th>
<th>
<div style="display: flex; align-items: center; gap: 4px;">
<span>زحمت (Effort)</span>
<div class="info-tip">(i)<div class="tip-box">نفر-هفته یا نفر-روز تخمینی تیم فنی و محصول برای پیاده‌سازی و تست نهایی.</div></div>
</div>
</th>
<th>
<div style="display: flex; align-items: center; gap: 4px;">
<span>امتیاز RICE</span>
<div class="info-tip">(i)<div class="tip-box">فرمول محاسباتی: (Reach × Impact × Confidence) / Effort. امتیازهای بالاتر از ۲۵۰۰ در اولویت اجرای فوری (Quick Win) هستند.</div></div>
</div>
</th>
<th>پیشنهاد هادس</th>
<th>عملیات</th>
</tr>
@ -1101,7 +1164,7 @@
<option value="سلر">#سلر</option>
<option value="سئو">#سئو</option>
<option value="دانش_بنیان">#دانش_بنیان</option>
<option value="CRM">#CRM_دیزاین</option>
<option value="دیزاین_CRM">#دیزاین_CRM</option>
<option value="تگ_ها">#تگ_ها</option>
<option value="اپ_نیتیو">#اپ_نیتیو</option>
<option value="مالی">#مالی</option>
@ -1183,8 +1246,14 @@
</footer>
<script>
// تابع تبدیل اعداد لاتین به فارسی
function toFa(num) {
if (num === null || num === undefined) return '';
return num.toString().replace(/\d/g, d => '۰۱۲۳۴۵۶۷۸۹'[d]);
}
// کلید ذخیره‌سازی در PostgreSQL 17
const DB_STATE_KEY = 'sara_roadmap_board_v2';
const DB_STATE_KEY = 'sara_roadmap_board_v2_2';
// داده‌های پایه رودمپ تعهدشده
const DEFAULT_WEEKS = [
@ -1297,7 +1366,7 @@
title: "تحویل CRM و دیزاین‌های جدید از دارا و سپردن به مرتضی",
desc: "دریافت طرح‌های فیگما از دارا عسکری و انتقال دقیق نیازمندی‌ها به مرتضی برای فرانت.",
assignee: "سارا محمودزاده",
tag: "CRM",
tag: "دیزاین_CRM",
tagClass: "tag-crm",
status: "todo",
statusText: "برنامه‌ریزی‌شده"
@ -1345,7 +1414,7 @@
title: "پیاده‌سازی فرانت‌اند دیزاین‌های دارا توسط مرتضی",
desc: "توسعه کامپوننت‌های فرانت‌اند کارت‌ها، پاپ‌آپ‌ها و فیچرهای جدید در وب‌سایت اکیپا.",
assignee: "مرتضی صادقی",
tag: "CRM",
tag: "دیزاین_CRM",
tagClass: "tag-crm",
status: "todo",
statusText: "برنامه‌ریزی‌شده"
@ -1361,6 +1430,44 @@
statusText: "برنامه‌ریزی‌شده"
}
]
},
{
id: "w4",
title: "هفته چهارم تا ششم (آذرماه) - تثبیت درگاه‌ها، سئو و آماده‌سازی کمپین شب یلدا",
dates: "۷ تا ۳۰ آذر ۱۴۰۵ (افق شب یلدا)",
badgeClass: "badge-w4",
tasks: [
{
id: "T401",
title: "تست لود و پایداری چک‌اوت با درگاه‌های اعتباری تجمیعی (اسنپ‌پی، وایب، اوزون)",
desc: "تضمین تجربه پرداخت بدون افت سرعت در ساعات اوج ترافیک شب یلدا با مشارکت بک‌اند.",
assignee: "آرمین زاهدی / ایمان",
tag: "مالی",
tagClass: "tag-finance",
status: "todo",
statusText: "برنامه‌ریزی‌شده"
},
{
id: "T402",
title: "فریز کدهای فنی سئو و صفحات لندینگ کمپین یلدا",
desc: "فریز ساختار روت‌ها، ایندکس صفحات تخفیف ویژه و رصد خطاهای سرچ کنسول با نظارت آقای فلاحی.",
assignee: "حامد فلاحی / مرتضی",
tag: "سئو",
tagClass: "tag-seo",
status: "todo",
statusText: "برنامه‌ریزی‌شده"
},
{
id: "T403",
title: "لندینگ گردونه شانس و تخفیف‌های زمان‌دار یلدا روی سایت",
desc: "اجرای فرانت‌اند پروموشن‌های شب یلدا توسط مرتضی بر اساس دیزاین‌های تاییدشده دارا و سارا.",
assignee: "مرتضی صادقی / دارا",
tag: "دیزاین_CRM",
tagClass: "tag-crm",
status: "todo",
statusText: "برنامه‌ریزی‌شده"
}
]
}
];
@ -1382,7 +1489,7 @@
{
id: "REQ-02",
title: "ماژول «سانس خالی شد خبرم کن» در صفحه محصول (PDP)",
tag: "CRM",
tag: "دیزاین_CRM",
tagClass: "tag-crm",
reach: 3500,
impact: 3,
@ -1552,7 +1659,7 @@
filteredTasks.forEach(task => {
rowsHtml += `
<tr>
<td style="font-family: monospace; font-weight: 800; color: #64748B;">${task.id}</td>
<td style="font-variant-numeric: tabular-nums; font-weight: 800; color: #64748B;">${task.id}</td>
<td class="task-title-cell">
<span>${task.title}</span>
<span class="task-desc">${task.desc}</span>
@ -1580,6 +1687,10 @@
<div class="week-title-row">
<span class="week-badge ${week.badgeClass}">${week.id.toUpperCase()}</span>
<span class="week-title">${week.title}</span>
<div class="info-tip">
(i)
<div class="tip-box">تغییر وضعیت هر ردیف بلافاصله در دیتابیس PostgreSQL ثبت و در نمای کانبان به‌روزرسانی می‌شود.</div>
</div>
</div>
<span class="week-dates">🗓️ ${week.dates}</span>
</div>
@ -1649,10 +1760,10 @@
});
});
document.getElementById('count_todo').innerText = counts.todo;
document.getElementById('count_in_progress').innerText = counts.in_progress;
document.getElementById('count_blocked').innerText = counts.blocked;
document.getElementById('count_done').innerText = counts.done;
document.getElementById('count_todo').innerText = toFa(counts.todo);
document.getElementById('count_in_progress').innerText = toFa(counts.in_progress);
document.getElementById('count_blocked').innerText = toFa(counts.blocked);
document.getElementById('count_done').innerText = toFa(counts.done);
}
// ۳. رندر ایده‌ها و نیازمندی‌ها (RICE Matrix)
@ -1662,18 +1773,23 @@
// سورت بر اساس امتیاز RICE نزولی
const sortedIdeas = [...stateIdeas].sort((a, b) => b.riceScore - a.riceScore);
let highPriorityCount = 0;
sortedIdeas.forEach((idea, idx) => {
let scoreClass = 'score-low';
if (idea.riceScore >= 2500) scoreClass = 'score-high';
else if (idea.riceScore >= 1500) scoreClass = 'score-med';
if (idea.riceScore >= 2500) {
scoreClass = 'score-high';
highPriorityCount++;
} else if (idea.riceScore >= 1500) {
scoreClass = 'score-med';
}
let badgeClass = 'tag-priority-quickwin';
if (idea.recommendation.includes('Big Bet')) badgeClass = 'tag-priority-bigbet';
const tr = document.createElement('tr');
tr.innerHTML = `
<td style="font-family: monospace; font-weight: 800; color: #64748B;">${idea.id}</td>
<td style="font-variant-numeric: tabular-nums; font-weight: 800; color: #64748B;">${idea.id}</td>
<td class="task-title-cell">
<span>${idea.title}</span>
<span class="task-desc">${idea.desc || ''}</span>
@ -1681,12 +1797,12 @@
<td>
<span class="tag-chip ${idea.tagClass}">#${idea.tag}</span>
</td>
<td style="font-weight: 700;">${idea.reach.toLocaleString()}</td>
<td style="font-weight: 700;">${idea.impact}</td>
<td style="font-weight: 700;">${Math.round(idea.confidence * 100)}%</td>
<td style="font-weight: 700;">${idea.effort}</td>
<td style="font-weight: 700;">${toFa(idea.reach.toLocaleString())}</td>
<td style="font-weight: 700;">${toFa(idea.impact)}</td>
<td style="font-weight: 700;">${toFa(Math.round(idea.confidence * 100))}%</td>
<td style="font-weight: 700;">${toFa(idea.effort)}</td>
<td>
<span class="rice-score-badge ${scoreClass}">${idea.riceScore}</span>
<span class="rice-score-badge ${scoreClass}">${toFa(idea.riceScore)}</span>
</td>
<td>
<span class="${badgeClass}">${idea.recommendation}</span>
@ -1700,8 +1816,12 @@
tbody.appendChild(tr);
});
document.getElementById('badgeIdeasCount').innerText = sortedIdeas.length;
document.getElementById('kpiIdeasCount').innerText = sortedIdeas.length;
document.getElementById('badgeIdeasCount').innerText = toFa(sortedIdeas.length);
document.getElementById('kpiIdeasCount').innerText = toFa(sortedIdeas.length);
const ideasDetailEl = document.getElementById('kpiIdeasDetail');
if (ideasDetailEl) {
ideasDetailEl.innerText = `${toFa(highPriorityCount)} مورد با اولویت بالا (RICE ≥ ۲۵۰۰)`;
}
}
// به‌روزرسانی آمارها
@ -1714,10 +1834,11 @@
});
});
document.getElementById('kpiTotalTasks').innerText = total;
document.getElementById('kpiDoneTasks').innerText = `${done} تسک انجام‌شده`;
document.getElementById('badgeTimelineCount').innerText = total;
document.getElementById('badgeKanbanCount').innerText = total;
document.getElementById('kpiTotalTasks').innerText = toFa(total);
document.getElementById('kpiDoneTasks').innerText = `${toFa(done)} تسک انجام‌شده`;
document.getElementById('kpiWeek1Count').innerText = toFa(stateWeeks[0] ? stateWeeks[0].tasks.length : 0);
document.getElementById('badgeTimelineCount').innerText = toFa(total);
document.getElementById('badgeKanbanCount').innerText = toFa(total);
}
// تغییر وضعیت تسک
@ -1807,6 +1928,8 @@
'سلر': 'tag-seller',
'سئو': 'tag-seo',
'دانش_بنیان': 'tag-danesh',
'دیزاین_CRM': 'tag-crm',
'CRM_دیزاین': 'tag-crm',
'CRM': 'tag-crm',
'تگ_ها': 'tag-badges',
'اپ_نیتیو': 'tag-app',
@ -1849,6 +1972,15 @@
downloadAnchor.remove();
}
function resetToDefaultData() {
if (confirm("آیا مطمئن هستید که می‌خواهید تمام تغییرات ذخیره‌شده را به تنظیمات پیش‌فرض کارخانه بازنشانی کنید؟")) {
stateWeeks = JSON.parse(JSON.stringify(DEFAULT_WEEKS));
stateIdeas = JSON.parse(JSON.stringify(DEFAULT_IDEAS));
renderAll();
saveStateToPostgres();
}
}
// اجرای اولیه
window.addEventListener('DOMContentLoaded', () => {
initState();