@nixweb/nixloc-ui 0.0.300 → 0.0.301
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.
- package/package.json +1 -1
- package/src/App.vue +13 -0
- package/src/component/forms/Button.vue +163 -0
- package/src/component/forms/ButtonFilter.vue +75 -0
- package/src/component/forms/ButtonGroup.vue +67 -0
- package/src/component/forms/ButtonSub.vue +98 -0
- package/src/component/forms/ButtonToggle.vue +77 -0
- package/src/component/forms/CheckboxGroup.vue +69 -0
- package/src/component/forms/CheckboxServer.vue +192 -0
- package/src/component/forms/CheckboxSimple.vue +60 -0
- package/src/component/forms/Color.vue +38 -0
- package/src/component/forms/DateTime.vue +170 -0
- package/src/component/forms/DateYearMonth.vue +193 -0
- package/src/component/forms/Dropdown.vue +236 -0
- package/src/component/forms/EditorHtml.vue +132 -0
- package/src/component/forms/FileUpload.vue +170 -0
- package/src/component/forms/ImageUpload.vue +214 -0
- package/src/component/forms/IncrementDecrement.vue +148 -0
- package/src/component/forms/InputAddressGoogle.vue +171 -0
- package/src/component/forms/InputCallToAction.vue +135 -0
- package/src/component/forms/InputDecimal.vue +153 -0
- package/src/component/forms/InputDecimalDiscount.vue +78 -0
- package/src/component/forms/InputNumber.vue +160 -0
- package/src/component/forms/InputPassword.vue +148 -0
- package/src/component/forms/InputTag.vue +125 -0
- package/src/component/forms/InputText.vue +174 -0
- package/src/component/forms/InputTextEdit.vue +69 -0
- package/src/component/forms/InputWhatsApp.vue +48 -0
- package/src/component/forms/Modal.vue +57 -0
- package/src/component/forms/RadioGroup.vue +91 -0
- package/src/component/forms/Select.vue +378 -0
- package/src/component/forms/SelectStatic.vue +198 -0
- package/src/component/forms/SideBar.vue +100 -0
- package/src/component/forms/Slider.vue +18 -0
- package/src/component/forms/TextArea.vue +138 -0
- package/src/component/forms/Toggle.vue +72 -0
- package/src/component/layout/Account.vue +131 -0
- package/src/component/layout/Alert.vue +88 -0
- package/src/component/layout/Badge.vue +111 -0
- package/src/component/layout/BarFloating.vue +68 -0
- package/src/component/layout/FixedBar.vue +103 -0
- package/src/component/layout/Gantt.vue +128 -0
- package/src/component/layout/Header.vue +56 -0
- package/src/component/layout/HideShow.vue +62 -0
- package/src/component/layout/IconMolded.vue +59 -0
- package/src/component/layout/LoadingFullPage.vue +27 -0
- package/src/component/layout/Menu.vue +287 -0
- package/src/component/layout/Molded.vue +30 -0
- package/src/component/layout/NewAccount.vue +136 -0
- package/src/component/layout/NewHeader.vue +60 -0
- package/src/component/layout/NewIconMolded.vue +71 -0
- package/src/component/layout/NewMenu.vue +456 -0
- package/src/component/layout/Panel.vue +185 -0
- package/src/component/layout/Popover.vue +126 -0
- package/src/component/layout/ScrollBar.vue +57 -0
- package/src/component/layout/Tab.vue +135 -0
- package/src/component/layout/Tag.vue +97 -0
- package/src/component/layout/Wizard.vue +211 -0
- package/src/component/rental/DisplayCalculatePeriod.vue +49 -0
- package/src/component/rental/DisplayPeriodRent.vue +55 -0
- package/src/component/rental/DisplayTotalization.vue +86 -0
- package/src/component/report/Fields.vue +109 -0
- package/src/component/report/Report.vue +314 -0
- package/src/component/report/ReportTable.vue +112 -0
- package/src/component/report/Totalization.vue +34 -0
- package/src/component/shared/CodeEditor.vue +128 -0
- package/src/component/shared/Collapse.vue +131 -0
- package/src/component/shared/Confirmation.vue +74 -0
- package/src/component/shared/DocumentEditor.vue +99 -0
- package/src/component/shared/DocumentPreview.vue +81 -0
- package/src/component/shared/DocumentPublic.vue +33 -0
- package/src/component/shared/ExportExcel.vue +56 -0
- package/src/component/shared/ExportPDF.vue +116 -0
- package/src/component/shared/FullCalendar.vue +174 -0
- package/src/component/shared/HeaderReport.vue +47 -0
- package/src/component/shared/HorizontalFilter.vue +64 -0
- package/src/component/shared/ListNotifications.vue +70 -0
- package/src/component/shared/Loading.vue +107 -0
- package/src/component/shared/LoadingCard.vue +65 -0
- package/src/component/shared/LoadingMoreButton.vue +23 -0
- package/src/component/shared/Messages.vue +109 -0
- package/src/component/shared/PDFViewer.vue +24 -0
- package/src/component/shared/Pagination.vue +108 -0
- package/src/component/shared/ParameterLegend.vue +169 -0
- package/src/component/shared/ProgressBar.vue +25 -0
- package/src/component/shared/QueryButton.vue +66 -0
- package/src/component/shared/Report.vue +200 -0
- package/src/component/shared/SaveCancel.vue +99 -0
- package/src/component/shared/Search.vue +174 -0
- package/src/component/shared/SelectOption.vue +162 -0
- package/src/component/shared/Table.vue +174 -0
- package/src/component/shared/TableButton.vue +36 -0
- package/src/component/shared/TableDraggable.vue +117 -0
- package/src/component/shared/TableImport.vue +93 -0
- package/src/component/shared/TableItem.vue +214 -0
- package/src/component/shared/TableTotalPerPage.vue +78 -0
- package/src/component/shared/TableTotalRecords.vue +44 -0
- package/src/component/shared/TableTotalization.vue +47 -0
- package/src/component/shared/TimeLine.vue +42 -0
- package/src/component/shared/Timer.vue +78 -0
- package/src/component/shared/Tip.vue +42 -0
- package/src/component/shared/Toast.vue +69 -0
- package/src/component/shared/ToggleTheme.vue +128 -0
- package/src/component/shared/TotalizationReport.vue +86 -0
- package/src/component/shared/VerticalFilter.vue +97 -0
- package/src/component/shared/automation/ActivitiesList.vue +44 -0
- package/src/component/shared/automation/AddRule.vue +61 -0
- package/src/component/shared/automation/AutomationBuilder.vue +27 -0
- package/src/component/shared/automation/DynamicComponentList.vue +86 -0
- package/src/component/shared/automation/SelectRule.vue +98 -0
- package/src/component/shared/automation/components/BillingByRent.vue +98 -0
- package/src/component/shared/automation/components/SendEmail.vue +94 -0
- package/src/component/shared/file-manager/FileManager.vue +391 -0
- package/src/component/shared/filter-builder/FilterBuilder.vue +221 -0
- package/src/component/shared/filter-builder/FilterQuery.vue +94 -0
- package/src/component/shared/query-builder/AddRule.vue +203 -0
- package/src/component/shared/query-builder/ConvertToOdata.js +86 -0
- package/src/component/shared/query-builder/DynamicComponent.vue +161 -0
- package/src/component/shared/query-builder/DynamicComponentList.vue +70 -0
- package/src/component/shared/query-builder/Fields.vue +93 -0
- package/src/component/shared/query-builder/QueryBuilder.vue +69 -0
- package/src/component/shared/query-builder/Rules.vue +68 -0
- package/src/component/shared/query-builder/SelectRule.vue +97 -0
- package/src/component/shared/query-builder/Tags.vue +59 -0
- package/src/component/shared/query-builder/utilities.js +22 -0
- package/src/component/signature/Payment.vue +161 -0
- package/src/component/signature/Warning.vue +76 -0
- package/src/component/template/ListViewWithDataHandler.vue +429 -0
- package/src/component/template/ReportCreateUpdate.vue +110 -0
- package/src/component/template/ViewTemplateConfiguration.vue +64 -0
- package/src/component/template/ViewTemplateDocumentView.vue +213 -0
- package/src/component/template/ViewTemplateImportFile.vue +347 -0
- package/src/component/template/ViewTemplateReportList.vue +217 -0
- package/src/component/template/ViewTemplateReportPreview.vue +432 -0
- package/src/component/template/ViewTemplateSelectOption.vue +46 -0
- package/src/component/template/ViewTemplateWithSalveCancel.vue +32 -0
- package/src/component/template/ViewTemplateWithTable.vue +62 -0
- package/src/component/template/model/Report.js +6 -0
- package/src/component/training/Course.vue +344 -0
- package/src/component/training/CourseView.vue +190 -0
- package/src/component/value-objects/Address.js +11 -0
- package/src/component/value-objects/Address.vue +157 -0
- package/src/component/value-objects/Contact.js +7 -0
- package/src/component/value-objects/Contact.vue +106 -0
- package/src/component/value-objects/Person.js +10 -0
- package/src/component/value-objects/Person.vue +129 -0
- package/src/config/axios.js +9 -0
- package/src/config/dicas.js +15 -0
- package/src/config/router.js +14 -0
- package/src/config/token.js +15 -0
- package/src/main.js +23 -0
- package/src/store/modules/automation.js +31 -0
- package/src/store/modules/generic.js +816 -0
- package/src/store/modules/report.js +278 -0
- package/src/store/modules/user.js +67 -0
- package/src/store/modules/util.js +26 -0
- package/src/store/modules/validation.js +39 -0
- package/src/store/store.js +14 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="wrapper-stepper">
|
|
4
|
+
<div class="stepper">
|
|
5
|
+
<div class="stepper-progress" v-if="showSteps">
|
|
6
|
+
<div class="stepper-progress-bar" :style="'width:' + stepperProgress"></div>
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<div
|
|
10
|
+
class="stepper-item"
|
|
11
|
+
v-if="showSteps"
|
|
12
|
+
:class="{ current: step == item, success: step > item }"
|
|
13
|
+
v-for="item in totalSteps"
|
|
14
|
+
:key="item"
|
|
15
|
+
>
|
|
16
|
+
<div class="stepper-item-counter">
|
|
17
|
+
<img
|
|
18
|
+
class="icon-success"
|
|
19
|
+
src="https://www.seekpng.com/png/full/1-10353_check-mark-green-png-green-check-mark-svg.png"
|
|
20
|
+
/>
|
|
21
|
+
<span class="number">
|
|
22
|
+
{{ item }}
|
|
23
|
+
</span>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="stepper-item-title text-center">{{ legend[item - 1] }}</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="stepper-content" v-for="item in totalSteps" :key="item">
|
|
29
|
+
<div class="stepper-pane" v-if="step == item">
|
|
30
|
+
<slot :name="step"></slot>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="controls">
|
|
34
|
+
<button class="btn" @click="step--" v-if="step != 1">Anterior</button>
|
|
35
|
+
<button
|
|
36
|
+
v-if="step < totalSteps"
|
|
37
|
+
class="btn btn--green-1"
|
|
38
|
+
@click="step++"
|
|
39
|
+
:disabled="!isFormValid(formName[step - 1])"
|
|
40
|
+
>
|
|
41
|
+
Próximo
|
|
42
|
+
</button>
|
|
43
|
+
<div class="slot-final" v-else>
|
|
44
|
+
<slot name="finish"></slot>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script>
|
|
52
|
+
import { mapGetters, mapActions, mapMutations } from "vuex";
|
|
53
|
+
|
|
54
|
+
export default {
|
|
55
|
+
name: "Wizard",
|
|
56
|
+
props: {
|
|
57
|
+
totalSteps: Number,
|
|
58
|
+
legend: Array,
|
|
59
|
+
formName: Array,
|
|
60
|
+
showSteps: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: true,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
data() {
|
|
66
|
+
return {
|
|
67
|
+
step: 1,
|
|
68
|
+
};
|
|
69
|
+
},
|
|
70
|
+
computed: {
|
|
71
|
+
...mapGetters("validation", ["isFormValid"]),
|
|
72
|
+
stepperProgress() {
|
|
73
|
+
return (100 / this.totalSteps) * (this.step - 1) + "%";
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<style scoped>
|
|
80
|
+
.tx-green-1 {
|
|
81
|
+
color: #75cc65;
|
|
82
|
+
}
|
|
83
|
+
.wrapper-stepper {
|
|
84
|
+
background-color: #fff;
|
|
85
|
+
padding: 0px;
|
|
86
|
+
border-radius: 32px;
|
|
87
|
+
box-shadow: rgba(0, 0, 0, 0.09);
|
|
88
|
+
}
|
|
89
|
+
.stepper {
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
justify-content: space-between;
|
|
93
|
+
position: relative;
|
|
94
|
+
z-index: 0;
|
|
95
|
+
margin-bottom: 24px;
|
|
96
|
+
margin-left: 80px;
|
|
97
|
+
margin-right: 80px;
|
|
98
|
+
}
|
|
99
|
+
.stepper-progress {
|
|
100
|
+
position: absolute;
|
|
101
|
+
background-color: #dddada;
|
|
102
|
+
height: 1px;
|
|
103
|
+
z-index: -1;
|
|
104
|
+
left: 0;
|
|
105
|
+
right: 0;
|
|
106
|
+
margin: 0 auto;
|
|
107
|
+
}
|
|
108
|
+
.stepper-progress-bar {
|
|
109
|
+
position: absolute;
|
|
110
|
+
left: 0;
|
|
111
|
+
height: 100%;
|
|
112
|
+
width: 0%;
|
|
113
|
+
background-color: #75cc65;
|
|
114
|
+
transition: all 500ms ease;
|
|
115
|
+
}
|
|
116
|
+
.stepper-item {
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
align-items: center;
|
|
120
|
+
color: #c5c5c5;
|
|
121
|
+
transition: all 500ms ease;
|
|
122
|
+
}
|
|
123
|
+
.stepper-item-counter {
|
|
124
|
+
height: 38px;
|
|
125
|
+
width: 38px;
|
|
126
|
+
display: grid;
|
|
127
|
+
place-items: center;
|
|
128
|
+
background-color: #fff;
|
|
129
|
+
border-radius: 100%;
|
|
130
|
+
border: 1px solid #c5c5c5;
|
|
131
|
+
position: relative;
|
|
132
|
+
}
|
|
133
|
+
.stepper-item-counter .icon-success {
|
|
134
|
+
position: absolute;
|
|
135
|
+
opacity: 0;
|
|
136
|
+
transform: scale(0);
|
|
137
|
+
width: 20px;
|
|
138
|
+
transition: all 500ms ease;
|
|
139
|
+
}
|
|
140
|
+
.stepper-item-counter .number {
|
|
141
|
+
font-size: 15px;
|
|
142
|
+
transition: all 500ms ease;
|
|
143
|
+
}
|
|
144
|
+
.stepper-item-title {
|
|
145
|
+
position: absolute;
|
|
146
|
+
padding-top: 40px;
|
|
147
|
+
width: 40px;
|
|
148
|
+
margin-left: -16px;
|
|
149
|
+
}
|
|
150
|
+
.stepper-item.success .stepper-item-counter {
|
|
151
|
+
border-color: #75cc65;
|
|
152
|
+
background-color: #c8ebc1;
|
|
153
|
+
color: #fff;
|
|
154
|
+
}
|
|
155
|
+
.stepper-item.success .stepper-item-counter .icon-success {
|
|
156
|
+
opacity: 1;
|
|
157
|
+
transform: scale(1);
|
|
158
|
+
}
|
|
159
|
+
.stepper-item.success .stepper-item-counter .number {
|
|
160
|
+
opacity: 0;
|
|
161
|
+
transform: scale(0);
|
|
162
|
+
}
|
|
163
|
+
.stepper-item.success .stepper-item-title {
|
|
164
|
+
color: #75cc65;
|
|
165
|
+
}
|
|
166
|
+
.stepper-item.current .stepper-item-counter {
|
|
167
|
+
border-color: #4ab4e2;
|
|
168
|
+
background-color: #4ab4e2;
|
|
169
|
+
color: #fff;
|
|
170
|
+
}
|
|
171
|
+
.stepper-item.current .stepper-item-title {
|
|
172
|
+
color: #818181;
|
|
173
|
+
}
|
|
174
|
+
.stepper-pane {
|
|
175
|
+
color: #333;
|
|
176
|
+
margin: 40px 0;
|
|
177
|
+
}
|
|
178
|
+
.controls {
|
|
179
|
+
display: flex;
|
|
180
|
+
}
|
|
181
|
+
.btn {
|
|
182
|
+
padding: 8px 12px;
|
|
183
|
+
cursor: pointer;
|
|
184
|
+
border: none;
|
|
185
|
+
border-radius: 40px !important;
|
|
186
|
+
font-size: 13px !important;
|
|
187
|
+
font-weight: normal;
|
|
188
|
+
font-style: normal !important;
|
|
189
|
+
letter-spacing: 1px !important;
|
|
190
|
+
background: #577696;
|
|
191
|
+
border-color: #577696;
|
|
192
|
+
color: #fff;
|
|
193
|
+
-webkit-box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 12%);
|
|
194
|
+
-moz-box-shadow: 0px 10px 20px -6px rgba(0, 0, 0, 0.12);
|
|
195
|
+
box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 12%);
|
|
196
|
+
}
|
|
197
|
+
.btn:disabled {
|
|
198
|
+
opacity: 0.5;
|
|
199
|
+
pointer-events: none;
|
|
200
|
+
}
|
|
201
|
+
.btn--green-1 {
|
|
202
|
+
background: #577696;
|
|
203
|
+
border-color: #577696;
|
|
204
|
+
color: #fff;
|
|
205
|
+
margin-left: auto;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.slot-final {
|
|
209
|
+
margin-left: auto;
|
|
210
|
+
}
|
|
211
|
+
</style>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span class="title">
|
|
3
|
+
<span> (</span>
|
|
4
|
+
|
|
5
|
+
<span :style="'font-size:' + fontSize + 'px'" v-if="periodRent.year > 0">
|
|
6
|
+
<span> {{ periodRent.year }}</span>
|
|
7
|
+
<span v-if="periodRent.year == 1"> Ano</span>
|
|
8
|
+
<span v-if="periodRent.year > 1"> Anos</span>
|
|
9
|
+
</span>
|
|
10
|
+
|
|
11
|
+
<span :style="'font-size:' + fontSize + 'px'" v-if="periodRent.month > 0">
|
|
12
|
+
<span> {{ periodRent.month }}</span>
|
|
13
|
+
<span v-if="periodRent.month == 1"> Mês</span>
|
|
14
|
+
<span v-if="periodRent.month > 1"> Meses</span>
|
|
15
|
+
</span>
|
|
16
|
+
|
|
17
|
+
<span :style="'font-size:' + fontSize + 'px'" v-if="periodRent.day > 0">
|
|
18
|
+
<span> {{ periodRent.day }}</span>
|
|
19
|
+
<span v-if="periodRent.day == 1"> Dia</span>
|
|
20
|
+
<span v-if="periodRent.day > 1"> Dias</span>
|
|
21
|
+
</span>
|
|
22
|
+
|
|
23
|
+
<span :style="'font-size:' + fontSize + 'px'" v-if="periodRent.hour > 0">
|
|
24
|
+
<span> {{ periodRent.hour }}</span>
|
|
25
|
+
<span v-if="periodRent.hour == 1"> Hora</span>
|
|
26
|
+
<span v-if="periodRent.hour > 1"> Horas</span>
|
|
27
|
+
</span>
|
|
28
|
+
|
|
29
|
+
<span :style="'font-size:' + fontSize + 'px'" v-if="periodRent.minute > 0">
|
|
30
|
+
<span> {{ periodRent.minute }}</span>
|
|
31
|
+
<span v-if="periodRent.minute == 1"> Minuto</span>
|
|
32
|
+
<span v-if="periodRent.minute > 1"> Minutos</span>
|
|
33
|
+
</span>
|
|
34
|
+
|
|
35
|
+
<span> )</span>
|
|
36
|
+
</span>
|
|
37
|
+
</template>
|
|
38
|
+
<script>
|
|
39
|
+
export default {
|
|
40
|
+
name: "DisplayCalculatePeriod",
|
|
41
|
+
props: {
|
|
42
|
+
periodRent: Object,
|
|
43
|
+
fontSize: {
|
|
44
|
+
type: Number,
|
|
45
|
+
default: 16,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
</script>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<span>
|
|
4
|
+
<slot name="start"></slot>
|
|
5
|
+
</span>
|
|
6
|
+
<span class="title-delivery" v-if="showDeliveryDevolution">{{ periodRent.deliveryDateHour }}
|
|
7
|
+
</span>
|
|
8
|
+
|
|
9
|
+
<span v-show="!showOnlyDeliveryDevolution">
|
|
10
|
+
<span class="title-main" :style="'font-size:' + fontSize + 'px'">{{
|
|
11
|
+
periodRent.startDateHour
|
|
12
|
+
}}</span>
|
|
13
|
+
-
|
|
14
|
+
<span class="title-main" :style="'font-size:' + fontSize + 'px'">{{
|
|
15
|
+
periodRent.endDateHour
|
|
16
|
+
}}</span>
|
|
17
|
+
</span>
|
|
18
|
+
|
|
19
|
+
<span v-show="!showOnlyDeliveryDevolution">
|
|
20
|
+
<DisplayCalculatePeriod :fontSize="fontSize" :periodRent="periodRent" />
|
|
21
|
+
</span>
|
|
22
|
+
|
|
23
|
+
<span class="title-devolution" v-if="showDeliveryDevolution">
|
|
24
|
+
{{ periodRent.devolutionDateHour }}
|
|
25
|
+
</span>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
<script>
|
|
29
|
+
import DisplayCalculatePeriod from "./DisplayCalculatePeriod.vue";
|
|
30
|
+
|
|
31
|
+
export default {
|
|
32
|
+
name: "DisplayPeriodRent",
|
|
33
|
+
props: {
|
|
34
|
+
periodRent: Object,
|
|
35
|
+
showOnlyDeliveryDevolution: Boolean,
|
|
36
|
+
showDeliveryDevolution: Boolean,
|
|
37
|
+
fontSize: {
|
|
38
|
+
type: Number,
|
|
39
|
+
default: 16,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
components: {
|
|
43
|
+
DisplayCalculatePeriod,
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
</script>
|
|
47
|
+
<style scoped>
|
|
48
|
+
.title-delivery {
|
|
49
|
+
color: #009183;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.title-devolution {
|
|
53
|
+
color: #3d4eae;
|
|
54
|
+
}
|
|
55
|
+
</style>
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="main side-by-side">
|
|
3
|
+
<div class="molded-totalization" @click="execute">
|
|
4
|
+
<div class="title">{{ title }}
|
|
5
|
+
<span v-if="discount > 0" class="div-discount">{{ discount }}%</span>
|
|
6
|
+
</div>
|
|
7
|
+
<div class="value" :class="{ clicked: clicked }" v-if="currency" :style="_style">
|
|
8
|
+
{{ value | currency }}
|
|
9
|
+
<span class="icon-edit" v-if="clicked">
|
|
10
|
+
<i class="fa-solid fa-pen-to-square"></i>
|
|
11
|
+
</span>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="value" :class="{ clicked: clicked }" v-else :style="_style">
|
|
14
|
+
{{ value }}
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
<script>
|
|
20
|
+
export default {
|
|
21
|
+
name: "DisplayTotalization",
|
|
22
|
+
props: {
|
|
23
|
+
title: String,
|
|
24
|
+
currency: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: true,
|
|
27
|
+
},
|
|
28
|
+
discount: Number,
|
|
29
|
+
value: Number,
|
|
30
|
+
_style: String,
|
|
31
|
+
clicked: Function,
|
|
32
|
+
},
|
|
33
|
+
methods: {
|
|
34
|
+
execute() {
|
|
35
|
+
if (this.clicked) this.clicked(this.params);
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
</script>
|
|
40
|
+
<style scoped>
|
|
41
|
+
.main {
|
|
42
|
+
margin-bottom: 10px;
|
|
43
|
+
margin-right: 20px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.molded-totalization {
|
|
47
|
+
height: 63px;
|
|
48
|
+
border: 1px solid #dbdfe9;
|
|
49
|
+
border-radius: 30px;
|
|
50
|
+
padding-left: 8px;
|
|
51
|
+
padding-right: 15px;
|
|
52
|
+
margin-bottom: 20px;
|
|
53
|
+
font-size: 13px;
|
|
54
|
+
font-weight: 400;
|
|
55
|
+
min-width: 180px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.title {
|
|
59
|
+
padding-left: 10px;
|
|
60
|
+
font-weight: 500;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.value {
|
|
64
|
+
padding-left: 10px;
|
|
65
|
+
font-size: 18px;
|
|
66
|
+
font-weight: 700;
|
|
67
|
+
font-family: "inter", sans-serif !important;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.clicked:hover {
|
|
71
|
+
cursor: pointer;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.icon-edit {
|
|
75
|
+
font-size: 14px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.div-discount {
|
|
79
|
+
background-color: #FF4843;
|
|
80
|
+
width: 12px;
|
|
81
|
+
border-radius: 10px;
|
|
82
|
+
color: white;
|
|
83
|
+
font-size: 10px !important;
|
|
84
|
+
padding: 3px;
|
|
85
|
+
}
|
|
86
|
+
</style>
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<Button _key="btnFields" color="black" backGroundColor="#F0F0F0" title="Campos"
|
|
4
|
+
classIcon="fa-sharp fa-solid fa-text-size" size="small" :clicked="open" />
|
|
5
|
+
|
|
6
|
+
<Modal title="Campos" :width="600" :height="200" v-if="showModal('fields')">
|
|
7
|
+
<b-row>
|
|
8
|
+
<b-col sm="6">
|
|
9
|
+
<ScrollBar :minHeight="300" :maxHeight="300">
|
|
10
|
+
<div v-for="item in data">
|
|
11
|
+
<b-form-checkbox v-model="item.show" :value="true" :unchecked-value="false">
|
|
12
|
+
<span class="title">{{ item.title }}</span>
|
|
13
|
+
</b-form-checkbox>
|
|
14
|
+
</div>
|
|
15
|
+
</ScrollBar>
|
|
16
|
+
</b-col>
|
|
17
|
+
<b-col sm="6">
|
|
18
|
+
<RadioGroup :options="[
|
|
19
|
+
{ text: 'Crescente', value: 'asc' },
|
|
20
|
+
{ text: 'Decrescente', value: 'desc' },
|
|
21
|
+
]" v-model="ordering" />
|
|
22
|
+
<SelectStatic title="Ordenar" :initialValue="initialValue" fieldTarget="order" :data="options"
|
|
23
|
+
v-model="fieldOrdering" />
|
|
24
|
+
</b-col>
|
|
25
|
+
</b-row>
|
|
26
|
+
|
|
27
|
+
<div class="text-center">
|
|
28
|
+
<Button _key="btnApply" backGroundColor="#017AFF" color="white" title="Aplicar" size="small"
|
|
29
|
+
:clicked="apply" />
|
|
30
|
+
</div>
|
|
31
|
+
</Modal>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script>
|
|
36
|
+
|
|
37
|
+
import Modal from "@nixweb/nixloc-ui/src/component/forms/Modal";
|
|
38
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
39
|
+
import ScrollBar from "@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue";
|
|
40
|
+
import CheckboxSimple from "@nixweb/nixloc-ui/src/component/forms/CheckboxSimple.vue";
|
|
41
|
+
import SelectStatic from "@nixweb/nixloc-ui/src/component/forms/SelectStatic";
|
|
42
|
+
import RadioGroup from "@nixweb/nixloc-ui/src/component/forms/RadioGroup";
|
|
43
|
+
|
|
44
|
+
import { mapState, mapGetters, mapMutations } from "vuex";
|
|
45
|
+
|
|
46
|
+
export default {
|
|
47
|
+
name: "Fields",
|
|
48
|
+
props: ["data", "value"],
|
|
49
|
+
components: {
|
|
50
|
+
Modal,
|
|
51
|
+
Button,
|
|
52
|
+
ScrollBar,
|
|
53
|
+
CheckboxSimple,
|
|
54
|
+
RadioGroup,
|
|
55
|
+
SelectStatic
|
|
56
|
+
},
|
|
57
|
+
data() {
|
|
58
|
+
return {
|
|
59
|
+
initialValue: {},
|
|
60
|
+
ordering: "asc",
|
|
61
|
+
fieldOrdering: {},
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
created() {
|
|
65
|
+
const targetObject = this.data.find(item => item.initialOrderBy === true);
|
|
66
|
+
|
|
67
|
+
this.initialValue = { content: targetObject.title, id: targetObject.fieldOrderBy };
|
|
68
|
+
this.$emit("input", { ordering: this.ordering, field: targetObject.fieldOrderBy });
|
|
69
|
+
},
|
|
70
|
+
computed: {
|
|
71
|
+
...mapGetters("generic", ["showModal"]),
|
|
72
|
+
options() {
|
|
73
|
+
let data = [];
|
|
74
|
+
this.data.forEach(item => {
|
|
75
|
+
var obj = { content: item.title, id: item.fieldOrderBy }
|
|
76
|
+
data.push(obj);
|
|
77
|
+
});
|
|
78
|
+
return data;
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
methods: {
|
|
82
|
+
...mapMutations("generic", ["addEvent", "openModal", "hideModal", "removeLoading"]),
|
|
83
|
+
open() {
|
|
84
|
+
this.openModal("fields");
|
|
85
|
+
this.removeLoading(["btnFields"]);
|
|
86
|
+
},
|
|
87
|
+
apply() {
|
|
88
|
+
this.removeLoading(["btnApply"]);
|
|
89
|
+
this.hideModal();
|
|
90
|
+
this.addEvent({ name: "orderedFilter" });
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
watch: {
|
|
94
|
+
fieldOrdering: {
|
|
95
|
+
handler() {
|
|
96
|
+
this.$emit("input", { ordering: this.ordering, field: this.fieldOrdering.id });
|
|
97
|
+
},
|
|
98
|
+
deep: true,
|
|
99
|
+
},
|
|
100
|
+
ordering: {
|
|
101
|
+
handler() {
|
|
102
|
+
this.$emit("input", { ordering: this.ordering, field: this.fieldOrdering.id });
|
|
103
|
+
},
|
|
104
|
+
deep: true,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
</script>
|