Revize 9fdb7d55
Přidáno uživatelem Lukáš Vlček před asi 2 roky(ů)
webapp/contexts/AnnotationContext.tsx | ||
---|---|---|
181 | 181 |
length: selectionInfo.selectionLengthOriginalDocument, |
182 | 182 |
} |
183 | 183 |
); |
184 |
console.log('res'); |
|
185 |
console.log(res); |
|
186 | 184 |
|
187 | 185 |
await refreshAnnotation(); |
188 | 186 |
} |
... | ... | |
207 | 205 |
* Deletes an occurrence of an annotation. |
208 | 206 |
* @param occurrence Occurrence that should be deleted. |
209 | 207 |
*/ |
210 |
const deleteOccurrence = (occurrence: TagInstanceInfo) => { |
|
211 |
//TODO: Implement method (should use objects from server API) |
|
208 |
const deleteOccurrence = async (occurrence: TagInstanceInfo) => { |
|
209 |
if (!occurrence.occurenceId) { |
|
210 |
console.log('invalid occurrence'); |
|
211 |
return; |
|
212 |
} |
|
213 |
|
|
214 |
const deleteRes = |
|
215 |
await annotationController.annotationAnnotationIdOccurenceIdDelete( |
|
216 |
props.annotationId, |
|
217 |
occurrence.occurenceId |
|
218 |
); |
|
219 |
|
|
220 |
await refreshAnnotation(); |
|
212 | 221 |
}; |
213 | 222 |
|
214 | 223 |
/** |
Také k dispozici: Unified diff
Deleting occurences