@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,174 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="form-group">
|
|
3
|
+
<label>
|
|
4
|
+
<i class="title class-icon-title" :class="classIconTitle"></i>
|
|
5
|
+
<span class="title" :style="'color: ' + titleColor">{{ title }} </span>
|
|
6
|
+
<span class="required" v-if="required">*</span>
|
|
7
|
+
<Tip :field="field" :formName="formName" />
|
|
8
|
+
</label>
|
|
9
|
+
<div class="inner-addon right-addon">
|
|
10
|
+
<div class="required glyphicon" v-if="notifications.length > 0 && formDirty">
|
|
11
|
+
<i class="fas fa-exclamation-triangle"></i>
|
|
12
|
+
</div>
|
|
13
|
+
<slot v-else></slot>
|
|
14
|
+
<input type="text" :style="_style" :placeholder="titlePlaceholder" :disabled="disabled"
|
|
15
|
+
@keyup.enter.prevent="pressedEnter" @keyup="cleanedField" @blur="outField" v-mask="mask || withoutMask"
|
|
16
|
+
v-bind:value="value" v-on:input="$emit('input', $event.target.value)" class="form-control"
|
|
17
|
+
:class="{ required: notifications.length > 0 && formDirty }" />
|
|
18
|
+
</div>
|
|
19
|
+
<div v-if="formDirty">
|
|
20
|
+
<div v-for="message in notifications" :key="message">
|
|
21
|
+
<span class="invalid">{{ message }}</span>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import Tip from "../shared/Tip.vue";
|
|
29
|
+
import { mapState, mapMutations } from "vuex";
|
|
30
|
+
|
|
31
|
+
export default {
|
|
32
|
+
components: { Tip },
|
|
33
|
+
name: "InputText",
|
|
34
|
+
props: [
|
|
35
|
+
"title",
|
|
36
|
+
"classIconTitle",
|
|
37
|
+
"field",
|
|
38
|
+
"placeholder",
|
|
39
|
+
"disabled",
|
|
40
|
+
"titleColor",
|
|
41
|
+
"mask",
|
|
42
|
+
"_style",
|
|
43
|
+
"formName",
|
|
44
|
+
"required",
|
|
45
|
+
"maxLength",
|
|
46
|
+
"value",
|
|
47
|
+
"enter",
|
|
48
|
+
"cleaned",
|
|
49
|
+
"exited",
|
|
50
|
+
"markFormDirty",
|
|
51
|
+
],
|
|
52
|
+
data() {
|
|
53
|
+
return {
|
|
54
|
+
notifications: [],
|
|
55
|
+
formDirty: false,
|
|
56
|
+
withoutMask: {
|
|
57
|
+
mask: "*".repeat(255),
|
|
58
|
+
tokens: {
|
|
59
|
+
"*": { pattern: /./ },
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
created() {
|
|
65
|
+
this.validate();
|
|
66
|
+
},
|
|
67
|
+
methods: {
|
|
68
|
+
...mapMutations("validation", [
|
|
69
|
+
"addValidation",
|
|
70
|
+
"removeValidation",
|
|
71
|
+
"updateFormDirty",
|
|
72
|
+
]),
|
|
73
|
+
validate() {
|
|
74
|
+
this.notifications = [];
|
|
75
|
+
|
|
76
|
+
if (this.required && this.value.length == 0) {
|
|
77
|
+
var message = `${this.title} não pode ser vazio!`;
|
|
78
|
+
this.notifications.push(message);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (this.maxLength > 0) {
|
|
82
|
+
if (this.value.length > this.maxLength) {
|
|
83
|
+
var message = `Máximo de ${this.maxLength} caracteres!`;
|
|
84
|
+
this.notifications.push(message);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
pressedEnter() {
|
|
89
|
+
if (this.enter) this.enter();
|
|
90
|
+
},
|
|
91
|
+
outField() {
|
|
92
|
+
if (this.exited) this.exited();
|
|
93
|
+
},
|
|
94
|
+
cleanedField() {
|
|
95
|
+
if (this.value.length == 0) {
|
|
96
|
+
if (this.cleaned) this.cleaned();
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
computed: {
|
|
101
|
+
...mapState("validation", ["resetForm", "validations"]),
|
|
102
|
+
titlePlaceholder() {
|
|
103
|
+
return "Digite o " + this.title;
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
watch: {
|
|
107
|
+
value() {
|
|
108
|
+
this.validate();
|
|
109
|
+
this.formDirty = true;
|
|
110
|
+
// inverti a validação devido não colocar o default como true no props
|
|
111
|
+
var _value = this.markFormDirty == undefined ? true : this.markFormDirty;
|
|
112
|
+
if (_value) this.updateFormDirty(true);
|
|
113
|
+
},
|
|
114
|
+
notifications() {
|
|
115
|
+
let self = this;
|
|
116
|
+
this.notifications.forEach(function (notification) {
|
|
117
|
+
let obj = {
|
|
118
|
+
key: self.field + "&" + self.formName,
|
|
119
|
+
formName: self.formName,
|
|
120
|
+
notification: notification,
|
|
121
|
+
};
|
|
122
|
+
self.addValidation(obj);
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
if (this.notifications.length == 0) {
|
|
126
|
+
let obj = {
|
|
127
|
+
key: self.field + "&" + self.formName,
|
|
128
|
+
formName: self.formName,
|
|
129
|
+
};
|
|
130
|
+
self.removeValidation(obj);
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
resetForm: {
|
|
134
|
+
handler(form) {
|
|
135
|
+
if (form.name == this.formName) this.formDirty = false;
|
|
136
|
+
},
|
|
137
|
+
deep: true,
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
</script>
|
|
142
|
+
|
|
143
|
+
<style scoped>
|
|
144
|
+
.title {
|
|
145
|
+
font-size: 14px !important;
|
|
146
|
+
font-weight: 400 !important;
|
|
147
|
+
color: #0a0a0a;
|
|
148
|
+
letter-spacing: 0.5px !important;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
input::placeholder {
|
|
152
|
+
font-weight: 300 !important;
|
|
153
|
+
opacity: 0.5;
|
|
154
|
+
color: #969595;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.class-icon-title {
|
|
158
|
+
margin-right: 5px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.success {
|
|
162
|
+
color: #94aa2a;
|
|
163
|
+
font-size: 14px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.invalid {
|
|
167
|
+
color: #f0134d;
|
|
168
|
+
font-size: 14px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.margin-button {
|
|
172
|
+
margin-top: -3px;
|
|
173
|
+
}
|
|
174
|
+
</style>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<span class="num" @click="showEdit = true" v-if="!showEdit">
|
|
4
|
+
{{ value }}
|
|
5
|
+
<i class="icon-edit fa-solid fa-pen-to-square"></i>
|
|
6
|
+
</span>
|
|
7
|
+
<div class="wrapper" v-if="showEdit">
|
|
8
|
+
<input class="input" type="text" placeholder="Digite seu texto" @keyup.enter.prevent="done" v-bind:value="value"
|
|
9
|
+
v-on:input="$emit('input', $event.target.value)" v-if="showEdit" />
|
|
10
|
+
<span @click="done" v-if="showEdit">
|
|
11
|
+
<i class="fa-solid fa-check"></i>
|
|
12
|
+
</span>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
export default {
|
|
19
|
+
name: "InputTextEdit",
|
|
20
|
+
props: ["params", "enter", "value"],
|
|
21
|
+
data() {
|
|
22
|
+
return {
|
|
23
|
+
showEdit: false,
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
methods: {
|
|
27
|
+
done() {
|
|
28
|
+
this.showEdit = false;
|
|
29
|
+
if (this.enter) this.enter(this.params);
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
};
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<style scoped>
|
|
37
|
+
.input {
|
|
38
|
+
width: 90%;
|
|
39
|
+
border: none;
|
|
40
|
+
text-align: center;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.wrapper {
|
|
44
|
+
height: 37px;
|
|
45
|
+
width: 100%;
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
background: #fff;
|
|
50
|
+
border-radius: 8px;
|
|
51
|
+
border: 1px solid #eaedf3;
|
|
52
|
+
box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 3%);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.wrapper span {
|
|
56
|
+
width: 10px;
|
|
57
|
+
text-align: center;
|
|
58
|
+
font-size: 14px;
|
|
59
|
+
font-weight: 600;
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
user-select: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.icon-edit {
|
|
65
|
+
margin-left: 0px;
|
|
66
|
+
color: rgb(128, 127, 127);
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
}
|
|
69
|
+
</style>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<InputText
|
|
4
|
+
:title="title"
|
|
5
|
+
:field="field"
|
|
6
|
+
:formName="formName"
|
|
7
|
+
:required="required"
|
|
8
|
+
:mask="['(##) ####-####', '(##) #####-####']"
|
|
9
|
+
:maxLength="maxLength"
|
|
10
|
+
:markFormDirty="markFormDirty"
|
|
11
|
+
v-model="mobile"
|
|
12
|
+
/>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
<script>
|
|
16
|
+
import InputText from "./InputText";
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
name: "InputWhatsApp",
|
|
20
|
+
props: [
|
|
21
|
+
"title",
|
|
22
|
+
"field",
|
|
23
|
+
"disabled",
|
|
24
|
+
"formName",
|
|
25
|
+
"required",
|
|
26
|
+
"maxLength",
|
|
27
|
+
"value",
|
|
28
|
+
"markFormDirty",
|
|
29
|
+
],
|
|
30
|
+
components: { InputText },
|
|
31
|
+
data() {
|
|
32
|
+
return {
|
|
33
|
+
mobile: "",
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
created() {
|
|
37
|
+
this.mobile = this.value;
|
|
38
|
+
},
|
|
39
|
+
watch: {
|
|
40
|
+
value() {
|
|
41
|
+
this.mobile = this.value;
|
|
42
|
+
},
|
|
43
|
+
mobile() {
|
|
44
|
+
this.$emit("input", this.mobile);
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
</script>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<vodal :duration="80" :show="modal.open" @hide="hide()" :width="width" :height="height" :closeOnEsc="closeOnEsc"
|
|
4
|
+
:closeButton="closeButton" :closeOnClickMask="false">
|
|
5
|
+
<div class="d-block text-left">
|
|
6
|
+
<Messages v-if="!vodal.open" />
|
|
7
|
+
<div class="title">{{ title }}</div>
|
|
8
|
+
<hr class="hr" />
|
|
9
|
+
<slot></slot>
|
|
10
|
+
</div>
|
|
11
|
+
<div slot="modal-footer"></div>
|
|
12
|
+
</vodal>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
import Messages from "@nixweb/nixloc-ui/src/component/shared/Messages";
|
|
18
|
+
import Vodal from "vodal";
|
|
19
|
+
|
|
20
|
+
import { mapState, mapMutations } from "vuex";
|
|
21
|
+
|
|
22
|
+
export default {
|
|
23
|
+
name: "Modal",
|
|
24
|
+
props: {
|
|
25
|
+
title: String,
|
|
26
|
+
width: Number,
|
|
27
|
+
height: Number,
|
|
28
|
+
closeOnEsc: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: true,
|
|
31
|
+
},
|
|
32
|
+
closeButton: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: true,
|
|
35
|
+
},
|
|
36
|
+
onHideModal: Function,
|
|
37
|
+
},
|
|
38
|
+
components: { Messages, Vodal },
|
|
39
|
+
computed: {
|
|
40
|
+
...mapState("generic", ["modal", "vodal"]),
|
|
41
|
+
},
|
|
42
|
+
methods: {
|
|
43
|
+
...mapMutations("generic", ["hideModal"]),
|
|
44
|
+
hide() {
|
|
45
|
+
if (this.onHideModal) this.onHideModal();
|
|
46
|
+
this.hideModal();
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<style scoped>
|
|
53
|
+
.title {
|
|
54
|
+
font-size: 18px;
|
|
55
|
+
margin-bottom: 5px;
|
|
56
|
+
}
|
|
57
|
+
</style>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<span class="title">{{ title }}</span>
|
|
4
|
+
<div class="options">
|
|
5
|
+
<b-form-group>
|
|
6
|
+
<b-form-radio-group v-model="selected" :options="options" :disabled="disabled"
|
|
7
|
+
:stacked="stacked"></b-form-radio-group>
|
|
8
|
+
</b-form-group>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
import Tip from "../shared/Tip.vue";
|
|
15
|
+
|
|
16
|
+
import { mapMutations, mapGetters } from "vuex";
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
components: { Tip },
|
|
20
|
+
name: "options",
|
|
21
|
+
props: {
|
|
22
|
+
title: String,
|
|
23
|
+
options: Array,
|
|
24
|
+
initialFieldTarget: String,
|
|
25
|
+
fieldTarget: String,
|
|
26
|
+
disabled: Boolean,
|
|
27
|
+
stacked: Boolean,
|
|
28
|
+
markFormDirty: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: true,
|
|
31
|
+
},
|
|
32
|
+
changed: Function,
|
|
33
|
+
value: Number,
|
|
34
|
+
},
|
|
35
|
+
data() {
|
|
36
|
+
return {
|
|
37
|
+
selected: this.value,
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
mounted() {
|
|
41
|
+
if (this.initialFieldTarget) {
|
|
42
|
+
let value = this.initialFieldTarget.value;
|
|
43
|
+
let obj = { tag: `${this.title}: ${value}`, fieldTarget: this.fieldTarget, value: value };
|
|
44
|
+
this.addFilter(obj);
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
computed: {
|
|
48
|
+
...mapGetters("generic", ["event"]),
|
|
49
|
+
},
|
|
50
|
+
methods: {
|
|
51
|
+
...mapMutations("validation", ["updateFormDirty"]),
|
|
52
|
+
...mapMutations("generic", ["addFilter"]),
|
|
53
|
+
},
|
|
54
|
+
watch: {
|
|
55
|
+
value() {
|
|
56
|
+
this.selected = this.value;
|
|
57
|
+
},
|
|
58
|
+
selected() {
|
|
59
|
+
this.$emit("input", this.selected);
|
|
60
|
+
|
|
61
|
+
if (this.markFormDirty) this.updateFormDirty(true);
|
|
62
|
+
if (this.changed) this.changed();
|
|
63
|
+
if (this.fieldTarget) {
|
|
64
|
+
let obj = { tag: `${this.title}: ${this.selected}`, fieldTarget: this.fieldTarget, value: this.selected };
|
|
65
|
+
this.addFilter(obj);
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
event: {
|
|
69
|
+
handler(event) {
|
|
70
|
+
if (event.name == "tagRemoved") {
|
|
71
|
+
if (this.fieldTarget == event.data)
|
|
72
|
+
this.$emit("input", "");
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
deep: true,
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
</script>
|
|
80
|
+
<style>
|
|
81
|
+
.custom-control-label {
|
|
82
|
+
font-size: 13px !important;
|
|
83
|
+
font-weight: 400 !important;
|
|
84
|
+
text-transform: uppercase;
|
|
85
|
+
color: #778498;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.options {
|
|
89
|
+
margin-top: 5px;
|
|
90
|
+
}
|
|
91
|
+
</style>
|