@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
@@ -61,6 +61,9 @@
61
61
  </tr>
62
62
  </tbody>
63
63
  </table>
64
+ <div>
65
+ <TotalizationReport :totalization="totalization" :totalRecords="data.length" />
66
+ </div>
64
67
  </div>
65
68
  </ScrollBar>
66
69
  </div>
@@ -69,6 +72,7 @@
69
72
  <script>
70
73
  import ScrollBar from "@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue";
71
74
  import HeaderReport from "../shared/HeaderReport.vue";
75
+ import TotalizationReport from "../shared/TotalizationReport.vue";
72
76
  import ExportExcel from "@nixweb/nixloc-ui/src/component/shared/ExportExcel";
73
77
  import print from "vue-print-nb";
74
78
 
@@ -78,11 +82,8 @@ export default {
78
82
  directives: {
79
83
  print,
80
84
  },
81
- props: {
82
- header: Array,
83
- data: Array,
84
- },
85
- components: { ScrollBar, HeaderReport, ExportExcel },
85
+ props: ["header", "data", "totalization"],
86
+ components: { ScrollBar, HeaderReport, TotalizationReport, ExportExcel },
86
87
  methods: {
87
88
  convertClass(fieldComparison, classCssBody) {
88
89
  if (Array.isArray(classCssBody)) {
@@ -108,8 +109,8 @@ table tbody tr td {
108
109
  }
109
110
 
110
111
  .table thead tr {
111
- border-top: 1px solid rgb(172, 172, 172);
112
- border-bottom: 1px solid rgb(172, 172, 172);
112
+ border-top: 1px solid black;
113
+ border-bottom: 1px solid black;
113
114
  }
114
115
 
115
116
  .table th,
@@ -1,18 +1,19 @@
1
1
  <template>
2
2
  <div>
3
3
  <FixedBar position="footer" v-show="formDirty && !modal.open">
4
- <div>
4
+ <div class="margin">
5
5
  <Button
6
6
  _key="cancelSaveCancel"
7
7
  eventName="cancelSaveCancel"
8
8
  title="Cancelar"
9
9
  type="danger"
10
- size="medium"
10
+ size="small"
11
11
  :clicked="cancel"
12
12
  />
13
13
  <Button
14
14
  _key="saveSaveCancel"
15
15
  eventName="saveSaveCancel"
16
+ classIcon="fa-solid fa-floppy-disk"
16
17
  title="Salvar"
17
18
  type="success"
18
19
  :disabled="!isFormValid(formName)"
@@ -70,3 +71,8 @@ export default {
70
71
  },
71
72
  };
72
73
  </script>
74
+ <style scoped>
75
+ .margin {
76
+ margin-left: 0px;
77
+ }
78
+ </style>
@@ -124,7 +124,7 @@ export default {
124
124
  font-size: 14px;
125
125
  padding: 5px 8px 6px 15px;
126
126
  background-color: rgb(255, 255, 255);
127
- border: 1px solid rgb(220, 221, 221);
127
+ border: 1px solid #E5E4E8;
128
128
  border-radius: 40px;
129
129
  box-sizing: border-box;
130
130
  box-shadow: none;
@@ -12,13 +12,18 @@
12
12
  >
13
13
  <div class="div-content text-center">
14
14
  <span :style="'font-size:' + option.titleSize + 'px;'">
15
- {{ option.title }}</span
15
+ <i v-if="size === 'small'" :class="option.icon"></i>
16
+ {{ option.title }}
17
+ </span>
18
+ <div
19
+ v-if="size === 'medium'"
20
+ class="icon"
21
+ :style="'font-size:' + option.iconSize + 'px;'"
16
22
  >
17
- <div class="icon" :style="'font-size:' + option.iconSize + 'px;'">
18
23
  <i :class="option.icon"></i>
19
24
  </div>
20
25
  </div>
21
- <div>
26
+ <div v-if="option.tipId">
22
27
  <i
23
28
  v-b-tooltip.hover
24
29
  :title="tip(option.tipId)"
@@ -27,7 +32,7 @@
27
32
  </div>
28
33
  </div>
29
34
  </div>
30
- <div class="div-btn">
35
+ <div class="div-btn" v-if="showButtonNext">
31
36
  <Button
32
37
  _key="btnClickedNext"
33
38
  type="info"
@@ -55,6 +60,8 @@ export default {
55
60
  titleSize: Number,
56
61
  buttonSize: String,
57
62
  buttonClassIcon: String,
63
+ showButtonNext: { type: Boolean, default: true },
64
+ size: { type: String, default: "medium" },
58
65
  width: Number,
59
66
  height: Number,
60
67
  options: Array,
@@ -90,7 +97,7 @@ export default {
90
97
 
91
98
  .option {
92
99
  cursor: pointer;
93
- border: 1px solid #dbdfe9;
100
+ border: 1px solid #e5e4e8;
94
101
  background-color: white;
95
102
  border-radius: 8px;
96
103
  padding-left: 10px;
@@ -99,6 +106,7 @@ export default {
99
106
  margin-bottom: 10px;
100
107
  font-size: 16px;
101
108
  font-weight: normal;
109
+ box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 2%);
102
110
  }
103
111
 
104
112
  .alignment {
@@ -106,7 +114,7 @@ export default {
106
114
  }
107
115
 
108
116
  .option:hover {
109
- background-color: #fafafc;
117
+ background-color: white;
110
118
  }
111
119
 
112
120
  .div-content {
@@ -114,7 +122,8 @@ export default {
114
122
  }
115
123
 
116
124
  .selected {
117
- background-color: #fafafc;
125
+ background-color: white;
126
+ border-color: #4680A5;
118
127
  }
119
128
 
120
129
  .icon {
@@ -128,10 +137,10 @@ export default {
128
137
  }
129
138
 
130
139
  .title {
131
- margin-bottom: 20px;
140
+ margin-bottom: 10px;
132
141
  }
133
142
 
134
143
  .div-btn {
135
- margin-top: 20px;
144
+ margin-top: 10px;
136
145
  }
137
146
  </style>
@@ -16,85 +16,27 @@
16
16
  </th>
17
17
  </tr>
18
18
  </thead>
19
- <tbody>
19
+ <draggable
20
+ v-model="data"
21
+ tag="tbody"
22
+ @change="checkMove"
23
+ :options="{ disabled: !dragAndDrop }"
24
+ >
20
25
  <tr v-for="(row, index) in data" :key="index" :style="row.rowCss">
21
26
  <td class="td-checkbox" v-if="showChecks">
22
27
  <div :class="{ 'center-vertical': row.photo != null }">
23
28
  <b-form-checkbox v-model="selected" :value="row.id" />
24
29
  </div>
25
30
  </td>
26
- <td v-for="(obj, ind) in header" :key="ind">
27
- <div
28
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
29
- v-if="obj.type === 'text'"
30
- >
31
- {{ row[obj.field] }}
32
- </div>
33
- <div
34
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
35
- v-if="obj.type === 'image'"
36
- >
37
- <img
38
- :style="'width:60;height:50px'"
39
- :src="
40
- 'https://espaco.blob.core.windows.net/nixloc-photo-product/' +
41
- row[obj.field]
42
- "
43
- />
44
- </div>
45
- <div class="text-center center-vertical" v-if="obj.type === 'class'">
46
- <div :class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
47
- {{ row[obj.field] }}
48
- </div>
49
- </div>
50
- <div
51
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
52
- v-if="obj.type === 'html'"
53
- >
54
- <div v-if="row[obj.field]" v-html="row[obj.field]"></div>
55
- <div v-else v-html="obj.html"></div>
56
- </div>
57
- <div
58
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
59
- v-if="obj.type === 'select'"
60
- >
61
- {{ row[obj.field].content }}
62
- </div>
63
- <div
64
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
65
- v-if="obj.type === 'date'"
66
- >
67
- {{ row[obj.field] | moment("DD/MM/YYYY") }}
68
- </div>
69
- <div
70
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
71
- v-if="obj.type === 'dateTime'"
72
- >
73
- {{ row[obj.field] | moment("DD/MM/YYYY HH:mm") }}
74
- </div>
75
- <div
76
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
77
- v-if="obj.type === 'currency'"
78
- >
79
- {{ row[obj.field] | currency }}
80
- </div>
81
- <div
82
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
83
- v-if="obj.type === 'button'"
84
- >
85
- <TableButton :obj="obj" :row="row" />
86
- </div>
87
- <div
88
- class="link"
89
- :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
90
- v-if="obj.type === 'link'"
91
- @click="navegateTo(obj, row)"
92
- >
93
- <span> {{ row[obj.field] }}</span>
94
- </div>
31
+ <td
32
+ v-for="(obj, ind) in header"
33
+ :key="ind"
34
+ :class="{ 'drag-and-drop': dragAndDrop }"
35
+ >
36
+ <TableItem :obj="obj" :row="row" />
95
37
  </td>
96
38
  </tr>
97
- </tbody>
39
+ </draggable>
98
40
  <tbody v-show="data.length == 0">
99
41
  <tr>
100
42
  <td colspan="12">
@@ -107,13 +49,14 @@
107
49
  </template>
108
50
 
109
51
  <script>
110
- import TableButton from "@nixweb/nixloc-ui/src/component/shared/TableButton.vue";
111
- import draggable from "@nixweb/nixloc-ui/vuedraggable";
52
+ import TableItem from "@nixweb/nixloc-ui/src/component/shared/TableItem.vue";
53
+
54
+ import draggable from "vuedraggable";
112
55
 
113
56
  import { mapState, mapMutations, mapActions } from "vuex";
114
57
 
115
58
  export default {
116
- components: { TableButton },
59
+ components: { draggable, TableItem },
117
60
  props: {
118
61
  header: Array,
119
62
  data: Array,
@@ -121,10 +64,15 @@ export default {
121
64
  type: Boolean,
122
65
  default: true,
123
66
  },
67
+ dragAndDrop: {
68
+ type: Boolean,
69
+ default: false,
70
+ },
124
71
  },
125
72
  data() {
126
73
  return {
127
74
  selectAll: false,
75
+ dataDragging: [],
128
76
  };
129
77
  },
130
78
  computed: {
@@ -149,30 +97,16 @@ export default {
149
97
  }
150
98
  }
151
99
  },
152
- convertClass(fieldComparison, classCssBody) {
153
- if (Array.isArray(classCssBody)) {
154
- let ret = [];
155
- classCssBody.forEach(function (value) {
156
- let classCss = value.classCss;
157
- let condition = value.fieldComparison == fieldComparison;
158
- let obj = { [classCss]: condition };
159
- ret.push(obj);
100
+ checkMove() {
101
+ if (this.dragAndDrop) {
102
+ var listIds = [];
103
+ this.data.forEach((item) => {
104
+ listIds.push(item.id);
160
105
  });
161
- return ret;
162
- } else {
163
- return classCssBody;
164
- }
165
- },
166
- navegateTo(obj, row) {
167
- if (obj.routeName) {
168
- this.$router.push({
169
- name: obj.routeName,
170
- params: { id: row.id, type: row.type },
171
- });
172
- } else {
106
+
173
107
  this.addEvent({
174
- name: obj.eventName,
175
- data: row,
108
+ name: "tableDragAndDrop",
109
+ data: { listIds: listIds },
176
110
  });
177
111
  }
178
112
  },
@@ -223,32 +157,7 @@ tr:hover {
223
157
  max-width: 200px;
224
158
  }
225
159
 
226
- .table-currency {
227
- font-size: 14px;
228
- min-width: 100px;
229
- }
230
-
231
- .link {
232
- color: #3f529b;
233
- font-size: 14px;
234
- font-weight: 400;
235
- cursor: pointer;
236
- }
237
-
238
- .link:hover {
239
- text-decoration: underline;
240
- transition: 0.1s;
241
- }
242
-
243
- .icon-link:hover {
244
- font-size: 12.5px;
245
- }
246
-
247
- .center-vertical {
248
- padding-top: 10px;
249
- }
250
-
251
- .badge-center {
252
- margin: auto !important;
160
+ .drag-and-drop {
161
+ cursor: move;
253
162
  }
254
163
  </style>
@@ -0,0 +1,127 @@
1
+ <template>
2
+ <div>
3
+ <div class="margin">
4
+ <Button
5
+ _key="btnCancelTableDraggable"
6
+ title="Cancelar"
7
+ type="danger"
8
+ size="small"
9
+ :clicked="cancel"
10
+ />
11
+ <Button
12
+ _key="btnCheckMoveTableDraggable"
13
+ title="Confirmar"
14
+ type="success"
15
+ size="small"
16
+ :clicked="checkMove"
17
+ />
18
+ </div>
19
+ <i class="fa-regular fa-maximize icon-order"></i> Clique e arraste para ordenar
20
+ <table class="table table-responsive-xs">
21
+ <thead>
22
+ <tr>
23
+ <th>
24
+ <span class="title-header">Nome</span>
25
+ </th>
26
+ </tr>
27
+ </thead>
28
+ <draggable v-model="dataLocal" tag="tbody">
29
+ <tr v-for="item in dataLocal">
30
+ <td class="item">
31
+ <i class="fa-solid fa-grip-lines icon-order"></i>
32
+ <span v-if="item.name"> {{ item.name }}</span>
33
+ <span class="without-group" v-else> Sem grupo</span>
34
+ </td>
35
+ </tr>
36
+ </draggable>
37
+ <tbody v-show="dataLocal.length == 0">
38
+ <tr>
39
+ <td colspan="12">
40
+ <span>Nenhum registro encontrado!</span>
41
+ </td>
42
+ </tr>
43
+ </tbody>
44
+ </table>
45
+ </div>
46
+ </template>
47
+ <script>
48
+ import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
49
+ import draggable from "vuedraggable";
50
+
51
+ import { mapMutations, mapActions } from "vuex";
52
+
53
+ export default {
54
+ name: "TableDraggable",
55
+ components: { Button, draggable },
56
+ props: {
57
+ data: Array,
58
+ propsParam: Object,
59
+ urlOrderAllApi: String,
60
+ },
61
+ data() {
62
+ return {
63
+ dataLocal: [],
64
+ };
65
+ },
66
+ mounted() {
67
+ this.dataLocal = this.data;
68
+ },
69
+ methods: {
70
+ ...mapMutations("generic", ["addEvent", "removeLoading"]),
71
+ ...mapActions("generic", ["orderAllApi"]),
72
+ checkMove() {
73
+ let listIds = [];
74
+
75
+ this.dataLocal.forEach((item) => {
76
+ listIds.push(item.id);
77
+ });
78
+
79
+ let obj = { ...this.propsParam, listIds: listIds };
80
+ let params = { url: this.urlOrderAllApi, obj: obj };
81
+
82
+ this.orderAllApi(params).then((response) => {
83
+ this.removeLoading(["btnCheckMoveTableDraggable"]);
84
+ this.addEvent({ name: "confirmedTableDraggable" });
85
+ });
86
+ },
87
+ cancel() {
88
+ this.addEvent({ name: "cancelTableDraggable" });
89
+ this.removeLoading(["btnCancelTableDraggable"]);
90
+ },
91
+ },
92
+ };
93
+ </script>
94
+ <style scoped>
95
+ .table th,
96
+ .table td {
97
+ height: 10px !important;
98
+ padding-left: 5px !important;
99
+ padding-top: 7px !important;
100
+ padding-bottom: 5px !important;
101
+ padding-right: 5px !important;
102
+ padding-left: 10px !important;
103
+ border-bottom: 0px !important;
104
+ }
105
+
106
+ .title-header {
107
+ font-size: 14px;
108
+ color: #757d8c;
109
+ font-weight: 400;
110
+ text-transform: uppercase;
111
+ }
112
+
113
+ .item {
114
+ background-color: #f1f4f9;
115
+ cursor: move;
116
+ }
117
+
118
+ .without-group {
119
+ font-size: 13px;
120
+ font-style: italic;
121
+ color: grey;
122
+ }
123
+
124
+ .margin {
125
+ margin-bottom: 10px;
126
+ }
127
+ </style>
@@ -0,0 +1,177 @@
1
+ <template>
2
+ <div>
3
+ <div
4
+ v-if="obj.type === 'period-rent'"
5
+ class="period-rent"
6
+ @click="navegateTo(obj, row)"
7
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
8
+ >
9
+ <DisplayPeriodRent :periodRent="row[obj.field]" :fontSize="14" :showDeliveryDevolution="true" />
10
+ </div>
11
+ <div
12
+ v-if="obj.type === 'text'"
13
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
14
+ >
15
+ {{ row[obj.field] }}
16
+ <div>{{ row[obj.fieldSecond] }}</div>
17
+ </div>
18
+ <div v-if="obj.type === 'image'">
19
+ <img
20
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
21
+ class="img"
22
+ :src="urlImage + obj.container + '/' + row[obj.field]"
23
+ />
24
+ </div>
25
+ <div v-if="obj.type === 'class'" class="text-center">
26
+ <div :class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
27
+ {{ row[obj.field] }}
28
+ </div>
29
+ </div>
30
+ <div
31
+ v-if="obj.type === 'html'"
32
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
33
+ >
34
+ <div v-if="row[obj.field]" v-html="row[obj.field]"></div>
35
+ <div v-else v-html="obj.html"></div>
36
+ </div>
37
+ <div
38
+ v-if="obj.type === 'select'"
39
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
40
+ >
41
+ {{ row[obj.field].content }}
42
+ </div>
43
+ <div
44
+ v-if="obj.type === 'date'"
45
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
46
+ >
47
+ {{ row[obj.field] | moment("DD/MM/YYYY") }}
48
+ </div>
49
+ <div
50
+ v-if="obj.type === 'dateTime'"
51
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
52
+ >
53
+ {{ row[obj.field] | moment("DD/MM/YYYY HH:mm") }}
54
+ </div>
55
+ <div
56
+ v-if="obj.type === 'currency'"
57
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
58
+ >
59
+ {{ row[obj.field] | currency }}
60
+ </div>
61
+ <div
62
+ v-if="obj.type === 'button'"
63
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
64
+ >
65
+ <TableButton :obj="obj" :row="row" />
66
+ </div>
67
+ <div
68
+ v-if="obj.type === 'link'"
69
+ class="link"
70
+ :class="convertClass(row[obj.fieldComparison], obj.classCssBody)"
71
+ @click="navegateTo(obj, row)"
72
+ >
73
+ <span> {{ row[obj.field] }}</span>
74
+ <div class="field-second">{{ row[obj.fieldSecond] }}</div>
75
+ </div>
76
+ </div>
77
+ </template>
78
+ <script>
79
+ import TableButton from "@nixweb/nixloc-ui/src/component/shared/TableButton.vue";
80
+ import DisplayPeriodRent from "@nixweb/nixloc-ui/src/component/rental/DisplayPeriodRent";
81
+
82
+ import { mapMutations } from "vuex";
83
+
84
+ export default {
85
+ name: "TableItem",
86
+ components: { TableButton, DisplayPeriodRent },
87
+ props: {
88
+ obj: Object,
89
+ row: Object,
90
+ },
91
+ data() {
92
+ return {};
93
+ },
94
+ computed: {
95
+ urlImage() {
96
+ return "https://espaco.blob.core.windows.net/";
97
+ },
98
+ },
99
+ methods: {
100
+ ...mapMutations("generic", ["addSelected", "addEvent"]),
101
+ convertClass(fieldComparison, classCssBody) {
102
+ if (Array.isArray(classCssBody)) {
103
+ let ret = [];
104
+ classCssBody.forEach(function (value) {
105
+ let classCss = value.classCss;
106
+ let condition = value.fieldComparison == fieldComparison;
107
+ let obj = { [classCss]: condition };
108
+ ret.push(obj);
109
+ });
110
+ return ret;
111
+ } else {
112
+ return classCssBody;
113
+ }
114
+ },
115
+ navegateTo(obj, row) {
116
+ if (obj.routeName) {
117
+ this.$router.push({
118
+ name: obj.routeName,
119
+ params: { id: row.id, type: row.type },
120
+ });
121
+ } else {
122
+ this.addEvent({
123
+ name: obj.eventName,
124
+ data: row,
125
+ });
126
+ }
127
+ },
128
+ },
129
+ };
130
+ </script>
131
+ <style scoped>
132
+ .field-second {
133
+ color: rgb(83, 82, 82) !important;
134
+ }
135
+
136
+ .table-currency {
137
+ font-size: 14px;
138
+ min-width: 100px;
139
+ }
140
+
141
+ .link {
142
+ color: #3f529b;
143
+ font-size: 14px;
144
+ font-weight: 400;
145
+ cursor: pointer;
146
+ }
147
+
148
+ .link:hover {
149
+ text-decoration: underline;
150
+ transition: 0.1s;
151
+ }
152
+
153
+ .icon-link:hover {
154
+ font-size: 12.5px;
155
+ }
156
+
157
+ .center-vertical {
158
+ padding-top: 10px;
159
+ }
160
+
161
+ .badge-center {
162
+ margin: auto !important;
163
+ }
164
+
165
+ .img {
166
+ width: 50px;
167
+ height: 50px;
168
+ }
169
+
170
+ .img-round {
171
+ border-radius: 30px;
172
+ }
173
+
174
+ .period-rent {
175
+ cursor: pointer;
176
+ }
177
+ </style>