@nixweb/nixloc-ui 0.0.121 → 0.0.122

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 (119) hide show
  1. package/docs/src/component/template/ModeloRelatorioView.drawio +2 -2
  2. package/docs/src/store/modulos/relatorio.drawio +1 -1
  3. package/package.json +77 -77
  4. package/public/styles/app.css +1 -1
  5. package/src/component/forms/{Botao.vue → Button.vue} +53 -57
  6. package/src/component/forms/CheckboxGroup.vue +63 -0
  7. package/src/component/forms/{CheckboxUnico.vue → CheckboxSimple.vue} +6 -6
  8. package/src/component/forms/{Cor.vue → Color.vue} +9 -9
  9. package/src/component/forms/DateTime.vue +53 -53
  10. package/src/component/forms/{BotaoDropdown.vue → Dropdown.vue} +50 -50
  11. package/src/component/forms/EditorHtml.vue +123 -0
  12. package/src/component/forms/FileUpload.vue +189 -0
  13. package/src/component/forms/InputDecimal.vue +137 -0
  14. package/src/component/forms/InputNumber.vue +149 -0
  15. package/src/component/forms/InputPassword.vue +135 -0
  16. package/src/component/forms/InputText.vue +157 -0
  17. package/src/component/forms/Modal.vue +15 -15
  18. package/src/component/forms/RadioGroup.vue +50 -0
  19. package/src/component/forms/Select.vue +337 -0
  20. package/src/component/forms/SelectStatic.vue +120 -0
  21. package/src/component/forms/TextArea.vue +126 -0
  22. package/src/component/forms/Toggle.vue +13 -13
  23. package/src/component/layout/{Conta.vue → Account.vue} +28 -28
  24. package/src/component/layout/{Alerta.vue → Alert.vue} +22 -22
  25. package/src/component/layout/Badge.vue +23 -23
  26. package/src/component/layout/{BarraFixa.vue → FixedBar.vue} +16 -16
  27. package/src/component/layout/{CarregandoTelaInteira.vue → LoadingFullPage.vue} +3 -3
  28. package/src/component/layout/Menu.vue +66 -66
  29. package/src/component/layout/{Moldura.vue → Molded.vue} +4 -4
  30. package/src/component/layout/Panel.vue +142 -0
  31. package/src/component/layout/Popover.vue +1 -1
  32. package/src/component/layout/{BarraRolagem.vue → Scrollbar.vue} +9 -11
  33. package/src/component/layout/Tag.vue +9 -9
  34. package/src/component/layout/Topo.vue +1 -1
  35. package/src/component/layout/Wizard.vue +3 -3
  36. package/src/component/shared/BotaoCarregarMais.vue +9 -9
  37. package/src/component/shared/BotaoConsulta.vue +9 -9
  38. package/src/component/shared/CabecalhoImpressao.vue +6 -6
  39. package/src/component/shared/CodigoEditor.vue +16 -16
  40. package/src/component/shared/Confirmacao.vue +28 -28
  41. package/src/component/shared/Dica.vue +10 -10
  42. package/src/component/shared/DocumentoEditor.vue +3 -3
  43. package/src/component/shared/DocumentoPreview.vue +2 -2
  44. package/src/component/shared/EsconderMostrar.vue +26 -26
  45. package/src/component/shared/ExportarExcel.vue +14 -14
  46. package/src/component/shared/ExportarPDF.vue +10 -10
  47. package/src/component/shared/FiltroHorizontal.vue +19 -19
  48. package/src/component/shared/LegendaParametro.vue +17 -17
  49. package/src/component/shared/{Carregando.vue → Loading.vue} +11 -11
  50. package/src/component/shared/Messages.vue +83 -0
  51. package/src/component/shared/Paginacao.vue +10 -10
  52. package/src/component/shared/Progresso.vue +2 -2
  53. package/src/component/shared/Registro.vue +2 -2
  54. package/src/component/shared/ResumoTabela.vue +6 -6
  55. package/src/component/shared/SalvarCancelar.vue +26 -26
  56. package/src/component/shared/{Pesquisa.vue → Search.vue} +36 -36
  57. package/src/component/shared/Tabela.vue +49 -49
  58. package/src/component/shared/TabelaBotao.vue +13 -13
  59. package/src/component/shared/Toast.vue +7 -7
  60. package/src/component/shared/{FiltroVertical.vue → VerticalFilter.vue} +14 -14
  61. package/src/component/shared/construtor-consulta/AdicionaFiltro.vue +191 -0
  62. package/src/component/shared/construtor-consulta/Campo.vue +127 -0
  63. package/src/component/shared/construtor-consulta/ComponenteDinamico.vue +109 -0
  64. package/src/component/shared/construtor-consulta/ConstrutorConsulta.vue +70 -0
  65. package/src/component/shared/construtor-consulta/ConverteParaOdata.js +80 -0
  66. package/src/component/shared/construtor-consulta/EscolherFiltro.vue +96 -0
  67. package/src/component/shared/{query-builder → construtor-consulta}/Filtro.vue +11 -16
  68. package/src/component/shared/construtor-consulta/ListaComponenteDinamico.vue +41 -0
  69. package/src/component/shared/{query-builder → construtor-consulta}/Rodape.vue +9 -9
  70. package/src/component/shared/{query-builder → construtor-consulta}/Tags.vue +7 -7
  71. package/src/component/shared/{query-builder → construtor-consulta}/utilities.js +0 -0
  72. package/src/component/template/ModeloAdicionarModificarView.vue +11 -11
  73. package/src/component/template/ModeloDocumentoView.vue +79 -79
  74. package/src/component/template/ModeloLista.vue +66 -66
  75. package/src/component/template/ModeloRelatorioListaView.vue +71 -68
  76. package/src/component/template/ModeloRelatorioView.vue +201 -190
  77. package/src/component/template/ModeloSubView.vue +13 -13
  78. package/src/component/template/ModeloView.vue +17 -17
  79. package/src/component/template/Relatorio.js +1 -5
  80. package/src/component/template/RelatorioAdicionarModificar.vue +44 -44
  81. package/src/component/value-objects/DadosContato.vue +27 -27
  82. package/src/component/value-objects/DadosPessoa.js +1 -1
  83. package/src/component/value-objects/DadosPessoa.vue +52 -52
  84. package/src/component/value-objects/Endereco.js +1 -1
  85. package/src/component/value-objects/Endereco.vue +83 -83
  86. package/src/config/dicas.js +1 -1
  87. package/src/config/token.js +2 -2
  88. package/src/store/modules/generic.js +489 -0
  89. package/src/store/modules/report.js +246 -0
  90. package/src/store/modules/user.js +38 -0
  91. package/src/store/modules/validation.js +39 -0
  92. package/src/store/store.js +4 -4
  93. package/src/component/forms/ArquivoUpload.vue +0 -199
  94. package/src/component/forms/CheckboxMultiplo.vue +0 -63
  95. package/src/component/forms/Decimal.vue +0 -137
  96. package/src/component/forms/Escolher.vue +0 -335
  97. package/src/component/forms/EscolherEstatico.vue +0 -139
  98. package/src/component/forms/Numero.vue +0 -153
  99. package/src/component/forms/Opcoes.vue +0 -51
  100. package/src/component/forms/Senha.vue +0 -139
  101. package/src/component/forms/Texto.vue +0 -161
  102. package/src/component/forms/TextoArea.vue +0 -126
  103. package/src/component/forms/TextoEditor.vue +0 -123
  104. package/src/component/layout/Painel.vue +0 -142
  105. package/src/component/shared/Mensagem.vue +0 -86
  106. package/src/component/shared/query-builder/Campo.vue +0 -116
  107. package/src/component/shared/query-builder/ConverteParaOdata.js +0 -77
  108. package/src/component/shared/query-builder/QueryBuilder.vue +0 -164
  109. package/src/component/shared/query-builder/components/CustomSelect.vue +0 -115
  110. package/src/component/shared/query-builder/components/QueryBuilderChildren.vue +0 -46
  111. package/src/component/shared/query-builder/components/QueryBuilderGroup.vue +0 -151
  112. package/src/component/shared/query-builder/components/QueryBuilderRule.vue +0 -81
  113. package/src/component/shared/query-builder/layouts/Bootstrap/BootstrapGroup.vue +0 -120
  114. package/src/component/shared/query-builder/layouts/Bootstrap/BootstrapRule.vue +0 -187
  115. package/src/component/shared/query-builder/main.js +0 -81
  116. package/src/store/modulos/generic.js +0 -494
  117. package/src/store/modulos/relatorio.js +0 -204
  118. package/src/store/modulos/usuario.js +0 -38
  119. package/src/store/modulos/validation.js +0 -39
@@ -2,8 +2,8 @@
2
2
  <div>
3
3
  <Carregando :centralizado="false" v-show="carregando('modeloSubView')" />
4
4
  <div v-show="!carregando('modeloSubView')">
5
- <slot name="conteudo-botoes"></slot>
6
- <div v-if="mostrarPesquisa">
5
+ <slot name="content-buttons"></slot>
6
+ <div v-if="showSearch">
7
7
  <Pesquisa />
8
8
  <br />
9
9
  </div>
@@ -15,14 +15,14 @@
15
15
  :mostrarFiltroHorizontal="mostrarFiltroHorizontal"
16
16
  :botaoExcluir="botaoExcluir"
17
17
  >
18
- <div slot="conteudo-botoes-tabela-cabecalho">
19
- <slot name="conteudo-botoes-tabela-cabecalho"></slot>
18
+ <div slot="content-buttons-tabela-cabecalho">
19
+ <slot name="content-buttons-tabela-cabecalho"></slot>
20
20
  </div>
21
- <div slot="conteudo-filtro-horizontal">
22
- <slot name="conteudo-filtro-horizontal"></slot>
21
+ <div slot="content-filter-horizontal">
22
+ <slot name="content-filter-horizontal"></slot>
23
23
  </div>
24
- <div slot="conteudo-botoes-tabela">
25
- <slot name="conteudo-botoes-tabela"></slot>
24
+ <div slot="content-buttons-tabela">
25
+ <slot name="content-buttons-tabela"></slot>
26
26
  </div>
27
27
  </ModeloLista>
28
28
  </div>
@@ -30,8 +30,8 @@
30
30
  </template>
31
31
 
32
32
  <script>
33
- import Pesquisa from "../shared/Pesquisa.vue";
34
- import Carregando from "../shared/Carregando.vue";
33
+ import Pesquisa from "../shared/Search.vue";
34
+ import Carregando from "../shared/Loading.vue";
35
35
 
36
36
  import ModeloLista from "@nixweb/nixloc-ui/src/component/template/ModeloLista.vue";
37
37
 
@@ -43,7 +43,7 @@ export default {
43
43
  props: {
44
44
  modeloLista: Object,
45
45
  propsParam: Object,
46
- mostrarPesquisa: {
46
+ showSearch: {
47
47
  type: Boolean,
48
48
  default: true,
49
49
  },
@@ -60,10 +60,10 @@ export default {
60
60
  ...mapGetters("generic", ["carregando"]),
61
61
  },
62
62
  created() {
63
- this.insereCarregando("modeloSubView");
63
+ this.addLoading("modeloSubView");
64
64
  },
65
65
  methods: {
66
- ...mapMutations("generic", ["insereCarregando"]),
66
+ ...mapMutations("generic", ["addLoading"]),
67
67
  },
68
68
  };
69
69
  </script>
@@ -1,28 +1,28 @@
1
1
  <template>
2
2
  <div>
3
3
  <Painel
4
- :modulo="painel.modulo"
5
- :titulo="painel.titulo"
6
- :mostrarFiltroVertical="painel.mostrarFiltroVertical"
7
- :mostrarPesquisa="painel.mostrarPesquisa"
8
- :mostrarBotoes="painel.mostrarBotoes"
4
+ :module="panel.module"
5
+ :title="panel.title"
6
+ :showVerticalFilter="panel.showVerticalFilter"
7
+ :showSearch="panel.showSearch"
8
+ :showButtons="panel.showButtons"
9
9
  >
10
- <div slot="conteudo-filtro-vertical">
11
- <slot name="conteudo-filtro-vertical"></slot>
10
+ <div slot="content-filter-vertical">
11
+ <slot name="content-filter-vertical"></slot>
12
12
  </div>
13
- <div slot="conteudo-botoes">
14
- <slot name="conteudo-botoes"></slot>
13
+ <div slot="content-buttons">
14
+ <slot name="content-buttons"></slot>
15
15
  </div>
16
- <div slot="conteudo-principal">
16
+ <div slot="content-main">
17
17
  <ModeloLista :modeloLista="modeloLista" :botaoExcluir="botaoExcluir">
18
- <div slot="conteudo-botoes-tabela-cabecalho">
19
- <slot name="conteudo-botoes-tabela-cabecalho"></slot>
18
+ <div slot="content-buttons-tabela-cabecalho">
19
+ <slot name="content-buttons-tabela-cabecalho"></slot>
20
20
  </div>
21
- <div slot="conteudo-filtro-horizontal">
22
- <slot name="conteudo-filtro-horizontal"></slot>
21
+ <div slot="content-filter-horizontal">
22
+ <slot name="content-filter-horizontal"></slot>
23
23
  </div>
24
- <div slot="conteudo-botoes-tabela">
25
- <slot name="conteudo-botoes-tabela"></slot>
24
+ <div slot="content-buttons-tabela">
25
+ <slot name="content-buttons-tabela"></slot>
26
26
  </div>
27
27
  </ModeloLista>
28
28
  </div>
@@ -38,7 +38,7 @@ export default {
38
38
  name: "ModeloView",
39
39
  components: { Painel, ModeloLista },
40
40
  props: {
41
- painel: Object,
41
+ panel: Object,
42
42
  modeloLista: Object,
43
43
  botaoExcluir: {
44
44
  type: Boolean,
@@ -1,10 +1,6 @@
1
- export default class Relatorio {
1
+ export default class report {
2
2
  constructor() {
3
3
  this.id = "";
4
4
  this.nome = "";
5
5
  }
6
- modificar(dados) {
7
- this.id = dados.id;
8
- this.nome = dados.nome;
9
- }
10
6
  }
@@ -3,27 +3,27 @@
3
3
  <b-row>
4
4
  <b-col sm="12"
5
5
  ><Texto
6
- titulo="Nome"
7
- campo="nome"
8
- :formNome="formNome"
9
- :requerido="true"
10
- :tamanhoMaximo="40"
11
- v-model="relatorio.nome"
12
- :marcarFormSujo="false"
6
+ title="Nome"
7
+ field="nome"
8
+ :formName="formName"
9
+ :required="true"
10
+ :maxLength="40"
11
+ v-model="report.nome"
12
+ :markFormDirty="false"
13
13
  />
14
14
  </b-col>
15
15
  </b-row>
16
16
  <b-row>
17
17
  <b-col sm="12">
18
18
  <div class="text-right">
19
- <Botao
20
- chave="salvar"
21
- tipo="sucesso"
22
- titulo="Salvar"
23
- :desabilitado="!formValido(formNome)"
24
- classeIcone="fas fa-save"
25
- tamanho="medio"
26
- :clique="salvarRelatorio"
19
+ <Button
20
+ key="salvar"
21
+ type="success"
22
+ title="Salvar"
23
+ :disabled="!isFormValid(formName)"
24
+ classIcon="fas fa-save"
25
+ size="medium"
26
+ :clicked="salvarRelatorio"
27
27
  />
28
28
  </div>
29
29
  </b-col>
@@ -33,71 +33,71 @@
33
33
 
34
34
  <script>
35
35
  import Texto from "@nixweb/nixloc-ui/src/component/forms/Texto";
36
- import Botao from "@nixweb/nixloc-ui/src/component/forms/Botao";
37
- import Relatorio from "@nixweb/nixloc-ui/src/component/template/Relatorio.js";
36
+ import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
37
+ import report from "@nixweb/nixloc-ui/src/component/template/report.js";
38
38
 
39
39
  import { mapGetters, mapState, mapActions, mapMutations } from "vuex";
40
40
 
41
41
  export default {
42
42
  name: "RelatorioAdicionarModificar",
43
- components: { Botao, Texto },
43
+ components: { Button, Texto },
44
44
  props: {
45
- modulo: String,
45
+ module: String,
46
46
  },
47
47
  data() {
48
48
  return {
49
- formNome: "relatorioAdicionarModificar",
50
- relatorio: new Relatorio(),
51
- urlAdicionar: "/api/v1/shared/relatorio/adicionar",
52
- urlModificar: "/api/v1/shared/relatorio/modificar",
49
+ formName: "relatorioAdicionarModificar",
50
+ report: new report(),
51
+ urlAdicionar: "/api/v1/shared/report/adicionar",
52
+ urlModificar: "/api/v1/shared/report/modificar",
53
53
  };
54
54
  },
55
55
  computed: {
56
- ...mapGetters("validation", ["formValido"]),
56
+ ...mapGetters("validation", ["isFormValid"]),
57
57
  ...mapGetters("generic", ["evento"]),
58
- ...mapGetters("relatorio", ["cabecalhoTabela", "filtroSelecionado"]),
59
- ...mapState("relatorio", ["campoSelecionado", "campoOrdenado"]),
58
+ ...mapGetters("report", ["headerTable", "filtroSelecionado"]),
59
+ ...mapState("report", ["selectedField", "campoOrdenado"]),
60
60
  },
61
61
  methods: {
62
62
  ...mapActions("generic", ["postApi", "putApi"]),
63
- ...mapMutations("generic", ["removeCarregando", "removeEvento", "fecharModal"]),
64
- ...mapMutations("validation", ["reiniciaValidacao"]),
63
+ ...mapMutations("generic", ["removeLoading", "removeEvent", "hideModal"]),
64
+ ...mapMutations("validation", ["resetValidation"]),
65
65
  salvarRelatorio() {
66
+ var personalizado = this.report.id ? "" : "Personalizado";
66
67
  const consulta = {
67
- nomeRota: this.$route.name,
68
- campo: this.campoSelecionado,
68
+ routeName: `${this.$route.name}${personalizado}`,
69
+ field: this.selectedField,
69
70
  ordenacao: this.campoOrdenado,
70
- filtro: this.filtroSelecionado.children,
71
+ filter: this.filtroSelecionado.children,
71
72
  };
72
73
  let obj = {
73
- nome: this.relatorio.nome,
74
- modulo: this.modulo,
74
+ id: this.report.id,
75
+ nome: this.report.nome,
76
+ module: this.module,
75
77
  consulta: JSON.stringify(consulta),
76
78
  };
77
- if (this.relatorio.id) {
79
+ if (this.report.id) {
78
80
  let params = { url: this.urlModificar, obj: obj };
79
81
  this.putApi(params).then((response) => {
80
- if (response.sucesso) this.fecharModal();
81
- this.removeCarregando(["salvar"]);
82
+ if (response.success) this.hideModal();
83
+ this.removeLoading(["salvar"]);
82
84
  });
83
85
  } else {
84
86
  let params = { url: this.urlAdicionar, obj: obj };
85
87
  this.postApi(params).then((response) => {
86
- if (response.sucesso) this.fecharModal();
87
- this.removeCarregando(["salvar"]);
88
+ if (response.success) this.hideModal();
89
+ this.removeLoading(["salvar"]);
88
90
  });
89
91
  }
90
92
  },
91
- modificar(dados) {
92
- this.relatorio = new Relatorio();
93
- this.relatorio.modificar(dados);
94
- this.removeCarregando([dados.id]);
95
- },
96
93
  },
97
94
  watch: {
98
95
  evento: {
99
96
  handler(evento) {
100
- if (evento.nome == "modificarRelatorio") this.modificar(evento.dados);
97
+ if (evento.nome == "modificarRelatorio") {
98
+ this.report.id = this.$route.params.id;
99
+ if (this.report.id) this.report.nome = this.$route.params.nome;
100
+ }
101
101
  },
102
102
  deep: true,
103
103
  },
@@ -3,34 +3,34 @@
3
3
  <b-row>
4
4
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
5
5
  <Texto
6
- titulo="Telefone"
7
- campo="telefone"
8
- :formNome="formNome"
9
- :mascara="['(##) ####-####', '(##) #####-####']"
10
- :tamanhoMaximo="20"
11
- :requerido="requerido"
6
+ title="Telefone"
7
+ field="telefone"
8
+ :formName="formName"
9
+ :mask="['(##) ####-####', '(##) #####-####']"
10
+ :maxLength="20"
11
+ :required="required"
12
12
  v-model="dadosContato.telefone"
13
13
  />
14
14
  </b-col>
15
15
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
16
16
  <Texto
17
- titulo="Site"
18
- campo="site"
19
- :formNome="formNome"
20
- mascara=""
21
- :tamanhoMaximo="100"
22
- :requerido="requerido"
17
+ title="Site"
18
+ field="site"
19
+ :formName="formName"
20
+ mask=""
21
+ :maxLength="100"
22
+ :required="required"
23
23
  v-model="dadosContato.site"
24
24
  />
25
25
  </b-col>
26
26
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
27
27
  <Texto
28
- titulo="E-mail"
29
- campo="email"
30
- :formNome="formNome"
31
- mascara=""
32
- :tamanhoMaximo="100"
33
- :requerido="requerido"
28
+ title="E-mail"
29
+ field="email"
30
+ :formName="formName"
31
+ mask=""
32
+ :maxLength="100"
33
+ :required="required"
34
34
  v-model="dadosContato.email"
35
35
  />
36
36
  </b-col>
@@ -39,9 +39,9 @@
39
39
  </template>
40
40
 
41
41
  <script>
42
- import Botao from "@nixweb/nixloc-ui/src/component/forms/Botao";
42
+ import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
43
43
  import Texto from "@nixweb/nixloc-ui/src/component/forms/Texto";
44
- import Opcoes from "@nixweb/nixloc-ui/src/component/forms/Opcoes";
44
+ import options from "@nixweb/nixloc-ui/src/component/forms/options";
45
45
  import DadosContato from "@nixweb/nixloc-ui/src/component/value-objects/DadosContato.js";
46
46
 
47
47
  import { mapGetters } from "vuex";
@@ -49,14 +49,14 @@ import { mapGetters } from "vuex";
49
49
  export default {
50
50
  name: "DadosContato",
51
51
  props: {
52
- formNome: String,
53
- requerido: {
52
+ formName: String,
53
+ required: {
54
54
  type: Boolean,
55
55
  default: false,
56
56
  },
57
57
  value: Object,
58
58
  },
59
- components: { Opcoes, Texto, Botao },
59
+ components: { options, Texto, Button },
60
60
  data() {
61
61
  return {
62
62
  dadosContato: new DadosContato(),
@@ -66,9 +66,9 @@ export default {
66
66
  if (this.value.telefone != undefined) this.dadosContato = this.value;
67
67
  },
68
68
  methods: {
69
- carregaDados(dados) {
70
- this.dadosContato.telefone = dados.telefone;
71
- this.dadosContato.email = dados.email;
69
+ carregaDados(data) {
70
+ this.dadosContato.telefone = data.telefone;
71
+ this.dadosContato.email = data.email;
72
72
  },
73
73
  },
74
74
  computed: {
@@ -90,7 +90,7 @@ export default {
90
90
  evento: {
91
91
  handler(evento) {
92
92
  if (evento.nome == "buscarCnpjReceita") {
93
- this.carregaDados(evento.dados);
93
+ this.carregaDados(evento.data);
94
94
  }
95
95
  },
96
96
  deep: true,
@@ -1,6 +1,6 @@
1
1
  export default class DadosPessoa {
2
2
  constructor() {
3
- this.tipoPessoa = 2;
3
+ this.typePessoa = 2;
4
4
  this.razaoSocialNome = "";
5
5
  this.fantasiaApelido = "";
6
6
  this.cnpjCpf = "";
@@ -2,80 +2,80 @@
2
2
  <div>
3
3
  <b-row>
4
4
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
5
- <Opcoes
6
- campo="tipoPessoa"
7
- :formNome="formNome"
8
- :opcoes="[
5
+ <options
6
+ field="typePessoa"
7
+ :formName="formName"
8
+ :options="[
9
9
  { text: 'Física', value: 1 },
10
10
  { text: 'Jurídica', value: 2 },
11
11
  ]"
12
- v-model="dadosPessoa.tipoPessoa"
12
+ v-model="dadosPessoa.typePessoa"
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
  <Texto
19
- :titulo="dadosPessoa.tipoPessoa == 2 ? 'CNPJ' : 'CPF'"
20
- campo="cnpjCpf"
21
- :formNome="formNome"
22
- :mascara="['##.###.###/####-##', '###.###.###-##']"
23
- :tamanhoMaximo="30"
24
- :requerido="requerido"
19
+ :title="dadosPessoa.typePessoa == 2 ? 'CNPJ' : 'CPF'"
20
+ field="cnpjCpf"
21
+ :formName="formName"
22
+ :mask="['##.###.###/####-##', '###.###.###-##']"
23
+ :maxLength="30"
24
+ :required="required"
25
25
  v-model="dadosPessoa.cnpjCpf"
26
- ><div class="glyphicon margem-botao">
27
- <Botao
28
- v-if="dadosPessoa.tipoPessoa == 2"
29
- chave="buscarCnpjReceita"
30
- tipo="sucesso"
31
- classeIcone="fas fa-search"
32
- :desabilitado="dadosPessoa.cnpjCpf.length < 18"
33
- tamanho="pequeno"
34
- :clique="buscarCnpjReceita"
26
+ ><div class="glyphicon margin-button">
27
+ <Button
28
+ v-if="dadosPessoa.typePessoa == 2"
29
+ key="buscarCnpjReceita"
30
+ type="success"
31
+ classIcon="fas fa-search"
32
+ :disabled="dadosPessoa.cnpjCpf.length < 18"
33
+ size="small"
34
+ :clicked="buscarCnpjReceita"
35
35
  /></div
36
36
  ></Texto>
37
37
  </b-col>
38
38
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
39
39
  <Texto
40
- :titulo="dadosPessoa.tipoPessoa == 2 ? 'Inscrição Estadual' : 'RG'"
41
- campo="inscricaoEstadualRg"
42
- :formNome="formNome"
43
- :tamanhoMaximo="50"
44
- :requerido="requerido"
40
+ :title="dadosPessoa.typePessoa == 2 ? 'Inscrição Estadual' : 'RG'"
41
+ field="inscricaoEstadualRg"
42
+ :formName="formName"
43
+ :maxLength="50"
44
+ :required="required"
45
45
  v-model="dadosPessoa.inscricaoEstadualRg"
46
46
  />
47
47
  </b-col>
48
48
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
49
49
  <Texto
50
- v-if="dadosPessoa.tipoPessoa == 2"
51
- titulo="Inscrição Municipal"
52
- campo="inscricaoMunicipal"
53
- :formNome="formNome"
54
- :tamanhoMaximo="50"
55
- :requerido="requerido"
50
+ v-if="dadosPessoa.typePessoa == 2"
51
+ title="Inscrição Municipal"
52
+ field="inscricaoMunicipal"
53
+ :formName="formName"
54
+ :maxLength="50"
55
+ :required="required"
56
56
  v-model="dadosPessoa.inscricaoMunicipal"
57
57
  />
58
58
  </b-col>
59
59
  </b-row>
60
- <br v-if="dadosPessoa.tipoPessoa == 2" />
60
+ <br v-if="dadosPessoa.typePessoa == 2" />
61
61
  <b-row>
62
62
  <b-col xs="12" sm="12" md="12" lg="8" xl="8">
63
63
  <Texto
64
- :titulo="dadosPessoa.tipoPessoa == 2 ? 'Razão Social' : 'Nome'"
65
- campo="razaoSocialNome"
66
- :formNome="formNome"
67
- :requerido="true"
68
- :tamanhoMaximo="100"
64
+ :title="dadosPessoa.typePessoa == 2 ? 'Razão Social' : 'Nome'"
65
+ field="razaoSocialNome"
66
+ :formName="formName"
67
+ :required="true"
68
+ :maxLength="100"
69
69
  v-model="dadosPessoa.razaoSocialNome"
70
70
  />
71
71
  </b-col>
72
72
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
73
73
  <Texto
74
- :titulo="dadosPessoa.tipoPessoa == 2 ? 'Fantasia' : 'Apelido'"
75
- campo="fantasiaApelido"
76
- :formNome="formNome"
77
- :requerido="true"
78
- :tamanhoMaximo="100"
74
+ :title="dadosPessoa.typePessoa == 2 ? 'Fantasia' : 'Apelido'"
75
+ field="fantasiaApelido"
76
+ :formName="formName"
77
+ :required="true"
78
+ :maxLength="100"
79
79
  v-model="dadosPessoa.fantasiaApelido"
80
80
  />
81
81
  </b-col>
@@ -84,9 +84,9 @@
84
84
  </template>
85
85
 
86
86
  <script>
87
- import Botao from "@nixweb/nixloc-ui/src/component/forms/Botao";
87
+ import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
88
88
  import Texto from "@nixweb/nixloc-ui/src/component/forms/Texto";
89
- import Opcoes from "@nixweb/nixloc-ui/src/component/forms/Opcoes";
89
+ import options from "@nixweb/nixloc-ui/src/component/forms/options";
90
90
  import DadosPessoa from "@nixweb/nixloc-ui/src/component/value-objects/DadosPessoa.js";
91
91
 
92
92
  import { mapMutations } from "vuex";
@@ -94,14 +94,14 @@ import { mapMutations } from "vuex";
94
94
  export default {
95
95
  name: "DadosPessoa",
96
96
  props: {
97
- formNome: String,
98
- requerido: {
97
+ formName: String,
98
+ required: {
99
99
  type: Boolean,
100
100
  default: false,
101
101
  },
102
102
  value: Object,
103
103
  },
104
- components: { Opcoes, Texto, Botao },
104
+ components: { options, Texto, Button },
105
105
  data() {
106
106
  return {
107
107
  dadosPessoa: new DadosPessoa(),
@@ -111,21 +111,21 @@ export default {
111
111
  if (this.value.razaoSocialNome != undefined) this.dadosPessoa = this.value;
112
112
  },
113
113
  methods: {
114
- ...mapMutations("generic", ["insereEvento", "insereNotificacao", "removeCarregando"]),
114
+ ...mapMutations("generic", ["addEvent", "addNotifications", "removeLoading"]),
115
115
  buscarCnpjReceita() {
116
116
  let url = `https://ws.hubdodesenvolvedor.com.br/v2/cnpj/?cnpj=${this.dadosPessoa.cnpjCpf}&token=94473735FzLqpNKajP170569464`;
117
117
  this.$http.post(url, {}, {}).then((response) => {
118
118
  if (response.data.return == "OK") {
119
- this.insereEvento({
119
+ this.addEvent({
120
120
  nome: "buscarCnpjReceita",
121
- dados: response.data.result,
121
+ data: response.data.result,
122
122
  });
123
123
  this.dadosPessoa.razaoSocialNome = response.data.result.nome;
124
124
  this.dadosPessoa.fantasiaApelido = response.data.result.fantasia;
125
125
  } else {
126
- this.insereNotificacao([{ mensagem: "CNPJ inválido ou não encontrado." }]);
126
+ this.addNotifications([{ message: "CNPJ inválido ou não encontrado." }]);
127
127
  }
128
- this.removeCarregando(["buscarCnpjReceita"]);
128
+ this.removeLoading(["buscarCnpjReceita"]);
129
129
  });
130
130
  },
131
131
  },
@@ -6,6 +6,6 @@ export default class Endereco {
6
6
  this.complemento = "";
7
7
  this.bairro = "";
8
8
  this.cidade = "";
9
- this.estado = { id: "", conteudo: "" };
9
+ this.estado = { id: "", content: "" };
10
10
  }
11
11
  }