@nixweb/nixloc-ui 1.19.0 → 1.21.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.
- package/package.json +1 -1
- package/src/component/forms/ButtonFilter.vue +104 -104
- package/src/component/forms/ButtonGroup.vue +66 -66
- package/src/component/forms/ButtonGroupInline.vue +210 -210
- package/src/component/forms/ButtonSub.vue +97 -97
- package/src/component/forms/ButtonToggle.vue +76 -76
- package/src/component/forms/DateYearMonth.vue +192 -192
- package/src/component/forms/ImageUpload.vue +214 -214
- package/src/component/forms/IncrementDecrement.vue +151 -151
- package/src/component/forms/InputAddressGoogle.vue +171 -171
- package/src/component/forms/InputCallToAction.vue +135 -135
- package/src/component/forms/InputDecimalDiscount.vue +146 -146
- package/src/component/forms/InputTag.vue +124 -124
- package/src/component/forms/InputTextEdit.vue +69 -69
- package/src/component/forms/InputWhatsApp.vue +47 -47
- package/src/component/forms/SideBar.vue +99 -99
- package/src/component/forms/Toggle.vue +72 -72
- package/src/component/layout/Account.vue +131 -131
- package/src/component/layout/AnimatedPhrase.vue +68 -68
- package/src/component/layout/BarFloating.vue +67 -67
- package/src/component/layout/BottomActionsBar.vue +205 -205
- package/src/component/layout/ColorPicker.vue +175 -175
- package/src/component/layout/Gantt.vue +128 -128
- package/src/component/layout/HideShow.vue +61 -61
- package/src/component/layout/IconMolded.vue +58 -58
- package/src/component/layout/IconPicker.vue +161 -161
- package/src/component/layout/NewAccount.vue +136 -136
- package/src/component/layout/NewHeader.vue +59 -59
- package/src/component/layout/NewIconMolded.vue +70 -70
- package/src/component/layout/NewMenu.vue +472 -472
- package/src/component/layout/Tab.vue +259 -259
- package/src/component/layout/Tag.vue +97 -97
- package/src/component/layout/Tooltip.vue +155 -155
- package/src/component/layout/Zoom.vue +111 -111
- package/src/component/rental/DisplayCalculatePeriod.vue +48 -48
- package/src/component/rental/DisplayPeriodRent.vue +55 -55
- package/src/component/rental/DisplayTotalization.vue +86 -86
- package/src/component/report/Fields.vue +108 -108
- package/src/component/report/Report.vue +377 -377
- package/src/component/report/ReportTable.vue +111 -111
- package/src/component/report/Totalization.vue +33 -33
- package/src/component/shared/CodeEditor.vue +128 -128
- package/src/component/shared/Confirmation.vue +74 -74
- package/src/component/shared/DocumentEditor.vue +99 -99
- package/src/component/shared/DocumentPreview.vue +117 -105
- package/src/component/shared/DocumentPublic.vue +33 -33
- package/src/component/shared/ExportExcel.vue +56 -56
- package/src/component/shared/FullCalendar.vue +175 -175
- package/src/component/shared/HeaderReport.vue +47 -47
- package/src/component/shared/ListNotifications.vue +70 -70
- package/src/component/shared/Loading.vue +1 -4
- package/src/component/shared/LoadingCard.vue +64 -64
- package/src/component/shared/ParameterLegend.vue +169 -169
- package/src/component/shared/Report.vue +250 -250
- package/src/component/shared/SaveCancel.vue +99 -117
- package/src/component/shared/SelectOption.vue +162 -162
- package/src/component/shared/TableDraggable.vue +117 -117
- package/src/component/shared/TableImport.vue +93 -93
- package/src/component/shared/TableItem.vue +228 -228
- package/src/component/shared/TableTotalPerPage.vue +114 -114
- package/src/component/shared/TableTotalRecords.vue +44 -44
- package/src/component/shared/TimeLine.vue +41 -41
- package/src/component/shared/Timer.vue +77 -77
- package/src/component/shared/ToggleTheme.vue +127 -127
- package/src/component/shared/TotalizationReport.vue +86 -86
- package/src/component/shared/actions/ActionButtons.vue +53 -53
- package/src/component/shared/actions/ActionErrorContent.vue +103 -103
- package/src/component/shared/actions/ActionFooter.vue +93 -99
- package/src/component/shared/actions/ActionHeader.vue +110 -110
- package/src/component/shared/actions/ActionItemList.vue +143 -143
- package/src/component/shared/actions/ActionsOptions.vue +209 -209
- package/src/component/shared/actions/ActionsSelected.vue +262 -262
- package/src/component/shared/automation/ActivitiesList.vue +43 -43
- package/src/component/shared/automation/AddRule.vue +60 -60
- package/src/component/shared/automation/AutomationBuilder.vue +26 -26
- package/src/component/shared/automation/DynamicComponentList.vue +85 -85
- package/src/component/shared/automation/SelectRule.vue +97 -97
- package/src/component/shared/automation/components/BillingByRent.vue +97 -97
- package/src/component/shared/automation/components/SendEmail.vue +93 -93
- package/src/component/shared/file-manager/FileManager.vue +390 -390
- package/src/component/shared/filter-builder/FilterBuilder.vue +220 -220
- package/src/component/shared/filter-builder/FilterQuery.vue +95 -95
- package/src/component/shared/query-builder/ConvertToOdata.js +86 -86
- package/src/component/shared/query-builder/DynamicComponent.vue +161 -161
- package/src/component/shared/query-builder/Fields.vue +93 -93
- package/src/component/shared/query-builder/Rules.vue +68 -68
- package/src/component/shared/query-builder/SelectRule.vue +97 -97
- package/src/component/shared/query-builder/Tags.vue +59 -59
- package/src/component/signature/Payment.vue +160 -160
- package/src/component/signature/Warning.vue +75 -75
- package/src/component/template/ReportCreateUpdate.vue +110 -110
- package/src/component/template/ViewTemplateDocumentView.vue +213 -213
- package/src/component/template/ViewTemplateImportFile.vue +347 -347
- package/src/component/template/ViewTemplateReportList.vue +240 -240
- package/src/component/template/ViewTemplateReportPreview.vue +521 -521
- package/src/component/template/ViewTemplateSelectOption.vue +46 -46
- package/src/component/template/model/Report.js +5 -5
- package/src/component/training/Course.vue +343 -343
- package/src/component/training/CourseView.vue +198 -198
- package/src/component/value-objects/Address.js +10 -10
- package/src/component/value-objects/Address.vue +173 -173
- package/src/component/value-objects/Contact.js +6 -6
- package/src/component/value-objects/Contact.vue +106 -106
- package/src/component/value-objects/Person.js +10 -10
- package/src/component/value-objects/Person.vue +130 -130
- package/src/store/modules/automation.js +30 -30
- package/src/store/modules/generic.js +16 -6
- package/src/store/modules/report.js +277 -277
- package/src/store/modules/user.js +69 -69
- package/src/store/modules/util.js +25 -25
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div @click="execute()">
|
|
4
|
-
<slot></slot>
|
|
5
|
-
</div>
|
|
6
|
-
<Modal v-if="isModal" :title="title" :width="450" :height="250" v-show="showModal(`confirmation${data.id}`)">
|
|
7
|
-
<b-col sm="12">
|
|
8
|
-
<div class="div-button text-center">
|
|
9
|
-
<Button key="notConfirm" type="edit" title="cancel" :disabled="disabled" size="small" :clicked="cancel" />
|
|
10
|
-
<Button key="confirm" :type="type" title="Sim, confirmar" size="medium" :disabled="disabled"
|
|
11
|
-
:clicked="confirm" />
|
|
12
|
-
</div>
|
|
13
|
-
</b-col>
|
|
14
|
-
</Modal>
|
|
15
|
-
<div v-else class="div-button text-center">
|
|
16
|
-
<Button _key="notConfirm" type="edit" title="cancel" size="small" :disabled="disabled" :clicked="cancel" />
|
|
17
|
-
<Button _key="confirm" :type="type" title="Sim, confirmar" size="medium" :disabled="disabled" :clicked="confirm" />
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
</template>
|
|
21
|
-
|
|
22
|
-
<script>
|
|
23
|
-
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
24
|
-
import Modal from "@nixweb/nixloc-ui/src/component/forms/Modal";
|
|
25
|
-
|
|
26
|
-
import { mapGetters, mapMutations } from "vuex";
|
|
27
|
-
|
|
28
|
-
export default {
|
|
29
|
-
name: "Confirmation",
|
|
30
|
-
components: {
|
|
31
|
-
Button,
|
|
32
|
-
Modal,
|
|
33
|
-
},
|
|
34
|
-
props: {
|
|
35
|
-
title: String,
|
|
36
|
-
type: String,
|
|
37
|
-
data: Object,
|
|
38
|
-
isModal: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
default: true,
|
|
41
|
-
},
|
|
42
|
-
disabled: {
|
|
43
|
-
type: Boolean,
|
|
44
|
-
default: false,
|
|
45
|
-
},
|
|
46
|
-
confirmed: Function,
|
|
47
|
-
},
|
|
48
|
-
methods: {
|
|
49
|
-
...mapMutations("generic", ["openModal", "hideModal", "removeLoading"]),
|
|
50
|
-
execute() {
|
|
51
|
-
this.openModal(`confirmation${this.data.id}`);
|
|
52
|
-
},
|
|
53
|
-
confirm() {
|
|
54
|
-
let self = this;
|
|
55
|
-
setTimeout(function () {
|
|
56
|
-
if (self.confirmed) self.confirmed(self.data);
|
|
57
|
-
}, 200);
|
|
58
|
-
},
|
|
59
|
-
cancel() {
|
|
60
|
-
this.removeLoading(["notConfirm"]);
|
|
61
|
-
this.hideModal();
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
computed: {
|
|
65
|
-
...mapGetters("generic", ["showModal", "event"]),
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
</script>
|
|
69
|
-
<style scoped>
|
|
70
|
-
.div-button {
|
|
71
|
-
padding-top: 20px;
|
|
72
|
-
height: 100px;
|
|
73
|
-
}
|
|
74
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div @click="execute()">
|
|
4
|
+
<slot></slot>
|
|
5
|
+
</div>
|
|
6
|
+
<Modal v-if="isModal" :title="title" :width="450" :height="250" v-show="showModal(`confirmation${data.id}`)">
|
|
7
|
+
<b-col sm="12">
|
|
8
|
+
<div class="div-button text-center">
|
|
9
|
+
<Button key="notConfirm" type="edit" title="cancel" :disabled="disabled" size="small" :clicked="cancel" />
|
|
10
|
+
<Button key="confirm" :type="type" title="Sim, confirmar" size="medium" :disabled="disabled"
|
|
11
|
+
:clicked="confirm" />
|
|
12
|
+
</div>
|
|
13
|
+
</b-col>
|
|
14
|
+
</Modal>
|
|
15
|
+
<div v-else class="div-button text-center">
|
|
16
|
+
<Button _key="notConfirm" type="edit" title="cancel" size="small" :disabled="disabled" :clicked="cancel" />
|
|
17
|
+
<Button _key="confirm" :type="type" title="Sim, confirmar" size="medium" :disabled="disabled" :clicked="confirm" />
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script>
|
|
23
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
24
|
+
import Modal from "@nixweb/nixloc-ui/src/component/forms/Modal";
|
|
25
|
+
|
|
26
|
+
import { mapGetters, mapMutations } from "vuex";
|
|
27
|
+
|
|
28
|
+
export default {
|
|
29
|
+
name: "Confirmation",
|
|
30
|
+
components: {
|
|
31
|
+
Button,
|
|
32
|
+
Modal,
|
|
33
|
+
},
|
|
34
|
+
props: {
|
|
35
|
+
title: String,
|
|
36
|
+
type: String,
|
|
37
|
+
data: Object,
|
|
38
|
+
isModal: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: true,
|
|
41
|
+
},
|
|
42
|
+
disabled: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false,
|
|
45
|
+
},
|
|
46
|
+
confirmed: Function,
|
|
47
|
+
},
|
|
48
|
+
methods: {
|
|
49
|
+
...mapMutations("generic", ["openModal", "hideModal", "removeLoading"]),
|
|
50
|
+
execute() {
|
|
51
|
+
this.openModal(`confirmation${this.data.id}`);
|
|
52
|
+
},
|
|
53
|
+
confirm() {
|
|
54
|
+
let self = this;
|
|
55
|
+
setTimeout(function () {
|
|
56
|
+
if (self.confirmed) self.confirmed(self.data);
|
|
57
|
+
}, 200);
|
|
58
|
+
},
|
|
59
|
+
cancel() {
|
|
60
|
+
this.removeLoading(["notConfirm"]);
|
|
61
|
+
this.hideModal();
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
computed: {
|
|
65
|
+
...mapGetters("generic", ["showModal", "event"]),
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
</script>
|
|
69
|
+
<style scoped>
|
|
70
|
+
.div-button {
|
|
71
|
+
padding-top: 20px;
|
|
72
|
+
height: 100px;
|
|
73
|
+
}
|
|
74
|
+
</style>
|
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div class="form-group">
|
|
4
|
-
<div>
|
|
5
|
-
<div class="document-editor__toolbar"></div>
|
|
6
|
-
<div class="document-editor__editable-container">
|
|
7
|
-
<div id="template-dev">
|
|
8
|
-
<ckeditor :editor="editor" v-model="computedDocumentHtml" @ready="onReady" @focus="changed"></ckeditor>
|
|
9
|
-
</div>
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
<br />
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
|
|
17
|
-
<script>
|
|
18
|
-
import CKEditor from "ckeditor5-custom-build/build/ckeditor";
|
|
19
|
-
import { mapState, mapMutations } from "vuex";
|
|
20
|
-
|
|
21
|
-
export default {
|
|
22
|
-
name: "DocumentEditor",
|
|
23
|
-
props: ["editMode"],
|
|
24
|
-
components: {
|
|
25
|
-
CKEditor,
|
|
26
|
-
},
|
|
27
|
-
data() {
|
|
28
|
-
return {
|
|
29
|
-
editor: CKEditor,
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
computed: {
|
|
33
|
-
...mapState("generic", ["documentHtml", "documentHtmlFinal"]),
|
|
34
|
-
computedDocumentHtml: {
|
|
35
|
-
get() {
|
|
36
|
-
if (this.editMode) {
|
|
37
|
-
return this.documentHtmlFinal
|
|
38
|
-
} else {
|
|
39
|
-
return this.documentHtml;
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
set(newValue) {
|
|
43
|
-
if (this.editMode) {
|
|
44
|
-
this.updateDocumentHtmlFinal(newValue);
|
|
45
|
-
} else {
|
|
46
|
-
this.updateDocumentHtml(newValue);
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
methods: {
|
|
52
|
-
...mapMutations("generic", ["updateDocumentHtmlFinal", "updateDocumentHtml", "addEvent"]),
|
|
53
|
-
onReady(editor) {
|
|
54
|
-
const toolbarContainer = document.querySelector(".document-editor__toolbar");
|
|
55
|
-
toolbarContainer.appendChild(editor.ui.view.toolbar.element);
|
|
56
|
-
},
|
|
57
|
-
changed() {
|
|
58
|
-
this.addEvent({ name: "documentEditorChanged" });
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
};
|
|
62
|
-
</script>
|
|
63
|
-
|
|
64
|
-
<style scoped>
|
|
65
|
-
/* Estilos do seu componente */
|
|
66
|
-
.document-editor {
|
|
67
|
-
border-radius: var(--ck-border-radius);
|
|
68
|
-
max-height: 700px;
|
|
69
|
-
display: flex;
|
|
70
|
-
flex-flow: column nowrap;
|
|
71
|
-
margin: auto !important;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.document-editor__toolbar {
|
|
75
|
-
z-index: 1 !important;
|
|
76
|
-
min-width: 1100px;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.document-editor__editable-container {
|
|
80
|
-
padding: 10px;
|
|
81
|
-
border: 1px solid #e4e6ec;
|
|
82
|
-
background: var(--ck-color-base-foreground);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.document-editor__editable-container .ck-editor__editable {
|
|
86
|
-
width: 26cm;
|
|
87
|
-
height: 700px;
|
|
88
|
-
padding: 20px;
|
|
89
|
-
border: 1px hsl(0, 0%, 82.7%) solid;
|
|
90
|
-
border-radius: var(--ck-border-radius);
|
|
91
|
-
background: white;
|
|
92
|
-
box-shadow: 0 0 5px hsla(0, 0%, 0%, 0.1);
|
|
93
|
-
margin: 0 auto;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.document-editor .ck-content {
|
|
97
|
-
font: 16px/1.6 "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
98
|
-
}
|
|
99
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="form-group">
|
|
4
|
+
<div>
|
|
5
|
+
<div class="document-editor__toolbar"></div>
|
|
6
|
+
<div class="document-editor__editable-container">
|
|
7
|
+
<div id="template-dev">
|
|
8
|
+
<ckeditor :editor="editor" v-model="computedDocumentHtml" @ready="onReady" @focus="changed"></ckeditor>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
<br />
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import CKEditor from "ckeditor5-custom-build/build/ckeditor";
|
|
19
|
+
import { mapState, mapMutations } from "vuex";
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
name: "DocumentEditor",
|
|
23
|
+
props: ["editMode"],
|
|
24
|
+
components: {
|
|
25
|
+
CKEditor,
|
|
26
|
+
},
|
|
27
|
+
data() {
|
|
28
|
+
return {
|
|
29
|
+
editor: CKEditor,
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
computed: {
|
|
33
|
+
...mapState("generic", ["documentHtml", "documentHtmlFinal"]),
|
|
34
|
+
computedDocumentHtml: {
|
|
35
|
+
get() {
|
|
36
|
+
if (this.editMode) {
|
|
37
|
+
return this.documentHtmlFinal
|
|
38
|
+
} else {
|
|
39
|
+
return this.documentHtml;
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
set(newValue) {
|
|
43
|
+
if (this.editMode) {
|
|
44
|
+
this.updateDocumentHtmlFinal(newValue);
|
|
45
|
+
} else {
|
|
46
|
+
this.updateDocumentHtml(newValue);
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
methods: {
|
|
52
|
+
...mapMutations("generic", ["updateDocumentHtmlFinal", "updateDocumentHtml", "addEvent"]),
|
|
53
|
+
onReady(editor) {
|
|
54
|
+
const toolbarContainer = document.querySelector(".document-editor__toolbar");
|
|
55
|
+
toolbarContainer.appendChild(editor.ui.view.toolbar.element);
|
|
56
|
+
},
|
|
57
|
+
changed() {
|
|
58
|
+
this.addEvent({ name: "documentEditorChanged" });
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<style scoped>
|
|
65
|
+
/* Estilos do seu componente */
|
|
66
|
+
.document-editor {
|
|
67
|
+
border-radius: var(--ck-border-radius);
|
|
68
|
+
max-height: 700px;
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-flow: column nowrap;
|
|
71
|
+
margin: auto !important;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.document-editor__toolbar {
|
|
75
|
+
z-index: 1 !important;
|
|
76
|
+
min-width: 1100px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.document-editor__editable-container {
|
|
80
|
+
padding: 10px;
|
|
81
|
+
border: 1px solid #e4e6ec;
|
|
82
|
+
background: var(--ck-color-base-foreground);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.document-editor__editable-container .ck-editor__editable {
|
|
86
|
+
width: 26cm;
|
|
87
|
+
height: 700px;
|
|
88
|
+
padding: 20px;
|
|
89
|
+
border: 1px hsl(0, 0%, 82.7%) solid;
|
|
90
|
+
border-radius: var(--ck-border-radius);
|
|
91
|
+
background: white;
|
|
92
|
+
box-shadow: 0 0 5px hsla(0, 0%, 0%, 0.1);
|
|
93
|
+
margin: 0 auto;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.document-editor .ck-content {
|
|
97
|
+
font: 16px/1.6 "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
98
|
+
}
|
|
99
|
+
</style>
|
|
@@ -1,105 +1,117 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div ref='preview'>
|
|
4
|
-
<v-runtime-template :template="`<div>${template}</div>`" />
|
|
5
|
-
</div>
|
|
6
|
-
</div>
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<script>
|
|
10
|
-
import VRuntimeTemplate from "v-runtime-template";
|
|
11
|
-
|
|
12
|
-
import { mapGetters, mapMutations } from "vuex";
|
|
13
|
-
|
|
14
|
-
export default {
|
|
15
|
-
name: "DocumentPreview",
|
|
16
|
-
components: {
|
|
17
|
-
VRuntimeTemplate,
|
|
18
|
-
},
|
|
19
|
-
props: {
|
|
20
|
-
template: String,
|
|
21
|
-
d: Object,
|
|
22
|
-
},
|
|
23
|
-
methods: {
|
|
24
|
-
...mapMutations("generic", ["updateDocumentHtmlFinal"]),
|
|
25
|
-
periodo(grupo, campo) {
|
|
26
|
-
var item = this.d.itensLocacao.find(item => item.grupo == grupo);
|
|
27
|
-
const campoMap = {
|
|
28
|
-
"dataEntrega": item.dataEntrega,
|
|
29
|
-
"horaEntrega": item.horaEntrega,
|
|
30
|
-
"dataInicio": item.dataInicio,
|
|
31
|
-
"horaInicio": item.horaInicio,
|
|
32
|
-
"dataFim": item.dataFim,
|
|
33
|
-
"horaFim": item.horaFim,
|
|
34
|
-
"dataRetirada": item.dataRetirada,
|
|
35
|
-
"horaRetirada": item.horaRetirada,
|
|
36
|
-
"ano": item.ano,
|
|
37
|
-
"mes": item.mes,
|
|
38
|
-
"dia": item.dia,
|
|
39
|
-
"hora": item.hora,
|
|
40
|
-
"minuto": item.minuto
|
|
41
|
-
};
|
|
42
|
-
return campoMap[campo];
|
|
43
|
-
},
|
|
44
|
-
somaGrupo(grupo) {
|
|
45
|
-
let sum = [];
|
|
46
|
-
this.d.itensLocacao.forEach((item) => {
|
|
47
|
-
if (item.grupo === grupo) {
|
|
48
|
-
sum.push(item.totalValue);
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
return sum.reduce((a, b) => a + b, 0);
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
if (
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div ref='preview'>
|
|
4
|
+
<v-runtime-template :template="`<div>${template}</div>`" />
|
|
5
|
+
</div>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
import VRuntimeTemplate from "v-runtime-template";
|
|
11
|
+
|
|
12
|
+
import { mapGetters, mapMutations } from "vuex";
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
name: "DocumentPreview",
|
|
16
|
+
components: {
|
|
17
|
+
VRuntimeTemplate,
|
|
18
|
+
},
|
|
19
|
+
props: {
|
|
20
|
+
template: String,
|
|
21
|
+
d: Object,
|
|
22
|
+
},
|
|
23
|
+
methods: {
|
|
24
|
+
...mapMutations("generic", ["updateDocumentHtmlFinal"]),
|
|
25
|
+
periodo(grupo, campo) {
|
|
26
|
+
var item = this.d.itensLocacao.find(item => item.grupo == grupo);
|
|
27
|
+
const campoMap = {
|
|
28
|
+
"dataEntrega": item.dataEntrega,
|
|
29
|
+
"horaEntrega": item.horaEntrega,
|
|
30
|
+
"dataInicio": item.dataInicio,
|
|
31
|
+
"horaInicio": item.horaInicio,
|
|
32
|
+
"dataFim": item.dataFim,
|
|
33
|
+
"horaFim": item.horaFim,
|
|
34
|
+
"dataRetirada": item.dataRetirada,
|
|
35
|
+
"horaRetirada": item.horaRetirada,
|
|
36
|
+
"ano": item.ano,
|
|
37
|
+
"mes": item.mes,
|
|
38
|
+
"dia": item.dia,
|
|
39
|
+
"hora": item.hora,
|
|
40
|
+
"minuto": item.minuto
|
|
41
|
+
};
|
|
42
|
+
return campoMap[campo];
|
|
43
|
+
},
|
|
44
|
+
somaGrupo(grupo) {
|
|
45
|
+
let sum = [];
|
|
46
|
+
this.d.itensLocacao.forEach((item) => {
|
|
47
|
+
if (item.grupo === grupo) {
|
|
48
|
+
sum.push(item.totalValue);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
return sum.reduce((a, b) => a + b, 0);
|
|
52
|
+
},
|
|
53
|
+
somaGrupoComFiltro(grupoId) {
|
|
54
|
+
return this.d.itensLocacao
|
|
55
|
+
.filter(item => item.grupoId == grupoId) // == aceita string ou number
|
|
56
|
+
.reduce((acc, item) => acc + item.totalValue, 0);
|
|
57
|
+
},
|
|
58
|
+
somaSubGrupo(itensLocacao) {
|
|
59
|
+
return this.somaGrupoComFiltro(this.grupoSemRepeticao(itensLocacao));
|
|
60
|
+
},
|
|
61
|
+
somaGrupoMaster(grupoMaster) {
|
|
62
|
+
let sum = [];
|
|
63
|
+
this.d.itensLocacao.forEach((item) => {
|
|
64
|
+
if (item.grupoMaster === grupoMaster) {
|
|
65
|
+
sum.push(item.totalValue);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
return sum.reduce((a, b) => a + b, 0);
|
|
69
|
+
},
|
|
70
|
+
convertToNumber(value) {
|
|
71
|
+
return parseFloat(value.replace("R$", "").replace(",", "."));
|
|
72
|
+
},
|
|
73
|
+
getPreviewContent() {
|
|
74
|
+
const previewDiv = this.$refs.preview;
|
|
75
|
+
this.updateDocumentHtmlFinal(previewDiv.innerHTML);
|
|
76
|
+
},
|
|
77
|
+
grupoSemRepeticao(itensLocacao) {
|
|
78
|
+
return itensLocacao?.[0]?.grupoId ?? null;
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
computed: {
|
|
82
|
+
...mapGetters("generic", ["groupBy", "event"]),
|
|
83
|
+
// produtoAgrupado e produtoGrupoSubgrupo estão sendo usados no generic.js documentPreview
|
|
84
|
+
produtoAgrupado() {
|
|
85
|
+
var group = this.groupBy({ array: this.d.itensLocacao, key: "grupo" });
|
|
86
|
+
return group;
|
|
87
|
+
},
|
|
88
|
+
produtoGrupoSubgrupo() {
|
|
89
|
+
const resultado = {};
|
|
90
|
+
|
|
91
|
+
this.d.itensLocacao.forEach(item => {
|
|
92
|
+
const nomeGrupoMaster = item.grupoMaster;
|
|
93
|
+
const nomeGrupo = item.grupo;
|
|
94
|
+
|
|
95
|
+
if (!resultado[nomeGrupoMaster]) { resultado[nomeGrupoMaster] = {}; }
|
|
96
|
+
if (!resultado[nomeGrupoMaster][nomeGrupo]) { resultado[nomeGrupoMaster][nomeGrupo] = []; }
|
|
97
|
+
|
|
98
|
+
resultado[nomeGrupoMaster][nomeGrupo].push(item);
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
return resultado;
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
watch: {
|
|
105
|
+
event: {
|
|
106
|
+
handler(event) {
|
|
107
|
+
if (event.name == "updateDocumentHtml") {
|
|
108
|
+
this.getPreviewContent();
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
deep: true,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
};
|
|
117
|
+
</script>
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="main">
|
|
3
|
-
<div class="content">
|
|
4
|
-
<DocumentPreview :template="template" :d="d" />
|
|
5
|
-
</div>
|
|
6
|
-
</div>
|
|
7
|
-
</template>
|
|
8
|
-
<script>
|
|
9
|
-
import DocumentPreview from "@nixweb/nixloc-ui/src/component/shared/DocumentPreview.vue";
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
name: "DocumentPublic",
|
|
13
|
-
components: {
|
|
14
|
-
DocumentPreview,
|
|
15
|
-
},
|
|
16
|
-
props: {
|
|
17
|
-
template: String,
|
|
18
|
-
d: Object,
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<style scoped>
|
|
24
|
-
.main {
|
|
25
|
-
background-color: white;
|
|
26
|
-
min-height: 900px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.content {
|
|
30
|
-
width: 1042px;
|
|
31
|
-
margin: auto;
|
|
32
|
-
}
|
|
33
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="main">
|
|
3
|
+
<div class="content">
|
|
4
|
+
<DocumentPreview :template="template" :d="d" />
|
|
5
|
+
</div>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
<script>
|
|
9
|
+
import DocumentPreview from "@nixweb/nixloc-ui/src/component/shared/DocumentPreview.vue";
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
name: "DocumentPublic",
|
|
13
|
+
components: {
|
|
14
|
+
DocumentPreview,
|
|
15
|
+
},
|
|
16
|
+
props: {
|
|
17
|
+
template: String,
|
|
18
|
+
d: Object,
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<style scoped>
|
|
24
|
+
.main {
|
|
25
|
+
background-color: white;
|
|
26
|
+
min-height: 900px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.content {
|
|
30
|
+
width: 1042px;
|
|
31
|
+
margin: auto;
|
|
32
|
+
}
|
|
33
|
+
</style>
|