fix(ui): wrap remaining UUIDs into UserCell — 3 missed spots
MR !177 added /admin/users/{sub}/display + UserCell + useUserDisplay, but only some renderers were migrated. Three places still rendered raw UUID strings: 1. reviews.tsx:466 — record draft drawer ("Согласование draft" header) showed `{draft.makerId}` raw. Tables on the same page already use <UserCell uuid={d.makerId} />. Verified via prod staging: soloviev.da approved a record draft today and the drawer header showed the maker as "77ec2cc8-98e3-4d70-8037-94038fcbde67" instead of the username. 2. RecordHistoryDrawer.tsx:110 — version history `updatedBy` raw. 3. webhooks.$id.tsx:235 — webhook subscription `createdBy` raw. All three switched to <UserCell uuid={...} />, matching the existing pattern. Added the import where missing. Wrapped each in inline-flex so the UserCell sits next to the label cleanly. No backend / API changes — same /admin/users/{sub}/display endpoint populated by JwtUserCaptureFilter (MR !177).
This commit is contained in:
@@ -4,6 +4,7 @@ import { Badge, Button, Drawer, LoadingBlock, QueryErrorState } from '@/ui'
|
|||||||
import { ArrowsLeftRightIcon, ArrowCounterClockwiseIcon, BracketsCurlyIcon, InfoIcon } from '@phosphor-icons/react'
|
import { ArrowsLeftRightIcon, ArrowCounterClockwiseIcon, BracketsCurlyIcon, InfoIcon } from '@phosphor-icons/react'
|
||||||
import { useRecordHistory } from '@/api/queries'
|
import { useRecordHistory } from '@/api/queries'
|
||||||
import { RecordDependentsPanel } from '@/components/lineage/RecordDependentsPanel'
|
import { RecordDependentsPanel } from '@/components/lineage/RecordDependentsPanel'
|
||||||
|
import { UserCell } from '@/lib/useUserDisplay'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
open: boolean
|
open: boolean
|
||||||
@@ -106,8 +107,9 @@ export const RecordHistoryDrawer = ({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{rec.updatedBy && (
|
{rec.updatedBy && (
|
||||||
<div>
|
<div className="inline-flex items-center gap-1">
|
||||||
<span className="font-mono">{t('history.updatedBy')}:</span> {rec.updatedBy}
|
<span className="font-mono">{t('history.updatedBy')}:</span>{' '}
|
||||||
|
<UserCell uuid={rec.updatedBy} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -526,8 +526,8 @@ function ReviewDrawer({ draftId, onClose }: DrawerProps) {
|
|||||||
<div className="flex flex-wrap items-center gap-2 text-cell">
|
<div className="flex flex-wrap items-center gap-2 text-cell">
|
||||||
<Badge variant={operationVariant(draft.operation)}>{draft.operation}</Badge>
|
<Badge variant={operationVariant(draft.operation)}>{draft.operation}</Badge>
|
||||||
<span className="font-mono">{draft.businessKey}</span>
|
<span className="font-mono">{draft.businessKey}</span>
|
||||||
<span className="text-mute">
|
<span className="text-mute inline-flex items-center gap-1">
|
||||||
{t('reviews.drawer.maker')}: {draft.makerId}
|
{t('reviews.drawer.maker')}: <UserCell uuid={draft.makerId} />
|
||||||
</span>
|
</span>
|
||||||
<span className="text-mute">
|
<span className="text-mute">
|
||||||
{t('reviews.drawer.submitted')}:{' '}
|
{t('reviews.drawer.submitted')}:{' '}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { createFileRoute, Link } from '@tanstack/react-router'
|
import { createFileRoute, Link } from '@tanstack/react-router'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
import { UserCell } from '@/lib/useUserDisplay'
|
||||||
import {
|
import {
|
||||||
Alert,
|
Alert,
|
||||||
Badge,
|
Badge,
|
||||||
@@ -231,8 +232,8 @@ function WebhookDetailPage() {
|
|||||||
<code className="text-mono">{data.hmacSecret}</code>
|
<code className="text-mono">{data.hmacSecret}</code>
|
||||||
</InfoRow>
|
</InfoRow>
|
||||||
<InfoRow label={t('webhooks.field.createdBy')}>
|
<InfoRow label={t('webhooks.field.createdBy')}>
|
||||||
<span className="text-cell">
|
<span className="text-cell inline-flex items-center gap-1">
|
||||||
{data.createdBy} · {new Date(data.createdAt).toLocaleString()}
|
<UserCell uuid={data.createdBy} /> · {new Date(data.createdAt).toLocaleString()}
|
||||||
</span>
|
</span>
|
||||||
</InfoRow>
|
</InfoRow>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user