このコミットが含まれているのは:
@@ -175,13 +175,33 @@ export const mergeImportResults = (
|
||||
const resultMap = new Map (results.map (row => [row.sourceRow, row]))
|
||||
return rows.map (row => {
|
||||
const result = resultMap.get (row.sourceRow)
|
||||
return result
|
||||
? {
|
||||
if (result == null)
|
||||
return row
|
||||
|
||||
switch (result.status)
|
||||
{
|
||||
case 'created':
|
||||
return {
|
||||
...row,
|
||||
importStatus: result.status,
|
||||
importStatus: 'created',
|
||||
createdPostId: result.post?.id,
|
||||
existingPostId: undefined,
|
||||
importErrors: result.errors }
|
||||
: row
|
||||
case 'skipped':
|
||||
return {
|
||||
...row,
|
||||
importStatus: 'skipped',
|
||||
createdPostId: undefined,
|
||||
existingPostId: result.existingPostId,
|
||||
importErrors: result.errors }
|
||||
case 'failed':
|
||||
return {
|
||||
...row,
|
||||
importStatus: 'failed',
|
||||
createdPostId: undefined,
|
||||
existingPostId: undefined,
|
||||
importErrors: result.errors }
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
新しい課題から参照
ユーザをブロックする