1990 lines
72 KiB
HTML
1990 lines
72 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="fa" dir="rtl">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>بورد جامع رودمپ، مدیریت محصول و اولویتبندی نیازمندیهای اکیپا | سارا محمودزاده</title>
|
||
|
||
<!-- فونت وزیرمتن استاندارد -->
|
||
<link rel="preconnect" href="https://cdn.jsdelivr.net">
|
||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css">
|
||
<script src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.6.0/dist/confetti.browser.min.js"></script>
|
||
|
||
<style>
|
||
:root {
|
||
--bg: #F8FAFC;
|
||
--card-bg: #FFFFFF;
|
||
--border: #E2E8F0;
|
||
--border-focus: #6366F1;
|
||
--text: #0F172A;
|
||
--text-muted: #64748B;
|
||
--primary: #4F46E5;
|
||
--primary-hover: #4338CA;
|
||
--primary-light: #EEF2FF;
|
||
--success: #10B981;
|
||
--success-light: #ECFDF5;
|
||
--warning: #F59E0B;
|
||
--warning-light: #FFFBEB;
|
||
--danger: #EF4444;
|
||
--danger-light: #FEF2F2;
|
||
--info: #0284C7;
|
||
--info-light: #F0F9FF;
|
||
--purple: #8B5CF6;
|
||
--purple-light: #F5F3FF;
|
||
--pink: #EC4899;
|
||
--pink-light: #FDF2F8;
|
||
--teal: #0D9488;
|
||
--teal-light: #F0FDFA;
|
||
}
|
||
|
||
* {
|
||
box-sizing: border-box;
|
||
margin: 0;
|
||
padding: 0;
|
||
font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||
font-feature-settings: "tnum";
|
||
}
|
||
|
||
body {
|
||
background-color: var(--bg);
|
||
color: var(--text);
|
||
line-height: 1.5;
|
||
min-height: 100vh;
|
||
display: flex;
|
||
flex-direction: column;
|
||
padding: 0;
|
||
}
|
||
|
||
.hidden { display: none !important; }
|
||
|
||
/* هدر اصلی */
|
||
.app-header {
|
||
position: sticky;
|
||
top: 0;
|
||
z-index: 40;
|
||
background: rgba(255, 255, 255, 0.96);
|
||
backdrop-filter: blur(12px);
|
||
border-bottom: 1px solid var(--border);
|
||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
|
||
}
|
||
|
||
.header-inner {
|
||
max-width: 1560px;
|
||
margin: 0 auto;
|
||
padding: 14px 24px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: 16px;
|
||
flex-wrap: wrap;
|
||
}
|
||
|
||
.brand-section {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 14px;
|
||
}
|
||
|
||
.brand-icon {
|
||
width: 48px;
|
||
height: 48px;
|
||
border-radius: 14px;
|
||
background: linear-gradient(135deg, #4F46E5 0%, #312E81 100%);
|
||
color: #fff;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-size: 24px;
|
||
box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
|
||
}
|
||
|
||
.brand-text h1 {
|
||
font-size: 18px;
|
||
font-weight: 800;
|
||
color: var(--text);
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
|
||
.badge-sub {
|
||
font-size: 11px;
|
||
font-weight: 700;
|
||
padding: 2px 8px;
|
||
border-radius: 6px;
|
||
background: var(--primary-light);
|
||
color: var(--primary);
|
||
border: 1px solid #C7D2FE;
|
||
}
|
||
|
||
.brand-subtitle {
|
||
font-size: 12px;
|
||
color: var(--text-muted);
|
||
margin-top: 2px;
|
||
}
|
||
|
||
.header-actions {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
flex-wrap: wrap;
|
||
}
|
||
|
||
.db-status-pill {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 6px 12px;
|
||
border-radius: 20px;
|
||
font-size: 11px;
|
||
font-weight: 700;
|
||
background: #ECFDF5;
|
||
color: #065F46;
|
||
border: 1px solid #A7F3D0;
|
||
}
|
||
|
||
.db-status-dot {
|
||
width: 8px;
|
||
height: 8px;
|
||
border-radius: 50%;
|
||
background: #10B981;
|
||
display: inline-block;
|
||
animation: pulse 2s infinite;
|
||
}
|
||
|
||
@keyframes pulse {
|
||
0% { transform: scale(0.9); opacity: 0.8; }
|
||
50% { transform: scale(1.2); opacity: 1; }
|
||
100% { transform: scale(0.9); opacity: 0.8; }
|
||
}
|
||
|
||
.btn {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 8px 16px;
|
||
border-radius: 10px;
|
||
font-size: 12px;
|
||
font-weight: 700;
|
||
cursor: pointer;
|
||
border: 1px solid transparent;
|
||
transition: all 0.2s ease;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.btn-primary {
|
||
background: var(--primary);
|
||
color: #fff;
|
||
}
|
||
.btn-primary:hover {
|
||
background: var(--primary-hover);
|
||
box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
|
||
}
|
||
|
||
.btn-outline {
|
||
background: #fff;
|
||
color: var(--text);
|
||
border-color: var(--border);
|
||
}
|
||
.btn-outline:hover {
|
||
background: #F1F5F9;
|
||
border-color: #CBD5E1;
|
||
}
|
||
|
||
/* تبهای ناوبری */
|
||
.nav-tabs-bar {
|
||
background: #fff;
|
||
border-bottom: 1px solid var(--border);
|
||
padding: 0 24px;
|
||
}
|
||
|
||
.nav-tabs-container {
|
||
max-width: 1560px;
|
||
margin: 0 auto;
|
||
display: flex;
|
||
gap: 12px;
|
||
overflow-x: auto;
|
||
}
|
||
|
||
.nav-tab-btn {
|
||
padding: 14px 18px;
|
||
font-size: 13px;
|
||
font-weight: 600;
|
||
color: var(--text-muted);
|
||
background: none;
|
||
border: none;
|
||
border-bottom: 3px solid transparent;
|
||
cursor: pointer;
|
||
transition: all 0.2s ease;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.nav-tab-btn:hover {
|
||
color: var(--text);
|
||
}
|
||
|
||
.nav-tab-btn.active {
|
||
color: var(--primary);
|
||
border-bottom-color: var(--primary);
|
||
font-weight: 800;
|
||
}
|
||
|
||
.tab-badge {
|
||
font-size: 10px;
|
||
padding: 1px 6px;
|
||
border-radius: 10px;
|
||
background: #F1F5F9;
|
||
color: var(--text-muted);
|
||
}
|
||
.nav-tab-btn.active .tab-badge {
|
||
background: var(--primary-light);
|
||
color: var(--primary);
|
||
}
|
||
|
||
/* بدنه اصلی */
|
||
.main-content {
|
||
max-width: 1560px;
|
||
width: 100%;
|
||
margin: 0 auto;
|
||
padding: 24px;
|
||
flex: 1;
|
||
}
|
||
|
||
/* نوار KPI */
|
||
.kpi-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(4, 1fr);
|
||
gap: 16px;
|
||
margin-bottom: 24px;
|
||
}
|
||
@media (max-width: 1024px) {
|
||
.kpi-grid { grid-template-columns: repeat(2, 1fr); }
|
||
}
|
||
@media (max-width: 640px) {
|
||
.kpi-grid { grid-template-columns: 1fr; }
|
||
}
|
||
|
||
.kpi-card {
|
||
background: var(--card-bg);
|
||
border: 1px solid var(--border);
|
||
border-radius: 16px;
|
||
padding: 18px 20px;
|
||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: space-between;
|
||
position: relative;
|
||
}
|
||
|
||
.kpi-header {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
margin-bottom: 8px;
|
||
}
|
||
|
||
.kpi-title {
|
||
font-size: 12px;
|
||
font-weight: 700;
|
||
color: var(--text-muted);
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
}
|
||
|
||
.kpi-value-row {
|
||
display: flex;
|
||
align-items: baseline;
|
||
justify-content: space-between;
|
||
margin-top: 4px;
|
||
}
|
||
|
||
.kpi-num {
|
||
font-size: 26px;
|
||
font-weight: 900;
|
||
color: var(--text);
|
||
}
|
||
|
||
.kpi-detail {
|
||
font-size: 11px;
|
||
font-weight: 600;
|
||
color: var(--text-muted);
|
||
}
|
||
|
||
/* آیکون راهنما (i) و تولتیپ */
|
||
.info-tip {
|
||
position: relative;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 16px;
|
||
height: 16px;
|
||
border-radius: 50%;
|
||
background: #E2E8F0;
|
||
color: #475569;
|
||
font-size: 10px;
|
||
font-weight: 800;
|
||
cursor: help;
|
||
user-select: none;
|
||
}
|
||
|
||
.info-tip .tip-box {
|
||
visibility: hidden;
|
||
opacity: 0;
|
||
position: absolute;
|
||
bottom: 125%;
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
background: #0F172A;
|
||
color: #fff;
|
||
font-size: 11px;
|
||
line-height: 1.45;
|
||
padding: 8px 12px;
|
||
border-radius: 8px;
|
||
width: 240px;
|
||
z-index: 100;
|
||
box-shadow: 0 4px 16px rgba(0,0,0,0.2);
|
||
transition: opacity 0.2s ease, visibility 0.2s ease;
|
||
pointer-events: none;
|
||
font-weight: 400;
|
||
text-align: right;
|
||
}
|
||
|
||
.info-tip .tip-box::after {
|
||
content: "";
|
||
position: absolute;
|
||
top: 100%;
|
||
left: 50%;
|
||
margin-left: -5px;
|
||
border-width: 5px;
|
||
border-style: solid;
|
||
border-color: #0F172A transparent transparent transparent;
|
||
}
|
||
|
||
.info-tip:hover .tip-box {
|
||
visibility: visible;
|
||
opacity: 1;
|
||
}
|
||
|
||
/* فیلترها و نوار جستجو */
|
||
.filter-bar {
|
||
background: var(--card-bg);
|
||
border: 1px solid var(--border);
|
||
border-radius: 14px;
|
||
padding: 14px 20px;
|
||
margin-bottom: 24px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: 16px;
|
||
flex-wrap: wrap;
|
||
}
|
||
|
||
.filter-tags-group {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
flex-wrap: wrap;
|
||
}
|
||
|
||
.filter-label {
|
||
font-size: 12px;
|
||
font-weight: 700;
|
||
color: var(--text-muted);
|
||
margin-left: 4px;
|
||
}
|
||
|
||
.tag-chip {
|
||
font-size: 11px;
|
||
font-weight: 700;
|
||
padding: 4px 10px;
|
||
border-radius: 8px;
|
||
cursor: pointer;
|
||
border: 1px solid transparent;
|
||
transition: all 0.2s ease;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
user-select: none;
|
||
}
|
||
.tag-chip:hover {
|
||
transform: translateY(-1px);
|
||
}
|
||
.tag-chip.active {
|
||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
|
||
border-color: rgba(0, 0, 0, 0.15);
|
||
}
|
||
|
||
/* رنگهای اختصاصی تگها */
|
||
.tag-all { background: #F1F5F9; color: #334155; }
|
||
.tag-wallet { background: #FEF3C7; color: #92400E; }
|
||
.tag-vibe { background: #EDE9FE; color: #5B21B6; }
|
||
.tag-ozon { background: #D1FAE5; color: #065F46; }
|
||
.tag-seller { background: #E0E7FF; color: #3730A3; }
|
||
.tag-seo { background: #DBEAFE; color: #1E40AF; }
|
||
.tag-danesh { background: #E0F2FE; color: #075985; }
|
||
.tag-crm { background: #FCE7F3; color: #9D174D; }
|
||
.tag-badges { background: #CCFBF1; color: #115E59; }
|
||
.tag-app { background: #FFEDD5; color: #9A3412; }
|
||
.tag-finance { background: #DCFCE7; color: #166534; }
|
||
|
||
/* نمای ۱: جدول هفتگی / مایلسونها */
|
||
.timeline-weeks-container {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 20px;
|
||
}
|
||
|
||
.week-card {
|
||
background: var(--card-bg);
|
||
border: 1px solid var(--border);
|
||
border-radius: 16px;
|
||
overflow: hidden;
|
||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
|
||
}
|
||
|
||
.week-header {
|
||
padding: 16px 22px;
|
||
background: #F8FAFC;
|
||
border-bottom: 1px solid var(--border);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
flex-wrap: wrap;
|
||
gap: 12px;
|
||
}
|
||
|
||
.week-title-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
}
|
||
|
||
.week-badge {
|
||
font-size: 11px;
|
||
font-weight: 800;
|
||
padding: 4px 10px;
|
||
border-radius: 8px;
|
||
}
|
||
.badge-w1 { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
|
||
.badge-w2 { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
|
||
.badge-w3 { background: #E0E7FF; color: #3730A3; border: 1px solid #C7D2FE; }
|
||
.badge-w4 { background: #DCFCE7; color: #166534; border: 1px solid #BBF7D0; }
|
||
|
||
.week-title {
|
||
font-size: 15px;
|
||
font-weight: 800;
|
||
color: var(--text);
|
||
}
|
||
|
||
.week-dates {
|
||
font-size: 12px;
|
||
color: var(--text-muted);
|
||
}
|
||
|
||
.week-tasks-table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
text-align: right;
|
||
}
|
||
|
||
.week-tasks-table th {
|
||
background: #FFFFFF;
|
||
padding: 12px 18px;
|
||
font-size: 11px;
|
||
font-weight: 800;
|
||
color: var(--text-muted);
|
||
border-bottom: 1px solid var(--border);
|
||
}
|
||
|
||
.week-tasks-table td {
|
||
padding: 14px 18px;
|
||
border-bottom: 1px solid #F1F5F9;
|
||
font-size: 12px;
|
||
vertical-align: middle;
|
||
}
|
||
|
||
.week-tasks-table tr:last-child td {
|
||
border-bottom: none;
|
||
}
|
||
|
||
.week-tasks-table tr:hover {
|
||
background: #FAFAFA;
|
||
}
|
||
|
||
.task-title-cell {
|
||
font-weight: 700;
|
||
color: var(--text);
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 3px;
|
||
}
|
||
|
||
.task-desc {
|
||
font-size: 11px;
|
||
font-weight: 400;
|
||
color: var(--text-muted);
|
||
}
|
||
|
||
.assignee-chip {
|
||
font-size: 11px;
|
||
font-weight: 700;
|
||
padding: 3px 8px;
|
||
border-radius: 6px;
|
||
background: #F1F5F9;
|
||
color: #334155;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
}
|
||
|
||
.status-select {
|
||
font-size: 11px;
|
||
font-weight: 700;
|
||
padding: 4px 8px;
|
||
border-radius: 6px;
|
||
border: 1px solid var(--border);
|
||
background: #fff;
|
||
cursor: pointer;
|
||
outline: none;
|
||
}
|
||
.status-select:focus {
|
||
border-color: var(--primary);
|
||
}
|
||
|
||
/* نمای ۲: کانبان برد */
|
||
.kanban-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(4, 1fr);
|
||
gap: 18px;
|
||
align-items: start;
|
||
}
|
||
@media (max-width: 1200px) {
|
||
.kanban-grid { grid-template-columns: repeat(2, 1fr); }
|
||
}
|
||
@media (max-width: 640px) {
|
||
.kanban-grid { grid-template-columns: 1fr; }
|
||
}
|
||
|
||
.kanban-col {
|
||
background: #F1F5F9;
|
||
border-radius: 14px;
|
||
padding: 14px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 12px;
|
||
min-height: 500px;
|
||
}
|
||
|
||
.col-header {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding-bottom: 8px;
|
||
border-bottom: 2px solid #E2E8F0;
|
||
}
|
||
|
||
.col-title {
|
||
font-size: 13px;
|
||
font-weight: 800;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
}
|
||
|
||
.col-count {
|
||
font-size: 11px;
|
||
font-weight: 800;
|
||
background: #E2E8F0;
|
||
padding: 2px 8px;
|
||
border-radius: 12px;
|
||
color: #475569;
|
||
}
|
||
|
||
.kanban-card {
|
||
background: #fff;
|
||
border: 1px solid var(--border);
|
||
border-radius: 12px;
|
||
padding: 14px;
|
||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 10px;
|
||
cursor: grab;
|
||
transition: all 0.2s ease;
|
||
}
|
||
.kanban-card:hover {
|
||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
||
transform: translateY(-2px);
|
||
border-color: #CBD5E1;
|
||
}
|
||
|
||
.card-top {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: 8px;
|
||
}
|
||
|
||
.card-id {
|
||
font-size: 10px;
|
||
font-weight: 800;
|
||
color: var(--text-muted);
|
||
font-variant-numeric: tabular-nums;
|
||
}
|
||
|
||
.card-title {
|
||
font-size: 12px;
|
||
font-weight: 800;
|
||
color: var(--text);
|
||
line-height: 1.4;
|
||
}
|
||
|
||
.card-meta {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
margin-top: 4px;
|
||
font-size: 11px;
|
||
}
|
||
|
||
/* نمای ۳: مرکز ایدهها، مشکلات و نیازمندیها (RICE Scoring) */
|
||
.ideas-layout {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 24px;
|
||
}
|
||
|
||
.ideas-intro-banner {
|
||
background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
|
||
border: 1px solid #C7D2FE;
|
||
border-radius: 16px;
|
||
padding: 20px 24px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
flex-wrap: wrap;
|
||
gap: 16px;
|
||
}
|
||
|
||
.ideas-table-card {
|
||
background: var(--card-bg);
|
||
border: 1px solid var(--border);
|
||
border-radius: 16px;
|
||
overflow: hidden;
|
||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
|
||
}
|
||
|
||
.rice-score-badge {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 4px 10px;
|
||
border-radius: 8px;
|
||
font-weight: 900;
|
||
font-size: 13px;
|
||
}
|
||
.score-high { background: #DCFCE7; color: #166534; }
|
||
.score-med { background: #FEF3C7; color: #92400E; }
|
||
.score-low { background: #F1F5F9; color: #475569; }
|
||
|
||
.tag-priority-quickwin {
|
||
font-size: 10px;
|
||
font-weight: 800;
|
||
background: #D1FAE5;
|
||
color: #065F46;
|
||
padding: 2px 6px;
|
||
border-radius: 4px;
|
||
display: inline-block;
|
||
}
|
||
.tag-priority-bigbet {
|
||
font-size: 10px;
|
||
font-weight: 800;
|
||
background: #EDE9FE;
|
||
color: #5B21B6;
|
||
padding: 2px 6px;
|
||
border-radius: 4px;
|
||
display: inline-block;
|
||
}
|
||
|
||
/* مودال ثبت نیازمندی جدید */
|
||
.modal-overlay {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
background: rgba(15, 23, 42, 0.6);
|
||
backdrop-filter: blur(4px);
|
||
z-index: 100;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 16px;
|
||
}
|
||
|
||
.modal-box {
|
||
background: #fff;
|
||
border-radius: 18px;
|
||
width: 100%;
|
||
max-width: 600px;
|
||
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
||
overflow: hidden;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
|
||
.modal-header {
|
||
padding: 18px 24px;
|
||
background: #F8FAFC;
|
||
border-bottom: 1px solid var(--border);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
}
|
||
|
||
.modal-title {
|
||
font-size: 16px;
|
||
font-weight: 800;
|
||
color: var(--text);
|
||
}
|
||
|
||
.modal-body {
|
||
padding: 20px 24px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 16px;
|
||
max-height: 80vh;
|
||
overflow-y: auto;
|
||
}
|
||
|
||
.form-group {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 6px;
|
||
}
|
||
|
||
.form-label {
|
||
font-size: 12px;
|
||
font-weight: 700;
|
||
color: var(--text);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
}
|
||
|
||
.form-input, .form-select, .form-textarea {
|
||
width: 100%;
|
||
padding: 10px 12px;
|
||
border-radius: 10px;
|
||
border: 1px solid var(--border);
|
||
font-size: 12px;
|
||
outline: none;
|
||
transition: border-color 0.2s;
|
||
}
|
||
.form-input:focus, .form-select:focus, .form-textarea:focus {
|
||
border-color: var(--primary);
|
||
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
|
||
}
|
||
|
||
.form-row-2 {
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
gap: 12px;
|
||
}
|
||
|
||
.modal-footer {
|
||
padding: 16px 24px;
|
||
background: #F8FAFC;
|
||
border-top: 1px solid var(--border);
|
||
display: flex;
|
||
justify-content: flex-end;
|
||
gap: 10px;
|
||
}
|
||
|
||
/* پاورقی */
|
||
.app-footer {
|
||
background: #fff;
|
||
border-top: 1px solid var(--border);
|
||
padding: 20px 24px;
|
||
margin-top: auto;
|
||
font-size: 12px;
|
||
color: var(--text-muted);
|
||
}
|
||
.footer-inner {
|
||
max-width: 1560px;
|
||
margin: 0 auto;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
flex-wrap: wrap;
|
||
gap: 12px;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
|
||
<!-- هدر اپلیکیشن -->
|
||
<header class="app-header">
|
||
<div class="header-inner">
|
||
<div class="brand-section">
|
||
<div class="brand-icon">🗺️</div>
|
||
<div class="brand-text">
|
||
<h1>
|
||
بورد رودمپ و مدیریت محصول اکیپا (Ekeepa)
|
||
<span class="badge-sub">نسخه جامع v2</span>
|
||
</h1>
|
||
<p class="brand-subtitle">
|
||
افق اجرایی آبان و آذر ۱۴۰۵ (اسپرینت ۱۵ تا ۱۸) | مدیر محصول: سارا محمودزاده | سیستم هادس (Hades)
|
||
</p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="header-actions">
|
||
<div class="db-status-pill" id="dbStatusPill" title="وضعیت همگامسازی لحظهای با دیتابیس PostgreSQL 17 و بکاند سرور">
|
||
<span class="db-status-dot"></span>
|
||
<span id="dbStatusText">متصل به PostgreSQL 17</span>
|
||
<div class="info-tip">
|
||
(i)
|
||
<div class="tip-box">تمامی تغییرات، ثبت نیازمندیها و وضعیت تسکها مستقیماً در دیتابیس PostgreSQL 17 ذخیره میشوند و حتی با بستن مرورگر پایدار میمانند.</div>
|
||
</div>
|
||
</div>
|
||
|
||
<button class="btn btn-outline" onclick="exportToJSON()" title="دریافت فایل پشتیبان کامل">
|
||
💾 بکآپ JSON
|
||
</button>
|
||
|
||
<button class="btn btn-outline" onclick="resetToDefaultData()" title="بازنشانی اطلاعات بورد به برنامه پیشفرض">
|
||
🔄 بازنشانی پیشفرض
|
||
</button>
|
||
|
||
<button class="btn btn-primary" onclick="openNewReqModal()">
|
||
➕ ثبت نیازمندی / ایده جدید
|
||
</button>
|
||
</div>
|
||
</div>
|
||
</header>
|
||
|
||
<!-- تبهای ناوبری بین نماها -->
|
||
<nav class="nav-tabs-bar">
|
||
<div class="nav-tabs-container">
|
||
<button class="nav-tab-btn active" id="tabBtnTimeline" onclick="switchView('timeline')">
|
||
📅 تقویم هفتگی و تعهدات (Timeline)
|
||
<span class="tab-badge" id="badgeTimelineCount">۱۵</span>
|
||
</button>
|
||
<button class="nav-tab-btn" id="tabBtnKanban" onclick="switchView('kanban')">
|
||
📊 بورد کانبان وضعیت (Kanban Board)
|
||
<span class="tab-badge" id="badgeKanbanCount">۱۵</span>
|
||
</button>
|
||
<button class="nav-tab-btn" id="tabBtnIdeas" onclick="switchView('ideas')">
|
||
💡 اولویتبندی نیازمندیها و ایدهها (RICE Matrix)
|
||
<span class="tab-badge" id="badgeIdeasCount">۶</span>
|
||
</button>
|
||
</div>
|
||
</nav>
|
||
|
||
<!-- محتوای اصلی -->
|
||
<main class="main-content">
|
||
|
||
<!-- کارتهای آماری کلیدی (KPIs) -->
|
||
<section class="kpi-grid">
|
||
<!-- کارت ۱: کل تسکهای فعال -->
|
||
<div class="kpi-card">
|
||
<div class="kpi-header">
|
||
<span class="kpi-title">
|
||
تعهدات کل رودمپ
|
||
<div class="info-tip">
|
||
(i)
|
||
<div class="tip-box">مجموع تسکهای شکستهشده برای هفتههای ۱ تا ۳ و فاز کمپین یلدا در آذرماه.</div>
|
||
</div>
|
||
</span>
|
||
<span style="font-size: 16px;">📌</span>
|
||
</div>
|
||
<div class="kpi-value-row">
|
||
<span class="kpi-num" id="kpiTotalTasks">۱۵</span>
|
||
<span class="kpi-detail" id="kpiDoneTasks">۲ تسک انجامشده</span>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- کارت ۲: وضعیت بحرانی هفته جاری -->
|
||
<div class="kpi-card" style="border-right: 4px solid var(--danger);">
|
||
<div class="kpi-header">
|
||
<span class="kpi-title">
|
||
ددلاین هفته جاری (۵شنبه ۲۱ آبان)
|
||
<div class="info-tip">
|
||
(i)
|
||
<div class="tip-box">تسکهای تعهدشده برای پایان این هفته: کیف پول، وایب، اوزون، و تست دانشبنیان.</div>
|
||
</div>
|
||
</span>
|
||
<span style="font-size: 16px;">⏳</span>
|
||
</div>
|
||
<div class="kpi-value-row">
|
||
<span class="kpi-num" id="kpiWeek1Count">۷</span>
|
||
<span class="kpi-detail" style="color: var(--danger); font-weight: 700;">نیازمند تست و تحویل فوری</span>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- کارت ۳: نیازمندیها در صف ارزیابی RICE -->
|
||
<div class="kpi-card" style="border-right: 4px solid var(--primary);">
|
||
<div class="kpi-header">
|
||
<span class="kpi-title">
|
||
نیازمندیها و ایدههای در صف
|
||
<div class="info-tip">
|
||
(i)
|
||
<div class="tip-box">ایدهها و نیازمندیهای پیشنهادی سارا که منتظر ارزیابی و امتیازدهی RICE هستند.</div>
|
||
</div>
|
||
</span>
|
||
<span style="font-size: 16px;">💡</span>
|
||
</div>
|
||
<div class="kpi-value-row">
|
||
<span class="kpi-num" id="kpiIdeasCount">۶</span>
|
||
<span class="kpi-detail" id="kpiIdeasDetail" style="color: var(--primary);">۴ مورد با اولویت بالا (Quick Win)</span>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- کارت ۴: اعضای درگیر پروژه -->
|
||
<div class="kpi-card" style="border-right: 4px solid var(--success);">
|
||
<div class="kpi-header">
|
||
<span class="kpi-title">
|
||
تخصیص منابع تیم
|
||
<div class="info-tip">
|
||
(i)
|
||
<div class="tip-box">تعداد افراد مسئول شامل آرمین، مرتضی، احسان، ایمان، آقای فلاحی، دارا، الهه و سارا.</div>
|
||
</div>
|
||
</span>
|
||
<span style="font-size: 16px;">👥</span>
|
||
</div>
|
||
<div class="kpi-value-row">
|
||
<span class="kpi-num">۸ نفر</span>
|
||
<span class="kpi-detail" style="color: var(--success);">توزیع متوازن بکاند و فرانت</span>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- نوار فیلتر تگها و اعضا -->
|
||
<section class="filter-bar">
|
||
<div class="filter-tags-group">
|
||
<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>
|
||
<span class="tag-chip tag-ozon" onclick="setFilter('tag', 'اوزون', this)">#اوزون</span>
|
||
<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-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>
|
||
</div>
|
||
|
||
<div style="display: flex; align-items: center; gap: 8px;">
|
||
<span class="filter-label">مسئول:</span>
|
||
<select class="form-select" id="assigneeSelectFilter" onchange="setFilter('assignee', this.value, null)" style="width: auto; padding: 6px 12px; font-size: 11px;">
|
||
<option value="all">همه اعضای تیم</option>
|
||
<option value="سارا">سارا محمودزاده</option>
|
||
<option value="آرمین">آرمین زاهدی</option>
|
||
<option value="مرتضی">مرتضی صادقی</option>
|
||
<option value="احسان">احسان اسدی</option>
|
||
<option value="ایمان">ایمان پورصمد</option>
|
||
<option value="فلاحی">حامد فلاحی</option>
|
||
<option value="دارا">دارا عسکری</option>
|
||
<option value="الهه">الهه</option>
|
||
</select>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- ۱. نمای تایملاین هفتگی (Timeline View) -->
|
||
<section id="viewTimeline" class="timeline-weeks-container">
|
||
<!-- محتوا به صورت داینامیک رندر میشود -->
|
||
</section>
|
||
|
||
<!-- ۲. نمای کانبان برد (Kanban View) -->
|
||
<section id="viewKanban" class="kanban-grid hidden">
|
||
<!-- ستون ۱: در صف اقدام (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)
|
||
<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>
|
||
</div>
|
||
|
||
<!-- ستون ۲: در حال انجام / تست (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">
|
||
🔄 در حال انجام و تست
|
||
<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>
|
||
</div>
|
||
|
||
<!-- ستون ۳: منتظر / مسدود (Blocked / Waiting) -->
|
||
<div class="kanban-col" id="col_blocked" ondragover="allowDrop(event)" ondrop="dropTask(event, 'blocked')">
|
||
<div class="col-header">
|
||
<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>
|
||
</div>
|
||
|
||
<!-- ستون ۴: تکمیل و تحویلشده (Done) -->
|
||
<div class="kanban-col" id="col_done" ondragover="allowDrop(event)" ondrop="dropTask(event, 'done')">
|
||
<div class="col-header">
|
||
<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>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- ۳. نمای ایدهها و نیازمندیها (RICE Matrix View) -->
|
||
<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; 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> دقیقاً میگوید کدام آیتمها بازدهی فوری دارند.
|
||
</p>
|
||
</div>
|
||
<button class="btn btn-primary" onclick="openNewReqModal()">
|
||
➕ افزودن نیازمندی جدید
|
||
</button>
|
||
</div>
|
||
|
||
<div class="ideas-table-card">
|
||
<table class="week-tasks-table" id="ideasTable">
|
||
<thead>
|
||
<tr>
|
||
<th style="width: 60px;">شناسه</th>
|
||
<th>عنوان نیازمندی / ایده</th>
|
||
<th>تگ و دستهبندی</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>
|
||
</thead>
|
||
<tbody id="ideasTableBody">
|
||
<!-- رندر داینامیک -->
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</section>
|
||
|
||
</main>
|
||
|
||
<!-- مودال ثبت نیازمندی جدید -->
|
||
<div class="modal-overlay hidden" id="newReqModal">
|
||
<div class="modal-box">
|
||
<div class="modal-header">
|
||
<h3 class="modal-title">ثبت نیازمندی / ایده جدید در بورد محصول</h3>
|
||
<button class="btn btn-outline" onclick="closeNewReqModal()" style="padding: 4px 10px;">✕</button>
|
||
</div>
|
||
<div class="modal-body">
|
||
<div class="form-group">
|
||
<label class="form-label">عنوان نیازمندی یا صورت مسئله:</label>
|
||
<input type="text" id="reqTitle" class="form-input" placeholder="مثال: اعلان پیامکی به کاربر پس از شارژ خودکار کیف پول">
|
||
</div>
|
||
|
||
<div class="form-row-2">
|
||
<div class="form-group">
|
||
<label class="form-label">تگ موضوعی:</label>
|
||
<select id="reqTag" class="form-select">
|
||
<option value="کیف_پول">#کیف_پول</option>
|
||
<option value="وایب">#وایب</option>
|
||
<option value="اوزون">#اوزون</option>
|
||
<option value="سلر">#سلر</option>
|
||
<option value="سئو">#سئو</option>
|
||
<option value="دانش_بنیان">#دانش_بنیان</option>
|
||
<option value="دیزاین_CRM">#دیزاین_CRM</option>
|
||
<option value="تگ_ها">#تگ_ها</option>
|
||
<option value="اپ_نیتیو">#اپ_نیتیو</option>
|
||
<option value="مالی">#مالی</option>
|
||
</select>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="form-label">مسئول پیشنهادی:</label>
|
||
<select id="reqAssignee" class="form-select">
|
||
<option value="مرتضی صادقی">مرتضی صادقی (فرانتاند)</option>
|
||
<option value="آرمین زاهدی">آرمین زاهدی (بکاند)</option>
|
||
<option value="احسان اسدی">احسان اسدی (فولاستک/سلر)</option>
|
||
<option value="ایمان پورصمد">ایمان پورصمد (بکاند/مالی)</option>
|
||
<option value="حامد فلاحی">حامد فلاحی (سئو/استراتژی)</option>
|
||
<option value="دارا عسکری">دارا عسکری (دیزاین/CRM)</option>
|
||
<option value="الهه">الهه (اپ نیتیو/عملیات)</option>
|
||
<option value="سارا محمودزاده">سارا محمودزاده (مدیریت محصول)</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label class="form-label">شرح نیازمندی و ارزش بیزینسی:</label>
|
||
<textarea id="reqDesc" class="form-textarea" rows="2" placeholder="چرا این تسک مهمه و چه گرهای از کاربر یا عملیات باز میکنه؟"></textarea>
|
||
</div>
|
||
|
||
<div style="background: #F8FAFC; padding: 12px; border-radius: 10px; border: 1px solid var(--border);">
|
||
<span style="font-size: 11px; font-weight: 800; color: var(--primary); display: block; margin-bottom: 8px;">
|
||
📊 پارامترهای امتیازدهی RICE:
|
||
</span>
|
||
<div class="form-row-2" style="margin-bottom: 8px;">
|
||
<div class="form-group">
|
||
<label class="form-label" style="font-size: 11px;">مخاطب ماهیانه (Reach):</label>
|
||
<input type="number" id="reqReach" class="form-input" value="1000" min="10" step="100">
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="form-label" style="font-size: 11px;">اثر (Impact):</label>
|
||
<select id="reqImpact" class="form-select">
|
||
<option value="0.5">کم (۰.۵)</option>
|
||
<option value="1" selected>متوسط (۱)</option>
|
||
<option value="2">زیاد (۲)</option>
|
||
<option value="3">انفجاری (۳)</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="form-row-2">
|
||
<div class="form-group">
|
||
<label class="form-label" style="font-size: 11px;">اطمینان (Confidence):</label>
|
||
<select id="reqConfidence" class="form-select">
|
||
<option value="0.5">۵۰٪ (شکدار)</option>
|
||
<option value="0.8" selected>۸۰٪ (مبتنی بر شواهد کلریتی)</option>
|
||
<option value="1.0">۱۰۰٪ (تستشده و قطعی)</option>
|
||
</select>
|
||
</div>
|
||
<div class="form-group">
|
||
<label class="form-label" style="font-size: 11px;">زحمت فنی (Effort روز/نفر):</label>
|
||
<input type="number" id="reqEffort" class="form-input" value="2" min="0.5" step="0.5">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button class="btn btn-outline" onclick="closeNewReqModal()">انصراف</button>
|
||
<button class="btn btn-primary" onclick="submitNewRequirement()">ثبت و محاسبه اولویت</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- پاورقی -->
|
||
<footer class="app-footer">
|
||
<div class="footer-inner">
|
||
<div>
|
||
<strong>هادس (Hades Core)</strong> | هسته هوشمند عملیات و توسعه محصول اکیپا اینترپرایز
|
||
</div>
|
||
<div>
|
||
<span>شناسنامه اصالت داده: 🟢 دیتابیس زنده PostgreSQL 17 + تیکتهای اسپرینت ۱۵ جیرا</span>
|
||
</div>
|
||
</div>
|
||
</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_2';
|
||
|
||
// دادههای پایه رودمپ تعهدشده
|
||
const DEFAULT_WEEKS = [
|
||
{
|
||
id: "w1",
|
||
title: "هفته اول (جاری) - تثبیت کیف پول، وایب، اوزون و دانشبنیان",
|
||
dates: "۱۹ تا ۲۱ آبان ۱۴۰۵ (منتهی به ۵شنبه این هفته)",
|
||
badgeClass: "badge-w1",
|
||
tasks: [
|
||
{
|
||
id: "T101",
|
||
title: "تست سرتاسری و کاربری کیف پول در محیط استیجینگ",
|
||
desc: "تست خرید با کیف پول، رزرو موفق، لاجیک استرداد وجه و بررسی پیامکهای تایید.",
|
||
assignee: "ایمان پورصمد / سارا",
|
||
tag: "کیف_پول",
|
||
tagClass: "tag-wallet",
|
||
status: "in_progress",
|
||
statusText: "در حال تست"
|
||
},
|
||
{
|
||
id: "T102",
|
||
title: "تحویل کامل دیتای بکاند کیف پول از آرمین به مرتضی",
|
||
desc: "ارائه ساختار ریسپانس API لجر تراکنشها، موجودی و اندپوینتهای تسویه جهت بایند کردن فرانت.",
|
||
assignee: "آرمین زاهدی",
|
||
tag: "کیف_پول",
|
||
tagClass: "tag-wallet",
|
||
status: "todo",
|
||
statusText: "در صف تحویل"
|
||
},
|
||
{
|
||
id: "T103",
|
||
title: "پیشبرد و فاینال تستهای کیف پول توسط ایمان تا ۵شنبه",
|
||
desc: "پوشش سناریوهای مرزی لغو رزرو بازیکن و اطمینان از شارژ دقیق کیف پول بدون نیاز به کارت بانکی.",
|
||
assignee: "ایمان پورصمد",
|
||
tag: "کیف_پول",
|
||
tagClass: "tag-wallet",
|
||
status: "in_progress",
|
||
statusText: "در حال تست"
|
||
},
|
||
{
|
||
id: "T104",
|
||
title: "انتقال بخشهای مالی به بکاند و ترتمیزکاری کدها",
|
||
desc: "انتقال محاسبات تخفیف و پورسانت به سرویس مالی بکاند و تفکیک جدول کوپنها (Refactoring).",
|
||
assignee: "ایمان پورصمد",
|
||
tag: "مالی",
|
||
tagClass: "tag-finance",
|
||
status: "todo",
|
||
statusText: "در صف اقدام"
|
||
},
|
||
{
|
||
id: "T105",
|
||
title: "تحویل اندپوینتها و مستندات تستی درگاه وایب (Vibe CPG)",
|
||
desc: "آمادهسازی دسترسی سندباکس و وبهوک پرداخت اعتباری کارتهای رفاهی بانک رفاه به سارا (EKD-922).",
|
||
assignee: "آرمین زاهدی",
|
||
tag: "وایب",
|
||
tagClass: "tag-vibe",
|
||
status: "todo",
|
||
statusText: "در صف تحویل"
|
||
},
|
||
{
|
||
id: "T106",
|
||
title: "نگارش و تحویل تستهای فنی پرونده دانشبنیان به سارا",
|
||
desc: "مستندسازی تستهای بکاند و فایلهای تکمیلی برای ارزیابی معاونت علمی طبق تیکت EKD-940.",
|
||
assignee: "آرمین زاهدی",
|
||
tag: "دانش_بنیان",
|
||
tagClass: "tag-danesh",
|
||
status: "todo",
|
||
statusText: "در صف تحویل"
|
||
},
|
||
{
|
||
id: "T107",
|
||
title: "پیگیری وضعیت نهایی و زمانبندی بالا آمدن درگاه اوزون (Ozon)",
|
||
desc: "جلسه پیگیری فنی با پارتنر اوزون جهت دریافت تاریخ قطعی لانچ درگاه روی سایت اکیپا.",
|
||
assignee: "سارا محمودزاده",
|
||
tag: "اوزون",
|
||
tagClass: "tag-ozon",
|
||
status: "in_progress",
|
||
statusText: "در حال پیگیری"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
id: "w2",
|
||
title: "هفته دوم - پیادهسازی سلر، سئو، CRM دارا، تگها و اپ نیتیو",
|
||
dates: "۲۳ تا ۲۸ آبان ۱۴۰۵",
|
||
badgeClass: "badge-w2",
|
||
tasks: [
|
||
{
|
||
id: "T201",
|
||
title: "پیادهسازی سلر روی سایت: فیلترها، هومپیج و صفحات PDP",
|
||
desc: "احسان ساختار سلر جدید را در فیلترینگ، نمایش کارتهای هومپیج و صفحات جزئیات پیادهسازی کند.",
|
||
assignee: "احسان اسدی",
|
||
tag: "سلر",
|
||
tagClass: "tag-seller",
|
||
status: "todo",
|
||
statusText: "برنامهریزیشده"
|
||
},
|
||
{
|
||
id: "T202",
|
||
title: "تحویل گزارش ممیزی سئو و بخش دانشبنیان به سارا",
|
||
desc: "آقای فلاحی خروجی اصلاحات سئو (Title/Canonical/SSR) و مدارک دانشبنیان را تحویل دهد.",
|
||
assignee: "حامد فلاحی",
|
||
tag: "سئو",
|
||
tagClass: "tag-seo",
|
||
status: "todo",
|
||
statusText: "برنامهریزیشده"
|
||
},
|
||
{
|
||
id: "T203",
|
||
title: "تحویل CRM و دیزاینهای جدید از دارا و سپردن به مرتضی",
|
||
desc: "دریافت طرحهای فیگما از دارا عسکری و انتقال دقیق نیازمندیها به مرتضی برای فرانت.",
|
||
assignee: "سارا محمودزاده",
|
||
tag: "دیزاین_CRM",
|
||
tagClass: "tag-crm",
|
||
status: "todo",
|
||
statusText: "برنامهریزیشده"
|
||
},
|
||
{
|
||
id: "T204",
|
||
title: "ساخت تگهای جدید سیستمی و رنگیسازی آنها توسط مرتضی",
|
||
desc: "سارا تگهای جدید را در پنل بسازد و مرتضی پالت رنگی و نشانهای اختصاصی آنها را در UI پیاده کند.",
|
||
assignee: "سارا / مرتضی",
|
||
tag: "تگ_ها",
|
||
tagClass: "tag-badges",
|
||
status: "todo",
|
||
statusText: "برنامهریزیشده"
|
||
},
|
||
{
|
||
id: "T205",
|
||
title: "بیلد و انتشار اپ نیتیو در کافهبازار و گوگلپلی + انتقال مسیر به الهه",
|
||
desc: "آرمین بیلد نهایی را برای استورها منتشر کرده و روالها و مستندات را در اختیار الهه قرار دهد.",
|
||
assignee: "آرمین زاهدی",
|
||
tag: "اپ_نیتیو",
|
||
tagClass: "tag-app",
|
||
status: "todo",
|
||
statusText: "برنامهریزیشده"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
id: "w3",
|
||
title: "هفته سوم - زدن و توسعه اجرایی کامل سلر و دیزاینها",
|
||
dates: "۳۰ آبان تا ۵ آذر ۱۴۰۵",
|
||
badgeClass: "badge-w3",
|
||
tasks: [
|
||
{
|
||
id: "T301",
|
||
title: "اجرا و کدنویسی کامل سلر جدید روی محیط عملیاتی سایت",
|
||
desc: "احسان موارد تحویلی سلر را به صورت کامل و تستشده روی سایت اجرا کند و بالا بیاورد.",
|
||
assignee: "احسان اسدی",
|
||
tag: "سلر",
|
||
tagClass: "tag-seller",
|
||
status: "todo",
|
||
statusText: "برنامهریزیشده"
|
||
},
|
||
{
|
||
id: "T302",
|
||
title: "پیادهسازی فرانتاند دیزاینهای دارا توسط مرتضی",
|
||
desc: "توسعه کامپوننتهای فرانتاند کارتها، پاپآپها و فیچرهای جدید در وبسایت اکیپا.",
|
||
assignee: "مرتضی صادقی",
|
||
tag: "دیزاین_CRM",
|
||
tagClass: "tag-crm",
|
||
status: "todo",
|
||
statusText: "برنامهریزیشده"
|
||
},
|
||
{
|
||
id: "T303",
|
||
title: "تست و مانیتورینگ اولیه بازخورد کاربران در اپ نیتیو کافهبازار",
|
||
desc: "الهه وضعیت نصبها، کرشهای احتمالی و نظرات کاربران اولیه را پایش و گزارش کند.",
|
||
assignee: "الهه",
|
||
tag: "اپ_نیتیو",
|
||
tagClass: "tag-app",
|
||
status: "todo",
|
||
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: "برنامهریزیشده"
|
||
}
|
||
]
|
||
}
|
||
];
|
||
|
||
// ایدهها و نیازمندیهای اولیه با امتیازدهی RICE
|
||
const DEFAULT_IDEAS = [
|
||
{
|
||
id: "REQ-01",
|
||
title: "اعلان خودکار پیامکی شارژ کیف پول پس از لغو رزرو",
|
||
tag: "کیف_پول",
|
||
tagClass: "tag-wallet",
|
||
reach: 1200,
|
||
impact: 2,
|
||
confidence: 1.0,
|
||
effort: 1,
|
||
riceScore: 2400,
|
||
recommendation: "Quick Win (اقدام فوری)",
|
||
desc: "جلوگیری از تماس با پشتیبانی؛ کاربر به محض لغو رزرو پیامک شارژ کیف پول دریافت میکند."
|
||
},
|
||
{
|
||
id: "REQ-02",
|
||
title: "ماژول «سانس خالی شد خبرم کن» در صفحه محصول (PDP)",
|
||
tag: "دیزاین_CRM",
|
||
tagClass: "tag-crm",
|
||
reach: 3500,
|
||
impact: 3,
|
||
confidence: 0.8,
|
||
effort: 2.5,
|
||
riceScore: 3360,
|
||
recommendation: "Big Bet (ارزش بسیار بالا)",
|
||
desc: "تبدیل تقاضای سرریز به رزرو قطعی در سانسهای پرطرفدار آخر هفته."
|
||
},
|
||
{
|
||
id: "REQ-03",
|
||
title: "فیلتر چندانتخابی میزان ترس و تفکیک دقیق محلههای تهران",
|
||
tag: "سئو",
|
||
tagClass: "tag-seo",
|
||
reach: 4800,
|
||
impact: 2,
|
||
confidence: 0.8,
|
||
effort: 2,
|
||
riceScore: 3840,
|
||
recommendation: "Quick Win (رشد سئو و CRO)",
|
||
desc: "رفع خطای صفر شدن نتایج سرچ و افزایش نرخ تبدیل کاربران موبایل."
|
||
},
|
||
{
|
||
id: "REQ-04",
|
||
title: "تخفیفهای سهم متغیر برند بر اساس دستهبندی و تگ رویدادها",
|
||
tag: "مالی",
|
||
tagClass: "tag-finance",
|
||
reach: 2200,
|
||
impact: 2,
|
||
confidence: 0.8,
|
||
effort: 2,
|
||
riceScore: 1760,
|
||
recommendation: "بسیار مهم برای یلدا",
|
||
desc: "امکان پروموشن اختصاصی روی ورکشاپها بدون متضرر شدن از اتاقهای فرار."
|
||
},
|
||
{
|
||
id: "REQ-05",
|
||
title: "بج اختصاصی رویدادهای ویژه و کودک در کارتهای PLP",
|
||
tag: "تگ_ها",
|
||
tagClass: "tag-badges",
|
||
reach: 1800,
|
||
impact: 1,
|
||
confidence: 1.0,
|
||
effort: 0.5,
|
||
riceScore: 3600,
|
||
recommendation: "Quick Win (پیادهسازی سریع)",
|
||
desc: "شفافیت بصری در نتایج جستجو با رنگبندی تفکیکشده تگها."
|
||
},
|
||
{
|
||
id: "REQ-06",
|
||
title: "درگاه پرداخت اعتباری تجمیعی در پیشفاکتور (Checkout)",
|
||
tag: "وایب",
|
||
tagClass: "tag-vibe",
|
||
reach: 5000,
|
||
impact: 3,
|
||
confidence: 0.7,
|
||
effort: 3.5,
|
||
riceScore: 3000,
|
||
recommendation: "Big Bet (رشد GMV)",
|
||
desc: "نمایش هوشمند گزینههای اقساطی اسنپپی، وایب و اوزون بر اساس مبلغ سبد خرید."
|
||
}
|
||
];
|
||
|
||
// متغیرهای وضعیت جاری
|
||
let stateWeeks = JSON.parse(JSON.stringify(DEFAULT_WEEKS));
|
||
let stateIdeas = JSON.parse(JSON.stringify(DEFAULT_IDEAS));
|
||
let currentFilter = { tag: 'all', assignee: 'all' };
|
||
|
||
// راهاندازی و خواندن از PostgreSQL 17
|
||
async function initState() {
|
||
try {
|
||
const res = await fetch(`/api/db/state?key=${DB_STATE_KEY}`);
|
||
if (res.ok) {
|
||
const json = await res.json();
|
||
if (json && json.data) {
|
||
if (json.data.weeks) stateWeeks = json.data.weeks;
|
||
if (json.data.ideas) stateIdeas = json.data.ideas;
|
||
document.getElementById('dbStatusText').innerText = "همگام با دیتابیس PostgreSQL 17";
|
||
}
|
||
}
|
||
} catch (e) {
|
||
console.warn("استفاده از حافظه کلاینت به دلیل خطای اتصال:", e);
|
||
}
|
||
renderAll();
|
||
}
|
||
|
||
// ذخیره در دیتابیس PostgreSQL 17
|
||
async function saveStateToPostgres() {
|
||
try {
|
||
await fetch('/api/db/state', {
|
||
method: 'POST',
|
||
headers: { 'Content-Type': 'application/json' },
|
||
body: JSON.stringify({
|
||
state_key: DB_STATE_KEY,
|
||
data: { weeks: stateWeeks, ideas: stateIdeas }
|
||
})
|
||
});
|
||
document.getElementById('dbStatusText').innerText = "تغییرات ذخیره شد ✓";
|
||
} catch (e) {
|
||
console.warn("خطا در ذخیره وضعیت دیتابیس:", e);
|
||
}
|
||
}
|
||
|
||
// تغییر نماها
|
||
function switchView(viewName) {
|
||
document.getElementById('viewTimeline').classList.add('hidden');
|
||
document.getElementById('viewKanban').classList.add('hidden');
|
||
document.getElementById('viewIdeas').classList.add('hidden');
|
||
|
||
document.getElementById('tabBtnTimeline').classList.remove('active');
|
||
document.getElementById('tabBtnKanban').classList.remove('active');
|
||
document.getElementById('tabBtnIdeas').classList.remove('active');
|
||
|
||
if (viewName === 'timeline') {
|
||
document.getElementById('viewTimeline').classList.remove('hidden');
|
||
document.getElementById('tabBtnTimeline').classList.add('active');
|
||
} else if (viewName === 'kanban') {
|
||
document.getElementById('viewKanban').classList.remove('hidden');
|
||
document.getElementById('tabBtnKanban').classList.add('active');
|
||
} else if (viewName === 'ideas') {
|
||
document.getElementById('viewIdeas').classList.remove('hidden');
|
||
document.getElementById('tabBtnIdeas').classList.add('active');
|
||
}
|
||
}
|
||
|
||
// تنظیم فیلترها
|
||
function setFilter(type, val, element) {
|
||
if (type === 'tag') {
|
||
currentFilter.tag = val;
|
||
document.querySelectorAll('.filter-tags-group .tag-chip').forEach(el => el.classList.remove('active'));
|
||
if (element) element.classList.add('active');
|
||
} else if (type === 'assignee') {
|
||
currentFilter.assignee = val;
|
||
}
|
||
renderAll();
|
||
}
|
||
|
||
// رندر تمام بخشها
|
||
function renderAll() {
|
||
renderTimeline();
|
||
renderKanban();
|
||
renderIdeas();
|
||
updateMetrics();
|
||
}
|
||
|
||
// ۱. رندر نمای هفتگی (Timeline)
|
||
function renderTimeline() {
|
||
const container = document.getElementById('viewTimeline');
|
||
container.innerHTML = '';
|
||
|
||
stateWeeks.forEach(week => {
|
||
// فیلتر تسکها
|
||
const filteredTasks = week.tasks.filter(t => {
|
||
const matchTag = (currentFilter.tag === 'all') || (t.tag === currentFilter.tag);
|
||
const matchAssignee = (currentFilter.assignee === 'all') || (t.assignee.includes(currentFilter.assignee));
|
||
return matchTag && matchAssignee;
|
||
});
|
||
|
||
if (filteredTasks.length === 0 && (currentFilter.tag !== 'all' || currentFilter.assignee !== 'all')) {
|
||
return;
|
||
}
|
||
|
||
const weekDiv = document.createElement('div');
|
||
weekDiv.className = 'week-card';
|
||
|
||
let rowsHtml = '';
|
||
filteredTasks.forEach(task => {
|
||
rowsHtml += `
|
||
<tr>
|
||
<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>
|
||
</td>
|
||
<td>
|
||
<span class="tag-chip ${task.tagClass}">#${task.tag}</span>
|
||
</td>
|
||
<td>
|
||
<span class="assignee-chip">👤 ${task.assignee}</span>
|
||
</td>
|
||
<td>
|
||
<select class="status-select" onchange="updateTaskStatus('${task.id}', this.value)">
|
||
<option value="todo" ${task.status === 'todo' ? 'selected' : ''}>⏳ در صف اقدام</option>
|
||
<option value="in_progress" ${task.status === 'in_progress' ? 'selected' : ''}>🔄 در حال انجام/تست</option>
|
||
<option value="blocked" ${task.status === 'blocked' ? 'selected' : ''}>🛑 نیازمند تحویل/پیگیری</option>
|
||
<option value="done" ${task.status === 'done' ? 'selected' : ''}>✅ تکمیلشده</option>
|
||
</select>
|
||
</td>
|
||
</tr>
|
||
`;
|
||
});
|
||
|
||
weekDiv.innerHTML = `
|
||
<div class="week-header">
|
||
<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>
|
||
<table class="week-tasks-table">
|
||
<thead>
|
||
<tr>
|
||
<th style="width: 70px;">کد تسک</th>
|
||
<th>عنوان و شرح نیازمندی</th>
|
||
<th style="width: 120px;">تگ</th>
|
||
<th style="width: 170px;">مسئول اجرا</th>
|
||
<th style="width: 160px;">وضعیت</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
${rowsHtml}
|
||
</tbody>
|
||
</table>
|
||
`;
|
||
container.appendChild(weekDiv);
|
||
});
|
||
}
|
||
|
||
// ۲. رندر نمای کانبان (Kanban)
|
||
function renderKanban() {
|
||
const cols = {
|
||
todo: document.getElementById('cards_todo'),
|
||
in_progress: document.getElementById('cards_in_progress'),
|
||
blocked: document.getElementById('cards_blocked'),
|
||
done: document.getElementById('cards_done')
|
||
};
|
||
|
||
Object.values(cols).forEach(c => c.innerHTML = '');
|
||
const counts = { todo: 0, in_progress: 0, blocked: 0, done: 0 };
|
||
|
||
// جمعآوری تمامی تسکها
|
||
stateWeeks.forEach(w => {
|
||
w.tasks.forEach(t => {
|
||
const matchTag = (currentFilter.tag === 'all') || (t.tag === currentFilter.tag);
|
||
const matchAssignee = (currentFilter.assignee === 'all') || (t.assignee.includes(currentFilter.assignee));
|
||
if (!matchTag || !matchAssignee) return;
|
||
|
||
const colKey = t.status || 'todo';
|
||
counts[colKey] = (counts[colKey] || 0) + 1;
|
||
|
||
const card = document.createElement('div');
|
||
card.className = 'kanban-card';
|
||
card.draggable = true;
|
||
card.ondragstart = (e) => dragTask(e, t.id);
|
||
|
||
card.innerHTML = `
|
||
<div class="card-top">
|
||
<span class="card-id">${t.id} (${w.id.toUpperCase()})</span>
|
||
<span class="tag-chip ${t.tagClass}" style="font-size: 10px; padding: 2px 6px;">#${t.tag}</span>
|
||
</div>
|
||
<div class="card-title">${t.title}</div>
|
||
<div class="card-meta">
|
||
<span class="assignee-chip" style="font-size: 10px;">👤 ${t.assignee.split('/')[0]}</span>
|
||
<select class="status-select" style="font-size: 10px; padding: 2px 4px;" onchange="updateTaskStatus('${t.id}', this.value)">
|
||
<option value="todo" ${t.status === 'todo' ? 'selected' : ''}>To Do</option>
|
||
<option value="in_progress" ${t.status === 'in_progress' ? 'selected' : ''}>Progress</option>
|
||
<option value="blocked" ${t.status === 'blocked' ? 'selected' : ''}>Blocked</option>
|
||
<option value="done" ${t.status === 'done' ? 'selected' : ''}>Done</option>
|
||
</select>
|
||
</div>
|
||
`;
|
||
if (cols[colKey]) cols[colKey].appendChild(card);
|
||
});
|
||
});
|
||
|
||
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)
|
||
function renderIdeas() {
|
||
const tbody = document.getElementById('ideasTableBody');
|
||
tbody.innerHTML = '';
|
||
|
||
// سورت بر اساس امتیاز 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';
|
||
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-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>
|
||
</td>
|
||
<td>
|
||
<span class="tag-chip ${idea.tagClass}">#${idea.tag}</span>
|
||
</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}">${toFa(idea.riceScore)}</span>
|
||
</td>
|
||
<td>
|
||
<span class="${badgeClass}">${idea.recommendation}</span>
|
||
</td>
|
||
<td>
|
||
<button class="btn btn-outline" style="padding: 4px 8px; font-size: 11px;" onclick="convertIdeaToTask('${idea.id}')" title="انتقال به تعهدات اسپرینت">
|
||
🚀 انتقال به رودمپ
|
||
</button>
|
||
</td>
|
||
`;
|
||
tbody.appendChild(tr);
|
||
});
|
||
|
||
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 ≥ ۲۵۰۰)`;
|
||
}
|
||
}
|
||
|
||
// بهروزرسانی آمارها
|
||
function updateMetrics() {
|
||
let total = 0, done = 0;
|
||
stateWeeks.forEach(w => {
|
||
w.tasks.forEach(t => {
|
||
total++;
|
||
if (t.status === 'done') done++;
|
||
});
|
||
});
|
||
|
||
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);
|
||
}
|
||
|
||
// تغییر وضعیت تسک
|
||
function updateTaskStatus(taskId, newStatus) {
|
||
stateWeeks.forEach(w => {
|
||
w.tasks.forEach(t => {
|
||
if (t.id === taskId) {
|
||
t.status = newStatus;
|
||
if (newStatus === 'done') {
|
||
try { confetti({ particleCount: 30, spread: 60, origin: { y: 0.8 } }); } catch(e){}
|
||
}
|
||
}
|
||
});
|
||
});
|
||
renderAll();
|
||
saveStateToPostgres();
|
||
}
|
||
|
||
// درگ و دراپ کانبان
|
||
function dragTask(event, taskId) {
|
||
event.dataTransfer.setData("text/plain", taskId);
|
||
}
|
||
function allowDrop(event) {
|
||
event.preventDefault();
|
||
}
|
||
function dropTask(event, targetStatus) {
|
||
event.preventDefault();
|
||
const taskId = event.dataTransfer.getData("text/plain");
|
||
if (taskId) {
|
||
updateTaskStatus(taskId, targetStatus);
|
||
}
|
||
}
|
||
|
||
// تبدیل ایده به تسک رودمپ
|
||
function convertIdeaToTask(ideaId) {
|
||
const idea = stateIdeas.find(i => i.id === ideaId);
|
||
if (!idea) return;
|
||
|
||
const newTask = {
|
||
id: `T-${Math.floor(100 + Math.random() * 900)}`,
|
||
title: idea.title,
|
||
desc: idea.desc,
|
||
assignee: "مرتضی صادقی",
|
||
tag: idea.tag,
|
||
tagClass: idea.tagClass,
|
||
status: "todo",
|
||
statusText: "در صف اقدام"
|
||
};
|
||
|
||
stateWeeks[1].tasks.push(newTask);
|
||
alert(`ایده «${idea.title}» با موفقیت به عنوان تسک به هفته دوم اضافه شد.`);
|
||
renderAll();
|
||
saveStateToPostgres();
|
||
}
|
||
|
||
// مودال ثبت نیازمندی
|
||
function openNewReqModal() {
|
||
document.getElementById('newReqModal').classList.remove('hidden');
|
||
}
|
||
function closeNewReqModal() {
|
||
document.getElementById('newReqModal').classList.add('hidden');
|
||
}
|
||
|
||
function submitNewRequirement() {
|
||
const title = document.getElementById('reqTitle').value.trim();
|
||
if (!title) {
|
||
alert("لطفاً عنوان نیازمندی را وارد فرمایید.");
|
||
return;
|
||
}
|
||
const tag = document.getElementById('reqTag').value;
|
||
const desc = document.getElementById('reqDesc').value.trim();
|
||
const reach = parseFloat(document.getElementById('reqReach').value) || 1000;
|
||
const impact = parseFloat(document.getElementById('reqImpact').value) || 1;
|
||
const confidence = parseFloat(document.getElementById('reqConfidence').value) || 0.8;
|
||
const effort = parseFloat(document.getElementById('reqEffort').value) || 1;
|
||
|
||
const riceScore = Math.round((reach * impact * confidence) / effort);
|
||
|
||
let recommendation = "اولویت استاندارد";
|
||
if (riceScore >= 3000) recommendation = "Big Bet (ارزش بسیار بالا)";
|
||
else if (effort <= 1 && riceScore >= 1800) recommendation = "Quick Win (اقدام فوری)";
|
||
|
||
const tagClassMap = {
|
||
'کیف_پول': 'tag-wallet',
|
||
'وایب': 'tag-vibe',
|
||
'اوزون': 'tag-ozon',
|
||
'سلر': 'tag-seller',
|
||
'سئو': 'tag-seo',
|
||
'دانش_بنیان': 'tag-danesh',
|
||
'دیزاین_CRM': 'tag-crm',
|
||
'CRM_دیزاین': 'tag-crm',
|
||
'CRM': 'tag-crm',
|
||
'تگ_ها': 'tag-badges',
|
||
'اپ_نیتیو': 'tag-app',
|
||
'مالی': 'tag-finance'
|
||
};
|
||
|
||
const newIdea = {
|
||
id: `REQ-${String(stateIdeas.length + 1).padStart(2, '0')}`,
|
||
title: title,
|
||
tag: tag,
|
||
tagClass: tagClassMap[tag] || 'tag-all',
|
||
reach: reach,
|
||
impact: impact,
|
||
confidence: confidence,
|
||
effort: effort,
|
||
riceScore: riceScore,
|
||
recommendation: recommendation,
|
||
desc: desc
|
||
};
|
||
|
||
stateIdeas.push(newIdea);
|
||
closeNewReqModal();
|
||
document.getElementById('reqTitle').value = '';
|
||
document.getElementById('reqDesc').value = '';
|
||
|
||
switchView('ideas');
|
||
renderAll();
|
||
saveStateToPostgres();
|
||
|
||
try { confetti({ particleCount: 40, spread: 70, origin: { y: 0.6 } }); } catch(e){}
|
||
}
|
||
|
||
function exportToJSON() {
|
||
const dataStr = "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify({ weeks: stateWeeks, ideas: stateIdeas }, null, 2));
|
||
const downloadAnchor = document.createElement('a');
|
||
downloadAnchor.setAttribute("href", dataStr);
|
||
downloadAnchor.setAttribute("download", `ekeepa_roadmap_backup_${new Date().toISOString().slice(0,10)}.json`);
|
||
document.body.appendChild(downloadAnchor);
|
||
downloadAnchor.click();
|
||
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();
|
||
});
|
||
</script>
|
||
</body>
|
||
</html>
|