@nixweb/nixloc-ui 0.0.60 → 0.0.63

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nixweb/nixloc-ui",
3
- "version": "0.0.60",
3
+ "version": "0.0.63",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -60,6 +60,10 @@ export default {
60
60
  type: Boolean,
61
61
  default: false,
62
62
  },
63
+ somenteConsulta: {
64
+ type: Boolean,
65
+ default: false,
66
+ },
63
67
  dados: Array,
64
68
  value: Object,
65
69
  },
@@ -84,7 +88,7 @@ export default {
84
88
  aoSelecionar(value) {
85
89
  this.$emit("input", value);
86
90
  let obj = { campoAlvo: this.campoAlvo, valor: value.id };
87
- this.insereFiltro(obj);
91
+ if (!this.somenteConsulta) this.insereFiltro(obj);
88
92
  },
89
93
  aoPesquisar(value) {},
90
94
  rotulo(value) {
@@ -45,7 +45,7 @@ export default {
45
45
  overflow: hidden;
46
46
  z-index: 20;
47
47
  padding: 18px;
48
- margin-left: 230px;
48
+ margin-left: 220px;
49
49
  }
50
50
 
51
51
  .tamanho {
@@ -7,8 +7,10 @@
7
7
  @click.prevent="navegarPara('dashboard')"
8
8
  :class="sessaoDestaque('home')"
9
9
  >
10
- <i class="fa fa-home menu__icon" aria-hidden="true"></i>
11
- Dashboard
10
+ <div class="div-icone lado-a-lado" :style="'background-color:' + corBase">
11
+ <i class="fa fa-home icone" aria-hidden="true"></i>
12
+ </div>
13
+ <div class="lado-a-lado titulo">Dashboard</div>
12
14
  </a>
13
15
  </li>
14
16
 
@@ -18,9 +20,13 @@
18
20
  @click.prevent="abrirSubMenu(item.modulo)"
19
21
  :class="sessaoDestaque(item.modulo)"
20
22
  >
21
- <i :class="item.icone" class="menu__icon" aria-hidden="true"></i>
22
- {{ item.modulo }}
23
- <i class="fa fa-chevron-right menu__arrow-icon" aria-hidden="true"></i>
23
+ <div class="div-icone lado-a-lado" :style="'background-color:' + corBase">
24
+ <i :class="item.icone" class="icone" aria-hidden="true"></i>
25
+ </div>
26
+ <div class="lado-a-lado titulo">{{ item.modulo }}</div>
27
+ <div class="lado-a-lado seta menu__arrow-icon">
28
+ <i class="fa fa-chevron-right" aria-hidden="true"></i>
29
+ </div>
24
30
  </a>
25
31
  </li>
26
32
  </ul>
@@ -62,6 +68,12 @@ import { mapState } from "vuex";
62
68
 
63
69
  export default {
64
70
  name: "Menu",
71
+ props: {
72
+ corBase: {
73
+ type: String,
74
+ default: "#4680A5",
75
+ },
76
+ },
65
77
  data() {
66
78
  return {
67
79
  modulo: "",
@@ -116,3 +128,25 @@ export default {
116
128
  },
117
129
  };
118
130
  </script>
131
+
132
+ <style scoped>
133
+ .div-icone {
134
+ width: 30px;
135
+ height: 30px;
136
+ padding-left: 6px;
137
+ padding-top: 3px;
138
+ border-radius: 8px;
139
+ }
140
+
141
+ .icone {
142
+ color: white;
143
+ font-size: 16px;
144
+ }
145
+
146
+ .titulo {
147
+ margin-left: 15px;
148
+ }
149
+
150
+ .seta {
151
+ }
152
+ </style>
@@ -32,8 +32,8 @@
32
32
  </div>
33
33
  </div>
34
34
  <br v-show="mostrarBotoes || mostrarPesquisa" />
35
- <div class="row" v-show="mostrarBotoes || mostrarPesquisa">
36
- <div class="col-8">
35
+ <div v-show="mostrarBotoes || mostrarPesquisa">
36
+ <div>
37
37
  <div v-show="mostrarPesquisa"><Pesquisa /></div>
38
38
  </div>
39
39
  </div>
@@ -1,16 +1,30 @@
1
1
  <template>
2
2
  <b-row>
3
- <b-col xs="12" sm="12" md="12" lg="7" xl="7">
4
- <input
5
- type="text"
6
- name="pesquisar"
7
- placeholder="Pesquisar ..."
8
- @keyup="verificaLimpaPesquisa()"
9
- @keyup.enter.prevent="buscaPesquisa()"
10
- v-model="pesquisa"
3
+ <b-col xs="12" sm="12" md="12" lg="5" xl="5">
4
+ <div class="margem">
5
+ <input
6
+ type="text"
7
+ name="pesquisar"
8
+ placeholder="Pesquisar ..."
9
+ @keyup="verificaLimpaPesquisa()"
10
+ @keyup.enter.prevent="buscaPesquisa()"
11
+ v-model="pesquisa.conteudo"
12
+ />
13
+ </div>
14
+ </b-col>
15
+ <b-col xs="12" sm="12" md="12" lg="2" xl="2">
16
+ <EscolherEstatico
17
+ campoAlvo="filtro"
18
+ :somenteConsulta="true"
19
+ :valorInicial="{ conteudo: 'Contém', id: 'contem' }"
20
+ v-model="pesquisa.filtro"
21
+ :dados="[
22
+ { conteudo: 'Contém', id: 'contem' },
23
+ { conteudo: 'Igual', id: 'igual' },
24
+ ]"
11
25
  />
12
26
  </b-col>
13
- <b-col xs="12" sm="12" md="12" lg="5" xl="5">
27
+ <b-col xs="4" sm="4" md="4" lg="4" xl="4">
14
28
  <div class="div-botao">
15
29
  <Botao
16
30
  chave="pesquisar"
@@ -35,11 +49,12 @@
35
49
 
36
50
  <script>
37
51
  import Botao from "../forms/Botao";
52
+ import EscolherEstatico from "../forms/EscolherEstatico.vue";
38
53
 
39
54
  import { mapMutations } from "vuex";
40
55
 
41
56
  export default {
42
- components: { Botao },
57
+ components: { Botao, EscolherEstatico },
43
58
  name: "Pesquisa",
44
59
  computed: {
45
60
  pesquisa: {
@@ -62,10 +77,11 @@ export default {
62
77
  },
63
78
  limpaPesquisa() {
64
79
  this.limpouPesquisa();
65
- this.atualizaCampoPesquisa("");
80
+ let pesquisa = { conteudo: "", filtro: { conteudo: "contem", id: "contem" } };
81
+ this.atualizaCampoPesquisa(pesquisa);
66
82
  },
67
83
  verificaLimpaPesquisa() {
68
- if (this.pesquisa.length == 0) this.limpouPesquisa();
84
+ if (this.pesquisa.conteudo.length == 0) this.limpouPesquisa();
69
85
  },
70
86
  },
71
87
  };
@@ -82,8 +98,12 @@ export default {
82
98
  display: inline-block;
83
99
  }
84
100
 
101
+ .margem {
102
+ padding-top: 25px;
103
+ }
104
+
85
105
  .div-botao {
86
- margin-top: 5px;
106
+ padding-top: 25px;
87
107
  }
88
108
 
89
109
  ::placeholder {
@@ -105,7 +125,6 @@ input[type="text"] {
105
125
  transition: background-color 0.1s ease-in 0s, border 0.1s ease-in 0s;
106
126
  }
107
127
 
108
- /* When the input field gets focus, change its width to 100% */
109
128
  input[type="text"]:focus {
110
129
  outline: none;
111
130
  }
@@ -84,6 +84,7 @@ export default {
84
84
  },
85
85
  baseParams: {
86
86
  pesquisa: undefined,
87
+ filtro: "contem",
87
88
  paginaAtual: 1,
88
89
  totalPorPagina: 10,
89
90
  },
@@ -150,17 +151,19 @@ export default {
150
151
  },
151
152
  watch: {
152
153
  metodoExecutadoApi: function (value) {
153
- if (value == "deleteAllApi") {
154
+ if (value === "deleteAllApi" || value === "deleteAllApiErro") {
154
155
  this.obterTodos();
155
156
  }
156
157
  },
157
158
  buscouPesquisa: function () {
158
- this.baseParams.pesquisa = this.pesquisa;
159
+ this.baseParams.pesquisa = this.pesquisa.conteudo;
160
+ this.baseParams.filtro = this.pesquisa.filtro.id;
159
161
  this.limpaParams();
160
162
  this.obterTodos();
161
163
  },
162
164
  limpouPesquisa: function () {
163
165
  this.baseParams.pesquisa = "";
166
+ this.baseParams.filtro = "";
164
167
  this.limpaParams();
165
168
  this.obterTodos();
166
169
  },
@@ -28,7 +28,7 @@ export default {
28
28
  tipo: undefined,
29
29
  },
30
30
  ids: undefined,
31
- pesquisa: undefined,
31
+ pesquisa: { conteudo: "", filtro: { conteudo: "contem", id: "contem" } },
32
32
  EscolherEstatico: { dataHora: undefined, campoAlvo: undefined, valor: undefined },
33
33
  buscouPesquisa: false,
34
34
  limpouPesquisa: false,
@@ -256,6 +256,7 @@ export default {
256
256
  return response.data;
257
257
  } else {
258
258
  context.commit('insereNotificacao', response.data.notificacoes)
259
+ context.commit('insereMetodoExecutadoApi', 'deleteAllApiErro');
259
260
  context.commit('insereToast', 'deleteApiErro');
260
261
  return response.data;
261
262
  }