chore: test deploy snapshot
This commit is contained in:
@@ -79,6 +79,7 @@ type SuccessLogRow = {
|
||||
clientId: string;
|
||||
ownerType: 'client' | 'shared-token';
|
||||
ownerId: string;
|
||||
ownerLabel?: string | null;
|
||||
alertTitle: string;
|
||||
ticketTitle: string;
|
||||
eventDateTime: string;
|
||||
@@ -641,9 +642,15 @@ function formatScopeIdentifierLabel(value: string | null | undefined) {
|
||||
return formatClientIdLabel(value?.trim() ?? '');
|
||||
}
|
||||
|
||||
function formatOwnershipLabel(ownerType: 'client' | 'shared-token', ownerId: string | null | undefined, clientId: string) {
|
||||
function formatOwnershipLabel(
|
||||
ownerType: 'client' | 'shared-token',
|
||||
ownerId: string | null | undefined,
|
||||
clientId: string,
|
||||
ownerLabel?: string | null,
|
||||
) {
|
||||
if (ownerType === 'shared-token') {
|
||||
return `토큰 ${formatScopeIdentifierLabel(ownerId)}`;
|
||||
const normalizedOwnerLabel = ownerLabel?.trim() ?? '';
|
||||
return normalizedOwnerLabel || `토큰 ${formatScopeIdentifierLabel(ownerId)}`;
|
||||
}
|
||||
|
||||
return `기기 ${formatClientIdLabel(clientId)}`;
|
||||
@@ -825,6 +832,7 @@ export function BaseballTicketBayPlayAppView({ onBack, launchContext = 'direct',
|
||||
clientId: item.clientId,
|
||||
ownerType: item.ownerType,
|
||||
ownerId: item.ownerId,
|
||||
ownerLabel: item.ownerLabel ?? alert?.ownerLabel ?? null,
|
||||
alertTitle: alert.title,
|
||||
ticketTitle: result.title,
|
||||
eventDateTime: result.eventDateTime,
|
||||
@@ -865,7 +873,7 @@ export function BaseballTicketBayPlayAppView({ onBack, launchContext = 'direct',
|
||||
[selectedSuccessRows],
|
||||
);
|
||||
const selectableSuccessRows = useMemo(
|
||||
() => (accessScope === 'shared-token' ? successRows : successRows.filter((item) => item.clientId === clientId)),
|
||||
() => (accessScope === 'client' ? successRows.filter((item) => item.clientId === clientId) : successRows),
|
||||
[accessScope, clientId, successRows],
|
||||
);
|
||||
const isAllSuccessRowsSelected = selectableSuccessRows.length > 0 && selectedSuccessRowIds.length === selectableSuccessRows.length;
|
||||
@@ -882,7 +890,7 @@ export function BaseballTicketBayPlayAppView({ onBack, launchContext = 'direct',
|
||||
}
|
||||
|
||||
if (accessScope === 'all') {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
return targetClientId === clientId;
|
||||
@@ -976,13 +984,17 @@ export function BaseballTicketBayPlayAppView({ onBack, launchContext = 'direct',
|
||||
};
|
||||
|
||||
const appendLog = (
|
||||
item: Pick<AlertLogItem, 'alertId' | 'alertTitle' | 'action' | 'status' | 'message' | 'detail'>,
|
||||
item: Pick<AlertLogItem, 'alertId' | 'alertTitle' | 'action' | 'status' | 'message' | 'detail'>
|
||||
& Partial<Pick<AlertLogItem, 'ownerType' | 'ownerId' | 'ownerLabel'>>,
|
||||
) => {
|
||||
setLogs((previous) => [
|
||||
{
|
||||
id: createId('log'),
|
||||
clientId,
|
||||
createdAt: new Date().toISOString(),
|
||||
ownerType: 'client',
|
||||
ownerId: clientId,
|
||||
ownerLabel: null,
|
||||
...item,
|
||||
},
|
||||
...previous,
|
||||
@@ -1027,6 +1039,9 @@ export function BaseballTicketBayPlayAppView({ onBack, launchContext = 'direct',
|
||||
status: 'error',
|
||||
message: error instanceof Error ? error.message : '즉시 실행에 실패했습니다.',
|
||||
detail: buildAlertSummary(alert),
|
||||
ownerType: alert.ownerType,
|
||||
ownerId: alert.ownerId,
|
||||
ownerLabel: alert.ownerLabel ?? null,
|
||||
});
|
||||
messageApi.error(error instanceof Error ? error.message : '즉시 실행에 실패했습니다.');
|
||||
} finally {
|
||||
@@ -1618,7 +1633,7 @@ export function BaseballTicketBayPlayAppView({ onBack, launchContext = 'direct',
|
||||
<strong>{item.ticketTitle}</strong>
|
||||
<div className="baseball-ticket-bay-app__success-item-top-tags">
|
||||
{isViewingAllClients || isSharedTokenScope ? (
|
||||
<Tag bordered={false}>{formatOwnershipLabel(item.ownerType, item.ownerId, item.clientId)}</Tag>
|
||||
<Tag bordered={false}>{formatOwnershipLabel(item.ownerType, item.ownerId, item.clientId, item.ownerLabel)}</Tag>
|
||||
) : null}
|
||||
<Tag bordered={false} color="green">
|
||||
성공
|
||||
@@ -1651,7 +1666,7 @@ export function BaseballTicketBayPlayAppView({ onBack, launchContext = 'direct',
|
||||
</Tag>
|
||||
{isViewingAllClients || isSharedTokenScope ? (
|
||||
<Tag bordered={false}>
|
||||
{formatOwnershipLabel(selectedSuccessRow.ownerType, selectedSuccessRow.ownerId, selectedSuccessRow.clientId)}
|
||||
{formatOwnershipLabel(selectedSuccessRow.ownerType, selectedSuccessRow.ownerId, selectedSuccessRow.clientId, selectedSuccessRow.ownerLabel)}
|
||||
</Tag>
|
||||
) : null}
|
||||
<Button
|
||||
@@ -2043,7 +2058,7 @@ export function BaseballTicketBayPlayAppView({ onBack, launchContext = 'direct',
|
||||
</div>
|
||||
{isViewingAllClients || isSharedTokenScope ? (
|
||||
<div className="baseball-ticket-bay-app__scope-note">
|
||||
{isSharedTokenScope ? '현재 공유 토큰 기준으로 목록을 표시합니다.' : '등록 토큰으로 전체 기기 목록을 보고 있습니다. 수정과 삭제는 현재 기기 항목만 가능합니다.'}
|
||||
{isSharedTokenScope ? '현재 공유 리소스 별명 기준으로 목록을 표시합니다.' : '등록 토큰으로 전체 기기 목록을 보고 있습니다. 리소스 별명으로 확인하고 수정과 삭제도 바로 할 수 있습니다.'}
|
||||
</div>
|
||||
) : null}
|
||||
<div className="baseball-ticket-bay-app__items">
|
||||
@@ -2063,7 +2078,7 @@ export function BaseballTicketBayPlayAppView({ onBack, launchContext = 'direct',
|
||||
<div className="baseball-ticket-bay-app__item-tags">
|
||||
{isViewingAllClients || isSharedTokenScope ? (
|
||||
<Tag bordered={false} color={isOwnedByCurrentClient ? 'blue' : 'default'}>
|
||||
{formatOwnershipLabel(item.ownerType, item.ownerId, item.clientId)}
|
||||
{formatOwnershipLabel(item.ownerType, item.ownerId, item.clientId, item.ownerLabel)}
|
||||
</Tag>
|
||||
) : null}
|
||||
<Tag bordered={false} color={item.active ? 'green' : 'default'}>
|
||||
@@ -2168,7 +2183,7 @@ export function BaseballTicketBayPlayAppView({ onBack, launchContext = 'direct',
|
||||
<strong>{item.alertTitle}</strong>
|
||||
{isViewingAllClients || isSharedTokenScope ? (
|
||||
<span className="baseball-ticket-bay-app__log-client">
|
||||
{formatOwnershipLabel(item.ownerType, item.ownerId, item.clientId)}
|
||||
{formatOwnershipLabel(item.ownerType, item.ownerId, item.clientId, item.ownerLabel)}
|
||||
</span>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
@@ -16,6 +16,7 @@ export type BaseballTicketBayAlertItem = {
|
||||
clientId: string;
|
||||
ownerType: 'client' | 'shared-token';
|
||||
ownerId: string;
|
||||
ownerLabel?: string | null;
|
||||
title: string;
|
||||
eventDate: string;
|
||||
team: string;
|
||||
@@ -92,6 +93,7 @@ export type BaseballTicketBayAlertLogItem = {
|
||||
clientId: string;
|
||||
ownerType: 'client' | 'shared-token';
|
||||
ownerId: string;
|
||||
ownerLabel?: string | null;
|
||||
alertId: string | null;
|
||||
alertTitle: string;
|
||||
action: 'create' | 'run' | 'pause' | 'resume' | 'delete' | 'push';
|
||||
@@ -104,7 +106,7 @@ export type BaseballTicketBayAlertLogItem = {
|
||||
|
||||
type BaseballTicketBayAlertMutation = Omit<
|
||||
BaseballTicketBayAlertItem,
|
||||
'id' | 'clientId' | 'ownerType' | 'ownerId' | 'createdAt' | 'updatedAt' | 'lastRunAt' | 'lastMatchAt'
|
||||
'id' | 'clientId' | 'ownerType' | 'ownerId' | 'ownerLabel' | 'createdAt' | 'updatedAt' | 'lastRunAt' | 'lastMatchAt'
|
||||
>;
|
||||
|
||||
type BaseballTicketBayAlertsResponse = {
|
||||
|
||||
Reference in New Issue
Block a user