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.
|
@@ -4806,12 +4806,12 @@ var __vue_component__$x = /*#__PURE__*/normalizeComponent({
|
|
|
4806
4806
|
render: __vue_render__$o,
|
|
4807
4807
|
staticRenderFns: __vue_staticRenderFns__$o
|
|
4808
4808
|
}, __vue_inject_styles__$o, __vue_script__$o, __vue_scope_id__$o, __vue_is_functional_template__$o, __vue_module_identifier__$o, false, undefined, undefined, undefined);
|
|
4809
|
-
var RemainingCharacters = __vue_component__$x;var domain = window.location.hostname ==
|
|
4809
|
+
var RemainingCharacters = __vue_component__$x;var domain = window.location.hostname == "localhost" ? "https://linux07" : "https://".concat(window.location.hostname) + "/im";
|
|
4810
4810
|
var route = "/smartChannel/v1/api.php";
|
|
4811
4811
|
// const route = `atdHumano/middleware/smartchannel_api.php`
|
|
4812
4812
|
|
|
4813
4813
|
var baseURL = "".concat(domain).concat(route);
|
|
4814
|
-
var dev = window.location.hostname ==
|
|
4814
|
+
var dev = window.location.hostname == "localhost" ? "&teste=eloteste" : "";var standardMessages = {
|
|
4815
4815
|
methods: {
|
|
4816
4816
|
getStandardMessages: function getStandardMessages(type, token) {
|
|
4817
4817
|
var _this = this;
|
|
@@ -4820,7 +4820,7 @@ var dev = window.location.hostname == 'localhost' ? '&teste=levchat2' : '';var s
|
|
|
4820
4820
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
4821
4821
|
while (1) switch (_context.prev = _context.next) {
|
|
4822
4822
|
case 0:
|
|
4823
|
-
url = "".concat(baseURL, "/messages/").concat(type, "?token_cliente=").concat(token).concat(dev);
|
|
4823
|
+
url = "".concat(baseURL, "/messages/").concat(type, "?token_cliente=").concat(token).concat(_this.$root.$reqTeste || dev);
|
|
4824
4824
|
if (_this.$root.$httpRequest) {
|
|
4825
4825
|
_context.next = 3;
|
|
4826
4826
|
break;
|
|
@@ -4837,19 +4837,20 @@ var dev = window.location.hostname == 'localhost' ? '&teste=levchat2' : '';var s
|
|
|
4837
4837
|
break;
|
|
4838
4838
|
}
|
|
4839
4839
|
return _context.abrupt("return", {
|
|
4840
|
-
msg_ret:
|
|
4840
|
+
msg_ret: "Retorno incorreto das mensagens formatadas",
|
|
4841
|
+
error: true
|
|
4841
4842
|
});
|
|
4842
4843
|
case 9:
|
|
4843
4844
|
data = response.data;
|
|
4844
4845
|
tipo = data.tipo, nivel = data.nivel, conteudo = data.conteudo, msg_ret = data.msg_ret, st_ret = data.st_ret;
|
|
4845
|
-
if (tipo) _this.$emit(
|
|
4846
|
-
if (!(st_ret ===
|
|
4846
|
+
if (tipo) _this.$emit("set-message-type", tipo);
|
|
4847
|
+
if (!(st_ret === "OK")) {
|
|
4847
4848
|
_context.next = 16;
|
|
4848
4849
|
break;
|
|
4849
4850
|
}
|
|
4850
4851
|
return _context.abrupt("return", conteudo ? conteudo : nivel);
|
|
4851
4852
|
case 16:
|
|
4852
|
-
if (!(st_ret ===
|
|
4853
|
+
if (!(st_ret === "AVISO")) {
|
|
4853
4854
|
_context.next = 20;
|
|
4854
4855
|
break;
|
|
4855
4856
|
}
|
|
@@ -4858,8 +4859,12 @@ var dev = window.location.hostname == 'localhost' ? '&teste=levchat2' : '';var s
|
|
|
4858
4859
|
});
|
|
4859
4860
|
case 20:
|
|
4860
4861
|
return _context.abrupt("return", msg_ret ? {
|
|
4861
|
-
msg_ret: msg_ret
|
|
4862
|
-
|
|
4862
|
+
msg_ret: msg_ret,
|
|
4863
|
+
error: true
|
|
4864
|
+
} : {
|
|
4865
|
+
msg_ret: "Erro ao buscar mensagens formatadas",
|
|
4866
|
+
error: true
|
|
4867
|
+
});
|
|
4863
4868
|
case 21:
|
|
4864
4869
|
_context.next = 27;
|
|
4865
4870
|
break;
|
|
@@ -4868,7 +4873,8 @@ var dev = window.location.hostname == 'localhost' ? '&teste=levchat2' : '';var s
|
|
|
4868
4873
|
_context.t0 = _context["catch"](3);
|
|
4869
4874
|
console.error("Erro na requisicao para o servidor (2)", _context.t0);
|
|
4870
4875
|
return _context.abrupt("return", {
|
|
4871
|
-
msg_ret: _context.t0.message ? _context.t0.message : _context.t0
|
|
4876
|
+
msg_ret: _context.t0.message ? _context.t0.message : _context.t0,
|
|
4877
|
+
error: true
|
|
4872
4878
|
});
|
|
4873
4879
|
case 27:
|
|
4874
4880
|
case "end":
|
|
@@ -4966,15 +4972,20 @@ var script$n = {
|
|
|
4966
4972
|
this.getStandardMessages(cod, this.token_cliente).then(function (data) {
|
|
4967
4973
|
_this.loadingReq = false;
|
|
4968
4974
|
if (data) {
|
|
4969
|
-
if (data.msg_ret)
|
|
4970
|
-
|
|
4971
|
-
|
|
4975
|
+
if (data.msg_ret) {
|
|
4976
|
+
if (data.error) throw new Error(data.msg_ret);
|
|
4977
|
+
return _this.$toasted.global.defaultInfo({
|
|
4978
|
+
msg: data.msg_ret
|
|
4979
|
+
});
|
|
4980
|
+
}
|
|
4972
4981
|
return _this.showFormattedMessage(data, selectionIndex);
|
|
4973
4982
|
}
|
|
4974
4983
|
_this.$toasted.global.defaultError({
|
|
4975
4984
|
msg: data && data.msg_ret ? data.msg_ret : 'Problema com as mensagens formatadas. Contate o suporte.'
|
|
4976
4985
|
});
|
|
4977
4986
|
_this.$emit("error-standard-message");
|
|
4987
|
+
_this.closeStandardMessages();
|
|
4988
|
+
_this.loadingReq = false;
|
|
4978
4989
|
}).catch(function (e) {
|
|
4979
4990
|
_this.loadingReq = false;
|
|
4980
4991
|
_this.$toasted.global.defaultError({
|
|
@@ -5166,7 +5177,7 @@ var __vue_staticRenderFns__$n = [];
|
|
|
5166
5177
|
/* style */
|
|
5167
5178
|
var __vue_inject_styles__$n = function __vue_inject_styles__(inject) {
|
|
5168
5179
|
if (!inject) return;
|
|
5169
|
-
inject("data-v-
|
|
5180
|
+
inject("data-v-7abf5d83_0", {
|
|
5170
5181
|
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}",
|
|
5171
5182
|
map: undefined,
|
|
5172
5183
|
media: undefined
|
|
@@ -5175,7 +5186,7 @@ var __vue_inject_styles__$n = function __vue_inject_styles__(inject) {
|
|
|
5175
5186
|
/* scoped */
|
|
5176
5187
|
var __vue_scope_id__$n = undefined;
|
|
5177
5188
|
/* module identifier */
|
|
5178
|
-
var __vue_module_identifier__$n = "data-v-
|
|
5189
|
+
var __vue_module_identifier__$n = "data-v-7abf5d83";
|
|
5179
5190
|
/* functional template */
|
|
5180
5191
|
var __vue_is_functional_template__$n = false;
|
|
5181
5192
|
/* style inject shadow dom */
|
package/package.json
CHANGED
|
@@ -141,11 +141,17 @@ export default {
|
|
|
141
141
|
this.getStandardMessages(cod, this.token_cliente).then((data) => {
|
|
142
142
|
this.loadingReq = false
|
|
143
143
|
if (data) {
|
|
144
|
-
if (data.msg_ret)
|
|
144
|
+
if (data.msg_ret) {
|
|
145
|
+
if (data.error) throw new Error(data.msg_ret)
|
|
146
|
+
|
|
147
|
+
return this.$toasted.global.defaultInfo({ msg: data.msg_ret })
|
|
148
|
+
}
|
|
145
149
|
return this.showFormattedMessage(data, selectionIndex)
|
|
146
150
|
}
|
|
147
151
|
this.$toasted.global.defaultError({ msg: data && data.msg_ret ? data.msg_ret : 'Problema com as mensagens formatadas. Contate o suporte.' })
|
|
148
152
|
this.$emit("error-standard-message")
|
|
153
|
+
this.closeStandardMessages()
|
|
154
|
+
this.loadingReq = false
|
|
149
155
|
}).catch(e => {
|
|
150
156
|
this.loadingReq = false
|
|
151
157
|
this.$toasted.global.defaultError({ msg: e && e.message ? e.message : e })
|