@nixweb/nixloc-ui 0.0.55 → 0.0.56
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.
package/package.json
CHANGED
|
@@ -18,11 +18,11 @@ export default {
|
|
|
18
18
|
},
|
|
19
19
|
methods: {
|
|
20
20
|
notifica(value) {
|
|
21
|
-
if (value.tipo == "
|
|
21
|
+
if (value.tipo == "postApi" || value.tipo == "putApi")
|
|
22
22
|
this.$toasted.show("Salvo com sucesso", {
|
|
23
23
|
type: "success",
|
|
24
24
|
});
|
|
25
|
-
if (value.tipo == "
|
|
25
|
+
if (value.tipo == "postApiErro" || value.tipo == "putApiErro") {
|
|
26
26
|
this.$toasted.show("Ops! Algo deu errado", {
|
|
27
27
|
type: "error",
|
|
28
28
|
});
|
|
@@ -176,14 +176,17 @@ export default {
|
|
|
176
176
|
.then((response) => {
|
|
177
177
|
if (response.data.sucesso) {
|
|
178
178
|
context.commit('insereMetodoExecutadoApi', params.MetodoExecutadoApi);
|
|
179
|
-
|
|
179
|
+
|
|
180
|
+
if (!params.naoNotificarToast)
|
|
181
|
+
context.commit('insereToast', 'postApi');
|
|
182
|
+
|
|
180
183
|
context.commit('removeNotificacao');
|
|
181
184
|
context.commit('validation/removeFormSujo', null, { root: true });
|
|
182
185
|
return response.data;
|
|
183
186
|
} else {
|
|
184
187
|
|
|
185
188
|
context.commit('insereNotificacao', response.data.notificacoes)
|
|
186
|
-
context.commit('insereToast', '
|
|
189
|
+
context.commit('insereToast', 'postApiErro');
|
|
187
190
|
return response.data;
|
|
188
191
|
}
|
|
189
192
|
}, (err) => {
|
|
@@ -199,12 +202,15 @@ export default {
|
|
|
199
202
|
.then((response) => {
|
|
200
203
|
if (response.data.sucesso) {
|
|
201
204
|
context.commit('insereMetodoExecutadoApi', params.MetodoExecutadoApi);
|
|
202
|
-
|
|
205
|
+
|
|
206
|
+
if (!params.naoNotificarToast)
|
|
207
|
+
context.commit('insereToast', 'putApi');
|
|
208
|
+
|
|
203
209
|
context.commit('removeNotificacao');
|
|
204
210
|
context.commit('validation/removeFormSujo', null, { root: true });
|
|
205
211
|
return response.data;
|
|
206
212
|
} else {
|
|
207
|
-
context.commit('insereToast', '
|
|
213
|
+
context.commit('insereToast', 'putApiErro');
|
|
208
214
|
context.commit('insereNotificacao', response.data.notificacoes)
|
|
209
215
|
return response.data;
|
|
210
216
|
}
|