@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,130 +1,130 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<b-row>
|
|
4
|
-
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
5
|
-
<RadioGroup field="typePerson" :formName="formName" v-show="showTypePerson" :options="[
|
|
6
|
-
{ text: 'Física', value: 1 },
|
|
7
|
-
{ text: 'Jurídica', value: 2 },
|
|
8
|
-
]" v-model="person.typePerson" :markFormDirty="markFormDirty" />
|
|
9
|
-
</b-col>
|
|
10
|
-
</b-row>
|
|
11
|
-
<div v-if="showDocument">
|
|
12
|
-
<b-row>
|
|
13
|
-
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
14
|
-
<InputText :title="person.typePerson == 2 ? 'CNPJ' : 'CPF'" field="document" :formName="formName" :mask="person.typePerson == 2 ? ['##.###.###/####-##'] : ['###.###.###-##']
|
|
15
|
-
" :maxLength="30" :required="required" v-model="person.document" :markFormDirty="markFormDirty">
|
|
16
|
-
<div class="glyphicon margin-button">
|
|
17
|
-
<Button v-if="person.typePerson == 2" _key="searchDocumentFederalRecipe" type="success"
|
|
18
|
-
classIcon="fas fa-search" :disabled="person.document.length < 18" size="small"
|
|
19
|
-
:clicked="searchDocumentFederalRecipe" />
|
|
20
|
-
</div>
|
|
21
|
-
</InputText>
|
|
22
|
-
</b-col>
|
|
23
|
-
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
24
|
-
<InputText :title="person.typePerson == 2 ? 'Inscrição Estadual' : 'RG'" field="stateInscription"
|
|
25
|
-
:formName="formName" :maxLength="50" :required="required" v-model="person.stateInscription"
|
|
26
|
-
:markFormDirty="markFormDirty" />
|
|
27
|
-
</b-col>
|
|
28
|
-
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
29
|
-
<InputText v-if="person.typePerson == 2" title="Inscrição Municipal" field="municipalInscription"
|
|
30
|
-
:formName="formName" :maxLength="50" :required="false" v-model="person.municipalInscription"
|
|
31
|
-
:markFormDirty="markFormDirty" />
|
|
32
|
-
</b-col>
|
|
33
|
-
</b-row>
|
|
34
|
-
</div>
|
|
35
|
-
<br v-if="person.typePerson == 2 && showDocument" />
|
|
36
|
-
<b-row>
|
|
37
|
-
<b-col xs="12" sm="12" md="12" lg="8" xl="8">
|
|
38
|
-
<InputText :title="person.typePerson == 2 ? 'Razão Social' : 'Nome'" field="companyName" :formName="formName"
|
|
39
|
-
:required="true" :maxLength="100" v-model="person.companyName" :markFormDirty="markFormDirty" />
|
|
40
|
-
</b-col>
|
|
41
|
-
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
42
|
-
<InputText :title="person.typePerson == 2 ? 'Fantasia' : 'Apelido'" field="tradeName" :formName="formName"
|
|
43
|
-
:required="true" :maxLength="100" v-model="person.tradeName" :markFormDirty="markFormDirty" />
|
|
44
|
-
</b-col>
|
|
45
|
-
</b-row>
|
|
46
|
-
</div>
|
|
47
|
-
</template>
|
|
48
|
-
|
|
49
|
-
<script>
|
|
50
|
-
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
51
|
-
import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
|
|
52
|
-
import RadioGroup from "@nixweb/nixloc-ui/src/component/forms/RadioGroup";
|
|
53
|
-
import Person from "@nixweb/nixloc-ui/src/component/value-objects/Person.js";
|
|
54
|
-
import axios from "axios";
|
|
55
|
-
|
|
56
|
-
import { mapMutations } from "vuex";
|
|
57
|
-
|
|
58
|
-
export default {
|
|
59
|
-
name: "Person",
|
|
60
|
-
props: {
|
|
61
|
-
formName: String,
|
|
62
|
-
required: {
|
|
63
|
-
type: Boolean,
|
|
64
|
-
default: false,
|
|
65
|
-
},
|
|
66
|
-
showTypePerson: {
|
|
67
|
-
type: Boolean,
|
|
68
|
-
default: true,
|
|
69
|
-
},
|
|
70
|
-
showDocument: {
|
|
71
|
-
type: Boolean,
|
|
72
|
-
default: true,
|
|
73
|
-
},
|
|
74
|
-
markFormDirty: {
|
|
75
|
-
type: Boolean,
|
|
76
|
-
default: true,
|
|
77
|
-
},
|
|
78
|
-
value: Object,
|
|
79
|
-
},
|
|
80
|
-
components: { RadioGroup, InputText, Button },
|
|
81
|
-
data() {
|
|
82
|
-
return {
|
|
83
|
-
person: new Person(),
|
|
84
|
-
};
|
|
85
|
-
},
|
|
86
|
-
mounted() {
|
|
87
|
-
if (this.value.companyName != undefined) this.person = this.value;
|
|
88
|
-
},
|
|
89
|
-
methods: {
|
|
90
|
-
...mapMutations("generic", [
|
|
91
|
-
"addEvent",
|
|
92
|
-
"addNotifications",
|
|
93
|
-
"removeLoading",
|
|
94
|
-
]),
|
|
95
|
-
searchDocumentFederalRecipe() {
|
|
96
|
-
let url = `https://ws.hubdodesenvolvedor.com.br/v2/cnpj/?cnpj=${this.person.document}&token=94473735FzLqpNKajP170569464`;
|
|
97
|
-
axios.post(url, {}, {}).then((response) => {
|
|
98
|
-
if (response.data.return == "OK") {
|
|
99
|
-
this.addEvent({
|
|
100
|
-
name: "searchDocumentFederalRecipe",
|
|
101
|
-
data: response.data.result,
|
|
102
|
-
});
|
|
103
|
-
this.person.companyName = response.data.result.nome;
|
|
104
|
-
this.person.tradeName = response.data.result.fantasia;
|
|
105
|
-
console.log(response.data.result);
|
|
106
|
-
} else {
|
|
107
|
-
this.addNotifications([
|
|
108
|
-
{ message: "CNPJ inválido ou não encontrado." },
|
|
109
|
-
]);
|
|
110
|
-
}
|
|
111
|
-
this.removeLoading(["searchDocumentFederalRecipe"]);
|
|
112
|
-
});
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
watch: {
|
|
116
|
-
value: {
|
|
117
|
-
handler() {
|
|
118
|
-
this.person = this.value;
|
|
119
|
-
},
|
|
120
|
-
deep: true,
|
|
121
|
-
},
|
|
122
|
-
person: {
|
|
123
|
-
handler() {
|
|
124
|
-
this.$emit("input", this.person);
|
|
125
|
-
},
|
|
126
|
-
deep: true,
|
|
127
|
-
},
|
|
128
|
-
},
|
|
129
|
-
};
|
|
130
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<b-row>
|
|
4
|
+
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
5
|
+
<RadioGroup field="typePerson" :formName="formName" v-show="showTypePerson" :options="[
|
|
6
|
+
{ text: 'Física', value: 1 },
|
|
7
|
+
{ text: 'Jurídica', value: 2 },
|
|
8
|
+
]" v-model="person.typePerson" :markFormDirty="markFormDirty" />
|
|
9
|
+
</b-col>
|
|
10
|
+
</b-row>
|
|
11
|
+
<div v-if="showDocument">
|
|
12
|
+
<b-row>
|
|
13
|
+
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
14
|
+
<InputText :title="person.typePerson == 2 ? 'CNPJ' : 'CPF'" field="document" :formName="formName" :mask="person.typePerson == 2 ? ['##.###.###/####-##'] : ['###.###.###-##']
|
|
15
|
+
" :maxLength="30" :required="required" v-model="person.document" :markFormDirty="markFormDirty">
|
|
16
|
+
<div class="glyphicon margin-button">
|
|
17
|
+
<Button v-if="person.typePerson == 2" _key="searchDocumentFederalRecipe" type="success"
|
|
18
|
+
classIcon="fas fa-search" :disabled="person.document.length < 18" size="small"
|
|
19
|
+
:clicked="searchDocumentFederalRecipe" />
|
|
20
|
+
</div>
|
|
21
|
+
</InputText>
|
|
22
|
+
</b-col>
|
|
23
|
+
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
24
|
+
<InputText :title="person.typePerson == 2 ? 'Inscrição Estadual' : 'RG'" field="stateInscription"
|
|
25
|
+
:formName="formName" :maxLength="50" :required="required" v-model="person.stateInscription"
|
|
26
|
+
:markFormDirty="markFormDirty" />
|
|
27
|
+
</b-col>
|
|
28
|
+
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
29
|
+
<InputText v-if="person.typePerson == 2" title="Inscrição Municipal" field="municipalInscription"
|
|
30
|
+
:formName="formName" :maxLength="50" :required="false" v-model="person.municipalInscription"
|
|
31
|
+
:markFormDirty="markFormDirty" />
|
|
32
|
+
</b-col>
|
|
33
|
+
</b-row>
|
|
34
|
+
</div>
|
|
35
|
+
<br v-if="person.typePerson == 2 && showDocument" />
|
|
36
|
+
<b-row>
|
|
37
|
+
<b-col xs="12" sm="12" md="12" lg="8" xl="8">
|
|
38
|
+
<InputText :title="person.typePerson == 2 ? 'Razão Social' : 'Nome'" field="companyName" :formName="formName"
|
|
39
|
+
:required="true" :maxLength="100" v-model="person.companyName" :markFormDirty="markFormDirty" />
|
|
40
|
+
</b-col>
|
|
41
|
+
<b-col xs="12" sm="12" md="12" lg="4" xl="4">
|
|
42
|
+
<InputText :title="person.typePerson == 2 ? 'Fantasia' : 'Apelido'" field="tradeName" :formName="formName"
|
|
43
|
+
:required="true" :maxLength="100" v-model="person.tradeName" :markFormDirty="markFormDirty" />
|
|
44
|
+
</b-col>
|
|
45
|
+
</b-row>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<script>
|
|
50
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
51
|
+
import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
|
|
52
|
+
import RadioGroup from "@nixweb/nixloc-ui/src/component/forms/RadioGroup";
|
|
53
|
+
import Person from "@nixweb/nixloc-ui/src/component/value-objects/Person.js";
|
|
54
|
+
import axios from "axios";
|
|
55
|
+
|
|
56
|
+
import { mapMutations } from "vuex";
|
|
57
|
+
|
|
58
|
+
export default {
|
|
59
|
+
name: "Person",
|
|
60
|
+
props: {
|
|
61
|
+
formName: String,
|
|
62
|
+
required: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: false,
|
|
65
|
+
},
|
|
66
|
+
showTypePerson: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: true,
|
|
69
|
+
},
|
|
70
|
+
showDocument: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: true,
|
|
73
|
+
},
|
|
74
|
+
markFormDirty: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: true,
|
|
77
|
+
},
|
|
78
|
+
value: Object,
|
|
79
|
+
},
|
|
80
|
+
components: { RadioGroup, InputText, Button },
|
|
81
|
+
data() {
|
|
82
|
+
return {
|
|
83
|
+
person: new Person(),
|
|
84
|
+
};
|
|
85
|
+
},
|
|
86
|
+
mounted() {
|
|
87
|
+
if (this.value.companyName != undefined) this.person = this.value;
|
|
88
|
+
},
|
|
89
|
+
methods: {
|
|
90
|
+
...mapMutations("generic", [
|
|
91
|
+
"addEvent",
|
|
92
|
+
"addNotifications",
|
|
93
|
+
"removeLoading",
|
|
94
|
+
]),
|
|
95
|
+
searchDocumentFederalRecipe() {
|
|
96
|
+
let url = `https://ws.hubdodesenvolvedor.com.br/v2/cnpj/?cnpj=${this.person.document}&token=94473735FzLqpNKajP170569464`;
|
|
97
|
+
axios.post(url, {}, {}).then((response) => {
|
|
98
|
+
if (response.data.return == "OK") {
|
|
99
|
+
this.addEvent({
|
|
100
|
+
name: "searchDocumentFederalRecipe",
|
|
101
|
+
data: response.data.result,
|
|
102
|
+
});
|
|
103
|
+
this.person.companyName = response.data.result.nome;
|
|
104
|
+
this.person.tradeName = response.data.result.fantasia;
|
|
105
|
+
console.log(response.data.result);
|
|
106
|
+
} else {
|
|
107
|
+
this.addNotifications([
|
|
108
|
+
{ message: "CNPJ inválido ou não encontrado." },
|
|
109
|
+
]);
|
|
110
|
+
}
|
|
111
|
+
this.removeLoading(["searchDocumentFederalRecipe"]);
|
|
112
|
+
});
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
watch: {
|
|
116
|
+
value: {
|
|
117
|
+
handler() {
|
|
118
|
+
this.person = this.value;
|
|
119
|
+
},
|
|
120
|
+
deep: true,
|
|
121
|
+
},
|
|
122
|
+
person: {
|
|
123
|
+
handler() {
|
|
124
|
+
this.$emit("input", this.person);
|
|
125
|
+
},
|
|
126
|
+
deep: true,
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
</script>
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
namespaced: true,
|
|
3
|
-
state: {
|
|
4
|
-
rules: [],
|
|
5
|
-
},
|
|
6
|
-
getters: {
|
|
7
|
-
listActivity: (state) => (id) => {
|
|
8
|
-
var selected = state.rules.find(x => x.id == id);
|
|
9
|
-
return selected.listActivity
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
mutations: {
|
|
13
|
-
addSelectedRules: (state, obj) => {
|
|
14
|
-
state.rules.push(obj);
|
|
15
|
-
},
|
|
16
|
-
removeRule: (state, id) => {
|
|
17
|
-
let filter = state.rules.filter(x => x.id != id);
|
|
18
|
-
state.rules = filter;
|
|
19
|
-
},
|
|
20
|
-
addActivity: (state, obj) => {
|
|
21
|
-
var selected = state.rules.find(x => x.id == obj.id);
|
|
22
|
-
selected.listActivity.push(obj.activity);
|
|
23
|
-
},
|
|
24
|
-
removeActivity: (state, id) => {
|
|
25
|
-
state.rules.forEach(item => {
|
|
26
|
-
let filter = item.listActivity.filter(x => x.id != id);
|
|
27
|
-
item.listActivity = filter;
|
|
28
|
-
});
|
|
29
|
-
},
|
|
30
|
-
},
|
|
1
|
+
export default {
|
|
2
|
+
namespaced: true,
|
|
3
|
+
state: {
|
|
4
|
+
rules: [],
|
|
5
|
+
},
|
|
6
|
+
getters: {
|
|
7
|
+
listActivity: (state) => (id) => {
|
|
8
|
+
var selected = state.rules.find(x => x.id == id);
|
|
9
|
+
return selected.listActivity
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
mutations: {
|
|
13
|
+
addSelectedRules: (state, obj) => {
|
|
14
|
+
state.rules.push(obj);
|
|
15
|
+
},
|
|
16
|
+
removeRule: (state, id) => {
|
|
17
|
+
let filter = state.rules.filter(x => x.id != id);
|
|
18
|
+
state.rules = filter;
|
|
19
|
+
},
|
|
20
|
+
addActivity: (state, obj) => {
|
|
21
|
+
var selected = state.rules.find(x => x.id == obj.id);
|
|
22
|
+
selected.listActivity.push(obj.activity);
|
|
23
|
+
},
|
|
24
|
+
removeActivity: (state, id) => {
|
|
25
|
+
state.rules.forEach(item => {
|
|
26
|
+
let filter = item.listActivity.filter(x => x.id != id);
|
|
27
|
+
item.listActivity = filter;
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
31
|
}
|
|
@@ -255,7 +255,21 @@ export default {
|
|
|
255
255
|
const produtoEnd = tbodyHtml.indexOf("</tr>", produtoStart) + "</tr>".length;
|
|
256
256
|
|
|
257
257
|
const wrapStart = grupoStart;
|
|
258
|
-
|
|
258
|
+
let wrapEnd = produtoEnd;
|
|
259
|
+
|
|
260
|
+
// Keep the group/subgroup total row inside the repeated block when present.
|
|
261
|
+
const somaMasterToken = "somaSubGrupo";
|
|
262
|
+
const somaMasterIndex = tbodyHtml.indexOf(somaMasterToken, produtoEnd);
|
|
263
|
+
if (somaMasterIndex !== -1) {
|
|
264
|
+
const totalRowStart = tbodyHtml.lastIndexOf("<tr", somaMasterIndex);
|
|
265
|
+
const totalRowEnd = tbodyHtml.indexOf("</tr>", somaMasterIndex) + "</tr>".length;
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
if (totalRowStart !== -1 && totalRowEnd > wrapEnd) {
|
|
270
|
+
wrapEnd = totalRowEnd;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
259
273
|
|
|
260
274
|
let templateContent = tbodyHtml.substring(wrapStart, wrapEnd);
|
|
261
275
|
|
|
@@ -446,10 +460,6 @@ export default {
|
|
|
446
460
|
cleanTags: (state) => {
|
|
447
461
|
state.tags = []
|
|
448
462
|
},
|
|
449
|
-
openModal: (state, name) => {
|
|
450
|
-
state.modal.name = name;
|
|
451
|
-
state.modal.open = true;
|
|
452
|
-
},
|
|
453
463
|
addFilterStorage: (state, obj) => {
|
|
454
464
|
const index = state.filterStorage.findIndex(x => x.key === obj.key);
|
|
455
465
|
if (index !== -1) {
|
|
@@ -479,7 +489,7 @@ export default {
|
|
|
479
489
|
updateQueryTags: (state, tags) => {
|
|
480
490
|
state.queryTags = tags;
|
|
481
491
|
},
|
|
482
|
-
_addFilterStorage: (state, obj) => { // está com _addFilterStorage para não ter duplicidade
|
|
492
|
+
_addFilterStorage: (state, obj) => { // está com _addFilterStorage para não ter duplicidade
|
|
483
493
|
// função abaixo é para não deixar duplicidade
|
|
484
494
|
const index = state._filterStorage.findIndex(x => x.routeName === obj.routeName);
|
|
485
495
|
if (index !== -1) {
|