diff --git a/resources/assets/js/components/utils/CustomTooltip.vue b/resources/assets/js/components/utils/CustomTooltip.vue index af58b271b..111ed8cb0 100644 --- a/resources/assets/js/components/utils/CustomTooltip.vue +++ b/resources/assets/js/components/utils/CustomTooltip.vue @@ -12,8 +12,10 @@ v-if="showTooltip" > {{ labelTooltip }} -

- {{ labelDescription }} +

+ {{ labelName }} + : + {{ labelDescription }}

@@ -30,6 +32,7 @@ export default { data() { return { labelTooltip: "", + labelName: "", labelDescription: "", hovering: "", show: false, @@ -58,6 +61,7 @@ export default { */ unhoverHandler() { this.labelTooltip = ""; + this.labelName = ""; this.labelDescription = ""; this.showTooltip = false; this.isLoading = false; @@ -81,6 +85,7 @@ export default { that.showTooltip = true; that.isLoading = false; that.labelTooltip = response.data.label; + that.labelName = response.data.name; that.labelDescription = response.data.description; }); } diff --git a/workflow/engine/methods/emailServer/emailServerAjax.php b/workflow/engine/methods/emailServer/emailServerAjax.php index 9a6072cf2..a689a50f2 100644 --- a/workflow/engine/methods/emailServer/emailServerAjax.php +++ b/workflow/engine/methods/emailServer/emailServerAjax.php @@ -265,10 +265,27 @@ switch ($option) { $gmailOAuth->setSendTestMail((int) $_POST['sendTestMail']); $gmailOAuth->setMailTo($_POST['mailTo']); $gmailOAuth->setSetDefaultConfiguration((int) $_POST['setDefaultConfiguration']); + // Audit log parameters + $action = "CreateEmailSettings"; + $content = "SetDefaultConfiguration-> " . $_POST['setDefaultConfiguration']; if (!empty($_POST['emailServerUid'])) { $gmailOAuth->setEmailServerUid($_POST['emailServerUid']); + // Audit log parameters + $action = "UpdateEmailSettings"; + $content = "EmailServer-> " . $_POST['emailServerUid'] . + ", SetDefaultConfiguration-> " . $_POST['setDefaultConfiguration']; } $client = $gmailOAuth->getGoogleClient(); + // Register the log + G::auditLog( + $action, + $content . + ", EmailEngine-> " . $_POST['emailEngine'] . + ", Server-> " . $_POST['server'] . + ", Port-> " . $_POST['port'] . + ", FromMail-> " . $_POST['senderEmail'] . + ", FromName-> " . $_POST['senderName'] + ); $response = [ "status" => 200, "data" => $client->createAuthUrl() @@ -296,11 +313,27 @@ switch ($option) { $office365OAuth->setSendTestMail((int) $_POST['sendTestMail']); $office365OAuth->setMailTo($_POST['mailTo']); $office365OAuth->setSetDefaultConfiguration((int) $_POST['setDefaultConfiguration']); - + // Audit log parameters + $action = "CreateEmailSettings"; + $content = "SetDefaultConfiguration-> " . $_POST['setDefaultConfiguration']; if (!empty($_POST['emailServerUid'])) { $office365OAuth->setEmailServerUid($_POST['emailServerUid']); + // Audit log parameters + $action = "UpdateEmailSettings"; + $content = "EmailServer-> " . $_POST['emailServerUid'] . + ", SetDefaultConfiguration-> " . $_POST['setDefaultConfiguration']; } $client = $office365OAuth->getOffice365Client(); + // Register the log + G::auditLog( + $action, + $content . + ", EmailEngine-> " . $_POST['emailEngine'] . + ", Server-> " . $_POST['server'] . + ", Port-> " . $_POST['port'] . + ", FromMail-> " . $_POST['senderEmail'] . + ", FromName-> " . $_POST['senderName'] + ); $response = [ "status" => 200, "data" => $client->getAuthorizationUrl($office365OAuth->getOptions()) diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Cases/Unassigned.php b/workflow/engine/src/ProcessMaker/BusinessModel/Cases/Unassigned.php index 6a47bf7a2..c43a13f35 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Cases/Unassigned.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Cases/Unassigned.php @@ -250,7 +250,7 @@ class Unassigned extends AbstractCases { $caseList = CaseList::getCaseList($id, $type); $query = Delegation::query()->select(); - $query->selfService($this->getUserId()); + $query->selfService($this->getUserUid()); $name = ''; $description = ''; diff --git a/workflow/engine/src/ProcessMaker/Model/Delegation.php b/workflow/engine/src/ProcessMaker/Model/Delegation.php index 9e668dd47..320ed211e 100644 --- a/workflow/engine/src/ProcessMaker/Model/Delegation.php +++ b/workflow/engine/src/ProcessMaker/Model/Delegation.php @@ -791,18 +791,18 @@ class Delegation extends Model * Scope a self service cases * * @param \Illuminate\Database\Eloquent\Builder $query - * @param string $user + * @param string $usrUid * * @return \Illuminate\Database\Eloquent\Builder */ - public function scopeSelfService($query, $user) + public function scopeSelfService($query, string $usrUid) { // Add Join with task filtering only the type self-service $query->taskAssignType('SELF_SERVICE'); // Filtering the open threads and without users $query->threadOpen()->withoutUserId(); // Filtering the cases unassigned that the user can view - $this->casesUnassigned($query, $user); + $this->casesUnassigned($query, $usrUid); return $query; } @@ -1135,7 +1135,7 @@ class Delegation extends Model * * @return \Illuminate\Database\Eloquent\Builder */ - public function casesUnassigned(&$query, $usrUid) + public function casesUnassigned(&$query, string $usrUid) { // Get the task self services related to the user $taskSelfService = TaskUser::getSelfServicePerUser($usrUid); diff --git a/workflow/engine/src/ProcessMaker/Model/TaskUser.php b/workflow/engine/src/ProcessMaker/Model/TaskUser.php index b14fca6cf..d28692c08 100644 --- a/workflow/engine/src/ProcessMaker/Model/TaskUser.php +++ b/workflow/engine/src/ProcessMaker/Model/TaskUser.php @@ -62,7 +62,7 @@ class TaskUser extends Model * * @return array */ - public static function getSelfServicePerUser($usrUid) + public static function getSelfServicePerUser(string $usrUid) { //Get the groups related to the user $groups = GroupUser::getGroups($usrUid, 'GRP_UID');