Revize a547b12c
Přidáno uživatelem Lukáš Vlček před více než 2 roky(ů)
webapp/contexts/AnnotationContext.tsx | ||
---|---|---|
79 | 79 |
*/ |
80 | 80 |
changeSentiment: (occurrence: TagInstanceInfo, newValue: ETagSentiment) => void; |
81 | 81 |
|
82 |
makeOccurrenceFinal: (occurrence: TagInstanceInfo) => void; |
|
82 |
makeOccurrenceFinal: (occurrence: TagInstanceInfo, final: boolean) => void;
|
|
83 | 83 |
|
84 | 84 |
annotation: AnnotationInfo | null; |
85 | 85 |
mappedTags: Tag[] | null; |
... | ... | |
206 | 206 |
}, |
207 | 207 |
|
208 | 208 |
isFinal: false, |
209 |
makeOccurrenceFinal: (occurrence: TagInstanceInfo) => { |
|
209 |
makeOccurrenceFinal: (occurrence: TagInstanceInfo, final: boolean) => {
|
|
210 | 210 |
return; |
211 | 211 |
}, |
212 | 212 |
}); |
... | ... | |
425 | 425 |
setMappedTags(Array.from(map.values())); |
426 | 426 |
}; |
427 | 427 |
|
428 |
async function makeOccurrenceFinal(occurrence: TagInstanceInfo) { |
|
428 |
async function makeOccurrenceFinal( |
|
429 |
occurrence: TagInstanceInfo, |
|
430 |
final: boolean = true |
|
431 |
) { |
|
429 | 432 |
if (!occurrence?.occurenceId) { |
430 | 433 |
return; |
431 | 434 |
} |
... | ... | |
433 | 436 |
await annotationController.annotationAnnotationIdOccurenceIdFinalPut( |
434 | 437 |
props.annotationId, |
435 | 438 |
occurrence.occurenceId, |
436 |
{ isFinal: true }
|
|
439 |
{ isFinal: final }
|
|
437 | 440 |
); |
438 | 441 |
|
439 | 442 |
await refreshAnnotation(); |
Také k dispozici: Unified diff
Occurrence - like canceling