Merge remote-tracking branch 'origin/main'

dev/full-email
Lei OT 5 months ago
commit edc1569a8c

@ -1,12 +1,22 @@
import React, { useState } from 'react'
import { Link } from 'react-router-dom'
import { Form, Input, Button, DatePicker, Select, Table } from 'antd'
import dayjs from 'dayjs'
import { ReadIcon, DeliverIcon, SentIcon } from '@/components/Icons'
import useCustomerRelationStore from '@/stores/CustomerRelationStore'
const { RangePicker } = DatePicker
const { Option } = Select
//
const statusIconMap = {
read: <ReadIcon title='read' />,
delivered: <DeliverIcon title='delivered' />,
sent: <SentIcon title='sent' />,
failed: <span title='failed'></span>,
accepted: <span title='accepted'>🕒</span>,
default: <span title='waiting'>🕒</span>,
}
const Index = () => {
const { loading, tasksList, fetchSearchTasks } = useCustomerRelationStore()
@ -82,7 +92,8 @@ const Index = () => {
key: 'crt_conversation_id',
render: (text, record) => {
if (text) {
return <Link to={`/order/chat/${record.crt_coli_id}`}>查看会话 ${record.msg_status}</Link>
const icon = statusIconMap[record.msg_status] || statusIconMap['default']
return <Link to={`/order/chat/${record.crt_coli_id}`}>查看会话 {icon}</Link>
}
},
},

Loading…
Cancel
Save