このコミットが含まれているのは:
@@ -10,6 +10,7 @@ type Props = {
|
||||
|
||||
const LABELS: Record<PostImportBadgeValue, string> = {
|
||||
ready: '登録可能',
|
||||
error: '登録不可',
|
||||
warning: '警告',
|
||||
skipped: 'スキップ',
|
||||
created: '登録済み',
|
||||
@@ -17,6 +18,7 @@ const LABELS: Record<PostImportBadgeValue, string> = {
|
||||
|
||||
const TONES: Record<PostImportBadgeValue, StatusBadgeTone> = {
|
||||
ready: 'success',
|
||||
error: 'warning',
|
||||
warning: 'warning',
|
||||
skipped: 'neutral',
|
||||
created: 'success',
|
||||
|
||||
@@ -2,6 +2,7 @@ import type { PostImportRow } from '@/lib/postImportSession'
|
||||
|
||||
export type PostImportDisplayStatus =
|
||||
'ready'
|
||||
| 'error'
|
||||
| 'skipped'
|
||||
| 'warning'
|
||||
| 'created'
|
||||
@@ -18,13 +19,16 @@ export const displayPostImportStatus = (
|
||||
): PostImportDisplayStatus | null =>
|
||||
row.status === 'pending'
|
||||
? null
|
||||
: (row.importStatus === 'failed')
|
||||
? 'failed'
|
||||
: (row.skipReason != null || row.importStatus === 'skipped')
|
||||
? 'skipped'
|
||||
: (row.importStatus === 'created')
|
||||
? 'created'
|
||||
: ((Object.keys (row.validationErrors ?? { }).length > 0
|
||||
|| row.importStatus === 'failed')
|
||||
? 'failed'
|
||||
: ((hasWarnings (row) || row.status === 'warning')
|
||||
? 'warning'
|
||||
: 'ready'))
|
||||
: (row.status === 'error')
|
||||
? 'error'
|
||||
: (Object.values (row.validationErrors ?? { }).some (messages => messages.length > 0))
|
||||
? 'error'
|
||||
: ((hasWarnings (row) || row.status === 'warning')
|
||||
? 'warning'
|
||||
: 'ready')
|
||||
|
||||
新しい課題から参照
ユーザをブロックする