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"
>
{{ labelTooltip }}
<p v-if="labelDescription !== ''">
{{ labelDescription }}
<p v-if="labelName !== '' || labelDescription !== ''">
<span v-if="labelName !== ''">{{ labelName }}</span>
<span v-if="labelName !== '' && labelDescription !== ''">:</span>
<span v-if="labelDescription !== ''">{{ labelDescription }}</span>
</p>
</b-tooltip>
</span>
@@ -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;
});
}

View File

@@ -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())

View File

@@ -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 = '';

View File

@@ -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);

View File

@@ -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');