@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,128 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div v-if="tasks.length > 0">
|
|
4
|
+
<ButtonGroup :initialOption="initialOption" :options="options" />
|
|
5
|
+
<slot></slot>
|
|
6
|
+
<div class="gantt">
|
|
7
|
+
<svg ref="gantt" />
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
<div v-else>
|
|
11
|
+
Nenhum registro encontrado!
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
import ButtonGroup from "@nixweb/nixloc-ui/src/component/forms/ButtonGroup";
|
|
18
|
+
|
|
19
|
+
import { mapGetters } from "vuex";
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
name: "FrappeGantt",
|
|
23
|
+
components: {
|
|
24
|
+
ButtonGroup,
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
initialOption: String,
|
|
28
|
+
options: Array,
|
|
29
|
+
tasks: Array,
|
|
30
|
+
},
|
|
31
|
+
data() {
|
|
32
|
+
return {
|
|
33
|
+
gantt: {},
|
|
34
|
+
mode: "day",
|
|
35
|
+
viewMode: "",
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
mounted() {
|
|
39
|
+
this.setupGanttChart();
|
|
40
|
+
},
|
|
41
|
+
computed: {
|
|
42
|
+
...mapGetters("generic", ["event"]),
|
|
43
|
+
},
|
|
44
|
+
methods: {
|
|
45
|
+
setupGanttChart() {
|
|
46
|
+
this.gantt = new Gantt(this.$refs.gantt, this.tasks, {
|
|
47
|
+
language: "ptBr",
|
|
48
|
+
date_format: "YYYY-MM-DD",
|
|
49
|
+
bar_corner_radius: 10,
|
|
50
|
+
on_click: (task) => {
|
|
51
|
+
this.$emit("task-updated", task);
|
|
52
|
+
},
|
|
53
|
+
on_date_change: (task, start, end) => {
|
|
54
|
+
this.$emit("task-date-updated", { task, start, end });
|
|
55
|
+
},
|
|
56
|
+
on_progress_change: (task, progress) => {
|
|
57
|
+
this.$emit("task-progress-updated", { task, progress });
|
|
58
|
+
},
|
|
59
|
+
//I doubt you will ever need this as the developer already knows what view mode they set.
|
|
60
|
+
on_view_change: (mode) => {
|
|
61
|
+
this.$emit("view-mode-updated", mode);
|
|
62
|
+
},
|
|
63
|
+
custom_popup_html: function (task) {
|
|
64
|
+
return `
|
|
65
|
+
<div class="details-container">
|
|
66
|
+
<p class="title-details">Nº: ${task.number}</p>
|
|
67
|
+
<p class="title-details">${task.customer ?? ""}</p>
|
|
68
|
+
<p class="title-details">Quantidade: ${task.name}</p>
|
|
69
|
+
<p class="title-details">${task.periodRentName}</p>
|
|
70
|
+
</div>
|
|
71
|
+
`;
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
this.updateTasks();
|
|
75
|
+
this.updateViewMode();
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
updateViewMode() {
|
|
79
|
+
this.gantt.change_view_mode(
|
|
80
|
+
this.viewMode[0].toUpperCase() + this.viewMode.substring(1)
|
|
81
|
+
);
|
|
82
|
+
},
|
|
83
|
+
updateTasks() {
|
|
84
|
+
this.gantt.refresh(this.tasks);
|
|
85
|
+
},
|
|
86
|
+
demoViewMode(viewMode) {
|
|
87
|
+
this.mode = viewMode;
|
|
88
|
+
this.viewMode = viewMode;
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
watch: {
|
|
92
|
+
viewMode() {
|
|
93
|
+
this.updateViewMode();
|
|
94
|
+
},
|
|
95
|
+
tasks() {
|
|
96
|
+
this.updateTasks();
|
|
97
|
+
},
|
|
98
|
+
event: {
|
|
99
|
+
handler(event) {
|
|
100
|
+
if (event.name == "demoViewMode") {
|
|
101
|
+
if (event.data.title == "Dia") this.demoViewMode("day");
|
|
102
|
+
if (event.data.title == "Semana") this.demoViewMode("week");
|
|
103
|
+
if (event.data.title == "Mês") this.demoViewMode("month");
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
deep: true,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
</script>
|
|
111
|
+
<style>
|
|
112
|
+
.gantt {
|
|
113
|
+
margin-top: 10px;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.details-container {
|
|
117
|
+
background-color: white;
|
|
118
|
+
width: 400px;
|
|
119
|
+
padding: 10px;
|
|
120
|
+
border: 1px solid #eaedf3;
|
|
121
|
+
color: black;
|
|
122
|
+
box-shadow: 0px 10px 20px -6px rgb(0 0 0 / 3%);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.title-details {
|
|
126
|
+
font-size: 14px;
|
|
127
|
+
}
|
|
128
|
+
</style>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="top" :style="'background-color:' + backgroundColor">
|
|
4
|
+
<div class="side-by-side top-space">
|
|
5
|
+
<slot></slot>
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
<br />
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import { mapState, mapMutations } from "vuex";
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
name: "Top",
|
|
17
|
+
props: {
|
|
18
|
+
backgroundColor: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "#4680A5",
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<style scoped>
|
|
27
|
+
.top {
|
|
28
|
+
padding-left: 85px;
|
|
29
|
+
padding-top: 4px;
|
|
30
|
+
left: 0px;
|
|
31
|
+
right: 0;
|
|
32
|
+
height: 55px;
|
|
33
|
+
top: 0;
|
|
34
|
+
box-shadow: 0px 10px 30px -6px rgb(0 0 0 / 10%);
|
|
35
|
+
border-bottom: 0px solid #eff0f1;
|
|
36
|
+
position: fixed;
|
|
37
|
+
z-index: 100;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.top-space {
|
|
41
|
+
margin-right: 10px;
|
|
42
|
+
width: 100%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.top-margin {
|
|
46
|
+
width: 100%;
|
|
47
|
+
widows: 100%;
|
|
48
|
+
height: 10px;
|
|
49
|
+
margin-right: 80px;
|
|
50
|
+
top: 0;
|
|
51
|
+
margin-left: 120px;
|
|
52
|
+
z-index: 1000;
|
|
53
|
+
background-color: #fdfdfd;
|
|
54
|
+
position: fixed;
|
|
55
|
+
}
|
|
56
|
+
</style>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="div-icon" :class="classCss" :style="'font-size:' + iconSize + 'px'" v-if="!show">
|
|
4
|
+
<div class="icon-eye" @click="show = true">
|
|
5
|
+
<i class="icon-separate fa-solid fa-circle-small"></i>
|
|
6
|
+
<i class="icon-separate fa-solid fa-circle-small"></i>
|
|
7
|
+
<i class="icon-separate fa-solid fa-circle-small"></i>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="div-icon" v-if="show" @click="show = false">
|
|
11
|
+
<slot></slot>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
<script>
|
|
16
|
+
import { mapGetters } from "vuex";
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
name: "HideShow",
|
|
20
|
+
props: {
|
|
21
|
+
iconSize: {
|
|
22
|
+
type: Number,
|
|
23
|
+
default: 50,
|
|
24
|
+
},
|
|
25
|
+
classCss: String
|
|
26
|
+
},
|
|
27
|
+
data() {
|
|
28
|
+
return {
|
|
29
|
+
show: false,
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
computed: {
|
|
33
|
+
...mapGetters("generic", ["event"]),
|
|
34
|
+
},
|
|
35
|
+
watch: {
|
|
36
|
+
event: {
|
|
37
|
+
handler(event) {
|
|
38
|
+
if (event.name == "hideShow") {
|
|
39
|
+
this.show = event.data;
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
deep: true,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
</script>
|
|
47
|
+
<style scoped>
|
|
48
|
+
.div-icon {
|
|
49
|
+
display: flex;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
align-items: center;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.icon-eye {
|
|
56
|
+
color: #dce3e9;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.icon-separate {
|
|
60
|
+
padding: 3px;
|
|
61
|
+
}
|
|
62
|
+
</style>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div v-for="icon in icons" class="molded-icon side-by-side" @click="executeEvent(icon.eventName)" v-b-tooltip.hover
|
|
4
|
+
:title="icon.tooltip">
|
|
5
|
+
<div class="icon-molded-icon" :class="{
|
|
6
|
+
'icon-active-top': menuActive == icon.module,
|
|
7
|
+
'icon-normal-top': menuActive != icon.module,
|
|
8
|
+
}">
|
|
9
|
+
<i :class="icon.icon"></i>
|
|
10
|
+
</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
|
+
data() {
|
|
24
|
+
return { menuActive: "" };
|
|
25
|
+
},
|
|
26
|
+
methods: {
|
|
27
|
+
...mapMutations("generic", ["addEvent"]),
|
|
28
|
+
executeEvent(eventName) {
|
|
29
|
+
this.addEvent({
|
|
30
|
+
name: eventName,
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
watch: {
|
|
35
|
+
$route: {
|
|
36
|
+
handler: function (router) {
|
|
37
|
+
this.menuActive = router.matched[0].props.default.module;
|
|
38
|
+
},
|
|
39
|
+
deep: true,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<style scoped>
|
|
46
|
+
.molded-icon {
|
|
47
|
+
height: 38px;
|
|
48
|
+
width: 38px;
|
|
49
|
+
margin-left: 10px;
|
|
50
|
+
margin-top: 4px;
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.icon-molded-icon {
|
|
55
|
+
font-size: 20px;
|
|
56
|
+
margin-left: 10px;
|
|
57
|
+
color: white;
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<b-row>
|
|
4
|
+
<b-col sm="12" class="text-center">
|
|
5
|
+
<vue-loading
|
|
6
|
+
type="bubbles"
|
|
7
|
+
color="#577696"
|
|
8
|
+
:size="{ width: '80px', height: '80px' }"
|
|
9
|
+
></vue-loading>
|
|
10
|
+
</b-col>
|
|
11
|
+
<b-col sm="12" class="text-center">
|
|
12
|
+
<div class="message">Por favor aguarde, estamos trabalhando...</div>
|
|
13
|
+
</b-col>
|
|
14
|
+
</b-row>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
<script>
|
|
18
|
+
export default {
|
|
19
|
+
name: "LoadingFullPage",
|
|
20
|
+
};
|
|
21
|
+
</script>
|
|
22
|
+
<style scoped>
|
|
23
|
+
.message {
|
|
24
|
+
font-size: 15px;
|
|
25
|
+
margin-top: 5px;
|
|
26
|
+
}
|
|
27
|
+
</style>
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="menu-container" :class="{ 'menu-open': subMenuFirstLevel }">
|
|
3
|
+
<ul class="menu">
|
|
4
|
+
<li v-if="false">
|
|
5
|
+
<div class="div-logo text-center">
|
|
6
|
+
<img :src="urlImage" />
|
|
7
|
+
</div>
|
|
8
|
+
</li>
|
|
9
|
+
<li class="molded-menu">
|
|
10
|
+
<div class="text-center div-photo" @click="editProfile">
|
|
11
|
+
<img class="photo" :src="urlPhoto" />
|
|
12
|
+
</div>
|
|
13
|
+
<div
|
|
14
|
+
class="box-main"
|
|
15
|
+
v-for="(item, index) in menuFilter(true)"
|
|
16
|
+
:key="index"
|
|
17
|
+
>
|
|
18
|
+
<a
|
|
19
|
+
href="#"
|
|
20
|
+
@click.prevent="openSubMenu(item.module)"
|
|
21
|
+
:class="highlightSession(item.module)"
|
|
22
|
+
>
|
|
23
|
+
<div
|
|
24
|
+
:class="{
|
|
25
|
+
'icon-active': menuActive == item.module,
|
|
26
|
+
'icon-normal': menuActive != item.module,
|
|
27
|
+
}"
|
|
28
|
+
>
|
|
29
|
+
<b-row>
|
|
30
|
+
<b-col sm="12">
|
|
31
|
+
<div class="box-icon text-center">
|
|
32
|
+
<i :class="item.icon"></i><br />
|
|
33
|
+
<div class="div-title-menu">{{ item.title }}</div>
|
|
34
|
+
</div>
|
|
35
|
+
</b-col>
|
|
36
|
+
</b-row>
|
|
37
|
+
|
|
38
|
+
<!-- <b-row v-if="false">
|
|
39
|
+
<b-col sm="12">
|
|
40
|
+
<div class="div-title-menu text-center">
|
|
41
|
+
<span
|
|
42
|
+
:class="{
|
|
43
|
+
'title-active': menuActive == item.module,
|
|
44
|
+
'title-normal': menuActive != item.module,
|
|
45
|
+
}"
|
|
46
|
+
>{{ item.title }}</span
|
|
47
|
+
>
|
|
48
|
+
</div>
|
|
49
|
+
</b-col>
|
|
50
|
+
</b-row> -->
|
|
51
|
+
</div>
|
|
52
|
+
</a>
|
|
53
|
+
</div>
|
|
54
|
+
</li>
|
|
55
|
+
</ul>
|
|
56
|
+
|
|
57
|
+
<transition name="slide-fade">
|
|
58
|
+
<div class="context-menu-container" v-if="subMenuFirstLevel">
|
|
59
|
+
<div>
|
|
60
|
+
<ul class="context-menu">
|
|
61
|
+
<li v-for="(item, index) in subMenuFilter(false)" :key="index">
|
|
62
|
+
<h5 v-if="item.type === 'group'" class="context-menu__title">
|
|
63
|
+
<span class="sub-title"> {{ item.groupName }}</span>
|
|
64
|
+
<span
|
|
65
|
+
v-if="index === 0"
|
|
66
|
+
@click.prevent="hideSubMenu"
|
|
67
|
+
class="context-menu__btn-close icon-close"
|
|
68
|
+
href="#"
|
|
69
|
+
>
|
|
70
|
+
<i class="fas fa-times-circle"></i>
|
|
71
|
+
</span>
|
|
72
|
+
</h5>
|
|
73
|
+
|
|
74
|
+
<a
|
|
75
|
+
v-else
|
|
76
|
+
href="#"
|
|
77
|
+
@click.prevent="navegateTo(item)"
|
|
78
|
+
:class="classSubMenu(item.title)"
|
|
79
|
+
>
|
|
80
|
+
<b-row>
|
|
81
|
+
<b-col sm="1">
|
|
82
|
+
<i
|
|
83
|
+
class="menu-icon"
|
|
84
|
+
:style="'color:' + item.iconColor"
|
|
85
|
+
:class="item.icon"
|
|
86
|
+
></i>
|
|
87
|
+
</b-col>
|
|
88
|
+
<b-col sm="10">
|
|
89
|
+
<span class="title-sub"> {{ item.title }} </span>
|
|
90
|
+
</b-col>
|
|
91
|
+
</b-row>
|
|
92
|
+
</a>
|
|
93
|
+
</li>
|
|
94
|
+
</ul>
|
|
95
|
+
</div>
|
|
96
|
+
</div>
|
|
97
|
+
</transition>
|
|
98
|
+
</div>
|
|
99
|
+
</template>
|
|
100
|
+
|
|
101
|
+
<script>
|
|
102
|
+
import { mapState, mapMutations, mapGetters } from "vuex";
|
|
103
|
+
export default {
|
|
104
|
+
name: "Menu",
|
|
105
|
+
props: {
|
|
106
|
+
baseColor: {
|
|
107
|
+
type: String,
|
|
108
|
+
default: "#4680A5",
|
|
109
|
+
},
|
|
110
|
+
baseColorActive: {
|
|
111
|
+
type: String,
|
|
112
|
+
default: "#3F529B",
|
|
113
|
+
},
|
|
114
|
+
urlImage: String,
|
|
115
|
+
urlPhoto: String,
|
|
116
|
+
},
|
|
117
|
+
data() {
|
|
118
|
+
return {
|
|
119
|
+
module: "",
|
|
120
|
+
subMenuFirstLevel: false,
|
|
121
|
+
menuActive: "Dashboard",
|
|
122
|
+
};
|
|
123
|
+
},
|
|
124
|
+
methods: {
|
|
125
|
+
...mapMutations("generic", ["addEvent"]),
|
|
126
|
+
editProfile() {
|
|
127
|
+
this.addEvent({ name: "clickedProfile" });
|
|
128
|
+
},
|
|
129
|
+
openSubMenu(module) {
|
|
130
|
+
this.subMenuFirstLevel = true;
|
|
131
|
+
this.module = module;
|
|
132
|
+
},
|
|
133
|
+
hideSubMenu() {
|
|
134
|
+
this.subMenuFirstLevel = false;
|
|
135
|
+
this.menuItens = [];
|
|
136
|
+
},
|
|
137
|
+
highlightSession(section) {
|
|
138
|
+
return {
|
|
139
|
+
menu__link: true,
|
|
140
|
+
"menu__link--active": section === this.contextSection,
|
|
141
|
+
};
|
|
142
|
+
},
|
|
143
|
+
classSubMenu(subMenuName) {
|
|
144
|
+
return {
|
|
145
|
+
"context-menu__link": true,
|
|
146
|
+
"context-menu__link--active": this.activeSubMenu === subMenuName,
|
|
147
|
+
};
|
|
148
|
+
},
|
|
149
|
+
navegateTo(item) {
|
|
150
|
+
this.$router.push({
|
|
151
|
+
name: item.routeName,
|
|
152
|
+
});
|
|
153
|
+
this.hideSubMenu();
|
|
154
|
+
},
|
|
155
|
+
menuFilter(isModule) {
|
|
156
|
+
let filter = [];
|
|
157
|
+
this.menu.items.forEach(function (obj) {
|
|
158
|
+
if (obj.isModule == isModule) filter.push(obj);
|
|
159
|
+
});
|
|
160
|
+
return filter.sort((a, b) => a.order - b.order);
|
|
161
|
+
},
|
|
162
|
+
subMenuFilter(isModule) {
|
|
163
|
+
let filter = [];
|
|
164
|
+
let self = this;
|
|
165
|
+
let userLogged = this.userLogged.user.userName;
|
|
166
|
+
this.menu.items.forEach(function (obj) {
|
|
167
|
+
if (obj.isModule == isModule && obj.module === self.module) {
|
|
168
|
+
if (obj.isVisible == "all") filter.push(obj);
|
|
169
|
+
|
|
170
|
+
if (obj.isVisible == "support" && userLogged == "UserTemp")
|
|
171
|
+
filter.push(obj);
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
return filter;
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
computed: {
|
|
178
|
+
...mapState("user", ["menu", "userLogged"]),
|
|
179
|
+
...mapGetters("generic", ["event"]),
|
|
180
|
+
},
|
|
181
|
+
watch: {
|
|
182
|
+
event: {
|
|
183
|
+
handler(event) {
|
|
184
|
+
if (event.name == "closeMenu") this.hideSubMenu();
|
|
185
|
+
},
|
|
186
|
+
deep: true,
|
|
187
|
+
},
|
|
188
|
+
$route: {
|
|
189
|
+
handler: function (router) {
|
|
190
|
+
this.menuActive = router.matched[0].props.default.module;
|
|
191
|
+
},
|
|
192
|
+
deep: true,
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
};
|
|
196
|
+
</script>
|
|
197
|
+
|
|
198
|
+
<style scoped>
|
|
199
|
+
.menu-open {
|
|
200
|
+
width: 350px;
|
|
201
|
+
z-index: 1000;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.div-logo {
|
|
205
|
+
padding-top: 12px;
|
|
206
|
+
padding-left: 10px;
|
|
207
|
+
padding-bottom: 15px;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.photo {
|
|
211
|
+
margin: 0;
|
|
212
|
+
border-radius: 20px;
|
|
213
|
+
height: 40px;
|
|
214
|
+
width: 40px;
|
|
215
|
+
margin-top: 10px;
|
|
216
|
+
margin-bottom: 10px;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.icon-close {
|
|
220
|
+
margin-right: 10px;
|
|
221
|
+
margin-top: -5px;
|
|
222
|
+
font-size: 22px;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.icon {
|
|
226
|
+
font-size: 20px;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.icon-dash {
|
|
230
|
+
font-size: 22px;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.box-main {
|
|
234
|
+
display: flex;
|
|
235
|
+
align-items: center;
|
|
236
|
+
justify-content: center;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.box-icon {
|
|
240
|
+
width: 60px;
|
|
241
|
+
border-radius: 18px;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.div-title-menu {
|
|
245
|
+
margin-top: -10px;
|
|
246
|
+
font-size: 12.5px;
|
|
247
|
+
font-weight: 300;
|
|
248
|
+
color: black;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.title-sub {
|
|
252
|
+
margin-left: -3px;
|
|
253
|
+
font-weight: 400;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.margin-hidden {
|
|
257
|
+
margin-bottom: 5px;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.sub-title {
|
|
261
|
+
font-size: 16px;
|
|
262
|
+
font-weight: normal;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
img {
|
|
266
|
+
height: 36px;
|
|
267
|
+
margin-top: 5px;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.menu-icon {
|
|
271
|
+
font-size: 15px;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.molded-menu {
|
|
275
|
+
margin-top: 5px;
|
|
276
|
+
margin-left: 8px;
|
|
277
|
+
padding: 5px;
|
|
278
|
+
padding-bottom: 1px !important;
|
|
279
|
+
background-color: white;
|
|
280
|
+
border: 1px solid #e8eaed;
|
|
281
|
+
border-radius: 12px !important;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.div-photo {
|
|
285
|
+
cursor: pointer;
|
|
286
|
+
}
|
|
287
|
+
</style>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="molded" :style="'border-radius:' + borderRadius + 'px'">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: "Molded",
|
|
10
|
+
props: {
|
|
11
|
+
borderRadius: {
|
|
12
|
+
type: Number,
|
|
13
|
+
default: 6,
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
</script>
|
|
18
|
+
<style scoped>
|
|
19
|
+
.molded {
|
|
20
|
+
border: 1px solid #e8eaed;
|
|
21
|
+
background-color: white;
|
|
22
|
+
border-radius: 10px !important;
|
|
23
|
+
padding: 10px;
|
|
24
|
+
padding-top: 15px;
|
|
25
|
+
padding-left: 30px;
|
|
26
|
+
padding-right: 30px;
|
|
27
|
+
padding-bottom: 10px;
|
|
28
|
+
box-shadow: 0px 10px 100px -6px rgb(0 0 0 / 5%);
|
|
29
|
+
}
|
|
30
|
+
</style>
|