@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,93 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="div-main">
|
|
4
|
+
<br />
|
|
5
|
+
<table class="table table-responsive-xs">
|
|
6
|
+
<thead>
|
|
7
|
+
<tr>
|
|
8
|
+
<th v-for="(obj, ind) in headerTableMap" :key="ind" class="title-header">
|
|
9
|
+
<div class="div-select">
|
|
10
|
+
<SelectStatic :title="obj.title" :data="select" :markFormDirty="false" :initialValue="obj.target"
|
|
11
|
+
v-model="obj.target" />
|
|
12
|
+
</div>
|
|
13
|
+
</th>
|
|
14
|
+
</tr>
|
|
15
|
+
</thead>
|
|
16
|
+
<tbody>
|
|
17
|
+
<tr v-for="(row, index) in data" :key="index">
|
|
18
|
+
<td v-for="(obj, ind) in headerTable" :key="ind">
|
|
19
|
+
<div>{{ row[obj.field] }}</div>
|
|
20
|
+
</td>
|
|
21
|
+
</tr>
|
|
22
|
+
</tbody>
|
|
23
|
+
</table>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script>
|
|
29
|
+
import SelectStatic from "@nixweb/nixloc-ui/src/component/forms/SelectStatic";
|
|
30
|
+
|
|
31
|
+
export default {
|
|
32
|
+
components: {
|
|
33
|
+
SelectStatic,
|
|
34
|
+
},
|
|
35
|
+
props: {
|
|
36
|
+
select: Array,
|
|
37
|
+
headerTable: Array,
|
|
38
|
+
data: Array,
|
|
39
|
+
},
|
|
40
|
+
name: "TableImport",
|
|
41
|
+
data() {
|
|
42
|
+
return {};
|
|
43
|
+
},
|
|
44
|
+
computed: {
|
|
45
|
+
headerTableMap() {
|
|
46
|
+
var i = 0;
|
|
47
|
+
this.headerTable.forEach((item) => {
|
|
48
|
+
item.target = this.select[i];
|
|
49
|
+
i++;
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
return this.headerTable;
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
methods: {},
|
|
56
|
+
};
|
|
57
|
+
</script>
|
|
58
|
+
<style scoped>
|
|
59
|
+
.div-main {
|
|
60
|
+
overflow: auto;
|
|
61
|
+
white-space: nowrap;
|
|
62
|
+
min-height: 450px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.table th,
|
|
66
|
+
.table td {
|
|
67
|
+
height: 10px !important;
|
|
68
|
+
padding-left: 5px !important;
|
|
69
|
+
padding-top: 7px !important;
|
|
70
|
+
padding-bottom: 5px !important;
|
|
71
|
+
padding-right: 5px !important;
|
|
72
|
+
padding-left: 10px !important;
|
|
73
|
+
border-bottom: 0px !important;
|
|
74
|
+
width: 200px !important;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.title-header {
|
|
78
|
+
font-size: 14px;
|
|
79
|
+
color: #757d8c;
|
|
80
|
+
font-weight: 400;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.tabela-description {
|
|
84
|
+
white-space: nowrap;
|
|
85
|
+
overflow: hidden;
|
|
86
|
+
text-overflow: ellipsis;
|
|
87
|
+
max-width: 200px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.div-select {
|
|
91
|
+
width: 310px;
|
|
92
|
+
}
|
|
93
|
+
</style>
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div v-if="obj.type === 'period-rent'" class="period-rent" @click="navegateTo(obj, row)" :style="obj.styleBody"
|
|
4
|
+
:class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
|
|
5
|
+
<DisplayPeriodRent :periodRent="row[obj.field]" :fontSize="14" :showDeliveryDevolution="true" />
|
|
6
|
+
</div>
|
|
7
|
+
<div v-if="obj.type === 'text'" :style="obj.styleBody"
|
|
8
|
+
:class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
|
|
9
|
+
{{ row[obj.field] }}
|
|
10
|
+
<div>{{ row[obj.fieldSecond] }}</div>
|
|
11
|
+
</div>
|
|
12
|
+
<div v-if="obj.type === 'image'" :style="obj.styleBody">
|
|
13
|
+
<img :class="convertClass(row[obj.fieldComparison], obj.classCssBody)" class="img"
|
|
14
|
+
:src="urlImage + obj.container + '/' + row[obj.field]" />
|
|
15
|
+
</div>
|
|
16
|
+
<div v-if="obj.type === 'class'" class="text-center">
|
|
17
|
+
<div :class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
|
|
18
|
+
{{ row[obj.field] }}
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<div v-if="obj.type === 'html'" :style="obj.styleBody"
|
|
22
|
+
:class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
|
|
23
|
+
<div v-if="row[obj.field]" v-html="row[obj.field]"></div>
|
|
24
|
+
<div v-else v-html="obj.html"></div>
|
|
25
|
+
</div>
|
|
26
|
+
<div v-if="obj.type === 'select'" :style="obj.styleBody"
|
|
27
|
+
:class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
|
|
28
|
+
{{ row[obj.field].content }}
|
|
29
|
+
</div>
|
|
30
|
+
<div v-if="obj.type === 'date'" :style="obj.styleBody"
|
|
31
|
+
:class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
|
|
32
|
+
{{ row[obj.field] | moment("DD/MM/YYYY") }}
|
|
33
|
+
</div>
|
|
34
|
+
<div v-if="obj.type === 'dateTime'" :style="obj.styleBody"
|
|
35
|
+
:class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
|
|
36
|
+
{{ row[obj.field] | moment("DD/MM/YYYY HH:mm") }}
|
|
37
|
+
</div>
|
|
38
|
+
<div v-if="obj.type === 'currency'" :style="obj.styleBody"
|
|
39
|
+
:class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
|
|
40
|
+
{{ row[obj.field] | currency }}
|
|
41
|
+
</div>
|
|
42
|
+
<div class="hide-print" v-if="obj.type === 'button'" :style="obj.styleBody"
|
|
43
|
+
:class="convertClass(row[obj.fieldComparison], obj.classCssBody)">
|
|
44
|
+
<TableButton v-if="obj.ifFieldEqual == row[obj.field]" :obj="obj" :row="row" />
|
|
45
|
+
</div>
|
|
46
|
+
<div v-if="obj.type === 'link'" :style="obj.styleBody"
|
|
47
|
+
:class="convertClass(row[obj.fieldComparison], obj.classCssBody)" @click="navegateTo(obj, row)">
|
|
48
|
+
<div class="div-progress" v-if="idSelected == row.id">
|
|
49
|
+
<ProgressBar bgColor="orange" bColor="#CCCCCC" size="4" :value="loadingProgress" :max="100" />
|
|
50
|
+
</div>
|
|
51
|
+
<div class="link" v-else>
|
|
52
|
+
<span> {{ row[obj.field] }}</span>
|
|
53
|
+
<div class="field-second">{{ row[obj.fieldSecond] }}</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</template>
|
|
58
|
+
<script>
|
|
59
|
+
import TableButton from "@nixweb/nixloc-ui/src/component/shared/TableButton.vue";
|
|
60
|
+
import DisplayPeriodRent from "@nixweb/nixloc-ui/src/component/rental/DisplayPeriodRent";
|
|
61
|
+
import ProgressBar from "@nixweb/nixloc-ui/src/component/shared/ProgressBar";
|
|
62
|
+
|
|
63
|
+
import { mapMutations } from "vuex";
|
|
64
|
+
|
|
65
|
+
export default {
|
|
66
|
+
name: "TableItem",
|
|
67
|
+
components: { TableButton, DisplayPeriodRent, ProgressBar },
|
|
68
|
+
props: {
|
|
69
|
+
obj: Object,
|
|
70
|
+
row: Object,
|
|
71
|
+
},
|
|
72
|
+
data() {
|
|
73
|
+
return {
|
|
74
|
+
idSelected: "",
|
|
75
|
+
loadingProgress: 0,
|
|
76
|
+
};
|
|
77
|
+
},
|
|
78
|
+
computed: {
|
|
79
|
+
urlImage() {
|
|
80
|
+
return "https://espaco.blob.core.windows.net/";
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
methods: {
|
|
84
|
+
...mapMutations("generic", ["addSelected", "addEvent"]),
|
|
85
|
+
convertClass(fieldComparison, classCssBody) {
|
|
86
|
+
if (Array.isArray(classCssBody)) {
|
|
87
|
+
let ret = [];
|
|
88
|
+
classCssBody.forEach(function (value) {
|
|
89
|
+
let classCss = value.classCss;
|
|
90
|
+
let condition = value.fieldComparison == fieldComparison;
|
|
91
|
+
let obj = { [classCss]: condition };
|
|
92
|
+
ret.push(obj);
|
|
93
|
+
});
|
|
94
|
+
return ret;
|
|
95
|
+
} else {
|
|
96
|
+
return classCssBody;
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
isVisible(conditionVisibility, row) {
|
|
100
|
+
// se for undefined, quer dizer que não tem condicional, então pode mostrar
|
|
101
|
+
// if (conditionVisibility == undefined) return true;
|
|
102
|
+
|
|
103
|
+
return eval(conditionVisibility);
|
|
104
|
+
},
|
|
105
|
+
navegateTo(obj, row) {
|
|
106
|
+
this.idSelected = row.id;
|
|
107
|
+
this.startLoading(obj, row);
|
|
108
|
+
},
|
|
109
|
+
startLoading(obj, row) {
|
|
110
|
+
let self = this;
|
|
111
|
+
const interval = setInterval(() => {
|
|
112
|
+
if (self.loadingProgress < 100) {
|
|
113
|
+
self.loadingProgress += 10;
|
|
114
|
+
} else {
|
|
115
|
+
clearInterval(interval);
|
|
116
|
+
}
|
|
117
|
+
}, 50);
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
watch: {
|
|
121
|
+
loadingProgress: {
|
|
122
|
+
handler(loadingProgress) {
|
|
123
|
+
if (loadingProgress == 100) {
|
|
124
|
+
if (this.obj.routeName) {
|
|
125
|
+
this.$router.push({
|
|
126
|
+
name: this.obj.routeName,
|
|
127
|
+
params: { id: this.row.id, type: this.row.type },
|
|
128
|
+
});
|
|
129
|
+
} else {
|
|
130
|
+
this.addEvent({
|
|
131
|
+
name: this.obj.eventName,
|
|
132
|
+
data: this.row,
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
let self = this;
|
|
136
|
+
setTimeout(function () {
|
|
137
|
+
self.idSelected = "";
|
|
138
|
+
}, 200);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
deep: true,
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
</script>
|
|
147
|
+
<style scoped>
|
|
148
|
+
.field-second {
|
|
149
|
+
color: rgb(83, 82, 82);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.table-currency {
|
|
153
|
+
font-size: 14px;
|
|
154
|
+
min-width: 100px;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.link {
|
|
158
|
+
color: #3f529b;
|
|
159
|
+
font-size: 14px;
|
|
160
|
+
font-weight: 400;
|
|
161
|
+
cursor: pointer;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.link:hover {
|
|
165
|
+
text-decoration: underline;
|
|
166
|
+
transition: 0.1s;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.icon-link:hover {
|
|
170
|
+
font-size: 12.5px;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.center-vertical {
|
|
174
|
+
padding-top: 5px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.center-vertical-bank {
|
|
178
|
+
padding-top: 6px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.badge-center {
|
|
182
|
+
margin: auto !important;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.img {
|
|
186
|
+
width: 50px;
|
|
187
|
+
height: 50px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.img-round {
|
|
191
|
+
border-radius: 30px;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.img-bank {
|
|
195
|
+
width: 30px;
|
|
196
|
+
height: 30px;
|
|
197
|
+
border-radius: 10px;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.img-user {
|
|
201
|
+
width: 40px;
|
|
202
|
+
height: 40px;
|
|
203
|
+
border-radius: 20px;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.period-rent {
|
|
207
|
+
cursor: pointer;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.div-progress {
|
|
211
|
+
margin-top: 11px;
|
|
212
|
+
width: 200px;
|
|
213
|
+
}
|
|
214
|
+
</style>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="filter-horizontal">
|
|
3
|
+
<div class="side-by-side div-title">
|
|
4
|
+
<span class="title-page"> Mostrar</span>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="side-by-side div-select">
|
|
7
|
+
<SelectStatic fieldTarget="totalPerPage" :initialValue="initialValue" :data="[
|
|
8
|
+
{ content: '10', id: 10 },
|
|
9
|
+
{ content: '20', id: 20 },
|
|
10
|
+
{ content: '50', id: 50 },
|
|
11
|
+
{ content: '100', id: 100 },
|
|
12
|
+
]" v-model="totalPerPage" />
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script>
|
|
19
|
+
import SelectStatic from "../forms/SelectStatic.vue";
|
|
20
|
+
|
|
21
|
+
import { mapMutations, mapState } from "vuex";
|
|
22
|
+
|
|
23
|
+
export default {
|
|
24
|
+
name: "TableTotalPerPage",
|
|
25
|
+
components: { SelectStatic },
|
|
26
|
+
props: {
|
|
27
|
+
showTotalPerPage: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: true,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
data() {
|
|
33
|
+
return {
|
|
34
|
+
initialValue: {}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
created() {
|
|
38
|
+
this.initialValue = { content: this.paginations.totalPerPage, id: this.paginations.totalPerPage }
|
|
39
|
+
},
|
|
40
|
+
computed: {
|
|
41
|
+
...mapState("generic", ["paginations"]),
|
|
42
|
+
totalPerPage: {
|
|
43
|
+
get() {
|
|
44
|
+
return this.$store.state.generic.paginations.totalPerPage;
|
|
45
|
+
},
|
|
46
|
+
set(value) {
|
|
47
|
+
this.updateTotalPerPage(value);
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
methods: {
|
|
52
|
+
...mapMutations("generic", [
|
|
53
|
+
"updateTotalPerPage",
|
|
54
|
+
]),
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<style scoped>
|
|
60
|
+
.filter-horizontal {
|
|
61
|
+
display: flex;
|
|
62
|
+
justify-content: flex-end;
|
|
63
|
+
margin-bottom: -30px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.div-title {
|
|
67
|
+
margin-right: 20px;
|
|
68
|
+
margin-top: 35px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.div-select {
|
|
72
|
+
width: 100px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.title-page {
|
|
76
|
+
font-size: 13px;
|
|
77
|
+
}
|
|
78
|
+
</style>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="row c-div-total">
|
|
3
|
+
<div class="col-sm-12 text-right">
|
|
4
|
+
<span class="c-title">
|
|
5
|
+
Total de
|
|
6
|
+
<div class="badge">
|
|
7
|
+
<span class="total-records">{{ totalRecords }}</span>
|
|
8
|
+
</div>
|
|
9
|
+
<span class="records">registro(s)</span>
|
|
10
|
+
</span>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
export default {
|
|
17
|
+
name: "TableTotalRecords",
|
|
18
|
+
props: {
|
|
19
|
+
totalRecords: {
|
|
20
|
+
type: Number,
|
|
21
|
+
default: 0,
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<style scoped>
|
|
28
|
+
.c-div-total {
|
|
29
|
+
padding-bottom: 10px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.c-title {
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.total-records {
|
|
37
|
+
font-size: 16px;
|
|
38
|
+
font-weight: 600;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.records {
|
|
42
|
+
margin-left: 5px;
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div
|
|
4
|
+
class="badge-side-by-side text-center"
|
|
5
|
+
v-for="item in totalization"
|
|
6
|
+
:key="item.title"
|
|
7
|
+
>
|
|
8
|
+
<div class="badge-totalization" :class="item.classCss">
|
|
9
|
+
<span>{{ item.title }} </span>
|
|
10
|
+
<span>{{ item.value | currency }}</span>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
export default {
|
|
18
|
+
name: "TableTotalization",
|
|
19
|
+
props: {
|
|
20
|
+
totalization: Array,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<style scoped>
|
|
26
|
+
.badge-side-by-side {
|
|
27
|
+
display: inline-block;
|
|
28
|
+
margin-right: 3px;
|
|
29
|
+
margin-bottom: 10px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.badge-totalization {
|
|
33
|
+
border: 1px solid #dbdee0;
|
|
34
|
+
padding-left: 5px;
|
|
35
|
+
padding-right: 5px;
|
|
36
|
+
border-radius: 30px;
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.revenue {
|
|
41
|
+
color: darkblue;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.expense {
|
|
45
|
+
color: red;
|
|
46
|
+
}
|
|
47
|
+
</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<Loading :center="false" v-if="loading" />
|
|
4
|
+
<div v-else>
|
|
5
|
+
<ScrollBar :minHeight="200" :maxHeight="300">
|
|
6
|
+
<Timeline dateLocale="pt-BR" order="desc" :uniqueTimeline="true" :timeline-items="timelineItems"
|
|
7
|
+
message-when-no-items="Nenhum registro encontrado!" />
|
|
8
|
+
</ScrollBar>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
<script>
|
|
13
|
+
import Loading from "@nixweb/nixloc-ui/src/component/shared/Loading.vue";
|
|
14
|
+
import ScrollBar from "@nixweb/nixloc-ui/src/component/layout/ScrollBar.vue";
|
|
15
|
+
import Timeline from "timeline-vuejs";
|
|
16
|
+
|
|
17
|
+
import { mapGetters, mapActions } from "vuex";
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
name: "TimeLine",
|
|
21
|
+
props: {
|
|
22
|
+
loading: Boolean,
|
|
23
|
+
timelineItems: Array,
|
|
24
|
+
},
|
|
25
|
+
components: {
|
|
26
|
+
Loading,
|
|
27
|
+
Timeline,
|
|
28
|
+
ScrollBar,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
</script>
|
|
32
|
+
<style>
|
|
33
|
+
.timeline {
|
|
34
|
+
max-width: 1000px !important;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.timeline-item .date-item {
|
|
38
|
+
font-size: 14px !important;
|
|
39
|
+
letter-spacing: 1px !important;
|
|
40
|
+
font-weight: normal !important;
|
|
41
|
+
}
|
|
42
|
+
</style>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<span v-if="play" class="pause" @click="play = false">
|
|
4
|
+
<i class="fa-solid fa-pause"></i>
|
|
5
|
+
</span>
|
|
6
|
+
<span v-else class="play" @click="play = true">
|
|
7
|
+
<i class="fa-solid fa-play"></i>
|
|
8
|
+
</span>
|
|
9
|
+
<span class="title"> {{ title }}</span>
|
|
10
|
+
<span class="title timer">
|
|
11
|
+
{{ time }}
|
|
12
|
+
</span>
|
|
13
|
+
<span class="title"> segundos...</span>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
<script>
|
|
17
|
+
export default {
|
|
18
|
+
name: "Timer",
|
|
19
|
+
props: {
|
|
20
|
+
initialTimer: {
|
|
21
|
+
type: Number,
|
|
22
|
+
default: 10,
|
|
23
|
+
},
|
|
24
|
+
title: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: "Atualizado em",
|
|
27
|
+
},
|
|
28
|
+
endTime: Function,
|
|
29
|
+
},
|
|
30
|
+
data() {
|
|
31
|
+
return {
|
|
32
|
+
time: 10,
|
|
33
|
+
play: true,
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
created() {
|
|
37
|
+
this.time = this.initialTimer;
|
|
38
|
+
this.start();
|
|
39
|
+
},
|
|
40
|
+
methods: {
|
|
41
|
+
start() {
|
|
42
|
+
this.$options.interval = setInterval(this.decrement, 1000);
|
|
43
|
+
},
|
|
44
|
+
stop() {
|
|
45
|
+
clearInterval(this.$options.interval);
|
|
46
|
+
},
|
|
47
|
+
decrement() {
|
|
48
|
+
if (this.play) this.time--;
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
watch: {
|
|
52
|
+
time() {
|
|
53
|
+
if (this.time == 0) {
|
|
54
|
+
this.time = this.initialTimer;
|
|
55
|
+
clearInterval(this.$options.interval);
|
|
56
|
+
if (this.endTime) this.endTime();
|
|
57
|
+
this.start();
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
</script>
|
|
63
|
+
<style scoped>
|
|
64
|
+
.timer {
|
|
65
|
+
font-size: 15px;
|
|
66
|
+
font-weight: bold;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.play {
|
|
70
|
+
color: darkblue;
|
|
71
|
+
cursor: pointer;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.pause {
|
|
75
|
+
color: red;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
}
|
|
78
|
+
</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span class="tip" v-if="title">
|
|
3
|
+
<i
|
|
4
|
+
class="fal fa-exclamation-circle"
|
|
5
|
+
:title="title"
|
|
6
|
+
v-b-popover.hover.top="description"
|
|
7
|
+
></i>
|
|
8
|
+
</span>
|
|
9
|
+
</template>
|
|
10
|
+
<script>
|
|
11
|
+
import { mapGetters } from "vuex";
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
name: "Tip",
|
|
15
|
+
props: {
|
|
16
|
+
field: String,
|
|
17
|
+
formName: String,
|
|
18
|
+
},
|
|
19
|
+
data() {
|
|
20
|
+
return {
|
|
21
|
+
title: "",
|
|
22
|
+
description: "",
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
mounted() {
|
|
26
|
+
let tip = this.tip({ field: this.field, formName: this.formName });
|
|
27
|
+
if (tip) {
|
|
28
|
+
this.title = tip.title;
|
|
29
|
+
this.description = tip.description;
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
computed: {
|
|
33
|
+
...mapGetters("generic", ["tip"]),
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<style scoped>
|
|
39
|
+
.tip {
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
}
|
|
42
|
+
</style>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<template></template>
|
|
2
|
+
|
|
3
|
+
<script>
|
|
4
|
+
import { mapState } from "vuex";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
name: "Notificacao",
|
|
8
|
+
computed: {
|
|
9
|
+
...mapState("generic", ["toast"]),
|
|
10
|
+
},
|
|
11
|
+
watch: {
|
|
12
|
+
toast: {
|
|
13
|
+
handler(value) {
|
|
14
|
+
this.notifica(value);
|
|
15
|
+
},
|
|
16
|
+
deep: true,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
methods: {
|
|
20
|
+
notifica(value) {
|
|
21
|
+
if (value.type == "postApi" || value.type == "putApi")
|
|
22
|
+
this.$toasted.show("Salvo com sucesso", {
|
|
23
|
+
type: "success",
|
|
24
|
+
});
|
|
25
|
+
if (value.type == "postApiError" || value.type == "putApiErro") {
|
|
26
|
+
this.$toasted.show("Não foi possível adicionar/modificar", {
|
|
27
|
+
type: "error",
|
|
28
|
+
});
|
|
29
|
+
this.voltarParaTopo();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (value.type == "removerTodosApiSucesso")
|
|
33
|
+
this.$toasted.show("Removido com sucesso", {
|
|
34
|
+
type: "success",
|
|
35
|
+
});
|
|
36
|
+
if (value.type == "removerTodosApiErro") {
|
|
37
|
+
this.$toasted.show("Não foi possível remover", {
|
|
38
|
+
type: "error",
|
|
39
|
+
});
|
|
40
|
+
this.voltarParaTopo();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (value.type == "noPermission") {
|
|
44
|
+
this.$toasted.show("Usuário sem permissão", {
|
|
45
|
+
type: "error",
|
|
46
|
+
});
|
|
47
|
+
this.voltarParaTopo();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (value.type == "falhaGenerica") {
|
|
51
|
+
this.$toasted.show("Ops! Falha de servidor", {
|
|
52
|
+
type: "error",
|
|
53
|
+
});
|
|
54
|
+
this.voltarParaTopo();
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (value.type == "messageError") {
|
|
58
|
+
this.$toasted.show("Ops! Algo deu errado", {
|
|
59
|
+
type: "error",
|
|
60
|
+
});
|
|
61
|
+
this.voltarParaTopo();
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
voltarParaTopo() {
|
|
65
|
+
window.scrollTo(0, 0);
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
</script>
|