style(frontend): 格式化前端代码以通过pre-push检查

This commit is contained in:
yml2213
2026-09-12 17:47:37 +08:00
parent fea82bff36
commit 111f400bdb
7 changed files with 58 additions and 29 deletions
@@ -264,7 +264,11 @@ function WorkerAfterSalesItem({
</Typography.Text>
</div>
<Space size={12} wrap className="worker-after-sales-item-meta">
<Typography.Text type="secondary" style={{ fontSize: 12 }} copyable={{ text: item.workOrderNo || item.caseNo }}>
<Typography.Text
type="secondary"
style={{ fontSize: 12 }}
copyable={{ text: item.workOrderNo || item.caseNo }}
>
工单号 {item.workOrderNo || item.caseNo}
</Typography.Text>
<Typography.Text
@@ -912,7 +912,9 @@ function resolveGrabDisabledReason(
return ''
}
function getDisplayOrderNo(order: Pick<WorkOrder, 'workOrderNo' | 'platformOrderId'> | null | undefined): string {
function getDisplayOrderNo(
order: Pick<WorkOrder, 'workOrderNo' | 'platformOrderId'> | null | undefined,
): string {
return String(order?.workOrderNo || order?.platformOrderId || '').trim() || '-'
}
@@ -142,7 +142,9 @@ export function WorkerProfileMobileLedgerRecords({
</div>
{row.note ? <div className="worker-profile-record-note">说明: {row.note}</div> : null}
{row.relatedWorkOrderNo || row.relatedPlatformOrderId ? (
<div className="worker-profile-record-sub">工单号 {row.relatedWorkOrderNo || row.relatedPlatformOrderId}</div>
<div className="worker-profile-record-sub">
工单号 {row.relatedWorkOrderNo || row.relatedPlatformOrderId}
</div>
) : null}
<div className="worker-profile-record-time">
{formatDateTime(String(row.createdAt || ''))}
@@ -200,7 +200,9 @@ export const workerLedgerColumns: TableColumnsType<WorkerWalletLedger> = [
<div className="cell-stack">
<Typography.Text>{row.note || '-'}</Typography.Text>
{row.relatedWorkOrderNo || row.relatedPlatformOrderId ? (
<Typography.Text type="secondary">工单号 {row.relatedWorkOrderNo || row.relatedPlatformOrderId}</Typography.Text>
<Typography.Text type="secondary">
工单号 {row.relatedWorkOrderNo || row.relatedPlatformOrderId}
</Typography.Text>
) : null}
</div>
),