修复V4办理页进度与卡片对齐问题
This commit is contained in:
@@ -386,7 +386,6 @@ function formatFileSize(size: number | null): string {
|
|||||||
.payment-attachments {
|
.payment-attachments {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
margin: 0 20px 18px;
|
|
||||||
border: 1px solid var(--th-color-slate-200);
|
border: 1px solid var(--th-color-slate-200);
|
||||||
border-radius: var(--th-radius-sm);
|
border-radius: var(--th-radius-sm);
|
||||||
background: var(--th-color-slate-50);
|
background: var(--th-color-slate-50);
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ function readableValue(value?: string | null): string {
|
|||||||
.rooming-list-card {
|
.rooming-list-card {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
margin: 0 20px 18px;
|
|
||||||
border: 1px solid var(--th-color-slate-200);
|
border: 1px solid var(--th-color-slate-200);
|
||||||
border-radius: var(--th-radius-sm);
|
border-radius: var(--th-radius-sm);
|
||||||
background: var(--th-color-slate-50);
|
background: var(--th-color-slate-50);
|
||||||
|
|||||||
@@ -415,7 +415,6 @@ function isRecord(value: unknown): value is ReservationRecord {
|
|||||||
.trace-card {
|
.trace-card {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 14px;
|
gap: 14px;
|
||||||
margin: 0 20px 18px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.trace-item {
|
.trace-item {
|
||||||
|
|||||||
@@ -581,6 +581,7 @@ export default {
|
|||||||
totalCards: 'Total',
|
totalCards: 'Total',
|
||||||
pendingCards: 'Pending',
|
pendingCards: 'Pending',
|
||||||
reviewCards: 'Review',
|
reviewCards: 'Review',
|
||||||
|
readonlyCards: 'View only',
|
||||||
confirmedCards: 'Confirmed',
|
confirmedCards: 'Confirmed',
|
||||||
orderTaskId: 'Item ID',
|
orderTaskId: 'Item ID',
|
||||||
orderReference: 'Order reference',
|
orderReference: 'Order reference',
|
||||||
|
|||||||
@@ -581,6 +581,7 @@ export default {
|
|||||||
totalCards: 'ทั้งหมด',
|
totalCards: 'ทั้งหมด',
|
||||||
pendingCards: 'รอยืนยัน',
|
pendingCards: 'รอยืนยัน',
|
||||||
reviewCards: 'รอตรวจสอบ',
|
reviewCards: 'รอตรวจสอบ',
|
||||||
|
readonlyCards: 'ดูอย่างเดียว',
|
||||||
confirmedCards: 'ยืนยันแล้ว',
|
confirmedCards: 'ยืนยันแล้ว',
|
||||||
orderTaskId: 'รหัสรายการ',
|
orderTaskId: 'รหัสรายการ',
|
||||||
orderReference: 'อ้างอิงออเดอร์',
|
orderReference: 'อ้างอิงออเดอร์',
|
||||||
|
|||||||
@@ -581,6 +581,7 @@ export default {
|
|||||||
totalCards: '全部',
|
totalCards: '全部',
|
||||||
pendingCards: '待确认',
|
pendingCards: '待确认',
|
||||||
reviewCards: '待复核',
|
reviewCards: '待复核',
|
||||||
|
readonlyCards: '仅查看',
|
||||||
confirmedCards: '已确认',
|
confirmedCards: '已确认',
|
||||||
orderTaskId: '事项编号',
|
orderTaskId: '事项编号',
|
||||||
orderReference: '订单引用',
|
orderReference: '订单引用',
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ import { createI18n } from 'vue-i18n'
|
|||||||
import { createMemoryHistory, createRouter } from 'vue-router'
|
import { createMemoryHistory, createRouter } from 'vue-router'
|
||||||
|
|
||||||
import taskCardSectionSource from '@/components/reservation/ReservationV4TaskCardSection.vue?raw'
|
import taskCardSectionSource from '@/components/reservation/ReservationV4TaskCardSection.vue?raw'
|
||||||
|
import paymentAttachmentPreviewSource from '@/components/reservation/ReservationV4PaymentAttachmentPreview.vue?raw'
|
||||||
|
import roomingListCardSource from '@/components/reservation/ReservationV4RoomingListCard.vue?raw'
|
||||||
|
import traceCardSource from '@/components/reservation/ReservationV4TraceCard.vue?raw'
|
||||||
import zhCN from '@/i18n/locales/zh-CN'
|
import zhCN from '@/i18n/locales/zh-CN'
|
||||||
import { useAuthStore } from '@/stores/authStore'
|
import { useAuthStore } from '@/stores/authStore'
|
||||||
import type {
|
import type {
|
||||||
@@ -164,7 +167,11 @@ describe('reservation V4 pages', () => {
|
|||||||
expect(summary.text()).toContain('3')
|
expect(summary.text()).toContain('3')
|
||||||
expect(summary.text()).toContain('2')
|
expect(summary.text()).toContain('2')
|
||||||
expect(summary.text()).toContain(zhCN.taskV4.pendingCards)
|
expect(summary.text()).toContain(zhCN.taskV4.pendingCards)
|
||||||
|
expect(summary.text()).toContain(zhCN.taskV4.readonlyCards)
|
||||||
expect(summary.text()).toContain(zhCN.taskV4.confirmedCards)
|
expect(summary.text()).toContain(zhCN.taskV4.confirmedCards)
|
||||||
|
const readonlyProgress = summary.find('.handling-progress__item--readonly')
|
||||||
|
expect(readonlyProgress.exists()).toBe(true)
|
||||||
|
expect(readonlyProgress.text()).toContain('1')
|
||||||
expect(summary.text()).not.toContain('9001')
|
expect(summary.text()).not.toContain('9001')
|
||||||
expect(summary.text()).not.toContain(zhCN.taskV4.orderTaskId)
|
expect(summary.text()).not.toContain(zhCN.taskV4.orderTaskId)
|
||||||
})
|
})
|
||||||
@@ -201,6 +208,25 @@ describe('reservation V4 pages', () => {
|
|||||||
expect(wrapper.find('.card-actions .primary-button').exists()).toBe(false)
|
expect(wrapper.find('.card-actions .primary-button').exists()).toBe(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('keeps bound order links in non-rooming card footers', async () => {
|
||||||
|
const detail = createOrderTaskDetail()
|
||||||
|
useBoundOrder(detail)
|
||||||
|
vi.mocked(service.fetchReservationV4OrderTaskDetail).mockResolvedValue(detail)
|
||||||
|
|
||||||
|
const wrapper = await mountWithPlugins(
|
||||||
|
ReservationV4OrderTaskDetailView,
|
||||||
|
'/reservation/order-tasks/9001',
|
||||||
|
)
|
||||||
|
await flushPromises()
|
||||||
|
|
||||||
|
const firstCard = wrapper.find('.task-card-section')
|
||||||
|
const footerLink = firstCard.find('.task-card-section__footer .card-order-link')
|
||||||
|
expect(footerLink.exists()).toBe(true)
|
||||||
|
expect(footerLink.text()).toContain(zhCN.task.viewOrder)
|
||||||
|
expect(footerLink.attributes('data-to')).toBe('/reservation/orders/order-2001')
|
||||||
|
expect(firstCard.find('.task-card-section__body .card-order-link').exists()).toBe(false)
|
||||||
|
})
|
||||||
|
|
||||||
it('does not render direct attachment URLs from V4 source message payload', async () => {
|
it('does not render direct attachment URLs from V4 source message payload', async () => {
|
||||||
const detail = createOrderTaskDetail({
|
const detail = createOrderTaskDetail({
|
||||||
sourceDisplayPayload: {
|
sourceDisplayPayload: {
|
||||||
@@ -1408,6 +1434,12 @@ describe('reservation V4 pages', () => {
|
|||||||
expect(taskCardSectionSource).toContain('.task-card-section__footer {\n align-items: flex-end;\n }')
|
expect(taskCardSectionSource).toContain('.task-card-section__footer {\n align-items: flex-end;\n }')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('lets specialized V4 card bodies align with the shared card shell padding', () => {
|
||||||
|
expect(paymentAttachmentPreviewSource).not.toContain('margin: 0 20px 18px')
|
||||||
|
expect(roomingListCardSource).not.toContain('margin: 0 20px 18px')
|
||||||
|
expect(traceCardSource).not.toContain('margin: 0 20px 18px')
|
||||||
|
})
|
||||||
|
|
||||||
it('requires confirmed order id before resolving an unresolved V4 review card', async () => {
|
it('requires confirmed order id before resolving an unresolved V4 review card', async () => {
|
||||||
const detail = createOrderTaskDetail({
|
const detail = createOrderTaskDetail({
|
||||||
businessCardStatus: 'REVIEW_REQUIRED',
|
businessCardStatus: 'REVIEW_REQUIRED',
|
||||||
@@ -1525,7 +1557,8 @@ async function mountWithPlugins(component: object, initialPath: string) {
|
|||||||
plugins: [pinia, i18n, router, PrimeVue],
|
plugins: [pinia, i18n, router, PrimeVue],
|
||||||
stubs: {
|
stubs: {
|
||||||
RouterLink: {
|
RouterLink: {
|
||||||
template: '<a><slot /></a>',
|
props: ['to'],
|
||||||
|
template: '<a :data-to="to"><slot /></a>',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -80,6 +80,10 @@
|
|||||||
<span>{{ t('taskV4.reviewCards') }}</span>
|
<span>{{ t('taskV4.reviewCards') }}</span>
|
||||||
<strong>{{ detail.card_counts.review_required_count }}</strong>
|
<strong>{{ detail.card_counts.review_required_count }}</strong>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="handling-progress__item handling-progress__item--readonly">
|
||||||
|
<span>{{ t('taskV4.readonlyCards') }}</span>
|
||||||
|
<strong>{{ detail.card_counts.readonly_count }}</strong>
|
||||||
|
</div>
|
||||||
<div class="handling-progress__item handling-progress__item--confirmed">
|
<div class="handling-progress__item handling-progress__item--confirmed">
|
||||||
<span>{{ t('taskV4.confirmedCards') }}</span>
|
<span>{{ t('taskV4.confirmedCards') }}</span>
|
||||||
<strong>{{ detail.card_counts.confirmed_count }}</strong>
|
<strong>{{ detail.card_counts.confirmed_count }}</strong>
|
||||||
@@ -784,6 +788,10 @@ function formatApiError(error: unknown, fallback: string): {
|
|||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.handling-progress__item--total {
|
||||||
|
grid-column: 1 / -1;
|
||||||
|
}
|
||||||
|
|
||||||
.handling-progress__item--pending strong {
|
.handling-progress__item--pending strong {
|
||||||
color: var(--th-color-info);
|
color: var(--th-color-info);
|
||||||
}
|
}
|
||||||
@@ -796,6 +804,10 @@ function formatApiError(error: unknown, fallback: string): {
|
|||||||
color: var(--th-color-success);
|
color: var(--th-color-success);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.handling-progress__item--readonly strong {
|
||||||
|
color: var(--th-color-slate-600);
|
||||||
|
}
|
||||||
|
|
||||||
.card-stack {
|
.card-stack {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 14px;
|
gap: 14px;
|
||||||
|
|||||||
@@ -730,4 +730,3 @@ git status --short
|
|||||||
```
|
```
|
||||||
|
|
||||||
Expected: modified files are limited to the planned frontend files, locale files, `PROJECT_STATE.md`, and this plan/spec history. `.idea/*` may remain modified as unrelated local changes and must not be staged.
|
Expected: modified files are limited to the planned frontend files, locale files, `PROJECT_STATE.md`, and this plan/spec history. `.idea/*` may remain modified as unrelated local changes and must not be staged.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user