vue-intergrall-plugins 1.0.93 → 1.0.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4814,22 +4814,23 @@ const __vue_component__$x = /*#__PURE__*/normalizeComponent({
|
|
|
4814
4814
|
}, __vue_inject_styles__$o, __vue_script__$o, __vue_scope_id__$o, __vue_is_functional_template__$o, __vue_module_identifier__$o, false, undefined, undefined, undefined);
|
|
4815
4815
|
var RemainingCharacters = __vue_component__$x;
|
|
4816
4816
|
|
|
4817
|
-
const domain = window.location.hostname ==
|
|
4817
|
+
const domain = window.location.hostname == "localhost" ? `https://linux07` : `https://${window.location.hostname}` + "/im";
|
|
4818
4818
|
const route = `/smartChannel/v1/api.php`;
|
|
4819
4819
|
// const route = `atdHumano/middleware/smartchannel_api.php`
|
|
4820
4820
|
|
|
4821
4821
|
const baseURL = `${domain}${route}`;
|
|
4822
|
-
const dev = window.location.hostname ==
|
|
4822
|
+
const dev = window.location.hostname == "localhost" ? "&teste=eloteste" : "";
|
|
4823
4823
|
|
|
4824
4824
|
const standardMessages = {
|
|
4825
4825
|
methods: {
|
|
4826
4826
|
async getStandardMessages(type, token) {
|
|
4827
|
-
const url = `${baseURL}/messages/${type}?token_cliente=${token}${dev}`;
|
|
4827
|
+
const url = `${baseURL}/messages/${type}?token_cliente=${token}${this.$root.$reqTeste || dev}`;
|
|
4828
4828
|
if (!this.$root.$httpRequest) return false;
|
|
4829
4829
|
try {
|
|
4830
4830
|
const response = await this.$root.$httpRequest.get(url);
|
|
4831
4831
|
if (typeof response != "object" || typeof response.data != "object") return {
|
|
4832
|
-
msg_ret:
|
|
4832
|
+
msg_ret: "Retorno incorreto das mensagens formatadas",
|
|
4833
|
+
error: true
|
|
4833
4834
|
};
|
|
4834
4835
|
const {
|
|
4835
4836
|
data
|
|
@@ -4841,22 +4842,27 @@ const standardMessages = {
|
|
|
4841
4842
|
msg_ret,
|
|
4842
4843
|
st_ret
|
|
4843
4844
|
} = data;
|
|
4844
|
-
if (tipo) this.$emit(
|
|
4845
|
-
if (st_ret ===
|
|
4845
|
+
if (tipo) this.$emit("set-message-type", tipo);
|
|
4846
|
+
if (st_ret === "OK") {
|
|
4846
4847
|
return conteudo ? conteudo : nivel;
|
|
4847
|
-
} else if (st_ret ===
|
|
4848
|
+
} else if (st_ret === "AVISO") {
|
|
4848
4849
|
return {
|
|
4849
4850
|
msg_ret
|
|
4850
4851
|
};
|
|
4851
4852
|
} else {
|
|
4852
4853
|
return msg_ret ? {
|
|
4853
|
-
msg_ret
|
|
4854
|
-
|
|
4854
|
+
msg_ret,
|
|
4855
|
+
error: true
|
|
4856
|
+
} : {
|
|
4857
|
+
msg_ret: "Erro ao buscar mensagens formatadas",
|
|
4858
|
+
error: true
|
|
4859
|
+
};
|
|
4855
4860
|
}
|
|
4856
4861
|
} catch (error) {
|
|
4857
4862
|
console.error("Erro na requisicao para o servidor (2)", error);
|
|
4858
4863
|
return {
|
|
4859
|
-
msg_ret: error.message ? error.message : error
|
|
4864
|
+
msg_ret: error.message ? error.message : error,
|
|
4865
|
+
error: true
|
|
4860
4866
|
};
|
|
4861
4867
|
}
|
|
4862
4868
|
}
|
|
@@ -4948,15 +4954,20 @@ var script$n = {
|
|
|
4948
4954
|
this.getStandardMessages(cod, this.token_cliente).then(data => {
|
|
4949
4955
|
this.loadingReq = false;
|
|
4950
4956
|
if (data) {
|
|
4951
|
-
if (data.msg_ret)
|
|
4952
|
-
|
|
4953
|
-
|
|
4957
|
+
if (data.msg_ret) {
|
|
4958
|
+
if (data.error) throw new Error(data.msg_ret);
|
|
4959
|
+
return this.$toasted.global.defaultInfo({
|
|
4960
|
+
msg: data.msg_ret
|
|
4961
|
+
});
|
|
4962
|
+
}
|
|
4954
4963
|
return this.showFormattedMessage(data, selectionIndex);
|
|
4955
4964
|
}
|
|
4956
4965
|
this.$toasted.global.defaultError({
|
|
4957
4966
|
msg: data && data.msg_ret ? data.msg_ret : 'Problema com as mensagens formatadas. Contate o suporte.'
|
|
4958
4967
|
});
|
|
4959
4968
|
this.$emit("error-standard-message");
|
|
4969
|
+
this.closeStandardMessages();
|
|
4970
|
+
this.loadingReq = false;
|
|
4960
4971
|
}).catch(e => {
|
|
4961
4972
|
this.loadingReq = false;
|
|
4962
4973
|
this.$toasted.global.defaultError({
|
|
@@ -5152,7 +5163,7 @@ var __vue_staticRenderFns__$n = [];
|
|
|
5152
5163
|
/* style */
|
|
5153
5164
|
const __vue_inject_styles__$n = function (inject) {
|
|
5154
5165
|
if (!inject) return;
|
|
5155
|
-
inject("data-v-
|
|
5166
|
+
inject("data-v-7abf5d83_0", {
|
|
5156
5167
|
source: ".transition-selects{min-height:80px;display:flex;flex-direction:column;width:100%}.loader-select{position:relative;min-height:35px;background:#fff;width:100%;border:1px solid #ccc;border-radius:5px;z-index:1}.loading-message{background-color:#555!important}",
|
|
5157
5168
|
map: undefined,
|
|
5158
5169
|
media: undefined
|