shared-ritm 1.0.21 → 1.0.23
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/dist/index.css +1 -1
- package/dist/shared-ritm.es.js +1 -1
- package/dist/shared-ritm.umd.js +2 -2
- package/package.json +6 -5
- package/src/App.vue +8 -0
- package/src/api/services/GanttService.ts +17 -0
- package/src/api/services/MetricsService.ts +74 -0
- package/src/api/services/ProjectsService.ts +15 -0
- package/src/api/services/RepairsService.ts +76 -0
- package/src/api/services/TasksService.ts +15 -0
- package/src/api/settings/ApiService.ts +124 -0
- package/src/api/types/Api_Metrics.ts +0 -0
- package/src/api/types/Api_Repairs.ts +57 -0
- package/src/api/types/Api_Tasks.ts +99 -0
- package/src/common/app-button/AppButton.vue +156 -0
- package/src/common/app-input/AppInput.vue +168 -0
- package/src/common/app-layout/AppLayout.vue +61 -0
- package/src/common/app-layout/components/AppLayoutHeader.vue +114 -0
- package/src/common/app-select/AppSelect.vue +154 -0
- package/src/common/app-sidebar/AppSidebar.vue +162 -0
- package/src/common/app-sidebar/components/SidebarMenu.vue +27 -0
- package/src/common/app-sidebar/components/SidebarMenuItem.vue +135 -0
- package/src/common/app-test-button/AppTestButton.vue +11 -0
- package/src/common/app-wrapper/AppWrapper.vue +25 -0
- package/src/global.d.ts +1 -0
- package/src/index.ts +19 -0
- package/src/main.ts +15 -0
- package/src/quasar-user-options.ts +17 -0
- package/src/shared/fonts/Montserrat.ttf +0 -0
- package/src/shared/fonts/NunitoSansFont.ttf +0 -0
- package/src/shared/styles/general.css +77 -0
- package/src/shims-vue.d.ts +5 -0
- package/src/styles/variables.sass +12 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<q-expansion-item
|
|
3
|
+
v-model="test[`${item.icon}`]"
|
|
4
|
+
header-class="text-purple"
|
|
5
|
+
v-if="item.items"
|
|
6
|
+
:class="[$style['menu-item'], { 'expansion-item-active': isRouteActive(item) && minify }]"
|
|
7
|
+
>
|
|
8
|
+
<template #header>
|
|
9
|
+
<q-tooltip
|
|
10
|
+
v-if="minify"
|
|
11
|
+
:delay="100"
|
|
12
|
+
transition-show="jump-right"
|
|
13
|
+
transition-hide="jump-left"
|
|
14
|
+
anchor="center right"
|
|
15
|
+
self="center left"
|
|
16
|
+
>
|
|
17
|
+
{{ item.label }}
|
|
18
|
+
</q-tooltip>
|
|
19
|
+
|
|
20
|
+
<q-item-section v-if="item.icon" avatar>
|
|
21
|
+
<app-icon :name="item.icon" color="white" size="24px" />
|
|
22
|
+
</q-item-section>
|
|
23
|
+
|
|
24
|
+
<q-item-section :class="$style['menu-item__label']">{{ item.label }}</q-item-section>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<sidebar-menu-item v-for="(subItem, index) in item.items" :key="index" :item="subItem" />
|
|
28
|
+
</q-expansion-item>
|
|
29
|
+
<q-item
|
|
30
|
+
v-else-if="item.name !== 'sign-out'"
|
|
31
|
+
:class="$style['menu-item']"
|
|
32
|
+
@click="goToRoute(item)"
|
|
33
|
+
:to="item.to"
|
|
34
|
+
:active="isRouteActive(item)"
|
|
35
|
+
active-class="menu-active"
|
|
36
|
+
clickable
|
|
37
|
+
v-ripple
|
|
38
|
+
>
|
|
39
|
+
<q-tooltip
|
|
40
|
+
v-if="minify"
|
|
41
|
+
:delay="100"
|
|
42
|
+
transition-show="jump-right"
|
|
43
|
+
transition-hide="jump-left"
|
|
44
|
+
anchor="center right"
|
|
45
|
+
self="center left"
|
|
46
|
+
>
|
|
47
|
+
{{ item.label }}
|
|
48
|
+
</q-tooltip>
|
|
49
|
+
|
|
50
|
+
<q-item-section v-if="item.icon" avatar>
|
|
51
|
+
<app-icon :name="item.icon" color="white" size="24px" />
|
|
52
|
+
</q-item-section>
|
|
53
|
+
|
|
54
|
+
<q-item-section :class="$style['menu-item__label']">{{ item.label }}</q-item-section>
|
|
55
|
+
</q-item>
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
<script lang="ts" setup>
|
|
59
|
+
import { defineProps, reactive } from 'vue'
|
|
60
|
+
import AppIcon from '@/common/app-icon/AppIcon.vue'
|
|
61
|
+
|
|
62
|
+
interface Props {
|
|
63
|
+
minify?: boolean
|
|
64
|
+
item: {
|
|
65
|
+
name: string
|
|
66
|
+
label: string
|
|
67
|
+
icon: string
|
|
68
|
+
href: string
|
|
69
|
+
to: string
|
|
70
|
+
items: any[]
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const props = defineProps<Props>()
|
|
75
|
+
|
|
76
|
+
const test = reactive({
|
|
77
|
+
'repairs-icon': true,
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
const goToRoute = (item: any) => {
|
|
81
|
+
//window.location.href = item.to
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const isRouteActive = (item: any) => {
|
|
85
|
+
return (item.to === '' && item.items.find((x: any) => x.to === '/repairs/')) || item.to === '/repairs/'
|
|
86
|
+
}
|
|
87
|
+
</script>
|
|
88
|
+
|
|
89
|
+
<style lang="scss" scoped>
|
|
90
|
+
.expansion-item-active {
|
|
91
|
+
background: rgba(243, 249, 253, 0.1);
|
|
92
|
+
border-radius: 10px;
|
|
93
|
+
}
|
|
94
|
+
</style>
|
|
95
|
+
|
|
96
|
+
<style lang="scss" module>
|
|
97
|
+
.menu-item {
|
|
98
|
+
margin: 0 8px;
|
|
99
|
+
&:global(.menu-active) {
|
|
100
|
+
border-radius: 10px;
|
|
101
|
+
background: rgba(243, 249, 253, 0.1);
|
|
102
|
+
}
|
|
103
|
+
:global(.q-item__section--avatar) {
|
|
104
|
+
min-width: 24px;
|
|
105
|
+
padding-right: 14px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:global(.q-expansion-item__content .q-item) {
|
|
109
|
+
padding-left: 20px;
|
|
110
|
+
}
|
|
111
|
+
:global(.q-item__section--main ~ .q-item__section--side) {
|
|
112
|
+
color: white;
|
|
113
|
+
}
|
|
114
|
+
&__label {
|
|
115
|
+
color: #fff;
|
|
116
|
+
font-family: 'Nunito Sans', sans-serif;
|
|
117
|
+
font-size: 16px;
|
|
118
|
+
font-weight: 300;
|
|
119
|
+
white-space: nowrap;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
@media (max-width: 1440px) {
|
|
124
|
+
.menu-item {
|
|
125
|
+
margin: 0 4px;
|
|
126
|
+
:global(.q-item__section--avatar) {
|
|
127
|
+
min-width: 24px;
|
|
128
|
+
padding-right: 10px;
|
|
129
|
+
}
|
|
130
|
+
&__label {
|
|
131
|
+
font-size: 14px;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
</style>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="app-wrapper">
|
|
3
|
+
<slot />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
<script setup lang="ts"></script>
|
|
7
|
+
<style scoped lang="scss">
|
|
8
|
+
.app-wrapper {
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 100%;
|
|
11
|
+
margin: 20px 0;
|
|
12
|
+
padding: 30px;
|
|
13
|
+
border-radius: 24px;
|
|
14
|
+
background: #fff;
|
|
15
|
+
box-shadow: 0px 6px 58px 0px rgba(0, 49, 122, 0.1);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@media (max-width: 1440px) {
|
|
19
|
+
.app-wrapper {
|
|
20
|
+
margin: 10px 0;
|
|
21
|
+
padding: 14px;
|
|
22
|
+
border-radius: 14px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
</style>
|
package/src/global.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'shared-ritm'
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import AppButton from '@/common/app-button/AppButton.vue'
|
|
2
|
+
import AppInput from '@/common/app-input/AppInput.vue'
|
|
3
|
+
import AppLayout from '@/common/app-layout/AppLayout.vue'
|
|
4
|
+
import AppSelect from '@/common/app-select/AppSelect.vue'
|
|
5
|
+
import AppWrapper from '@/common/app-wrapper/AppWrapper.vue'
|
|
6
|
+
// import AppSidebar from '@/common/app-sidebar/AppSidebar.vue'
|
|
7
|
+
|
|
8
|
+
import useGanttService from '@/api/services/GanttService'
|
|
9
|
+
import useMetricsService from '@/api/services/MetricsService'
|
|
10
|
+
import useProjectsService from '@/api/services/ProjectsService'
|
|
11
|
+
import useRepairsService from '@/api/services/RepairsService'
|
|
12
|
+
import useTasksService from '@/api/services/TasksService'
|
|
13
|
+
|
|
14
|
+
export { AppButton, AppInput, AppLayout, AppSelect, AppWrapper }
|
|
15
|
+
|
|
16
|
+
export { useGanttService, useMetricsService, useProjectsService, useRepairsService, useTasksService }
|
|
17
|
+
|
|
18
|
+
export * from '@/api/types/Api_Repairs'
|
|
19
|
+
export * from '@/api/types/Api_Tasks'
|
package/src/main.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createApp } from 'vue'
|
|
2
|
+
import { Quasar } from 'quasar'
|
|
3
|
+
|
|
4
|
+
import '@quasar/extras/material-icons/material-icons.css'
|
|
5
|
+
import 'quasar/src/css/index.sass'
|
|
6
|
+
|
|
7
|
+
import '@/shared/styles/general.css'
|
|
8
|
+
|
|
9
|
+
import App from './App.vue'
|
|
10
|
+
|
|
11
|
+
const app = createApp(App)
|
|
12
|
+
|
|
13
|
+
//@ts-ignore
|
|
14
|
+
app.use(Quasar, { plugins: [] })
|
|
15
|
+
app.mount('#app')
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Quasar, Notify, Loading, Dialog } from 'quasar'
|
|
2
|
+
|
|
3
|
+
import 'quasar/src/css/index.sass'
|
|
4
|
+
import '@quasar/extras/roboto-font/roboto-font.css'
|
|
5
|
+
import '@quasar/extras/material-icons/material-icons.css'
|
|
6
|
+
import '@quasar/extras/material-icons-outlined/material-icons-outlined.css'
|
|
7
|
+
import '@quasar/extras/mdi-v7/mdi-v7.css'
|
|
8
|
+
|
|
9
|
+
const quasarUserOptions = {
|
|
10
|
+
plugins: {
|
|
11
|
+
Notify,
|
|
12
|
+
Loading,
|
|
13
|
+
Dialog,
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { Quasar, quasarUserOptions }
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--main-header-height: 73px;
|
|
3
|
+
--main-footer-height: 66px;
|
|
4
|
+
--sidebar-width-max: 250px;
|
|
5
|
+
--sidebar-width-min: 66px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/*border-radius*/
|
|
9
|
+
:root {
|
|
10
|
+
--border-radius-xxs: 4px;
|
|
11
|
+
--border-radius-xs: 8px;
|
|
12
|
+
--border-radius-s: 12px;
|
|
13
|
+
--border-radius-m: 16px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/*color*/
|
|
17
|
+
:root {
|
|
18
|
+
--g-blue: #3f8cff;
|
|
19
|
+
--g-blue-light: #e4efff;
|
|
20
|
+
--g-blue-dark: #1c75ff;
|
|
21
|
+
--g-green: #00d097;
|
|
22
|
+
--g-green-light: #e0f9f2;
|
|
23
|
+
--g-green-dark: #b8f8e7;
|
|
24
|
+
--g-red: #ff192d;
|
|
25
|
+
--g-red-light: #fdecee;
|
|
26
|
+
--g-red-dark: #ffdcde;
|
|
27
|
+
--g-grey-100: #d8e0f0;
|
|
28
|
+
|
|
29
|
+
--g-font-color: #0a1629;
|
|
30
|
+
--g-font-grey-color: #b9c0c7;
|
|
31
|
+
--g-font-secondary-color: #7d8592;
|
|
32
|
+
|
|
33
|
+
--g-grey-background: #ced5e0;
|
|
34
|
+
--g-grey-hover-background: #9fa5af;
|
|
35
|
+
--g-secondary-background: #f4f9fd;
|
|
36
|
+
--g-thirty-background: #c8cbcf;
|
|
37
|
+
|
|
38
|
+
--g-fire-color-1: #fee7e7;
|
|
39
|
+
--g-fire-color-2: #fed4d5;
|
|
40
|
+
--g-fire-color-3: #fcc0c0;
|
|
41
|
+
--g-fire-color-4: #f9a2a2;
|
|
42
|
+
--g-fire-color-5: #f97d7e;
|
|
43
|
+
--g-fire-color-6: #f65160;
|
|
44
|
+
--g-fire-color-7: #ff192d;
|
|
45
|
+
--g-fire-color-8: #ab0514;
|
|
46
|
+
--g-fire-color-9: #6e000a;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
* {
|
|
50
|
+
margin: 0;
|
|
51
|
+
padding: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
button:active,
|
|
55
|
+
button:focus {
|
|
56
|
+
outline: none !important;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
html {
|
|
60
|
+
font-family: 'NunitoSansFont', sans-serif !important;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ant-dropdown {
|
|
64
|
+
z-index: 10000;
|
|
65
|
+
.content {
|
|
66
|
+
z-index: 10000;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@font-face {
|
|
71
|
+
font-family: 'NunitoSansFont';
|
|
72
|
+
src: local('NunitoSansFont'), url(../fonts/NunitoSansFont.ttf) format('truetype');
|
|
73
|
+
}
|
|
74
|
+
@font-face {
|
|
75
|
+
font-family: 'Montserrat';
|
|
76
|
+
src: local('Montserrat'), url(../fonts/Montserrat.ttf) format('truetype');
|
|
77
|
+
}
|