PMCORE-1542

This commit is contained in:
Paula Quispe
2020-06-04 10:38:48 -04:00
parent 41962dd5d0
commit 2757bf7f64
21 changed files with 781 additions and 147 deletions

View File

@@ -3420,16 +3420,17 @@ class WsBase
/**
* Add case note
*
* @param string caseUid : ID of the case.
* @param string processUid : ID of the process.
* @param string taskUid : ID of the task.
* @param string userUid : The unique ID of the user who will add note case.
* @param string note : Note of the case.
* @param int sendMail : Optional parameter. If set to 1, will send an email to all participants in the case.
* @param string $caseUid, ID of the case.
* @param string $processUid, ID of the process.
* @param string $taskUid, ID of the task.
* @param string $userUid, The unique ID of the user who will add note case.
* @param string $note, Note of the case.
* @param int $sendMail, Optional parameter. If set to 1, will send an email to all participants in the case.
* @param array $files, Optional parameter. This is an array of files.
*
* @return $result will return an object
* @return object
*/
public function addCaseNote($caseUid, $processUid, $taskUid, $userUid, $note, $sendMail = 1)
public function addCaseNote($caseUid, $processUid, $taskUid, $userUid, $note, $sendMail = 1, $files = [])
{
try {
if (empty($caseUid)) {
@@ -3474,8 +3475,8 @@ class WsBase
}
//Add note case
$appNote = new AppNotes();
$response = $appNote->addCaseNote($caseUid, $userUid, $note, $sendMail);
$appNote = new ProcessMaker\BusinessModel\Cases();
$response = $appNote->addNote($caseUid, $userUid, $note, $sendMail, $files);
//Response
$result = new WsResponse(0, G::LoadTranslation("ID_COMMAND_EXECUTED_SUCCESSFULLY"));