@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.
- package/package.json +9 -1
- package/src/component/forms/Button.vue +3 -2
- package/src/component/forms/ButtonGroup.vue +57 -0
- package/src/component/forms/ButtonSub.vue +98 -0
- package/src/component/forms/CheckboxGroup.vue +7 -0
- package/src/component/forms/CheckboxSimple.vue +5 -1
- package/src/component/forms/DateTime.vue +5 -1
- package/src/component/forms/Dropdown.vue +48 -30
- package/src/component/forms/ImageUpload.vue +12 -4
- package/src/component/forms/IncrementDecrement.vue +106 -0
- package/src/component/forms/InputDecimal.vue +17 -5
- package/src/component/forms/InputDecimalDiscount.vue +92 -0
- package/src/component/forms/InputNumber.vue +6 -0
- package/src/component/forms/InputText.vue +19 -2
- package/src/component/forms/InputTextEdit.vue +68 -0
- package/src/component/forms/RadioGroup.vue +2 -2
- package/src/component/forms/Select.vue +14 -3
- package/src/component/forms/Toggle.vue +3 -1
- package/src/component/layout/Account.vue +3 -3
- package/src/component/layout/Badge.vue +6 -5
- package/src/component/layout/FixedBar.vue +39 -7
- package/src/component/layout/Gantt.vue +130 -0
- package/src/component/layout/Header.vue +3 -0
- package/src/component/layout/IconMolded.vue +48 -0
- package/src/component/layout/Menu.vue +12 -14
- package/src/component/layout/Molded.vue +4 -3
- package/src/component/layout/Panel.vue +2 -2
- package/src/component/layout/Tab.vue +135 -0
- package/src/component/rental/DisplayCalculatePeriod.vue +49 -0
- package/src/component/rental/DisplayPeriodRent.vue +56 -0
- package/src/component/rental/DisplayTotalization.vue +56 -0
- package/src/component/shared/Confirmation.vue +21 -2
- package/src/component/shared/DocumentPreview.vue +3 -2
- package/src/component/shared/DocumentPublic.vue +34 -0
- package/src/component/shared/FullCalendar.vue +159 -0
- package/src/component/shared/HeaderReport.vue +1 -1
- package/src/component/shared/{BodyReport.vue → Report.vue} +8 -7
- package/src/component/shared/SaveCancel.vue +8 -2
- package/src/component/shared/Search.vue +1 -1
- package/src/component/shared/SelectOption.vue +18 -9
- package/src/component/shared/Table.vue +32 -123
- package/src/component/shared/TableDraggable.vue +127 -0
- package/src/component/shared/TableItem.vue +177 -0
- package/src/component/shared/TimeLine.vue +47 -0
- package/src/component/shared/TotalizationReport.vue +59 -0
- package/src/component/shared/query-builder/ConvertToOdata.js +3 -9
- package/src/component/shared/query-builder/DynamicComponent.vue +5 -1
- package/src/component/shared/query-builder/DynamicComponentList.vue +20 -9
- package/src/component/template/ListViewWithDataHandler.vue +26 -4
- package/src/component/template/ReportCreateUpdate.vue +9 -2
- package/src/component/template/ViewTemplateConfiguration.vue +1 -0
- package/src/component/template/ViewTemplateDocumentView.vue +1 -0
- package/src/component/template/ViewTemplateReportList.vue +1 -1
- package/src/component/template/ViewTemplateReportPreview.vue +55 -12
- package/src/component/value-objects/Contact.vue +7 -0
- package/src/component/value-objects/Person.vue +15 -0
- package/src/store/modules/generic.js +124 -75
- package/src/store/modules/report.js +37 -19
- package/src/store/modules/user.js +6 -0
- package/src/component/shared/query-builder/Totalization.vue +0 -38
|
@@ -71,79 +71,87 @@ export default {
|
|
|
71
71
|
let documentHtml = state.documentHtml
|
|
72
72
|
let ret = documentHtml;
|
|
73
73
|
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
74
|
+
var template = document.getElementById("template");
|
|
75
|
+
|
|
76
|
+
if (template != null) {
|
|
77
|
+
var tables = template.getElementsByTagName("table");
|
|
78
|
+
let total = tables.length;
|
|
79
|
+
let config = [];
|
|
80
|
+
|
|
81
|
+
let index = 0;
|
|
82
|
+
while (index <= total - 1) {
|
|
83
|
+
|
|
84
|
+
let table = template.getElementsByTagName("table")[index];
|
|
85
|
+
let th = table.getElementsByTagName("th")[0];
|
|
86
|
+
|
|
87
|
+
let obj = {
|
|
88
|
+
vForGrouped: "",
|
|
89
|
+
vForSimple: "",
|
|
90
|
+
nameGroup: "",
|
|
91
|
+
nameGroupReplace: ""
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
if (th) {
|
|
95
|
+
|
|
96
|
+
let isGrouped = th.innerText.includes("n.grupo");
|
|
97
|
+
let isProduct = th.innerText.includes("p.pLoc");
|
|
98
|
+
let isPeriod = th.innerText.includes("n.periodo");
|
|
99
|
+
let isPayment = th.innerText.includes("n.pagamento");
|
|
100
|
+
let isMoviment = th.innerText.includes("p.pMoviment");
|
|
101
|
+
|
|
102
|
+
if (isProduct) {
|
|
103
|
+
obj.vForSimple = "v-for='p in d.pLoc'";
|
|
104
|
+
config.push(obj);
|
|
105
|
+
} else if (isPeriod) {
|
|
106
|
+
obj.vForSimple = "v-for='pe in d.periodo'";
|
|
107
|
+
config.push(obj);
|
|
108
|
+
} else if (isPayment) {
|
|
109
|
+
obj.vForSimple = "v-for='pg in d.pagamento'";
|
|
110
|
+
config.push(obj);
|
|
111
|
+
} else if (isGrouped) {
|
|
112
|
+
obj.vForGrouped = "v-for='(produto, grN) in produtoAgrupado'";
|
|
113
|
+
obj.vForSimple = "v-for='p in d.pLoc'";
|
|
114
|
+
|
|
115
|
+
var initIndex = documentHtml.split("<tbody>", index + 1).join("<tbody>").length;
|
|
116
|
+
var lastIndex = documentHtml.split("</tbody>", index + 1).join("</tbody>").length;
|
|
117
|
+
|
|
118
|
+
let tbody = documentHtml.substring(documentHtml.indexOf("<tbody>", initIndex), documentHtml.lastIndexOf("</tbody>", lastIndex));
|
|
119
|
+
|
|
120
|
+
let tr = tbody.substring(tbody.indexOf("<tr>"), tbody.lastIndexOf("</tr>"));
|
|
121
|
+
|
|
122
|
+
obj.nameGroup = tr.substring(0, tr.indexOf('</tr>')) + "</tr>";
|
|
123
|
+
obj.nameGroup = obj.nameGroup.replaceAll("\"", "'");
|
|
124
|
+
obj.nameGroupReplace = obj.nameGroup.replace("<tr>", "").replace("</tr>", "");
|
|
125
|
+
config.push(obj);
|
|
126
|
+
|
|
127
|
+
} else if (isMoviment) {
|
|
128
|
+
obj.vForSimple = "v-for='pM in d.pMoviment'";
|
|
129
|
+
config.push(obj);
|
|
130
|
+
} else {
|
|
131
|
+
config.push(obj);
|
|
132
|
+
}
|
|
123
133
|
} else {
|
|
124
134
|
config.push(obj);
|
|
125
135
|
}
|
|
126
|
-
|
|
127
|
-
config.push(obj);
|
|
136
|
+
index++;
|
|
128
137
|
}
|
|
129
|
-
index++;
|
|
130
|
-
}
|
|
131
138
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
var retParse = ret.replaceAll("\"", "'");
|
|
138
|
-
retParse = eval(`ret${replace}`);
|
|
139
|
+
let replace = "";
|
|
140
|
+
config.forEach(x => {
|
|
141
|
+
replace += `.replace("<tbody>${x.nameGroup}<tr>", "<tbody ${x.vForGrouped}>${x.nameGroupReplace}<tr ${x.vForSimple}>")`;
|
|
142
|
+
});
|
|
139
143
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
.replaceAll("n.produto", "")
|
|
143
|
-
.replaceAll("n.periodo", "")
|
|
144
|
-
.replaceAll("n.pagamento", "")
|
|
145
|
-
.replaceAll("<p> !important;</p>", "<p> </p>");
|
|
144
|
+
var retParse = ret.replaceAll("\"", "'");
|
|
145
|
+
retParse = eval(`ret${replace}`);
|
|
146
146
|
|
|
147
|
+
var classImportant = retParse
|
|
148
|
+
.replaceAll("n.grupo", "")
|
|
149
|
+
.replaceAll("p.pLoc", "")
|
|
150
|
+
.replaceAll("p.pMoviment", "")
|
|
151
|
+
.replaceAll("n.periodo", "")
|
|
152
|
+
.replaceAll("n.pagamento", "")
|
|
153
|
+
.replaceAll("<p> !important;</p>", "<p> </p>");
|
|
154
|
+
}
|
|
147
155
|
return classImportant;
|
|
148
156
|
},
|
|
149
157
|
groupBy: () => (obj) => {
|
|
@@ -190,10 +198,14 @@ export default {
|
|
|
190
198
|
state.toast.type = action;
|
|
191
199
|
},
|
|
192
200
|
addMethodExecutedApi: (state, action) => {
|
|
193
|
-
|
|
201
|
+
setTimeout(function () {
|
|
202
|
+
state.methodExecutedApi = action;
|
|
203
|
+
}, 100);
|
|
194
204
|
},
|
|
195
205
|
cleanMethodExecutedApi: (state) => {
|
|
196
|
-
|
|
206
|
+
setTimeout(function () {
|
|
207
|
+
state.methodExecutedApi = "";
|
|
208
|
+
}, 100);
|
|
197
209
|
},
|
|
198
210
|
addLoading: (state, key) => {
|
|
199
211
|
state.loading.push(key);
|
|
@@ -219,9 +231,11 @@ export default {
|
|
|
219
231
|
state.documentHtml = value;
|
|
220
232
|
},
|
|
221
233
|
addEvent: (state, obj) => {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
234
|
+
setTimeout(function () {
|
|
235
|
+
state.event.dateTime = new Date();
|
|
236
|
+
state.event.name = obj.name;
|
|
237
|
+
state.event.data = obj.data;
|
|
238
|
+
}, 100);
|
|
225
239
|
},
|
|
226
240
|
removeEvent: (state) => {
|
|
227
241
|
state.event = {};
|
|
@@ -255,7 +269,7 @@ export default {
|
|
|
255
269
|
headers: new Token().tokenHeaders(),
|
|
256
270
|
})
|
|
257
271
|
.then((response) => {
|
|
258
|
-
|
|
272
|
+
|
|
259
273
|
if (response.data.success) {
|
|
260
274
|
context.commit('addMethodExecutedApi', 'postApi');
|
|
261
275
|
|
|
@@ -263,7 +277,10 @@ export default {
|
|
|
263
277
|
context.commit('addToast', 'postApi');
|
|
264
278
|
|
|
265
279
|
context.commit('removeNotificarions');
|
|
266
|
-
|
|
280
|
+
|
|
281
|
+
if (!params.notRemoveFormDirty)
|
|
282
|
+
context.commit('validation/removeFormDirty', null, { root: true });
|
|
283
|
+
|
|
267
284
|
return response.data;
|
|
268
285
|
} else {
|
|
269
286
|
|
|
@@ -273,8 +290,6 @@ export default {
|
|
|
273
290
|
}
|
|
274
291
|
}, (err) => {
|
|
275
292
|
|
|
276
|
-
console.log(err);
|
|
277
|
-
|
|
278
293
|
if (err.response)
|
|
279
294
|
if (err.response.status === 403)
|
|
280
295
|
context.commit('addNotifications', [{ message: "Usuário sem permissão para adicionar!" }])
|
|
@@ -336,6 +351,17 @@ export default {
|
|
|
336
351
|
return false;
|
|
337
352
|
})
|
|
338
353
|
},
|
|
354
|
+
orderAllApi: async function (context, params) {
|
|
355
|
+
return axios.put(params.url, params.obj, {
|
|
356
|
+
headers: new Token().tokenHeaders(),
|
|
357
|
+
})
|
|
358
|
+
.then((response) => {
|
|
359
|
+
return response.data;
|
|
360
|
+
}, (err) => {
|
|
361
|
+
context.commit('addNotificationErrorApi');
|
|
362
|
+
return false;
|
|
363
|
+
})
|
|
364
|
+
},
|
|
339
365
|
getApiOdata: async function (context, params) {
|
|
340
366
|
return axios.get(params.url, {
|
|
341
367
|
headers: new Token().tokenHeaders(),
|
|
@@ -491,5 +517,28 @@ export default {
|
|
|
491
517
|
return false;
|
|
492
518
|
})
|
|
493
519
|
},
|
|
520
|
+
getDocumentApi: async function (context, params) {
|
|
521
|
+
console.log(params.obj);
|
|
522
|
+
context.commit('cleanMethodExecutedApi');
|
|
523
|
+
return axios.get(params.url, {
|
|
524
|
+
params: params.obj,
|
|
525
|
+
headers: {
|
|
526
|
+
"Content-Type": "application/json",
|
|
527
|
+
Authorization: "Bearer " + params.obj.token
|
|
528
|
+
},
|
|
529
|
+
})
|
|
530
|
+
.then((response) => {
|
|
531
|
+
if (response.data.success) {
|
|
532
|
+
|
|
533
|
+
return response.data;
|
|
534
|
+
} else {
|
|
535
|
+
|
|
536
|
+
return response.data;
|
|
537
|
+
}
|
|
538
|
+
}, (err) => {
|
|
539
|
+
|
|
540
|
+
return false;
|
|
541
|
+
})
|
|
542
|
+
},
|
|
494
543
|
}
|
|
495
544
|
}
|
|
@@ -85,14 +85,17 @@ export default {
|
|
|
85
85
|
let totalization = "";
|
|
86
86
|
let indexQuery = 0;
|
|
87
87
|
let indexTotalization = 0;
|
|
88
|
-
var
|
|
88
|
+
var sizeFields = state.finalQueryFormatOData.fields.length;
|
|
89
|
+
var sizeTotalization = state.finalQueryFormatOData.totalization.length;
|
|
89
90
|
var andOr = [];
|
|
90
91
|
|
|
92
|
+
|
|
91
93
|
state.finalQueryFormatOData.fields.forEach(function (rule) {
|
|
94
|
+
|
|
92
95
|
if (rule.type == "field") {
|
|
93
|
-
if (indexQuery == 0 &&
|
|
96
|
+
if (indexQuery == 0 && sizeFields > 0) query += `$filter=${rule.formatOdata}`;
|
|
94
97
|
|
|
95
|
-
if (indexQuery > 0 &&
|
|
98
|
+
if (indexQuery > 0 && sizeFields > 0) {
|
|
96
99
|
query += ` ${rule.andOr} ${rule.formatOdata}`;
|
|
97
100
|
andOr.push(rule.andOr);
|
|
98
101
|
}
|
|
@@ -116,6 +119,14 @@ export default {
|
|
|
116
119
|
indexTotalization++;
|
|
117
120
|
}
|
|
118
121
|
});
|
|
122
|
+
|
|
123
|
+
state.finalQueryFormatOData.totalization.forEach(function (rule) {
|
|
124
|
+
|
|
125
|
+
if (indexTotalization == 0 && sizeTotalization > 0) totalization = `${rule.formatOdata}`;
|
|
126
|
+
if (indexTotalization > 0 && sizeTotalization > 0) totalization = `,${rule.formatOdata}`;
|
|
127
|
+
indexTotalization++;
|
|
128
|
+
});
|
|
129
|
+
|
|
119
130
|
return { query, totalization };
|
|
120
131
|
},
|
|
121
132
|
tags: (state) => {
|
|
@@ -198,24 +209,31 @@ export default {
|
|
|
198
209
|
// para ser consumido nos getters oDataSelect e oDataFilter
|
|
199
210
|
|
|
200
211
|
state.finalQueryFormatOData = { fields: [], totalization: [] };
|
|
212
|
+
var convertToOdata = new ConvertToOdata();
|
|
201
213
|
|
|
202
214
|
selectedRules.forEach(function (rule) {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
215
|
+
|
|
216
|
+
if (rule.value != null && rule.value != "" && rule.value != undefined && rule.type == "totalization") {
|
|
217
|
+
let formatOdata = convertToOdata.convertRule(rule);
|
|
218
|
+
|
|
219
|
+
rule.value.forEach(value => {
|
|
220
|
+
// adiciona no array somente a opção da regra selecionada
|
|
221
|
+
var ruleSelected = rule.options.filter(x => x.value == value);
|
|
222
|
+
|
|
223
|
+
let ruleOdata = {
|
|
224
|
+
title: ruleSelected[0].aggregate.title,
|
|
225
|
+
value: ruleSelected[0].aggregate.value,
|
|
226
|
+
classCss: ruleSelected[0].aggregate.classCss,
|
|
227
|
+
type: ruleSelected[0].aggregate.type,
|
|
228
|
+
formatOdata: formatOdata,
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
state.finalQueryFormatOData.totalization.push(ruleOdata);
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if (rule.value != null && rule.value != "" && rule.value != undefined && rule.type == "field") {
|
|
236
|
+
|
|
219
237
|
let formatOdata = convertToOdata.convertRule(rule);
|
|
220
238
|
|
|
221
239
|
let ruleOdata = {
|
|
@@ -36,6 +36,12 @@ export default {
|
|
|
36
36
|
},
|
|
37
37
|
updateParameterRental: (state, parameterRental) => {
|
|
38
38
|
state.userLogged.parameterRental = parameterRental;
|
|
39
|
+
},
|
|
40
|
+
updateParameterStock: (state, parameterStock) => {
|
|
41
|
+
state.userLogged.parameterStock = parameterStock;
|
|
42
|
+
},
|
|
43
|
+
updateToken: (state, token) => {
|
|
44
|
+
state.userLogged.token = token;
|
|
39
45
|
}
|
|
40
46
|
},
|
|
41
47
|
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<Molded>
|
|
4
|
-
<div v-for="item in data" :key="item.title">
|
|
5
|
-
<div :class="item.classCss">
|
|
6
|
-
<b-row>
|
|
7
|
-
<b-col class="text-right" sm="10">
|
|
8
|
-
<span class="title">{{ item.title }}</span>
|
|
9
|
-
</b-col>
|
|
10
|
-
<b-col class="text-right" sm="2">
|
|
11
|
-
<span class="title">{{ item.valor }}</span>
|
|
12
|
-
</b-col>
|
|
13
|
-
</b-row>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
</Molded>
|
|
17
|
-
</div>
|
|
18
|
-
</template>
|
|
19
|
-
<script>
|
|
20
|
-
import Molded from "@nixweb/nixloc-ui/src/component/layout/Molded";
|
|
21
|
-
|
|
22
|
-
export default {
|
|
23
|
-
name: "RodapeRelatorio",
|
|
24
|
-
components: {
|
|
25
|
-
Molded,
|
|
26
|
-
},
|
|
27
|
-
props: {
|
|
28
|
-
data: Array,
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
</script>
|
|
32
|
-
|
|
33
|
-
<style scoped>
|
|
34
|
-
.title {
|
|
35
|
-
font-size: 15px;
|
|
36
|
-
font-weight: 400;
|
|
37
|
-
}
|
|
38
|
-
</style>
|