Commentable
A mixin for threads and comments. Currently the following types are commentable: data_collection__captured_values, data_collection__linked_steps, dynamic_content__content, profile, question
Method Summary
Public Methods | ||
public |
This is a quick way of creating a thread and a comment for this particular object |
|
public |
getComments(cacheMode: String): Promise<Thread[]> Returns comments based on the current object. |
|
public |
Initializer for the mixin class |
|
public |
reply(text: *, thread: *, author: *, cacheMode: *): * |
Public Methods
public addComment(text: String, author: User, cacheMode: String): Promise<Thread> source
This is a quick way of creating a thread and a comment for this particular object
Example:
// obj is an instantiated Object inheriting the mixin Commentable
obj.addComment('hello world');
// using other options
import { User } from 'clinical6';
const someOtherUser = new User();
obj.addComment('hello world', someOtherUser, 'networkFirst');
public getComments(cacheMode: String): Promise<Thread[]> source
Returns comments based on the current object.
Params:
Name | Type | Attribute | Description |
cacheMode | String | The cache mode for this call |
public reply(text: *, thread: *, author: *, cacheMode: *): * source
Params:
Name | Type | Attribute | Description |
text | * | ||
thread | * | ||
author | * |
|
|
cacheMode | * |
|
Return:
* |