前端任务列表增加来源时间
This commit is contained in:
@@ -259,6 +259,7 @@ export default {
|
|||||||
tableTitle: 'Task data',
|
tableTitle: 'Task data',
|
||||||
totalSuffix: 'tasks',
|
totalSuffix: 'tasks',
|
||||||
noSourceSubject: 'No source subject',
|
noSourceSubject: 'No source subject',
|
||||||
|
sourceReceivedAt: 'Source time',
|
||||||
canProcess: 'Processable',
|
canProcess: 'Processable',
|
||||||
cannotProcess: 'Not processable',
|
cannotProcess: 'Not processable',
|
||||||
queueParticipation: 'Queue participation',
|
queueParticipation: 'Queue participation',
|
||||||
|
|||||||
@@ -259,6 +259,7 @@ export default {
|
|||||||
tableTitle: 'ข้อมูลงาน',
|
tableTitle: 'ข้อมูลงาน',
|
||||||
totalSuffix: 'งาน',
|
totalSuffix: 'งาน',
|
||||||
noSourceSubject: 'ไม่มีหัวข้ออีเมลต้นทาง',
|
noSourceSubject: 'ไม่มีหัวข้ออีเมลต้นทาง',
|
||||||
|
sourceReceivedAt: 'เวลารับอีเมล',
|
||||||
canProcess: 'ประมวลผลได้',
|
canProcess: 'ประมวลผลได้',
|
||||||
cannotProcess: 'ประมวลผลไม่ได้',
|
cannotProcess: 'ประมวลผลไม่ได้',
|
||||||
queueParticipation: 'อยู่ในคิวหรือไม่',
|
queueParticipation: 'อยู่ในคิวหรือไม่',
|
||||||
|
|||||||
@@ -259,6 +259,7 @@ export default {
|
|||||||
tableTitle: '任务数据',
|
tableTitle: '任务数据',
|
||||||
totalSuffix: '条任务',
|
totalSuffix: '条任务',
|
||||||
noSourceSubject: '暂无来源主题',
|
noSourceSubject: '暂无来源主题',
|
||||||
|
sourceReceivedAt: '来源时间',
|
||||||
canProcess: '可处理',
|
canProcess: '可处理',
|
||||||
cannotProcess: '不可处理',
|
cannotProcess: '不可处理',
|
||||||
queueParticipation: '是否参与队列',
|
queueParticipation: '是否参与队列',
|
||||||
|
|||||||
@@ -494,6 +494,22 @@ describe('reservation P0 views', () => {
|
|||||||
expect(wrapper.text()).not.toContain('NEW_BOOKING / NEW_BOOKING')
|
expect(wrapper.text()).not.toContain('NEW_BOOKING / NEW_BOOKING')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('renders task source received time in the source email column', async () => {
|
||||||
|
const taskListResult = createTaskListResult('GRP-001', 'Booking Request')
|
||||||
|
taskListResult.items[0] = {
|
||||||
|
...taskListResult.items[0]!,
|
||||||
|
source_sender_summary: 'guest@example.test',
|
||||||
|
source_received_at: '2026-07-08T03:00:00Z',
|
||||||
|
}
|
||||||
|
vi.mocked(service.fetchReservationTaskList).mockResolvedValue(taskListResult)
|
||||||
|
|
||||||
|
const wrapper = await mountWithPlugins(ReservationTaskListView)
|
||||||
|
await vi.dynamicImportSettled()
|
||||||
|
|
||||||
|
expect(wrapper.text()).toContain('来源时间')
|
||||||
|
expect(wrapper.text()).toContain('2026-07-08 10:00:00')
|
||||||
|
})
|
||||||
|
|
||||||
it('filters source-message-only tasks with S10 and S99 subtypes', async () => {
|
it('filters source-message-only tasks with S10 and S99 subtypes', async () => {
|
||||||
vi.mocked(service.fetchReservationTaskList).mockResolvedValue(createSourceMessageOnlyTaskListResult('S10'))
|
vi.mocked(service.fetchReservationTaskList).mockResolvedValue(createSourceMessageOnlyTaskListResult('S10'))
|
||||||
|
|
||||||
|
|||||||
@@ -187,6 +187,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<span>{{ task.source_subject ?? t('taskList.noSourceSubject') }}</span>
|
<span>{{ task.source_subject ?? t('taskList.noSourceSubject') }}</span>
|
||||||
<small>{{ task.source_sender_summary ?? task.source_message_id ?? '-' }}</small>
|
<small>{{ task.source_sender_summary ?? task.source_message_id ?? '-' }}</small>
|
||||||
|
<small>{{ t('taskList.sourceReceivedAt') }}: {{ formatReservationDateTime(task.source_received_at) }}</small>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span>{{ task.queue_sequence ?? '-' }}</span>
|
<span>{{ task.queue_sequence ?? '-' }}</span>
|
||||||
@@ -279,6 +280,7 @@ import {
|
|||||||
formatReservationTaskRouteSummary,
|
formatReservationTaskRouteSummary,
|
||||||
isReservationReadonlyDiagnosticTask,
|
isReservationReadonlyDiagnosticTask,
|
||||||
} from '@/utils/reservationDisplay'
|
} from '@/utils/reservationDisplay'
|
||||||
|
import { formatReservationDateTime } from '@/utils/reservationFormat'
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
|
|||||||
Reference in New Issue
Block a user