@nixweb/nixloc-ui 1.19.0 → 1.20.0

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 (110) hide show
  1. package/package.json +1 -1
  2. package/src/component/forms/ButtonFilter.vue +104 -104
  3. package/src/component/forms/ButtonGroup.vue +66 -66
  4. package/src/component/forms/ButtonGroupInline.vue +210 -210
  5. package/src/component/forms/ButtonSub.vue +97 -97
  6. package/src/component/forms/ButtonToggle.vue +76 -76
  7. package/src/component/forms/DateYearMonth.vue +192 -192
  8. package/src/component/forms/ImageUpload.vue +214 -214
  9. package/src/component/forms/IncrementDecrement.vue +151 -151
  10. package/src/component/forms/InputAddressGoogle.vue +171 -171
  11. package/src/component/forms/InputCallToAction.vue +135 -135
  12. package/src/component/forms/InputDecimalDiscount.vue +146 -146
  13. package/src/component/forms/InputTag.vue +124 -124
  14. package/src/component/forms/InputTextEdit.vue +69 -69
  15. package/src/component/forms/InputWhatsApp.vue +47 -47
  16. package/src/component/forms/SideBar.vue +99 -99
  17. package/src/component/forms/Toggle.vue +72 -72
  18. package/src/component/layout/Account.vue +131 -131
  19. package/src/component/layout/AnimatedPhrase.vue +68 -68
  20. package/src/component/layout/BarFloating.vue +67 -67
  21. package/src/component/layout/BottomActionsBar.vue +205 -205
  22. package/src/component/layout/ColorPicker.vue +175 -175
  23. package/src/component/layout/Gantt.vue +128 -128
  24. package/src/component/layout/HideShow.vue +61 -61
  25. package/src/component/layout/IconMolded.vue +58 -58
  26. package/src/component/layout/IconPicker.vue +161 -161
  27. package/src/component/layout/NewAccount.vue +136 -136
  28. package/src/component/layout/NewHeader.vue +59 -59
  29. package/src/component/layout/NewIconMolded.vue +70 -70
  30. package/src/component/layout/NewMenu.vue +472 -472
  31. package/src/component/layout/Tab.vue +259 -259
  32. package/src/component/layout/Tag.vue +97 -97
  33. package/src/component/layout/Tooltip.vue +155 -155
  34. package/src/component/layout/Zoom.vue +111 -111
  35. package/src/component/rental/DisplayCalculatePeriod.vue +48 -48
  36. package/src/component/rental/DisplayPeriodRent.vue +55 -55
  37. package/src/component/rental/DisplayTotalization.vue +86 -86
  38. package/src/component/report/Fields.vue +108 -108
  39. package/src/component/report/Report.vue +377 -377
  40. package/src/component/report/ReportTable.vue +111 -111
  41. package/src/component/report/Totalization.vue +33 -33
  42. package/src/component/shared/CodeEditor.vue +128 -128
  43. package/src/component/shared/Confirmation.vue +74 -74
  44. package/src/component/shared/DocumentEditor.vue +99 -99
  45. package/src/component/shared/DocumentPreview.vue +105 -105
  46. package/src/component/shared/DocumentPublic.vue +33 -33
  47. package/src/component/shared/ExportExcel.vue +56 -56
  48. package/src/component/shared/FullCalendar.vue +175 -175
  49. package/src/component/shared/HeaderReport.vue +47 -47
  50. package/src/component/shared/ListNotifications.vue +70 -70
  51. package/src/component/shared/Loading.vue +1 -4
  52. package/src/component/shared/LoadingCard.vue +64 -64
  53. package/src/component/shared/ParameterLegend.vue +169 -169
  54. package/src/component/shared/Report.vue +250 -250
  55. package/src/component/shared/SaveCancel.vue +99 -117
  56. package/src/component/shared/SelectOption.vue +162 -162
  57. package/src/component/shared/TableDraggable.vue +117 -117
  58. package/src/component/shared/TableImport.vue +93 -93
  59. package/src/component/shared/TableItem.vue +228 -228
  60. package/src/component/shared/TableTotalPerPage.vue +114 -114
  61. package/src/component/shared/TableTotalRecords.vue +44 -44
  62. package/src/component/shared/TimeLine.vue +41 -41
  63. package/src/component/shared/Timer.vue +77 -77
  64. package/src/component/shared/ToggleTheme.vue +127 -127
  65. package/src/component/shared/TotalizationReport.vue +86 -86
  66. package/src/component/shared/actions/ActionButtons.vue +53 -53
  67. package/src/component/shared/actions/ActionErrorContent.vue +103 -103
  68. package/src/component/shared/actions/ActionFooter.vue +93 -99
  69. package/src/component/shared/actions/ActionHeader.vue +110 -110
  70. package/src/component/shared/actions/ActionItemList.vue +143 -143
  71. package/src/component/shared/actions/ActionsOptions.vue +209 -209
  72. package/src/component/shared/actions/ActionsSelected.vue +262 -262
  73. package/src/component/shared/automation/ActivitiesList.vue +43 -43
  74. package/src/component/shared/automation/AddRule.vue +60 -60
  75. package/src/component/shared/automation/AutomationBuilder.vue +26 -26
  76. package/src/component/shared/automation/DynamicComponentList.vue +85 -85
  77. package/src/component/shared/automation/SelectRule.vue +97 -97
  78. package/src/component/shared/automation/components/BillingByRent.vue +97 -97
  79. package/src/component/shared/automation/components/SendEmail.vue +93 -93
  80. package/src/component/shared/file-manager/FileManager.vue +390 -390
  81. package/src/component/shared/filter-builder/FilterBuilder.vue +220 -220
  82. package/src/component/shared/filter-builder/FilterQuery.vue +95 -95
  83. package/src/component/shared/query-builder/ConvertToOdata.js +86 -86
  84. package/src/component/shared/query-builder/DynamicComponent.vue +161 -161
  85. package/src/component/shared/query-builder/Fields.vue +93 -93
  86. package/src/component/shared/query-builder/Rules.vue +68 -68
  87. package/src/component/shared/query-builder/SelectRule.vue +97 -97
  88. package/src/component/shared/query-builder/Tags.vue +59 -59
  89. package/src/component/signature/Payment.vue +160 -160
  90. package/src/component/signature/Warning.vue +75 -75
  91. package/src/component/template/ReportCreateUpdate.vue +110 -110
  92. package/src/component/template/ViewTemplateDocumentView.vue +213 -213
  93. package/src/component/template/ViewTemplateImportFile.vue +347 -347
  94. package/src/component/template/ViewTemplateReportList.vue +240 -240
  95. package/src/component/template/ViewTemplateReportPreview.vue +521 -521
  96. package/src/component/template/ViewTemplateSelectOption.vue +46 -46
  97. package/src/component/template/model/Report.js +5 -5
  98. package/src/component/training/Course.vue +343 -343
  99. package/src/component/training/CourseView.vue +198 -198
  100. package/src/component/value-objects/Address.js +10 -10
  101. package/src/component/value-objects/Address.vue +173 -173
  102. package/src/component/value-objects/Contact.js +6 -6
  103. package/src/component/value-objects/Contact.vue +106 -106
  104. package/src/component/value-objects/Person.js +10 -10
  105. package/src/component/value-objects/Person.vue +130 -130
  106. package/src/store/modules/automation.js +30 -30
  107. package/src/store/modules/generic.js +15 -1
  108. package/src/store/modules/report.js +277 -277
  109. package/src/store/modules/user.js +69 -69
  110. package/src/store/modules/util.js +25 -25
@@ -1,210 +1,210 @@
1
- <template>
2
- <div class="button-inline-group" ref="wrap">
3
- <button class="button-inline-trigger" title="Mais opções" @click.stop="toggleMenu" ref="triggerBtn">
4
- <i class="fa-solid fa-ellipsis-vertical"></i>
5
- </button>
6
-
7
- <transition name="button-inline-fade">
8
- <div v-if="showMenu" class="button-inline-popover-fixed" :style="popoverStyle" ref="popover" role="menu">
9
- <div class="button-inline-popover-inner">
10
- <div class="button-inline-buttons">
11
- <button v-for="(btn, i) in buttons" :key="btn.id || i" class="button-inline-btn"
12
- :title="btn.title" :style="buttonStyle(btn, i)" @click="onAction(btn)">
13
- <i :class="btn.icon"></i>
14
- </button>
15
- </div>
16
- </div>
17
- </div>
18
- </transition>
19
- </div>
20
- </template>
21
-
22
- <script>
23
-
24
- import { mapMutations } from "vuex";
25
-
26
- export default {
27
- name: "ButtonGroupInline",
28
- props: {
29
- buttons: { type: Array, required: true },
30
- defaultSize: { type: Number, default: 35 }
31
- },
32
- data() {
33
- return {
34
- showMenu: false,
35
- popoverStyle: {
36
- position: "fixed",
37
- top: "0px",
38
- left: "0px",
39
- transform: "translateX(-50%)",
40
- zIndex: 9999
41
- }
42
- };
43
- },
44
- methods: {
45
- ...mapMutations("generic", ["addEvent"]),
46
- toggleMenu() {
47
- this.showMenu = !this.showMenu;
48
- if (this.showMenu) {
49
- this.$nextTick(() => {
50
- this.positionPopover();
51
- window.addEventListener("scroll", this.positionPopover, true);
52
- window.addEventListener("resize", this.positionPopover, true);
53
- document.addEventListener("click", this.onOutsideClick, true);
54
- document.addEventListener("keydown", this.onKeydown, true);
55
- });
56
- } else {
57
- this.unbindGlobal();
58
- }
59
- },
60
- positionPopover() {
61
- const trigger = this.$refs.triggerBtn;
62
- const pop = this.$refs.popover;
63
- if (!trigger || !pop) return;
64
-
65
- const rect = trigger.getBoundingClientRect();
66
- let top = rect.bottom + 6;
67
- let center = rect.left + rect.width / 2;
68
-
69
- const popWidth = pop.offsetWidth || 0;
70
- const vw = window.innerWidth || document.documentElement.clientWidth;
71
- const margin = 8;
72
-
73
- const minCenter = margin + popWidth / 2;
74
- const maxCenter = vw - margin - popWidth / 2;
75
- center = Math.max(minCenter, Math.min(maxCenter, center));
76
-
77
- const popHeight = pop.offsetHeight || 0;
78
- const vh = window.innerHeight || document.documentElement.clientHeight;
79
- const spaceBelow = vh - rect.bottom;
80
- const spaceAbove = rect.top;
81
-
82
- if (spaceBelow < popHeight + 12 && spaceAbove > popHeight + 12) {
83
- top = rect.top - 6 - popHeight;
84
- }
85
-
86
- this.popoverStyle = {
87
- position: "fixed",
88
- top: `${Math.round(top)}px`,
89
- left: `${Math.round(center)}px`,
90
- transform: "translateX(-50%)",
91
- zIndex: 9999
92
- };
93
- },
94
- onOutsideClick(e) {
95
- const wrap = this.$refs.wrap;
96
- const pop = this.$refs.popover;
97
- if ((wrap && wrap.contains(e.target)) || (pop && pop.contains(e.target))) return;
98
- this.showMenu = false;
99
- this.unbindGlobal();
100
-
101
- },
102
- onKeydown(e) {
103
- if (e.key === "Escape") {
104
- this.showMenu = false;
105
- this.unbindGlobal();
106
- }
107
- },
108
- unbindGlobal() {
109
- window.removeEventListener("scroll", this.positionPopover, true);
110
- window.removeEventListener("resize", this.positionPopover, true);
111
- document.removeEventListener("click", this.onOutsideClick, true);
112
- document.removeEventListener("keydown", this.onKeydown, true);
113
- },
114
- onAction(btn) {
115
- this.$emit("action", btn);
116
- this.showMenu = false;
117
- this.unbindGlobal();
118
- this.addEvent({ name: btn.eventName, data: btn.eventData });
119
- },
120
- buttonStyle(btn, i) {
121
- const size = btn.size || this.defaultSize;
122
- return {
123
- backgroundColor: btn.color || "#577696",
124
- width: size + "px",
125
- height: size + "px",
126
- transitionDelay: `${i * 45}ms`
127
- };
128
- }
129
- },
130
- beforeDestroy() {
131
- this.unbindGlobal();
132
- }
133
- };
134
- </script>
135
-
136
- <style scoped>
137
- .button-inline-group {
138
- position: relative;
139
- display: inline-block;
140
- }
141
-
142
- .button-inline-trigger {
143
- display: inline-flex;
144
- align-items: center;
145
- justify-content: center;
146
- width: 34px;
147
- height: 34px;
148
- border-radius: 50%;
149
- background: transparent;
150
- border: none;
151
- color: #9b9ea3;
152
- font-size: 16px;
153
- cursor: pointer;
154
- transition: all 0.2s ease;
155
- }
156
-
157
- .button-inline-trigger:hover {
158
- background: #f3f4f6;
159
- color: #111827;
160
- }
161
-
162
- .button-inline-popover-fixed {
163
- position: fixed;
164
- pointer-events: auto;
165
- }
166
-
167
- .button-inline-popover-inner {
168
- background: #ffffff;
169
- border: 1px solid #e6ebf2;
170
- border-radius: 50px;
171
- box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
172
- padding: 2px;
173
- }
174
-
175
- .button-inline-buttons {
176
- display: flex;
177
- justify-content: center;
178
- align-items: center;
179
- gap: 12px;
180
- padding: 4px;
181
- }
182
-
183
- .button-inline-btn {
184
- border-radius: 50%;
185
- border: none;
186
- color: #fff;
187
- display: flex;
188
- align-items: center;
189
- justify-content: center;
190
- font-size: 15px;
191
- cursor: pointer;
192
- transition: all 0.18s ease;
193
- }
194
-
195
- .button-inline-btn:hover {
196
- filter: brightness(0.9);
197
- transform: translateY(-2px);
198
- }
199
-
200
- /* Fade animado */
201
- .button-inline-fade-enter-active,
202
- .button-inline-fade-leave-active {
203
- transition: opacity 0.25s ease;
204
- }
205
-
206
- .button-inline-fade-enter,
207
- .button-inline-fade-leave-to {
208
- opacity: 0;
209
- }
210
- </style>
1
+ <template>
2
+ <div class="button-inline-group" ref="wrap">
3
+ <button class="button-inline-trigger" title="Mais opções" @click.stop="toggleMenu" ref="triggerBtn">
4
+ <i class="fa-solid fa-ellipsis-vertical"></i>
5
+ </button>
6
+
7
+ <transition name="button-inline-fade">
8
+ <div v-if="showMenu" class="button-inline-popover-fixed" :style="popoverStyle" ref="popover" role="menu">
9
+ <div class="button-inline-popover-inner">
10
+ <div class="button-inline-buttons">
11
+ <button v-for="(btn, i) in buttons" :key="btn.id || i" class="button-inline-btn"
12
+ :title="btn.title" :style="buttonStyle(btn, i)" @click="onAction(btn)">
13
+ <i :class="btn.icon"></i>
14
+ </button>
15
+ </div>
16
+ </div>
17
+ </div>
18
+ </transition>
19
+ </div>
20
+ </template>
21
+
22
+ <script>
23
+
24
+ import { mapMutations } from "vuex";
25
+
26
+ export default {
27
+ name: "ButtonGroupInline",
28
+ props: {
29
+ buttons: { type: Array, required: true },
30
+ defaultSize: { type: Number, default: 35 }
31
+ },
32
+ data() {
33
+ return {
34
+ showMenu: false,
35
+ popoverStyle: {
36
+ position: "fixed",
37
+ top: "0px",
38
+ left: "0px",
39
+ transform: "translateX(-50%)",
40
+ zIndex: 9999
41
+ }
42
+ };
43
+ },
44
+ methods: {
45
+ ...mapMutations("generic", ["addEvent"]),
46
+ toggleMenu() {
47
+ this.showMenu = !this.showMenu;
48
+ if (this.showMenu) {
49
+ this.$nextTick(() => {
50
+ this.positionPopover();
51
+ window.addEventListener("scroll", this.positionPopover, true);
52
+ window.addEventListener("resize", this.positionPopover, true);
53
+ document.addEventListener("click", this.onOutsideClick, true);
54
+ document.addEventListener("keydown", this.onKeydown, true);
55
+ });
56
+ } else {
57
+ this.unbindGlobal();
58
+ }
59
+ },
60
+ positionPopover() {
61
+ const trigger = this.$refs.triggerBtn;
62
+ const pop = this.$refs.popover;
63
+ if (!trigger || !pop) return;
64
+
65
+ const rect = trigger.getBoundingClientRect();
66
+ let top = rect.bottom + 6;
67
+ let center = rect.left + rect.width / 2;
68
+
69
+ const popWidth = pop.offsetWidth || 0;
70
+ const vw = window.innerWidth || document.documentElement.clientWidth;
71
+ const margin = 8;
72
+
73
+ const minCenter = margin + popWidth / 2;
74
+ const maxCenter = vw - margin - popWidth / 2;
75
+ center = Math.max(minCenter, Math.min(maxCenter, center));
76
+
77
+ const popHeight = pop.offsetHeight || 0;
78
+ const vh = window.innerHeight || document.documentElement.clientHeight;
79
+ const spaceBelow = vh - rect.bottom;
80
+ const spaceAbove = rect.top;
81
+
82
+ if (spaceBelow < popHeight + 12 && spaceAbove > popHeight + 12) {
83
+ top = rect.top - 6 - popHeight;
84
+ }
85
+
86
+ this.popoverStyle = {
87
+ position: "fixed",
88
+ top: `${Math.round(top)}px`,
89
+ left: `${Math.round(center)}px`,
90
+ transform: "translateX(-50%)",
91
+ zIndex: 9999
92
+ };
93
+ },
94
+ onOutsideClick(e) {
95
+ const wrap = this.$refs.wrap;
96
+ const pop = this.$refs.popover;
97
+ if ((wrap && wrap.contains(e.target)) || (pop && pop.contains(e.target))) return;
98
+ this.showMenu = false;
99
+ this.unbindGlobal();
100
+
101
+ },
102
+ onKeydown(e) {
103
+ if (e.key === "Escape") {
104
+ this.showMenu = false;
105
+ this.unbindGlobal();
106
+ }
107
+ },
108
+ unbindGlobal() {
109
+ window.removeEventListener("scroll", this.positionPopover, true);
110
+ window.removeEventListener("resize", this.positionPopover, true);
111
+ document.removeEventListener("click", this.onOutsideClick, true);
112
+ document.removeEventListener("keydown", this.onKeydown, true);
113
+ },
114
+ onAction(btn) {
115
+ this.$emit("action", btn);
116
+ this.showMenu = false;
117
+ this.unbindGlobal();
118
+ this.addEvent({ name: btn.eventName, data: btn.eventData });
119
+ },
120
+ buttonStyle(btn, i) {
121
+ const size = btn.size || this.defaultSize;
122
+ return {
123
+ backgroundColor: btn.color || "#577696",
124
+ width: size + "px",
125
+ height: size + "px",
126
+ transitionDelay: `${i * 45}ms`
127
+ };
128
+ }
129
+ },
130
+ beforeDestroy() {
131
+ this.unbindGlobal();
132
+ }
133
+ };
134
+ </script>
135
+
136
+ <style scoped>
137
+ .button-inline-group {
138
+ position: relative;
139
+ display: inline-block;
140
+ }
141
+
142
+ .button-inline-trigger {
143
+ display: inline-flex;
144
+ align-items: center;
145
+ justify-content: center;
146
+ width: 34px;
147
+ height: 34px;
148
+ border-radius: 50%;
149
+ background: transparent;
150
+ border: none;
151
+ color: #9b9ea3;
152
+ font-size: 16px;
153
+ cursor: pointer;
154
+ transition: all 0.2s ease;
155
+ }
156
+
157
+ .button-inline-trigger:hover {
158
+ background: #f3f4f6;
159
+ color: #111827;
160
+ }
161
+
162
+ .button-inline-popover-fixed {
163
+ position: fixed;
164
+ pointer-events: auto;
165
+ }
166
+
167
+ .button-inline-popover-inner {
168
+ background: #ffffff;
169
+ border: 1px solid #e6ebf2;
170
+ border-radius: 50px;
171
+ box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
172
+ padding: 2px;
173
+ }
174
+
175
+ .button-inline-buttons {
176
+ display: flex;
177
+ justify-content: center;
178
+ align-items: center;
179
+ gap: 12px;
180
+ padding: 4px;
181
+ }
182
+
183
+ .button-inline-btn {
184
+ border-radius: 50%;
185
+ border: none;
186
+ color: #fff;
187
+ display: flex;
188
+ align-items: center;
189
+ justify-content: center;
190
+ font-size: 15px;
191
+ cursor: pointer;
192
+ transition: all 0.18s ease;
193
+ }
194
+
195
+ .button-inline-btn:hover {
196
+ filter: brightness(0.9);
197
+ transform: translateY(-2px);
198
+ }
199
+
200
+ /* Fade animado */
201
+ .button-inline-fade-enter-active,
202
+ .button-inline-fade-leave-active {
203
+ transition: opacity 0.25s ease;
204
+ }
205
+
206
+ .button-inline-fade-enter,
207
+ .button-inline-fade-leave-to {
208
+ opacity: 0;
209
+ }
210
+ </style>
@@ -1,98 +1,98 @@
1
- <template>
2
- <div>
3
- <div class="div-table-sub">
4
- <div class="btn-close" @click="show" v-if="!open">
5
- <i class="icon-table-sub fa-solid fa-arrow-left"></i>
6
- </div>
7
- <div class="btn-close" @click="hide" v-else>
8
- <i class="icon-table-sub fa-solid fa-arrow-down"></i>
9
- </div>
10
- </div>
11
- </div>
12
- </template>
13
- <script>
14
- import { mapActions, mapMutations } from "vuex";
15
-
16
- export default {
17
- name: "ButtonSub",
18
- props: {
19
- itemId: String,
20
- urlGet: String,
21
- eventNameShow: String,
22
- eventNameHide: String,
23
- propsParam: Object,
24
- value: Object,
25
- },
26
- data() {
27
- return {
28
- open: false,
29
- baseParams: {
30
- search: undefined,
31
- filter: "contains",
32
- currentPage: 1,
33
- totalPerPage: 20,
34
- },
35
- };
36
- },
37
- methods: {
38
- ...mapActions("generic", ["getApi"]),
39
- ...mapMutations("generic", ["addEvent"]),
40
- getAll() {
41
- this.$emit("input", { loading: true, itemId: this.itemId });
42
- let params = {
43
- url: this.urlGet,
44
- obj: { ...this.propsParam, ...this.baseParams },
45
- };
46
- this.getApi(params).then((response) => {
47
- this.addEvent({
48
- name: this.eventNameShow,
49
- data: { itemId: this.itemId, data: response.content.data },
50
- });
51
-
52
- let self = this;
53
- setTimeout(function () {
54
- self.$emit("input", { loading: false, itemId: this.itemId });
55
- }, 500);
56
- });
57
- },
58
- show() {
59
- this.open = true;
60
- this.getAll();
61
- },
62
- hide() {
63
- this.open = false;
64
- this.addEvent({
65
- name: this.eventNameHide,
66
- data: { itemId: this.itemId, data: [] },
67
- });
68
- },
69
- },
70
- };
71
- </script>
72
- <style scoped>
73
- .div-table-sub {
74
- overflow-y: hidden !important;
75
- overflow-x: hidden !important;
76
- background-color: #ececec;
77
- border-radius: 50px;
78
- height: 35px;
79
- width: 35px;
80
- margin-left: 10px;
81
- cursor: pointer;
82
- }
83
-
84
- .div-table-sub:hover {
85
- background-color: #dfdfdf;
86
- }
87
-
88
- .icon-table-sub {
89
- font-size: 16px;
90
- padding-top: 10px;
91
- padding-right: 10px;
92
- }
93
-
94
- .btn-close {
95
- margin-left: 10px;
96
- height: 30px;
97
- }
1
+ <template>
2
+ <div>
3
+ <div class="div-table-sub">
4
+ <div class="btn-close" @click="show" v-if="!open">
5
+ <i class="icon-table-sub fa-solid fa-arrow-left"></i>
6
+ </div>
7
+ <div class="btn-close" @click="hide" v-else>
8
+ <i class="icon-table-sub fa-solid fa-arrow-down"></i>
9
+ </div>
10
+ </div>
11
+ </div>
12
+ </template>
13
+ <script>
14
+ import { mapActions, mapMutations } from "vuex";
15
+
16
+ export default {
17
+ name: "ButtonSub",
18
+ props: {
19
+ itemId: String,
20
+ urlGet: String,
21
+ eventNameShow: String,
22
+ eventNameHide: String,
23
+ propsParam: Object,
24
+ value: Object,
25
+ },
26
+ data() {
27
+ return {
28
+ open: false,
29
+ baseParams: {
30
+ search: undefined,
31
+ filter: "contains",
32
+ currentPage: 1,
33
+ totalPerPage: 20,
34
+ },
35
+ };
36
+ },
37
+ methods: {
38
+ ...mapActions("generic", ["getApi"]),
39
+ ...mapMutations("generic", ["addEvent"]),
40
+ getAll() {
41
+ this.$emit("input", { loading: true, itemId: this.itemId });
42
+ let params = {
43
+ url: this.urlGet,
44
+ obj: { ...this.propsParam, ...this.baseParams },
45
+ };
46
+ this.getApi(params).then((response) => {
47
+ this.addEvent({
48
+ name: this.eventNameShow,
49
+ data: { itemId: this.itemId, data: response.content.data },
50
+ });
51
+
52
+ let self = this;
53
+ setTimeout(function () {
54
+ self.$emit("input", { loading: false, itemId: this.itemId });
55
+ }, 500);
56
+ });
57
+ },
58
+ show() {
59
+ this.open = true;
60
+ this.getAll();
61
+ },
62
+ hide() {
63
+ this.open = false;
64
+ this.addEvent({
65
+ name: this.eventNameHide,
66
+ data: { itemId: this.itemId, data: [] },
67
+ });
68
+ },
69
+ },
70
+ };
71
+ </script>
72
+ <style scoped>
73
+ .div-table-sub {
74
+ overflow-y: hidden !important;
75
+ overflow-x: hidden !important;
76
+ background-color: #ececec;
77
+ border-radius: 50px;
78
+ height: 35px;
79
+ width: 35px;
80
+ margin-left: 10px;
81
+ cursor: pointer;
82
+ }
83
+
84
+ .div-table-sub:hover {
85
+ background-color: #dfdfdf;
86
+ }
87
+
88
+ .icon-table-sub {
89
+ font-size: 16px;
90
+ padding-top: 10px;
91
+ padding-right: 10px;
92
+ }
93
+
94
+ .btn-close {
95
+ margin-left: 10px;
96
+ height: 30px;
97
+ }
98
98
  </style>