@nixweb/nixloc-ui 0.0.128 → 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 +87 -79
- package/src/App.vue +13 -13
- package/src/component/forms/Button.vue +171 -170
- package/src/component/forms/ButtonGroup.vue +57 -0
- package/src/component/forms/ButtonSub.vue +98 -0
- package/src/component/forms/CheckboxGroup.vue +73 -72
- package/src/component/forms/CheckboxSimple.vue +46 -46
- package/src/component/forms/Color.vue +38 -38
- package/src/component/forms/DateTime.vue +167 -167
- package/src/component/forms/Dropdown.vue +242 -218
- package/src/component/forms/EditorHtml.vue +126 -126
- package/src/component/forms/FileUpload.vue +185 -185
- package/src/component/forms/IncrementDecrement.vue +7 -2
- package/src/component/forms/InputDecimal.vue +150 -142
- package/src/component/forms/InputDecimalDiscount.vue +92 -0
- package/src/component/forms/InputNumber.vue +160 -154
- package/src/component/forms/InputPassword.vue +135 -135
- package/src/component/forms/InputText.vue +174 -162
- package/src/component/forms/InputTextEdit.vue +68 -0
- package/src/component/forms/Modal.vue +65 -65
- package/src/component/forms/RadioGroup.vue +50 -50
- package/src/component/forms/Select.vue +351 -349
- package/src/component/forms/SelectStatic.vue +127 -127
- package/src/component/forms/Slider.vue +18 -18
- package/src/component/forms/TextArea.vue +126 -126
- package/src/component/forms/Toggle.vue +3 -1
- package/src/component/layout/Account.vue +3 -3
- package/src/component/layout/Alert.vue +92 -92
- package/src/component/layout/Badge.vue +104 -103
- package/src/component/layout/FixedBar.vue +100 -100
- package/src/component/layout/Gantt.vue +130 -0
- package/src/component/layout/Header.vue +38 -38
- package/src/component/layout/IconMolded.vue +48 -0
- package/src/component/layout/LoadingFullPage.vue +27 -27
- package/src/component/layout/Menu.vue +213 -210
- package/src/component/layout/Molded.vue +28 -28
- package/src/component/layout/Panel.vue +140 -140
- package/src/component/layout/Popover.vue +126 -126
- package/src/component/layout/ScrollBar.vue +42 -42
- package/src/component/layout/Wizard.vue +211 -211
- package/src/component/rental/DisplayCalculatePeriod.vue +49 -0
- package/src/component/rental/DisplayPeriodRent.vue +19 -44
- package/src/component/rental/DisplayTotalization.vue +11 -2
- package/src/component/shared/Collapse.vue +131 -131
- package/src/component/shared/Confirmation.vue +21 -2
- package/src/component/shared/DocumentPreview.vue +2 -1
- package/src/component/shared/ExportPDF.vue +116 -116
- package/src/component/shared/FullCalendar.vue +159 -0
- package/src/component/shared/HorizontalFilter.vue +59 -59
- package/src/component/shared/Loading.vue +107 -107
- package/src/component/shared/LoadingMoreButton.vue +23 -23
- package/src/component/shared/Messages.vue +81 -81
- package/src/component/shared/PDFViewer.vue +22 -22
- package/src/component/shared/Pagination.vue +52 -52
- package/src/component/shared/ProgressBar.vue +22 -22
- package/src/component/shared/QueryButton.vue +66 -66
- package/src/component/shared/SaveCancel.vue +3 -2
- package/src/component/shared/Search.vue +154 -154
- package/src/component/shared/Table.vue +163 -163
- package/src/component/shared/TableButton.vue +36 -36
- package/src/component/shared/TableTotalization.vue +47 -47
- package/src/component/shared/TimeLine.vue +47 -0
- package/src/component/shared/Tip.vue +42 -42
- package/src/component/shared/Toast.vue +54 -54
- package/src/component/shared/VerticalFilter.vue +97 -97
- package/src/component/shared/query-builder/AddRule.vue +181 -181
- package/src/component/shared/query-builder/DynamicComponentList.vue +73 -73
- package/src/component/shared/query-builder/QueryBuilder.vue +69 -69
- package/src/component/shared/query-builder/utilities.js +21 -21
- package/src/component/template/ListViewWithDataHandler.vue +260 -260
- package/src/component/template/ViewTemplateConfiguration.vue +64 -64
- package/src/component/template/ViewTemplateReportList.vue +1 -1
- package/src/component/template/ViewTemplateReportPreview.vue +0 -1
- package/src/component/template/ViewTemplateWithSalveCancel.vue +32 -32
- package/src/component/template/ViewTemplateWithTable.vue +56 -56
- package/src/config/axios.js +9 -9
- package/src/config/dicas.js +14 -14
- package/src/config/router.js +13 -13
- package/src/config/token.js +14 -14
- package/src/main.js +23 -23
- package/src/store/modules/generic.js +543 -512
- package/src/store/modules/user.js +3 -0
- package/src/store/modules/validation.js +38 -38
- package/src/store/store.js +13 -13
|
@@ -1,142 +1,150 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="form-group">
|
|
3
|
-
<label v-if="title">
|
|
4
|
-
<span class="title">{{ title }}</span>
|
|
5
|
-
<span class="required" v-if="required">*</span>
|
|
6
|
-
<Tip :field="field" :formName="formName" />
|
|
7
|
-
</label>
|
|
8
|
-
<div class="inner-addon right-addon">
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
this.
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
this.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="form-group">
|
|
3
|
+
<label v-if="title">
|
|
4
|
+
<span class="title">{{ title }}</span>
|
|
5
|
+
<span class="required" v-if="required">*</span>
|
|
6
|
+
<Tip :field="field" :formName="formName" />
|
|
7
|
+
</label>
|
|
8
|
+
<div class="inner-addon right-addon">
|
|
9
|
+
<div
|
|
10
|
+
class="required glyphicon"
|
|
11
|
+
v-if="notifications.length > 0 && formDirty"
|
|
12
|
+
>
|
|
13
|
+
<i class="fas fa-exclamation-triangle"></i>
|
|
14
|
+
</div>
|
|
15
|
+
<slot v-else></slot>
|
|
16
|
+
<vue-numeric
|
|
17
|
+
:style="_style"
|
|
18
|
+
class="form-control"
|
|
19
|
+
v-on:keyup.enter.native="pressedEnter"
|
|
20
|
+
:class="{ 'is-invalid': notifications.length > 0 && formDirty }"
|
|
21
|
+
:placeholder="placeholder"
|
|
22
|
+
:disabled="disabled"
|
|
23
|
+
currency="R$"
|
|
24
|
+
separator="."
|
|
25
|
+
v-bind:precision="2"
|
|
26
|
+
v-model="valueLocal"
|
|
27
|
+
></vue-numeric>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<div v-if="formDirty">
|
|
31
|
+
<div v-for="message in notifications" :key="message">
|
|
32
|
+
<span class="invalid">{{ message }}</span>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script>
|
|
39
|
+
import Tip from "../shared/Tip.vue";
|
|
40
|
+
import VueNumeric from "vue-numeric";
|
|
41
|
+
|
|
42
|
+
import { mapState, mapMutations } from "vuex";
|
|
43
|
+
|
|
44
|
+
export default {
|
|
45
|
+
name: "InputDecimal",
|
|
46
|
+
mixins: [],
|
|
47
|
+
props: {
|
|
48
|
+
title: String,
|
|
49
|
+
field: String,
|
|
50
|
+
disabled: Boolean,
|
|
51
|
+
placeholder: String,
|
|
52
|
+
formName: String,
|
|
53
|
+
_style: String,
|
|
54
|
+
markFormDirty: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: true,
|
|
57
|
+
},
|
|
58
|
+
required: Boolean,
|
|
59
|
+
value: Number,
|
|
60
|
+
enter: Function,
|
|
61
|
+
},
|
|
62
|
+
components: {
|
|
63
|
+
VueNumeric,
|
|
64
|
+
Tip,
|
|
65
|
+
},
|
|
66
|
+
data() {
|
|
67
|
+
return {
|
|
68
|
+
notifications: [],
|
|
69
|
+
formDirty: false,
|
|
70
|
+
_value: 0,
|
|
71
|
+
valueLocal: 20,
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
created() {
|
|
75
|
+
// não carregar as validações iniciais para number
|
|
76
|
+
this.valueLocal = this.value;
|
|
77
|
+
},
|
|
78
|
+
methods: {
|
|
79
|
+
...mapMutations("validation", [
|
|
80
|
+
"addValidation",
|
|
81
|
+
"removeValidation",
|
|
82
|
+
"updateFormDirty",
|
|
83
|
+
]),
|
|
84
|
+
validate() {
|
|
85
|
+
this.notifications = [];
|
|
86
|
+
if (this.valueLocal == 0) return;
|
|
87
|
+
if (this.required && !this.valueLocal) {
|
|
88
|
+
var message = `${this.title} não pode ser vazio!`;
|
|
89
|
+
this.notifications.push(message);
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
pressedEnter() {
|
|
93
|
+
if (this.enter) this.enter();
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
computed: {
|
|
97
|
+
...mapState("validation", ["resetForm"]),
|
|
98
|
+
},
|
|
99
|
+
watch: {
|
|
100
|
+
value() {
|
|
101
|
+
this.valueLocal = this.value;
|
|
102
|
+
},
|
|
103
|
+
valueLocal() {
|
|
104
|
+
this.validate();
|
|
105
|
+
this.$emit("input", this.valueLocal);
|
|
106
|
+
this.formDirty = true;
|
|
107
|
+
if (this.markFormDirty) this.updateFormDirty(true);
|
|
108
|
+
},
|
|
109
|
+
notifications() {
|
|
110
|
+
let self = this;
|
|
111
|
+
this.notifications.forEach(function (notification) {
|
|
112
|
+
let obj = {
|
|
113
|
+
key: self.field + "&" + self.formName,
|
|
114
|
+
formName: self.formName,
|
|
115
|
+
notification: notification,
|
|
116
|
+
};
|
|
117
|
+
self.addValidation(obj);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
if (this.notifications.length == 0) {
|
|
121
|
+
let obj = {
|
|
122
|
+
key: self.field + "&" + self.formName,
|
|
123
|
+
formName: self.formName,
|
|
124
|
+
};
|
|
125
|
+
self.removeValidation(obj);
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
resetForm: {
|
|
129
|
+
handler(form) {
|
|
130
|
+
if (form.name == this.formName) this.formDirty = false;
|
|
131
|
+
},
|
|
132
|
+
deep: true,
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
</script>
|
|
137
|
+
|
|
138
|
+
<style scoped>
|
|
139
|
+
.success {
|
|
140
|
+
color: #94aa2a;
|
|
141
|
+
font-size: 14px;
|
|
142
|
+
}
|
|
143
|
+
.invalid {
|
|
144
|
+
color: #f0134d;
|
|
145
|
+
font-size: 14px;
|
|
146
|
+
}
|
|
147
|
+
.margin-button {
|
|
148
|
+
margin-top: -2px;
|
|
149
|
+
}
|
|
150
|
+
</style>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<InputDecimal
|
|
4
|
+
v-if="!discount.discountByPercentage"
|
|
5
|
+
:title="title"
|
|
6
|
+
field="discount"
|
|
7
|
+
:required="required"
|
|
8
|
+
:formName="formName"
|
|
9
|
+
_style="color:red;"
|
|
10
|
+
v-model="discount.discount"
|
|
11
|
+
>
|
|
12
|
+
<div class="glyphicon margin-button">
|
|
13
|
+
<Button
|
|
14
|
+
_key="btnDiscount"
|
|
15
|
+
title=""
|
|
16
|
+
type="primary"
|
|
17
|
+
classIcon="fa-solid fa-brazilian-real-sign"
|
|
18
|
+
size="small"
|
|
19
|
+
:clicked="change"
|
|
20
|
+
/></div
|
|
21
|
+
></InputDecimal>
|
|
22
|
+
<InputNumber
|
|
23
|
+
v-if="discount.discountByPercentage"
|
|
24
|
+
:title="title"
|
|
25
|
+
field="discount"
|
|
26
|
+
:formName="formName"
|
|
27
|
+
:required="false"
|
|
28
|
+
_style="color:red;"
|
|
29
|
+
:maxLength="5"
|
|
30
|
+
type="float"
|
|
31
|
+
v-model="discount.discount"
|
|
32
|
+
><div class="glyphicon margin-button">
|
|
33
|
+
<Button
|
|
34
|
+
_key="btnDiscount"
|
|
35
|
+
title=""
|
|
36
|
+
type="primary"
|
|
37
|
+
classIcon="fa-solid fa-percent"
|
|
38
|
+
size="small"
|
|
39
|
+
:clicked="change"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</InputNumber>
|
|
43
|
+
</div>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<script>
|
|
47
|
+
import InputNumber from "@nixweb/nixloc-ui/src/component/forms/InputNumber";
|
|
48
|
+
import InputDecimal from "@nixweb/nixloc-ui/src/component/forms/InputDecimal";
|
|
49
|
+
import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
|
|
50
|
+
|
|
51
|
+
import { mapMutations } from "vuex";
|
|
52
|
+
|
|
53
|
+
export default {
|
|
54
|
+
name: "InputDecimalDiscount",
|
|
55
|
+
components: {
|
|
56
|
+
InputNumber,
|
|
57
|
+
InputDecimal,
|
|
58
|
+
Button,
|
|
59
|
+
},
|
|
60
|
+
props: ["formName", "disabled", "_style", "required", "value"],
|
|
61
|
+
data() {
|
|
62
|
+
return {
|
|
63
|
+
title: "Desconto em %",
|
|
64
|
+
discount: { discountByPercentage: false, discount: 0 },
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
methods: {
|
|
68
|
+
...mapMutations("generic", ["removeLoading"]),
|
|
69
|
+
change() {
|
|
70
|
+
this.discount.discountByPercentage =
|
|
71
|
+
this.discount.discountByPercentage != true;
|
|
72
|
+
if (this.discount.discountByPercentage) this.title = "Desconto em %";
|
|
73
|
+
if (!this.discount.discountByPercentage) this.title = "Desconto em R$";
|
|
74
|
+
this.removeLoading(["btnDiscount"]);
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
watch: {
|
|
78
|
+
discount: {
|
|
79
|
+
handler(discount) {
|
|
80
|
+
this.$emit("input", discount);
|
|
81
|
+
},
|
|
82
|
+
deep: true,
|
|
83
|
+
},
|
|
84
|
+
value: {
|
|
85
|
+
handler(value) {
|
|
86
|
+
this.discount = value;
|
|
87
|
+
},
|
|
88
|
+
deep: true,
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
</script>
|