@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
|
@@ -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>
|
|
@@ -12,8 +12,10 @@
|
|
|
12
12
|
></i>
|
|
13
13
|
<slot v-else></slot>
|
|
14
14
|
<input
|
|
15
|
+
:style="_style"
|
|
15
16
|
class="form-control"
|
|
16
17
|
type="number"
|
|
18
|
+
:disabled="disabled"
|
|
17
19
|
v-model="valueLocal"
|
|
18
20
|
@keyup.enter.prevent="pressedEnter"
|
|
19
21
|
/>
|
|
@@ -38,6 +40,7 @@ export default {
|
|
|
38
40
|
props: {
|
|
39
41
|
title: String,
|
|
40
42
|
field: String,
|
|
43
|
+
_style: String,
|
|
41
44
|
placeholder: String,
|
|
42
45
|
disabled: Boolean,
|
|
43
46
|
formName: String,
|
|
@@ -151,4 +154,7 @@ export default {
|
|
|
151
154
|
color: #f0134d;
|
|
152
155
|
font-size: 14px;
|
|
153
156
|
}
|
|
157
|
+
.margin-button {
|
|
158
|
+
margin-top: -2px;
|
|
159
|
+
}
|
|
154
160
|
</style>
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="form-group">
|
|
3
3
|
<label>
|
|
4
|
+
<i class="title class-icon-title" :class="classIconTitle"></i>
|
|
4
5
|
<span class="title" :style="'color: ' + titleColor">{{ title }} </span>
|
|
5
6
|
<span class="required" v-if="required">*</span>
|
|
6
7
|
<Tip :field="field" :formName="formName" />
|
|
7
8
|
</label>
|
|
8
9
|
<div class="inner-addon right-addon">
|
|
9
|
-
<div
|
|
10
|
+
<div
|
|
11
|
+
class="required glyphicon"
|
|
12
|
+
v-if="notifications.length > 0 && formDirty"
|
|
13
|
+
>
|
|
10
14
|
<i class="fas fa-exclamation-triangle"></i>
|
|
11
15
|
</div>
|
|
12
16
|
<slot v-else></slot>
|
|
@@ -42,6 +46,7 @@ export default {
|
|
|
42
46
|
name: "InputText",
|
|
43
47
|
props: [
|
|
44
48
|
"title",
|
|
49
|
+
"classIconTitle",
|
|
45
50
|
"field",
|
|
46
51
|
"placeholder",
|
|
47
52
|
"disabled",
|
|
@@ -73,7 +78,11 @@ export default {
|
|
|
73
78
|
this.validate();
|
|
74
79
|
},
|
|
75
80
|
methods: {
|
|
76
|
-
...mapMutations("validation", [
|
|
81
|
+
...mapMutations("validation", [
|
|
82
|
+
"addValidation",
|
|
83
|
+
"removeValidation",
|
|
84
|
+
"updateFormDirty",
|
|
85
|
+
]),
|
|
77
86
|
validate() {
|
|
78
87
|
this.notifications = [];
|
|
79
88
|
|
|
@@ -142,6 +151,14 @@ export default {
|
|
|
142
151
|
</script>
|
|
143
152
|
|
|
144
153
|
<style scoped>
|
|
154
|
+
.title {
|
|
155
|
+
font-size: 14px !important;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.class-icon-title {
|
|
159
|
+
margin-right: 5px;
|
|
160
|
+
}
|
|
161
|
+
|
|
145
162
|
.success {
|
|
146
163
|
color: #94aa2a;
|
|
147
164
|
font-size: 14px;
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
|
9
|
+
class="input"
|
|
10
|
+
type="text"
|
|
11
|
+
placeholder="Digite seu texto"
|
|
12
|
+
@keyup.enter.prevent="showEdit = false"
|
|
13
|
+
v-bind:value="value"
|
|
14
|
+
v-on:input="$emit('input', $event.target.value)"
|
|
15
|
+
v-if="showEdit"
|
|
16
|
+
/>
|
|
17
|
+
<span @click="showEdit = false" v-if="showEdit">
|
|
18
|
+
<i class="fa-solid fa-check"></i>
|
|
19
|
+
</span>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
export default {
|
|
26
|
+
name: "InputTextEdit",
|
|
27
|
+
props: ["value"],
|
|
28
|
+
data() {
|
|
29
|
+
return {
|
|
30
|
+
showEdit: false,
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<style scoped>
|
|
37
|
+
.input {
|
|
38
|
+
width: 150px;
|
|
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
|
+
.wrapper span {
|
|
55
|
+
width: 10px;
|
|
56
|
+
text-align: center;
|
|
57
|
+
font-size: 14px;
|
|
58
|
+
font-weight: 600;
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
user-select: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.icon-edit {
|
|
64
|
+
margin-left: 0px;
|
|
65
|
+
color: rgb(128, 127, 127);
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
}
|
|
68
|
+
</style>
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<span class="title">{{ title }}</span>
|
|
4
|
-
<Tip :field="field" :formName="formName" />
|
|
5
4
|
<div class="options">
|
|
6
5
|
<b-form-group>
|
|
7
6
|
<b-form-radio-group
|
|
8
7
|
v-model="selected"
|
|
9
8
|
:options="options"
|
|
10
9
|
:disabled="disabled"
|
|
10
|
+
:stacked="stacked"
|
|
11
11
|
></b-form-radio-group>
|
|
12
12
|
</b-form-group>
|
|
13
13
|
</div>
|
|
@@ -22,7 +22,7 @@ import { mapMutations } from "vuex";
|
|
|
22
22
|
export default {
|
|
23
23
|
components: { Tip },
|
|
24
24
|
name: "options",
|
|
25
|
-
props: ["title", "options", "
|
|
25
|
+
props: ["title", "options", "disabled", "value", "stacked", "markFormDirty"],
|
|
26
26
|
data() {
|
|
27
27
|
return {
|
|
28
28
|
selected: this.value,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
2
|
+
<div class="margin">
|
|
3
3
|
<label>
|
|
4
4
|
<span class="title">{{ title }}</span>
|
|
5
5
|
<span class="required" v-if="required">*</span>
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
></vue-loading>
|
|
39
39
|
<div class="before-list" v-if="!loading">
|
|
40
40
|
<Button
|
|
41
|
-
v-if="
|
|
41
|
+
v-if="showNewRegister"
|
|
42
42
|
key="addNewRegister"
|
|
43
43
|
type="primary"
|
|
44
44
|
title="Novo"
|
|
@@ -54,7 +54,10 @@
|
|
|
54
54
|
/>
|
|
55
55
|
</div>
|
|
56
56
|
</div>
|
|
57
|
-
<div
|
|
57
|
+
<div
|
|
58
|
+
slot="afterList"
|
|
59
|
+
v-if="totalRecords > 20 && data.length < totalRecords"
|
|
60
|
+
>
|
|
58
61
|
<div class="after-list text-center">
|
|
59
62
|
<Button
|
|
60
63
|
key="loadingMore"
|
|
@@ -117,6 +120,10 @@ export default {
|
|
|
117
120
|
value: Object,
|
|
118
121
|
changed: Function,
|
|
119
122
|
nameNewRegister: String,
|
|
123
|
+
showNewRegister: {
|
|
124
|
+
type: Boolean,
|
|
125
|
+
default: true,
|
|
126
|
+
},
|
|
120
127
|
titleNewRegister: String,
|
|
121
128
|
widthNewRegister: Number,
|
|
122
129
|
heightNewRegister: Number,
|
|
@@ -298,6 +305,10 @@ export default {
|
|
|
298
305
|
</script>
|
|
299
306
|
|
|
300
307
|
<style scoped>
|
|
308
|
+
.margin {
|
|
309
|
+
margin-bottom: 10px;
|
|
310
|
+
}
|
|
311
|
+
|
|
301
312
|
div.before-list {
|
|
302
313
|
padding: 8px;
|
|
303
314
|
}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
<div class="main">
|
|
3
3
|
<b-row>
|
|
4
4
|
<b-col xs="6" sm="6" md="6" lg="6" xl="6">
|
|
5
|
-
<
|
|
5
|
+
<span class="title">{{ title }}</span>
|
|
6
|
+
<br />
|
|
6
7
|
</b-col>
|
|
7
8
|
<b-col xs="6" sm="6" md="6" lg="4" xl="4">
|
|
8
9
|
<VueToggles
|
|
@@ -65,5 +66,6 @@ export default {
|
|
|
65
66
|
|
|
66
67
|
.title {
|
|
67
68
|
padding-right: 35px;
|
|
69
|
+
margin-bottom: 50px !important;
|
|
68
70
|
}
|
|
69
71
|
</style>
|
|
@@ -58,7 +58,7 @@ export default {
|
|
|
58
58
|
</script>
|
|
59
59
|
<style scoped>
|
|
60
60
|
.photo-container {
|
|
61
|
-
margin-top: -
|
|
61
|
+
margin-top: -37px;
|
|
62
62
|
padding-right: 10px;
|
|
63
63
|
cursor: pointer;
|
|
64
64
|
position: fixed;
|
|
@@ -69,8 +69,8 @@ export default {
|
|
|
69
69
|
|
|
70
70
|
img {
|
|
71
71
|
border-radius: 50%;
|
|
72
|
-
height:
|
|
73
|
-
width:
|
|
72
|
+
height: 40px;
|
|
73
|
+
width: 40px;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
.profile-container {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
2
|
+
<div class="side-by-side">
|
|
3
3
|
<div
|
|
4
4
|
class="badge"
|
|
5
5
|
:class="{
|
|
@@ -33,6 +33,7 @@ export default {
|
|
|
33
33
|
|
|
34
34
|
<style scoped>
|
|
35
35
|
.badge {
|
|
36
|
+
margin-left: 10px;
|
|
36
37
|
padding: 8px 12px;
|
|
37
38
|
cursor: pointer;
|
|
38
39
|
border: none;
|
|
@@ -50,12 +51,12 @@ export default {
|
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
.medium {
|
|
53
|
-
padding: 7px 12px;
|
|
54
|
+
padding: 7px 12px !important;
|
|
54
55
|
font-size: 13px;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
.large {
|
|
58
|
-
padding: 11px 16px;
|
|
59
|
+
padding: 11px 16px !important;
|
|
59
60
|
font-size: 14px;
|
|
60
61
|
}
|
|
61
62
|
|
|
@@ -73,8 +74,8 @@ export default {
|
|
|
73
74
|
|
|
74
75
|
.success {
|
|
75
76
|
color: #fff;
|
|
76
|
-
background: #
|
|
77
|
-
border-color: #
|
|
77
|
+
background: #38A169;
|
|
78
|
+
border-color: #38A169;
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
.info {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<div
|
|
4
4
|
v-show="!isLoading('panel')"
|
|
5
|
-
class="bar"
|
|
5
|
+
class="bar side-by-side"
|
|
6
6
|
:style="'min-height:' + height + 'px;'"
|
|
7
7
|
:class="{
|
|
8
8
|
top: position == 'top',
|
|
@@ -10,18 +10,29 @@
|
|
|
10
10
|
}"
|
|
11
11
|
>
|
|
12
12
|
<div class="size">
|
|
13
|
-
<slot></slot>
|
|
13
|
+
<div class="side-by-side"><slot></slot></div>
|
|
14
|
+
<div
|
|
15
|
+
class="close-icon side-by-side"
|
|
16
|
+
v-if="position == 'top' && showButtonClose"
|
|
17
|
+
@click="close"
|
|
18
|
+
>
|
|
19
|
+
<i class="fa-regular fa-xmark"></i>
|
|
20
|
+
</div>
|
|
14
21
|
</div>
|
|
15
22
|
</div>
|
|
16
23
|
</div>
|
|
17
24
|
</template>
|
|
18
25
|
|
|
19
26
|
<script>
|
|
20
|
-
import { mapGetters } from "vuex";
|
|
27
|
+
import { mapGetters, mapMutations } from "vuex";
|
|
21
28
|
|
|
22
29
|
export default {
|
|
23
30
|
name: "FixedBar",
|
|
24
31
|
props: {
|
|
32
|
+
showButtonClose: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false,
|
|
35
|
+
},
|
|
25
36
|
position: {
|
|
26
37
|
type: String,
|
|
27
38
|
default: "top",
|
|
@@ -34,6 +45,12 @@ export default {
|
|
|
34
45
|
computed: {
|
|
35
46
|
...mapGetters("generic", ["isLoading"]),
|
|
36
47
|
},
|
|
48
|
+
methods: {
|
|
49
|
+
...mapMutations("generic", ["addEvent"]),
|
|
50
|
+
close() {
|
|
51
|
+
this.addEvent({ name: "closedFixedBar" });
|
|
52
|
+
},
|
|
53
|
+
},
|
|
37
54
|
};
|
|
38
55
|
</script>
|
|
39
56
|
|
|
@@ -42,10 +59,9 @@ export default {
|
|
|
42
59
|
background-color: white;
|
|
43
60
|
position: fixed;
|
|
44
61
|
width: 100%;
|
|
45
|
-
overflow: hidden;
|
|
46
62
|
z-index: 20;
|
|
47
63
|
padding: 18px;
|
|
48
|
-
|
|
64
|
+
padding-left: 100px;
|
|
49
65
|
}
|
|
50
66
|
|
|
51
67
|
.size {
|
|
@@ -57,12 +73,28 @@ export default {
|
|
|
57
73
|
top: 0;
|
|
58
74
|
left: 0;
|
|
59
75
|
right: 0;
|
|
60
|
-
border-bottom:
|
|
76
|
+
border-bottom: 0px solid #e1e1e2;
|
|
77
|
+
box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 5%);
|
|
78
|
+
border-bottom: 0px solid #eff0f1;
|
|
61
79
|
}
|
|
62
80
|
|
|
63
81
|
.footer {
|
|
64
82
|
left: 0;
|
|
65
83
|
bottom: 0px;
|
|
66
|
-
border-top:
|
|
84
|
+
border-top: 0px solid #e1e1e2;
|
|
85
|
+
box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 5%);
|
|
86
|
+
border-top: 0px solid #eff0f1;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.close-icon {
|
|
90
|
+
float: right;
|
|
91
|
+
font-size: 30px;
|
|
92
|
+
font-weight: 400;
|
|
93
|
+
line-height: 1;
|
|
94
|
+
color: #b9babb;
|
|
95
|
+
text-shadow: 0 1px 0 #fff;
|
|
96
|
+
padding-right: 80px;
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
|
|
67
99
|
}
|
|
68
100
|
</style>
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
|
|
2
|
+
<template>
|
|
3
|
+
<div>
|
|
4
|
+
<div v-if="tasks.length > 0">
|
|
5
|
+
<ButtonGroup :initialOption="initialOption" :options="options" />
|
|
6
|
+
<slot></slot>
|
|
7
|
+
<div class="gantt">
|
|
8
|
+
<svg ref="gantt" />
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
<div v-else>
|
|
12
|
+
Nenhum registro encontrado!
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import ButtonGroup from "@nixweb/nixloc-ui/src/component/forms/ButtonGroup";
|
|
19
|
+
|
|
20
|
+
import { mapGetters } from "vuex";
|
|
21
|
+
|
|
22
|
+
export default {
|
|
23
|
+
name: "FrappeGantt",
|
|
24
|
+
components: {
|
|
25
|
+
ButtonGroup,
|
|
26
|
+
},
|
|
27
|
+
props: {
|
|
28
|
+
initialOption: String,
|
|
29
|
+
options: Array,
|
|
30
|
+
tasks: Array,
|
|
31
|
+
},
|
|
32
|
+
data() {
|
|
33
|
+
return {
|
|
34
|
+
gantt: {},
|
|
35
|
+
mode: "day",
|
|
36
|
+
viewMode: "",
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
mounted() {
|
|
40
|
+
this.setupGanttChart();
|
|
41
|
+
},
|
|
42
|
+
computed: {
|
|
43
|
+
...mapGetters("generic", ["event"]),
|
|
44
|
+
},
|
|
45
|
+
methods: {
|
|
46
|
+
setupGanttChart() {
|
|
47
|
+
this.gantt = new Gantt(this.$refs.gantt, this.tasks, {
|
|
48
|
+
language: "ptBr",
|
|
49
|
+
date_format: "YYYY-MM-DD",
|
|
50
|
+
bar_corner_radius: 10,
|
|
51
|
+
on_click: (task) => {
|
|
52
|
+
this.$emit("task-updated", task);
|
|
53
|
+
},
|
|
54
|
+
on_date_change: (task, start, end) => {
|
|
55
|
+
this.$emit("task-date-updated", { task, start, end });
|
|
56
|
+
},
|
|
57
|
+
on_progress_change: (task, progress) => {
|
|
58
|
+
this.$emit("task-progress-updated", { task, progress });
|
|
59
|
+
},
|
|
60
|
+
//I doubt you will ever need this as the developer already knows what view mode they set.
|
|
61
|
+
on_view_change: (mode) => {
|
|
62
|
+
this.$emit("view-mode-updated", mode);
|
|
63
|
+
},
|
|
64
|
+
custom_popup_html: function (task) {
|
|
65
|
+
return `
|
|
66
|
+
<div class="details-container">
|
|
67
|
+
<p class="title-details">Nº Locação: ${task.number}</p>
|
|
68
|
+
<p class="title-details">${task.customer}</p>
|
|
69
|
+
<p class="title-details">Quantidade: ${task.name}</p>
|
|
70
|
+
<p class="title-details">${task.periodRentName}</p>
|
|
71
|
+
</div>
|
|
72
|
+
`;
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
this.updateTasks();
|
|
76
|
+
this.updateViewMode();
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
updateViewMode() {
|
|
80
|
+
this.gantt.change_view_mode(
|
|
81
|
+
this.viewMode[0].toUpperCase() + this.viewMode.substring(1)
|
|
82
|
+
);
|
|
83
|
+
},
|
|
84
|
+
updateTasks() {
|
|
85
|
+
this.gantt.refresh(this.tasks);
|
|
86
|
+
},
|
|
87
|
+
demoViewMode(viewMode) {
|
|
88
|
+
this.mode = viewMode;
|
|
89
|
+
this.viewMode = viewMode;
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
watch: {
|
|
93
|
+
viewMode() {
|
|
94
|
+
this.updateViewMode();
|
|
95
|
+
},
|
|
96
|
+
tasks() {
|
|
97
|
+
this.updateTasks();
|
|
98
|
+
},
|
|
99
|
+
event: {
|
|
100
|
+
handler(event) {
|
|
101
|
+
if (event.name == "demoViewMode") {
|
|
102
|
+
if (event.data.title == "Dia") this.demoViewMode("day");
|
|
103
|
+
if (event.data.title == "Semana") this.demoViewMode("week");
|
|
104
|
+
if (event.data.title == "Mês") this.demoViewMode("month");
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
deep: true,
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
</script>
|
|
112
|
+
<style>
|
|
113
|
+
.gantt {
|
|
114
|
+
margin-top: 10px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.details-container {
|
|
118
|
+
background-color: white;
|
|
119
|
+
width: 400px;
|
|
120
|
+
padding: 10px;
|
|
121
|
+
border: 1px solid #eaedf3;
|
|
122
|
+
color: black;
|
|
123
|
+
box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 3%);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.title-details {
|
|
127
|
+
font-size: 14px;
|
|
128
|
+
}
|
|
129
|
+
</style>
|
|
130
|
+
|
|
@@ -25,11 +25,14 @@ export default {
|
|
|
25
25
|
|
|
26
26
|
<style scoped>
|
|
27
27
|
.top {
|
|
28
|
+
border-radius: 0px 0px 0px 0px;
|
|
28
29
|
height: 50px;
|
|
29
30
|
width: 100%;
|
|
30
31
|
position: fixed;
|
|
31
32
|
top: 0;
|
|
32
33
|
left: 100px;
|
|
33
34
|
z-index: 20;
|
|
35
|
+
box-shadow: 0px 10px 30px -6px rgb(0 0 0 / 10%);
|
|
36
|
+
border-bottom: 0px solid #eff0f1;
|
|
34
37
|
}
|
|
35
38
|
</style>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div
|
|
4
|
+
v-for="icon in icons"
|
|
5
|
+
class="molded side-by-side"
|
|
6
|
+
@click="executeEvent(icon.eventName)"
|
|
7
|
+
v-b-tooltip.hover
|
|
8
|
+
:title="icon.tooltip"
|
|
9
|
+
>
|
|
10
|
+
<div class="icon-molded"><i :class="icon.icon"></i></div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
import { mapMutations } from "vuex";
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
name: "IconMolded",
|
|
20
|
+
props: {
|
|
21
|
+
icons: Array,
|
|
22
|
+
},
|
|
23
|
+
methods: {
|
|
24
|
+
...mapMutations("generic", ["addEvent"]),
|
|
25
|
+
executeEvent(eventName) {
|
|
26
|
+
this.addEvent({
|
|
27
|
+
name: eventName,
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<style scoped>
|
|
35
|
+
.molded {
|
|
36
|
+
height: 38px;
|
|
37
|
+
width: 38px;
|
|
38
|
+
margin-left: 10px;
|
|
39
|
+
margin-top: 4px;
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.icon-molded {
|
|
44
|
+
font-size: 20px;
|
|
45
|
+
margin-left: 10px;
|
|
46
|
+
color: white;
|
|
47
|
+
}
|
|
48
|
+
</style>
|