feat(dashboard): deploy/update crm-messaging
This commit is contained in:
parent
315994e4f3
commit
23fefba4fb
2 changed files with 1380 additions and 0 deletions
690
crm-messaging.html
Normal file
690
crm-messaging.html
Normal file
|
|
@ -0,0 +1,690 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fa" dir="rtl">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>اکیپا CRM • بانک پیامکها و اسکریپتهای صوتی</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet">
|
||||
<script>
|
||||
tailwind.config = {
|
||||
theme: {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
sans: ['Vazirmatn', 'sans-serif'],
|
||||
},
|
||||
colors: {
|
||||
brand: {
|
||||
50: '#eef2ff',
|
||||
100: '#e0e7ff',
|
||||
500: '#6366f1',
|
||||
600: '#4f46e5',
|
||||
700: '#4338ca',
|
||||
900: '#312e81',
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Vazirmatn', sans-serif;
|
||||
font-feature-settings: "tnum";
|
||||
background-color: #f8fafc;
|
||||
color: #0f172a;
|
||||
}
|
||||
/* استایل کشو برای جلوگیری از باگ گیر کردن در حالت RTL */
|
||||
#sideDrawer {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 50;
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
#sideDrawer.active {
|
||||
display: flex;
|
||||
}
|
||||
.custom-scrollbar::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
}
|
||||
.custom-scrollbar::-webkit-scrollbar-track {
|
||||
background: #f1f5f9;
|
||||
}
|
||||
.custom-scrollbar::-webkit-scrollbar-thumb {
|
||||
background: #cbd5e1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
|
||||
background: #94a3b8;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="bg-slate-50 min-h-screen text-slate-800 flex overflow-hidden">
|
||||
|
||||
<!-- لایه ۱: سایدبار راست ناوبری ۲۴۰ پیکسل -->
|
||||
<aside class="w-60 bg-white border-l border-slate-200 flex flex-col justify-between shrink-0 h-screen select-none z-20">
|
||||
<div>
|
||||
<!-- برند و لوگو -->
|
||||
<div class="h-16 flex items-center px-5 border-b border-slate-100 gap-3">
|
||||
<div class="w-9 h-9 rounded-xl bg-gradient-to-tr from-indigo-600 to-indigo-500 flex items-center justify-center text-white font-black text-lg shadow-md shadow-indigo-100">
|
||||
E
|
||||
</div>
|
||||
<div>
|
||||
<div class="font-bold text-slate-900 text-base leading-tight">اکیپا CRM</div>
|
||||
<div class="text-xs text-slate-400 font-medium">ماژول فروش B2B</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- منوی سایدبار -->
|
||||
<nav class="p-3 space-y-1 text-sm font-medium">
|
||||
<a href="crm_pipeline_base.html" class="flex items-center gap-3 px-3 py-2.5 rounded-xl text-slate-600 hover:bg-slate-50 transition">
|
||||
<svg class="w-5 h-5 text-slate-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
|
||||
</svg>
|
||||
<span>پایپلاین جذب مجموعهها</span>
|
||||
</a>
|
||||
|
||||
<a href="crm_retention_onboarding.html" class="flex items-center gap-3 px-3 py-2.5 rounded-xl text-slate-600 hover:bg-slate-50 transition">
|
||||
<svg class="w-5 h-5 text-slate-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
|
||||
</svg>
|
||||
<span>نگهداشت و آنبوردینگ</span>
|
||||
</a>
|
||||
|
||||
<a href="crm_cadence_silence.html" class="flex items-center gap-3 px-3 py-2.5 rounded-xl text-slate-600 hover:bg-slate-50 transition">
|
||||
<svg class="w-5 h-5 text-slate-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
<span>پروتکل پیگیری و سکوت</span>
|
||||
</a>
|
||||
|
||||
<a href="#" class="flex items-center gap-3 px-3 py-2.5 rounded-xl bg-indigo-50 text-indigo-700 font-semibold shadow-sm">
|
||||
<svg class="w-5 h-5 text-indigo-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z" />
|
||||
</svg>
|
||||
<span>پیامکها و اسکریپت ویس</span>
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<!-- اطلاعات پنل کارشناس -->
|
||||
<div class="p-3 border-t border-slate-100">
|
||||
<div class="bg-slate-50 rounded-xl p-3 flex items-center justify-between">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-8 h-8 rounded-full bg-indigo-100 text-indigo-600 flex items-center justify-center font-bold text-xs">
|
||||
دا
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-xs font-bold text-slate-800">دارا حسینی</div>
|
||||
<div class="text-[10px] text-slate-400">کارشناس جذب اکیپا</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-2 h-2 rounded-full bg-emerald-500"></div>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<!-- ستون اصلی محتوا -->
|
||||
<div class="flex-1 flex flex-col h-screen overflow-hidden">
|
||||
|
||||
<!-- هدر بالای صفحه -->
|
||||
<header class="h-16 bg-white border-b border-slate-200 px-6 flex items-center justify-between shrink-0">
|
||||
<div class="flex items-center gap-4">
|
||||
<h1 class="text-lg font-black text-slate-900">بانک پیامکهای مهندسیشده و اسکریپتهای صوتی</h1>
|
||||
<span class="text-xs bg-indigo-100 text-indigo-700 px-2.5 py-1 rounded-full font-bold">شیت ۵ فایل مرجع v14</span>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="relative">
|
||||
<input id="searchInput" type="text" placeholder="جستجو در سناریوها، متن پیام یا مانع..." onkeyup="filterCards()"
|
||||
class="text-xs border border-slate-200 rounded-xl pr-9 pl-4 py-2 w-72 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition">
|
||||
<svg class="w-4 h-4 text-slate-400 absolute right-3 top-2.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<button onclick="openCustomizerModal()" class="flex items-center gap-2 text-xs bg-indigo-600 text-white font-bold px-4 py-2 rounded-xl hover:bg-indigo-700 shadow-sm transition">
|
||||
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" />
|
||||
</svg>
|
||||
<span>شخصیسازی سریع پیام</span>
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- لایه ۲: کاکپیت تحلیلی و کارتهای ۶ سناریو -->
|
||||
<main class="flex-1 overflow-y-auto p-6 space-y-6 custom-scrollbar">
|
||||
|
||||
<!-- ۳ کارت خلاصه شاخصها -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
|
||||
<div class="bg-white p-4 rounded-2xl border border-slate-200/80 shadow-xs flex items-center justify-between">
|
||||
<div>
|
||||
<div class="text-xs font-semibold text-slate-400">تعداد کل سناریوها</div>
|
||||
<div class="text-xl font-black text-slate-900 mt-1">۶ سناریو</div>
|
||||
<div class="text-[11px] text-emerald-600 font-medium mt-0.5">پوشش ۱۰۰٪ اعتراضات متداول</div>
|
||||
</div>
|
||||
<div class="w-10 h-10 rounded-xl bg-indigo-50 text-indigo-600 flex items-center justify-center font-bold">
|
||||
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-white p-4 rounded-2xl border border-slate-200/80 shadow-xs flex items-center justify-between">
|
||||
<div>
|
||||
<div class="text-xs font-semibold text-slate-400">طول میانگین پیامکها</div>
|
||||
<div class="text-xl font-black text-slate-900 mt-1">۵۵.۶ کاراکتر</div>
|
||||
<div class="text-[11px] text-emerald-600 font-medium mt-0.5">۱۰۰٪ تکپارت (زیر ۶۵ کاراکتر)</div>
|
||||
</div>
|
||||
<div class="w-10 h-10 rounded-xl bg-emerald-50 text-emerald-600 flex items-center justify-center font-bold">
|
||||
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-white p-4 rounded-2xl border border-slate-200/80 shadow-xs flex items-center justify-between">
|
||||
<div>
|
||||
<div class="text-xs font-semibold text-slate-400">میانگین زمان وویسها</div>
|
||||
<div class="text-xl font-black text-slate-900 mt-1">۲۸ ثانیه</div>
|
||||
<div class="text-[11px] text-indigo-600 font-medium mt-0.5">استاندارد طلایی شنیده شدن</div>
|
||||
</div>
|
||||
<div class="w-10 h-10 rounded-xl bg-purple-50 text-purple-600 flex items-center justify-center font-bold">
|
||||
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 100-6 3 3 0 000 6z" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-white p-4 rounded-2xl border border-slate-200/80 shadow-xs flex items-center justify-between">
|
||||
<div>
|
||||
<div class="text-xs font-semibold text-slate-400">نرخ تبدیل لیدهای سرد</div>
|
||||
<div class="text-xl font-black text-slate-900 mt-1">۴۲٪</div>
|
||||
<div class="text-[11px] text-amber-600 font-medium mt-0.5">واکنش مثبت به قلابهای شیت ۵</div>
|
||||
</div>
|
||||
<div class="w-10 h-10 rounded-xl bg-amber-50 text-amber-600 flex items-center justify-center font-bold">
|
||||
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- فیلتر سریع دستهها -->
|
||||
<div class="flex items-center gap-2 border-b border-slate-200 pb-3">
|
||||
<button onclick="filterCategory('all')" class="cat-btn px-4 py-1.5 rounded-xl text-xs font-bold bg-indigo-600 text-white shadow-xs">همه سناریوها (۶)</button>
|
||||
<button onclick="filterCategory('operational')" class="cat-btn px-4 py-1.5 rounded-xl text-xs font-bold bg-white text-slate-600 hover:bg-slate-100 border border-slate-200">عملیاتی و تداخل (۲)</button>
|
||||
<button onclick="filterCategory('financial')" class="cat-btn px-4 py-1.5 rounded-xl text-xs font-bold bg-white text-slate-600 hover:bg-slate-100 border border-slate-200">مالی و کارمزد (۲)</button>
|
||||
<button onclick="filterCategory('process')" class="cat-btn px-4 py-1.5 rounded-xl text-xs font-bold bg-white text-slate-600 hover:bg-slate-100 border border-slate-200">ثبتنام و شرکا (۲)</button>
|
||||
</div>
|
||||
|
||||
<!-- شبکه کارتهای ۶ سناریو -->
|
||||
<div id="cardsGrid" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5">
|
||||
<!-- کارتها توسط JS رندر میشوند -->
|
||||
</div>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<!-- لایه ۳: کشوی جزئیات، شخصیسازی و ادیتور لید (Side Drawer - 420px) -->
|
||||
<div id="sideDrawer">
|
||||
<!-- پسزمینه نیمهشفاف -->
|
||||
<div onclick="closeDrawer()" class="fixed inset-0 bg-slate-900/40 backdrop-blur-xs transition-opacity"></div>
|
||||
|
||||
<!-- بدنه کشو -->
|
||||
<div class="relative w-[430px] bg-white h-full shadow-2xl flex flex-col z-10 border-r border-slate-200">
|
||||
<div class="p-5 border-b border-slate-200 flex items-center justify-between bg-slate-50">
|
||||
<div>
|
||||
<div class="flex items-center gap-2">
|
||||
<span id="drawerBadge" class="text-xs font-extrabold px-2 py-0.5 rounded bg-indigo-100 text-indigo-700">SMS-01</span>
|
||||
<h3 id="drawerTitle" class="text-sm font-black text-slate-900">عنوان سناریو</h3>
|
||||
</div>
|
||||
<p id="drawerHook" class="text-xs text-slate-500 mt-1">قلاب روانشناختی</p>
|
||||
</div>
|
||||
<button onclick="closeDrawer()" class="text-slate-400 hover:text-slate-600 p-1 rounded-lg">
|
||||
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="flex-1 overflow-y-auto p-5 space-y-5 custom-scrollbar">
|
||||
<!-- انتخاب لید جهت جایگزینی نام -->
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-slate-700 mb-1.5">انتخاب لید جهت شخصیسازی خودکار:</label>
|
||||
<select id="leadSelector" onchange="applyLeadTokens()" class="w-full text-xs border border-slate-200 rounded-xl p-2.5 focus:ring-2 focus:ring-indigo-500 focus:outline-none">
|
||||
<option value="lead1">مجموعه اسکیپ روم طهران (مالک: مهندس افشار)</option>
|
||||
<option value="lead2">اتاق فرار انیگما کرج (مالک: آقای سلیمانی)</option>
|
||||
<option value="lead3">اسکیپ روم زال شیراز (مالک: سرکار خانم کریمی)</option>
|
||||
<option value="lead4">مجموعه راز اصفهان (مالک: مهندس رضوانی)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- ادیتور متن پیامک با کاراکترشمار هوشمند -->
|
||||
<div class="bg-slate-50 p-4 rounded-xl border border-slate-200">
|
||||
<div class="flex items-center justify-between mb-2">
|
||||
<span class="text-xs font-bold text-slate-800">متن پیامک (زیر ۶۵ کاراکتر)</span>
|
||||
<span id="charCounter" class="text-xs font-black text-emerald-600 bg-emerald-50 px-2 py-0.5 rounded-md border border-emerald-200">۵۹ / ۶۵</span>
|
||||
</div>
|
||||
<textarea id="smsEditorText" rows="3" oninput="updateCharCount()" class="w-full text-xs border border-slate-200 rounded-xl p-3 focus:outline-none focus:ring-2 focus:ring-indigo-500 bg-white leading-relaxed text-slate-800"></textarea>
|
||||
|
||||
<div id="costWarning" class="hidden mt-2 text-[11px] text-amber-700 bg-amber-50 p-2 rounded-lg border border-amber-200 flex items-center gap-1.5">
|
||||
<svg class="w-4 h-4 text-amber-600 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
|
||||
</svg>
|
||||
<span>طول پیام از ۶۵ کاراکتر گذشت و وارد پارت دوم مخابراتی شد.</span>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 flex gap-2">
|
||||
<button onclick="copyEditedSMS()" class="flex-1 bg-indigo-600 text-white font-bold text-xs py-2 rounded-xl hover:bg-indigo-700 flex items-center justify-center gap-1.5 transition">
|
||||
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3" />
|
||||
</svg>
|
||||
<span>کپی متن پیامک</span>
|
||||
</button>
|
||||
<button onclick="simulateSendSMS()" class="px-3 bg-white border border-slate-200 text-slate-700 font-bold text-xs rounded-xl hover:bg-slate-50 transition">
|
||||
ارسال وبهوک
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- اسکریپت صوتی ۳۰ ثانیهای و نکات بیان -->
|
||||
<div class="bg-indigo-50/50 p-4 rounded-xl border border-indigo-100">
|
||||
<div class="flex items-center justify-between mb-2">
|
||||
<span class="text-xs font-bold text-indigo-900">اسکریپت پیام صوتی ۳۰ ثانیهای (بله / تلگرام)</span>
|
||||
<span class="text-[10px] bg-indigo-100 text-indigo-700 px-2 py-0.5 rounded font-bold">لحن مشاورهای</span>
|
||||
</div>
|
||||
<div id="voiceScriptBox" class="text-xs leading-relaxed text-slate-700 bg-white p-3 rounded-xl border border-indigo-100/80">
|
||||
متن ویس صوتی
|
||||
</div>
|
||||
|
||||
<div class="mt-3 flex items-center justify-between">
|
||||
<button onclick="openPracticeModalFromDrawer()" class="text-xs bg-indigo-600 text-white font-bold px-3 py-1.5 rounded-lg hover:bg-indigo-700 transition flex items-center gap-1.5">
|
||||
<svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z" />
|
||||
</svg>
|
||||
<span>تمرین و ضبط الگو</span>
|
||||
</button>
|
||||
<button onclick="copyVoiceScriptText()" class="text-xs text-indigo-600 font-bold hover:underline">
|
||||
کپی متن ویس
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ترفندهای زبان بدن و تن صدا -->
|
||||
<div class="bg-slate-50 p-3.5 rounded-xl border border-slate-200 text-xs space-y-1.5 text-slate-600">
|
||||
<div class="font-bold text-slate-800 text-[11px] flex items-center gap-1">
|
||||
<svg class="w-3.5 h-3.5 text-amber-500" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path d="M11 3a1 1 0 10-2 0v1a1 1 0 102 0V3zM15.657 5.757a1 1 0 00-1.414-1.414l-.707.707a1 1 0 001.414 1.414l.707-.707zM18 10a1 1 0 01-1 1h-1a1 1 0 110-2h1a1 1 0 011 1zM5.05 6.464A1 1 0 106.464 5.05l-.707-.707a1 1 0 00-1.414 1.414l.707.707zM5 10a1 1 0 01-1 1H3a1 1 0 110-2h1a1 1 0 011 1zM8 16v-1h4v1a2 2 0 11-4 0zM12 14c.015-.34.208-.646.477-.859a4 4 0 10-4.954 0c.27.213.462.519.476.859h4.001z" />
|
||||
</svg>
|
||||
<span>اصول ادای این وویس:</span>
|
||||
</div>
|
||||
<p>• ثانیههای ۱ تا ۵: ریتم سریع و پرانرژی جهت جلوگیری از اسکیپ کردن وویس.</p>
|
||||
<p>• ثانیههای ۱۵ تا ۲۰: مکث ۲ ثانیهای روی عدد تسویه یا درصد سانس مرده.</p>
|
||||
<p>• جمله آخر: حتماً بگویید «وویس کوتاه دادم وقتتون گرفته نشه».</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- لایه ۴: مودال تمرین و تایمر ۳۰ ثانیهای وویس -->
|
||||
<div id="practiceModal" class="hidden fixed inset-0 z-50 flex items-center justify-center p-4">
|
||||
<div onclick="closePracticeModal()" class="fixed inset-0 bg-slate-900/50 backdrop-blur-xs"></div>
|
||||
<div class="relative bg-white rounded-2xl w-full max-w-lg p-6 shadow-2xl z-10 border border-slate-200">
|
||||
<div class="flex items-center justify-between border-b border-slate-100 pb-3 mb-4">
|
||||
<h3 class="font-bold text-slate-900 text-sm flex items-center gap-2">
|
||||
<svg class="w-5 h-5 text-indigo-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 100-6 3 3 0 000 6z" />
|
||||
</svg>
|
||||
<span>استودیوی تمرین وویس ۳۰ ثانیهای</span>
|
||||
</h3>
|
||||
<button onclick="closePracticeModal()" class="text-slate-400 hover:text-slate-600">
|
||||
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- تایمر دایرهای معکوس ۳۰ ثانیه -->
|
||||
<div class="flex flex-col items-center justify-center my-4">
|
||||
<div class="relative w-28 h-28 flex items-center justify-center">
|
||||
<div id="timerCircle" class="w-24 h-24 rounded-full border-4 border-indigo-600 flex items-center justify-center bg-indigo-50">
|
||||
<span id="timerSeconds" class="text-2xl font-black text-indigo-700">30</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-xs text-slate-500 font-medium mt-2">مدت زمان استاندارد ضبط برای مالک</div>
|
||||
</div>
|
||||
|
||||
<!-- متن پاراگراف جهت خواندن -->
|
||||
<div id="practiceScriptText" class="bg-slate-50 p-4 rounded-xl text-xs leading-relaxed text-slate-800 border border-slate-200 mb-4 max-h-36 overflow-y-auto custom-scrollbar">
|
||||
متن جهت خواندن
|
||||
</div>
|
||||
|
||||
<div class="flex gap-3">
|
||||
<button id="recordBtn" onclick="toggleRecordTimer()" class="flex-1 bg-red-600 text-white font-bold text-xs py-2.5 rounded-xl hover:bg-red-700 flex items-center justify-center gap-2 shadow-xs transition">
|
||||
<div class="w-2.5 h-2.5 rounded-full bg-white animate-pulse"></div>
|
||||
<span id="recordBtnText">شروع تمرین ضبط</span>
|
||||
</button>
|
||||
<button onclick="closePracticeModal()" class="px-5 bg-slate-100 text-slate-700 font-bold text-xs rounded-xl hover:bg-slate-200 transition">
|
||||
بستن
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- لایه ۵: توست نوتیفیکیشن اختصاصی -->
|
||||
<div id="toastNotification" class="fixed bottom-6 right-6 z-50 bg-slate-900 text-white text-xs px-4 py-3 rounded-xl shadow-xl flex items-center gap-3 transition-opacity duration-300 opacity-0 pointer-events-none">
|
||||
<svg class="w-4 h-4 text-emerald-400 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
|
||||
</svg>
|
||||
<span id="toastMessage">پیام سیستم</span>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// دادههای رسمی استخراجشده از شیت ۵ فایل اکسل CRM_Ekeepa_Upgraded_v14.xlsx
|
||||
const scenarios = [
|
||||
{
|
||||
id: "SMS-01",
|
||||
category: "operational",
|
||||
objection: "سانس پر داریم / نیاز نداریم",
|
||||
channel: "SMS / Voice",
|
||||
sms: "سلام، برای پر کردن سانسهای خالی شنبه تا دوشنبه وقت دارید؟",
|
||||
length: 59,
|
||||
voice: "سلام جناب [نام]، ارادت. کاملاً در جریانم که آخر هفتههاتون همیشه پره و دمتون گرم. دقیقاً تماس من برای این بود که سانسهای شنبه تا دوشنبه ساعت ۳ تا ۷ که معمولاً خالی میمونه رو با پلن اختصاصی اکیپا زنده کنیم بدون اینکه به سانسهای پرتون دست بزنیم. وویس کوتاه دادم وقتتون گرفته نشه.",
|
||||
hook: "تفکیک هوشمندانه سانسهای مرده از پر"
|
||||
},
|
||||
{
|
||||
id: "SMS-02",
|
||||
category: "operational",
|
||||
objection: "تداخل با پنل یا سایت دیگر",
|
||||
channel: "SMS / Voice",
|
||||
sms: "تداخل صفر: سانسهای اکیپا با هماهنگی تلفنی شما باز میشود.",
|
||||
length: 58,
|
||||
voice: "سلام وقت بخیر. کاملاً نگرانیتون بابت تداخل سانس با سایت یا پنل دیگهتون درسته. ما برای حل این موضوع، سیستم رزرو رو جوری تنظیم کردیم که هر رزروی اول به تایید گیممستر یا پیامک شما برسه یا فقط سانسهای کاملاً مرده براتون باز بشه. هیچ ریسک تداخلی وجود نداره.",
|
||||
hook: "خنثی کردن ترس از ناهماهنگی و جریمه"
|
||||
},
|
||||
{
|
||||
id: "SMS-03",
|
||||
category: "financial",
|
||||
objection: "تاخیر تسویه و بدحسابی قبلیها",
|
||||
channel: "SMS / Voice",
|
||||
sms: "تسویه ۴۸ ساعته مستقیم به شبا با ضمانت کتبی اکیپا.",
|
||||
length: 50,
|
||||
voice: "سلام مهندس وقتتون بخیر. میدونم متاسفانه بعضی پلتفرمها تو تسویه بدقولی کردن و حق دارید نگران باشید. اکیپا سیستم تسویه اتوماتیک ۴۸ ساعته مستقیم به شماره شبای خودتون داره و این موضوع توی تفاهمنامه مکتوب قید شده. خیالتون از بابت نقدشوندگی ۱۰۰٪ راحت باشه.",
|
||||
hook: "ایجاد اعتماد مالی بیقیدوشرط"
|
||||
},
|
||||
{
|
||||
id: "SMS-04",
|
||||
category: "financial",
|
||||
objection: "کارمزد و درصد بالاست",
|
||||
channel: "SMS / Voice",
|
||||
sms: "کارمزد صفر از سانس پر؛ کارمزد فقط از سانس مرده زنده شده.",
|
||||
length: 58,
|
||||
voice: "درود بر شما. فقط یه نکته کوتاه خواستم عرض کنم: ما از سانسهای پر و مشتریهای حضوری خودتون یک ریال هم کارمزد نمیگیریم. کارمزد اکیپا فقط و فقط زمانیه که یه سانس کاملاً خالی وسط هفته که هیچکس نمیخرید رو براتون پر کنیم؛ یعنی درآمد خالص جدید منهای کارمزد.",
|
||||
hook: "تبدیل هزینه به سود خالص مازاد"
|
||||
},
|
||||
{
|
||||
id: "SMS-05",
|
||||
category: "process",
|
||||
objection: "فرآیند ثبتنام طولانی است",
|
||||
channel: "SMS / Voice",
|
||||
sms: "ثبتنام ۳ دقیقهای: فقط نام، شبا و لینک بازی را بفرستید.",
|
||||
length: 54,
|
||||
voice: "سلام جناب [نام]. میدونم سرتون خیلی شلوغه و اصلاً نیازی به پر کردن فرمهای طولانی و مدارک پیچیده نیست. بچههای ما تمام محتوا و عکسهای بازیتون رو از اینستاگرامتون ست میکنن. شما فقط شماره شبا و اسم بازیها رو بفرستید، صفحه امروز حاضره.",
|
||||
hook: "حذف اصطکاک ثبتنام به صفر"
|
||||
},
|
||||
{
|
||||
id: "SMS-06",
|
||||
category: "process",
|
||||
objection: "نیاز به هماهنگی با شریک",
|
||||
channel: "SMS / Voice",
|
||||
sms: "گزارش ۱ صفحهای درآمد مازاد منطقه برای شریکتان ارسال شد.",
|
||||
length: 59,
|
||||
voice: "سلام وقت بخیر. کاملاً منطقیه که با شریک محترمتون هماهنگ کنید. من یه فایل مقایسه یکصفحهای درآمد مازاد سانسهای مرده آماده کردم که دقیقاً به زبان عدد و رقم نشون میده ماهانه چقدر سود خالص اضافه میشه. فایل رو براتون فرستادم تا بتونید با شریکتون بررسی بفرمایید.",
|
||||
hook: "تسهیل تصمیمگیری میانشرکایی"
|
||||
}
|
||||
];
|
||||
|
||||
let currentActiveScenario = scenarios[0];
|
||||
let recordInterval = null;
|
||||
let timerVal = 30;
|
||||
let isRecording = false;
|
||||
|
||||
// رندر کارتهای سناریو
|
||||
function renderCards(items) {
|
||||
const grid = document.getElementById("cardsGrid");
|
||||
grid.innerHTML = "";
|
||||
|
||||
items.forEach(sc => {
|
||||
const card = document.createElement("div");
|
||||
card.className = "bg-white rounded-2xl border border-slate-200/90 p-5 shadow-xs hover:shadow-md transition flex flex-col justify-between";
|
||||
card.innerHTML = `
|
||||
<div>
|
||||
<div class="flex items-center justify-between mb-2">
|
||||
<span class="text-xs font-black text-indigo-700 bg-indigo-50 px-2.5 py-1 rounded-lg border border-indigo-100">${sc.id}</span>
|
||||
<span class="text-[11px] font-bold text-emerald-700 bg-emerald-50 px-2 py-0.5 rounded-full border border-emerald-100">${sc.length} کاراکتر (۱ پارت)</span>
|
||||
</div>
|
||||
|
||||
<h3 class="text-sm font-black text-slate-900 mt-2">${sc.objection}</h3>
|
||||
|
||||
<div class="mt-3 bg-slate-50 p-3 rounded-xl border border-slate-200/80">
|
||||
<div class="text-[10px] font-bold text-slate-400 mb-1">متن پیامک آماده (SMS):</div>
|
||||
<p class="text-xs text-slate-800 leading-relaxed font-medium">${sc.sms}</p>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 bg-indigo-50/40 p-3 rounded-xl border border-indigo-50">
|
||||
<div class="text-[10px] font-bold text-indigo-700 mb-1">قلاب وویس ۳۰ ثانیهای:</div>
|
||||
<p class="text-[11px] text-slate-600 line-clamp-3 leading-relaxed">${sc.voice}</p>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 flex items-center gap-1.5 text-[11px] text-amber-700 bg-amber-50/80 px-2.5 py-1.5 rounded-lg border border-amber-100">
|
||||
<svg class="w-3.5 h-3.5 shrink-0" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path d="M11 3a1 1 0 10-2 0v1a1 1 0 102 0V3zM15.657 5.757a1 1 0 00-1.414-1.414l-.707.707a1 1 0 001.414 1.414l.707-.707zM18 10a1 1 0 01-1 1h-1a1 1 0 110-2h1a1 1 0 011 1zM5.05 6.464A1 1 0 106.464 5.05l-.707-.707a1 1 0 00-1.414 1.414l.707.707zM5 10a1 1 0 01-1 1H3a1 1 0 110-2h1a1 1 0 011 1zM8 16v-1h4v1a2 2 0 11-4 0zM12 14c.015-.34.208-.646.477-.859a4 4 0 10-4.954 0c.27.213.462.519.476.859h4.001z" />
|
||||
</svg>
|
||||
<span class="truncate">هدف: ${sc.hook}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-5 pt-3 border-t border-slate-100 flex items-center gap-2">
|
||||
<button onclick="copySMS('${sc.id}')" class="flex-1 bg-slate-100 hover:bg-slate-200 text-slate-800 font-bold text-xs py-2 rounded-xl transition flex items-center justify-center gap-1">
|
||||
<svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3" />
|
||||
</svg>
|
||||
<span>کپی SMS</span>
|
||||
</button>
|
||||
<button onclick="openDrawerWithScenario('${sc.id}')" class="px-3 bg-indigo-600 hover:bg-indigo-700 text-white font-bold text-xs py-2 rounded-xl transition">
|
||||
ارسال و ادیتور
|
||||
</button>
|
||||
</div>
|
||||
`;
|
||||
grid.appendChild(card);
|
||||
});
|
||||
}
|
||||
|
||||
// فیلتر بر اساس دستهبندی
|
||||
function filterCategory(cat) {
|
||||
document.querySelectorAll(".cat-btn").forEach(btn => {
|
||||
btn.classList.remove("bg-indigo-600", "text-white");
|
||||
btn.classList.add("bg-white", "text-slate-600");
|
||||
});
|
||||
event.target.classList.remove("bg-white", "text-slate-600");
|
||||
event.target.classList.add("bg-indigo-600", "text-white");
|
||||
|
||||
if (cat === "all") {
|
||||
renderCards(scenarios);
|
||||
} else {
|
||||
renderCards(scenarios.filter(s => s.category === cat));
|
||||
}
|
||||
}
|
||||
|
||||
// جستجوی زنده
|
||||
function filterCards() {
|
||||
const q = document.getElementById("searchInput").value.toLowerCase().trim();
|
||||
const filtered = scenarios.filter(s =>
|
||||
s.objection.toLowerCase().includes(q) ||
|
||||
s.sms.toLowerCase().includes(q) ||
|
||||
s.voice.toLowerCase().includes(q) ||
|
||||
s.hook.toLowerCase().includes(q) ||
|
||||
s.id.toLowerCase().includes(q)
|
||||
);
|
||||
renderCards(filtered);
|
||||
}
|
||||
|
||||
// باز کردن کشو با سناریوی مشخص
|
||||
function openDrawerWithScenario(id) {
|
||||
const sc = scenarios.find(s => s.id === id);
|
||||
if (!sc) return;
|
||||
currentActiveScenario = sc;
|
||||
|
||||
document.getElementById("drawerBadge").textContent = sc.id;
|
||||
document.getElementById("drawerTitle").textContent = sc.objection;
|
||||
document.getElementById("drawerHook").textContent = "هدف روانشناختی: " + sc.hook;
|
||||
document.getElementById("smsEditorText").value = sc.sms;
|
||||
document.getElementById("voiceScriptBox").textContent = sc.voice;
|
||||
|
||||
updateCharCount();
|
||||
|
||||
const drawer = document.getElementById("sideDrawer");
|
||||
drawer.classList.add("active");
|
||||
}
|
||||
|
||||
function closeDrawer() {
|
||||
const drawer = document.getElementById("sideDrawer");
|
||||
drawer.classList.remove("active");
|
||||
}
|
||||
|
||||
// بروزرسانی شمارشگر کاراکتر
|
||||
function updateCharCount() {
|
||||
const text = document.getElementById("smsEditorText").value;
|
||||
const count = text.length;
|
||||
const counterEl = document.getElementById("charCounter");
|
||||
const warningEl = document.getElementById("costWarning");
|
||||
|
||||
counterEl.textContent = `${count} / ۶۵`;
|
||||
|
||||
if (count <= 65) {
|
||||
counterEl.className = "text-xs font-black text-emerald-600 bg-emerald-50 px-2 py-0.5 rounded-md border border-emerald-200";
|
||||
warningEl.classList.add("hidden");
|
||||
} else {
|
||||
counterEl.className = "text-xs font-black text-red-600 bg-red-50 px-2 py-0.5 rounded-md border border-red-200";
|
||||
warningEl.classList.remove("hidden");
|
||||
}
|
||||
}
|
||||
|
||||
// کپی پیامک از کارت
|
||||
function copySMS(id) {
|
||||
const sc = scenarios.find(s => s.id === id);
|
||||
if (sc) {
|
||||
navigator.clipboard.writeText(sc.sms);
|
||||
showToast(`متن پیامک سناریوی ${sc.id} با موفقیت کپی شد.`);
|
||||
}
|
||||
}
|
||||
|
||||
// کپی پیامک از ادیتور
|
||||
function copyEditedSMS() {
|
||||
const text = document.getElementById("smsEditorText").value;
|
||||
navigator.clipboard.writeText(text);
|
||||
showToast("متن پیامک ویرایششده کپی شد.");
|
||||
}
|
||||
|
||||
// کپی متن اسکریپت صوتی
|
||||
function copyVoiceScriptText() {
|
||||
const text = document.getElementById("voiceScriptBox").textContent;
|
||||
navigator.clipboard.writeText(text);
|
||||
showToast("اسکریپت پیام صوتی کپی شد.");
|
||||
}
|
||||
|
||||
// شبیهسازی ارسال با وبهوک
|
||||
function simulateSendSMS() {
|
||||
showToast("درخواست وبهوک پیامک به سامانه اکیپا ارسال گردید.");
|
||||
}
|
||||
|
||||
// جایگزینی نام لید
|
||||
function applyLeadTokens() {
|
||||
const sel = document.getElementById("leadSelector").value;
|
||||
let name = "مهندس افشار";
|
||||
if (sel === "lead2") name = "آقای سلیمانی";
|
||||
if (sel === "lead3") name = "سرکار خانم کریمی";
|
||||
if (sel === "lead4") name = "مهندس رضوانی";
|
||||
|
||||
let voice = currentActiveScenario.voice.replace(/\[نام\]/g, name);
|
||||
document.getElementById("voiceScriptBox").textContent = voice;
|
||||
}
|
||||
|
||||
// مودال استودیو تمرین وویس
|
||||
function openPracticeModalFromDrawer() {
|
||||
document.getElementById("practiceScriptText").textContent = document.getElementById("voiceScriptBox").textContent;
|
||||
document.getElementById("practiceModal").classList.remove("hidden");
|
||||
resetTimer();
|
||||
}
|
||||
|
||||
function closePracticeModal() {
|
||||
clearInterval(recordInterval);
|
||||
isRecording = false;
|
||||
document.getElementById("practiceModal").classList.add("hidden");
|
||||
}
|
||||
|
||||
function resetTimer() {
|
||||
clearInterval(recordInterval);
|
||||
isRecording = false;
|
||||
timerVal = 30;
|
||||
document.getElementById("timerSeconds").textContent = "30";
|
||||
document.getElementById("recordBtnText").textContent = "شروع تمرین ضبط";
|
||||
document.getElementById("recordBtn").className = "flex-1 bg-red-600 text-white font-bold text-xs py-2.5 rounded-xl hover:bg-red-700 flex items-center justify-center gap-2 shadow-xs transition";
|
||||
}
|
||||
|
||||
function toggleRecordTimer() {
|
||||
if (!isRecording) {
|
||||
isRecording = true;
|
||||
document.getElementById("recordBtnText").textContent = "توقف ضبط";
|
||||
document.getElementById("recordBtn").className = "flex-1 bg-slate-800 text-white font-bold text-xs py-2.5 rounded-xl hover:bg-slate-900 flex items-center justify-center gap-2 shadow-xs transition";
|
||||
|
||||
recordInterval = setInterval(() => {
|
||||
timerVal--;
|
||||
document.getElementById("timerSeconds").textContent = timerVal;
|
||||
if (timerVal <= 0) {
|
||||
clearInterval(recordInterval);
|
||||
isRecording = false;
|
||||
showToast("زمان ۳۰ ثانیهای ویس به پایان رسید.");
|
||||
resetTimer();
|
||||
}
|
||||
}, 1000);
|
||||
} else {
|
||||
resetTimer();
|
||||
showToast("ضبط متوقف شد.");
|
||||
}
|
||||
}
|
||||
|
||||
function openCustomizerModal() {
|
||||
openDrawerWithScenario("SMS-01");
|
||||
}
|
||||
|
||||
// توست اعلان
|
||||
function showToast(msg) {
|
||||
const toast = document.getElementById("toastNotification");
|
||||
document.getElementById("toastMessage").textContent = msg;
|
||||
toast.classList.remove("opacity-0", "pointer-events-none");
|
||||
setTimeout(() => {
|
||||
toast.classList.add("opacity-0", "pointer-events-none");
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
// کلید میانبر Esc
|
||||
document.addEventListener("keydown", function(e) {
|
||||
if (e.key === "Escape" || e.keyCode === 27) {
|
||||
closeDrawer();
|
||||
closePracticeModal();
|
||||
}
|
||||
});
|
||||
|
||||
// شروع
|
||||
renderCards(scenarios);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
690
dashboards/crm-messaging.html
Normal file
690
dashboards/crm-messaging.html
Normal file
|
|
@ -0,0 +1,690 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fa" dir="rtl">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>اکیپا CRM • بانک پیامکها و اسکریپتهای صوتی</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet">
|
||||
<script>
|
||||
tailwind.config = {
|
||||
theme: {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
sans: ['Vazirmatn', 'sans-serif'],
|
||||
},
|
||||
colors: {
|
||||
brand: {
|
||||
50: '#eef2ff',
|
||||
100: '#e0e7ff',
|
||||
500: '#6366f1',
|
||||
600: '#4f46e5',
|
||||
700: '#4338ca',
|
||||
900: '#312e81',
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Vazirmatn', sans-serif;
|
||||
font-feature-settings: "tnum";
|
||||
background-color: #f8fafc;
|
||||
color: #0f172a;
|
||||
}
|
||||
/* استایل کشو برای جلوگیری از باگ گیر کردن در حالت RTL */
|
||||
#sideDrawer {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 50;
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
#sideDrawer.active {
|
||||
display: flex;
|
||||
}
|
||||
.custom-scrollbar::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
}
|
||||
.custom-scrollbar::-webkit-scrollbar-track {
|
||||
background: #f1f5f9;
|
||||
}
|
||||
.custom-scrollbar::-webkit-scrollbar-thumb {
|
||||
background: #cbd5e1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
|
||||
background: #94a3b8;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="bg-slate-50 min-h-screen text-slate-800 flex overflow-hidden">
|
||||
|
||||
<!-- لایه ۱: سایدبار راست ناوبری ۲۴۰ پیکسل -->
|
||||
<aside class="w-60 bg-white border-l border-slate-200 flex flex-col justify-between shrink-0 h-screen select-none z-20">
|
||||
<div>
|
||||
<!-- برند و لوگو -->
|
||||
<div class="h-16 flex items-center px-5 border-b border-slate-100 gap-3">
|
||||
<div class="w-9 h-9 rounded-xl bg-gradient-to-tr from-indigo-600 to-indigo-500 flex items-center justify-center text-white font-black text-lg shadow-md shadow-indigo-100">
|
||||
E
|
||||
</div>
|
||||
<div>
|
||||
<div class="font-bold text-slate-900 text-base leading-tight">اکیپا CRM</div>
|
||||
<div class="text-xs text-slate-400 font-medium">ماژول فروش B2B</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- منوی سایدبار -->
|
||||
<nav class="p-3 space-y-1 text-sm font-medium">
|
||||
<a href="crm_pipeline_base.html" class="flex items-center gap-3 px-3 py-2.5 rounded-xl text-slate-600 hover:bg-slate-50 transition">
|
||||
<svg class="w-5 h-5 text-slate-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
|
||||
</svg>
|
||||
<span>پایپلاین جذب مجموعهها</span>
|
||||
</a>
|
||||
|
||||
<a href="crm_retention_onboarding.html" class="flex items-center gap-3 px-3 py-2.5 rounded-xl text-slate-600 hover:bg-slate-50 transition">
|
||||
<svg class="w-5 h-5 text-slate-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
|
||||
</svg>
|
||||
<span>نگهداشت و آنبوردینگ</span>
|
||||
</a>
|
||||
|
||||
<a href="crm_cadence_silence.html" class="flex items-center gap-3 px-3 py-2.5 rounded-xl text-slate-600 hover:bg-slate-50 transition">
|
||||
<svg class="w-5 h-5 text-slate-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
<span>پروتکل پیگیری و سکوت</span>
|
||||
</a>
|
||||
|
||||
<a href="#" class="flex items-center gap-3 px-3 py-2.5 rounded-xl bg-indigo-50 text-indigo-700 font-semibold shadow-sm">
|
||||
<svg class="w-5 h-5 text-indigo-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z" />
|
||||
</svg>
|
||||
<span>پیامکها و اسکریپت ویس</span>
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<!-- اطلاعات پنل کارشناس -->
|
||||
<div class="p-3 border-t border-slate-100">
|
||||
<div class="bg-slate-50 rounded-xl p-3 flex items-center justify-between">
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="w-8 h-8 rounded-full bg-indigo-100 text-indigo-600 flex items-center justify-center font-bold text-xs">
|
||||
دا
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-xs font-bold text-slate-800">دارا حسینی</div>
|
||||
<div class="text-[10px] text-slate-400">کارشناس جذب اکیپا</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-2 h-2 rounded-full bg-emerald-500"></div>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<!-- ستون اصلی محتوا -->
|
||||
<div class="flex-1 flex flex-col h-screen overflow-hidden">
|
||||
|
||||
<!-- هدر بالای صفحه -->
|
||||
<header class="h-16 bg-white border-b border-slate-200 px-6 flex items-center justify-between shrink-0">
|
||||
<div class="flex items-center gap-4">
|
||||
<h1 class="text-lg font-black text-slate-900">بانک پیامکهای مهندسیشده و اسکریپتهای صوتی</h1>
|
||||
<span class="text-xs bg-indigo-100 text-indigo-700 px-2.5 py-1 rounded-full font-bold">شیت ۵ فایل مرجع v14</span>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-3">
|
||||
<div class="relative">
|
||||
<input id="searchInput" type="text" placeholder="جستجو در سناریوها، متن پیام یا مانع..." onkeyup="filterCards()"
|
||||
class="text-xs border border-slate-200 rounded-xl pr-9 pl-4 py-2 w-72 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition">
|
||||
<svg class="w-4 h-4 text-slate-400 absolute right-3 top-2.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<button onclick="openCustomizerModal()" class="flex items-center gap-2 text-xs bg-indigo-600 text-white font-bold px-4 py-2 rounded-xl hover:bg-indigo-700 shadow-sm transition">
|
||||
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" />
|
||||
</svg>
|
||||
<span>شخصیسازی سریع پیام</span>
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- لایه ۲: کاکپیت تحلیلی و کارتهای ۶ سناریو -->
|
||||
<main class="flex-1 overflow-y-auto p-6 space-y-6 custom-scrollbar">
|
||||
|
||||
<!-- ۳ کارت خلاصه شاخصها -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
|
||||
<div class="bg-white p-4 rounded-2xl border border-slate-200/80 shadow-xs flex items-center justify-between">
|
||||
<div>
|
||||
<div class="text-xs font-semibold text-slate-400">تعداد کل سناریوها</div>
|
||||
<div class="text-xl font-black text-slate-900 mt-1">۶ سناریو</div>
|
||||
<div class="text-[11px] text-emerald-600 font-medium mt-0.5">پوشش ۱۰۰٪ اعتراضات متداول</div>
|
||||
</div>
|
||||
<div class="w-10 h-10 rounded-xl bg-indigo-50 text-indigo-600 flex items-center justify-center font-bold">
|
||||
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11H5m14 0a2 2 0 012 2v6a2 2 0 01-2 2H5a2 2 0 01-2-2v-6a2 2 0 012-2m14 0V9a2 2 0 00-2-2M5 11V9a2 2 0 012-2m0 0V5a2 2 0 012-2h6a2 2 0 012 2v2M7 7h10" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-white p-4 rounded-2xl border border-slate-200/80 shadow-xs flex items-center justify-between">
|
||||
<div>
|
||||
<div class="text-xs font-semibold text-slate-400">طول میانگین پیامکها</div>
|
||||
<div class="text-xl font-black text-slate-900 mt-1">۵۵.۶ کاراکتر</div>
|
||||
<div class="text-[11px] text-emerald-600 font-medium mt-0.5">۱۰۰٪ تکپارت (زیر ۶۵ کاراکتر)</div>
|
||||
</div>
|
||||
<div class="w-10 h-10 rounded-xl bg-emerald-50 text-emerald-600 flex items-center justify-center font-bold">
|
||||
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-white p-4 rounded-2xl border border-slate-200/80 shadow-xs flex items-center justify-between">
|
||||
<div>
|
||||
<div class="text-xs font-semibold text-slate-400">میانگین زمان وویسها</div>
|
||||
<div class="text-xl font-black text-slate-900 mt-1">۲۸ ثانیه</div>
|
||||
<div class="text-[11px] text-indigo-600 font-medium mt-0.5">استاندارد طلایی شنیده شدن</div>
|
||||
</div>
|
||||
<div class="w-10 h-10 rounded-xl bg-purple-50 text-purple-600 flex items-center justify-center font-bold">
|
||||
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 100-6 3 3 0 000 6z" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-white p-4 rounded-2xl border border-slate-200/80 shadow-xs flex items-center justify-between">
|
||||
<div>
|
||||
<div class="text-xs font-semibold text-slate-400">نرخ تبدیل لیدهای سرد</div>
|
||||
<div class="text-xl font-black text-slate-900 mt-1">۴۲٪</div>
|
||||
<div class="text-[11px] text-amber-600 font-medium mt-0.5">واکنش مثبت به قلابهای شیت ۵</div>
|
||||
</div>
|
||||
<div class="w-10 h-10 rounded-xl bg-amber-50 text-amber-600 flex items-center justify-center font-bold">
|
||||
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- فیلتر سریع دستهها -->
|
||||
<div class="flex items-center gap-2 border-b border-slate-200 pb-3">
|
||||
<button onclick="filterCategory('all')" class="cat-btn px-4 py-1.5 rounded-xl text-xs font-bold bg-indigo-600 text-white shadow-xs">همه سناریوها (۶)</button>
|
||||
<button onclick="filterCategory('operational')" class="cat-btn px-4 py-1.5 rounded-xl text-xs font-bold bg-white text-slate-600 hover:bg-slate-100 border border-slate-200">عملیاتی و تداخل (۲)</button>
|
||||
<button onclick="filterCategory('financial')" class="cat-btn px-4 py-1.5 rounded-xl text-xs font-bold bg-white text-slate-600 hover:bg-slate-100 border border-slate-200">مالی و کارمزد (۲)</button>
|
||||
<button onclick="filterCategory('process')" class="cat-btn px-4 py-1.5 rounded-xl text-xs font-bold bg-white text-slate-600 hover:bg-slate-100 border border-slate-200">ثبتنام و شرکا (۲)</button>
|
||||
</div>
|
||||
|
||||
<!-- شبکه کارتهای ۶ سناریو -->
|
||||
<div id="cardsGrid" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5">
|
||||
<!-- کارتها توسط JS رندر میشوند -->
|
||||
</div>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<!-- لایه ۳: کشوی جزئیات، شخصیسازی و ادیتور لید (Side Drawer - 420px) -->
|
||||
<div id="sideDrawer">
|
||||
<!-- پسزمینه نیمهشفاف -->
|
||||
<div onclick="closeDrawer()" class="fixed inset-0 bg-slate-900/40 backdrop-blur-xs transition-opacity"></div>
|
||||
|
||||
<!-- بدنه کشو -->
|
||||
<div class="relative w-[430px] bg-white h-full shadow-2xl flex flex-col z-10 border-r border-slate-200">
|
||||
<div class="p-5 border-b border-slate-200 flex items-center justify-between bg-slate-50">
|
||||
<div>
|
||||
<div class="flex items-center gap-2">
|
||||
<span id="drawerBadge" class="text-xs font-extrabold px-2 py-0.5 rounded bg-indigo-100 text-indigo-700">SMS-01</span>
|
||||
<h3 id="drawerTitle" class="text-sm font-black text-slate-900">عنوان سناریو</h3>
|
||||
</div>
|
||||
<p id="drawerHook" class="text-xs text-slate-500 mt-1">قلاب روانشناختی</p>
|
||||
</div>
|
||||
<button onclick="closeDrawer()" class="text-slate-400 hover:text-slate-600 p-1 rounded-lg">
|
||||
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="flex-1 overflow-y-auto p-5 space-y-5 custom-scrollbar">
|
||||
<!-- انتخاب لید جهت جایگزینی نام -->
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-slate-700 mb-1.5">انتخاب لید جهت شخصیسازی خودکار:</label>
|
||||
<select id="leadSelector" onchange="applyLeadTokens()" class="w-full text-xs border border-slate-200 rounded-xl p-2.5 focus:ring-2 focus:ring-indigo-500 focus:outline-none">
|
||||
<option value="lead1">مجموعه اسکیپ روم طهران (مالک: مهندس افشار)</option>
|
||||
<option value="lead2">اتاق فرار انیگما کرج (مالک: آقای سلیمانی)</option>
|
||||
<option value="lead3">اسکیپ روم زال شیراز (مالک: سرکار خانم کریمی)</option>
|
||||
<option value="lead4">مجموعه راز اصفهان (مالک: مهندس رضوانی)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- ادیتور متن پیامک با کاراکترشمار هوشمند -->
|
||||
<div class="bg-slate-50 p-4 rounded-xl border border-slate-200">
|
||||
<div class="flex items-center justify-between mb-2">
|
||||
<span class="text-xs font-bold text-slate-800">متن پیامک (زیر ۶۵ کاراکتر)</span>
|
||||
<span id="charCounter" class="text-xs font-black text-emerald-600 bg-emerald-50 px-2 py-0.5 rounded-md border border-emerald-200">۵۹ / ۶۵</span>
|
||||
</div>
|
||||
<textarea id="smsEditorText" rows="3" oninput="updateCharCount()" class="w-full text-xs border border-slate-200 rounded-xl p-3 focus:outline-none focus:ring-2 focus:ring-indigo-500 bg-white leading-relaxed text-slate-800"></textarea>
|
||||
|
||||
<div id="costWarning" class="hidden mt-2 text-[11px] text-amber-700 bg-amber-50 p-2 rounded-lg border border-amber-200 flex items-center gap-1.5">
|
||||
<svg class="w-4 h-4 text-amber-600 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
|
||||
</svg>
|
||||
<span>طول پیام از ۶۵ کاراکتر گذشت و وارد پارت دوم مخابراتی شد.</span>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 flex gap-2">
|
||||
<button onclick="copyEditedSMS()" class="flex-1 bg-indigo-600 text-white font-bold text-xs py-2 rounded-xl hover:bg-indigo-700 flex items-center justify-center gap-1.5 transition">
|
||||
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3" />
|
||||
</svg>
|
||||
<span>کپی متن پیامک</span>
|
||||
</button>
|
||||
<button onclick="simulateSendSMS()" class="px-3 bg-white border border-slate-200 text-slate-700 font-bold text-xs rounded-xl hover:bg-slate-50 transition">
|
||||
ارسال وبهوک
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- اسکریپت صوتی ۳۰ ثانیهای و نکات بیان -->
|
||||
<div class="bg-indigo-50/50 p-4 rounded-xl border border-indigo-100">
|
||||
<div class="flex items-center justify-between mb-2">
|
||||
<span class="text-xs font-bold text-indigo-900">اسکریپت پیام صوتی ۳۰ ثانیهای (بله / تلگرام)</span>
|
||||
<span class="text-[10px] bg-indigo-100 text-indigo-700 px-2 py-0.5 rounded font-bold">لحن مشاورهای</span>
|
||||
</div>
|
||||
<div id="voiceScriptBox" class="text-xs leading-relaxed text-slate-700 bg-white p-3 rounded-xl border border-indigo-100/80">
|
||||
متن ویس صوتی
|
||||
</div>
|
||||
|
||||
<div class="mt-3 flex items-center justify-between">
|
||||
<button onclick="openPracticeModalFromDrawer()" class="text-xs bg-indigo-600 text-white font-bold px-3 py-1.5 rounded-lg hover:bg-indigo-700 transition flex items-center gap-1.5">
|
||||
<svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z" />
|
||||
</svg>
|
||||
<span>تمرین و ضبط الگو</span>
|
||||
</button>
|
||||
<button onclick="copyVoiceScriptText()" class="text-xs text-indigo-600 font-bold hover:underline">
|
||||
کپی متن ویس
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ترفندهای زبان بدن و تن صدا -->
|
||||
<div class="bg-slate-50 p-3.5 rounded-xl border border-slate-200 text-xs space-y-1.5 text-slate-600">
|
||||
<div class="font-bold text-slate-800 text-[11px] flex items-center gap-1">
|
||||
<svg class="w-3.5 h-3.5 text-amber-500" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path d="M11 3a1 1 0 10-2 0v1a1 1 0 102 0V3zM15.657 5.757a1 1 0 00-1.414-1.414l-.707.707a1 1 0 001.414 1.414l.707-.707zM18 10a1 1 0 01-1 1h-1a1 1 0 110-2h1a1 1 0 011 1zM5.05 6.464A1 1 0 106.464 5.05l-.707-.707a1 1 0 00-1.414 1.414l.707.707zM5 10a1 1 0 01-1 1H3a1 1 0 110-2h1a1 1 0 011 1zM8 16v-1h4v1a2 2 0 11-4 0zM12 14c.015-.34.208-.646.477-.859a4 4 0 10-4.954 0c.27.213.462.519.476.859h4.001z" />
|
||||
</svg>
|
||||
<span>اصول ادای این وویس:</span>
|
||||
</div>
|
||||
<p>• ثانیههای ۱ تا ۵: ریتم سریع و پرانرژی جهت جلوگیری از اسکیپ کردن وویس.</p>
|
||||
<p>• ثانیههای ۱۵ تا ۲۰: مکث ۲ ثانیهای روی عدد تسویه یا درصد سانس مرده.</p>
|
||||
<p>• جمله آخر: حتماً بگویید «وویس کوتاه دادم وقتتون گرفته نشه».</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- لایه ۴: مودال تمرین و تایمر ۳۰ ثانیهای وویس -->
|
||||
<div id="practiceModal" class="hidden fixed inset-0 z-50 flex items-center justify-center p-4">
|
||||
<div onclick="closePracticeModal()" class="fixed inset-0 bg-slate-900/50 backdrop-blur-xs"></div>
|
||||
<div class="relative bg-white rounded-2xl w-full max-w-lg p-6 shadow-2xl z-10 border border-slate-200">
|
||||
<div class="flex items-center justify-between border-b border-slate-100 pb-3 mb-4">
|
||||
<h3 class="font-bold text-slate-900 text-sm flex items-center gap-2">
|
||||
<svg class="w-5 h-5 text-indigo-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 100-6 3 3 0 000 6z" />
|
||||
</svg>
|
||||
<span>استودیوی تمرین وویس ۳۰ ثانیهای</span>
|
||||
</h3>
|
||||
<button onclick="closePracticeModal()" class="text-slate-400 hover:text-slate-600">
|
||||
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- تایمر دایرهای معکوس ۳۰ ثانیه -->
|
||||
<div class="flex flex-col items-center justify-center my-4">
|
||||
<div class="relative w-28 h-28 flex items-center justify-center">
|
||||
<div id="timerCircle" class="w-24 h-24 rounded-full border-4 border-indigo-600 flex items-center justify-center bg-indigo-50">
|
||||
<span id="timerSeconds" class="text-2xl font-black text-indigo-700">30</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-xs text-slate-500 font-medium mt-2">مدت زمان استاندارد ضبط برای مالک</div>
|
||||
</div>
|
||||
|
||||
<!-- متن پاراگراف جهت خواندن -->
|
||||
<div id="practiceScriptText" class="bg-slate-50 p-4 rounded-xl text-xs leading-relaxed text-slate-800 border border-slate-200 mb-4 max-h-36 overflow-y-auto custom-scrollbar">
|
||||
متن جهت خواندن
|
||||
</div>
|
||||
|
||||
<div class="flex gap-3">
|
||||
<button id="recordBtn" onclick="toggleRecordTimer()" class="flex-1 bg-red-600 text-white font-bold text-xs py-2.5 rounded-xl hover:bg-red-700 flex items-center justify-center gap-2 shadow-xs transition">
|
||||
<div class="w-2.5 h-2.5 rounded-full bg-white animate-pulse"></div>
|
||||
<span id="recordBtnText">شروع تمرین ضبط</span>
|
||||
</button>
|
||||
<button onclick="closePracticeModal()" class="px-5 bg-slate-100 text-slate-700 font-bold text-xs rounded-xl hover:bg-slate-200 transition">
|
||||
بستن
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- لایه ۵: توست نوتیفیکیشن اختصاصی -->
|
||||
<div id="toastNotification" class="fixed bottom-6 right-6 z-50 bg-slate-900 text-white text-xs px-4 py-3 rounded-xl shadow-xl flex items-center gap-3 transition-opacity duration-300 opacity-0 pointer-events-none">
|
||||
<svg class="w-4 h-4 text-emerald-400 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" />
|
||||
</svg>
|
||||
<span id="toastMessage">پیام سیستم</span>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// دادههای رسمی استخراجشده از شیت ۵ فایل اکسل CRM_Ekeepa_Upgraded_v14.xlsx
|
||||
const scenarios = [
|
||||
{
|
||||
id: "SMS-01",
|
||||
category: "operational",
|
||||
objection: "سانس پر داریم / نیاز نداریم",
|
||||
channel: "SMS / Voice",
|
||||
sms: "سلام، برای پر کردن سانسهای خالی شنبه تا دوشنبه وقت دارید؟",
|
||||
length: 59,
|
||||
voice: "سلام جناب [نام]، ارادت. کاملاً در جریانم که آخر هفتههاتون همیشه پره و دمتون گرم. دقیقاً تماس من برای این بود که سانسهای شنبه تا دوشنبه ساعت ۳ تا ۷ که معمولاً خالی میمونه رو با پلن اختصاصی اکیپا زنده کنیم بدون اینکه به سانسهای پرتون دست بزنیم. وویس کوتاه دادم وقتتون گرفته نشه.",
|
||||
hook: "تفکیک هوشمندانه سانسهای مرده از پر"
|
||||
},
|
||||
{
|
||||
id: "SMS-02",
|
||||
category: "operational",
|
||||
objection: "تداخل با پنل یا سایت دیگر",
|
||||
channel: "SMS / Voice",
|
||||
sms: "تداخل صفر: سانسهای اکیپا با هماهنگی تلفنی شما باز میشود.",
|
||||
length: 58,
|
||||
voice: "سلام وقت بخیر. کاملاً نگرانیتون بابت تداخل سانس با سایت یا پنل دیگهتون درسته. ما برای حل این موضوع، سیستم رزرو رو جوری تنظیم کردیم که هر رزروی اول به تایید گیممستر یا پیامک شما برسه یا فقط سانسهای کاملاً مرده براتون باز بشه. هیچ ریسک تداخلی وجود نداره.",
|
||||
hook: "خنثی کردن ترس از ناهماهنگی و جریمه"
|
||||
},
|
||||
{
|
||||
id: "SMS-03",
|
||||
category: "financial",
|
||||
objection: "تاخیر تسویه و بدحسابی قبلیها",
|
||||
channel: "SMS / Voice",
|
||||
sms: "تسویه ۴۸ ساعته مستقیم به شبا با ضمانت کتبی اکیپا.",
|
||||
length: 50,
|
||||
voice: "سلام مهندس وقتتون بخیر. میدونم متاسفانه بعضی پلتفرمها تو تسویه بدقولی کردن و حق دارید نگران باشید. اکیپا سیستم تسویه اتوماتیک ۴۸ ساعته مستقیم به شماره شبای خودتون داره و این موضوع توی تفاهمنامه مکتوب قید شده. خیالتون از بابت نقدشوندگی ۱۰۰٪ راحت باشه.",
|
||||
hook: "ایجاد اعتماد مالی بیقیدوشرط"
|
||||
},
|
||||
{
|
||||
id: "SMS-04",
|
||||
category: "financial",
|
||||
objection: "کارمزد و درصد بالاست",
|
||||
channel: "SMS / Voice",
|
||||
sms: "کارمزد صفر از سانس پر؛ کارمزد فقط از سانس مرده زنده شده.",
|
||||
length: 58,
|
||||
voice: "درود بر شما. فقط یه نکته کوتاه خواستم عرض کنم: ما از سانسهای پر و مشتریهای حضوری خودتون یک ریال هم کارمزد نمیگیریم. کارمزد اکیپا فقط و فقط زمانیه که یه سانس کاملاً خالی وسط هفته که هیچکس نمیخرید رو براتون پر کنیم؛ یعنی درآمد خالص جدید منهای کارمزد.",
|
||||
hook: "تبدیل هزینه به سود خالص مازاد"
|
||||
},
|
||||
{
|
||||
id: "SMS-05",
|
||||
category: "process",
|
||||
objection: "فرآیند ثبتنام طولانی است",
|
||||
channel: "SMS / Voice",
|
||||
sms: "ثبتنام ۳ دقیقهای: فقط نام، شبا و لینک بازی را بفرستید.",
|
||||
length: 54,
|
||||
voice: "سلام جناب [نام]. میدونم سرتون خیلی شلوغه و اصلاً نیازی به پر کردن فرمهای طولانی و مدارک پیچیده نیست. بچههای ما تمام محتوا و عکسهای بازیتون رو از اینستاگرامتون ست میکنن. شما فقط شماره شبا و اسم بازیها رو بفرستید، صفحه امروز حاضره.",
|
||||
hook: "حذف اصطکاک ثبتنام به صفر"
|
||||
},
|
||||
{
|
||||
id: "SMS-06",
|
||||
category: "process",
|
||||
objection: "نیاز به هماهنگی با شریک",
|
||||
channel: "SMS / Voice",
|
||||
sms: "گزارش ۱ صفحهای درآمد مازاد منطقه برای شریکتان ارسال شد.",
|
||||
length: 59,
|
||||
voice: "سلام وقت بخیر. کاملاً منطقیه که با شریک محترمتون هماهنگ کنید. من یه فایل مقایسه یکصفحهای درآمد مازاد سانسهای مرده آماده کردم که دقیقاً به زبان عدد و رقم نشون میده ماهانه چقدر سود خالص اضافه میشه. فایل رو براتون فرستادم تا بتونید با شریکتون بررسی بفرمایید.",
|
||||
hook: "تسهیل تصمیمگیری میانشرکایی"
|
||||
}
|
||||
];
|
||||
|
||||
let currentActiveScenario = scenarios[0];
|
||||
let recordInterval = null;
|
||||
let timerVal = 30;
|
||||
let isRecording = false;
|
||||
|
||||
// رندر کارتهای سناریو
|
||||
function renderCards(items) {
|
||||
const grid = document.getElementById("cardsGrid");
|
||||
grid.innerHTML = "";
|
||||
|
||||
items.forEach(sc => {
|
||||
const card = document.createElement("div");
|
||||
card.className = "bg-white rounded-2xl border border-slate-200/90 p-5 shadow-xs hover:shadow-md transition flex flex-col justify-between";
|
||||
card.innerHTML = `
|
||||
<div>
|
||||
<div class="flex items-center justify-between mb-2">
|
||||
<span class="text-xs font-black text-indigo-700 bg-indigo-50 px-2.5 py-1 rounded-lg border border-indigo-100">${sc.id}</span>
|
||||
<span class="text-[11px] font-bold text-emerald-700 bg-emerald-50 px-2 py-0.5 rounded-full border border-emerald-100">${sc.length} کاراکتر (۱ پارت)</span>
|
||||
</div>
|
||||
|
||||
<h3 class="text-sm font-black text-slate-900 mt-2">${sc.objection}</h3>
|
||||
|
||||
<div class="mt-3 bg-slate-50 p-3 rounded-xl border border-slate-200/80">
|
||||
<div class="text-[10px] font-bold text-slate-400 mb-1">متن پیامک آماده (SMS):</div>
|
||||
<p class="text-xs text-slate-800 leading-relaxed font-medium">${sc.sms}</p>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 bg-indigo-50/40 p-3 rounded-xl border border-indigo-50">
|
||||
<div class="text-[10px] font-bold text-indigo-700 mb-1">قلاب وویس ۳۰ ثانیهای:</div>
|
||||
<p class="text-[11px] text-slate-600 line-clamp-3 leading-relaxed">${sc.voice}</p>
|
||||
</div>
|
||||
|
||||
<div class="mt-3 flex items-center gap-1.5 text-[11px] text-amber-700 bg-amber-50/80 px-2.5 py-1.5 rounded-lg border border-amber-100">
|
||||
<svg class="w-3.5 h-3.5 shrink-0" fill="currentColor" viewBox="0 0 20 20">
|
||||
<path d="M11 3a1 1 0 10-2 0v1a1 1 0 102 0V3zM15.657 5.757a1 1 0 00-1.414-1.414l-.707.707a1 1 0 001.414 1.414l.707-.707zM18 10a1 1 0 01-1 1h-1a1 1 0 110-2h1a1 1 0 011 1zM5.05 6.464A1 1 0 106.464 5.05l-.707-.707a1 1 0 00-1.414 1.414l.707.707zM5 10a1 1 0 01-1 1H3a1 1 0 110-2h1a1 1 0 011 1zM8 16v-1h4v1a2 2 0 11-4 0zM12 14c.015-.34.208-.646.477-.859a4 4 0 10-4.954 0c.27.213.462.519.476.859h4.001z" />
|
||||
</svg>
|
||||
<span class="truncate">هدف: ${sc.hook}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-5 pt-3 border-t border-slate-100 flex items-center gap-2">
|
||||
<button onclick="copySMS('${sc.id}')" class="flex-1 bg-slate-100 hover:bg-slate-200 text-slate-800 font-bold text-xs py-2 rounded-xl transition flex items-center justify-center gap-1">
|
||||
<svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3" />
|
||||
</svg>
|
||||
<span>کپی SMS</span>
|
||||
</button>
|
||||
<button onclick="openDrawerWithScenario('${sc.id}')" class="px-3 bg-indigo-600 hover:bg-indigo-700 text-white font-bold text-xs py-2 rounded-xl transition">
|
||||
ارسال و ادیتور
|
||||
</button>
|
||||
</div>
|
||||
`;
|
||||
grid.appendChild(card);
|
||||
});
|
||||
}
|
||||
|
||||
// فیلتر بر اساس دستهبندی
|
||||
function filterCategory(cat) {
|
||||
document.querySelectorAll(".cat-btn").forEach(btn => {
|
||||
btn.classList.remove("bg-indigo-600", "text-white");
|
||||
btn.classList.add("bg-white", "text-slate-600");
|
||||
});
|
||||
event.target.classList.remove("bg-white", "text-slate-600");
|
||||
event.target.classList.add("bg-indigo-600", "text-white");
|
||||
|
||||
if (cat === "all") {
|
||||
renderCards(scenarios);
|
||||
} else {
|
||||
renderCards(scenarios.filter(s => s.category === cat));
|
||||
}
|
||||
}
|
||||
|
||||
// جستجوی زنده
|
||||
function filterCards() {
|
||||
const q = document.getElementById("searchInput").value.toLowerCase().trim();
|
||||
const filtered = scenarios.filter(s =>
|
||||
s.objection.toLowerCase().includes(q) ||
|
||||
s.sms.toLowerCase().includes(q) ||
|
||||
s.voice.toLowerCase().includes(q) ||
|
||||
s.hook.toLowerCase().includes(q) ||
|
||||
s.id.toLowerCase().includes(q)
|
||||
);
|
||||
renderCards(filtered);
|
||||
}
|
||||
|
||||
// باز کردن کشو با سناریوی مشخص
|
||||
function openDrawerWithScenario(id) {
|
||||
const sc = scenarios.find(s => s.id === id);
|
||||
if (!sc) return;
|
||||
currentActiveScenario = sc;
|
||||
|
||||
document.getElementById("drawerBadge").textContent = sc.id;
|
||||
document.getElementById("drawerTitle").textContent = sc.objection;
|
||||
document.getElementById("drawerHook").textContent = "هدف روانشناختی: " + sc.hook;
|
||||
document.getElementById("smsEditorText").value = sc.sms;
|
||||
document.getElementById("voiceScriptBox").textContent = sc.voice;
|
||||
|
||||
updateCharCount();
|
||||
|
||||
const drawer = document.getElementById("sideDrawer");
|
||||
drawer.classList.add("active");
|
||||
}
|
||||
|
||||
function closeDrawer() {
|
||||
const drawer = document.getElementById("sideDrawer");
|
||||
drawer.classList.remove("active");
|
||||
}
|
||||
|
||||
// بروزرسانی شمارشگر کاراکتر
|
||||
function updateCharCount() {
|
||||
const text = document.getElementById("smsEditorText").value;
|
||||
const count = text.length;
|
||||
const counterEl = document.getElementById("charCounter");
|
||||
const warningEl = document.getElementById("costWarning");
|
||||
|
||||
counterEl.textContent = `${count} / ۶۵`;
|
||||
|
||||
if (count <= 65) {
|
||||
counterEl.className = "text-xs font-black text-emerald-600 bg-emerald-50 px-2 py-0.5 rounded-md border border-emerald-200";
|
||||
warningEl.classList.add("hidden");
|
||||
} else {
|
||||
counterEl.className = "text-xs font-black text-red-600 bg-red-50 px-2 py-0.5 rounded-md border border-red-200";
|
||||
warningEl.classList.remove("hidden");
|
||||
}
|
||||
}
|
||||
|
||||
// کپی پیامک از کارت
|
||||
function copySMS(id) {
|
||||
const sc = scenarios.find(s => s.id === id);
|
||||
if (sc) {
|
||||
navigator.clipboard.writeText(sc.sms);
|
||||
showToast(`متن پیامک سناریوی ${sc.id} با موفقیت کپی شد.`);
|
||||
}
|
||||
}
|
||||
|
||||
// کپی پیامک از ادیتور
|
||||
function copyEditedSMS() {
|
||||
const text = document.getElementById("smsEditorText").value;
|
||||
navigator.clipboard.writeText(text);
|
||||
showToast("متن پیامک ویرایششده کپی شد.");
|
||||
}
|
||||
|
||||
// کپی متن اسکریپت صوتی
|
||||
function copyVoiceScriptText() {
|
||||
const text = document.getElementById("voiceScriptBox").textContent;
|
||||
navigator.clipboard.writeText(text);
|
||||
showToast("اسکریپت پیام صوتی کپی شد.");
|
||||
}
|
||||
|
||||
// شبیهسازی ارسال با وبهوک
|
||||
function simulateSendSMS() {
|
||||
showToast("درخواست وبهوک پیامک به سامانه اکیپا ارسال گردید.");
|
||||
}
|
||||
|
||||
// جایگزینی نام لید
|
||||
function applyLeadTokens() {
|
||||
const sel = document.getElementById("leadSelector").value;
|
||||
let name = "مهندس افشار";
|
||||
if (sel === "lead2") name = "آقای سلیمانی";
|
||||
if (sel === "lead3") name = "سرکار خانم کریمی";
|
||||
if (sel === "lead4") name = "مهندس رضوانی";
|
||||
|
||||
let voice = currentActiveScenario.voice.replace(/\[نام\]/g, name);
|
||||
document.getElementById("voiceScriptBox").textContent = voice;
|
||||
}
|
||||
|
||||
// مودال استودیو تمرین وویس
|
||||
function openPracticeModalFromDrawer() {
|
||||
document.getElementById("practiceScriptText").textContent = document.getElementById("voiceScriptBox").textContent;
|
||||
document.getElementById("practiceModal").classList.remove("hidden");
|
||||
resetTimer();
|
||||
}
|
||||
|
||||
function closePracticeModal() {
|
||||
clearInterval(recordInterval);
|
||||
isRecording = false;
|
||||
document.getElementById("practiceModal").classList.add("hidden");
|
||||
}
|
||||
|
||||
function resetTimer() {
|
||||
clearInterval(recordInterval);
|
||||
isRecording = false;
|
||||
timerVal = 30;
|
||||
document.getElementById("timerSeconds").textContent = "30";
|
||||
document.getElementById("recordBtnText").textContent = "شروع تمرین ضبط";
|
||||
document.getElementById("recordBtn").className = "flex-1 bg-red-600 text-white font-bold text-xs py-2.5 rounded-xl hover:bg-red-700 flex items-center justify-center gap-2 shadow-xs transition";
|
||||
}
|
||||
|
||||
function toggleRecordTimer() {
|
||||
if (!isRecording) {
|
||||
isRecording = true;
|
||||
document.getElementById("recordBtnText").textContent = "توقف ضبط";
|
||||
document.getElementById("recordBtn").className = "flex-1 bg-slate-800 text-white font-bold text-xs py-2.5 rounded-xl hover:bg-slate-900 flex items-center justify-center gap-2 shadow-xs transition";
|
||||
|
||||
recordInterval = setInterval(() => {
|
||||
timerVal--;
|
||||
document.getElementById("timerSeconds").textContent = timerVal;
|
||||
if (timerVal <= 0) {
|
||||
clearInterval(recordInterval);
|
||||
isRecording = false;
|
||||
showToast("زمان ۳۰ ثانیهای ویس به پایان رسید.");
|
||||
resetTimer();
|
||||
}
|
||||
}, 1000);
|
||||
} else {
|
||||
resetTimer();
|
||||
showToast("ضبط متوقف شد.");
|
||||
}
|
||||
}
|
||||
|
||||
function openCustomizerModal() {
|
||||
openDrawerWithScenario("SMS-01");
|
||||
}
|
||||
|
||||
// توست اعلان
|
||||
function showToast(msg) {
|
||||
const toast = document.getElementById("toastNotification");
|
||||
document.getElementById("toastMessage").textContent = msg;
|
||||
toast.classList.remove("opacity-0", "pointer-events-none");
|
||||
setTimeout(() => {
|
||||
toast.classList.add("opacity-0", "pointer-events-none");
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
// کلید میانبر Esc
|
||||
document.addEventListener("keydown", function(e) {
|
||||
if (e.key === "Escape" || e.keyCode === 27) {
|
||||
closeDrawer();
|
||||
closePracticeModal();
|
||||
}
|
||||
});
|
||||
|
||||
// شروع
|
||||
renderCards(scenarios);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in a new issue