docs(plan): ④ 移除未用 chatChannel(避免 noUnusedLocals,WA 时再加)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -42,13 +42,8 @@ import { useRouter } from 'vue-router'
|
||||
```
|
||||
`const router = useRouter()`(放 script 顶部状态区,如 `const drawerOpen = ref(false)` 之前)。
|
||||
|
||||
加 helper + handlers(放 `openDrawer` 附近):
|
||||
加 handlers(放 `openDrawer` 附近):
|
||||
```typescript
|
||||
/** 通话类型 → 聊天渠道(voice_call→wechat, wa_voice_call→whatsapp, phone_call→无)。 */
|
||||
function chatChannel(ch: CallChannel): 'wechat' | 'whatsapp' | null {
|
||||
return ch === 'voice_call' ? 'wechat' : ch === 'wa_voice_call' ? 'whatsapp' : null
|
||||
}
|
||||
|
||||
/** 客户昵称 → 该员工×客户 1:1 聊天(复用 Phase B 导航)。 */
|
||||
function viewCallCustomer(row: PhoneCall): void {
|
||||
const owner = cell(row, 'weChatId')
|
||||
@@ -67,7 +62,7 @@ function viewCallStaff(row: PhoneCall): void {
|
||||
router.push({ name: 'chat', params: { channel: 'wechat', ownerId: String(owner) } })
|
||||
}
|
||||
```
|
||||
> `CallChannel` 已在 import(`import type { CallChannel, PhoneCall }`)。`chatChannel` 本 task 只用于 voice_call,但保留 WA 映射供后续。
|
||||
> 本 plan 仅微信语音(voice_call→`'wechat'` 硬编码)。WA 映射 `chatChannel()`(voice_call→wechat, wa_voice_call→whatsapp)留待 WA tab 实现时再加(避免 `noUnusedLocals` 死代码)。`PhoneCall` 已在 import。
|
||||
|
||||
- [ ] **Step 2: voice_call 模板 3 处单元格包 link button**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user