提交一次全量代码
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
v-if="loading"
|
||||
class="th-section order-state"
|
||||
>
|
||||
Loading...
|
||||
{{ t('common.loading') }}
|
||||
</div>
|
||||
<div
|
||||
v-else-if="errorMessage"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<input
|
||||
v-model="filters.keyword"
|
||||
type="search"
|
||||
placeholder="GRP-001 / CNF123456"
|
||||
:placeholder="t('orderList.keywordPlaceholder')"
|
||||
@input="resetToFirstPage"
|
||||
>
|
||||
</label>
|
||||
@@ -36,7 +36,7 @@
|
||||
v-model="filters.order_status"
|
||||
@change="resetToFirstPage"
|
||||
>
|
||||
<option value="">All</option>
|
||||
<option value="">{{ t('common.all') }}</option>
|
||||
<option value="TEMPORARY">{{ t('status.TEMPORARY') }}</option>
|
||||
<option value="ACTIVE">{{ t('status.ACTIVE') }}</option>
|
||||
<option value="ENDED">{{ t('status.ENDED') }}</option>
|
||||
|
||||
@@ -69,9 +69,9 @@
|
||||
|
||||
<!-- eslint-disable vue/no-v-html -->
|
||||
<div
|
||||
v-if="message.html_body"
|
||||
v-if="renderableHtmlBody(message)"
|
||||
class="message-body message-body--html"
|
||||
v-html="message.html_body"
|
||||
v-html="renderableHtmlBody(message)"
|
||||
/>
|
||||
<!-- eslint-enable vue/no-v-html -->
|
||||
<pre
|
||||
@@ -130,7 +130,7 @@
|
||||
:key="task.task_id"
|
||||
>
|
||||
<RouterLink :to="`/reservation/tasks/${task.task_id}`">
|
||||
{{ task.card_name ?? task.task_type }}
|
||||
{{ formatReservationTaskCard(t, task.task_type, task.card_name) }}
|
||||
</RouterLink>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -154,6 +154,7 @@ import type {
|
||||
SourceMessageConversationResult,
|
||||
SourceMessageOriginalMedia,
|
||||
} from '@/types/reservation'
|
||||
import { formatReservationTaskCard } from '@/utils/reservationDisplay'
|
||||
import { formatReservationDateTime } from '@/utils/reservationFormat'
|
||||
|
||||
const route = useRoute()
|
||||
@@ -205,6 +206,8 @@ function normalizeConversation(result: SourceMessageConversationResult): SourceM
|
||||
messages: result.messages.map((message) => ({
|
||||
...message,
|
||||
attachments: message.attachments ?? [],
|
||||
html_body_sanitized: message.html_body_sanitized ?? null,
|
||||
html_render_mode: message.html_render_mode ?? null,
|
||||
inline_images: message.inline_images ?? [],
|
||||
related_orders: message.related_orders ?? [],
|
||||
related_tasks: message.related_tasks ?? [],
|
||||
@@ -216,6 +219,13 @@ function formatTextMessageBody(message: SourceMessageConversationItem): string {
|
||||
return message.text_body || t('conversation.emptyBody')
|
||||
}
|
||||
|
||||
function renderableHtmlBody(message: SourceMessageConversationItem): string {
|
||||
if (message.html_render_mode && message.html_render_mode !== 'SANITIZED_HTML') {
|
||||
return ''
|
||||
}
|
||||
return message.html_body_sanitized ?? ''
|
||||
}
|
||||
|
||||
function combinedMedia(message: SourceMessageConversationItem): SourceMessageOriginalMedia[] {
|
||||
return [...message.attachments, ...message.inline_images]
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<input
|
||||
v-model="filters.keyword"
|
||||
type="search"
|
||||
placeholder="GRP-001 / Booking"
|
||||
:placeholder="t('taskList.keywordPlaceholder')"
|
||||
@input="resetToFirstPage"
|
||||
>
|
||||
</label>
|
||||
@@ -37,7 +37,7 @@
|
||||
v-model="filters.task_type"
|
||||
@change="resetToFirstPage"
|
||||
>
|
||||
<option value="">All</option>
|
||||
<option value="">{{ t('common.all') }}</option>
|
||||
<option value="NEW_BOOKING">{{ t('cardType.NEW_BOOKING') }}</option>
|
||||
<option value="UPDATE_BOOKING">{{ t('cardType.UPDATE_BOOKING') }}</option>
|
||||
<option value="CANCEL_BOOKING">{{ t('cardType.CANCEL_BOOKING') }}</option>
|
||||
@@ -51,7 +51,7 @@
|
||||
v-model="filters.task_status"
|
||||
@change="resetToFirstPage"
|
||||
>
|
||||
<option value="">All</option>
|
||||
<option value="">{{ t('common.all') }}</option>
|
||||
<option value="PENDING_CONFIRM">{{ t('status.PENDING_CONFIRM') }}</option>
|
||||
<option value="READY">{{ t('status.READY') }}</option>
|
||||
<option value="BLOCKED">{{ t('status.BLOCKED') }}</option>
|
||||
@@ -61,15 +61,15 @@
|
||||
<label>
|
||||
<span>{{ t('workbench.orderStatus') }}</span>
|
||||
<select
|
||||
value=""
|
||||
disabled
|
||||
v-model="filters.order_status"
|
||||
@change="resetToFirstPage"
|
||||
>
|
||||
<option value="">All</option>
|
||||
<option value="">{{ t('common.all') }}</option>
|
||||
<option value="TEMPORARY">{{ t('status.TEMPORARY') }}</option>
|
||||
<option value="ACTIVE">{{ t('status.ACTIVE') }}</option>
|
||||
<option value="ENDED">{{ t('status.ENDED') }}</option>
|
||||
<option value="LOGIC_DELETED">{{ t('status.LOGIC_DELETED') }}</option>
|
||||
</select>
|
||||
<small class="filter-hint">{{ t('taskList.orderStatusFilterPending') }}</small>
|
||||
</label>
|
||||
<label>
|
||||
<span>{{ t('taskList.queueParticipation') }}</span>
|
||||
@@ -139,13 +139,13 @@
|
||||
>
|
||||
<td>
|
||||
<strong class="th-code">#{{ task.task_id }}</strong>
|
||||
<small>{{ task.task_type }} / {{ task.task_subtype ?? '-' }}</small>
|
||||
<small>{{ formatReservationTaskTypeSummary(t, task.task_type, task.task_subtype) }}</small>
|
||||
</td>
|
||||
<td>
|
||||
<strong>{{ task.display_order_key ?? task.temporary_order_no ?? task.order_id }}</strong>
|
||||
<small class="th-code">{{ task.order_id }}</small>
|
||||
</td>
|
||||
<td>{{ task.card_name ?? task.task_type }}</td>
|
||||
<td>{{ formatReservationTaskCard(t, task.task_type, task.card_name) }}</td>
|
||||
<td><ReservationStatusBadge :status="task.task_status" /></td>
|
||||
<td>
|
||||
<span>{{ task.source_subject ?? t('taskList.noSourceSubject') }}</span>
|
||||
@@ -153,7 +153,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<span>{{ task.queue_sequence ?? '-' }}</span>
|
||||
<small>{{ task.can_process ? t('taskList.canProcess') : task.readonly_reason_code ?? '-' }}</small>
|
||||
<small>{{ task.can_process ? t('taskList.canProcess') : formatReservationReadonlyReason(t, task.readonly_reason_code) }}</small>
|
||||
</td>
|
||||
<td>
|
||||
<div class="row-actions">
|
||||
@@ -233,6 +233,11 @@ import { useI18n } from 'vue-i18n'
|
||||
import ReservationStatusBadge from '@/components/reservation/ReservationStatusBadge.vue'
|
||||
import { fetchReservationTaskList } from '@/services/reservationService'
|
||||
import type { ReservationPageResult, ReservationTaskListFilters, ReservationTaskListItem } from '@/types/reservation'
|
||||
import {
|
||||
formatReservationReadonlyReason,
|
||||
formatReservationTaskCard,
|
||||
formatReservationTaskTypeSummary,
|
||||
} from '@/utils/reservationDisplay'
|
||||
|
||||
const { t } = useI18n()
|
||||
const loading = ref(false)
|
||||
@@ -247,6 +252,7 @@ const filters = reactive<ReservationTaskListFilters>({
|
||||
keyword: '',
|
||||
task_type: '',
|
||||
task_status: '',
|
||||
order_status: '',
|
||||
queue_participation: undefined,
|
||||
page_num: 1,
|
||||
page_size: 20,
|
||||
@@ -289,6 +295,7 @@ function resetFilters(): void {
|
||||
filters.keyword = ''
|
||||
filters.task_type = ''
|
||||
filters.task_status = ''
|
||||
filters.order_status = ''
|
||||
filters.queue_participation = undefined
|
||||
filters.page_num = 1
|
||||
filters.page_size = 20
|
||||
|
||||
Reference in New Issue
Block a user