fix(consignment): 内部现货履约文案对齐待加好友,并移除已废弃的指派打手路径
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import WorkOrderEventTimeline from '@/components/WorkOrderEventTimeline'
|
||||
import ImagePreviewList from '@/components/files/ImagePreviewList'
|
||||
import type { WorkOrder } from '@/types/worker-platform'
|
||||
import { formatDateTime } from '@/utils/date-time'
|
||||
import { resolveOrderConsignmentScreenshotUrls } from '@/utils/consignment-display'
|
||||
|
||||
import {
|
||||
canEditAcceptanceImages,
|
||||
@@ -183,6 +184,9 @@ function GiftProgressCard({ order }: { order: WorkOrder }) {
|
||||
const boosterItems = Object.entries(boosterFields).filter(([, value]) =>
|
||||
String(value || '').trim(),
|
||||
)
|
||||
const consignmentScreenshotUrls = resolveOrderConsignmentScreenshotUrls(order)
|
||||
const hasBoosterScreenshots = (gift.boosterMaterial?.screenshots || []).length > 0
|
||||
const hasConsignmentScreenshots = consignmentScreenshotUrls.length > 0
|
||||
|
||||
return (
|
||||
<Card title="好友赠送进度" size="small">
|
||||
@@ -228,7 +232,7 @@ function GiftProgressCard({ order }: { order: WorkOrder }) {
|
||||
)}
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
{boosterItems.length > 0 || (gift.boosterMaterial?.screenshots || []).length > 0 ? (
|
||||
{boosterItems.length > 0 || hasBoosterScreenshots || hasConsignmentScreenshots ? (
|
||||
<div>
|
||||
<Typography.Text type="secondary">已提交的本人资料</Typography.Text>
|
||||
<div style={{ marginTop: 8 }}>
|
||||
@@ -241,20 +245,13 @@ function GiftProgressCard({ order }: { order: WorkOrder }) {
|
||||
))}
|
||||
</Descriptions>
|
||||
) : null}
|
||||
{(gift.boosterMaterial?.screenshots || []).length > 0 ? (
|
||||
{hasBoosterScreenshots ? (
|
||||
<div style={{ marginTop: 8 }}>
|
||||
<ImagePreviewList files={gift.boosterMaterial.screenshots} size={64} />
|
||||
<ImagePreviewList files={gift.boosterMaterial?.screenshots} size={64} />
|
||||
</div>
|
||||
) : Array.isArray(
|
||||
(order.material as Record<string, any> | undefined)?.consignment?.screenshots,
|
||||
) &&
|
||||
((order.material as Record<string, any>).consignment.screenshots as unknown[])
|
||||
.length > 0 ? (
|
||||
) : hasConsignmentScreenshots ? (
|
||||
<div style={{ marginTop: 8 }}>
|
||||
<ImagePreviewList
|
||||
imageUrls={(order.material as Record<string, any>).consignment.screenshots}
|
||||
size={64}
|
||||
/>
|
||||
<ImagePreviewList imageUrls={consignmentScreenshotUrls} size={64} />
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user