Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 61acc160

Přidáno uživatelem Dominik Poch před asi 2 roky(ů)

Added note of a document

Zobrazit rozdíly:

webapp/contexts/AnnotationContext.tsx
58 58
     */
59 59
    changeLength: (occurrence: TagInstanceInfo, newValue: number) => void;
60 60

  
61
    changeDocumentNote: (newValue: string) => void;
62

  
61 63
    /**
62 64
     * Changes a note of an occurrence of an annotation.
63 65
     * @param occurrence Occurrence whose note should be changed.
......
139 141
        return;
140 142
    },
141 143

  
144
    changeDocumentNote: (newValue: string) => {
145
        return;
146
    },
147

  
142 148
    /**
143 149
     * Changes a note of an occurrence of an annotation.
144 150
     * @param occurrence Occurrence whose note should be changed.
......
272 278
        //TODO: Implement method (should use objects from server API)
273 279
    };
274 280

  
281
    const changeDocumentNote = async (newValue: string) => {
282
        const posRes = await annotationController.annotationAnnotationIdNotePost(
283
            props.annotationId,
284
            { note: newValue }
285
        );
286

  
287
        if (annotation) {
288
            annotation.note = newValue;
289
        }
290
    };
291

  
275 292
    /**
276 293
     * Changes a note of an occurrence of an annotation.
277 294
     * @param occurrence Occurrence whose note should be changed.
......
366 383
                deleteOccurrence,
367 384
                changeLength,
368 385
                changePosition,
386
                changeDocumentNote,
369 387
                changeNote,
370 388
                changeSentiment,
371 389
                refreshAnnotation,

Také k dispozici: Unified diff