feat: 바텀시트 '관심있어요' 버튼 분리 — interested 상태 DB 저장 + 어드민 표시

- "관심있어요!" 클릭 → status='interested' (기존: dismissed와 동일했음)
- "다음에요" / 드래그 닫기 → status='dismissed'
- dismiss API에 action 파라미터 추가
- AI CRM 대시보드: interested 배지(주황) + 통계 카드 반영

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
thug0bin
2026-02-26 20:47:20 +09:00
parent 3e3934e2e5
commit a2829436d1
3 changed files with 25 additions and 10 deletions

View File

@@ -408,8 +408,8 @@
<div id="rec-product" style="display:inline-block;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;font-size:14px;font-weight:600;padding:8px 20px;border-radius:20px;letter-spacing:-0.2px;"></div>
</div>
<div style="display:flex;gap:12px;padding-bottom:env(safe-area-inset-bottom,0);">
<button onclick="dismissRec()" style="flex:1;padding:14px;border:1px solid #dee2e6;border-radius:14px;background:#fff;color:#868e96;font-size:15px;font-weight:600;cursor:pointer;font-family:inherit;">다음에요</button>
<button onclick="dismissRec()" style="flex:2;padding:14px;border:none;border-radius:14px;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;font-size:15px;font-weight:600;cursor:pointer;font-family:inherit;">관심있어요!</button>
<button onclick="dismissRec('dismissed')" style="flex:1;padding:14px;border:1px solid #dee2e6;border-radius:14px;background:#fff;color:#868e96;font-size:15px;font-weight:600;cursor:pointer;font-family:inherit;">다음에요</button>
<button onclick="dismissRec('interested')" style="flex:2;padding:14px;border:none;border-radius:14px;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;font-size:15px;font-weight:600;cursor:pointer;font-family:inherit;">관심있어요!</button>
</div>
</div>
</div>
@@ -522,7 +522,8 @@
{% endif %}
});
function dismissRec() {
function dismissRec(action) {
action = action || 'dismissed';
const c = document.getElementById('rec-content');
const b = document.getElementById('rec-backdrop');
c.style.transition = 'transform .3s ease';
@@ -534,7 +535,11 @@
c.style.transition = '';
c.style.transform = '';
}, 300);
if (_recId) fetch('/api/recommendation/' + _recId + '/dismiss', {method:'POST'}).catch(function(){});
if (_recId) fetch('/api/recommendation/' + _recId + '/dismiss', {
method:'POST',
headers:{'Content-Type':'application/json'},
body: JSON.stringify({action: action})
}).catch(function(){});
}
</script>
<script>if('serviceWorker' in navigator){navigator.serviceWorker.register('/sw.js').catch(()=>{});}</script>