@nixweb/nixloc-ui 0.0.127 → 0.0.129

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 (60) hide show
  1. package/package.json +9 -1
  2. package/src/component/forms/Button.vue +3 -2
  3. package/src/component/forms/ButtonGroup.vue +57 -0
  4. package/src/component/forms/ButtonSub.vue +98 -0
  5. package/src/component/forms/CheckboxGroup.vue +7 -0
  6. package/src/component/forms/CheckboxSimple.vue +5 -1
  7. package/src/component/forms/DateTime.vue +5 -1
  8. package/src/component/forms/Dropdown.vue +48 -30
  9. package/src/component/forms/ImageUpload.vue +12 -4
  10. package/src/component/forms/IncrementDecrement.vue +106 -0
  11. package/src/component/forms/InputDecimal.vue +17 -5
  12. package/src/component/forms/InputDecimalDiscount.vue +92 -0
  13. package/src/component/forms/InputNumber.vue +6 -0
  14. package/src/component/forms/InputText.vue +19 -2
  15. package/src/component/forms/InputTextEdit.vue +68 -0
  16. package/src/component/forms/RadioGroup.vue +2 -2
  17. package/src/component/forms/Select.vue +14 -3
  18. package/src/component/forms/Toggle.vue +3 -1
  19. package/src/component/layout/Account.vue +3 -3
  20. package/src/component/layout/Badge.vue +6 -5
  21. package/src/component/layout/FixedBar.vue +39 -7
  22. package/src/component/layout/Gantt.vue +130 -0
  23. package/src/component/layout/Header.vue +3 -0
  24. package/src/component/layout/IconMolded.vue +48 -0
  25. package/src/component/layout/Menu.vue +12 -14
  26. package/src/component/layout/Molded.vue +4 -3
  27. package/src/component/layout/Panel.vue +2 -2
  28. package/src/component/layout/Tab.vue +135 -0
  29. package/src/component/rental/DisplayCalculatePeriod.vue +49 -0
  30. package/src/component/rental/DisplayPeriodRent.vue +56 -0
  31. package/src/component/rental/DisplayTotalization.vue +56 -0
  32. package/src/component/shared/Confirmation.vue +21 -2
  33. package/src/component/shared/DocumentPreview.vue +3 -2
  34. package/src/component/shared/DocumentPublic.vue +34 -0
  35. package/src/component/shared/FullCalendar.vue +159 -0
  36. package/src/component/shared/HeaderReport.vue +1 -1
  37. package/src/component/shared/{BodyReport.vue → Report.vue} +8 -7
  38. package/src/component/shared/SaveCancel.vue +8 -2
  39. package/src/component/shared/Search.vue +1 -1
  40. package/src/component/shared/SelectOption.vue +18 -9
  41. package/src/component/shared/Table.vue +32 -123
  42. package/src/component/shared/TableDraggable.vue +127 -0
  43. package/src/component/shared/TableItem.vue +177 -0
  44. package/src/component/shared/TimeLine.vue +47 -0
  45. package/src/component/shared/TotalizationReport.vue +59 -0
  46. package/src/component/shared/query-builder/ConvertToOdata.js +3 -9
  47. package/src/component/shared/query-builder/DynamicComponent.vue +5 -1
  48. package/src/component/shared/query-builder/DynamicComponentList.vue +20 -9
  49. package/src/component/template/ListViewWithDataHandler.vue +26 -4
  50. package/src/component/template/ReportCreateUpdate.vue +9 -2
  51. package/src/component/template/ViewTemplateConfiguration.vue +1 -0
  52. package/src/component/template/ViewTemplateDocumentView.vue +1 -0
  53. package/src/component/template/ViewTemplateReportList.vue +1 -1
  54. package/src/component/template/ViewTemplateReportPreview.vue +55 -12
  55. package/src/component/value-objects/Contact.vue +7 -0
  56. package/src/component/value-objects/Person.vue +15 -0
  57. package/src/store/modules/generic.js +124 -75
  58. package/src/store/modules/report.js +37 -19
  59. package/src/store/modules/user.js +6 -0
  60. package/src/component/shared/query-builder/Totalization.vue +0 -38
@@ -0,0 +1,47 @@
1
+ <template>
2
+ <div>
3
+ <Loading :center="false" v-if="loading" />
4
+ <div v-else>
5
+ <ScrollBar :minHeight="200" :maxHeight="300">
6
+ <Timeline
7
+ dateLocale="pt-BR"
8
+ order="desc"
9
+ :uniqueTimeline="true"
10
+ :timeline-items="timelineItems"
11
+ message-when-no-items="Nenhum registro encontrado!"
12
+ />
13
+ </ScrollBar>
14
+ </div>
15
+ </div>
16
+ </template>
17
+ <script>
18
+ import Loading from "@nixweb/nixloc-ui/src/component/shared/Loading.vue";
19
+ import ScrollBar from "@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue";
20
+ import Timeline from "timeline-vuejs";
21
+
22
+ import { mapGetters, mapActions } from "vuex";
23
+
24
+ export default {
25
+ name: "TimeLine",
26
+ props: {
27
+ loading: Boolean,
28
+ timelineItems: Array,
29
+ },
30
+ components: {
31
+ Loading,
32
+ Timeline,
33
+ ScrollBar,
34
+ },
35
+ };
36
+ </script>
37
+ <style>
38
+ .timeline {
39
+ max-width: 1000px !important;
40
+ }
41
+
42
+ .timeline-item .date-item {
43
+ font-size: 14px !important;
44
+ letter-spacing: 1px !important;
45
+ font-weight: normal !important;
46
+ }
47
+ </style>
@@ -0,0 +1,59 @@
1
+ <template>
2
+ <div>
3
+ <hr class="hr-report" />
4
+ <div class="text-right">
5
+ <span class="title"> Total de Registro(s) </span>
6
+ <span class="title value"> {{ totalRecords }} </span>
7
+ </div>
8
+ <div class="text-right" v-for="item in totalization" :key="item.title">
9
+ <span :class="convertName(item[0]).classCss">
10
+ <span class="title">
11
+ {{ convertName(item[0]).title }}
12
+ <span class="title value">
13
+ <span v-if="convertName(item[0]).type == 'currency'">
14
+ {{ item[1] | currency }}
15
+ </span>
16
+ <span v-if="convertName(item[0]).type == 'numeric'">
17
+ {{ Math.round(item[1]) }}
18
+ </span>
19
+ </span>
20
+ </span>
21
+ </span>
22
+ </div>
23
+ </div>
24
+ </template>
25
+ <script>
26
+ import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
27
+
28
+ export default {
29
+ name: "TotalizationReport",
30
+ props: ["totalization", "totalRecords"],
31
+ computed: {
32
+ ...mapState("report", ["finalQueryFormatOData"]),
33
+ },
34
+ methods: {
35
+ convertName(value) {
36
+ var filter = this.finalQueryFormatOData.totalization.filter((item) => {
37
+ return item.value == value;
38
+ });
39
+ return Object.assign(filter[0]);
40
+ },
41
+ },
42
+ };
43
+ </script>
44
+
45
+ <style scoped>
46
+ .title {
47
+ font-size: 15px;
48
+ font-weight: 400;
49
+ }
50
+
51
+ .value {
52
+ margin-left: 50px;
53
+ }
54
+
55
+ .hr-report {
56
+ background: black !important;
57
+ height: 0px !important;
58
+ }
59
+ </style>
@@ -5,7 +5,7 @@ export default class ConvertToOdata {
5
5
  if (operator === "igual" && rule.typeField === "text") return `${rule.name} eq '${rule.value}'`;
6
6
  if (operator === "diferente" && rule.typeField === "text") return `${rule.name} ne '${rule.value}'`;
7
7
  if (operator === "contem") return `contains(${rule.name},'${rule.value}')`;
8
-
8
+
9
9
  if (operator === "igual" && rule.typeField === "numeric") return `${rule.name} eq ${rule.value}`;
10
10
  if (operator === "diferente" && rule.typeField === "numeric") return `${rule.name} ne ${rule.value}`;
11
11
  if (operator === "menor") return `${rule.name} lt ${rule.value}`;
@@ -32,13 +32,13 @@ export default class ConvertToOdata {
32
32
  var size = options.length;
33
33
  let self = this;
34
34
  options.forEach(function (value) {
35
+
35
36
  if (type == "field") {
36
37
  query += `${name} eq ${value}`;
37
38
  if (seq + 1 != size) query += ` or `;
38
39
  }
39
40
  if (type == "totalization") {
40
- let convertName = self.convertName(value);
41
- query += `${name} with ${value} as ${convertName}${title}`;
41
+ query += `${name} with ${value} as ${value}${name.charAt(0).toUpperCase() + name.slice(1)}`;
42
42
  if (seq + 1 != size) query += `,`;
43
43
  }
44
44
  seq++;
@@ -68,10 +68,4 @@ export default class ConvertToOdata {
68
68
 
69
69
  return iso;
70
70
  }
71
- convertName(value) {
72
- if (value === "sum") return "soma";
73
- if (value === "average") return "media";
74
- if (value === "max") return "maximo";
75
- if (value === "minimo") return "minimo";
76
- }
77
71
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="vqb-rule card">
2
+ <div class="vqb-rule card move">
3
3
  <div class="form-inline">
4
4
  <label :class="rule.classCss" class="mr-5">
5
5
  <i :class="rule.icon"></i>
@@ -96,6 +96,10 @@ export default {
96
96
  };
97
97
  </script>
98
98
  <style scoped>
99
+ .move {
100
+ cursor: move;
101
+ }
102
+
99
103
  .btn-remove {
100
104
  font-size: 16px;
101
105
  color: darkgray;
@@ -1,13 +1,21 @@
1
1
  <template>
2
- <div class="component">
3
- <component
4
- :is="component()"
5
- v-for="(rule, index) in selectedRules"
6
- :key="index"
7
- :rule="rule"
8
- />
9
- <div v-if="selectedRules.length == 0">
10
- <Alert type="info"> Selecione o filtro desejado e clique em +Adicionar</Alert>
2
+ <div>
3
+ <div class="component">
4
+ <span v-if="selectedRules.length > 0">
5
+ <i class="fas fa-expand-arrows-alt"></i> Clique e arraste para ordenar
6
+ </span>
7
+ <draggable :list="selectedRules">
8
+ <component
9
+ :is="component()"
10
+ v-for="(rule, index) in selectedRules"
11
+ :key="index"
12
+ :rule="rule"
13
+ />
14
+ </draggable>
15
+ <br />
16
+ <div v-if="selectedRules.length == 0">
17
+ <Alert type="info"> Selecione o filtro desejado e clique em +Adicionar</Alert>
18
+ </div>
11
19
  </div>
12
20
  </div>
13
21
  </template>
@@ -15,11 +23,14 @@
15
23
  <script>
16
24
  import Alert from "@nixweb/nixloc-ui/src/component/layout/Alert";
17
25
 
26
+ import draggable from "vuedraggable";
27
+
18
28
  import { mapState, mapMutations } from "vuex";
19
29
 
20
30
  export default {
21
31
  components: {
22
32
  Alert,
33
+ draggable,
23
34
  },
24
35
  data() {
25
36
  return {
@@ -14,6 +14,9 @@
14
14
  </b-row>
15
15
  <b-row>
16
16
  <b-col sm="6">
17
+ <div v-if="templateList.dragAndDrop">
18
+ <i class="fa-regular fa-maximize"></i> Clique e arraste para ordenar
19
+ </div>
17
20
  <TableTotalization :totalization="content.totalization" />
18
21
  </b-col>
19
22
  <b-col sm="6">
@@ -21,7 +24,7 @@
21
24
  </b-col>
22
25
  </b-row>
23
26
  <Loading type="line" :center="false" v-show="isLoading('loadingLine')" />
24
- <FixedBar posicao="topo" v-show="selected.length > 0">
27
+ <div class="fixed-bar-options" v-show="selected.length > 0">
25
28
  <div>
26
29
  <Button
27
30
  v-if="buttonRemove"
@@ -33,11 +36,12 @@
33
36
  />
34
37
  <slot name="content-buttons-table-header"></slot>
35
38
  </div>
36
- </FixedBar>
39
+ </div>
37
40
  <Table
38
41
  :header="templateList.headerTable"
39
42
  :data="content.data"
40
43
  :showChecks="templateList.showChecks"
44
+ :dragAndDrop="templateList.dragAndDrop"
41
45
  >
42
46
  <div slot="content-buttons-table">
43
47
  <slot name="content-buttons-table"></slot>
@@ -128,14 +132,15 @@ export default {
128
132
  "totalPerPage",
129
133
  "selectStatic",
130
134
  ]),
131
- ...mapGetters("generic", ["pagination", "isLoading"]),
135
+ ...mapGetters("generic", ["pagination", "isLoading", "event"]),
132
136
  paginationKey: function () {
133
137
  return this.pagination("templateList");
134
138
  },
135
139
  },
136
140
  methods: {
137
- ...mapActions("generic", ["getApi", "deleteAllApi"]),
141
+ ...mapActions("generic", ["getApi", "orderAllApi", "deleteAllApi"]),
138
142
  ...mapMutations("generic", [
143
+ "addLoading",
139
144
  "removeLoading",
140
145
  "addSelected",
141
146
  "updatePagination",
@@ -152,6 +157,17 @@ export default {
152
157
  }, 350);
153
158
  });
154
159
  },
160
+ orderAll(data) {
161
+ let obj = { listIds: data.listIds };
162
+
163
+ let params = {
164
+ url: this.templateList.urlOrderAllApi,
165
+ obj: obj,
166
+ notNotifyToast: true,
167
+ };
168
+
169
+ this.orderAllApi(params).then((response) => {});
170
+ },
155
171
  removeSelected() {
156
172
  let params = {
157
173
  url: this.templateList.urlDeleteAllApi,
@@ -167,6 +183,12 @@ export default {
167
183
  },
168
184
  },
169
185
  watch: {
186
+ event: {
187
+ handler(event) {
188
+ if (event.name == "tableDragAndDrop") this.orderAll(event.data);
189
+ },
190
+ deep: true,
191
+ },
170
192
  methodExecutedApi: function (value) {
171
193
  if (
172
194
  value === "postApi" ||
@@ -60,7 +60,7 @@ export default {
60
60
  },
61
61
  methods: {
62
62
  ...mapActions("generic", ["postApi", "putApi"]),
63
- ...mapMutations("generic", ["removeLoading", "removeEvent", "hideModal"]),
63
+ ...mapMutations("generic", ["removeLoading", "addEvent", "hideModal"]),
64
64
  ...mapMutations("validation", ["resetValidation"]),
65
65
  saveReport() {
66
66
  var custom = this.report.id ? "" : "Custom";
@@ -82,7 +82,10 @@ export default {
82
82
  if (this.report.id) {
83
83
  let params = { url: this.urlUpdate, obj: obj };
84
84
  this.putApi(params).then((response) => {
85
- if (response.success) this.hideModal();
85
+ if (response.success) {
86
+ this.sendEvent();
87
+ this.hideModal();
88
+ }
86
89
  this.removeLoading(["btnSaveReport"]);
87
90
  });
88
91
  } else {
@@ -94,12 +97,16 @@ export default {
94
97
  name: query.routeName,
95
98
  params: { id: response.content.id, name: response.content.name },
96
99
  });
100
+ this.sendEvent();
97
101
  this.hideModal();
98
102
  }
99
103
  this.removeLoading(["btnSaveReport"]);
100
104
  });
101
105
  }
102
106
  },
107
+ sendEvent() {
108
+ this.addEvent({ name: "savedReport" });
109
+ },
103
110
  },
104
111
  watch: {
105
112
  event: {
@@ -2,6 +2,7 @@
2
2
  <div>
3
3
  <div>
4
4
  <slot name="content-buttons"></slot>
5
+ <br v-if="templateList.dragAndDrop" />
5
6
  <div v-if="showSearch">
6
7
  <Search />
7
8
  <br />
@@ -83,6 +83,7 @@
83
83
  <b-row>
84
84
  <b-col class="text-center">
85
85
  <Button
86
+ v-if="false"
86
87
  v-print="'#printMe'"
87
88
  key="print"
88
89
  type="edit"
@@ -24,7 +24,7 @@
24
24
  </b-col>
25
25
  <b-col sm="1">
26
26
  <Confirmation
27
- title="Deseja delete?"
27
+ title="Deseja excluir?"
28
28
  type="danger"
29
29
  :data="report"
30
30
  :confirmed="confirmDelete"
@@ -26,7 +26,7 @@
26
26
  type="primary"
27
27
  title="Buscar"
28
28
  classIcon="fas fa-file-search"
29
- :disabled="btnSaveDisabled || !rulesIsValid"
29
+ :disabled="btnSearchDisabled || !rulesIsValid"
30
30
  size="medium"
31
31
  :clicked="getAll"
32
32
  />
@@ -38,7 +38,7 @@
38
38
  title="Salvar"
39
39
  classIcon="fas fa-save"
40
40
  size="small"
41
- :disabled="isLoading || !rulesIsValid"
41
+ :disabled="isLoading || btnSaveDisabled || !rulesIsValid"
42
42
  :params="{ name: 'save', title: 'Salvar', width: 550 }"
43
43
  :clicked="executeOpenModal"
44
44
  />
@@ -83,7 +83,11 @@
83
83
  </Alert>
84
84
  </div>
85
85
  <div class="body-report" v-show="showBodyReport && rulesIsValid">
86
- <BodyReport :header="content.headerTable" :data="content.data" />
86
+ <Report
87
+ :header="content.headerTable"
88
+ :data="content.data"
89
+ :totalization="content.totalization"
90
+ />
87
91
  </div>
88
92
  </div>
89
93
  </Panel>
@@ -120,7 +124,7 @@ import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
120
124
  import Modal from "@nixweb/nixloc-ui/src/component/forms/Modal";
121
125
  import Alert from "@nixweb/nixloc-ui/src/component/layout/Alert";
122
126
  import Tags from "@nixweb/nixloc-ui/src/component/shared/query-builder/Tags.vue";
123
- import BodyReport from "../shared/BodyReport.vue";
127
+ import Report from "../shared/Report.vue";
124
128
 
125
129
  import ReportCreateUpdate from "@nixweb/nixloc-ui/src/component/template/ReportCreateUpdate.vue";
126
130
  import Fields from "@nixweb/nixloc-ui/src/component/shared/query-builder/Fields.vue";
@@ -143,7 +147,7 @@ export default {
143
147
  Modal,
144
148
  Alert,
145
149
  Tags,
146
- BodyReport,
150
+ Report,
147
151
  ReportCreateUpdate,
148
152
  Fields,
149
153
  Rules,
@@ -156,7 +160,7 @@ export default {
156
160
  headerTable: [],
157
161
  data: [],
158
162
  totalPages: [],
159
- totalization: [],
163
+ totalization: {},
160
164
  noDataReturned: false,
161
165
  },
162
166
  baseParams: {
@@ -170,7 +174,8 @@ export default {
170
174
  title: "",
171
175
  width: 0,
172
176
  },
173
- btnSaveDisabled: false,
177
+ btnSearchDisabled: false,
178
+ btnSaveDisabled: true,
174
179
  isLoading: false,
175
180
  showBodyReport: false,
176
181
  };
@@ -184,7 +189,7 @@ export default {
184
189
 
185
190
  if (this.id) this.getById();
186
191
 
187
- if (!this.id) this.removeLoading(["panel"]);
192
+ if (!this.id) this.removeLoadingWithTime();
188
193
  },
189
194
  beforeDestroy() {
190
195
  this.removeInitialReportCustom();
@@ -206,15 +211,18 @@ export default {
206
211
  selectedRules: query.selectedRules,
207
212
  };
208
213
  this.addInitialReportCustom(report);
209
- this.removeLoading(["panel"]);
214
+ this.removeLoadingWithTime();
210
215
  });
211
216
  },
212
217
  getAll() {
213
- this.btnSaveDisabled = true;
218
+ this.btnSearchDisabled = true;
214
219
 
215
220
  if (this.rulesIsValid) {
216
221
  this.getTotalRecords();
217
222
  this.removeLoading(["btnSearchReport"]);
223
+
224
+ if (this.oDataFilter.totalization) this.totalization();
225
+ if (!this.oDataFilter.totalization) this.content.totalization = {};
218
226
  }
219
227
  },
220
228
  getTotalRecords() {
@@ -237,10 +245,20 @@ export default {
237
245
  this.showBodyReport = true;
238
246
  });
239
247
  },
248
+ totalization() {
249
+ let params = { url: this.urlTotalization };
250
+ this.getApiOdata(params).then((response) => {
251
+ const result = Object.entries(response[0]);
252
+ this.content.totalization = result;
253
+ });
254
+ },
240
255
  loadingOnlyIfOnePage(data) {
241
256
  this.content.data = data;
242
- this.btnSaveDisabled = true;
243
- this.isLoading = false;
257
+ this.btnSearchDisabled = true;
258
+ let self = this;
259
+ setTimeout(function () {
260
+ self.isLoading = false;
261
+ }, 350);
244
262
  },
245
263
  loadingOnlyIfManyPages() {
246
264
  let seq = 0;
@@ -280,6 +298,13 @@ export default {
280
298
  this.hideModal("templateReport");
281
299
  this.removeLoading(["btnApplyFieldsAndRules"]);
282
300
  },
301
+ removeLoadingWithTime() {
302
+ let self = this;
303
+ setTimeout(function () {
304
+ self.btnSaveDisabled = true;
305
+ self.removeLoading(["panel"]);
306
+ }, 350);
307
+ },
283
308
  },
284
309
  computed: {
285
310
  ...mapGetters("generic", ["showModal", "event"]),
@@ -297,11 +322,26 @@ export default {
297
322
  let baseUrl = `${this.templateList.urlGetApi}?${this.oDataSelect}&${this.oDataOrderBy}&${this.oDataFilter.query}&$skip=${skip}&$top=${this.baseParams.totalPerPage}&$count=true`;
298
323
  return baseUrl.replace("&&", "&");
299
324
  },
325
+ urlTotalization() {
326
+ let query = this.oDataFilter.query
327
+ ? `$apply=filter(${this.oDataFilter.query.replace("$filter=", "")})/`
328
+ : "$apply=";
329
+ let baseUrl = `${
330
+ this.templateList.urlGetApi
331
+ }?${query}aggregate(${this.oDataFilter.totalization.replace(",", "")})`;
332
+ return baseUrl;
333
+ },
300
334
  liveTotalRecords() {
301
335
  return this.content.data.length;
302
336
  },
303
337
  },
304
338
  watch: {
339
+ event: {
340
+ handler(event) {
341
+ if (event.name == "savedReport") this.btnSaveDisabled = true;
342
+ },
343
+ deep: true,
344
+ },
305
345
  "content.totalPages": {
306
346
  handler(totalPages) {
307
347
  if (totalPages.length > 0) {
@@ -316,18 +356,21 @@ export default {
316
356
  },
317
357
  oDataFilter: {
318
358
  handler(totalPages) {
359
+ this.btnSearchDisabled = false;
319
360
  this.btnSaveDisabled = false;
320
361
  },
321
362
  deep: true,
322
363
  },
323
364
  oDataSelect: {
324
365
  handler(totalPages) {
366
+ this.btnSearchDisabled = false;
325
367
  this.btnSaveDisabled = false;
326
368
  },
327
369
  deep: true,
328
370
  },
329
371
  oDataOrderBy: {
330
372
  handler(totalPages) {
373
+ this.btnSearchDisabled = false;
331
374
  this.btnSaveDisabled = false;
332
375
  },
333
376
  deep: true,
@@ -10,6 +10,7 @@
10
10
  :maxLength="20"
11
11
  :required="required"
12
12
  v-model="contact.phone"
13
+ :markFormDirty="markFormDirty"
13
14
  />
14
15
  </b-col>
15
16
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
@@ -21,6 +22,7 @@
21
22
  :maxLength="100"
22
23
  :required="required"
23
24
  v-model="contact.webSite"
25
+ :markFormDirty="markFormDirty"
24
26
  />
25
27
  </b-col>
26
28
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
@@ -32,6 +34,7 @@
32
34
  :maxLength="100"
33
35
  :required="required"
34
36
  v-model="contact.email"
37
+ :markFormDirty="markFormDirty"
35
38
  />
36
39
  </b-col>
37
40
  </b-row>
@@ -53,6 +56,10 @@ export default {
53
56
  type: Boolean,
54
57
  default: false,
55
58
  },
59
+ markFormDirty: {
60
+ type: Boolean,
61
+ default: true,
62
+ },
56
63
  value: Object,
57
64
  },
58
65
  components: { InputText, Button },
@@ -5,11 +5,13 @@
5
5
  <RadioGroup
6
6
  field="typePerson"
7
7
  :formName="formName"
8
+ v-show="showTypePerson"
8
9
  :options="[
9
10
  { text: 'Física', value: 1 },
10
11
  { text: 'Jurídica', value: 2 },
11
12
  ]"
12
13
  v-model="person.typePerson"
14
+ :markFormDirty="markFormDirty"
13
15
  />
14
16
  </b-col>
15
17
  </b-row>
@@ -23,6 +25,7 @@
23
25
  :maxLength="30"
24
26
  :required="required"
25
27
  v-model="person.document"
28
+ :markFormDirty="markFormDirty"
26
29
  ><div class="glyphicon margin-button">
27
30
  <Button
28
31
  v-if="person.typePerson == 2"
@@ -43,6 +46,7 @@
43
46
  :maxLength="50"
44
47
  :required="required"
45
48
  v-model="person.stateInscription"
49
+ :markFormDirty="markFormDirty"
46
50
  />
47
51
  </b-col>
48
52
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
@@ -54,6 +58,7 @@
54
58
  :maxLength="50"
55
59
  :required="required"
56
60
  v-model="person.municipalInscription"
61
+ :markFormDirty="markFormDirty"
57
62
  />
58
63
  </b-col>
59
64
  </b-row>
@@ -67,6 +72,7 @@
67
72
  :required="true"
68
73
  :maxLength="100"
69
74
  v-model="person.companyName"
75
+ :markFormDirty="markFormDirty"
70
76
  />
71
77
  </b-col>
72
78
  <b-col xs="12" sm="12" md="12" lg="4" xl="4">
@@ -77,6 +83,7 @@
77
83
  :required="true"
78
84
  :maxLength="100"
79
85
  v-model="person.tradeName"
86
+ :markFormDirty="markFormDirty"
80
87
  />
81
88
  </b-col>
82
89
  </b-row>
@@ -99,6 +106,14 @@ export default {
99
106
  type: Boolean,
100
107
  default: false,
101
108
  },
109
+ showTypePerson: {
110
+ type: Boolean,
111
+ default: true,
112
+ },
113
+ markFormDirty: {
114
+ type: Boolean,
115
+ default: true,
116
+ },
102
117
  value: Object,
103
118
  },
104
119
  components: { RadioGroup, InputText, Button },