@nixweb/nixloc-ui 0.0.123 → 0.0.124

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.
Files changed (29) hide show
  1. package/package.json +1 -1
  2. package/src/component/layout/Tag.vue +2 -2
  3. package/src/component/shared/HorizontalFilter.vue +1 -1
  4. package/src/component/shared/LegendaParametro.vue +5 -5
  5. package/src/component/shared/Search.vue +10 -10
  6. package/src/component/shared/{construtor-consulta/AdicionaFiltro.vue → query-builder/AddRule.vue} +18 -22
  7. package/src/component/shared/{construtor-consulta/ConverteParaOdata.js → query-builder/ConvertToOdata.js} +13 -13
  8. package/src/component/shared/{construtor-consulta/ComponenteDinamico.vue → query-builder/DynamicComponent.vue} +9 -11
  9. package/src/component/shared/{construtor-consulta/Campo.vue → query-builder/Fields.vue} +0 -0
  10. package/src/component/shared/{construtor-consulta/ListaComponenteDinamico.vue → query-builder/ListDynamicComponent.vue} +6 -5
  11. package/src/component/shared/{construtor-consulta/ConstrutorConsulta.vue → query-builder/QueryBuilder.vue} +16 -17
  12. package/src/component/shared/{construtor-consulta/Filtro.vue → query-builder/Rules.vue} +4 -4
  13. package/src/component/shared/{construtor-consulta/EscolherFiltro.vue → query-builder/SelectRule.vue} +0 -0
  14. package/src/component/shared/{construtor-consulta → query-builder}/Tags.vue +0 -0
  15. package/src/component/shared/{construtor-consulta/Rodape.vue → query-builder/Totalization.vue} +0 -0
  16. package/src/component/shared/{construtor-consulta → query-builder}/utilities.js +0 -0
  17. package/src/component/template/{TemplateReportAddEditView.vue → AddEditReport.vue} +2 -2
  18. package/src/component/template/{TemplateListView.vue → ListViewWithHandlerData.vue} +34 -34
  19. package/src/component/template/{TemplateSubView.vue → ViewTemplateConfiguration.vue} +10 -10
  20. package/src/component/template/{TemplateDocumentView.vue → ViewTemplateDocumentView.vue} +1 -1
  21. package/src/component/template/{TemplateReportListView.vue → ViewTemplateReportList.vue} +8 -8
  22. package/src/component/template/{TemplateReportView.vue → ViewTemplateReportPreview.vue} +3 -3
  23. package/src/component/template/{TemplateAddEditView.vue → ViewTemplateWithSalveCancel.vue} +1 -1
  24. package/src/component/template/{TemplateView.vue → ViewTemplateWithTable.vue} +4 -4
  25. package/src/component/template/{Report.js → model/Report.js} +0 -0
  26. package/src/component/value-objects/DadosContato.vue +1 -2
  27. package/src/component/value-objects/DadosPessoa.vue +6 -6
  28. package/src/component/value-objects/Endereco.vue +1 -2
  29. package/src/store/modules/generic.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nixweb/nixloc-ui",
3
- "version": "0.0.123",
3
+ "version": "0.0.124",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -2,7 +2,7 @@
2
2
  <div class="div-tag">
3
3
  <div class="tag">
4
4
  <span @click="execute()">{{ title }}: {{ valor }}</span>
5
- <i @click="remover()" class="icon fas fa-times-circle"></i>
5
+ <i @click="remove()" class="icon fas fa-times-circle"></i>
6
6
  </div>
7
7
  </div>
8
8
  </template>
@@ -27,7 +27,7 @@ export default {
27
27
  data: this.eventData,
28
28
  });
29
29
  },
30
- remover() {
30
+ remove() {
31
31
  this.addEvent({
32
32
  nome: "tagRemovida",
33
33
  data: this.eventData,
@@ -41,7 +41,7 @@ import SelectStatic from "../forms/SelectStatic.vue";
41
41
  import Select from "../forms/Select";
42
42
 
43
43
  export default {
44
- name: "TemplateListView",
44
+ name: "ListViewWithHandlerData",
45
45
  components: { Select, SelectStatic, Collapse },
46
46
  props: {
47
47
  showTotalPerPage: {
@@ -59,14 +59,14 @@ export default {
59
59
  },
60
60
  computed: {
61
61
  ...mapGetters("generic", ["groupBy"]),
62
- ...mapState("generic", ["search", "buscouPesquisa", "limpouPesquisa"]),
62
+ ...mapState("generic", ["search", "executedSearch", "clearedSearch"]),
63
63
  agrupado() {
64
64
  var lista = this.groupBy({ array: this.legendaLocal, key: "grupoNome" });
65
65
  return lista;
66
66
  },
67
67
  },
68
68
  watch: {
69
- buscouPesquisa: function () {
69
+ executedSearch: function () {
70
70
  let legenda = [];
71
71
 
72
72
  let self = this;
@@ -83,14 +83,14 @@ export default {
83
83
 
84
84
  self.legendaLocal = legenda;
85
85
 
86
- self.removeLoading(["pesquisar", "limpar"]);
86
+ self.removeLoading(["search", "clean"]);
87
87
  }, 300);
88
88
  },
89
- limpouPesquisa: function () {
89
+ clearedSearch: function () {
90
90
  let self = this;
91
91
  setTimeout(function () {
92
92
  self.legendaLocal = self.legenda;
93
- self.removeLoading(["pesquisar", "limpar"]);
93
+ self.removeLoading(["search", "clean"]);
94
94
  }, 300);
95
95
  },
96
96
  },
@@ -7,14 +7,14 @@
7
7
  <b-col sm="9">
8
8
  <input
9
9
  type="text"
10
- name="pesquisar"
10
+ name="search"
11
11
  placeholder="Pesquisar ..."
12
12
  @keyup="verificaLimpaPesquisa()"
13
13
  @keyup.enter.prevent="buscaPesquisa()"
14
14
  v-model="search.content"
15
15
  /></b-col>
16
16
  <b-col sm="3">
17
- <div class="div-escolher">
17
+ <div class="div-select">
18
18
  <SelectStatic
19
19
  fieldTarget="filter"
20
20
  :onlyQuery="true"
@@ -35,7 +35,7 @@
35
35
  <b-col xs="4" sm="4" md="4" lg="4" xl="4">
36
36
  <div class="div-button">
37
37
  <Button
38
- key="pesquisar"
38
+ key="search"
39
39
  type="info"
40
40
  title="Buscar"
41
41
  classIcon="fas fa-search"
@@ -43,7 +43,7 @@
43
43
  :clicked="buscaPesquisa"
44
44
  />
45
45
  <Button
46
- key="limpar"
46
+ key="clean"
47
47
  type="info"
48
48
  title="Limpar"
49
49
  classIcon="fas fa-broom"
@@ -77,19 +77,19 @@ export default {
77
77
  methods: {
78
78
  ...mapMutations("generic", [
79
79
  "updateSearch",
80
- "buscouPesquisa",
81
- "limpouPesquisa",
80
+ "executedSearch",
81
+ "clearedSearch",
82
82
  ]),
83
83
  buscaPesquisa() {
84
- this.buscouPesquisa();
84
+ this.executedSearch();
85
85
  },
86
86
  limpaPesquisa() {
87
- this.limpouPesquisa();
87
+ this.clearedSearch();
88
88
  let search = { content: "", filter: { content: "contem", id: "contem" } };
89
89
  this.updateSearch(search);
90
90
  },
91
91
  verificaLimpaPesquisa() {
92
- if (this.search.content.length == 0) this.limpouPesquisa();
92
+ if (this.search.content.length == 0) this.clearedSearch();
93
93
  },
94
94
  },
95
95
  };
@@ -146,7 +146,7 @@ input[type="text"]:focus {
146
146
  outline: none;
147
147
  }
148
148
 
149
- .div-escolher {
149
+ .div-select {
150
150
  margin-top: -30px;
151
151
  margin-right: 5px;
152
152
  }
@@ -5,14 +5,10 @@
5
5
  <div class="div-custom">
6
6
  <b-row>
7
7
  <b-col sm="6">
8
- <EscolherFiltro
9
- :options="rules"
10
- class="select"
11
- v-model="selectedRule"
12
- />
8
+ <SelectRule :options="rules" class="select" v-model="selectedRule" />
13
9
  </b-col>
14
10
  <b-col sm="3">
15
- <options
11
+ <RadioGroup
16
12
  :options="[
17
13
  { text: 'e', value: 'and' },
18
14
  { text: 'ou', value: 'or' },
@@ -21,35 +17,35 @@
21
17
  />
22
18
  </b-col>
23
19
  <b-col sm="3">
24
- <button type="button" class="btn btn-secondary" @click="adicionar">
20
+ <button type="button" class="btn btn-secondary" @click="Add">
25
21
  + Adicionar
26
22
  </button>
27
23
  </b-col>
28
24
  </b-row>
29
25
  </div>
30
26
  </div>
31
- <ListaComponenteDinamico />
27
+ <ListDynamicComponent />
32
28
  </div>
33
29
  </div>
34
30
  </template>
35
31
 
36
32
  <script>
37
- import EscolherFiltro from "./EscolherFiltro.vue";
38
- import ComponenteDinamico from "./ComponenteDinamico.vue";
39
- import options from "@nixweb/nixloc-ui/src/component/forms/options.vue";
40
- import ListaComponenteDinamico from "@nixweb/nixloc-ui/src/component/shared/construtor-query/ListaComponenteDinamico.vue";
33
+ import SelectRule from "./SelectRule.vue";
34
+ import DynamicComponent from "./DynamicComponent.vue";
35
+ import RadioGroup from "@nixweb/nixloc-ui/src/component/forms/RadioGroup.vue";
36
+ import ListDynamicComponent from "@nixweb/nixloc-ui/src/component/shared/construtor-query/ListDynamicComponent.vue";
41
37
 
42
38
  import deepClone from "./utilities.js";
43
39
 
44
40
  import { mapGetters, mapMutations } from "vuex";
45
41
 
46
42
  export default {
47
- name: "AdicionaFiltro",
43
+ name: "AddRule",
48
44
  components: {
49
- EscolherFiltro,
50
- ComponenteDinamico,
51
- options,
52
- ListaComponenteDinamico,
45
+ SelectRule,
46
+ DynamicComponent,
47
+ RadioGroup,
48
+ ListDynamicComponent,
53
49
  },
54
50
  props: {
55
51
  query: Object,
@@ -72,11 +68,11 @@ export default {
72
68
  methods: {
73
69
  ...mapMutations("generic", ["addNotifications"]),
74
70
  ...mapMutations("report", ["addSelectedRules"]),
75
- adicionar() {
71
+ add() {
76
72
  this.selectedRule.andOr = this.andOr;
77
- this.adicionarRegra();
73
+ this.addRule();
78
74
  },
79
- adicionarRegra() {
75
+ addRule() {
80
76
  let consulta_atualizada = deepClone(this.query);
81
77
  let obj = this.montaFiltro();
82
78
 
@@ -102,7 +98,7 @@ export default {
102
98
  props: this.selectedRule.props,
103
99
  classCss: this.selectedRule.classCss,
104
100
  icon: this.selectedRule.icon,
105
- operatores: this.selectedRule.operatores,
101
+ operators: this.selectedRule.operators,
106
102
  operator: null,
107
103
  andOr: this.selectedRule.andOr,
108
104
  isRequired: this.selectedRule.isRequired,
@@ -128,7 +124,7 @@ export default {
128
124
  watch: {
129
125
  event: {
130
126
  handler(event) {
131
- // Se a tag ou a rule que está selecionada foi removida, é necessário remover tambem do array "duplicidade" para liberar e adicionar novamente.
127
+ // Se a tag ou a rule que está selecionada foi removida, é necessário remove tambem do array "duplicidade" para liberar e adicionar novamente.
132
128
  if (event.nome == "tagRemovida" || event.nome == "selectedRuleRemovida") {
133
129
  var duplicidade = this.duplicidade.filter((item) => {
134
130
  return item.id != event.data.id;
@@ -1,5 +1,5 @@
1
- export default class ConverteParaOdata {
2
- converteRegra(rule) {
1
+ export default class ConvertToOdata {
2
+ convertRule(rule) {
3
3
  let nome = rule.nome;
4
4
  let title = rule.title;
5
5
  let valor = rule.valor;
@@ -16,20 +16,20 @@ export default class ConverteParaOdata {
16
16
  if (operator === ">") return `${nome} gt ${valor}`;
17
17
  if (operator === ">=") return `${nome} ge ${valor}`;
18
18
 
19
- if (rule.fieldType === "dateTime") return this.convertePeriodo(valor);
20
- if (rule.fieldType === "escolher") return this.converteEscolher(nome, valor);
21
- if (rule.fieldType === "checkbox") return this.converteCheckbox(nome, title, type, valor);
19
+ if (rule.fieldType === "dateTime") return this.convertDateTime(valor);
20
+ if (rule.fieldType === "escolher") return this.convertSelect(nome, valor);
21
+ if (rule.fieldType === "checkbox") return this.convertCheckbox(nome, title, type, valor);
22
22
 
23
23
  }
24
- convertePeriodo(valor) {
25
- let inicio = this.converteData(valor[0]);
26
- let fim = this.converteData(valor[1]);
24
+ convertDateTime(valor) {
25
+ let inicio = this.converteDate(valor[0]);
26
+ let fim = this.converteDate(valor[1]);
27
27
  return `data ge ${inicio} and data le ${fim}`;
28
28
  }
29
- converteEscolher(nome, valor) {
29
+ convertSelect(nome, valor) {
30
30
  return `${nome} eq '${valor.id}'`;
31
31
  }
32
- converteCheckbox(nome, title, type, options) {
32
+ convertCheckbox(nome, title, type, options) {
33
33
  let query = "";
34
34
  let sequencia = 0;
35
35
  var size = options.length;
@@ -40,7 +40,7 @@ export default class ConverteParaOdata {
40
40
  if (sequencia + 1 != size) query += ` or `;
41
41
  }
42
42
  if (type == "totalization") {
43
- let nomeConvertido = self.converteNome(valor);
43
+ let nomeConvertido = self.converteName(valor);
44
44
  query += `${nome} with ${valor} as ${nomeConvertido}${title}`;
45
45
  if (sequencia + 1 != size) query += `,`;
46
46
  }
@@ -50,7 +50,7 @@ export default class ConverteParaOdata {
50
50
  if (size > 1 && type == "field") return `(${query})`;
51
51
  return `${query}`;
52
52
  }
53
- converteData(data) {
53
+ converteDate(data) {
54
54
  let str = data.replace("/", "").replace("/", "");
55
55
 
56
56
  let date = {
@@ -71,7 +71,7 @@ export default class ConverteParaOdata {
71
71
 
72
72
  return iso;
73
73
  }
74
- converteNome(valor) {
74
+ converteName(valor) {
75
75
  if (valor === "sum") return "soma";
76
76
  if (valor === "average") return "media";
77
77
  if (valor === "max") return "maximo";
@@ -6,7 +6,7 @@
6
6
  <span style="margin-left: 10px">{{ rule.title }} </span>
7
7
  </label>
8
8
  <div style="margin-right: 20px">
9
- <options
9
+ <RadioGroup
10
10
  :options="[
11
11
  { text: 'e', value: 'and' },
12
12
  { text: 'ou', value: 'or' },
@@ -19,7 +19,7 @@
19
19
  v-model="rule.operator"
20
20
  class="form-control mr-2"
21
21
  >
22
- <option v-for="operator in rule.operatores" :key="operator">
22
+ <option v-for="operator in rule.operators" :key="operator">
23
23
  {{ operator }}
24
24
  </option>
25
25
  </select>
@@ -43,11 +43,11 @@
43
43
  v-model="rule.valor"
44
44
  />
45
45
  <Select
46
- v-if="rule.fieldType == 'escolher'"
46
+ v-if="rule.fieldType == 'select'"
47
47
  :url="rule.props.url"
48
48
  v-model="rule.valor"
49
49
  />
50
- <div @click="removeRegra" class="ml-auto btn-remover">
50
+ <div @click="removeRegra" class="ml-auto btn-remove">
51
51
  <i class="fas fa-times"></i>
52
52
  </div>
53
53
  </div>
@@ -58,19 +58,17 @@
58
58
  import DateTime from "@nixweb/nixloc-ui/src/component/forms/DateTime";
59
59
  import Select from "@nixweb/nixloc-ui/src/component/forms/Select";
60
60
  import CheckboxGroup from "@nixweb/nixloc-ui/src/component/forms/CheckboxGroup";
61
- import options from "@nixweb/nixloc-ui/src/component/forms/options.vue";
62
-
63
- import deepClone from "./utilities.js";
61
+ import RadioGroup from "@nixweb/nixloc-ui/src/component/forms/RadioGroup.vue";
64
62
 
65
63
  import { mapMutations } from "vuex";
66
64
 
67
65
  export default {
68
- name: "ComponenteDinamico",
66
+ name: "DynamicComponent",
69
67
  components: {
70
68
  DateTime,
71
69
  Select,
72
70
  CheckboxGroup,
73
- options,
71
+ RadioGroup,
74
72
  },
75
73
  props: ["rule"],
76
74
  methods: {
@@ -97,13 +95,13 @@ export default {
97
95
  };
98
96
  </script>
99
97
  <style scoped>
100
- .btn-remover {
98
+ .btn-remove {
101
99
  font-size: 16px;
102
100
  color: darkgray;
103
101
  cursor: pointer;
104
102
  }
105
103
 
106
- .div-escolher {
104
+ .div-select {
107
105
  width: 320px;
108
106
  }
109
107
  </style>
@@ -1,8 +1,9 @@
1
1
  <template>
2
2
  <div class="vqb-children">
3
3
  <component
4
- :is="componente()"
4
+ :is="component()"
5
5
  v-for="(rule, index) in query_builder.rules"
6
+ :key="index"
6
7
  :rule="rule"
7
8
  />
8
9
  </div>
@@ -14,19 +15,19 @@ import { mapState, mapMutations } from "vuex";
14
15
  export default {
15
16
  data() {
16
17
  return {
17
- componenteDinamico: null,
18
+ dynamicComponent: null,
18
19
  };
19
20
  },
20
21
  computed: {
21
22
  ...mapState("report", ["query_builder"]),
22
23
  },
23
24
  mounted() {
24
- this.componenteDinamico = this.$parent.$options.components["ComponenteDinamico"];
25
+ this.dynamicComponent = this.$parent.$options.components["DynamicComponent"];
25
26
  },
26
27
  methods: {
27
28
  ...mapMutations("report", ["convertRulesToOdata"]),
28
- componente() {
29
- return this.componenteDinamico;
29
+ component() {
30
+ return this.dynamicComponent;
30
31
  },
31
32
  },
32
33
  watch: {
@@ -1,19 +1,18 @@
1
1
  <template>
2
2
  <div class="vue-query-builder">
3
3
  <slot v-bind="vqbProps">
4
- <AdicionaFiltro v-bind="vqbProps" />
4
+ <AddRule v-bind="vqbProps" />
5
5
  </slot>
6
6
  </div>
7
7
  </template>
8
8
 
9
9
  <script>
10
- import AdicionaFiltro from "./AdicionaFiltro.vue";
11
- import deepClone from "./utilities.js";
10
+ import AddRule from "./AddRule.vue";
12
11
 
13
12
  export default {
14
- name: "ConstrutorConsulta",
13
+ name: "QueryBuilder",
15
14
  components: {
16
- AdicionaFiltro,
15
+ AddRule,
17
16
  },
18
17
  props: {
19
18
  rules: Array,
@@ -21,26 +20,26 @@ export default {
21
20
  data() {
22
21
  return {
23
22
  query: {},
24
- typeRegra: {
23
+ typeRule: {
25
24
  text: {
26
25
  id: "text-field",
27
- operatores: ["igual", "diferente", "contem"],
26
+ operators: ["igual", "diferente", "contem"],
28
27
  fieldType: "text",
29
28
  },
30
29
  numeric: {
31
30
  id: "number-field",
32
- operatores: ["=", "!=", "<", "<=", ">", ">="],
31
+ operators: ["=", "!=", "<", "<=", ">", ">="],
33
32
  fieldType: "number",
34
33
  },
35
34
  radio: {
36
35
  id: "radio-field",
37
- operatores: [],
36
+ operators: [],
38
37
  options: [],
39
38
  fieldType: "radio",
40
39
  },
41
40
  checkbox: {
42
41
  id: "checkbox-field",
43
- operatores: ["checkbox"],
42
+ operators: ["checkbox"],
44
43
  options: [],
45
44
  fieldType: "checkbox",
46
45
  },
@@ -48,21 +47,21 @@ export default {
48
47
  };
49
48
  },
50
49
  computed: {
51
- mesclarRegras() {
52
- var mesclarRegras = [];
50
+ mergeRules() {
51
+ var mergeRules = [];
53
52
  var self = this;
54
53
  self.rules.forEach(function (rule) {
55
- if (typeof self.typeRegra[rule.fieldType] !== "undefined") {
56
- mesclarRegras.push(Object.assign({}, self.typeRegra[rule.fieldType], rule));
54
+ if (typeof self.typeRule[rule.fieldType] !== "undefined") {
55
+ mergeRules.push(Object.assign({}, self.typeRule[rule.fieldType], rule));
57
56
  } else {
58
- mesclarRegras.push(rule);
57
+ mergeRules.push(rule);
59
58
  }
60
59
  });
61
- return mesclarRegras;
60
+ return mergeRules;
62
61
  },
63
62
  vqbProps() {
64
63
  return {
65
- rules: this.mesclarRegras,
64
+ rules: this.mergeRules,
66
65
  };
67
66
  },
68
67
  },
@@ -1,20 +1,20 @@
1
1
  <template>
2
2
  <div>
3
3
  <ScrollBar :minHeight="450" :maxHeight="600">
4
- <ConstrutorConsulta :rules="rules" />
4
+ <QueryBuilder :rules="rules" />
5
5
  </ScrollBar>
6
6
  </div>
7
7
  </template>
8
8
 
9
9
  <script>
10
- import ConstrutorConsulta from "./ConstrutorConsulta.vue";
10
+ import QueryBuilder from "./QueryBuilder.vue";
11
11
  import ScrollBar from "@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue";
12
12
 
13
13
  import { mapMutations } from "vuex";
14
14
 
15
15
  export default {
16
- name: "Filtro",
17
- components: { ScrollBar, ConstrutorConsulta },
16
+ name: "Rules",
17
+ components: { ScrollBar, QueryBuilder },
18
18
  props: {
19
19
  rules: Array,
20
20
  },
@@ -34,12 +34,12 @@
34
34
  <script>
35
35
  import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
36
36
  import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
37
- import Report from "@nixweb/nixloc-ui/src/component/template/Report.js";
37
+ import Report from "@nixweb/nixloc-ui/src/component/template/model/Report.js";
38
38
 
39
39
  import { mapGetters, mapState, mapActions, mapMutations } from "vuex";
40
40
 
41
41
  export default {
42
- name: "TemplateReportAddEditView",
42
+ name: "AddEditReport",
43
43
  components: { Button, InputText },
44
44
  props: {
45
45
  module: String,
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <div>
3
- <div :class="{ 'g-div-molded': mostrarMoldura }">
3
+ <div :class="{ 'g-div-molded': showMolded }">
4
4
  <b-row>
5
5
  <b-col sm="12"
6
6
  ><div>
7
- <HorizontalFilter v-if="mostrarFiltroHorizontal">
7
+ <HorizontalFilter v-if="showHorizontalFilter">
8
8
  <div slot="content-filter-horizontal">
9
9
  <slot name="content-filter-horizontal"></slot>
10
10
  </div>
@@ -15,7 +15,6 @@
15
15
  <b-col sm="6">
16
16
  <TableTotalization :totalization="content.totalization" />
17
17
  </b-col>
18
-
19
18
  <b-col sm="6">
20
19
  <TableTotalRecords :totalRecords="content.totalRecords" />
21
20
  </b-col>
@@ -24,16 +23,17 @@
24
23
  <div>
25
24
  <Button
26
25
  v-if="buttonRemove"
27
- key="remover"
26
+ key="remove"
28
27
  :title="`Remover ${selected.length}`"
29
28
  type="danger"
30
29
  size="small"
31
- :clicked="removerSelecionados"
30
+ :clicked="removeSelected"
32
31
  />
33
- <slot name="content-buttons-table-header"></slot></div
34
- ></FixedBar>
32
+ <slot name="content-buttons-table-header"></slot>
33
+ </div>
34
+ </FixedBar>
35
35
  <Table
36
- :headerTable="templateList.headerTable"
36
+ :header="templateList.headerTable"
37
37
  :data="content.data"
38
38
  :showChecks="templateList.showChecks"
39
39
  >
@@ -59,15 +59,15 @@ import HorizontalFilter from "../shared/HorizontalFilter.vue";
59
59
  import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
60
60
 
61
61
  export default {
62
- name: "TemplateListView",
62
+ name: "ListViewWithHandlerData",
63
63
  props: {
64
64
  templateList: Object,
65
65
  propsParam: Object,
66
- mostrarMoldura: {
66
+ showMolded: {
67
67
  type: Boolean,
68
68
  default: true,
69
69
  },
70
- mostrarFiltroHorizontal: {
70
+ showHorizontalFilter: {
71
71
  type: Boolean,
72
72
  default: true,
73
73
  },
@@ -97,12 +97,12 @@ export default {
97
97
  currentPage: 1,
98
98
  totalPerPage: 10,
99
99
  },
100
- paramsFiltro: [],
101
- filtroDinamico: {},
100
+ paramsFilter: [],
101
+ dynamicFilter: {},
102
102
  };
103
103
  },
104
104
  created() {
105
- // o carregamento inicial getAll() é feito pela mudança no paginacaoChave
105
+ // o carregamento inicial getAll() é feito pela mudança no paginationKey
106
106
  },
107
107
  mounted() {
108
108
  this.updatePagination({
@@ -117,15 +117,15 @@ export default {
117
117
  computed: {
118
118
  ...mapState("generic", [
119
119
  "selected",
120
- "metodoExecutadoApi",
120
+ "methodExecutedApi",
121
121
  "search",
122
- "buscouPesquisa",
123
- "limpouPesquisa",
122
+ "executedSearch",
123
+ "clearedSearch",
124
124
  "totalPerPage",
125
- "SelectStatic",
125
+ "selectStatic",
126
126
  ]),
127
127
  ...mapGetters("generic", ["pagination"]),
128
- paginacaoChave: function () {
128
+ paginationKey: function () {
129
129
  return this.pagination("templateList");
130
130
  },
131
131
  },
@@ -138,20 +138,20 @@ export default {
138
138
  "updateSearch",
139
139
  ]),
140
140
  getAll() {
141
- let obj = { ...this.baseParams, ...this.filtroDinamico, ...this.propsParam };
141
+ let obj = { ...this.baseParams, ...this.dynamicFilter, ...this.propsParam };
142
142
  let params = { url: this.templateList.urlGetApi, obj: obj };
143
143
  this.getApi(params).then((response) => {
144
144
  this.content = response.content;
145
- this.removeLoading(["panel", "modeloSubView", "pesquisar", "limpar"]);
145
+ this.removeLoading(["panel", "modeloSubView", "search", "clean"]);
146
146
  });
147
147
  },
148
- removerSelecionados() {
148
+ removeSelected() {
149
149
  let params = {
150
150
  url: this.templateList.urlRemoverTodosApi,
151
151
  selected: this.selected,
152
152
  };
153
153
  this.deleteAllApi(params).then(() => {
154
- this.removeLoading(["remover"]);
154
+ this.removeLoading(["remove"]);
155
155
  this.addSelected([]);
156
156
  });
157
157
  },
@@ -160,7 +160,7 @@ export default {
160
160
  },
161
161
  },
162
162
  watch: {
163
- metodoExecutadoApi: function (value) {
163
+ methodExecutedApi: function (value) {
164
164
  if (
165
165
  value === "postApi" ||
166
166
  value === "putApi" ||
@@ -170,19 +170,19 @@ export default {
170
170
  this.getAll();
171
171
  }
172
172
  },
173
- buscouPesquisa: function () {
173
+ executedSearch: function () {
174
174
  this.baseParams.search = this.search.content;
175
175
  this.baseParams.filter = this.search.filter.id;
176
176
  this.limpaParams();
177
177
  this.getAll();
178
178
  },
179
- limpouPesquisa: function () {
179
+ clearedSearch: function () {
180
180
  this.baseParams.search = "";
181
181
  this.baseParams.filter = "";
182
182
  this.limpaParams();
183
183
  this.getAll();
184
184
  },
185
- paginacaoChave: {
185
+ paginationKey: {
186
186
  handler(value) {
187
187
  this.limpaParams();
188
188
  this.baseParams.currentPage = value.currentPage;
@@ -190,16 +190,16 @@ export default {
190
190
  },
191
191
  deep: true,
192
192
  },
193
- SelectStatic: {
193
+ selectStatic: {
194
194
  handler(value) {
195
195
  let fieldTarget = value.fieldTarget;
196
196
  let obj = { key: fieldTarget, valor: value.valor };
197
- this.paramsFiltro.push(obj);
197
+ this.paramsFilter.push(obj);
198
198
 
199
199
  var result = {};
200
- for (var i = 0; i < this.paramsFiltro.length; i++) {
201
- let key = this.paramsFiltro[i].key;
202
- let valor = this.paramsFiltro[i].valor;
200
+ for (var i = 0; i < this.paramsFilter.length; i++) {
201
+ let key = this.paramsFilter[i].key;
202
+ let valor = this.paramsFilter[i].valor;
203
203
 
204
204
  if (key == "periodo") {
205
205
  result["inicio"] = valor.inicio;
@@ -209,11 +209,11 @@ export default {
209
209
  }
210
210
  }
211
211
 
212
- this.filtroDinamico = result;
212
+ this.dynamicFilter = result;
213
213
 
214
214
  this.updatePagination({
215
215
  key: "templateList",
216
- totalPerPage: this.filtroDinamico.totalPerPage,
216
+ totalPerPage: this.dynamicFilter.totalPerPage,
217
217
  });
218
218
 
219
219
  this.getAll();
@@ -4,15 +4,15 @@
4
4
  <div v-show="!carregando('modeloSubView')">
5
5
  <slot name="content-buttons"></slot>
6
6
  <div v-if="showSearch">
7
- <Pesquisa />
7
+ <Search />
8
8
  <br />
9
9
  </div>
10
10
 
11
- <TemplateListView
11
+ <ListViewWithHandlerData
12
12
  :templateList="templateList"
13
13
  :propsParam="propsParam"
14
- :mostrarMoldura="false"
15
- :mostrarFiltroHorizontal="mostrarFiltroHorizontal"
14
+ :showMolded="false"
15
+ :showHorizontalFilter="showHorizontalFilter"
16
16
  :buttonRemove="buttonRemove"
17
17
  >
18
18
  <div slot="content-buttons-table-header">
@@ -24,22 +24,22 @@
24
24
  <div slot="content-buttons-table">
25
25
  <slot name="content-buttons-table"></slot>
26
26
  </div>
27
- </TemplateListView>
27
+ </ListViewWithHandlerData>
28
28
  </div>
29
29
  </div>
30
30
  </template>
31
31
 
32
32
  <script>
33
- import Pesquisa from "../shared/Search.vue";
33
+ import Search from "../shared/Search.vue";
34
34
  import Loading from "../shared/Loading.vue";
35
35
 
36
- import TemplateListView from "@nixweb/nixloc-ui/src/component/template/TemplateListView.vue";
36
+ import ListViewWithHandlerData from "@nixweb/nixloc-ui/src/component/template/ListViewWithHandlerData.vue";
37
37
 
38
38
  import { mapGetters, mapMutations } from "vuex";
39
39
 
40
40
  export default {
41
- name: "TemplateSubView",
42
- components: { Pesquisa, Loading, TemplateListView },
41
+ name: "ViewTemplateConfiguration",
42
+ components: { Search, Loading, ListViewWithHandlerData },
43
43
  props: {
44
44
  templateList: Object,
45
45
  propsParam: Object,
@@ -47,7 +47,7 @@ export default {
47
47
  type: Boolean,
48
48
  default: true,
49
49
  },
50
- mostrarFiltroHorizontal: {
50
+ showHorizontalFilter: {
51
51
  type: Boolean,
52
52
  default: true,
53
53
  },
@@ -131,7 +131,7 @@ import print from "vue-print-nb";
131
131
  import { mapState, mapGetters, mapMutations } from "vuex";
132
132
 
133
133
  export default {
134
- name: "TemplateDocumentView",
134
+ name: "ViewTemplateDocumentView",
135
135
  directives: {
136
136
  print,
137
137
  },
@@ -30,7 +30,7 @@
30
30
  :confirmed="excluir"
31
31
  >
32
32
  <div class="text-right">
33
- <i class="fas fa-times-circle icon-remover"></i>
33
+ <i class="fas fa-times-circle icon-remove"></i>
34
34
  </div>
35
35
  </Confirmation>
36
36
  </b-col>
@@ -81,11 +81,11 @@ export default {
81
81
  return {
82
82
  todos: { salvo: [] },
83
83
  urlObterTodos: "/api/v1/shared/relatorio/obter-todos",
84
- urlRemover: "/api/v1/shared/relatorio/remover",
84
+ urlRemover: "/api/v1/shared/relatorio/remove",
85
85
  };
86
86
  },
87
87
  computed: {
88
- ...mapState("generic", ["search", "buscouPesquisa", "limpouPesquisa"]),
88
+ ...mapState("generic", ["search", "executedSearch", "clearedSearch"]),
89
89
  },
90
90
  mounted() {
91
91
  this.getAll();
@@ -151,7 +151,7 @@ export default {
151
151
  },
152
152
  },
153
153
  watch: {
154
- buscouPesquisa: function () {
154
+ executedSearch: function () {
155
155
  let padrao = [];
156
156
  let salvo = [];
157
157
  let self = this;
@@ -179,15 +179,15 @@ export default {
179
179
  self.todos.salvo = salvo;
180
180
  self.todos.padrao = padrao;
181
181
 
182
- self.removeLoading(["pesquisar", "limpar"]);
182
+ self.removeLoading(["search", "clean"]);
183
183
  }, 300);
184
184
  },
185
- limpouPesquisa: function () {
185
+ clearedSearch: function () {
186
186
  let self = this;
187
187
  setTimeout(function () {
188
188
  self.todos = self.relatorios;
189
189
  self.getAll();
190
- self.removeLoading(["pesquisar", "limpar"]);
190
+ self.removeLoading(["search", "clean"]);
191
191
  }, 300);
192
192
  },
193
193
  },
@@ -199,7 +199,7 @@ export default {
199
199
  color: #94aa2a;
200
200
  }
201
201
 
202
- .icon-remover {
202
+ .icon-remove {
203
203
  color: red;
204
204
  }
205
205
 
@@ -19,7 +19,7 @@
19
19
  />
20
20
  </div>
21
21
  <Modal title="Salvar" :width="550" v-show="showModal('salvar')">
22
- <TemplateReportAddEditView :module="panel.module" />
22
+ <AddEditReport :module="panel.module" />
23
23
  </Modal>
24
24
  <Molded>
25
25
  <div>
@@ -195,7 +195,7 @@ import Molded from "@nixweb/nixloc-ui/src/component/layout/Molded";
195
195
  import ProgressBar from "@nixweb/nixloc-ui/src/component/shared/ProgressBar";
196
196
  import Rodape from "@nixweb/nixloc-ui/src/component/shared/construtor-query/Rodape.vue";
197
197
  import Tags from "@nixweb/nixloc-ui/src/component/shared/construtor-query/Tags.vue";
198
- import TemplateReportAddEditView from "@nixweb/nixloc-ui/src/component/template/TemplateReportAddEditView.vue";
198
+ import AddEditReport from "@nixweb/nixloc-ui/src/component/template/AddEditReport.vue";
199
199
  import print from "vue-print-nb";
200
200
 
201
201
  import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
@@ -222,7 +222,7 @@ export default {
222
222
  Rodape,
223
223
  ProgressBar,
224
224
  Tags,
225
- TemplateReportAddEditView,
225
+ AddEditReport,
226
226
  ExportExcel,
227
227
  HeaderPrint,
228
228
  },
@@ -23,7 +23,7 @@ import Panel from "@nixweb/nixloc-ui/src/component/layout/Panel";
23
23
  import SaveCancel from "@nixweb/nixloc-ui/src/component/shared/SaveCancel";
24
24
 
25
25
  export default {
26
- name: "TemplateAddEditView",
26
+ name: "ViewTemplateCrud",
27
27
  components: { Panel, SaveCancel },
28
28
  props: {
29
29
  panel: Object,
@@ -14,7 +14,7 @@
14
14
  <slot name="content-buttons"></slot>
15
15
  </div>
16
16
  <div slot="content-main">
17
- <TemplateListView :templateList="templateList" :buttonRemove="buttonRemove">
17
+ <ListViewWithHandlerData :templateList="templateList" :buttonRemove="buttonRemove">
18
18
  <div slot="content-buttons-table-header">
19
19
  <slot name="content-buttons-table-header"></slot>
20
20
  </div>
@@ -24,7 +24,7 @@
24
24
  <div slot="content-buttons-table">
25
25
  <slot name="content-buttons-table"></slot>
26
26
  </div>
27
- </TemplateListView>
27
+ </ListViewWithHandlerData>
28
28
  </div>
29
29
  </Panel>
30
30
  </div>
@@ -32,11 +32,11 @@
32
32
 
33
33
  <script>
34
34
  import Panel from '@nixweb/nixloc-ui/src/component/layout/Panel.vue'
35
- import TemplateListView from "@nixweb/nixloc-ui/src/component/template/TemplateListView.vue";
35
+ import ListViewWithHandlerData from "@nixweb/nixloc-ui/src/component/template/ListViewWithHandlerData.vue";
36
36
 
37
37
  export default {
38
38
  name: "TemplateView",
39
- components: { Panel, TemplateListView },
39
+ components: { Panel, ListViewWithHandlerData },
40
40
  props: {
41
41
  panel: Object,
42
42
  templateList: Object,
@@ -41,7 +41,6 @@
41
41
  <script>
42
42
  import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
43
43
  import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
44
- import options from "@nixweb/nixloc-ui/src/component/forms/options";
45
44
  import DadosContato from "@nixweb/nixloc-ui/src/component/value-objects/DadosContato.js";
46
45
 
47
46
  import { mapGetters } from "vuex";
@@ -56,7 +55,7 @@ export default {
56
55
  },
57
56
  value: Object,
58
57
  },
59
- components: { options, InputText, Button },
58
+ components: { InputText, Button },
60
59
  data() {
61
60
  return {
62
61
  dadosContato: new DadosContato(),
@@ -2,21 +2,21 @@
2
2
  <div>
3
3
  <b-row>
4
4
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
5
- <options
6
- field="typePessoa"
5
+ <RadioGroup
6
+ field="tipoPessoa"
7
7
  :formName="formName"
8
8
  :options="[
9
9
  { text: 'Física', value: 1 },
10
10
  { text: 'Jurídica', value: 2 },
11
11
  ]"
12
- v-model="dadosPessoa.typePessoa"
12
+ v-model="dadosPessoa.tipoPessoa"
13
13
  />
14
14
  </b-col>
15
15
  </b-row>
16
16
  <b-row>
17
17
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
18
18
  <InputText
19
- :title="dadosPessoa.typePessoa == 2 ? 'CNPJ' : 'CPF'"
19
+ :title="dadosPessoa.tipoPessoa == 2 ? 'CNPJ' : 'CPF'"
20
20
  field="cnpjCpf"
21
21
  :formName="formName"
22
22
  :mask="['##.###.###/####-##', '###.###.###-##']"
@@ -86,7 +86,7 @@
86
86
  <script>
87
87
  import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
88
88
  import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
89
- import options from "@nixweb/nixloc-ui/src/component/forms/options";
89
+ import RadioGroup from "@nixweb/nixloc-ui/src/component/forms/RadioGroup";
90
90
  import DadosPessoa from "@nixweb/nixloc-ui/src/component/value-objects/DadosPessoa.js";
91
91
 
92
92
  import { mapMutations } from "vuex";
@@ -101,7 +101,7 @@ export default {
101
101
  },
102
102
  value: Object,
103
103
  },
104
- components: { options, InputText, Button },
104
+ components: { RadioGroup, InputText, Button },
105
105
  data() {
106
106
  return {
107
107
  dadosPessoa: new DadosPessoa(),
@@ -87,7 +87,6 @@
87
87
  <script>
88
88
  import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
89
89
  import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
90
- import options from "@nixweb/nixloc-ui/src/component/forms/options";
91
90
  import SelectStatic from "@nixweb/nixloc-ui/src/component/forms/SelectStatic";
92
91
 
93
92
  import Endereco from "@nixweb/nixloc-ui/src/component/value-objects/Endereco.js";
@@ -104,7 +103,7 @@ export default {
104
103
  },
105
104
  value: Object,
106
105
  },
107
- components: { options, InputText, Button, SelectStatic },
106
+ components: { InputText, Button, SelectStatic },
108
107
 
109
108
  data() {
110
109
  return {
@@ -368,7 +368,7 @@ export default {
368
368
  }, (err) => {
369
369
  if (err.response)
370
370
  if (err.response.status === 403)
371
- context.commit('addNotifications', [{ message: "Usuário sem permissão para remover!" }])
371
+ context.commit('addNotifications', [{ message: "Usuário sem permissão para remove!" }])
372
372
 
373
373
  if (!err.response)
374
374
  context.commit('addNotificationErrorApi');
@@ -398,7 +398,7 @@ export default {
398
398
  }, (err) => {
399
399
  if (err.response)
400
400
  if (err.response.status === 403)
401
- context.commit('addNotifications', [{ message: "Usuário sem permissão para remover!" }])
401
+ context.commit('addNotifications', [{ message: "Usuário sem permissão para remove!" }])
402
402
 
403
403
  if (!err.response)
404
404
  context.commit('addNotificationErrorApi');
@@ -478,7 +478,7 @@ export default {
478
478
  }, (err) => {
479
479
  if (err.response)
480
480
  if (err.response.status === 403)
481
- context.commit('addNotifications', [{ message: "Usuário sem permissão para remover!" }])
481
+ context.commit('addNotifications', [{ message: "Usuário sem permissão para remove!" }])
482
482
 
483
483
  if (!err.response)
484
484
  context.commit('addNotificationErrorApi');