Merged in release/3.7.6 (pull request #8496)

Updating develop branch with last changes in release/3.7.6 - Second round
This commit is contained in:
Julio Cesar Laura Avendaño
2022-07-12 14:33:34 +00:00
5 changed files with 47 additions and 9 deletions

View File

@@ -12,8 +12,10 @@
v-if="showTooltip" v-if="showTooltip"
> >
{{ labelTooltip }} {{ labelTooltip }}
<p v-if="labelDescription !== ''"> <p v-if="labelName !== '' || labelDescription !== ''">
{{ labelDescription }} <span v-if="labelName !== ''">{{ labelName }}</span>
<span v-if="labelName !== '' && labelDescription !== ''">:</span>
<span v-if="labelDescription !== ''">{{ labelDescription }}</span>
</p> </p>
</b-tooltip> </b-tooltip>
</span> </span>
@@ -30,6 +32,7 @@ export default {
data() { data() {
return { return {
labelTooltip: "", labelTooltip: "",
labelName: "",
labelDescription: "", labelDescription: "",
hovering: "", hovering: "",
show: false, show: false,
@@ -58,6 +61,7 @@ export default {
*/ */
unhoverHandler() { unhoverHandler() {
this.labelTooltip = ""; this.labelTooltip = "";
this.labelName = "";
this.labelDescription = ""; this.labelDescription = "";
this.showTooltip = false; this.showTooltip = false;
this.isLoading = false; this.isLoading = false;
@@ -81,6 +85,7 @@ export default {
that.showTooltip = true; that.showTooltip = true;
that.isLoading = false; that.isLoading = false;
that.labelTooltip = response.data.label; that.labelTooltip = response.data.label;
that.labelName = response.data.name;
that.labelDescription = response.data.description; that.labelDescription = response.data.description;
}); });
} }

View File

@@ -265,10 +265,27 @@ switch ($option) {
$gmailOAuth->setSendTestMail((int) $_POST['sendTestMail']); $gmailOAuth->setSendTestMail((int) $_POST['sendTestMail']);
$gmailOAuth->setMailTo($_POST['mailTo']); $gmailOAuth->setMailTo($_POST['mailTo']);
$gmailOAuth->setSetDefaultConfiguration((int) $_POST['setDefaultConfiguration']); $gmailOAuth->setSetDefaultConfiguration((int) $_POST['setDefaultConfiguration']);
// Audit log parameters
$action = "CreateEmailSettings";
$content = "SetDefaultConfiguration-> " . $_POST['setDefaultConfiguration'];
if (!empty($_POST['emailServerUid'])) { if (!empty($_POST['emailServerUid'])) {
$gmailOAuth->setEmailServerUid($_POST['emailServerUid']); $gmailOAuth->setEmailServerUid($_POST['emailServerUid']);
// Audit log parameters
$action = "UpdateEmailSettings";
$content = "EmailServer-> " . $_POST['emailServerUid'] .
", SetDefaultConfiguration-> " . $_POST['setDefaultConfiguration'];
} }
$client = $gmailOAuth->getGoogleClient(); $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 = [ $response = [
"status" => 200, "status" => 200,
"data" => $client->createAuthUrl() "data" => $client->createAuthUrl()
@@ -296,11 +313,27 @@ switch ($option) {
$office365OAuth->setSendTestMail((int) $_POST['sendTestMail']); $office365OAuth->setSendTestMail((int) $_POST['sendTestMail']);
$office365OAuth->setMailTo($_POST['mailTo']); $office365OAuth->setMailTo($_POST['mailTo']);
$office365OAuth->setSetDefaultConfiguration((int) $_POST['setDefaultConfiguration']); $office365OAuth->setSetDefaultConfiguration((int) $_POST['setDefaultConfiguration']);
// Audit log parameters
$action = "CreateEmailSettings";
$content = "SetDefaultConfiguration-> " . $_POST['setDefaultConfiguration'];
if (!empty($_POST['emailServerUid'])) { if (!empty($_POST['emailServerUid'])) {
$office365OAuth->setEmailServerUid($_POST['emailServerUid']); $office365OAuth->setEmailServerUid($_POST['emailServerUid']);
// Audit log parameters
$action = "UpdateEmailSettings";
$content = "EmailServer-> " . $_POST['emailServerUid'] .
", SetDefaultConfiguration-> " . $_POST['setDefaultConfiguration'];
} }
$client = $office365OAuth->getOffice365Client(); $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 = [ $response = [
"status" => 200, "status" => 200,
"data" => $client->getAuthorizationUrl($office365OAuth->getOptions()) "data" => $client->getAuthorizationUrl($office365OAuth->getOptions())

View File

@@ -250,7 +250,7 @@ class Unassigned extends AbstractCases
{ {
$caseList = CaseList::getCaseList($id, $type); $caseList = CaseList::getCaseList($id, $type);
$query = Delegation::query()->select(); $query = Delegation::query()->select();
$query->selfService($this->getUserId()); $query->selfService($this->getUserUid());
$name = ''; $name = '';
$description = ''; $description = '';

View File

@@ -791,18 +791,18 @@ class Delegation extends Model
* Scope a self service cases * Scope a self service cases
* *
* @param \Illuminate\Database\Eloquent\Builder $query * @param \Illuminate\Database\Eloquent\Builder $query
* @param string $user * @param string $usrUid
* *
* @return \Illuminate\Database\Eloquent\Builder * @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 // Add Join with task filtering only the type self-service
$query->taskAssignType('SELF_SERVICE'); $query->taskAssignType('SELF_SERVICE');
// Filtering the open threads and without users // Filtering the open threads and without users
$query->threadOpen()->withoutUserId(); $query->threadOpen()->withoutUserId();
// Filtering the cases unassigned that the user can view // Filtering the cases unassigned that the user can view
$this->casesUnassigned($query, $user); $this->casesUnassigned($query, $usrUid);
return $query; return $query;
} }
@@ -1135,7 +1135,7 @@ class Delegation extends Model
* *
* @return \Illuminate\Database\Eloquent\Builder * @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 // Get the task self services related to the user
$taskSelfService = TaskUser::getSelfServicePerUser($usrUid); $taskSelfService = TaskUser::getSelfServicePerUser($usrUid);

View File

@@ -62,7 +62,7 @@ class TaskUser extends Model
* *
* @return array * @return array
*/ */
public static function getSelfServicePerUser($usrUid) public static function getSelfServicePerUser(string $usrUid)
{ {
//Get the groups related to the user //Get the groups related to the user
$groups = GroupUser::getGroups($usrUid, 'GRP_UID'); $groups = GroupUser::getGroups($usrUid, 'GRP_UID');