This commit is contained in:
@@ -18,7 +18,7 @@ export function requesterName(item: RequesterLike) {
|
|||||||
|| item.createdBy
|
|| item.createdBy
|
||||||
|| item.requestedByEmail
|
|| item.requestedByEmail
|
||||||
|| item.createdByEmail
|
|| item.createdByEmail
|
||||||
|| 'admin';
|
|| '-';
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Requester({ item, label = '작업자' }: { item: RequesterLike; label?: string }) {
|
export function Requester({ item, label = '작업자' }: { item: RequesterLike; label?: string }) {
|
||||||
@@ -30,7 +30,7 @@ export function Requester({ item, label = '작업자' }: { item: RequesterLike;
|
|||||||
return (
|
return (
|
||||||
<span className="inline-flex h-4 min-w-0 items-center gap-1.5 align-middle text-muted-foreground">
|
<span className="inline-flex h-4 min-w-0 items-center gap-1.5 align-middle text-muted-foreground">
|
||||||
<span className="leading-none">{label}</span>
|
<span className="leading-none">{label}</span>
|
||||||
{avatarUrl && !failed ? (
|
{name === '-' ? null : avatarUrl && !failed ? (
|
||||||
<img
|
<img
|
||||||
src={avatarUrl}
|
src={avatarUrl}
|
||||||
alt=""
|
alt=""
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { useEffect, useMemo, useState } from 'react';
|
|||||||
import { Badge, Button, Card, CardHeader, Modal } from '../../components/ui';
|
import { Badge, Button, Card, CardHeader, Modal } from '../../components/ui';
|
||||||
import { useToast } from '../../components/toast';
|
import { useToast } from '../../components/toast';
|
||||||
import { PageTitle } from '../../layout/AppLayout';
|
import { PageTitle } from '../../layout/AppLayout';
|
||||||
import { readCurrentAdmin } from '../../lib/admin-app-permissions';
|
|
||||||
import { formatDateTime } from '../../lib/date-format';
|
import { formatDateTime } from '../../lib/date-format';
|
||||||
import { LoadingModal, useMinimumLoading } from '../operations/operation-utils';
|
import { LoadingModal, useMinimumLoading } from '../operations/operation-utils';
|
||||||
import {
|
import {
|
||||||
@@ -51,23 +50,19 @@ function jobTime(job: LauncherBuildJob) {
|
|||||||
|
|
||||||
function BuildWorker({ job }: { job: LauncherBuildJob }) {
|
function BuildWorker({ job }: { job: LauncherBuildJob }) {
|
||||||
const [failed, setFailed] = useState(false);
|
const [failed, setFailed] = useState(false);
|
||||||
const currentAdmin = readCurrentAdmin();
|
|
||||||
const name = job.requestedByName
|
const name = job.requestedByName
|
||||||
|| job.createdByName
|
|| job.createdByName
|
||||||
|| job.requestedBy
|
|| job.requestedBy
|
||||||
|| job.createdBy
|
|| job.createdBy
|
||||||
|| currentAdmin?.name
|
|| '-';
|
||||||
|| currentAdmin?.email
|
|
||||||
|| 'admin';
|
|
||||||
const avatarUrl = job.requestedByAvatarUrl
|
const avatarUrl = job.requestedByAvatarUrl
|
||||||
|| job.createdByAvatarUrl
|
|| job.createdByAvatarUrl
|
||||||
|| currentAdmin?.avatarUrl
|
|
||||||
|| '';
|
|| '';
|
||||||
const initial = name.trim().charAt(0).toUpperCase() || '?';
|
const initial = name.trim().charAt(0).toUpperCase() || '?';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<span className="inline-flex h-4 min-w-0 items-center gap-1.5 align-middle">
|
<span className="inline-flex h-4 min-w-0 items-center gap-1.5 align-middle">
|
||||||
{avatarUrl && !failed ? (
|
{name === '-' ? null : avatarUrl && !failed ? (
|
||||||
<img
|
<img
|
||||||
src={avatarUrl}
|
src={avatarUrl}
|
||||||
alt=""
|
alt=""
|
||||||
|
|||||||
Reference in New Issue
Block a user