RED-10373 - fixed bulk remove for multiple text redactions by splitting them into multiple requests as bulk endpoint do not support a list of redactions
This commit is contained in:
parent
bf04423524
commit
86eeab5e69
@ -504,7 +504,7 @@ export class AnnotationActionsService {
|
||||
return;
|
||||
}
|
||||
|
||||
if (redactions[0].AREA && bulkLocal) {
|
||||
if (bulkLocal) {
|
||||
const promises = [];
|
||||
for (const request of body) {
|
||||
promises.push(
|
||||
@ -587,10 +587,9 @@ export class AnnotationActionsService {
|
||||
dialogResult: RemoveRedactionResult,
|
||||
): List<IRemoveRedactionRequest | IBulkLocalRemoveRequest> {
|
||||
if (dialogResult.bulkLocal || !!dialogResult.pageNumbers.length) {
|
||||
const redaction = redactions[0];
|
||||
return dialogResult.positions.map(position => ({
|
||||
value: redaction.value,
|
||||
rectangle: redaction.AREA,
|
||||
return dialogResult.positions.map((position, index) => ({
|
||||
value: redactions[index].value,
|
||||
rectangle: redactions[index].AREA,
|
||||
pageNumbers: dialogResult.pageNumbers,
|
||||
position: position,
|
||||
comment: dialogResult.comment,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user