Merged in develop (pull request #8497)
Updating feature branch with last changes in release/3.7.6 merged to develop
This commit is contained in:
@@ -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;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,6 +80,7 @@
|
|||||||
ref="modal-comments"
|
ref="modal-comments"
|
||||||
@postNotes="onPostNotes"
|
@postNotes="onPostNotes"
|
||||||
></ModalComments>
|
></ModalComments>
|
||||||
|
<ModalClaimCase ref="modal-claim-case" @claimCatch="claimCatch"></ModalClaimCase>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -87,6 +88,7 @@
|
|||||||
import HeaderCounter from "../../components/home/HeaderCounter.vue";
|
import HeaderCounter from "../../components/home/HeaderCounter.vue";
|
||||||
import ButtonFleft from "../../components/home/ButtonFleft.vue";
|
import ButtonFleft from "../../components/home/ButtonFleft.vue";
|
||||||
import ModalNewRequest from "../ModalNewRequest.vue";
|
import ModalNewRequest from "../ModalNewRequest.vue";
|
||||||
|
import ModalClaimCase from "../modal/ModalClaimCase.vue";
|
||||||
import MyCasesFilter from "../../components/search/MyCasesFilter";
|
import MyCasesFilter from "../../components/search/MyCasesFilter";
|
||||||
import ModalComments from "../modal/ModalComments.vue";
|
import ModalComments from "../modal/ModalComments.vue";
|
||||||
import GroupedCell from "../../components/vuetable/GroupedCell.vue";
|
import GroupedCell from "../../components/vuetable/GroupedCell.vue";
|
||||||
@@ -106,6 +108,7 @@ export default {
|
|||||||
ModalNewRequest,
|
ModalNewRequest,
|
||||||
GroupedCell,
|
GroupedCell,
|
||||||
ModalComments,
|
ModalComments,
|
||||||
|
ModalClaimCase,
|
||||||
ThreadTitleCell,
|
ThreadTitleCell,
|
||||||
},
|
},
|
||||||
props: ["defaultOption", "settings"],
|
props: ["defaultOption", "settings"],
|
||||||
@@ -293,6 +296,11 @@ export default {
|
|||||||
refresh: false,
|
refresh: false,
|
||||||
});
|
});
|
||||||
this.$emit("cleanDefaultOption");
|
this.$emit("cleanDefaultOption");
|
||||||
|
api.cases.pendingtask({APP_NUMBER:params.openapplicationuid}).then((response) => {
|
||||||
|
if (response.data && response.data[0] && response.data[0]['USR_ID'] == 0) {
|
||||||
|
this.claimCase(response.data[0]);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -758,6 +766,26 @@ export default {
|
|||||||
id: this.id
|
id: this.id
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Claim case
|
||||||
|
*
|
||||||
|
* @param {object} item
|
||||||
|
*/
|
||||||
|
claimCase(item) {
|
||||||
|
let that = this;
|
||||||
|
api.cases.open(_.extend({ ACTION: "unassigned" }, item)).then(() => {
|
||||||
|
api.cases.cases_open(_.extend({ ACTION: "todo" }, item)).then(() => {
|
||||||
|
that.$refs["modal-claim-case"].data = item;
|
||||||
|
that.$refs["modal-claim-case"].show();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* Claim catch error handler message
|
||||||
|
*/
|
||||||
|
claimCatch(message) {
|
||||||
|
this.showAlert(message, "danger");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -411,7 +411,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
// force to open case
|
// force to open case paused
|
||||||
this.openDefaultCase();
|
this.openDefaultCase();
|
||||||
Event.$on('vue-tables.paused.sorted', function (data) {
|
Event.$on('vue-tables.paused.sorted', function (data) {
|
||||||
that.$emit("updateSettings", {
|
that.$emit("updateSettings", {
|
||||||
@@ -475,7 +475,7 @@ export default {
|
|||||||
if(this.defaultOption) {
|
if(this.defaultOption) {
|
||||||
params = utils.getAllUrlParams(this.defaultOption);
|
params = utils.getAllUrlParams(this.defaultOption);
|
||||||
if (params && params.app_uid && params.del_index) {
|
if (params && params.app_uid && params.del_index) {
|
||||||
this.openCase({
|
this.showModalUnpauseCase({
|
||||||
APP_UID: params.app_uid,
|
APP_UID: params.app_uid,
|
||||||
DEL_INDEX: params.del_index
|
DEL_INDEX: params.del_index
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -458,6 +458,11 @@ export default {
|
|||||||
refresh: true
|
refresh: true
|
||||||
};
|
};
|
||||||
this.$emit("cleanDefaultOption");
|
this.$emit("cleanDefaultOption");
|
||||||
|
api.cases.pendingtask({APP_NUMBER:params.openapplicationuid}).then((response) => {
|
||||||
|
if (response.data && response.data.length == 1 && response.data[0] && response.data[0]['USR_ID'] == 0) {
|
||||||
|
this.claimCase(response.data[0]);
|
||||||
|
}
|
||||||
|
});
|
||||||
this.onUpdateFilters(filter);
|
this.onUpdateFilters(filter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6137,6 +6137,12 @@ msgstr "Delegation Date"
|
|||||||
msgid "Delete"
|
msgid "Delete"
|
||||||
msgstr "Delete"
|
msgstr "Delete"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_DELETE_EMAIL_SETTINGS
|
||||||
|
#: LABEL/ID_DELETE_EMAIL_SETTINGS
|
||||||
|
msgid "Delete Email Settings"
|
||||||
|
msgstr "Delete Email Settings"
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_DELETED
|
# LABEL/ID_DELETED
|
||||||
#: LABEL/ID_DELETED
|
#: LABEL/ID_DELETED
|
||||||
|
|||||||
@@ -57850,6 +57850,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
|||||||
( 'LABEL','ID_DELEGATE_USER','en','Delegated User','2014-01-15') ,
|
( 'LABEL','ID_DELEGATE_USER','en','Delegated User','2014-01-15') ,
|
||||||
( 'LABEL','ID_DELEGATION_DATE','en','Delegation Date','2014-01-15') ,
|
( 'LABEL','ID_DELEGATION_DATE','en','Delegation Date','2014-01-15') ,
|
||||||
( 'LABEL','ID_DELETE','en','Delete','2014-01-15') ,
|
( 'LABEL','ID_DELETE','en','Delete','2014-01-15') ,
|
||||||
|
( 'LABEL','ID_DELETE_EMAIL_SETTINGS','en','Delete Email Settings','2022-06-29') ,
|
||||||
( 'LABEL','ID_DELETED','en','Deleted','2014-01-15') ,
|
( 'LABEL','ID_DELETED','en','Deleted','2014-01-15') ,
|
||||||
( 'LABEL','ID_DELETED_SUCCESSFULLY','en','Deleted Successfully','2014-01-15') ,
|
( 'LABEL','ID_DELETED_SUCCESSFULLY','en','Deleted Successfully','2014-01-15') ,
|
||||||
( 'LABEL','ID_DELETE_ACTION','en','Delete case','2020-01-15') ,
|
( 'LABEL','ID_DELETE_ACTION','en','Delete case','2020-01-15') ,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use ProcessMaker\BusinessModel\EmailServer;
|
||||||
use ProcessMaker\Core\System;
|
use ProcessMaker\Core\System;
|
||||||
use ProcessMaker\GmailOAuth\GmailOAuth;
|
use ProcessMaker\GmailOAuth\GmailOAuth;
|
||||||
use ProcessMaker\Office365OAuth\Office365OAuth;
|
use ProcessMaker\Office365OAuth\Office365OAuth;
|
||||||
@@ -11,7 +12,6 @@ $RBAC->allows(basename(__FILE__), $option);
|
|||||||
switch ($option) {
|
switch ($option) {
|
||||||
case "INS":
|
case "INS":
|
||||||
$arrayData = [];
|
$arrayData = [];
|
||||||
|
|
||||||
$server = "";
|
$server = "";
|
||||||
$port = "";
|
$port = "";
|
||||||
$incomingServer = "";
|
$incomingServer = "";
|
||||||
@@ -19,7 +19,6 @@ switch ($option) {
|
|||||||
$reqAuthentication = 0;
|
$reqAuthentication = 0;
|
||||||
$password = "";
|
$password = "";
|
||||||
$smtpSecure = "";
|
$smtpSecure = "";
|
||||||
|
|
||||||
$cboEmailEngine = $_POST["cboEmailEngine"];
|
$cboEmailEngine = $_POST["cboEmailEngine"];
|
||||||
$accountFrom = (isset($_POST["accountFrom"])) ? $_POST["accountFrom"] : "";
|
$accountFrom = (isset($_POST["accountFrom"])) ? $_POST["accountFrom"] : "";
|
||||||
$fromName = $_POST["fromName"];
|
$fromName = $_POST["fromName"];
|
||||||
@@ -45,7 +44,7 @@ switch ($option) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$arrayData = array(
|
$arrayData = [
|
||||||
"MESS_ENGINE" => $cboEmailEngine,
|
"MESS_ENGINE" => $cboEmailEngine,
|
||||||
"MESS_SERVER" => $server,
|
"MESS_SERVER" => $server,
|
||||||
"MESS_PORT" => $port,
|
"MESS_PORT" => $port,
|
||||||
@@ -60,11 +59,22 @@ switch ($option) {
|
|||||||
"MESS_TRY_SEND_INMEDIATLY" => $sendTestMail,
|
"MESS_TRY_SEND_INMEDIATLY" => $sendTestMail,
|
||||||
"MAIL_TO" => $mailTo,
|
"MAIL_TO" => $mailTo,
|
||||||
"MESS_DEFAULT" => $emailServerDefault
|
"MESS_DEFAULT" => $emailServerDefault
|
||||||
);
|
];
|
||||||
|
|
||||||
$emailSever = new \ProcessMaker\BusinessModel\EmailServer();
|
|
||||||
|
|
||||||
|
$emailSever = new EmailServer();
|
||||||
$arrayEmailServerData = $emailSever->create($arrayData);
|
$arrayEmailServerData = $emailSever->create($arrayData);
|
||||||
|
// Register the log
|
||||||
|
G::auditLog(
|
||||||
|
"CreateEmailSettings",
|
||||||
|
"SetDefaultConfiguration-> " . $emailServerDefault .
|
||||||
|
", EmailEngine-> " . $cboEmailEngine .
|
||||||
|
", Server-> " . $server .
|
||||||
|
", Port-> " . $port .
|
||||||
|
", RequireAuthentication-> " . $reqAuthentication .
|
||||||
|
", FromMail-> " . $fromMail .
|
||||||
|
", FromName-> " . $fromName .
|
||||||
|
", UseSecureConnection-> " . $smtpSecure
|
||||||
|
);
|
||||||
|
|
||||||
$response["status"] = "OK";
|
$response["status"] = "OK";
|
||||||
$response["data"] = $arrayEmailServerData;
|
$response["data"] = $arrayEmailServerData;
|
||||||
@@ -75,9 +85,7 @@ switch ($option) {
|
|||||||
break;
|
break;
|
||||||
case "UPD":
|
case "UPD":
|
||||||
$arrayData = [];
|
$arrayData = [];
|
||||||
|
|
||||||
$emailServerUid = $_POST["emailServerUid"];
|
$emailServerUid = $_POST["emailServerUid"];
|
||||||
|
|
||||||
$server = "";
|
$server = "";
|
||||||
$port = "";
|
$port = "";
|
||||||
$incomingServer = "";
|
$incomingServer = "";
|
||||||
@@ -85,7 +93,6 @@ switch ($option) {
|
|||||||
$reqAuthentication = 0;
|
$reqAuthentication = 0;
|
||||||
$password = "";
|
$password = "";
|
||||||
$smtpSecure = "";
|
$smtpSecure = "";
|
||||||
|
|
||||||
$cboEmailEngine = $_POST["cboEmailEngine"];
|
$cboEmailEngine = $_POST["cboEmailEngine"];
|
||||||
$accountFrom = (isset($_POST["accountFrom"])) ? $_POST["accountFrom"] : "";
|
$accountFrom = (isset($_POST["accountFrom"])) ? $_POST["accountFrom"] : "";
|
||||||
$fromName = $_POST["fromName"];
|
$fromName = $_POST["fromName"];
|
||||||
@@ -111,7 +118,7 @@ switch ($option) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$arrayData = array(
|
$arrayData = [
|
||||||
"MESS_ENGINE" => $cboEmailEngine,
|
"MESS_ENGINE" => $cboEmailEngine,
|
||||||
"MESS_SERVER" => $server,
|
"MESS_SERVER" => $server,
|
||||||
"MESS_PORT" => $port,
|
"MESS_PORT" => $port,
|
||||||
@@ -126,11 +133,23 @@ switch ($option) {
|
|||||||
"MESS_TRY_SEND_INMEDIATLY" => $sendTestMail,
|
"MESS_TRY_SEND_INMEDIATLY" => $sendTestMail,
|
||||||
"MAIL_TO" => $mailTo,
|
"MAIL_TO" => $mailTo,
|
||||||
"MESS_DEFAULT" => $emailServerDefault
|
"MESS_DEFAULT" => $emailServerDefault
|
||||||
);
|
];
|
||||||
|
|
||||||
$emailSever = new \ProcessMaker\BusinessModel\EmailServer();
|
|
||||||
|
|
||||||
|
$emailSever = new EmailServer();
|
||||||
$arrayEmailServerData = $emailSever->update($emailServerUid, $arrayData);
|
$arrayEmailServerData = $emailSever->update($emailServerUid, $arrayData);
|
||||||
|
// Register the log
|
||||||
|
G::auditLog(
|
||||||
|
"UpdateEmailSettings",
|
||||||
|
"EmailServer-> " . $emailServerUid .
|
||||||
|
", SetDefaultConfiguration-> " . $emailServerDefault .
|
||||||
|
", EmailEngine-> " . $cboEmailEngine .
|
||||||
|
", Server-> " . $server .
|
||||||
|
", Port-> " . $port .
|
||||||
|
", RequireAuthentication-> " . $reqAuthentication .
|
||||||
|
", FromMail-> " . $fromMail .
|
||||||
|
", FromName-> " . $fromName .
|
||||||
|
", UseSecureConnection-> " . $smtpSecure
|
||||||
|
);
|
||||||
|
|
||||||
$response["status"] = "OK";
|
$response["status"] = "OK";
|
||||||
$response["data"] = $arrayEmailServerData;
|
$response["data"] = $arrayEmailServerData;
|
||||||
@@ -144,9 +163,13 @@ switch ($option) {
|
|||||||
$emailServerUid = $_POST["emailServerUid"];
|
$emailServerUid = $_POST["emailServerUid"];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$emailSever = new \ProcessMaker\BusinessModel\EmailServer();
|
$emailSever = new EmailServer();
|
||||||
|
|
||||||
$result = $emailSever->delete($emailServerUid);
|
$result = $emailSever->delete($emailServerUid);
|
||||||
|
// Register the log
|
||||||
|
G::auditLog(
|
||||||
|
"DeleteEmailSettings",
|
||||||
|
"EmailServer-> " . $emailServerUid
|
||||||
|
);
|
||||||
|
|
||||||
$response["status"] = "OK";
|
$response["status"] = "OK";
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
@@ -157,16 +180,14 @@ switch ($option) {
|
|||||||
case "LST":
|
case "LST":
|
||||||
$pageSize = $_POST["pageSize"];
|
$pageSize = $_POST["pageSize"];
|
||||||
$search = $_POST["search"];
|
$search = $_POST["search"];
|
||||||
|
|
||||||
$sortField = (isset($_POST["sort"])) ? $_POST["sort"] : "";
|
$sortField = (isset($_POST["sort"])) ? $_POST["sort"] : "";
|
||||||
$sortDir = (isset($_POST["dir"])) ? $_POST["dir"] : "";
|
$sortDir = (isset($_POST["dir"])) ? $_POST["dir"] : "";
|
||||||
$start = (isset($_POST["start"])) ? $_POST["start"] : 0;
|
$start = (isset($_POST["start"])) ? $_POST["start"] : 0;
|
||||||
$limit = (isset($_POST["limit"])) ? $_POST["limit"] : $pageSize;
|
$limit = (isset($_POST["limit"])) ? $_POST["limit"] : $pageSize;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$emailSever = new \ProcessMaker\BusinessModel\EmailServer();
|
$emailSever = new EmailServer();
|
||||||
|
$result = $emailSever->getEmailServers(["filter" => $search], $sortField, $sortDir, $start, $limit);
|
||||||
$result = $emailSever->getEmailServers(array("filter" => $search), $sortField, $sortDir, $start, $limit);
|
|
||||||
|
|
||||||
$response["status"] = "OK";
|
$response["status"] = "OK";
|
||||||
$response["success"] = true;
|
$response["success"] = true;
|
||||||
@@ -205,7 +226,7 @@ switch ($option) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$arrayData = array(
|
$arrayData = [
|
||||||
"MESS_ENGINE" => $cboEmailEngine,
|
"MESS_ENGINE" => $cboEmailEngine,
|
||||||
"MESS_SERVER" => $server,
|
"MESS_SERVER" => $server,
|
||||||
"MESS_PORT" => $port,
|
"MESS_PORT" => $port,
|
||||||
@@ -218,10 +239,9 @@ switch ($option) {
|
|||||||
"MESS_TRY_SEND_INMEDIATLY" => $sendTestMail,
|
"MESS_TRY_SEND_INMEDIATLY" => $sendTestMail,
|
||||||
"MAIL_TO" => $mailTo,
|
"MAIL_TO" => $mailTo,
|
||||||
"MESS_DEFAULT" => $emailServerDefault
|
"MESS_DEFAULT" => $emailServerDefault
|
||||||
);
|
];
|
||||||
|
|
||||||
$emailSever = new \ProcessMaker\BusinessModel\EmailServer();
|
|
||||||
|
|
||||||
|
$emailSever = new EmailServer();
|
||||||
$arrayEmailServerData = $emailSever->testConnection($arrayData);
|
$arrayEmailServerData = $emailSever->testConnection($arrayData);
|
||||||
|
|
||||||
$response["data"] = $arrayEmailServerData;
|
$response["data"] = $arrayEmailServerData;
|
||||||
@@ -245,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()
|
||||||
@@ -276,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())
|
||||||
|
|||||||
@@ -2551,7 +2551,7 @@ class Cases
|
|||||||
// Filter specific case
|
// Filter specific case
|
||||||
$query->case($caseNumber);
|
$query->case($caseNumber);
|
||||||
// Filter specific index
|
// Filter specific index
|
||||||
if (is_int($index)) {
|
if ($index > 0) {
|
||||||
$query->index($index);
|
$query->index($index);
|
||||||
}
|
}
|
||||||
$results = $query->get();
|
$results = $query->get();
|
||||||
|
|||||||
@@ -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 = '';
|
||||||
|
|||||||
@@ -104,9 +104,10 @@ class AuditLog
|
|||||||
"ExportLanguage" => G::LoadTranslation("ID_EXPORT_LANGUAGE"),
|
"ExportLanguage" => G::LoadTranslation("ID_EXPORT_LANGUAGE"),
|
||||||
"DeleteLanguage" => G::LoadTranslation("ID_DELETE_LAGUAGE"),
|
"DeleteLanguage" => G::LoadTranslation("ID_DELETE_LAGUAGE"),
|
||||||
// Settings
|
// Settings
|
||||||
"UploadSystemSettings" => G::LoadTranslation("ID_UPLOAD_SYSTEM_SETTINGS"),
|
|
||||||
"UpdateEmailSettings" => G::LoadTranslation("ID_UPDATE_EMAIL_SETTINGS"),
|
|
||||||
"CreateEmailSettings" => G::LoadTranslation("ID_CREATE_EMAIL_SETTINGS"),
|
"CreateEmailSettings" => G::LoadTranslation("ID_CREATE_EMAIL_SETTINGS"),
|
||||||
|
"DeleteEmailSettings" => G::LoadTranslation("ID_DELETE_EMAIL_SETTINGS"),
|
||||||
|
"UpdateEmailSettings" => G::LoadTranslation("ID_UPDATE_EMAIL_SETTINGS"),
|
||||||
|
"UploadSystemSettings" => G::LoadTranslation("ID_UPLOAD_SYSTEM_SETTINGS"),
|
||||||
// Logo
|
// Logo
|
||||||
"UploadLogo" => G::LoadTranslation("ID_UPLOAD_LOGO"),
|
"UploadLogo" => G::LoadTranslation("ID_UPLOAD_LOGO"),
|
||||||
"DeleteLogo" => G::LoadTranslation("ID_DELETE_LOGO"),
|
"DeleteLogo" => G::LoadTranslation("ID_DELETE_LOGO"),
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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');
|
||||||
|
|||||||
Reference in New Issue
Block a user