PMCORE-1487

This commit is contained in:
Paula Quispe
2020-05-25 12:57:58 -04:00
parent 283794ca23
commit 9ea1554ef3
5 changed files with 164 additions and 1 deletions

View File

@@ -571,6 +571,14 @@ class Ajax
// Review if the case was cancelled, true if the case was cancelled
$result->status = ($response->status_code == 0) ? true : false;
$result->msg = $response->message;
// Register in cases notes
if (!empty($_POST['NOTE_REASON'])) {
$appNotes = new AppNotes();
$noteContent = addslashes($_POST['NOTE_REASON']);
$appNotes->postNewNote(
$appUid, $usrUid, $noteContent, $_POST['NOTIFY_CANCEL']
);
}
} else {
$result->status = false;
$result->msg = G::LoadTranslation("ID_CASE_USER_INVALID_CANCEL_CASE", [$usrUid]);

View File

@@ -0,0 +1,11 @@
<?php
namespace ProcessMaker\Model;
use Illuminate\Database\Eloquent\Model;
class AppNotes extends Model
{
protected $table = 'APP_NOTES';
public $timestamps = false;
}

View File

@@ -1073,7 +1073,7 @@ Ext.onReady(function(){
params: {
action: 'cancelCase',
NOTE_REASON: noteReasonTxt,
NOTIFY_PAUSE: notifyReasonVal
NOTIFY_CANCEL: notifyReasonVal
},
success: function (result, request) {
try {