@nixweb/nixloc-ui 0.0.64 → 0.0.67
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
|
@@ -78,7 +78,11 @@ export default {
|
|
|
78
78
|
this.valor = this.value;
|
|
79
79
|
},
|
|
80
80
|
methods: {
|
|
81
|
-
...mapMutations("validation", [
|
|
81
|
+
...mapMutations("validation", [
|
|
82
|
+
"insereValidacao",
|
|
83
|
+
"removeValidacao",
|
|
84
|
+
"insereFormSujo",
|
|
85
|
+
]),
|
|
82
86
|
...mapMutations("generic", ["insereFiltro"]),
|
|
83
87
|
valida() {
|
|
84
88
|
this.notificacoes = [];
|
|
@@ -112,6 +116,7 @@ export default {
|
|
|
112
116
|
valor() {
|
|
113
117
|
this.valida();
|
|
114
118
|
this.formSujo = true;
|
|
119
|
+
this.insereFormSujo(true);
|
|
115
120
|
this.$emit("input", this.valor);
|
|
116
121
|
},
|
|
117
122
|
value() {
|
|
@@ -42,6 +42,7 @@ export default {
|
|
|
42
42
|
desabilitado: Boolean,
|
|
43
43
|
formNome: String,
|
|
44
44
|
requerido: Boolean,
|
|
45
|
+
tamanhoMaximo: Number,
|
|
45
46
|
tipo: {
|
|
46
47
|
type: String,
|
|
47
48
|
default: "float",
|
|
@@ -76,6 +77,11 @@ export default {
|
|
|
76
77
|
var mensagem = `${this.titulo} não pode ser vazio!`;
|
|
77
78
|
this.notificacoes.push(mensagem);
|
|
78
79
|
}
|
|
80
|
+
|
|
81
|
+
if (this.valor.toString().length > this.tamanhoMaximo) {
|
|
82
|
+
var mensagem = `Valor inválido!`;
|
|
83
|
+
this.notificacoes.push(mensagem);
|
|
84
|
+
}
|
|
79
85
|
},
|
|
80
86
|
apertouEnter() {
|
|
81
87
|
if (this.enter) this.enter();
|
|
@@ -91,15 +97,16 @@ export default {
|
|
|
91
97
|
},
|
|
92
98
|
valor() {
|
|
93
99
|
this.valida();
|
|
94
|
-
this.formSujo = true;
|
|
95
|
-
this.insereFormSujo(true);
|
|
96
100
|
|
|
97
101
|
let valor;
|
|
98
102
|
if (this.tipo === "int") valor = parseInt(this.valor);
|
|
99
103
|
if (this.tipo === "float") valor = parseFloat(this.valor);
|
|
100
104
|
|
|
101
|
-
this.valor = valor;
|
|
102
105
|
this.$emit("input", valor);
|
|
106
|
+
this.formSujo = true;
|
|
107
|
+
this.insereFormSujo(true);
|
|
108
|
+
|
|
109
|
+
this.valor = valor;
|
|
103
110
|
},
|
|
104
111
|
notificacoes() {
|
|
105
112
|
let self = this;
|
|
@@ -6,6 +6,22 @@ export default {
|
|
|
6
6
|
itens: []
|
|
7
7
|
},
|
|
8
8
|
},
|
|
9
|
+
getters: {
|
|
10
|
+
temRegra: (state) => (nome) => {
|
|
11
|
+
var temRegra = state.usuarioLogado.usuario.regras.find(obj => {
|
|
12
|
+
return obj.nome === nome
|
|
13
|
+
})
|
|
14
|
+
if (temRegra == undefined) return false;
|
|
15
|
+
return true;
|
|
16
|
+
},
|
|
17
|
+
temModulo: (state) => (nome) => {
|
|
18
|
+
var temRegra = state.usuarioLogado.usuario.modulos.find(obj => {
|
|
19
|
+
return obj.nome === nome
|
|
20
|
+
})
|
|
21
|
+
if (temRegra == undefined) return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
},
|
|
9
25
|
mutations: {
|
|
10
26
|
insereUsuarioLogado: (state, obj) => {
|
|
11
27
|
state.usuarioLogado = obj;
|