Skip to content

Commit 94da344

Browse files
committed
OpenConceptLab/ocl_issues#2183 | fixing reject log
1 parent 344b754 commit 94da344

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/components/map-projects/Discuss.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ import orderBy from 'lodash/orderBy'
2525
const Discuss = ({ logs, onAdd }) => {
2626
const [comment, setComment] = React.useState('')
2727
const getTitle = log => {
28-
if(['mapped', 'unmapped', 'auto-matched'].includes(log.action)) {
29-
return `${startCase(log.action)}: ${log.extras.name} (${log.extras.map_type || log.extras.mapType})`
28+
if(['mapped', 'unmapped', 'auto-matched', 'rejected'].includes(log.action)) {
29+
let description = `${startCase(log.action)}: ${log.extras.name}`
30+
if(log?.extras?.map_type || log?.extras?.mapType) {
31+
description += ` (${log.extras.map_type || log.extras.mapType})`
32+
}
33+
return description
3034
}
3135
if(['commented'].includes(log.action)) {
3236
return <b>{log.description}</b>

src/components/map-projects/MapProject.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ const MapProject = () => {
984984
if(notes[rowIndex])
985985
comment = notes[rowIndex] + '\n' + comment
986986
setNotes({...notes, [rowIndex]: comment})
987-
log({action: newValue, description: comment, extras: {object_url: selected?.url, name: conceptLabel}})
987+
log({action: newValue, description: comment, extras: {object_url: selected?.url, name: conceptLabel, mapType: mapTypes[rowIndex] || undefined}})
988988
logged = true
989989
} else {
990990
log({action: newValue})

0 commit comments

Comments
 (0)