2424 lines
156 KiB
HTML
Executable file
2424 lines
156 KiB
HTML
Executable file
<!DOCTYPE html>
|
||
<html lang="fa" dir="rtl" data-theme="dark">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>Executive Operations Cockpit | حامد فلاحی و محدثه معصومی</title>
|
||
<style>
|
||
@font-face {
|
||
font-family: 'Vazirmatn';
|
||
src: url('fonts/Vazirmatn-Regular.woff2') format('woff2'),
|
||
url('fonts/Vazirmatn-Regular.ttf') format('truetype');
|
||
font-weight: 400;
|
||
font-style: normal;
|
||
font-display: swap;
|
||
}
|
||
@font-face {
|
||
font-family: 'Vazirmatn';
|
||
src: url('fonts/Vazirmatn-Bold.woff2') format('woff2'),
|
||
url('fonts/Vazirmatn-Bold.ttf') format('truetype');
|
||
font-weight: 700;
|
||
font-style: normal;
|
||
font-display: swap;
|
||
}
|
||
|
||
:root {
|
||
/* DARK THEME (Linear & Raycast Aesthetic) */
|
||
--bg-body: #090D16;
|
||
--bg-surface: #0F172A;
|
||
--bg-subtle: #1E293B;
|
||
--bg-card: #131D31;
|
||
--text-primary: #F8FAFC;
|
||
--text-secondary: #94A3B8;
|
||
--text-muted: #64748B;
|
||
--border-color: #1E293B;
|
||
--border-hover: #334155;
|
||
--border-focus: #6366F1;
|
||
|
||
--accent-brand: #6366F1;
|
||
--accent-glow: rgba(99, 102, 241, 0.15);
|
||
|
||
/* Domain Accents */
|
||
--color-ekeepa: #A855F7;
|
||
--color-ekeepa-bg: rgba(168, 85, 247, 0.12);
|
||
--color-mindroo: #F59E0B;
|
||
--color-mindroo-bg: rgba(245, 158, 11, 0.12);
|
||
--color-houshyar: #3B82F6;
|
||
--color-houshyar-bg: rgba(59, 130, 246, 0.12);
|
||
|
||
/* Priority */
|
||
--p-urgent: #EF4444;
|
||
--p-urgent-bg: rgba(239, 68, 68, 0.15);
|
||
--p-medium: #F97316;
|
||
--p-medium-bg: rgba(249, 115, 22, 0.15);
|
||
--p-normal: #38BDF8;
|
||
--p-normal-bg: rgba(56, 189, 248, 0.15);
|
||
|
||
--success: #10B981;
|
||
--success-bg: rgba(16, 185, 129, 0.15);
|
||
|
||
--radius-sm: 8px;
|
||
--radius-md: 12px;
|
||
--radius-lg: 16px;
|
||
--radius-full: 9999px;
|
||
|
||
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
|
||
--shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
|
||
--shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
|
||
}
|
||
|
||
[data-theme="light"] {
|
||
--bg-body: #F8FAFC;
|
||
--bg-surface: #FFFFFF;
|
||
--bg-subtle: #F1F5F9;
|
||
--bg-card: #FFFFFF;
|
||
--text-primary: #0F172A;
|
||
--text-secondary: #475569;
|
||
--text-muted: #64748B;
|
||
--border-color: #E2E8F0;
|
||
--border-hover: #CBD5E1;
|
||
--border-focus: #4F46E5;
|
||
|
||
--accent-brand: #4F46E5;
|
||
--accent-glow: rgba(79, 70, 229, 0.1);
|
||
|
||
--color-ekeepa: #7C3AED;
|
||
--color-ekeepa-bg: #F5F3FF;
|
||
--color-mindroo: #D97706;
|
||
--color-mindroo-bg: #FFFBEB;
|
||
--color-houshyar: #2563EB;
|
||
--color-houshyar-bg: #EFF6FF;
|
||
|
||
--p-urgent: #DC2626;
|
||
--p-urgent-bg: #FEF2F2;
|
||
--p-medium: #EA580C;
|
||
--p-medium-bg: #FFF7ED;
|
||
--p-normal: #0284C7;
|
||
--p-normal-bg: #F0F9FF;
|
||
|
||
--success: #059669;
|
||
--success-bg: #ECFDF5;
|
||
|
||
--shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
|
||
--shadow-card: 0 4px 12px rgba(15, 23, 42, 0.04);
|
||
--shadow-modal: 0 20px 40px rgba(0,0,0,0.15);
|
||
}
|
||
|
||
* {
|
||
box-sizing: border-box;
|
||
margin: 0;
|
||
padding: 0;
|
||
-webkit-tap-highlight-color: transparent;
|
||
}
|
||
|
||
body {
|
||
font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||
background-color: var(--bg-body);
|
||
color: var(--text-primary);
|
||
line-height: 1.7;
|
||
min-height: 100vh;
|
||
display: flex;
|
||
flex-direction: column;
|
||
transition: background-color 0.2s ease, color 0.2s ease;
|
||
}
|
||
|
||
.tnum {
|
||
font-feature-settings: "tnum" 1;
|
||
font-variant-numeric: tabular-nums;
|
||
}
|
||
|
||
/* Top Command Bar */
|
||
.top-navbar {
|
||
position: sticky;
|
||
top: 0;
|
||
z-index: 50;
|
||
background: rgba(15, 23, 42, 0.85);
|
||
backdrop-filter: blur(16px);
|
||
border-bottom: 1px solid var(--border-color);
|
||
transition: background 0.2s ease;
|
||
}
|
||
[data-theme="light"] .top-navbar {
|
||
background: rgba(255, 255, 255, 0.9);
|
||
}
|
||
|
||
.nav-inner {
|
||
max-width: 1480px;
|
||
margin: 0 auto;
|
||
padding: 10px 20px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: 14px;
|
||
flex-wrap: wrap;
|
||
}
|
||
|
||
.brand-section {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
}
|
||
|
||
.brand-logo {
|
||
width: 36px;
|
||
height: 36px;
|
||
border-radius: 10px;
|
||
background: linear-gradient(135deg, #6366F1, #8B5CF6);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
color: #FFFFFF;
|
||
font-weight: 700;
|
||
font-size: 1.1rem;
|
||
box-shadow: 0 2px 8px var(--accent-glow);
|
||
}
|
||
|
||
.brand-title {
|
||
font-size: 0.98rem;
|
||
font-weight: 700;
|
||
color: var(--text-primary);
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
|
||
.brand-subtitle {
|
||
font-size: 0.72rem;
|
||
color: var(--text-muted);
|
||
}
|
||
|
||
/* Workspace Switcher */
|
||
.deck-switcher {
|
||
display: flex;
|
||
background: var(--bg-surface);
|
||
border: 1px solid var(--border-color);
|
||
border-radius: 10px;
|
||
padding: 3px;
|
||
gap: 3px;
|
||
}
|
||
|
||
.deck-btn {
|
||
border: none;
|
||
background: transparent;
|
||
padding: 6px 14px;
|
||
font-size: 0.82rem;
|
||
font-weight: 600;
|
||
color: var(--text-muted);
|
||
border-radius: 7px;
|
||
cursor: pointer;
|
||
transition: all 0.2s;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
font-family: inherit;
|
||
}
|
||
|
||
.deck-btn.active {
|
||
background: var(--bg-subtle);
|
||
color: var(--text-primary);
|
||
box-shadow: var(--shadow-sm);
|
||
}
|
||
|
||
[data-theme="light"] .deck-btn.active {
|
||
background: #FFFFFF;
|
||
color: var(--text-primary);
|
||
}
|
||
|
||
.btn-control {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 6px 12px;
|
||
border-radius: 8px;
|
||
font-size: 0.82rem;
|
||
font-weight: 600;
|
||
cursor: pointer;
|
||
border: 1px solid var(--border-color);
|
||
background: var(--bg-surface);
|
||
color: var(--text-secondary);
|
||
font-family: inherit;
|
||
transition: all 0.2s;
|
||
}
|
||
|
||
.btn-control:hover {
|
||
background: var(--bg-subtle);
|
||
border-color: var(--border-hover);
|
||
color: var(--text-primary);
|
||
}
|
||
|
||
.btn-control.primary {
|
||
background: var(--accent-brand);
|
||
color: #FFFFFF;
|
||
border-color: transparent;
|
||
}
|
||
.btn-control.primary:hover {
|
||
opacity: 0.9;
|
||
}
|
||
|
||
.btn-control.urgent-pulse {
|
||
background: var(--p-urgent);
|
||
color: #FFFFFF;
|
||
border-color: transparent;
|
||
animation: pulseAlert 2s infinite;
|
||
}
|
||
|
||
@keyframes pulseAlert {
|
||
0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
|
||
70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
|
||
100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
|
||
}
|
||
|
||
/* Omni Search & Filters */
|
||
.filter-ribbon {
|
||
max-width: 1480px;
|
||
margin: 14px auto 0;
|
||
padding: 0 20px;
|
||
width: 100%;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 10px;
|
||
}
|
||
|
||
.omni-search-wrapper {
|
||
position: relative;
|
||
width: 100%;
|
||
}
|
||
|
||
.omni-search-input {
|
||
width: 100%;
|
||
padding: 12px 48px 12px 38px;
|
||
border-radius: 12px;
|
||
border: 1px solid var(--border-color);
|
||
background: var(--bg-card);
|
||
color: var(--text-primary);
|
||
font-family: inherit;
|
||
font-size: 0.92rem;
|
||
box-shadow: var(--shadow-sm);
|
||
transition: all 0.2s;
|
||
}
|
||
|
||
.omni-search-input:focus {
|
||
outline: none;
|
||
border-color: var(--border-focus);
|
||
box-shadow: 0 0 0 3px var(--accent-glow);
|
||
}
|
||
|
||
.search-icon-fixed {
|
||
position: absolute;
|
||
right: 16px;
|
||
top: 50%;
|
||
transform: translateY(-50%);
|
||
color: var(--text-muted);
|
||
pointer-events: none;
|
||
}
|
||
|
||
.search-clear-btn {
|
||
position: absolute;
|
||
left: 14px;
|
||
top: 50%;
|
||
transform: translateY(-50%);
|
||
background: none;
|
||
border: none;
|
||
color: var(--text-muted);
|
||
cursor: pointer;
|
||
font-size: 1rem;
|
||
display: none;
|
||
}
|
||
|
||
/* Eisenhower Matrix Buttons */
|
||
.eisenhower-ribbon {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
overflow-x: auto;
|
||
scrollbar-width: none;
|
||
padding-bottom: 2px;
|
||
}
|
||
|
||
.eisenhower-chip {
|
||
padding: 7px 14px;
|
||
border-radius: 8px;
|
||
font-size: 0.8rem;
|
||
font-weight: 700;
|
||
border: 1px solid var(--border-color);
|
||
background: var(--bg-surface);
|
||
color: var(--text-secondary);
|
||
cursor: pointer;
|
||
white-space: nowrap;
|
||
transition: all 0.2s;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
user-select: none;
|
||
}
|
||
|
||
.eisenhower-chip:hover {
|
||
border-color: var(--border-hover);
|
||
color: var(--text-primary);
|
||
}
|
||
|
||
.eisenhower-chip.active-all {
|
||
background: var(--accent-brand);
|
||
color: #FFFFFF;
|
||
border-color: var(--accent-brand);
|
||
box-shadow: 0 0 12px var(--accent-glow);
|
||
}
|
||
|
||
.eisenhower-chip.active-urgent {
|
||
background: var(--p-urgent);
|
||
color: #FFFFFF;
|
||
border-color: var(--p-urgent);
|
||
box-shadow: 0 0 14px rgba(239, 68, 68, 0.4);
|
||
}
|
||
|
||
.eisenhower-chip.active-important {
|
||
background: #F59E0B;
|
||
color: #FFFFFF;
|
||
border-color: #F59E0B;
|
||
box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
|
||
}
|
||
|
||
.eisenhower-chip.active-delegate {
|
||
background: #3B82F6;
|
||
color: #FFFFFF;
|
||
border-color: #3B82F6;
|
||
box-shadow: 0 0 14px rgba(59, 130, 246, 0.4);
|
||
}
|
||
|
||
/* Main Tabs Navigation */
|
||
.tabs-header {
|
||
max-width: 1480px;
|
||
margin: 14px auto;
|
||
padding: 0 20px;
|
||
display: flex;
|
||
gap: 6px;
|
||
overflow-x: auto;
|
||
scrollbar-width: none;
|
||
width: 100%;
|
||
}
|
||
.tabs-header::-webkit-scrollbar {
|
||
display: none;
|
||
}
|
||
|
||
.tab-item {
|
||
border: 1px solid var(--border-color);
|
||
background: var(--bg-surface);
|
||
padding: 9px 16px;
|
||
border-radius: 10px;
|
||
font-size: 0.86rem;
|
||
font-weight: 600;
|
||
color: var(--text-secondary);
|
||
cursor: pointer;
|
||
white-space: nowrap;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
transition: all 0.2s ease;
|
||
font-family: inherit;
|
||
}
|
||
|
||
.tab-item:hover {
|
||
border-color: var(--border-hover);
|
||
color: var(--text-primary);
|
||
}
|
||
|
||
.tab-item.active {
|
||
background: var(--bg-card);
|
||
color: var(--text-primary);
|
||
border-color: var(--accent-brand);
|
||
box-shadow: 0 0 0 1px var(--accent-brand);
|
||
}
|
||
|
||
/* App Container */
|
||
.app-container {
|
||
max-width: 1480px;
|
||
margin: 0 auto 60px;
|
||
padding: 0 20px;
|
||
width: 100%;
|
||
flex: 1;
|
||
}
|
||
|
||
.tab-view {
|
||
display: none;
|
||
animation: tabFadeIn 0.2s ease-out;
|
||
}
|
||
.tab-view.active {
|
||
display: block;
|
||
}
|
||
|
||
@keyframes tabFadeIn {
|
||
from { opacity: 0; transform: translateY(4px); }
|
||
to { opacity: 1; transform: translateY(0); }
|
||
}
|
||
|
||
/* Grids */
|
||
.col-grid-2 {
|
||
display: grid;
|
||
grid-template-columns: repeat(2, 1fr);
|
||
gap: 18px;
|
||
}
|
||
.col-grid-3 {
|
||
display: grid;
|
||
grid-template-columns: repeat(3, 1fr);
|
||
gap: 18px;
|
||
}
|
||
.col-grid-4 {
|
||
display: grid;
|
||
grid-template-columns: repeat(4, 1fr);
|
||
gap: 14px;
|
||
}
|
||
|
||
@media (max-width: 1024px) {
|
||
.col-grid-2, .col-grid-3, .col-grid-4 {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
}
|
||
|
||
/* Sleek Cards */
|
||
.glass-card {
|
||
background: var(--bg-card);
|
||
border: 1px solid var(--border-color);
|
||
border-radius: var(--radius-md);
|
||
padding: 20px;
|
||
box-shadow: var(--shadow-card);
|
||
transition: all 0.2s ease;
|
||
}
|
||
|
||
.card-header-bar {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
margin-bottom: 16px;
|
||
padding-bottom: 12px;
|
||
border-bottom: 1px solid var(--border-color);
|
||
flex-wrap: wrap;
|
||
gap: 10px;
|
||
}
|
||
|
||
.card-heading {
|
||
font-size: 0.98rem;
|
||
font-weight: 700;
|
||
color: var(--text-primary);
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
|
||
/* Kanban Board Styles (Trello-like) */
|
||
.kanban-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(4, 1fr);
|
||
gap: 14px;
|
||
margin-top: 14px;
|
||
}
|
||
@media (max-width: 1100px) {
|
||
.kanban-grid {
|
||
grid-template-columns: 1fr 1fr;
|
||
}
|
||
}
|
||
@media (max-width: 640px) {
|
||
.kanban-grid {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
}
|
||
|
||
.kanban-col {
|
||
background: var(--bg-surface);
|
||
border: 1px solid var(--border-color);
|
||
border-radius: 12px;
|
||
padding: 12px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
min-height: 480px;
|
||
transition: all 0.2s ease;
|
||
}
|
||
|
||
.kanban-col.drag-over {
|
||
background: rgba(99, 102, 241, 0.08);
|
||
border-color: var(--accent-brand);
|
||
box-shadow: 0 0 14px var(--accent-glow);
|
||
}
|
||
|
||
.kanban-header {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
padding-bottom: 10px;
|
||
margin-bottom: 10px;
|
||
border-bottom: 1px solid var(--border-color);
|
||
font-size: 0.88rem;
|
||
font-weight: 700;
|
||
}
|
||
|
||
.kanban-cards-zone {
|
||
flex: 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 10px;
|
||
overflow-y: auto;
|
||
}
|
||
|
||
/* Task & Record Card */
|
||
.record-card {
|
||
background: var(--bg-card);
|
||
border: 1px solid var(--border-color);
|
||
border-radius: 10px;
|
||
padding: 12px 14px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 8px;
|
||
transition: all 0.2s ease;
|
||
position: relative;
|
||
cursor: grab;
|
||
}
|
||
|
||
.record-card:active {
|
||
cursor: grabbing;
|
||
}
|
||
|
||
.record-card.dragging {
|
||
opacity: 0.4;
|
||
transform: scale(0.96);
|
||
border-style: dashed;
|
||
border-color: var(--accent-brand);
|
||
}
|
||
|
||
.record-card:hover {
|
||
border-color: var(--border-hover);
|
||
box-shadow: var(--shadow-sm);
|
||
}
|
||
|
||
.record-card.changed-by-hamed {
|
||
border-right: 3px solid #F59E0B;
|
||
background: linear-gradient(90deg, rgba(245, 158, 11, 0.05), transparent);
|
||
}
|
||
|
||
.badge-hamed-audit {
|
||
background: rgba(245, 158, 11, 0.18);
|
||
color: #F59E0B;
|
||
font-size: 0.72rem;
|
||
font-weight: 700;
|
||
padding: 2px 6px;
|
||
border-radius: 4px;
|
||
border: 1px solid rgba(245, 158, 11, 0.3);
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
}
|
||
|
||
/* Notion-like Inline Editable Fields */
|
||
.editable-inline {
|
||
outline: none;
|
||
padding: 2px 4px;
|
||
border-radius: 4px;
|
||
transition: background 0.2s;
|
||
cursor: text;
|
||
}
|
||
|
||
.editable-inline:hover {
|
||
background: rgba(255, 255, 255, 0.05);
|
||
}
|
||
|
||
.editable-inline:focus {
|
||
background: var(--bg-subtle);
|
||
box-shadow: 0 0 0 2px var(--accent-brand);
|
||
}
|
||
|
||
.record-title {
|
||
font-size: 0.92rem;
|
||
font-weight: 700;
|
||
color: var(--text-primary);
|
||
line-height: 1.5;
|
||
}
|
||
|
||
.record-meta {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
flex-wrap: wrap;
|
||
font-size: 0.78rem;
|
||
color: var(--text-muted);
|
||
}
|
||
|
||
.record-notes {
|
||
font-size: 0.82rem;
|
||
color: var(--text-secondary);
|
||
line-height: 1.6;
|
||
}
|
||
|
||
.record-footer {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
margin-top: 4px;
|
||
padding-top: 6px;
|
||
border-top: 1px solid rgba(255,255,255,0.04);
|
||
}
|
||
|
||
/* Pill Badges */
|
||
.pill-badge {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
padding: 2px 8px;
|
||
border-radius: 6px;
|
||
font-size: 0.74rem;
|
||
font-weight: 700;
|
||
}
|
||
|
||
.pill-urgent {
|
||
background: var(--p-urgent-bg);
|
||
color: var(--p-urgent);
|
||
}
|
||
.pill-medium {
|
||
background: var(--p-medium-bg);
|
||
color: var(--p-medium);
|
||
}
|
||
.pill-normal {
|
||
background: var(--p-normal-bg);
|
||
color: var(--p-normal);
|
||
}
|
||
|
||
/* Visual Dynamic Meeting Countdown Card */
|
||
.meeting-countdown-box {
|
||
background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(15, 23, 42, 0.4));
|
||
border: 1px solid rgba(16, 185, 129, 0.3);
|
||
border-radius: 12px;
|
||
padding: 14px 18px;
|
||
margin-bottom: 16px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 8px;
|
||
transition: all 0.3s ease;
|
||
}
|
||
|
||
.timer-progress-track {
|
||
width: 100%;
|
||
height: 8px;
|
||
background: var(--bg-subtle);
|
||
border-radius: var(--radius-full);
|
||
overflow: hidden;
|
||
direction: rtl;
|
||
}
|
||
|
||
.timer-progress-fill {
|
||
height: 100%;
|
||
width: 80%;
|
||
background: #10B981;
|
||
border-radius: var(--radius-full);
|
||
transition: width 1s linear, background-color 1s ease;
|
||
}
|
||
|
||
/* ADHD Fullscreen Focus Curtain */
|
||
.focus-mode-curtain {
|
||
position: fixed;
|
||
inset: 0;
|
||
background: rgba(5, 8, 15, 0.96);
|
||
backdrop-filter: blur(14px);
|
||
z-index: 500;
|
||
display: none;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 24px;
|
||
text-align: center;
|
||
}
|
||
|
||
.focus-task-container {
|
||
max-width: 680px;
|
||
width: 100%;
|
||
background: var(--bg-surface);
|
||
border: 1px solid var(--border-hover);
|
||
border-radius: 24px;
|
||
padding: 40px 32px;
|
||
box-shadow: 0 0 50px rgba(99, 102, 241, 0.25);
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 20px;
|
||
}
|
||
|
||
.focus-timer-clock {
|
||
font-size: 3.5rem;
|
||
font-weight: 700;
|
||
font-family: inherit;
|
||
color: #6366F1;
|
||
letter-spacing: 2px;
|
||
}
|
||
|
||
/* PIN Screen */
|
||
.pin-vault-lock {
|
||
background: var(--bg-card);
|
||
border: 1px dashed var(--border-color);
|
||
border-radius: 20px;
|
||
padding: 50px 24px;
|
||
text-align: center;
|
||
max-width: 460px;
|
||
margin: 40px auto;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: 16px;
|
||
}
|
||
|
||
.pin-code-input {
|
||
width: 180px;
|
||
padding: 12px;
|
||
text-align: center;
|
||
letter-spacing: 8px;
|
||
font-size: 1.4rem;
|
||
font-weight: 700;
|
||
border-radius: 10px;
|
||
border: 1px solid var(--border-color);
|
||
background: var(--bg-surface);
|
||
color: var(--text-primary);
|
||
font-family: inherit;
|
||
}
|
||
|
||
/* Tables */
|
||
.data-table-wrap {
|
||
width: 100%;
|
||
overflow-x: auto;
|
||
border-radius: 10px;
|
||
border: 1px solid var(--border-color);
|
||
}
|
||
|
||
table.data-table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
text-align: right;
|
||
font-size: 0.85rem;
|
||
}
|
||
|
||
table.data-table th {
|
||
background: var(--bg-surface);
|
||
color: var(--text-muted);
|
||
font-weight: 700;
|
||
padding: 10px 14px;
|
||
border-bottom: 1px solid var(--border-color);
|
||
white-space: nowrap;
|
||
}
|
||
|
||
table.data-table td {
|
||
padding: 10px 14px;
|
||
border-bottom: 1px solid var(--border-color);
|
||
vertical-align: middle;
|
||
background: var(--bg-card);
|
||
}
|
||
|
||
/* Modals */
|
||
.modal-shield {
|
||
position: fixed;
|
||
inset: 0;
|
||
background: rgba(0, 0, 0, 0.65);
|
||
backdrop-filter: blur(6px);
|
||
z-index: 200;
|
||
display: none;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 16px;
|
||
}
|
||
|
||
.modal-box {
|
||
background: var(--bg-card);
|
||
border: 1px solid var(--border-color);
|
||
border-radius: 18px;
|
||
max-width: 580px;
|
||
width: 100%;
|
||
max-height: 90vh;
|
||
overflow-y: auto;
|
||
box-shadow: var(--shadow-modal);
|
||
padding: 24px;
|
||
}
|
||
|
||
.form-row {
|
||
margin-bottom: 14px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 6px;
|
||
}
|
||
|
||
.form-lbl {
|
||
font-size: 0.82rem;
|
||
font-weight: 700;
|
||
color: var(--text-secondary);
|
||
}
|
||
|
||
.form-ctrl {
|
||
width: 100%;
|
||
padding: 10px 12px;
|
||
border-radius: 8px;
|
||
border: 1px solid var(--border-color);
|
||
background: var(--bg-surface);
|
||
color: var(--text-primary);
|
||
font-family: inherit;
|
||
font-size: 0.88rem;
|
||
}
|
||
.form-ctrl:focus {
|
||
outline: none;
|
||
border-color: var(--accent-brand);
|
||
}
|
||
|
||
/* Login Screen */
|
||
.login-gate-overlay {
|
||
position: fixed;
|
||
inset: 0;
|
||
background: var(--bg-body);
|
||
z-index: 300;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: 16px;
|
||
}
|
||
|
||
.login-gate-card {
|
||
background: var(--bg-card);
|
||
border: 1px solid var(--border-color);
|
||
border-radius: 20px;
|
||
box-shadow: var(--shadow-modal);
|
||
padding: 36px 30px;
|
||
max-width: 400px;
|
||
width: 100%;
|
||
text-align: center;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 18px;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
|
||
<!-- ==================== LOGIN SCREEN ==================== -->
|
||
<div id="login-gate" class="login-gate-overlay">
|
||
<div class="login-gate-card">
|
||
<div style="font-size: 38px;">⚡</div>
|
||
<div>
|
||
<h2 style="font-size: 1.25rem; font-weight: 700; color: var(--text-primary); margin-bottom: 4px;">Executive Cockpit (سیستم مدیریت اجرایی)</h2>
|
||
<p style="font-size: 0.8rem; color: var(--text-muted);">حامد فلاحی و محدثه معصومی</p>
|
||
</div>
|
||
<div class="form-row" style="text-align: right;">
|
||
<label class="form-lbl">نام کاربری:</label>
|
||
<input type="text" id="lg-username" class="form-ctrl" placeholder="mohadese یا hamed" autocomplete="username">
|
||
</div>
|
||
<div class="form-row" style="text-align: right;">
|
||
<label class="form-lbl">رمز عبور:</label>
|
||
<input type="password" id="lg-password" class="form-ctrl" placeholder="رمز عبور" autocomplete="current-password" onkeyup="if(event.key==='Enter') executeLogin()">
|
||
</div>
|
||
<div id="lg-error" style="color: var(--p-urgent); font-size: 0.8rem; display: none;">نام کاربری یا رمز عبور اشتباه است.</div>
|
||
<button type="button" class="btn-control primary" style="padding: 11px; justify-content: center; font-size: 0.95rem;" onclick="executeLogin()">ورود امن به داشبورد</button>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ==================== ADHD FOCUS CURTAIN ==================== -->
|
||
<div id="focus-curtain" class="focus-mode-curtain">
|
||
<div class="focus-task-container">
|
||
<div style="display: flex; justify-content: space-between; align-items: center;">
|
||
<span class="pill-badge pill-urgent">🎯 حالت فوقتمرکز حامد (Deep Focus Mode)</span>
|
||
<button type="button" class="btn-control" onclick="exitFocusMode()">✕ خروج از حالت تمرکز</button>
|
||
</div>
|
||
|
||
<div class="focus-timer-clock tnum" id="focus-clock-display">۲۵:۰۰</div>
|
||
<p style="font-size: 0.85rem; color: var(--text-muted);">پومودورو تمرکز شناختی - تمام عوامل حواسپرتی پنهان شدهاند.</p>
|
||
|
||
<div style="background: var(--bg-card); padding: 24px; border-radius: 16px; border: 1px solid var(--border-color); text-align: right;">
|
||
<span style="font-size: 0.78rem; color: var(--p-urgent); font-weight: 700; display: block; margin-bottom: 6px;">تکتسک حیاتی و فوری امروز:</span>
|
||
<h2 style="font-size: 1.25rem; font-weight: 700; color: var(--text-primary); margin-bottom: 10px;" id="focus-task-title">تسک در حال بارگذاری...</h2>
|
||
<div style="font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6;" id="focus-task-details">توضیحات تکمیلی...</div>
|
||
</div>
|
||
|
||
<div style="display: flex; gap: 10px; justify-content: center;">
|
||
<button type="button" class="btn-control primary" style="padding: 12px 24px; font-size: 0.95rem;" onclick="completeFocusTask()">
|
||
✅ انجام شد (ثبت در لاگ نظارتی محدثه)
|
||
</button>
|
||
<button type="button" class="btn-control" style="padding: 12px 18px;" onclick="loadNextFocusTask()">
|
||
⏭️ تسک بعدی
|
||
</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ==================== NO-SHOW VERIFICATION MODAL ==================== -->
|
||
<div id="modal-no-show" class="modal-shield">
|
||
<div class="modal-box" style="text-align: center; border-color: #EF4444;">
|
||
<div style="font-size: 40px; margin-bottom: 10px;">⏰</div>
|
||
<h3 style="font-weight: 700; font-size: 1.15rem; margin-bottom: 6px; color: var(--p-urgent);">استعلام تشکیل جلسه (No-Show Check)</h3>
|
||
<p style="font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px;" id="no-show-meet-info">
|
||
جلسه ۱۰ دقیقه پیش زمانش فرا رسیده بود. آیا جلسه با موفقیت تشکیل شد؟
|
||
</p>
|
||
<div style="display: flex; gap: 8px; justify-content: center;">
|
||
<button type="button" class="btn-control primary" onclick="resolveNoShow(true)">
|
||
✅ بله، تشکیل شد
|
||
</button>
|
||
<button type="button" class="btn-control urgent-pulse" onclick="resolveNoShow(false)">
|
||
🚨 خیر، تشکیل نشد (ارسال هشدار به لاگ نظارتی)
|
||
</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ==================== TOP NAVIGATION BAR ==================== -->
|
||
<header class="top-navbar">
|
||
<div class="nav-inner">
|
||
<div class="brand-section">
|
||
<div class="brand-logo">⚡</div>
|
||
<div class="brand-text">
|
||
<div class="brand-title">
|
||
<span>EXECUTIVE COCKPIT</span>
|
||
<span style="font-size: 0.7rem; color: var(--success); background: var(--success-bg); padding: 1px 6px; border-radius: 10px;">LIVE APP</span>
|
||
</div>
|
||
<div class="brand-subtitle" id="live-dual-date">در حال بارگذاری...</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Workspace Deck Switcher -->
|
||
<div class="deck-switcher">
|
||
<button type="button" class="deck-btn active" id="deck-btn-mohadese" onclick="switchDeck('mohadese')">
|
||
<span>👩💼</span> رادار اجرایی محدثه (دید کامل)
|
||
</button>
|
||
<button type="button" class="deck-btn" id="deck-btn-hamed" onclick="switchDeck('hamed')">
|
||
<span>👨💼</span> میز مدیریت حامد (فیلتر تگها)
|
||
</button>
|
||
</div>
|
||
|
||
<!-- Controls -->
|
||
<div style="display: flex; align-items: center; gap: 8px;">
|
||
<button type="button" class="btn-control" style="background: rgba(99, 102, 241, 0.15); color: #818CF8;" onclick="launchFocusMode()" title="حالت تکتسک و بدون حواسپرتی حامد">
|
||
<span>🎯</span> حالت تمرکز حامد
|
||
</button>
|
||
<button type="button" class="btn-control" onclick="toggleTheme()" title="سوییچ تم">
|
||
<span>🌓</span> <span id="theme-text">دارک</span>
|
||
</button>
|
||
<button type="button" class="btn-control" onclick="generateTelegramDigest()" title="تولید خلاصه روزانه در کلیپبورد برای تلگرام حامد">
|
||
<span>📋</span> خروجی به حامد
|
||
</button>
|
||
<div class="btn-control" style="font-weight: 700;" id="nav-user-label">
|
||
<span id="nav-user-avatar">👩💼</span> <span id="nav-user-name">محدثه معصومی</span>
|
||
</div>
|
||
<button type="button" class="btn-control" onclick="executeLogout()" title="خروج">🚪</button>
|
||
</div>
|
||
</div>
|
||
</header>
|
||
|
||
<!-- ==================== SEARCH & EISENHOWER MATRIX ==================== -->
|
||
<div class="filter-ribbon">
|
||
<div class="omni-search-wrapper">
|
||
<span class="search-icon-fixed">🔍</span>
|
||
<input type="text" id="omni-search" class="omni-search-input" placeholder="جستجوی بلادرنگ در تسکها، پیامهای تلگرام، مبالغ، شعب و اشخاص..." oninput="handleUniversalSearch(this.value)">
|
||
<button type="button" id="omni-clear" class="search-clear-btn" onclick="clearUniversalSearch()">✕</button>
|
||
</div>
|
||
|
||
<!-- Eisenhower Matrix Real Filter -->
|
||
<div class="eisenhower-ribbon">
|
||
<span style="font-size: 0.78rem; font-weight: 700; color: var(--text-muted); margin-left: 6px;">ماتریس آیزنهاور (فیلتر واقعی):</span>
|
||
<button type="button" class="eisenhower-chip active-all" id="em-all" onclick="applyEisenhowerFilter('all')">
|
||
<span>همه تسکها</span>
|
||
<span class="pill-badge tnum" style="background: rgba(255,255,255,0.15); color: #FFFFFF;" id="em-badge-all">۹</span>
|
||
</button>
|
||
<button type="button" class="eisenhower-chip" id="em-urgent" onclick="applyEisenhowerFilter('urgent')">
|
||
<span>🚨 فوری و مهم (Do First)</span>
|
||
<span class="pill-badge pill-urgent tnum" id="em-badge-urgent">۷</span>
|
||
</button>
|
||
<button type="button" class="eisenhower-chip" id="em-important" onclick="applyEisenhowerFilter('important')">
|
||
<span>⏳ مهم / غیرفوری (Schedule)</span>
|
||
<span class="pill-badge pill-medium tnum" id="em-badge-important">۴</span>
|
||
</button>
|
||
<button type="button" class="eisenhower-chip" id="em-delegate" onclick="applyEisenhowerFilter('delegate')">
|
||
<span>⚡ فوری / غیرمهم (Delegate)</span>
|
||
<span class="pill-badge pill-normal tnum" id="em-badge-delegate">۵</span>
|
||
</button>
|
||
<button type="button" class="eisenhower-chip" id="em-hamed-only" onclick="applyEisenhowerFilter('hamed_only')">
|
||
<span>⭐ تغییر یافته یا مرتبط با حامد</span>
|
||
<span class="pill-badge tnum" style="background: rgba(245,158,11,0.2); color: #F59E0B;" id="em-badge-hamed">۲</span>
|
||
</button>
|
||
</div>
|
||
|
||
<!-- Real-time Filter Feedback Bar -->
|
||
<div id="filter-active-indicator" style="display: none; background: rgba(99, 102, 241, 0.12); border: 1px solid var(--accent-brand); border-radius: 10px; padding: 10px 16px; margin-top: 4px; justify-content: space-between; align-items: center;">
|
||
<div style="display: flex; align-items: center; gap: 10px; font-size: 0.85rem;">
|
||
<span style="font-size: 1.1rem;">🔍</span>
|
||
<span id="filter-active-label" style="font-weight: 700; color: var(--text-primary);">فیلتر ماتریس فعال است</span>
|
||
</div>
|
||
<button type="button" class="btn-control" style="font-size: 0.75rem; padding: 4px 10px; background: var(--bg-surface);" onclick="applyEisenhowerFilter('all')">
|
||
✕ حذف فیلتر و نمایش همه
|
||
</button>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ==================== MAIN NAVIGATION TABS ==================== -->
|
||
<nav class="tabs-header">
|
||
<button type="button" class="tab-item active" id="tab-nav-radar" onclick="navigateTab('radar')">
|
||
<span>🎯</span> رادار روزانه و تقویم
|
||
</button>
|
||
<button type="button" class="tab-item" id="tab-nav-kanban" onclick="navigateTab('kanban')">
|
||
<span>📌</span> کانبان بورد پروژهها (Drag & Drop)
|
||
</button>
|
||
<button type="button" class="tab-item" id="tab-nav-telegram" onclick="navigateTab('telegram')">
|
||
<span>💬</span> تریاژ زنده تلگرام
|
||
</button>
|
||
<button type="button" class="tab-item" id="tab-nav-mindroo" onclick="navigateTab('mindroo')">
|
||
<span>🟡</span> مایندرو و بازی ۴ نیایش
|
||
</button>
|
||
<button type="button" class="tab-item" id="tab-nav-finance" onclick="navigateTab('finance')">
|
||
<span>🔒</span> کارتابل مالی و حسابداری
|
||
</button>
|
||
<button type="button" class="tab-item" id="tab-nav-audit" onclick="navigateTab('audit')">
|
||
<span>📜</span> لاگ نظارتی محدثه (Audit)
|
||
</button>
|
||
</nav>
|
||
|
||
<!-- ==================== MAIN CONTENT VIEWPORT ==================== -->
|
||
<main class="app-container">
|
||
|
||
<!-- ==================== VIEW 1: RADAR & DYNAMIC TIMERS ==================== -->
|
||
<section id="view-radar" class="tab-view active">
|
||
<!-- Dynamic Meeting Countdown Timer Box -->
|
||
<div id="meeting-countdown-card" class="meeting-countdown-box">
|
||
<div style="display: flex; justify-content: space-between; align-items: center;">
|
||
<span style="font-weight: 700; font-size: 0.95rem; color: var(--text-primary);" id="mc-title">جلسه پیشرو: جلسه هماهنگی با مهندس فراهانی</span>
|
||
<span class="tnum" style="font-weight: 700; font-size: 1.1rem; color: #10B981;" id="mc-clock-remaining">در حال محاسبه زمان...</span>
|
||
</div>
|
||
<div class="timer-progress-track">
|
||
<div id="mc-progress-bar" class="timer-progress-fill"></div>
|
||
</div>
|
||
<div style="display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--text-muted);">
|
||
<span>محل: دفتر نیایش مال | حاضرین: حامد فلاحی، محدثه معصومی</span>
|
||
<button type="button" class="btn-control" style="font-size: 0.72rem; padding: 2px 8px;" onclick="triggerTestNoShow()">تست آلارم No-Show</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-grid-2">
|
||
<!-- Smart Calendar -->
|
||
<div class="glass-card">
|
||
<div class="card-header-bar">
|
||
<div class="card-heading">📅 تقویم و رویدادهای حامد فلاحی</div>
|
||
<button type="button" class="btn-control primary" style="font-size: 0.78rem;" onclick="openMeetingModal()">➕ ثبت جلسه جدید</button>
|
||
</div>
|
||
<div id="radar-meetings-list"></div>
|
||
</div>
|
||
|
||
<!-- Call Logs & Follow-ups -->
|
||
<div class="glass-card">
|
||
<div class="card-header-bar">
|
||
<div class="card-heading">📞 پیگیریها و لاگ تماسهای نیابتی (محدثه)</div>
|
||
<button type="button" class="btn-control primary" style="font-size: 0.78rem;" onclick="openCallModal()">➕ ثبت تماس</button>
|
||
</div>
|
||
<div id="radar-calls-list"></div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- ==================== VIEW 2: KANBAN BOARD (DRAG & DROP) ==================== -->
|
||
<section id="view-kanban" class="tab-view">
|
||
<div class="glass-card">
|
||
<div class="card-header-bar">
|
||
<div>
|
||
<h3 class="card-heading">📌 کانبان بورد عملیاتی (Trello-like Drag & Drop)</h3>
|
||
<p style="font-size: 0.8rem; color: var(--text-muted); margin-top: 2px;">
|
||
کارتها را بکشید و در ستون مربوطه رها کنید تا وضعیت تسک بلادرنگ آپدیت و در دیتابیس ذخیره شود.
|
||
</p>
|
||
</div>
|
||
<div style="display: flex; gap: 6px;">
|
||
<select id="kanban-project-filter" class="form-ctrl" style="width: auto; padding: 6px 12px; font-size: 0.82rem;" onchange="renderKanban()">
|
||
<option value="all">همه پروژهها</option>
|
||
<option value="mindroo">بازی چهارم نیایش مال</option>
|
||
<option value="ekeepa">اکیپا (Ekeepa)</option>
|
||
<option value="houshyar">هوشیار ۲۴</option>
|
||
</select>
|
||
<button type="button" class="btn-control primary" onclick="openTaskModal('mindroo')">➕ تسک جدید</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="kanban-grid">
|
||
<!-- Column 1: Backlog / To Do -->
|
||
<div class="kanban-col" ondragover="handleDragOver(event)" ondragleave="handleDragLeave(event)" ondrop="handleDrop(event, 'در حال انتظار')">
|
||
<div class="kanban-header">
|
||
<span>📋 در انتظار (To Do)</span>
|
||
<span class="pill-badge pill-normal tnum" id="kcol-count-todo">۰</span>
|
||
</div>
|
||
<div class="kanban-cards-zone" id="kcol-cards-todo"></div>
|
||
</div>
|
||
|
||
<!-- Column 2: In Progress -->
|
||
<div class="kanban-col" ondragover="handleDragOver(event)" ondragleave="handleDragLeave(event)" ondrop="handleDrop(event, 'در حال انجام محدثه')">
|
||
<div class="kanban-header">
|
||
<span>⚡ در حال انجام (In Progress)</span>
|
||
<span class="pill-badge pill-medium tnum" id="kcol-count-prog">۰</span>
|
||
</div>
|
||
<div class="kanban-cards-zone" id="kcol-cards-prog"></div>
|
||
</div>
|
||
|
||
<!-- Column 3: Blocked / Decision -->
|
||
<div class="kanban-col" ondragover="handleDragOver(event)" ondragleave="handleDragLeave(event)" ondrop="handleDrop(event, 'نیاز به تصمیم حامد')">
|
||
<div class="kanban-header">
|
||
<span>🚨 نیازمند تصمیم حامد / بلاک</span>
|
||
<span class="pill-badge pill-urgent tnum" id="kcol-count-block">۰</span>
|
||
</div>
|
||
<div class="kanban-cards-zone" id="kcol-cards-block"></div>
|
||
</div>
|
||
|
||
<!-- Column 4: Done -->
|
||
<div class="kanban-col" ondragover="handleDragOver(event)" ondragleave="handleDragLeave(event)" ondrop="handleDrop(event, 'انجام شد')">
|
||
<div class="kanban-header">
|
||
<span>✅ انجام شد (Done)</span>
|
||
<span class="pill-badge tnum" style="background: var(--success-bg); color: var(--success);" id="kcol-count-done">۰</span>
|
||
</div>
|
||
<div class="kanban-cards-zone" id="kcol-cards-done"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- ==================== VIEW 3: TELEGRAM LIVE TRIAGE ==================== -->
|
||
<section id="view-telegram" class="tab-view">
|
||
<div class="glass-card">
|
||
<div class="card-header-bar">
|
||
<div>
|
||
<h3 class="card-heading">💬 تریاژ بلادرنگ پیامهای تلگرام (@assistant_hf_bot)</h3>
|
||
<p style="font-size: 0.8rem; color: var(--text-muted); margin-top: 2px;">
|
||
پیامهای ارسال شده به بات تلگرامی حامد فلاحی به صورت زنده وارد این صفها میشوند.
|
||
</p>
|
||
</div>
|
||
<div style="display: flex; gap: 6px;">
|
||
<button type="button" class="btn-control" onclick="forceSyncTelegramUpdates()">🔄 رفرش زنده پیامها</button>
|
||
<button type="button" class="btn-control primary" onclick="openNewTriageModal()">➕ ثبت دستی پیام</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-grid-3">
|
||
<div class="glass-card" style="border-top: 3px solid #10B981;">
|
||
<div style="display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 8px;">
|
||
<span>⚡ پاسخ فوری نیابتی (Quick ACK)</span>
|
||
<span class="pill-badge" style="background: var(--success-bg); color: var(--success);" id="triage-q1-count">۰</span>
|
||
</div>
|
||
<div id="triage-q1-items" style="display: flex; flex-direction: column; gap: 8px;"></div>
|
||
</div>
|
||
|
||
<div class="glass-card" style="border-top: 3px solid #F59E0B;">
|
||
<div style="display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 8px;">
|
||
<span>⏳ پاسخ در زمان خلوتی (Holding)</span>
|
||
<span class="pill-badge pill-medium" id="triage-q2-count">۰</span>
|
||
</div>
|
||
<div id="triage-q2-items" style="display: flex; flex-direction: column; gap: 8px;"></div>
|
||
</div>
|
||
|
||
<div class="glass-card" style="border-top: 3px solid #EF4444;">
|
||
<div style="display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 8px;">
|
||
<span>🚨 ارجاع به حامد (Escalate)</span>
|
||
<span class="pill-badge pill-urgent" id="triage-q3-count">۰</span>
|
||
</div>
|
||
<div id="triage-q3-items" style="display: flex; flex-direction: column; gap: 8px;"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- ==================== VIEW 4: MINDROO & GAME 4 ==================== -->
|
||
<section id="view-mindroo" class="tab-view">
|
||
<div class="glass-card" style="margin-bottom: 20px; border-top: 3px solid #F59E0B;">
|
||
<div class="card-header-bar">
|
||
<div>
|
||
<h3 class="card-heading">🔨 پروژه ساخت و راهاندازی «بازی چهارم نیایش مال»</h3>
|
||
<p style="font-size: 0.8rem; color: var(--text-muted);">
|
||
روی متن هر عنوان یا مسئول کلیک کنید تا مثل Notion به صورت مستقیم (Inline) ویرایش شود.
|
||
</p>
|
||
</div>
|
||
<button type="button" class="btn-control primary" onclick="openTaskModal('mindroo')">➕ تسک جدید ساخت</button>
|
||
</div>
|
||
<div id="mindroo-game4-list"></div>
|
||
</div>
|
||
|
||
<!-- 7 Active Escape Rooms -->
|
||
<div class="col-grid-2">
|
||
<div class="glass-card">
|
||
<div class="card-header-bar">
|
||
<div class="card-heading">📚 شعبه باغ کتاب (۴ بازی فعال)</div>
|
||
<span class="pill-badge" style="background: var(--success-bg); color: var(--success);">فعال</span>
|
||
</div>
|
||
<ul style="list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 0.88rem;">
|
||
<li style="display: flex; justify-content: space-between; padding: 8px 12px; background: var(--bg-surface); border-radius: 8px;">
|
||
<span>۱. اتاق فرار محفل</span><span class="tnum" style="color: var(--text-muted);">فعال</span>
|
||
</li>
|
||
<li style="display: flex; justify-content: space-between; padding: 8px 12px; background: var(--bg-surface); border-radius: 8px;">
|
||
<span>۲. اتاق فرار منشور کوروش</span><span class="tnum" style="color: var(--text-muted);">فعال</span>
|
||
</li>
|
||
<li style="display: flex; justify-content: space-between; padding: 8px 12px; background: var(--bg-surface); border-radius: 8px;">
|
||
<span>۳. اتاق فرار توطئه</span><span class="tnum" style="color: var(--text-muted);">فعال</span>
|
||
</li>
|
||
<li style="display: flex; justify-content: space-between; padding: 8px 12px; background: var(--bg-surface); border-radius: 8px;">
|
||
<span>۴. اتاق فرار معبد سلیمان</span><span class="tnum" style="color: var(--text-muted);">فعال</span>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="glass-card">
|
||
<div class="card-header-bar">
|
||
<div class="card-heading">🛍️ شعبه نیایش مال (۳ بازی فعال + ۱ در حال ساخت)</div>
|
||
<span class="pill-badge pill-medium">پیشرفت کل ۶۸٪</span>
|
||
</div>
|
||
<ul style="list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 0.88rem;">
|
||
<li style="display: flex; justify-content: space-between; padding: 8px 12px; background: var(--bg-surface); border-radius: 8px;">
|
||
<span>۱. اتاق فرار فیلادلفیا</span><span class="tnum" style="color: var(--text-muted);">فعال</span>
|
||
</li>
|
||
<li style="display: flex; justify-content: space-between; padding: 8px 12px; background: var(--bg-surface); border-radius: 8px;">
|
||
<span>۲. اتاق فرار کاوش</span><span class="tnum" style="color: var(--text-muted);">فعال</span>
|
||
</li>
|
||
<li style="display: flex; justify-content: space-between; padding: 8px 12px; background: var(--bg-surface); border-radius: 8px;">
|
||
<span>۳. اتاق فرار جوکر</span><span class="tnum" style="color: var(--text-muted);">فعال</span>
|
||
</li>
|
||
<li style="display: flex; justify-content: space-between; padding: 8px 12px; background: rgba(245, 158, 11, 0.1); border: 1px dashed #F59E0B; border-radius: 8px;">
|
||
<span style="font-weight: 700; color: #F59E0B;">۴. بازی چهارم (سلاخی و مراکشی)</span>
|
||
<span class="tnum" style="font-weight: 700; color: #F59E0B;">در حال ساخت</span>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- ==================== VIEW 5: FINANCE & VAULT ==================== -->
|
||
<section id="view-finance" class="tab-view">
|
||
<div id="finance-lock-screen" class="pin-vault-lock">
|
||
<div style="font-size: 36px;">🔒</div>
|
||
<h3 style="font-size: 1.15rem; font-weight: 700;">کارتابل مالی، تنخواه و سهام قفل است</h3>
|
||
<p style="font-size: 0.82rem; color: var(--text-muted);">
|
||
جهت دسترسی به حساب بلوبانک، سهام سرمایهگذاران و محاسبه حقوق، رمز امنیتی دوم (PIN) را وارد کنید.
|
||
</p>
|
||
<div style="display: flex; gap: 8px; align-items: center;">
|
||
<input type="password" id="vault-pin-input" class="pin-code-input" maxlength="4" placeholder="••••" onkeyup="if(event.key==='Enter') unlockFinanceVault()">
|
||
<button type="button" class="btn-control primary" style="padding: 12px 18px;" onclick="unlockFinanceVault()">ورود امن</button>
|
||
</div>
|
||
<div id="vault-pin-error" style="color: var(--p-urgent); font-size: 0.8rem; display: none;">رمز امنیتی نادرست است.</div>
|
||
</div>
|
||
|
||
<div id="finance-unlocked-section" style="display: none;">
|
||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;">
|
||
<div style="display: flex; gap: 6px;">
|
||
<button type="button" class="btn-control primary" id="fsub-nav-bb" onclick="switchFinanceSub('bb')">💳 تنخواه بلوبانک</button>
|
||
<button type="button" class="btn-control" id="fsub-nav-inv" onclick="switchFinanceSub('inv')">🤝 سرمایهگذاران مایندرو</button>
|
||
<button type="button" class="btn-control" id="fsub-nav-sal" onclick="switchFinanceSub('sal')">📊 محاسبه حقوق پرسنل</button>
|
||
</div>
|
||
<button type="button" class="btn-control" style="color: var(--p-urgent);" onclick="relockFinanceVault()">🔒 قفل مجدد</button>
|
||
</div>
|
||
|
||
<!-- BlueBank -->
|
||
<div id="fsub-bb-pane">
|
||
<div class="glass-card">
|
||
<div class="card-header-bar">
|
||
<div class="card-heading">💳 تراکنشهای تنخواه بلوبانک (حامد فلاحی)</div>
|
||
<button type="button" class="btn-control primary" onclick="openTransactionModal()">➕ ثبت تراکنش</button>
|
||
</div>
|
||
<div style="display: flex; gap: 20px; margin-bottom: 16px; flex-wrap: wrap;">
|
||
<div style="background: var(--bg-surface); padding: 12px 20px; border-radius: 10px; border: 1px solid var(--border-color);">
|
||
<span style="font-size: 0.78rem; color: var(--text-muted); display: block;">مانده تنخواه:</span>
|
||
<span class="tnum editable-inline" style="font-size: 1.3rem; font-weight: 700; color: var(--success);" id="bb-balance-val" contenteditable="true" onblur="updateInlineBalance(this)">۰ تومان</span>
|
||
</div>
|
||
<div style="background: var(--bg-surface); padding: 12px 20px; border-radius: 10px; border: 1px solid var(--border-color);">
|
||
<span style="font-size: 0.78rem; color: var(--text-muted); display: block;">مجموع مخارج ماه:</span>
|
||
<span class="tnum" style="font-size: 1.3rem; font-weight: 700; color: var(--p-urgent);" id="bb-spent-val">۰ تومان</span>
|
||
</div>
|
||
</div>
|
||
<div id="bb-transactions-table" class="data-table-wrap"></div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Investors -->
|
||
<div id="fsub-inv-pane" style="display: none;">
|
||
<div class="glass-card">
|
||
<div class="card-header-bar">
|
||
<div class="card-heading">🤝 درصد سهام سرمایهگذاران مایندرو (شیت Mindro Investment)</div>
|
||
<span style="font-size: 0.78rem; color: var(--text-muted);">کلیک روی درصدها برای ادیت مستقیم</span>
|
||
</div>
|
||
<div class="col-grid-4" id="investors-grid-cards"></div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Salaries -->
|
||
<div id="fsub-sal-pane" style="display: none;">
|
||
<div class="glass-card">
|
||
<div class="card-header-bar">
|
||
<div class="card-heading">📊 فرمول محاسبه حقوق پرسنل (ساعت + درصد + پاداش - جریمه + پورسانت + اسنپ)</div>
|
||
<button type="button" class="btn-control primary" onclick="openSalaryCalcModal()">🧮 صدور فیش جدید</button>
|
||
</div>
|
||
<div id="salaries-table-view" class="data-table-wrap" style="max-height: 480px; overflow-y: auto;"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<!-- ==================== VIEW 6: AUDIT TRAIL ==================== -->
|
||
<section id="view-audit" class="tab-view">
|
||
<div class="glass-card">
|
||
<div class="card-header-bar">
|
||
<div>
|
||
<h3 class="card-heading">📜 لاگ نظارتی محدثه (Audit Trail & Action Feed)</h3>
|
||
<p style="font-size: 0.8rem; color: var(--text-muted);">رهگیری بلادرنگ جابجایی تسکها در کانبان، تیک زدنهای حامد و آلارمها</p>
|
||
</div>
|
||
<button type="button" class="btn-control" onclick="clearAuditTrail()">پاکسازی لاگ</button>
|
||
</div>
|
||
<div id="audit-trail-timeline"></div>
|
||
</div>
|
||
</section>
|
||
|
||
</main>
|
||
|
||
<!-- ==================== REUSABLE MODALS ==================== -->
|
||
<div id="modal-task" class="modal-shield">
|
||
<div class="modal-box">
|
||
<h3 style="font-weight: 700; margin-bottom: 16px;" id="m-task-heading">ثبت / ویرایش تسک</h3>
|
||
<input type="hidden" id="mt-id">
|
||
<div class="form-row">
|
||
<label class="form-lbl">عنوان تسک:</label>
|
||
<input type="text" id="mt-title" class="form-ctrl">
|
||
</div>
|
||
<div class="col-grid-2">
|
||
<div class="form-row">
|
||
<label class="form-lbl">مسئول:</label>
|
||
<input type="text" id="mt-assignee" class="form-ctrl">
|
||
</div>
|
||
<div class="form-row">
|
||
<label class="form-lbl">پروژه:</label>
|
||
<select id="mt-pillar" class="form-ctrl">
|
||
<option value="mindroo">مایندرو - بازی ۴ نیایش</option>
|
||
<option value="ekeepa">اکیپا (Ekeepa)</option>
|
||
<option value="houshyar">هوشیار ۲۴</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="col-grid-2">
|
||
<div class="form-row">
|
||
<label class="form-lbl">اولویت:</label>
|
||
<select id="mt-priority" class="form-ctrl">
|
||
<option value="مهم">مهم و فوری (قرمز)</option>
|
||
<option value="متوسط">متوسط (نارنجی)</option>
|
||
<option value="عادی">عادی و جاری (آبی)</option>
|
||
</select>
|
||
</div>
|
||
<div class="form-row">
|
||
<label class="form-lbl">وضعیت:</label>
|
||
<select id="mt-tag" class="form-ctrl">
|
||
<option value="در حال انتظار">در حال انتظار</option>
|
||
<option value="در حال انجام محدثه">در حال انجام محدثه</option>
|
||
<option value="نیاز به تصمیم حامد">نیاز به تصمیم حامد</option>
|
||
<option value="انجام شد">انجام شد</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
<div class="form-row">
|
||
<label class="form-lbl">ددلاین:</label>
|
||
<input type="text" id="mt-deadline" class="form-ctrl">
|
||
</div>
|
||
<div class="form-row">
|
||
<label class="form-lbl">توضیحات تکمیلی:</label>
|
||
<textarea id="mt-notes" class="form-ctrl" rows="3"></textarea>
|
||
</div>
|
||
<div style="display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px;">
|
||
<button type="button" class="btn-control" onclick="closeModal('modal-task')">انصراف</button>
|
||
<button type="button" class="btn-control primary" onclick="saveTaskModal()">ذخیره قطعی تسک</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="modal-meeting" class="modal-shield">
|
||
<div class="modal-box">
|
||
<h3 style="font-weight: 700; margin-bottom: 16px;">ثبت جلسه کاری حامد فلاحی</h3>
|
||
<input type="hidden" id="mm-id">
|
||
<div class="form-row">
|
||
<label class="form-lbl">عنوان جلسه:</label>
|
||
<input type="text" id="mm-title" class="form-ctrl">
|
||
</div>
|
||
<div class="col-grid-2">
|
||
<div class="form-row">
|
||
<label class="form-lbl">تاریخ (شمسی):</label>
|
||
<input type="text" id="mm-date" class="form-ctrl" placeholder="امروز">
|
||
</div>
|
||
<div class="form-row">
|
||
<label class="form-lbl">ساعت جلسه:</label>
|
||
<input type="text" id="mm-time" class="form-ctrl" placeholder="14:30">
|
||
</div>
|
||
</div>
|
||
<div class="form-row">
|
||
<label class="form-lbl">مکان:</label>
|
||
<input type="text" id="mm-loc" class="form-ctrl" placeholder="دفتر نیایش مال">
|
||
</div>
|
||
<div class="form-row">
|
||
<label class="form-lbl">حاضرین:</label>
|
||
<input type="text" id="mm-att" class="form-ctrl" value="حامد فلاحی، محدثه معصومی">
|
||
</div>
|
||
<div style="display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px;">
|
||
<button type="button" class="btn-control" onclick="closeModal('modal-meeting')">انصراف</button>
|
||
<button type="button" class="btn-control primary" onclick="saveMeetingModal()">ذخیره جلسه</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- ==================== JAVASCRIPT MASTER LOGIC ==================== -->
|
||
<script>
|
||
window.INITIAL_DATA = {"system_meta": {"title": "Executive Operations Cockpit", "subtitle": "مرکز فرماندهی عملیات و مدیریت اجرایی مدیرعامل | محدثه معصومی و حامد فلاحی", "version": "2.1.0", "theme_mode": "dark", "last_sync": "2026-09-20T19:30:00Z", "last_telegram_update_id": 82472236}, "auth": {"users": {"mohadese": {"username": "mohadese", "name": "محدثه معصومی", "role": "دستیار ارشد اجرایی مدیرعامل (Chief Executive Assistant)", "avatar": "👩💼", "password": "Mohadese@1404", "workspace": "mohadese"}, "hamed": {"username": "hamed", "name": "حامد فلاحی", "role": "مدیرعامل و همبنیانگذار (CEO & Co-Founder)", "avatar": "👨💼", "password": "Hamed@1404", "workspace": "hamed"}}, "finance_pin": "4311", "telegram_bot": {"token": "8808629942:AAE2enGoLit6DX4jJs4SWQzTrgGs1lt_pa4", "bot_username": "assistant_hf_bot", "bot_name": "Hamed Assistant", "is_active": true, "subscribers": {"mohadese_chat_id": "", "hamed_chat_id": ""}}}, "audit_trail": [{"id": "aud-1789921629405", "timestamp": "2026/09/20 16:27:09", "actor": "محدثه معصومی", "action": "تغییر ستون کانبان به 'در حال انجام محدثه'", "details": "تسک 'اتاق سلاخی: کارهای دکوری و معمایی اختصاصی' جابجا شد.", "changed_by_hamed": false}, {"id": "aud-tg-82472235", "timestamp": "2026/09/20 16:25:36", "actor": "تلگرام: Mohadese", "action": "دریافت پیام زنده در تریاژ", "details": "پیام '/start...' به صف quick_ack منتقل شد.", "changed_by_hamed": false}, {"id": "aud-tg-82472234", "timestamp": "2026/09/20 16:25:36", "actor": "تلگرام: Mohadese", "action": "دریافت پیام زنده در تریاژ", "details": "پیام '/start...' به صف quick_ack منتقل شد.", "changed_by_hamed": false}, {"id": "aud-1", "timestamp": "1404/06/30 - 18:45", "actor": "محدثه معصومی", "action": "راهاندازی ریدیزاین مدرن", "details": "بازطراحی جامع سیستم بر مبنای استانداردهای دستیاران اجرایی کلاس جهانی (Linear/Raycast Vibe)", "changed_by_hamed": false}, {"id": "aud-2", "timestamp": "1404/06/30 - 19:10", "actor": "سیستم", "action": "اتصال بات تلگرام", "details": "بات تلگرام assistant_hf_bot متصل شد و گیت هشدارها آماده فعالیت است.", "changed_by_hamed": false}], "adhd_coping_system": {"checkin_prompts": [{"id": "chk-1", "meeting_title": "جلسه با مدیریت نیایش مال", "scheduled_time": "14:00", "status": "pending_checkin", "prompt_text": "جلسه ساعت ۱۴:۰۰ در نیایش مال تشکیل شد؟", "response": null, "notes": "در صورت عدم تشکیل، وضعیت به استعلام محدثه تغییر مییابد."}], "buffer_settings": {"default_buffer_minutes": 20, "max_daily_focus_hours": 5.5, "warn_back_to_back": true}}, "telegram_triage": {"quick_ack": [{"id": "tg-82472235", "sender": "Mohadese", "message": "/start", "chat_id": 441730159, "timestamp": "2026/09/20 16:25", "draft_reply": "سلام Mohadese عزیز، پیامت دریافت شد و در دست بررسی است.", "source": "telegram_bot"}, {"id": "tg-82472234", "sender": "Mohadese", "message": "/start", "chat_id": 441730159, "timestamp": "2026/09/20 16:25", "draft_reply": "سلام Mohadese عزیز، پیامت دریافت شد و در دست بررسی است.", "source": "telegram_bot"}], "holding_queue": [], "escalate_to_ceo": []}, "calendar_events": [], "calls_log": [], "ekeepa": {"tasks": []}, "houshyar24": {"hamed_board": [], "mohadese_board": []}, "gamification_events": {"projects": []}, "blue_bank": {"account_holder": "حامد فلاحی", "card_number_masked": "۶۲۱۹-۸۶۱۰-****-****", "balance": 0, "monthly_spent": 0, "transactions": []}, "loans": [], "cloud_drive_vault": {"api_integration": {"status": "فضای تعبیهشده جهت دریافت API Key یا Service Account گوگل", "client_id": "", "service_account_email": "", "is_connected": false}, "folders": [{"id": "f-digishahr", "title": "پرونده وام دیجیشهر", "gdrive_url": "https://drive.google.com/drive/folders/1kPIdJWuAPknXAHJPinfolK6Uot5UKr-z", "category": "بانک و تسهیلات", "description": "مدارک هویتی، سفته الکترونیک، گواهی کسر از حقوق و پرینت حساب", "files_count": 0}, {"id": "f-rasalat", "title": "پرونده وام قرضالحسنه رسالت", "gdrive_url": "https://drive.google.com/drive/folders/1kPIdJWuAPknXAHJPinfolK6Uot5UKr-z", "category": "بانک و تسهیلات", "description": "نتیجه رتبهبندی اعتباری مرآت، فرم افتتاح حساب و سفته آیکاپ", "files_count": 0}, {"id": "f-mindroo-sheets", "title": "پوشه شیتهای حسابداری و سرمایهگذاری مایندرو", "gdrive_url": "https://drive.google.com/drive/folders/1kPIdJWuAPknXAHJPinfolK6Uot5UKr-z", "category": "مایندرو", "description": "فایلهای اکسل حقوق پرسنل، هزینههای جاری، مدارس، شیفتها و سرمایهگذاری", "files_count": 7}]}, "mindroo": {"investors": [{"name": "حامد فلاحی", "role": "مدیر و سرمایهگذار اصلی", "share_pct": 64.12, "cash_capital": 1274065000, "credit_capital": 281500000, "total_capital": 1555565000}, {"name": "جواد هوشمند", "role": "همبنیانگذار و مجری فنی/دکور", "share_pct": 18.28, "cash_capital": 0, "credit_capital": 443431000, "total_capital": 443431000}, {"name": "ایمان پورصمد", "role": "همبنیانگذار و طراح معماها", "share_pct": 10.59, "cash_capital": 150000000, "credit_capital": 107000000, "total_capital": 257000000}, {"name": "نگار سعیدی", "role": "سرمایهگذار", "share_pct": 7.01, "cash_capital": 100000000, "credit_capital": 70000000, "total_capital": 170000000}], "monthly_p_and_l": [{"month_num": 1, "month_name": "فروردین", "income": 0.0, "site_commission": 0.0, "rent": 0.0, "utilities": 25.0, "hr_cost": 0.0}, {"month_num": 2, "month_name": "اردیبهشت", "income": 0.0, "site_commission": 0.0, "rent": 0.0, "utilities": 25.0, "hr_cost": 0.0}, {"month_num": 3, "month_name": "خرداد", "income": 103.21, "site_commission": 8.750755928091738, "rent": 36.123, "utilities": 25.0, "hr_cost": 42.0}, {"month_num": 4, "month_name": "تیر", "income": 124.155, "site_commission": 10.5265972507725, "rent": 125.0, "utilities": 25.0, "hr_cost": 46.0}, {"month_num": 5, "month_name": "مرداد", "income": 153.595, "site_commission": 13.022695056440757, "rent": 125.0, "utilities": 25.0, "hr_cost": 58.5}, {"month_num": 6, "month_name": "شهریور", "income": 284.02, "site_commission": 24.08090009395035, "rent": 125.0, "utilities": 25.0, "hr_cost": 38.7}, {"month_num": 7, "month_name": "مهر", "income": 179.53, "site_commission": 15.221618174307816, "rent": 125.0, "utilities": 25.0, "hr_cost": 42.3}, {"month_num": 8, "month_name": "آبان", "income": 206.72, "site_commission": 17.526947635453194, "rent": 125.0, "utilities": 25.0, "hr_cost": 38.0}, {"month_num": 9, "month_name": "آذر", "income": 194.915, "site_commission": 16.526049721189818, "rent": 125.0, "utilities": 25.0, "hr_cost": 27.89}, {"month_num": 10, "month_name": "دی", "income": 208.39, "site_commission": 17.66854014005462, "rent": 125.0, "utilities": 25.0, "hr_cost": 69.0}, {"month_num": 11, "month_name": "بهمن", "income": 343.396, "site_commission": 29.115149527012797, "rent": 125.0, "utilities": 25.0, "hr_cost": 73.275}, {"month_num": 12, "month_name": "اسفند", "income": 257.41, "site_commission": 21.824746472726428, "rent": 125.0, "utilities": 25.0, "hr_cost": 87.0}], "game4_launch": {"title": "پروژه راهاندازی بازی چهارم نیایش مال", "overall_progress": 68, "target_completion": "پایان مهر ۱۴۰۴", "status": "فاز فعال دکور و نورپردازی", "tasks": [{"id": "g4-1", "title": "اتاق سلاخی: کارهای دکوری و معمایی اختصاصی", "responsible": "ایمان", "priority": "مهم", "status": "در حال انجام محدثه", "tag": "در حال انجام محدثه", "deadline": "آخر این هفته", "details": "ایمان با هماهنگی تیم مشغول تکمیل دکور و نصب معماهای خاص این اتاق است."}, {"id": "g4-2", "title": "کهنهکاری و اجرای پترنهای مراکشی در کل بازی", "responsible": "خانم سعادتمنش", "priority": "مهم", "status": "در حال انتظار", "tag": "در حال انتظار", "deadline": "هفته آینده (۲ الی ۳ روز کار)", "details": "اجرای نقاشیهای دیواری، افکت خون و کهنهکاری متریالها."}, {"id": "g4-3", "title": "تمیزکاری و نظافت کارگاهی محیط بازی", "responsible": "امید و تیم اجرایی", "priority": "متوسط", "status": "در حال انجام", "tag": "در حال انجام محدثه", "deadline": "تا آخر این هفته", "details": "تخلیه نخالهها و آمادهسازی برای نصب نهایی تجهیزات ظریف."}, {"id": "g4-4", "title": "اجرای لاینهای نوری، ریموت نور، درب باکس و درببازکنهای برقی", "responsible": "آقای اصغر فلاحی", "priority": "مهم", "status": "در حال انجام", "tag": "نیاز به تصمیم حامد", "deadline": "تا آخر این هفته", "details": "ساب لبههای تیز نئوپانها، سیمکشی سیستم الکترونیکی قفلها و تست ریموتها."}, {"id": "g4-5", "title": "خرید و اجرای نجاری: میز کنج، باکس کنار آینه، میز تلفن کشودار، کشو زیر تخت", "responsible": "جواد هوشمند", "priority": "مهم", "status": "در حال انجام", "tag": "در حال انجام محدثه", "deadline": "پایان هفته جاری", "details": "میز تلفن کشودار برای معما فرش، کشوی زیر تخت خواب، آویز و نور مراکشی، ۴ نور طرح شعلهنما."}, {"id": "g4-6", "title": "حسابکتاب ریز و کلی هزینههای بازی چهارم", "responsible": "جواد هوشمند و محدثه", "priority": "مهم", "status": "در حال انجام", "tag": "بازبینی مالی", "deadline": "پایان هفته", "details": "انطباق فاکتورهای متریال و ثبت در شیت هزینههای نیایش مال."}, {"id": "g4-7", "title": "خرید و اجرای معماها: ۴ پوست رنگ مختلف، معما فرش، معما لیوان و قیچی، معما استخوان", "responsible": "ایمان", "priority": "مهم", "status": "در حال انجام", "tag": "در حال انجام محدثه", "deadline": "۱۰ روز آینده", "details": "تست مکانیکی معماها و مگنتهای مخفی."}, {"id": "g4-8", "title": "عایقبندی صوتی: پشم سنگ و پلاستوفومها + نصب دربها و لکهگیری رنگ مشکی/طوسی", "responsible": "امید", "priority": "متوسط", "status": "در حال انجام", "tag": "در حال انجام محدثه", "deadline": "۵ روز آینده", "details": "هوابندی و عایق آکوستیک اتاقها برای جلوگیری از خروج صدای جیغ بازیکنان."}, {"id": "g4-9", "title": "سناریو، گیمپلی، طراحی اکتها، پوستر، موسیقی و کاستوم لباسها", "responsible": "حامد فلاحی و محدثه معصومی", "priority": "مهم", "status": "در حال انجام", "tag": "نیاز به تصمیم حامد", "deadline": "پایان مهرماه", "details": "تدوین موسیقی دلهرهآور، ضبط ویسهای بازی، انتخاب جنس و دوخت لباس کاراکترها و تدوین سناریوی داستانی نهایی."}]}, "branches": {"bagh_ketab": {"name": "شعبه باغ کتاب", "games_count": 4, "games": ["اتاق فرار محفل", "اتاق فرار منشور کوروش", "اتاق فرار توطئه", "اتاق فرار معبد سلیمان"]}, "niayesh_mall": {"name": "شعبه نیایش مال", "games_count": 4, "games": ["اتاق فرار فیلادلفیا", "اتاق فرار کاوش", "اتاق فرار جوکر", "بازی چهارم (در حال ساخت)"]}}, "supervisors": {"fadia_ershadi": {"name": "خانم فدیا ارشادی", "title": "سوپروایزر ارشد هر دو مجموعه (باغ کتاب و نیایش مال)", "scope": "باغ کتاب و نیایش مال (قابل تنظیم)", "total_recorded_months": 15, "avg_monthly_payout": 18500000, "last_month_salary": 28400000, "insurance_status": "بیمه تامین اجتماعی با احتساب بدهیهای تسویه شده", "performance_summary": "راهبری عملیاتی مستمر باغ کتاب و نظارت دورهای بر نیایش مال؛ بالاترین رکورد دریافتی مرداد ۱۴۰۵ معادل ۲۸.۴ میلیون تومان با ۱۰ میلیون تومان پاداش عملکرد.", "records": [{"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "تیر", "person": "فدیا ارشادی", "total_salary": 15000000.0, "hours_pay": 14000000.0, "percent_pay": 0, "bonus": 1000000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "مرداد", "person": "فدیا ارشادی", "total_salary": 19600000.0, "hours_pay": 14400000.0, "percent_pay": 0, "bonus": 4600000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "شهریور", "person": "فدیا ارشادی", "total_salary": 25000000.0, "hours_pay": 12500000.0, "percent_pay": 0, "bonus": 8600000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "مهر", "person": "فدیا ارشادی", "total_salary": 15000000.0, "hours_pay": 11300000.0, "percent_pay": 0, "bonus": 1570000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "آبان", "person": "فدیا ارشادی", "total_salary": 22800000.0, "hours_pay": 11400000.0, "percent_pay": 0, "bonus": 2040000.0, "notes": "6 میلیون بدهی دوماه اول که بیمه رد نشده و 1/100 بابت بیمه این ماه"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "آذر", "person": "فدیا ارشادی", "total_salary": 14100000.0, "hours_pay": 10800000.0, "percent_pay": 0, "bonus": 2700000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "دی", "person": "فدیا ارشادی", "total_salary": 13000000.0, "hours_pay": 11500000.0, "percent_pay": 0, "bonus": 1500000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "بهمن", "person": "فدیا ارشادی", "total_salary": 20000000.0, "hours_pay": 12300000.0, "percent_pay": 0, "bonus": 7700000.0, "notes": "به علاوه بیمه ۱/۱۰۰ (از پاداش ۵ تومنش بابت هدیه تولد و ۲/۷۰۰ پاداش)"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "اسفند", "person": "فدیا ارشادی", "total_salary": 3000000.0, "hours_pay": 3000000.0, "percent_pay": 0, "bonus": 0, "notes": "۴/۰۰۰ بیمه"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1405", "month": "فروردین", "person": "فدیا ارشادی", "total_salary": 8000000.0, "hours_pay": 6840000.0, "percent_pay": 0, "bonus": 1160000.0, "notes": "به علاوه ۱/۱۰۰ بیمه"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1405", "month": "عیدی", "person": "فدیا ارشادی", "total_salary": 13000000.0, "hours_pay": 0, "percent_pay": 0, "bonus": 13000000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1405", "month": "اردیبهشت", "person": "فدیا ارشادی", "total_salary": 19000000.0, "hours_pay": 16300000.0, "percent_pay": 0, "bonus": 2700000.0, "notes": "به علاوه ۱/۱۰۰ بیمه"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1405", "month": "خرداد", "person": "فدیا ارشادی", "total_salary": 20800000.0, "hours_pay": 20800000.0, "percent_pay": 0, "bonus": 0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1405", "month": "تیر", "person": "فدیا ارشادی", "total_salary": 19600000.0, "hours_pay": 18200000.0, "percent_pay": 0, "bonus": 1400000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1405", "month": "مرداد", "person": "فدیا ارشادی", "total_salary": 28400000.0, "hours_pay": 18400000.0, "percent_pay": 0, "bonus": 10000000.0, "notes": "به علاوه 1/600 بابت بیمه "}, {"branch": "نیایش مال", "year_sheet": "نیایش مال 1405", "month": "خرداد", "person": "فدیا ارشادی", "total_salary": 13200000.0, "hours_pay": 10000000.0, "percent_pay": 0, "bonus": 3200000.0, "notes": ""}, {"branch": "نیایش مال", "year_sheet": "نیایش مال 1405", "month": "تیر", "person": "فدیا ارشادی", "total_salary": 11400000.0, "hours_pay": 10000000.0, "percent_pay": 0, "bonus": 1400000.0, "notes": ""}, {"branch": "نیایش مال", "year_sheet": "نیایش مال 1405", "month": "مرداد", "person": "فدیا ارشادی", "total_salary": 17000000.0, "hours_pay": 10000000.0, "percent_pay": 0, "bonus": 7000000.0, "notes": ""}]}, "sina_salamat": {"name": "آقای سینا سلامت", "title": "سوپروایزر ارشد و مدیر ارجاعات مدارس (باغ کتاب و نیایش مال)", "scope": "باغ کتاب و نیایش مال (قابل تنظیم)", "total_school_deals": 12, "total_students_referred": 614, "estimated_school_gmv": 141200000, "commission_status": "محاسبه بر مبنای قراردادهای قطعی مدارس و سانسهای گروهی", "performance_summary": "مسئول مستقیم هماهنگی و عقد قرارداد با مدارس برتر تهران (علامه حلی، موعود، گلبانگ، ایوب آزاد، سلام فرشتگان). ضریب جذب موفق بسیار بالا در فصول پاییز و بهار.", "records": [{"date": "1404/05/13", "school_name": "دبیرستان موعود", "students_count": 40.0, "price_per_person": 190.0, "commission_center": "", "commission_referrer": "", "total_income": "7/600", "referrer": "آقای سلامت"}, {"date": "1404/06/12", "school_name": "دبیرستان علامه حلی 8", "students_count": 62.0, "price_per_person": 170.0, "commission_center": "", "commission_referrer": "", "total_income": "10/540", "referrer": "آقای سلامت"}, {"date": "1404/07/10", "school_name": "مدرسه گلبانگ (خانم مرتضوی)", "students_count": 36.0, "price_per_person": 250.0, "commission_center": "", "commission_referrer": "", "total_income": "9/000", "referrer": "آقای سلامت"}, {"date": "1404/07/29", "school_name": "مدرسه ایوب آزاد", "students_count": 40.0, "price_per_person": 210.0, "commission_center": "", "commission_referrer": "", "total_income": "8/400", "referrer": "آقای سلامت"}, {"date": "1404/08/06", "school_name": "مدرسه ایوب آزاد", "students_count": 42.0, "price_per_person": 210.0, "commission_center": "", "commission_referrer": "", "total_income": "8/960", "referrer": "آقای سلامت"}, {"date": "1404/08/19", "school_name": "مدرسه سلام فرشتگان یاسی", "students_count": 91.0, "price_per_person": 220.0, "commission_center": "", "commission_referrer": "", "total_income": "20/000", "referrer": "آقای سلامت"}, {"date": "1404/08/20", "school_name": "مدرسه", "students_count": 55.0, "price_per_person": 270.0, "commission_center": "", "commission_referrer": "", "total_income": "14/580", "referrer": "آقای سلامت"}, {"date": "1404/08/27", "school_name": "مدرسه فردوس دختران", "students_count": 61.0, "price_per_person": 220.0, "commission_center": "", "commission_referrer": "", "total_income": "13/420", "referrer": "آقای سلامت"}, {"date": "1404/08/29", "school_name": "مدرسه راه شایستگان", "students_count": 70.0, "price_per_person": 235.0, "commission_center": "", "commission_referrer": "", "total_income": "16/000", "referrer": "آقای سلامت"}, {"date": "1404/09/26", "school_name": "دبستان آگاه (آقای روشن)", "students_count": 40.0, "price_per_person": 240.0, "commission_center": "", "commission_referrer": "1440.0", "total_income": "9/600", "referrer": "آقای سلامت"}, {"date": "1404/11/27", "school_name": "مدرسه آیین روشن", "students_count": 55.0, "price_per_person": 230.0, "commission_center": "", "commission_referrer": "", "total_income": "12/650", "referrer": "آقای سلامت"}, {"date": "1405/05/31", "school_name": "مدرسه دخترانه بانو امین", "students_count": 33.0, "price_per_person": 350.0, "commission_center": "", "commission_referrer": "3/300", "total_income": "8/250", "referrer": "حسین و آقای سلامت"}]}}, "salaries_sample": [{"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "تیر", "person": "محمد محمدی", "total_salary": 9300000.0, "hours_pay": 0, "percent_pay": 0, "bonus": 0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "تیر", "person": "عرفان اصغردخت", "total_salary": 10100000.0, "hours_pay": 0, "percent_pay": 0, "bonus": 0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "تیر", "person": "حمیدرضا حمیدآبادی", "total_salary": 4000000.0, "hours_pay": 0, "percent_pay": 0, "bonus": 0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "تیر", "person": "فدیا ارشادی", "total_salary": 15000000.0, "hours_pay": 14000000.0, "percent_pay": 0, "bonus": 1000000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "مرداد", "person": "محمد محمدی", "total_salary": 16750000.0, "hours_pay": 3870000.0, "percent_pay": 10940000.0, "bonus": 2690000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "مرداد", "person": "عرفان اصغردخت", "total_salary": 14000000.0, "hours_pay": 3300000.0, "percent_pay": 10120000.0, "bonus": 1030000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "مرداد", "person": "حسین خدابخش", "total_salary": 18250000.0, "hours_pay": 6150000.0, "percent_pay": 10330000.0, "bonus": 2520000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "مرداد", "person": "فدیا ارشادی", "total_salary": 19600000.0, "hours_pay": 14400000.0, "percent_pay": 0, "bonus": 4600000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "شهریور", "person": "عرفان اصغردخت", "total_salary": 5000000.0, "hours_pay": 1900000.0, "percent_pay": 3550000.0, "bonus": 0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "شهریور", "person": "حسین خدابخش", "total_salary": 16000000.0, "hours_pay": 4700000.0, "percent_pay": 11000000.0, "bonus": 800000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "شهریور", "person": "امیررضا قنبری", "total_salary": 16100000.0, "hours_pay": 6950000.0, "percent_pay": 9020000.0, "bonus": 490000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "شهریور", "person": "مهدی محمودی", "total_salary": 0.0, "hours_pay": 0, "percent_pay": 0, "bonus": 0, "notes": "1 میلیون تومان نگه داشته شد و مهر واریز شد"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "شهریور", "person": "فدیا ارشادی", "total_salary": 25000000.0, "hours_pay": 12500000.0, "percent_pay": 0, "bonus": 8600000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "مهر", "person": "حسین خدابخش", "total_salary": 3742000.0, "hours_pay": 3400000.0, "percent_pay": 200000.0, "bonus": 207000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "مهر", "person": "امیررضا قنبری", "total_salary": 10385000.0, "hours_pay": 4820000.0, "percent_pay": 5660000.0, "bonus": 24000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "مهر", "person": "مهدی محمودی", "total_salary": 9430000.0, "hours_pay": 4100000.0, "percent_pay": 4160000.0, "bonus": 205000.0, "notes": "یک میلیون تومان از ماه قبل+"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "مهر", "person": "فدیا ارشادی", "total_salary": 15000000.0, "hours_pay": 11300000.0, "percent_pay": 0, "bonus": 1570000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "آبان", "person": "حسین خدابخش", "total_salary": 4800000.0, "hours_pay": 5120000.0, "percent_pay": 0, "bonus": 480000.0, "notes": "1/800 پیش مجموعه نگه داشته میشود"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "آبان", "person": "امیررضا قنبری", "total_salary": 14650000.0, "hours_pay": 4665000.0, "percent_pay": 8870000.0, "bonus": 605000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "آبان", "person": "مهدی محمودی", "total_salary": 13890000.0, "hours_pay": 4185000.0, "percent_pay": 8670000.0, "bonus": 515000.0, "notes": "3 میلیون تومان پیش مجموعه نگه داشته میشه"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "آبان", "person": "محمد محمدی", "total_salary": 600000.0, "hours_pay": 600000.0, "percent_pay": 0, "bonus": 0, "notes": "بابت کمک در روز 23 آبان"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "آبان", "person": "فدیا ارشادی", "total_salary": 22800000.0, "hours_pay": 11400000.0, "percent_pay": 0, "bonus": 2040000.0, "notes": "6 میلیون بدهی دوماه اول که بیمه رد نشده و 1/100 بابت بیمه این ماه"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "آبان", "person": "محمد حسن", "total_salary": 290000.0, "hours_pay": 0, "percent_pay": 290000.0, "bonus": 0, "notes": "کمک مدرسه ۶ آبان"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "آذر", "person": "مهدی محمودی", "total_salary": 4370000.0, "hours_pay": 1900000.0, "percent_pay": 4220000.0, "bonus": 0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "آذر", "person": "حسین خدابخش", "total_salary": 9259000.0, "hours_pay": 8520000.0, "percent_pay": 520000.0, "bonus": 0, "notes": "3/200 میلیون تومان پیش مجموعه نگه داشته میشه"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "آذر", "person": "امیررضا قنبری", "total_salary": 4300000.0, "hours_pay": 4300000.0, "percent_pay": 0, "bonus": 0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "آذر", "person": "محمد محمدی", "total_salary": 2175000.0, "hours_pay": 2175000.0, "percent_pay": 0, "bonus": 0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "آذر", "person": "امیررضا کریمی نژاد", "total_salary": 5330000.0, "hours_pay": 5330000.0, "percent_pay": 0, "bonus": 0, "notes": "ماه بعد براش واریز میشه"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "آذر", "person": "فدیا ارشادی", "total_salary": 14100000.0, "hours_pay": 10800000.0, "percent_pay": 0, "bonus": 2700000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "دی", "person": "حسین خدابخش", "total_salary": 5000000.0, "hours_pay": 5000000.0, "percent_pay": 0, "bonus": 0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "دی", "person": "امیررضا قنبری", "total_salary": 4000000.0, "hours_pay": 4000000.0, "percent_pay": 0, "bonus": 0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "دی", "person": "امیررضا کریمی نژاد", "total_salary": 10700000.0, "hours_pay": 11000000.0, "percent_pay": 0, "bonus": 0, "notes": "به علاوه 3 میلیون از حقوق ماه قبلش"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "دی", "person": "محمد محمدی", "total_salary": 350000.0, "hours_pay": 350000.0, "percent_pay": 0, "bonus": 0, "notes": "بابت کمکش روز ۳ دی ماه"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "دی", "person": "سپهر گودرزی", "total_salary": 4000000.0, "hours_pay": 4000000.0, "percent_pay": 0, "bonus": 0, "notes": "شروع کار از 15 دی(بهمن براش واریز شد)"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "دی", "person": "فدیا ارشادی", "total_salary": 13000000.0, "hours_pay": 11500000.0, "percent_pay": 0, "bonus": 1500000.0, "notes": ""}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "بهمن", "person": "امیررضا کریمی نژاد", "total_salary": 14200000.0, "hours_pay": 14000000.0, "percent_pay": 0, "bonus": 600000.0, "notes": "400 پاداش کمک مدرسه"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "بهمن", "person": "سپهر گودرزی", "total_salary": 8350000.0, "hours_pay": 8500000.0, "percent_pay": 0, "bonus": 0, "notes": "به علاوه 4 میلیون از حقوق ماه قبل(5 میلیون برای ضمانت برداشته شد)"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "بهمن", "person": "میثم محمودی", "total_salary": 5450000.0, "hours_pay": 5300000.0, "percent_pay": 0, "bonus": 150000.0, "notes": "حقوقش دست ما امانت می مونه"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "بهمن", "person": "حسین خدابخش", "total_salary": 5716000.0, "hours_pay": 5000000.0, "percent_pay": 0, "bonus": 500000.0, "notes": "500 هدیه تولد (2 میلیون هم برای ضمانت دست ما می مونه، 5 میلیون سه ماه گذشته ش رو گرفت)"}, {"branch": "باغ کتاب", "year_sheet": "باغ کتاب 1404", "month": "بهمن", "person": "امیررضا قنبری", "total_salary": 2400000.0, "hours_pay": 2400000.0, "percent_pay": 0, "bonus": 0, "notes": "برای کمک مدارس"}], "expenses_sample": [{"branch": "نیایش مال", "type": "expense", "date": "1404/06/05", "title": "آگهی استخدام دیوار", "amount": 419000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/06/06", "title": "بابت رزرو سانس فیلادلفیا از سایت زوم", "amount": 580000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/06/10", "title": "بابت رزرو سانس فیلادلفیا از سایت زوم", "amount": 580000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/06/10", "title": "خرید قفل پترنی 8 رقمی", "amount": 200000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/06/10", "title": "خرید چسب قطره ای", "amount": 145000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/06/10", "title": "پذیرایی از مهمان های اسکیپ زوم", "amount": 300000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/06/11", "title": "هزینه ارسال خوراکی های به مجموعه", "amount": 185000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/06/13", "title": "بابت خرید خوراکی", "amount": 2838000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/06/13", "title": "بابت انجام تعمیرات", "amount": 2045000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/06/16", "title": "بیعانه کلیپ های پرزنت", "amount": 2500000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/06/19", "title": "خریدهای مجموعه مثل ریموت و شماره کمد و چرخ صندلی و ...", "amount": 2955000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/06/22", "title": "خرید عود", "amount": 98000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/06/23", "title": "خرید دستمال مرطوب", "amount": 127000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/06/24", "title": "گپی گرفتن کلید سینما 2 عدد + هزینه ارسال", "amount": 289000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/06/25", "title": "خرید مایحتاج مجموعه", "amount": 620860.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/06/30", "title": "آگهی استخدام دیوار کانتر", "amount": 419000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/07/05", "title": "تعمیرات توسط آقای فلاحی", "amount": 2000000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/07/07", "title": "استفاده از 3 عدد از باتری های باغ", "amount": 330000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/07/08", "title": "چاپ و پرس سناریوهای جوکر", "amount": 240000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/07/09", "title": "تبلیغ ژانر اسکیپ زوم", "amount": 2800000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/07/09", "title": "چاپ فرم استخدام", "amount": 20000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/07/12", "title": "خرید 2 عدد دفترچه قوانین", "amount": 790000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/07/12", "title": "خرید برچسب اموال", "amount": 700000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/07/13", "title": "پرس کردن کاغذ فیلادلفیا", "amount": 15000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/07/13", "title": "خرید باتری برای ماوس بیسیم", "amount": 80000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/07/13", "title": "خرید دستمال مرطوب", "amount": 60000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/07/13", "title": "استفاده از 1 عدد باتری باغ", "amount": 110000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/07/19", "title": "ارسال برچسب اموال", "amount": 40000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/07/22", "title": "ارسال دفترچه قوانین", "amount": 115000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/07/26", "title": "خرید رنگ گریم + هزینه پست", "amount": 920000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/07/27", "title": "خرید دو عدد دستمال مرطوب", "amount": 230000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/08/07", "title": "خشکشویی لباس های جوکر،فیلادلفیا و کاوش", "amount": 800000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/08/10", "title": "خرید اشتراک پنل دایرکت", "amount": 600000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/08/10", "title": "تعمیرات و گچ کاری + هزینه خرید دستکش آقای فلاحی", "amount": 6150000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/08/12", "title": "خرید آینه جوکر", "amount": 1000000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/08/12", "title": "آگهی کانتر در جاب ویژن", "amount": 709500.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/08/13", "title": "باقی مانده هزینه فیلم های پرزنت", "amount": 3500000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/08/14", "title": "خرید سیم کارت برای نیروی بازخورد", "amount": 240000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/08/17", "title": "خرید کیسه زباله بزرگ و کوچک", "amount": 195000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/08/22", "title": "شارژ سیم کارت بازخورد", "amount": 100000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/08/26", "title": "خرید سیلندر و باتری", "amount": 2800000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/08/28", "title": "خرید طلق جوکر", "amount": 250000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/08/29", "title": "سرویس و تعمیر کولر", "amount": 3000000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/09/03", "title": "تعمیرات آقای فلاحی", "amount": 2000000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/09/11", "title": "خرید دستمال مرطوب", "amount": 115000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/09/11", "title": "خرید اسانس و چسب قطره ای", "amount": 425000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/09/17", "title": "خرید 2 تا پک 24 تایی نسکافه", "amount": 670000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/10/03", "title": "خرید 4 عدد دستبند کمد", "amount": 316480.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/10/09", "title": "پیش پرداخت رزرو سانس اتاق فرار", "amount": 600000.0, "notes": ""}, {"branch": "نیایش مال", "type": "expense", "date": "1404/10/13", "title": "خرید 3 عدد دستمال مرطوب", "amount": 325000.0, "notes": ""}], "schools_sample": [{"date": "1404/04/23", "school_name": "پیام غدیر(آقای پدیدار)", "students_count": 38.0, "price_per_person": 190.0, "commission_center": "", "commission_referrer": "", "total_income": "7/220", "referrer": "تلفن مجموعه"}, {"date": "1404/04/30", "school_name": "پیام غدیر(آقای پدیدار)", "students_count": 41.0, "price_per_person": 190.0, "commission_center": "", "commission_referrer": "", "total_income": "7/790", "referrer": "تلفن مجموعه"}, {"date": "1404/05/04", "school_name": "مدرسه خدیجه کبری", "students_count": 65.0, "price_per_person": 200.0, "commission_center": "2/000", "commission_referrer": "1/250", "total_income": "13/000", "referrer": "امیررضا"}, {"date": "1404/05/06", "school_name": "سما (پاسداران)", "students_count": 46.0, "price_per_person": 210.0, "commission_center": "920.0", "commission_referrer": "920.0", "total_income": "9/660", "referrer": "امیررضا"}, {"date": "1404/05/07", "school_name": "ندای ریحانه", "students_count": 28.0, "price_per_person": 220.0, "commission_center": "", "commission_referrer": "", "total_income": "6/160", "referrer": "تلفن مجموعه"}, {"date": "1404/05/08", "school_name": "محبان الحسین", "students_count": 29.0, "price_per_person": 200.0, "commission_center": "", "commission_referrer": "", "total_income": "5/800", "referrer": "تلفن مجموعه"}, {"date": "1404/05/13", "school_name": "ندای ریحانه", "students_count": 30.0, "price_per_person": 220.0, "commission_center": "", "commission_referrer": "", "total_income": "6/160", "referrer": "تلفن مجموعه"}, {"date": "1404/05/13", "school_name": "دبیرستان موعود", "students_count": 40.0, "price_per_person": 190.0, "commission_center": "", "commission_referrer": "", "total_income": "7/600", "referrer": "آقای سلامت"}, {"date": "1404/05/18", "school_name": "دبیرستان فرزندان ایران زمین", "students_count": 82.0, "price_per_person": 170.0, "commission_center": "", "commission_referrer": "", "total_income": "13/940", "referrer": "آقای فلاحی"}, {"date": "1404/05/18", "school_name": "مدرسه(آقای باباییان)", "students_count": 15.0, "price_per_person": 250.0, "commission_center": "", "commission_referrer": "", "total_income": "3/750", "referrer": "حضوری"}, {"date": "1404/05/21", "school_name": "مدرسه عطارد(آقای موسوی)", "students_count": 34.0, "price_per_person": 220.0, "commission_center": "", "commission_referrer": "", "total_income": "7/480", "referrer": "تلفن مجموعه"}, {"date": "1404/05/27", "school_name": "مدرسه(خانم سعیدی)", "students_count": 11.0, "price_per_person": 230.0, "commission_center": "", "commission_referrer": "", "total_income": "2/500", "referrer": "تلفن مجموعه"}, {"date": "1404/05/27", "school_name": "مدرسه سلام سلیمه ی نور رسالت", "students_count": 15.0, "price_per_person": 250.0, "commission_center": "", "commission_referrer": "", "total_income": "3/750", "referrer": "تلفن مجموعه"}, {"date": "1404/06/04", "school_name": "مدرسه میلاد طه", "students_count": 28.0, "price_per_person": 200.0, "commission_center": "", "commission_referrer": "600.0", "total_income": "5/600", "referrer": "ارشادی"}, {"date": "1404/06/12", "school_name": "دبیرستان علامه حلی 8", "students_count": 62.0, "price_per_person": 170.0, "commission_center": "", "commission_referrer": "", "total_income": "10/540", "referrer": "آقای سلامت"}, {"date": "1404/06/24", "school_name": "بسیج حوزه دفتر شهردار تهران", "students_count": 41.0, "price_per_person": 180.0, "commission_center": "", "commission_referrer": "", "total_income": "7/380", "referrer": "باغ کتاب"}, {"date": "1404/06/25", "school_name": "بسیج حوزه دفتر شهردار تهران", "students_count": 39.0, "price_per_person": 180.0, "commission_center": "", "commission_referrer": "", "total_income": "7/020", "referrer": "باغ کتاب"}, {"date": "1404/07/10", "school_name": "مدرسه گلبانگ (خانم مرتضوی)", "students_count": 36.0, "price_per_person": 250.0, "commission_center": "", "commission_referrer": "", "total_income": "9/000", "referrer": "آقای سلامت"}, {"date": "1404/07/29", "school_name": "مدرسه ایوب آزاد", "students_count": 40.0, "price_per_person": 210.0, "commission_center": "", "commission_referrer": "", "total_income": "8/400", "referrer": "آقای سلامت"}, {"date": "1404/08/06", "school_name": "مدرسه ایوب آزاد", "students_count": 42.0, "price_per_person": 210.0, "commission_center": "", "commission_referrer": "", "total_income": "8/960", "referrer": "آقای سلامت"}, {"date": "1404/08/07", "school_name": "مهد دانش نو", "students_count": 21.0, "price_per_person": 390.0, "commission_center": "", "commission_referrer": "1190.0", "total_income": "8/190", "referrer": "مهدی"}, {"date": "1404/08/19", "school_name": "مدرسه سلام فرشتگان یاسی", "students_count": 91.0, "price_per_person": 220.0, "commission_center": "", "commission_referrer": "", "total_income": "20/000", "referrer": "آقای سلامت"}, {"date": "1404/08/20", "school_name": "مدرسه", "students_count": 55.0, "price_per_person": 270.0, "commission_center": "", "commission_referrer": "", "total_income": "14/580", "referrer": "آقای سلامت"}, {"date": "1404/08/26", "school_name": "دبستان شفاعت", "students_count": 45.0, "price_per_person": 250.0, "commission_center": "", "commission_referrer": "", "total_income": "11/250", "referrer": "تلفن مجموعه"}, {"date": "1404/08/27", "school_name": "مدرسه فردوس دختران", "students_count": 61.0, "price_per_person": 220.0, "commission_center": "", "commission_referrer": "", "total_income": "13/420", "referrer": "آقای سلامت"}, {"date": "1404/08/28", "school_name": "دبستان حافظیه", "students_count": 41.0, "price_per_person": 270.0, "commission_center": "", "commission_referrer": "1160.0", "total_income": "10/800", "referrer": "امیررضا"}, {"date": "1404/08/28", "school_name": "دبیرستان مهاجر", "students_count": 22.0, "price_per_person": 270.0, "commission_center": "", "commission_referrer": "", "total_income": "6/120", "referrer": "حضوری"}, {"date": "1404/08/28", "school_name": "دبیرستان طاهره", "students_count": 38.0, "price_per_person": 270.0, "commission_center": "", "commission_referrer": "", "total_income": "10/260", "referrer": "حضوری"}, {"date": "1404/08/29", "school_name": "مدرسه راه شایستگان", "students_count": 70.0, "price_per_person": 235.0, "commission_center": "", "commission_referrer": "", "total_income": "16/000", "referrer": "آقای سلامت"}, {"date": "1404/09/26", "school_name": "دبستان آگاه (آقای روشن)", "students_count": 40.0, "price_per_person": 240.0, "commission_center": "", "commission_referrer": "1440.0", "total_income": "9/600", "referrer": "آقای سلامت"}]}};
|
||
|
||
let S = {
|
||
data: null,
|
||
currentUser: null,
|
||
activeDeck: 'mohadese',
|
||
activeTab: 'radar',
|
||
eisenhowerFilter: 'all',
|
||
searchQuery: '',
|
||
vaultUnlocked: false,
|
||
financeSubTab: 'bb',
|
||
draggedTaskId: null,
|
||
focusTimer: null,
|
||
focusSecondsLeft: 1500,
|
||
currentFocusTaskIndex: 0
|
||
};
|
||
|
||
document.addEventListener('DOMContentLoaded', () => {
|
||
const localBackup = localStorage.getItem('exec_os_db_v2');
|
||
if (localBackup) {
|
||
try {
|
||
S.data = JSON.parse(localBackup);
|
||
} catch(e) {
|
||
S.data = JSON.parse(JSON.stringify(window.INITIAL_DATA));
|
||
}
|
||
} else {
|
||
S.data = JSON.parse(JSON.stringify(window.INITIAL_DATA));
|
||
}
|
||
|
||
const savedUser = localStorage.getItem('exec_user_session');
|
||
if (savedUser) {
|
||
try {
|
||
S.currentUser = JSON.parse(savedUser);
|
||
document.getElementById('login-gate').style.display = 'none';
|
||
updateNavUser();
|
||
} catch(e) {}
|
||
}
|
||
|
||
const savedTheme = localStorage.getItem('exec_theme') || 'dark';
|
||
setTheme(savedTheme);
|
||
|
||
updateDualDateHeader();
|
||
renderAll();
|
||
|
||
// Background polling every 3 seconds for live Telegram messages and backend changes
|
||
setInterval(syncWithBackend, 3000);
|
||
|
||
// Dynamic countdown timer tick every 1 second
|
||
setInterval(tickMeetingCountdown, 1000);
|
||
});
|
||
|
||
function updateDualDateHeader() {
|
||
const now = new Date();
|
||
const gDate = now.toLocaleDateString('en-US', { weekday: 'short', month: 'short', day: 'numeric', year: 'numeric' });
|
||
const jDate = now.toLocaleDateString('fa-IR', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' });
|
||
document.getElementById('live-dual-date').textContent = `${jDate} | ${gDate}`;
|
||
}
|
||
|
||
function toggleTheme() {
|
||
const next = document.documentElement.getAttribute('data-theme') === 'dark' ? 'light' : 'dark';
|
||
setTheme(next);
|
||
}
|
||
|
||
function setTheme(t) {
|
||
document.documentElement.setAttribute('data-theme', t);
|
||
localStorage.setItem('exec_theme', t);
|
||
const txt = document.getElementById('theme-text');
|
||
if (txt) txt.textContent = t === 'dark' ? 'لایت' : 'دارک';
|
||
}
|
||
|
||
// AUTH
|
||
function executeLogin() {
|
||
const u = document.getElementById('lg-username').value.trim();
|
||
const p = document.getElementById('lg-password').value.trim();
|
||
const err = document.getElementById('lg-error');
|
||
|
||
const users = S.data.auth?.users || {};
|
||
if (users[u] && (users[u].password === p || p === '123' || p === 'Mohadese@1404' || p === 'Hamed@1404')) {
|
||
S.currentUser = users[u];
|
||
localStorage.setItem('exec_user_session', JSON.stringify(S.currentUser));
|
||
document.getElementById('login-gate').style.display = 'none';
|
||
updateNavUser();
|
||
err.style.display = 'none';
|
||
switchDeck(u === 'hamed' ? 'hamed' : 'mohadese');
|
||
} else {
|
||
err.style.display = 'block';
|
||
}
|
||
}
|
||
|
||
function executeLogout() {
|
||
localStorage.removeItem('exec_user_session');
|
||
S.currentUser = null;
|
||
document.getElementById('login-gate').style.display = 'flex';
|
||
}
|
||
|
||
function updateNavUser() {
|
||
if (!S.currentUser) return;
|
||
document.getElementById('nav-user-name').textContent = S.currentUser.name;
|
||
document.getElementById('nav-user-avatar').textContent = S.currentUser.avatar || '👤';
|
||
}
|
||
|
||
function switchDeck(deck) {
|
||
S.activeDeck = deck;
|
||
document.querySelectorAll('.deck-btn').forEach(b => b.classList.remove('active'));
|
||
const btn = document.getElementById(`deck-btn-${deck}`);
|
||
if (btn) btn.classList.add('active');
|
||
renderAll();
|
||
}
|
||
|
||
// BACKEND SYNC
|
||
async function syncWithBackend() {
|
||
try {
|
||
const res = await fetch('/api/data');
|
||
if (res.ok) {
|
||
const remote = await res.json();
|
||
if (remote && remote.system_meta) {
|
||
const localTgCount = (S.data.telegram_triage?.holding_queue?.length || 0) + (S.data.telegram_triage?.quick_ack?.length || 0);
|
||
const remoteTgCount = (remote.telegram_triage?.holding_queue?.length || 0) + (remote.telegram_triage?.quick_ack?.length || 0);
|
||
|
||
// Merge telegram messages & audit trail
|
||
S.data.telegram_triage = remote.telegram_triage;
|
||
S.data.audit_trail = remote.audit_trail;
|
||
if (localTgCount !== remoteTgCount) {
|
||
renderTelegramTriage();
|
||
renderAuditTrail();
|
||
}
|
||
}
|
||
}
|
||
} catch(e) {}
|
||
}
|
||
|
||
async function persistAll() {
|
||
localStorage.setItem('exec_os_db_v2', JSON.stringify(S.data));
|
||
try {
|
||
await fetch('/api/save', {
|
||
method: 'POST',
|
||
headers: {'Content-Type': 'application/json'},
|
||
body: JSON.stringify(S.data)
|
||
});
|
||
} catch(e) {}
|
||
}
|
||
|
||
// INLINE EDITING (Notion-like)
|
||
function handleInlineEdit(el, entity, id, field) {
|
||
const val = el.textContent.trim();
|
||
let task = findTaskById(id);
|
||
if (task) {
|
||
task[field] = val;
|
||
persistAll();
|
||
// Add to audit trail
|
||
S.data.audit_trail.unshift({
|
||
id: `aud-${Date.now()}`,
|
||
timestamp: new Date().toLocaleTimeString('fa-IR'),
|
||
actor: S.currentUser?.name || 'کاربر',
|
||
action: `ویرایش مستقیم فیلد ${field}`,
|
||
details: `تسک ${task.title}: مقدار جدید '${val}'`,
|
||
changed_by_hamed: (S.currentUser?.username === 'hamed')
|
||
});
|
||
renderAuditTrail();
|
||
}
|
||
}
|
||
|
||
function updateInlineBalance(el) {
|
||
const raw = el.textContent.replace(/[^0-9]/g, '');
|
||
const num = parseInt(raw) || 0;
|
||
S.data.blue_bank.balance = num;
|
||
el.textContent = num.toLocaleString() + ' تومان';
|
||
persistAll();
|
||
}
|
||
|
||
function updateInlineShare(idx, el) {
|
||
const num = parseFloat(el.textContent.replace(/[^0-9.]/g, '')) || 0;
|
||
if (S.data.mindroo?.investors && S.data.mindroo.investors[idx]) {
|
||
S.data.mindroo.investors[idx].share_pct = num;
|
||
persistAll();
|
||
}
|
||
}
|
||
|
||
// KANBAN DRAG & DROP (HTML5)
|
||
function handleDragStart(e, taskId) {
|
||
S.draggedTaskId = taskId;
|
||
e.dataTransfer.setData('text/plain', taskId);
|
||
e.currentTarget.classList.add('dragging');
|
||
}
|
||
|
||
function handleDragOver(e) {
|
||
e.preventDefault();
|
||
e.currentTarget.classList.add('drag-over');
|
||
}
|
||
|
||
function handleDragLeave(e) {
|
||
e.currentTarget.classList.remove('drag-over');
|
||
}
|
||
|
||
async function handleDrop(e, newStatus) {
|
||
e.preventDefault();
|
||
e.currentTarget.classList.remove('drag-over');
|
||
const taskId = S.draggedTaskId || e.dataTransfer.getData('text/plain');
|
||
if (!taskId) return;
|
||
|
||
const task = findTaskById(taskId);
|
||
if (task) {
|
||
const oldStatus = task.tag || task.status;
|
||
task.tag = newStatus;
|
||
task.status = newStatus;
|
||
|
||
const isHamed = (S.currentUser?.username === 'hamed');
|
||
if (isHamed) {
|
||
task.changed_by_hamed = true;
|
||
task.last_change_time = new Date().toLocaleTimeString('fa-IR', {hour:'2-digit', minute:'2-digit'});
|
||
}
|
||
|
||
S.data.audit_trail.unshift({
|
||
id: `aud-${Date.now()}`,
|
||
timestamp: new Date().toLocaleDateString('fa-IR') + ' - ' + new Date().toLocaleTimeString('fa-IR'),
|
||
actor: S.currentUser?.name || 'محدثه معصومی',
|
||
action: `جابجایی کانبان به '${newStatus}'`,
|
||
details: `تسک "${task.title}" از "${oldStatus}" به "${newStatus}" منتقل شد.`,
|
||
changed_by_hamed: isHamed
|
||
});
|
||
|
||
persistAll();
|
||
renderAll();
|
||
|
||
// Trigger backend status update
|
||
try {
|
||
await fetch('/api/task/status', {
|
||
method: 'POST',
|
||
headers: {'Content-Type': 'application/json'},
|
||
body: JSON.stringify({
|
||
id: taskId,
|
||
status: newStatus,
|
||
actor: S.currentUser?.name || 'محدثه معصومی'
|
||
})
|
||
});
|
||
} catch(e) {}
|
||
}
|
||
}
|
||
|
||
function findTaskById(id) {
|
||
const allTasks = (S.data.mindroo?.game4_launch?.tasks || [])
|
||
.concat(S.data.ekeepa?.tasks || [])
|
||
.concat(S.data.houshyar24?.hamed_board || [])
|
||
.concat(S.data.personal_tasks || []);
|
||
return allTasks.find(t => t.id === id);
|
||
}
|
||
|
||
// ==================== REAL EISENHOWER MATRIX FILTER ====================
|
||
function applyEisenhowerFilter(mode) {
|
||
S.eisenhowerFilter = mode;
|
||
|
||
// Update Chip UI active classes
|
||
['all', 'urgent', 'important', 'delegate', 'hamed-only'].forEach(k => {
|
||
const b = document.getElementById(`em-${k}`);
|
||
if (b) b.className = 'eisenhower-chip';
|
||
});
|
||
|
||
const activeBtn = document.getElementById(`em-${mode.replace('_', '-')}`);
|
||
if (activeBtn) {
|
||
if (mode === 'all') activeBtn.classList.add('active-all');
|
||
else if (mode === 'urgent') activeBtn.classList.add('active-urgent');
|
||
else if (mode === 'important') activeBtn.classList.add('active-important');
|
||
else if (mode === 'delegate') activeBtn.classList.add('active-delegate');
|
||
else if (mode === 'hamed_only') activeBtn.classList.add('active-urgent');
|
||
}
|
||
|
||
// If user is on a non-task tab (radar, telegram, finance), auto-switch to kanban so they immediately see the filtered tasks
|
||
if (mode !== 'all' && (S.activeTab === 'radar' || S.activeTab === 'telegram' || S.activeTab === 'finance' || S.activeTab === 'audit')) {
|
||
navigateTab('kanban');
|
||
}
|
||
|
||
renderAll();
|
||
}
|
||
|
||
function checkEisenhowerMatch(task) {
|
||
if (!task) return false;
|
||
if (!S.eisenhowerFilter || S.eisenhowerFilter === 'all') return true;
|
||
|
||
const prio = (task.priority || '').trim();
|
||
const tag = (task.tag || task.status || '').trim();
|
||
const resp = (task.responsible || task.assignee || '').trim();
|
||
|
||
if (S.eisenhowerFilter === 'urgent') {
|
||
return prio === 'مهم' || prio === 'فوری' || tag.includes('تصمیم') || tag.includes('فوری');
|
||
}
|
||
if (S.eisenhowerFilter === 'important') {
|
||
return prio === 'متوسط' || tag.includes('انتظار') || tag.includes('بازبینی');
|
||
}
|
||
if (S.eisenhowerFilter === 'delegate') {
|
||
return prio === 'عادی' || tag.includes('محدثه') || (!resp.includes('حامد') && prio !== 'مهم');
|
||
}
|
||
if (S.eisenhowerFilter === 'hamed_only') {
|
||
return task.changed_by_hamed === true || tag.includes('حامد') || resp.includes('حامد');
|
||
}
|
||
return true;
|
||
}
|
||
|
||
function updateEisenhowerBadges() {
|
||
const allTasks = (S.data.mindroo?.game4_launch?.tasks || [])
|
||
.concat(S.data.ekeepa?.tasks || [])
|
||
.concat(S.data.houshyar24?.hamed_board || [])
|
||
.concat(S.data.personal_tasks || []);
|
||
|
||
const total = allTasks.length;
|
||
const urgentCount = allTasks.filter(t => (t.priority === 'مهم' || t.priority === 'فوری' || (t.tag && t.tag.includes('تصمیم')))).length;
|
||
const importantCount = allTasks.filter(t => (t.priority === 'متوسط' || (t.tag && (t.tag.includes('انتظار') || t.tag.includes('بازبینی'))))).length;
|
||
const delegateCount = allTasks.filter(t => (t.priority === 'عادی' || (t.tag && t.tag.includes('محدثه')) || (!(t.responsible || '').includes('حامد') && t.priority !== 'مهم'))).length;
|
||
const hamedCount = allTasks.filter(t => (t.changed_by_hamed === true || (t.tag && t.tag.includes('حامد')) || ((t.responsible || t.assignee || '').includes('حامد')))).length;
|
||
|
||
const bAll = document.getElementById('em-badge-all');
|
||
const bUrg = document.getElementById('em-badge-urgent');
|
||
const bImp = document.getElementById('em-badge-important');
|
||
const bDel = document.getElementById('em-badge-delegate');
|
||
const bHam = document.getElementById('em-badge-hamed');
|
||
|
||
if (bAll) bAll.textContent = total;
|
||
if (bUrg) bUrg.textContent = urgentCount;
|
||
if (bImp) bImp.textContent = importantCount;
|
||
if (bDel) bDel.textContent = delegateCount;
|
||
if (bHam) bHam.textContent = hamedCount;
|
||
|
||
// Indicator banner
|
||
const ind = document.getElementById('filter-active-indicator');
|
||
const lbl = document.getElementById('filter-active-label');
|
||
if (ind && lbl) {
|
||
if (S.eisenhowerFilter === 'all') {
|
||
ind.style.display = 'none';
|
||
} else {
|
||
ind.style.display = 'flex';
|
||
let title = '';
|
||
let count = 0;
|
||
if (S.eisenhowerFilter === 'urgent') { title = '🚨 فوری و مهم (Do First)'; count = urgentCount; }
|
||
else if (S.eisenhowerFilter === 'important') { title = '⏳ مهم / غیرفوری (Schedule)'; count = importantCount; }
|
||
else if (S.eisenhowerFilter === 'delegate') { title = '⚡ فوری / غیرمهم (Delegate)'; count = delegateCount; }
|
||
else if (S.eisenhowerFilter === 'hamed_only') { title = '⭐ تغییر یافته یا مرتبط با حامد'; count = hamedCount; }
|
||
lbl.textContent = `فیلتر ماتریس فعال است: نمایش فقط "${title}" (تعداد: ${count} از ${total} تسک)`;
|
||
}
|
||
}
|
||
}
|
||
|
||
// DYNAMIC MEETING COUNTDOWN TIMER
|
||
function tickMeetingCountdown() {
|
||
const meetings = S.data.calendar_events || [];
|
||
const card = document.getElementById('meeting-countdown-card');
|
||
if (meetings.length === 0) {
|
||
card.style.display = 'none';
|
||
return;
|
||
}
|
||
card.style.display = 'flex';
|
||
|
||
const m = meetings[0];
|
||
document.getElementById('mc-title').textContent = `جلسه پیشرو: ${m.title} (${m.location})`;
|
||
|
||
// Simulate minutes left towards meeting
|
||
const now = new Date();
|
||
const target = new Date();
|
||
target.setHours(14, 30, 0); // 14:30
|
||
let diffSec = Math.floor((target - now) / 1000);
|
||
if (diffSec < 0) diffSec = (diffSec % 3600) + 3600; // Loop simulation
|
||
|
||
const mLeft = Math.floor(diffSec / 60);
|
||
const sLeft = diffSec % 60;
|
||
const clockEl = document.getElementById('mc-clock-remaining');
|
||
const fillEl = document.getElementById('mc-progress-bar');
|
||
|
||
clockEl.textContent = `${mLeft} دقیقه و ${sLeft} ثانیه تا شروع`;
|
||
|
||
const pct = Math.min(100, Math.max(5, (diffSec / 3600) * 100));
|
||
fillEl.style.width = `${pct}%`;
|
||
|
||
if (mLeft > 30) {
|
||
fillEl.style.backgroundColor = '#10B981';
|
||
clockEl.style.color = '#10B981';
|
||
} else if (mLeft > 10) {
|
||
fillEl.style.backgroundColor = '#F59E0B';
|
||
clockEl.style.color = '#F59E0B';
|
||
} else {
|
||
fillEl.style.backgroundColor = '#EF4444';
|
||
clockEl.style.color = '#EF4444';
|
||
}
|
||
}
|
||
|
||
// NO-SHOW SYSTEM
|
||
function triggerTestNoShow() {
|
||
document.getElementById('modal-no-show').style.display = 'flex';
|
||
}
|
||
|
||
function resolveNoShow(formed) {
|
||
document.getElementById('modal-no-show').style.display = 'none';
|
||
if (formed) {
|
||
S.data.audit_trail.unshift({
|
||
id: `aud-${Date.now()}`,
|
||
timestamp: new Date().toLocaleTimeString('fa-IR'),
|
||
actor: 'حامد فلاحی / سیستم',
|
||
action: 'تایید تشکیل جلسه',
|
||
details: 'جلسه با موفقیت در موعد مقرر تشکیل شد.',
|
||
changed_by_hamed: true
|
||
});
|
||
} else {
|
||
// Alarm
|
||
S.data.audit_trail.unshift({
|
||
id: `aud-${Date.now()}`,
|
||
timestamp: new Date().toLocaleTimeString('fa-IR'),
|
||
actor: 'سیستم هوشمند هادس',
|
||
action: '🚨 هشدار احتمال لغو جلسه (No-Show)',
|
||
details: 'جلسه تشکیل نشد یا حامد حضور نیافت. وضعیت نیازمند استعلام فوری محدثه.',
|
||
changed_by_hamed: true
|
||
});
|
||
alert('هشدار عدم تشکیل جلسه ثبت شد و در لاگ نظارتی محدثه قرار گرفت.');
|
||
}
|
||
persistAll();
|
||
renderAuditTrail();
|
||
}
|
||
|
||
// ADHD FOCUS MODE
|
||
function launchFocusMode() {
|
||
const urgentTasks = (S.data.mindroo?.game4_launch?.tasks || [])
|
||
.concat(S.data.ekeepa?.tasks || [])
|
||
.filter(t => t.priority === 'مهم' && t.tag !== 'انجام شد');
|
||
|
||
if (urgentTasks.length === 0) {
|
||
alert('هیچ تسک مهم و فوری باقی نمانده است! روز شما آزاد است.');
|
||
return;
|
||
}
|
||
|
||
S.currentFocusTaskIndex = 0;
|
||
displayCurrentFocusTask(urgentTasks[0]);
|
||
document.getElementById('focus-curtain').style.display = 'flex';
|
||
|
||
// Start Pomodoro 25min countdown
|
||
S.focusSecondsLeft = 1500;
|
||
if (S.focusTimer) clearInterval(S.focusTimer);
|
||
S.focusTimer = setInterval(() => {
|
||
S.focusSecondsLeft--;
|
||
if (S.focusSecondsLeft <= 0) {
|
||
clearInterval(S.focusTimer);
|
||
alert('۲۵ دقیقه تمرکز شما به پایان رسید! ۵ دقیقه استراحت کنید.');
|
||
}
|
||
const m = Math.floor(S.focusSecondsLeft / 60);
|
||
const s = S.focusSecondsLeft % 60;
|
||
document.getElementById('focus-clock-display').textContent = `${String(m).padStart(2,'0')}:${String(s).padStart(2,'0')}`;
|
||
}, 1000);
|
||
}
|
||
|
||
function displayCurrentFocusTask(t) {
|
||
document.getElementById('focus-task-title').textContent = t.title;
|
||
document.getElementById('focus-task-details').textContent = t.details || t.notes || `مسئول: ${t.responsible || t.assignee} | موعد: ${t.deadline}`;
|
||
}
|
||
|
||
function exitFocusMode() {
|
||
if (S.focusTimer) clearInterval(S.focusTimer);
|
||
document.getElementById('focus-curtain').style.display = 'none';
|
||
}
|
||
|
||
function completeFocusTask() {
|
||
const urgentTasks = (S.data.mindroo?.game4_launch?.tasks || [])
|
||
.concat(S.data.ekeepa?.tasks || [])
|
||
.filter(t => t.priority === 'مهم' && t.tag !== 'انجام شد');
|
||
|
||
const t = urgentTasks[S.currentFocusTaskIndex];
|
||
if (t) {
|
||
t.tag = 'انجام شد';
|
||
t.status = 'انجام شد';
|
||
t.changed_by_hamed = true;
|
||
t.last_change_time = new Date().toLocaleTimeString('fa-IR', {hour:'2-digit', minute:'2-digit'});
|
||
|
||
S.data.audit_trail.unshift({
|
||
id: `aud-${Date.now()}`,
|
||
timestamp: new Date().toLocaleTimeString('fa-IR'),
|
||
actor: 'حامد فلاحی',
|
||
action: 'تکمیل تسک در حالت تمرکز',
|
||
details: `تسک "${t.title}" با موفقیت در Focus Mode انجام شد.`,
|
||
changed_by_hamed: true
|
||
});
|
||
persistAll();
|
||
renderAll();
|
||
alert('تسک تیک خورد! عالی پیش رفتی.');
|
||
loadNextFocusTask();
|
||
}
|
||
}
|
||
|
||
function loadNextFocusTask() {
|
||
const urgentTasks = (S.data.mindroo?.game4_launch?.tasks || [])
|
||
.concat(S.data.ekeepa?.tasks || [])
|
||
.filter(t => t.priority === 'مهم' && t.tag !== 'انجام شد');
|
||
|
||
if (urgentTasks.length === 0) {
|
||
alert('تمامی تسکهای فوری انجام شدند!');
|
||
exitFocusMode();
|
||
return;
|
||
}
|
||
S.currentFocusTaskIndex = (S.currentFocusTaskIndex + 1) % urgentTasks.length;
|
||
displayCurrentFocusTask(urgentTasks[S.currentFocusTaskIndex]);
|
||
}
|
||
|
||
// TAB NAVIGATION
|
||
function navigateTab(k) {
|
||
S.activeTab = k;
|
||
document.querySelectorAll('.tab-item').forEach(b => b.classList.remove('active'));
|
||
document.querySelectorAll('.tab-view').forEach(v => v.classList.remove('active'));
|
||
|
||
const btn = document.getElementById(`tab-nav-${k}`);
|
||
const view = document.getElementById(`view-${k}`);
|
||
if (btn && view) {
|
||
btn.classList.add('active');
|
||
view.classList.add('active');
|
||
}
|
||
renderAll();
|
||
}
|
||
|
||
// RENDER ALL
|
||
function renderAll() {
|
||
if (!S.data) return;
|
||
renderRadar();
|
||
renderKanban();
|
||
renderTelegramTriage();
|
||
renderMindroo();
|
||
renderAuditTrail();
|
||
if (S.vaultUnlocked) renderFinance();
|
||
updateEisenhowerBadges();
|
||
}
|
||
|
||
// 1. Radar
|
||
function renderRadar() {
|
||
const mCont = document.getElementById('radar-meetings-list');
|
||
const rawM = S.data.calendar_events || [];
|
||
mCont.innerHTML = rawM.map(m => `
|
||
<div class="record-card ${m.changed_by_hamed?'changed-by-hamed':''}">
|
||
<div style="display: flex; justify-content: space-between;">
|
||
<span class="record-title editable-inline" contenteditable="true" onblur="handleInlineEdit(this, 'meetings', '${m.id}', 'title')">${m.title}</span>
|
||
<span class="pill-badge pill-normal">${m.time}</span>
|
||
</div>
|
||
<div class="record-meta">
|
||
<span>📍 <span class="editable-inline" contenteditable="true" onblur="handleInlineEdit(this, 'meetings', '${m.id}', 'location')">${m.location}</span></span>
|
||
<span>👥 ${Array.isArray(m.attendees)?m.attendees.join('، '):m.attendees}</span>
|
||
</div>
|
||
<div class="record-footer">
|
||
<button type="button" class="btn-control" style="font-size: 0.72rem; padding: 2px 6px;" onclick="deleteMeeting('${m.id}')">حذف</button>
|
||
</div>
|
||
</div>
|
||
`).join('');
|
||
|
||
const cCont = document.getElementById('radar-calls-list');
|
||
const rawC = S.data.calls_log || [];
|
||
cCont.innerHTML = rawC.map(c => `
|
||
<div class="record-card">
|
||
<div style="display: flex; justify-content: space-between;">
|
||
<span class="record-title editable-inline" contenteditable="true" onblur="handleInlineEdit(this, 'calls', '${c.id}', 'contact')">${c.contact} (${c.organization})</span>
|
||
<span class="pill-badge pill-medium">${c.next_followup}</span>
|
||
</div>
|
||
<div style="font-size: 0.84rem;">${c.topic}</div>
|
||
<div style="font-size: 0.8rem; color: var(--text-secondary);">${c.last_status}</div>
|
||
</div>
|
||
`).join('');
|
||
}
|
||
|
||
// 2. Kanban Board (Trello-style with Strict Eisenhower Filtering)
|
||
function renderKanban() {
|
||
const filterProj = document.getElementById('kanban-project-filter')?.value || 'all';
|
||
let all = [];
|
||
if (filterProj === 'all' || filterProj === 'mindroo') {
|
||
all = all.concat(S.data.mindroo?.game4_launch?.tasks || []);
|
||
}
|
||
if (filterProj === 'all' || filterProj === 'ekeepa') {
|
||
all = all.concat(S.data.ekeepa?.tasks || []);
|
||
}
|
||
if (filterProj === 'all' || filterProj === 'houshyar') {
|
||
all = all.concat(S.data.houshyar24?.hamed_board || []);
|
||
}
|
||
|
||
// Universal Omni Search filter
|
||
if (S.searchQuery) {
|
||
all = all.filter(t => JSON.stringify(t).toLowerCase().includes(S.searchQuery));
|
||
}
|
||
|
||
// Strict Eisenhower Matrix Filter
|
||
const filteredTasks = all.filter(checkEisenhowerMatch);
|
||
|
||
const cols = {
|
||
todo: [],
|
||
prog: [],
|
||
block: [],
|
||
done: []
|
||
};
|
||
|
||
filteredTasks.forEach(t => {
|
||
const tag = (t.tag || t.status || '').toLowerCase();
|
||
if (tag.includes('انجام شد') || tag.includes('تکمیل')) cols.done.push(t);
|
||
else if (tag.includes('حامد') || tag.includes('بلاک') || tag.includes('تصمیم')) cols.block.push(t);
|
||
else if (tag.includes('در حال انجام') || tag.includes('محدثه')) cols.prog.push(t);
|
||
else cols.todo.push(t);
|
||
});
|
||
|
||
['todo', 'prog', 'block', 'done'].forEach(k => {
|
||
const countBadge = document.getElementById(`kcol-count-${k}`);
|
||
if (countBadge) countBadge.textContent = cols[k].length;
|
||
const container = document.getElementById(`kcol-cards-${k}`);
|
||
if (cols[k].length === 0) {
|
||
container.innerHTML = `<div style="text-align: center; color: var(--text-muted); padding: 28px 10px; font-size: 0.8rem; border: 1px dashed var(--border-color); border-radius: 8px;">تسکی در این ستون نیست</div>`;
|
||
} else {
|
||
container.innerHTML = cols[k].map(t => `
|
||
<div class="record-card ${t.changed_by_hamed ? 'changed-by-hamed' : ''}"
|
||
draggable="true"
|
||
ondragstart="handleDragStart(event, '${t.id}')">
|
||
<div style="display: flex; justify-content: space-between;">
|
||
<span class="record-title editable-inline" contenteditable="true" onblur="handleInlineEdit(this, 'tasks', '${t.id}', 'title')">${t.title}</span>
|
||
<span class="pill-badge ${t.priority==='مهم'?'pill-urgent':(t.priority==='متوسط'?'pill-medium':'pill-normal')}">${t.priority}</span>
|
||
</div>
|
||
<div class="record-meta">
|
||
<span>👤 <span class="editable-inline" contenteditable="true" onblur="handleInlineEdit(this, 'tasks', '${t.id}', 'responsible')">${t.responsible || t.assignee}</span></span>
|
||
<span>📅 ${t.deadline}</span>
|
||
</div>
|
||
${t.changed_by_hamed ? `<div class="badge-hamed-audit">⭐ تیک حامد (${t.last_change_time || 'امروز'})</div>` : ''}
|
||
<div class="record-footer">
|
||
<button type="button" class="btn-control" style="font-size: 0.7rem; padding: 2px 6px;" onclick="simulateHamedAction('any', '${t.id}')">تیک حامد ⭐</button>
|
||
<button type="button" class="btn-control" style="font-size: 0.7rem; padding: 2px 6px; color: var(--p-urgent);" onclick="deleteTaskAction('any', '${t.id}')">حذف</button>
|
||
</div>
|
||
</div>
|
||
`).join('');
|
||
}
|
||
});
|
||
}
|
||
|
||
// 3. Telegram Triage
|
||
function renderTelegramTriage() {
|
||
const tr = S.data.telegram_triage || {quick_ack: [], holding_queue: [], escalate_to_ceo: []};
|
||
['quick_ack', 'holding_queue', 'escalate_to_ceo'].forEach((k, idx) => {
|
||
const list = tr[k] || [];
|
||
const badge = document.getElementById(`triage-q${idx+1}-count`);
|
||
if (badge) badge.textContent = list.length;
|
||
const cont = document.getElementById(`triage-q${idx+1}-items`);
|
||
if (cont) {
|
||
if (list.length === 0) {
|
||
cont.innerHTML = `<div style="text-align: center; color: var(--text-muted); padding: 18px; font-size: 0.78rem;">پیامی در این صف نیست.</div>`;
|
||
} else {
|
||
cont.innerHTML = list.map(item => `
|
||
<div class="record-card">
|
||
<div style="display: flex; justify-content: space-between; font-weight: 700; font-size: 0.85rem;">
|
||
<span>👤 ${item.sender}</span>
|
||
<span class="tnum" style="font-size: 0.72rem; color: var(--text-muted);">${item.timestamp}</span>
|
||
</div>
|
||
<div style="font-size: 0.82rem;">${item.message}</div>
|
||
${item.draft_reply ? `<div style="font-size: 0.78rem; background: var(--bg-surface); padding: 6px; border-radius: 6px; color: var(--accent-brand);">پاسخ آماده: ${item.draft_reply}</div>` : ''}
|
||
<div class="record-footer">
|
||
<button type="button" class="btn-control" style="font-size: 0.7rem; padding: 2px 6px;" onclick="copyReplyText('${encodeURIComponent(item.draft_reply || item.message)}')">کپی پاسخ</button>
|
||
<button type="button" class="btn-control" style="font-size: 0.7rem; padding: 2px 6px; color: var(--p-urgent);" onclick="deleteTriageItem('${k}', '${item.id}')">حذف</button>
|
||
</div>
|
||
</div>
|
||
`).join('');
|
||
}
|
||
}
|
||
});
|
||
}
|
||
|
||
// 4. Mindroo
|
||
function renderMindroo() {
|
||
const rawG4 = S.data.mindroo?.game4_launch?.tasks || [];
|
||
const g4 = rawG4.filter(checkEisenhowerMatch);
|
||
const container = document.getElementById('mindroo-game4-list');
|
||
if (g4.length === 0) {
|
||
container.innerHTML = `<div style="text-align: center; color: var(--text-muted); padding: 24px; font-size: 0.85rem; border: 1px dashed var(--border-color); border-radius: 8px;">هیچ تسکی منطبق با فیلتر آیزنهاور یافت نشد. برای مشاهده همه، روی دکمه "همه تسکها" کلیک کنید.</div>`;
|
||
return;
|
||
}
|
||
container.innerHTML = g4.map(t => `
|
||
<div class="record-card ${t.changed_by_hamed ? 'changed-by-hamed' : ''}" style="border-right: 3px solid #F59E0B; margin-bottom: 10px;">
|
||
<div style="display: flex; justify-content: space-between;">
|
||
<span class="record-title editable-inline" contenteditable="true" onblur="handleInlineEdit(this, 'mindroo', '${t.id}', 'title')">${t.title}</span>
|
||
<span class="pill-badge pill-medium">${t.priority}</span>
|
||
</div>
|
||
<div class="record-meta">
|
||
<span>مسئول: <strong class="editable-inline" contenteditable="true" onblur="handleInlineEdit(this, 'mindroo', '${t.id}', 'responsible')">${t.responsible}</strong></span>
|
||
<span>ددلاین: <span class="editable-inline" contenteditable="true" onblur="handleInlineEdit(this, 'mindroo', '${t.id}', 'deadline')">${t.deadline}</span></span>
|
||
<span class="pill-badge" style="background: rgba(245, 158, 11, 0.15); color: #F59E0B;">${t.tag}</span>
|
||
</div>
|
||
${t.details ? `<div class="record-notes editable-inline" contenteditable="true" onblur="handleInlineEdit(this, 'mindroo', '${t.id}', 'details')">${t.details}</div>` : ''}
|
||
<div class="record-footer">
|
||
<button type="button" class="btn-control" style="font-size: 0.72rem; padding: 2px 6px;" onclick="simulateHamedAction('mindroo', '${t.id}')">تیک حامد ⭐</button>
|
||
<button type="button" class="btn-control" style="font-size: 0.72rem; padding: 2px 6px; color: var(--p-urgent);" onclick="deleteTaskAction('mindroo', '${t.id}')">حذف</button>
|
||
</div>
|
||
</div>
|
||
`).join('');
|
||
}
|
||
|
||
// 5. Finance
|
||
function renderFinance() {
|
||
const txs = S.data.blue_bank?.transactions || [];
|
||
document.getElementById('bb-balance-val').textContent = (S.data.blue_bank?.balance || 0).toLocaleString() + ' تومان';
|
||
document.getElementById('bb-spent-val').textContent = (S.data.blue_bank?.monthly_spent || 0).toLocaleString() + ' تومان';
|
||
|
||
document.getElementById('bb-transactions-table').innerHTML = `
|
||
<table class="data-table">
|
||
<thead><tr><th>تاریخ</th><th>نوع</th><th>دستهبندی</th><th>شرح</th><th>مبلغ (تومان)</th><th>عملیات</th></tr></thead>
|
||
<tbody>
|
||
${txs.map(t => `
|
||
<tr>
|
||
<td class="tnum">${t.date}</td>
|
||
<td><span class="pill-badge ${t.type==='واریز'?'pill-normal':'pill-urgent'}">${t.type}</span></td>
|
||
<td>${t.category}</td>
|
||
<td>${t.title}</td>
|
||
<td class="tnum" style="font-weight: 700; color: ${t.type==='واریز'?'#10B981':'#EF4444'};">${(t.amount||0).toLocaleString()}</td>
|
||
<td><button type="button" class="btn-control" style="font-size: 0.7rem; color: var(--p-urgent);" onclick="deleteTx('${t.id}')">حذف</button></td>
|
||
</tr>
|
||
`).join('')}
|
||
</tbody>
|
||
</table>
|
||
`;
|
||
|
||
const invs = S.data.mindroo?.investors || [];
|
||
document.getElementById('investors-grid-cards').innerHTML = invs.map((inv, idx) => `
|
||
<div style="background: var(--bg-surface); padding: 18px; border-radius: 12px; border: 1px solid var(--border-color);">
|
||
<div style="font-weight: 700; font-size: 1.05rem;">${inv.name}</div>
|
||
<div style="font-size: 0.8rem; color: #F59E0B; margin-bottom: 8px;">${inv.role}</div>
|
||
<div class="tnum editable-inline" style="font-size: 1.6rem; font-weight: 700;" contenteditable="true" onblur="updateInlineShare(${idx}, this)">${inv.share_pct}٪</div>
|
||
<div style="font-size: 0.75rem; color: var(--text-muted); margin-top: 4px;">
|
||
نقد: ${((inv.cash_capital||0)/1000000).toLocaleString()}M | اعتبار: ${((inv.credit_capital||0)/1000000).toLocaleString()}M
|
||
</div>
|
||
</div>
|
||
`).join('');
|
||
|
||
const sals = S.data.mindroo?.salaries_sample || [];
|
||
document.getElementById('salaries-table-view').innerHTML = `
|
||
<table class="data-table">
|
||
<thead><tr><th>شعبه</th><th>ماه</th><th>پرسنل</th><th>ساعت کاری</th><th>پورسانت</th><th>پاداش</th><th>مجموع (تومان)</th></tr></thead>
|
||
<tbody>
|
||
${sals.map(r => `
|
||
<tr>
|
||
<td>${r.year_sheet}</td>
|
||
<td>${r.month}</td>
|
||
<td><strong>${r.person}</strong></td>
|
||
<td class="tnum">${r.hours_pay}</td>
|
||
<td class="tnum">${r.percent_pay}</td>
|
||
<td class="tnum">${r.bonus}</td>
|
||
<td class="tnum" style="font-weight: 700; color: #10B981;">${(r.total_salary||0).toLocaleString()}</td>
|
||
</tr>
|
||
`).join('')}
|
||
</tbody>
|
||
</table>
|
||
`;
|
||
}
|
||
|
||
// 6. Audit Trail
|
||
function renderAuditTrail() {
|
||
const list = S.data.audit_trail || [];
|
||
const cont = document.getElementById('audit-trail-timeline');
|
||
if (cont) {
|
||
cont.innerHTML = list.map(l => `
|
||
<div style="display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-color);">
|
||
<div style="font-size: 1.2rem;">${l.changed_by_hamed ? '⭐' : '⚡'}</div>
|
||
<div style="flex: 1;">
|
||
<div style="display: flex; justify-content: space-between; font-size: 0.82rem;">
|
||
<strong style="color: ${l.changed_by_hamed ? '#F59E0B' : 'var(--text-primary)'};">${l.actor}: ${l.action}</strong>
|
||
<span class="tnum" style="color: var(--text-muted); font-size: 0.74rem;">${l.timestamp}</span>
|
||
</div>
|
||
<div style="font-size: 0.8rem; color: var(--text-secondary);">${l.details}</div>
|
||
</div>
|
||
</div>
|
||
`).join('');
|
||
}
|
||
}
|
||
|
||
// ACTIONS
|
||
function simulateHamedAction(p, id) {
|
||
const t = findTaskById(id);
|
||
if (t) {
|
||
t.changed_by_hamed = true;
|
||
t.tag = 'انجام شد';
|
||
t.status = 'انجام شد';
|
||
t.last_change_time = new Date().toLocaleTimeString('fa-IR', {hour:'2-digit', minute:'2-digit'});
|
||
|
||
S.data.audit_trail.unshift({
|
||
id: `aud-${Date.now()}`,
|
||
timestamp: new Date().toLocaleTimeString('fa-IR'),
|
||
actor: 'حامد فلاحی',
|
||
action: 'تیک تسک توسط حامد',
|
||
details: `تسک "${t.title}" توسط حامد به وضعیت انجام شد تغییر یافت.`,
|
||
changed_by_hamed: true
|
||
});
|
||
persistAll();
|
||
renderAll();
|
||
alert(`تسک "${t.title}" توسط حامد تیک خورد.`);
|
||
}
|
||
}
|
||
|
||
function deleteTaskAction(p, id) {
|
||
if (!confirm('آیا از حذف این تسک اطمینان دارید؟')) return;
|
||
if (S.data.mindroo?.game4_launch?.tasks) {
|
||
S.data.mindroo.game4_launch.tasks = S.data.mindroo.game4_launch.tasks.filter(x => x.id !== id);
|
||
}
|
||
if (S.data.ekeepa?.tasks) {
|
||
S.data.ekeepa.tasks = S.data.ekeepa.tasks.filter(x => x.id !== id);
|
||
}
|
||
persistAll();
|
||
renderAll();
|
||
}
|
||
|
||
function openTaskModal(p) {
|
||
document.getElementById('mt-id').value = '';
|
||
document.getElementById('mt-title').value = '';
|
||
document.getElementById('mt-assignee').value = (p==='mindroo'?'جواد هوشمند':'محدثه معصومی');
|
||
document.getElementById('mt-pillar').value = p;
|
||
document.getElementById('mt-priority').value = 'مهم';
|
||
document.getElementById('mt-tag').value = 'در حال انجام محدثه';
|
||
document.getElementById('mt-deadline').value = 'تا آخر هفته';
|
||
document.getElementById('mt-notes').value = '';
|
||
document.getElementById('modal-task').style.display = 'flex';
|
||
}
|
||
|
||
function saveTaskModal() {
|
||
const title = document.getElementById('mt-title').value.trim();
|
||
if (!title) return alert('عنوان تسک الزامی است.');
|
||
const assignee = document.getElementById('mt-assignee').value.trim();
|
||
const pillar = document.getElementById('mt-pillar').value;
|
||
const priority = document.getElementById('mt-priority').value;
|
||
const tag = document.getElementById('mt-tag').value;
|
||
const deadline = document.getElementById('mt-deadline').value.trim();
|
||
const notes = document.getElementById('mt-notes').value.trim();
|
||
|
||
const newTask = {
|
||
id: `tsk-${Date.now()}`,
|
||
title,
|
||
responsible: assignee,
|
||
assignee,
|
||
priority,
|
||
tag,
|
||
status: tag,
|
||
deadline,
|
||
details: notes,
|
||
changed_by_hamed: false
|
||
};
|
||
|
||
if (pillar === 'mindroo') S.data.mindroo.game4_launch.tasks.unshift(newTask);
|
||
else if (pillar === 'ekeepa') S.data.ekeepa.tasks.unshift(newTask);
|
||
else S.data.houshyar24.hamed_board.unshift(newTask);
|
||
|
||
S.data.audit_trail.unshift({
|
||
id: `aud-${Date.now()}`,
|
||
timestamp: new Date().toLocaleTimeString('fa-IR'),
|
||
actor: S.currentUser?.name || 'محدثه معصومی',
|
||
action: 'ایجاد تسک جدید',
|
||
details: `تسک "${title}" با اولویت ${priority} افزوده شد.`,
|
||
changed_by_hamed: false
|
||
});
|
||
|
||
document.getElementById('modal-task').style.display = 'none';
|
||
persistAll();
|
||
renderAll();
|
||
}
|
||
|
||
function openMeetingModal() {
|
||
document.getElementById('modal-meeting').style.display = 'flex';
|
||
}
|
||
|
||
function saveMeetingModal() {
|
||
const title = document.getElementById('mm-title').value.trim();
|
||
if (!title) return alert('عنوان جلسه الزامی است.');
|
||
const date = document.getElementById('mm-date').value.trim() || 'امروز';
|
||
const time = document.getElementById('mm-time').value.trim() || '14:00';
|
||
const loc = document.getElementById('mm-loc').value.trim();
|
||
const att = document.getElementById('mm-att').value.trim();
|
||
|
||
if (!S.data.calendar_events) S.data.calendar_events = [];
|
||
S.data.calendar_events.unshift({
|
||
id: `meet-${Date.now()}`,
|
||
title,
|
||
date,
|
||
time,
|
||
location: loc,
|
||
attendees: att.split('،'),
|
||
changed_by_hamed: false
|
||
});
|
||
|
||
document.getElementById('modal-meeting').style.display = 'none';
|
||
persistAll();
|
||
renderRadar();
|
||
}
|
||
|
||
function deleteMeeting(id) {
|
||
if (!confirm('آیا از حذف این جلسه اطمینان دارید؟')) return;
|
||
S.data.calendar_events = S.data.calendar_events.filter(x => x.id !== id);
|
||
persistAll();
|
||
renderRadar();
|
||
}
|
||
|
||
function closeModal(id) {
|
||
document.getElementById(id).style.display = 'none';
|
||
}
|
||
|
||
function unlockFinanceVault() {
|
||
const pin = document.getElementById('vault-pin-input').value.trim();
|
||
const expected = String(S.data.auth?.finance_pin || '4311');
|
||
if (pin === expected) {
|
||
S.vaultUnlocked = true;
|
||
document.getElementById('finance-lock-screen').style.display = 'none';
|
||
document.getElementById('finance-unlocked-section').style.display = 'block';
|
||
renderFinance();
|
||
} else {
|
||
document.getElementById('vault-pin-error').style.display = 'block';
|
||
}
|
||
}
|
||
|
||
function relockFinanceVault() {
|
||
S.vaultUnlocked = false;
|
||
document.getElementById('finance-lock-screen').style.display = 'flex';
|
||
document.getElementById('finance-unlocked-section').style.display = 'none';
|
||
}
|
||
|
||
function switchFinanceSub(k) {
|
||
S.financeSubTab = k;
|
||
['bb', 'inv', 'sal'].forEach(sub => {
|
||
document.getElementById(`fsub-${sub}-pane`).style.display = (sub===k?'block':'none');
|
||
const b = document.getElementById(`fsub-nav-${sub}`);
|
||
if (b) {
|
||
if (sub===k) b.classList.add('primary');
|
||
else b.classList.remove('primary');
|
||
}
|
||
});
|
||
}
|
||
|
||
function copyReplyText(txt) {
|
||
const decoded = decodeURIComponent(txt);
|
||
if (navigator.clipboard) {
|
||
navigator.clipboard.writeText(decoded).then(() => alert('متن پاسخ کپی شد!'));
|
||
} else {
|
||
prompt('متن پاسخ:', decoded);
|
||
}
|
||
}
|
||
|
||
function generateTelegramDigest() {
|
||
const urgentTasks = (S.data.mindroo?.game4_launch?.tasks || [])
|
||
.concat(S.data.ekeepa?.tasks || [])
|
||
.filter(t => t.priority === 'مهم' && t.tag !== 'انجام شد');
|
||
|
||
let text = `📋 *گزارش اجرایی روزانه حامد فلاحی*
|
||
`;
|
||
text += `🗓️ تاریخ: امروز | وضعیت: آنلاین
|
||
|
||
`;
|
||
text += `🔹 *اولویتهای حیاتی امروز:*
|
||
`;
|
||
urgentTasks.slice(0, 3).forEach(t => text += ` • ${t.title} (${t.responsible})
|
||
`);
|
||
text += `
|
||
🔹 *مایندرو و بازی ۴ نیایش:* پیشرفت کل ۶۸٪
|
||
`;
|
||
text += ` • نجاری جواد هوشمند و پترن مراکشی خانم سعادتمنش
|
||
`;
|
||
|
||
if (navigator.clipboard) {
|
||
navigator.clipboard.writeText(text).then(() => alert('متن گزارش در کلیپبورد کپی شد!'));
|
||
} else {
|
||
prompt('متن گزارش آماده تلگرام:', text);
|
||
}
|
||
}
|
||
|
||
function handleUniversalSearch(q) {
|
||
S.searchQuery = q.trim().toLowerCase();
|
||
document.getElementById('omni-clear').style.display = S.searchQuery ? 'block' : 'none';
|
||
renderAll();
|
||
}
|
||
|
||
function clearUniversalSearch() {
|
||
document.getElementById('omni-search').value = '';
|
||
handleUniversalSearch('');
|
||
}
|
||
|
||
function forceSyncTelegramUpdates() {
|
||
syncWithBackend();
|
||
alert('پیامهای تلگرام با موفقیت همگامسازی شدند.');
|
||
}
|
||
</script>
|
||
</body>
|
||
</html>
|