shared-ritm 1.2.32 → 1.2.34

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.
Files changed (41) hide show
  1. package/README.md +103 -103
  2. package/dist/index.css +1 -1
  3. package/dist/shared-ritm.es.js +3259 -3241
  4. package/dist/shared-ritm.umd.js +6 -6
  5. package/dist/types/api/services/AuthService.d.ts +13 -1
  6. package/package.json +1 -1
  7. package/src/App.vue +2461 -2461
  8. package/src/api/services/AuthService.ts +20 -3
  9. package/src/api/services/GanttService.ts +17 -17
  10. package/src/api/services/MetricsService.ts +101 -101
  11. package/src/api/services/RepairsService.ts +100 -100
  12. package/src/api/settings/ApiService.ts +126 -126
  13. package/src/api/types/Api_Files.ts +1 -1
  14. package/src/api/types/Api_Projects.ts +55 -55
  15. package/src/api/types/Api_Repairs.ts +93 -93
  16. package/src/common/app-checkbox/AppCheckbox.vue +26 -26
  17. package/src/common/app-date-picker/AppDatePicker.vue +81 -81
  18. package/src/common/app-dialogs/AppConfirmDialog.vue +100 -100
  19. package/src/common/app-dropdown/AppDropdown.vue +31 -31
  20. package/src/common/app-icon/AppIcon.vue +108 -108
  21. package/src/common/app-input-search/AppInputSearch.vue +174 -174
  22. package/src/common/app-layout/AppLayout.vue +84 -84
  23. package/src/common/app-layout/components/AppLayoutHeader.vue +246 -246
  24. package/src/common/app-layout/components/AppLayoutPage.vue +16 -16
  25. package/src/common/app-select/AppSelect.vue +157 -157
  26. package/src/common/app-sidebar/components/SidebarMenuItem.vue +146 -146
  27. package/src/common/app-toggle/AppToggle.vue +23 -23
  28. package/src/common/app-wrapper/AppWrapper.vue +28 -28
  29. package/src/icons/dialogs/RemoveIcon.vue +12 -12
  30. package/src/icons/dialogs/SafetyIcon.vue +12 -12
  31. package/src/icons/header/NotificationIcon.vue +18 -18
  32. package/src/icons/header/PersonIcon.vue +11 -11
  33. package/src/icons/header/SettingIcon.vue +14 -14
  34. package/src/icons/task/attention-icon.vue +13 -13
  35. package/src/icons/task/clock-icon.vue +10 -10
  36. package/src/icons/task/delete-icon.vue +10 -10
  37. package/src/icons/task/fire-icon.vue +16 -16
  38. package/src/main.ts +28 -28
  39. package/src/shared/styles/general.css +96 -96
  40. package/src/utils/confirm.ts +12 -12
  41. package/src/utils/notification.ts +9 -9
@@ -1,246 +1,246 @@
1
- <template>
2
- <q-header :class="[$style.header, { [$style[`header-full`]]: fullWidth }]">
3
- <q-toolbar :class="$style.toolbar">
4
- <h1>{{ pageTitle }}</h1>
5
- <div :class="$style['action-buttons']">
6
- <div :class="$style['person']" @click="clickProfile">
7
- <app-icon name="person-icon" />
8
- <div :class="$style['person__info']">
9
- <p style="font-weight: 700; font-size: 14px">{{ shortName }}</p>
10
- <p style="font-weight: 300; font-size: 12px">{{ positionName }}</p>
11
- </div>
12
- </div>
13
- <div :class="$style['action-wrapper']">
14
- <!-- <q-btn :class="$style['notification']" flat padding="sm" :ripple="false" @click="clickNotification">-->
15
- <!-- <app-icon color="white" size="28px" name="notifications-icon" />-->
16
- <!-- </q-btn>-->
17
- <q-separator color="white" vertical size="1px" />
18
- <q-btn
19
- ref="refMenuSettings"
20
- flat
21
- padding="sm"
22
- :ripple="false"
23
- :class="[$style['settings'], { [$style['settings__open']]: isSettingsOpened }]"
24
- @click="openSettingsMenu"
25
- >
26
- <app-icon size="28px" name="setting-icon" />
27
- <q-menu max-height="160px" :offset="[-18, 4]" :class="$style['settings-menu']">
28
- <q-list v-for="item in settingsMenuItems" :key="item.name" :class="$style['settings-menu__list']">
29
- <q-item
30
- v-show="item.isShow"
31
- v-close-popup
32
- :class="$style['settings-menu__item']"
33
- clickable
34
- @click="clickSettingsMenuItem(item)"
35
- >{{ item.label }}</q-item
36
- >
37
- </q-list>
38
- </q-menu>
39
- </q-btn>
40
- </div>
41
-
42
- <!-- <app-button icon="person" text-color="black" :label="shortName" rounded :class="$style['button-person']" />-->
43
- </div>
44
- </q-toolbar>
45
- </q-header>
46
- </template>
47
-
48
- <script lang="ts" setup>
49
- import { computed, defineProps, ref, withDefaults } from 'vue'
50
- import { onClickOutside } from '@vueuse/core'
51
- import AppIcon from '@/common/app-icon/AppIcon.vue'
52
-
53
- interface Props {
54
- userData: any
55
- fullWidth?: boolean
56
- pageTitle?: string
57
- settingsMenuItems?: { label: string; name: string; isShow: boolean }[]
58
- }
59
-
60
- const emits = defineEmits(['clickSettingsMenuItem', 'clickNotification', 'clickProfile'])
61
-
62
- const props = withDefaults(defineProps<Props>(), {
63
- pageTitle: '',
64
- })
65
-
66
- const refMenuSettings = ref(null)
67
- const isSettingsOpened = ref(false)
68
-
69
- // const settingsMenuItems = ref([
70
- // { label: 'Поиск инструментов', name: 'instrument-search', isShow: true },
71
- // { label: 'Мониторинг оборудования', name: 'equipment-monitoring', isShow: true },
72
- // { label: 'Root-режим выключен', name: 'root-off', isShow: true },
73
- // { label: 'Root-режим включен', name: 'root-on', isShow: false },
74
- // ])
75
-
76
- const shortName = computed(
77
- () =>
78
- `${props.userData?.last_name} ${props.userData?.first_name} ${props.userData?.patronymic?.[0] || ''}${
79
- props.userData?.patronymic?.[0] ? '.' : ''
80
- }`,
81
- )
82
-
83
- const positionName = computed(() => props.userData?.positions?.[0]?.display_name)
84
-
85
- const openSettingsMenu = () => {
86
- return (isSettingsOpened.value = !isSettingsOpened.value)
87
- }
88
-
89
- const clickProfile = () => emits('clickProfile')
90
- const clickSettingsMenuItem = (item: any) => emits('clickSettingsMenuItem', item.name)
91
- const clickNotification = () => emits('clickNotification')
92
-
93
- onClickOutside(refMenuSettings, () => (isSettingsOpened.value = false))
94
- </script>
95
-
96
- <style lang="scss" module>
97
- .header {
98
- height: 100px;
99
- background: transparent;
100
- margin: 0 auto;
101
- max-width: 1300px;
102
- }
103
- .header-full {
104
- max-width: 100%;
105
- padding-right: 30px;
106
- padding-left: 30px;
107
- }
108
- .toolbar {
109
- padding: 0;
110
- min-height: 100%;
111
- h1 {
112
- font-weight: 600;
113
- font-size: 28px;
114
- line-height: 100%;
115
- font-family: Montserrat, sans-serif;
116
- }
117
- }
118
-
119
- .header-search {
120
- width: 412px;
121
- font-size: 16px;
122
- }
123
-
124
- .action-buttons {
125
- flex: 1;
126
- position: relative;
127
- display: flex;
128
- align-items: center;
129
- column-gap: 16px;
130
- justify-content: end;
131
- }
132
-
133
- .button {
134
- padding: 12px;
135
- background: white;
136
- transition: all 0.3s ease, color 0.3s ease;
137
- }
138
-
139
- .button-person {
140
- padding: 10px 14px;
141
- background: white;
142
- }
143
-
144
- .person {
145
- display: flex;
146
- align-items: center;
147
- gap: 6px;
148
- padding: 20px 12px;
149
- height: 44px;
150
- border-radius: 10px;
151
- cursor: pointer;
152
- background-color: white;
153
- box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2), 0 2px 2px rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12);
154
- transition: all 0.3s ease;
155
- &__info {
156
- display: flex;
157
- flex-direction: column;
158
- user-select: none;
159
- p {
160
- line-height: 1.2;
161
- margin: 0;
162
- padding: 0;
163
- font-family: 'Nunito Sans', sans-serif;
164
- color: rgb(63, 140, 255);
165
- }
166
- }
167
- &:hover {
168
- background-color: #e1e0e0;
169
- transform: scale(1.01);
170
- }
171
- &:active {
172
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 4px 4px rgba(0, 0, 0, 0.2), 0 6px 2px -5px rgba(0, 0, 0, 0.2);
173
- }
174
- }
175
-
176
- .notification {
177
- cursor: pointer;
178
- transition: transform 0.3s ease;
179
- &:hover {
180
- transform: scale(1.1);
181
- }
182
- :global(.q-focus-helper) {
183
- display: none;
184
- }
185
- }
186
-
187
- .settings {
188
- cursor: pointer;
189
- transition: transform 0.3s ease;
190
- &__open {
191
- transform: rotate(90deg);
192
- }
193
- :global(.q-focus-helper) {
194
- display: none;
195
- }
196
- }
197
-
198
- .settings-menu {
199
- min-width: 210px;
200
- border-radius: 8px;
201
- &__list {
202
- min-width: 210px;
203
- }
204
- &__item {
205
- align-items: center;
206
- font-family: 'Nunito Sans', sans-serif;
207
- color: rgb(63, 140, 255);
208
- }
209
- }
210
-
211
- .action-wrapper {
212
- height: 32px;
213
- justify-content: space-between;
214
- align-items: center;
215
- display: flex;
216
- gap: 12px;
217
- }
218
-
219
- @media (max-width: 1440px) {
220
- .header {
221
- height: 100px;
222
- background: transparent;
223
- margin: 0 auto;
224
- max-width: 874px;
225
- }
226
- .header-search {
227
- width: 343px;
228
- font-size: 16px;
229
- }
230
- .action-buttons {
231
- position: relative;
232
- display: flex;
233
- align-items: center;
234
- column-gap: 8px;
235
- }
236
- .button {
237
- padding: 10px;
238
- background: white;
239
- transition: all 0.3s ease, color 0.3s ease;
240
- }
241
- .button-person {
242
- padding: 8px 10px;
243
- background: white;
244
- }
245
- }
246
- </style>
1
+ <template>
2
+ <q-header :class="[$style.header, { [$style[`header-full`]]: fullWidth }]">
3
+ <q-toolbar :class="$style.toolbar">
4
+ <h1>{{ pageTitle }}</h1>
5
+ <div :class="$style['action-buttons']">
6
+ <div :class="$style['person']" @click="clickProfile">
7
+ <app-icon name="person-icon" />
8
+ <div :class="$style['person__info']">
9
+ <p style="font-weight: 700; font-size: 14px">{{ shortName }}</p>
10
+ <p style="font-weight: 300; font-size: 12px">{{ positionName }}</p>
11
+ </div>
12
+ </div>
13
+ <div :class="$style['action-wrapper']">
14
+ <!-- <q-btn :class="$style['notification']" flat padding="sm" :ripple="false" @click="clickNotification">-->
15
+ <!-- <app-icon color="white" size="28px" name="notifications-icon" />-->
16
+ <!-- </q-btn>-->
17
+ <q-separator color="white" vertical size="1px" />
18
+ <q-btn
19
+ ref="refMenuSettings"
20
+ flat
21
+ padding="sm"
22
+ :ripple="false"
23
+ :class="[$style['settings'], { [$style['settings__open']]: isSettingsOpened }]"
24
+ @click="openSettingsMenu"
25
+ >
26
+ <app-icon size="28px" name="setting-icon" />
27
+ <q-menu max-height="160px" :offset="[-18, 4]" :class="$style['settings-menu']">
28
+ <q-list v-for="item in settingsMenuItems" :key="item.name" :class="$style['settings-menu__list']">
29
+ <q-item
30
+ v-show="item.isShow"
31
+ v-close-popup
32
+ :class="$style['settings-menu__item']"
33
+ clickable
34
+ @click="clickSettingsMenuItem(item)"
35
+ >{{ item.label }}</q-item
36
+ >
37
+ </q-list>
38
+ </q-menu>
39
+ </q-btn>
40
+ </div>
41
+
42
+ <!-- <app-button icon="person" text-color="black" :label="shortName" rounded :class="$style['button-person']" />-->
43
+ </div>
44
+ </q-toolbar>
45
+ </q-header>
46
+ </template>
47
+
48
+ <script lang="ts" setup>
49
+ import { computed, defineProps, ref, withDefaults } from 'vue'
50
+ import { onClickOutside } from '@vueuse/core'
51
+ import AppIcon from '@/common/app-icon/AppIcon.vue'
52
+
53
+ interface Props {
54
+ userData: any
55
+ fullWidth?: boolean
56
+ pageTitle?: string
57
+ settingsMenuItems?: { label: string; name: string; isShow: boolean }[]
58
+ }
59
+
60
+ const emits = defineEmits(['clickSettingsMenuItem', 'clickNotification', 'clickProfile'])
61
+
62
+ const props = withDefaults(defineProps<Props>(), {
63
+ pageTitle: '',
64
+ })
65
+
66
+ const refMenuSettings = ref(null)
67
+ const isSettingsOpened = ref(false)
68
+
69
+ // const settingsMenuItems = ref([
70
+ // { label: 'Поиск инструментов', name: 'instrument-search', isShow: true },
71
+ // { label: 'Мониторинг оборудования', name: 'equipment-monitoring', isShow: true },
72
+ // { label: 'Root-режим выключен', name: 'root-off', isShow: true },
73
+ // { label: 'Root-режим включен', name: 'root-on', isShow: false },
74
+ // ])
75
+
76
+ const shortName = computed(
77
+ () =>
78
+ `${props.userData?.last_name} ${props.userData?.first_name} ${props.userData?.patronymic?.[0] || ''}${
79
+ props.userData?.patronymic?.[0] ? '.' : ''
80
+ }`,
81
+ )
82
+
83
+ const positionName = computed(() => props.userData?.positions?.[0]?.display_name)
84
+
85
+ const openSettingsMenu = () => {
86
+ return (isSettingsOpened.value = !isSettingsOpened.value)
87
+ }
88
+
89
+ const clickProfile = () => emits('clickProfile')
90
+ const clickSettingsMenuItem = (item: any) => emits('clickSettingsMenuItem', item.name)
91
+ const clickNotification = () => emits('clickNotification')
92
+
93
+ onClickOutside(refMenuSettings, () => (isSettingsOpened.value = false))
94
+ </script>
95
+
96
+ <style lang="scss" module>
97
+ .header {
98
+ height: 100px;
99
+ background: transparent;
100
+ margin: 0 auto;
101
+ max-width: 1300px;
102
+ }
103
+ .header-full {
104
+ max-width: 100%;
105
+ padding-right: 30px;
106
+ padding-left: 30px;
107
+ }
108
+ .toolbar {
109
+ padding: 0;
110
+ min-height: 100%;
111
+ h1 {
112
+ font-weight: 600;
113
+ font-size: 28px;
114
+ line-height: 100%;
115
+ font-family: Montserrat, sans-serif;
116
+ }
117
+ }
118
+
119
+ .header-search {
120
+ width: 412px;
121
+ font-size: 16px;
122
+ }
123
+
124
+ .action-buttons {
125
+ flex: 1;
126
+ position: relative;
127
+ display: flex;
128
+ align-items: center;
129
+ column-gap: 16px;
130
+ justify-content: end;
131
+ }
132
+
133
+ .button {
134
+ padding: 12px;
135
+ background: white;
136
+ transition: all 0.3s ease, color 0.3s ease;
137
+ }
138
+
139
+ .button-person {
140
+ padding: 10px 14px;
141
+ background: white;
142
+ }
143
+
144
+ .person {
145
+ display: flex;
146
+ align-items: center;
147
+ gap: 6px;
148
+ padding: 20px 12px;
149
+ height: 44px;
150
+ border-radius: 10px;
151
+ cursor: pointer;
152
+ background-color: white;
153
+ box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2), 0 2px 2px rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12);
154
+ transition: all 0.3s ease;
155
+ &__info {
156
+ display: flex;
157
+ flex-direction: column;
158
+ user-select: none;
159
+ p {
160
+ line-height: 1.2;
161
+ margin: 0;
162
+ padding: 0;
163
+ font-family: 'Nunito Sans', sans-serif;
164
+ color: rgb(63, 140, 255);
165
+ }
166
+ }
167
+ &:hover {
168
+ background-color: #e1e0e0;
169
+ transform: scale(1.01);
170
+ }
171
+ &:active {
172
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 4px 4px rgba(0, 0, 0, 0.2), 0 6px 2px -5px rgba(0, 0, 0, 0.2);
173
+ }
174
+ }
175
+
176
+ .notification {
177
+ cursor: pointer;
178
+ transition: transform 0.3s ease;
179
+ &:hover {
180
+ transform: scale(1.1);
181
+ }
182
+ :global(.q-focus-helper) {
183
+ display: none;
184
+ }
185
+ }
186
+
187
+ .settings {
188
+ cursor: pointer;
189
+ transition: transform 0.3s ease;
190
+ &__open {
191
+ transform: rotate(90deg);
192
+ }
193
+ :global(.q-focus-helper) {
194
+ display: none;
195
+ }
196
+ }
197
+
198
+ .settings-menu {
199
+ min-width: 210px;
200
+ border-radius: 8px;
201
+ &__list {
202
+ min-width: 210px;
203
+ }
204
+ &__item {
205
+ align-items: center;
206
+ font-family: 'Nunito Sans', sans-serif;
207
+ color: rgb(63, 140, 255);
208
+ }
209
+ }
210
+
211
+ .action-wrapper {
212
+ height: 32px;
213
+ justify-content: space-between;
214
+ align-items: center;
215
+ display: flex;
216
+ gap: 12px;
217
+ }
218
+
219
+ @media (max-width: 1440px) {
220
+ .header {
221
+ height: 100px;
222
+ background: transparent;
223
+ margin: 0 auto;
224
+ max-width: 874px;
225
+ }
226
+ .header-search {
227
+ width: 343px;
228
+ font-size: 16px;
229
+ }
230
+ .action-buttons {
231
+ position: relative;
232
+ display: flex;
233
+ align-items: center;
234
+ column-gap: 8px;
235
+ }
236
+ .button {
237
+ padding: 10px;
238
+ background: white;
239
+ transition: all 0.3s ease, color 0.3s ease;
240
+ }
241
+ .button-person {
242
+ padding: 8px 10px;
243
+ background: white;
244
+ }
245
+ }
246
+ </style>
@@ -1,16 +1,16 @@
1
- <template>
2
- <q-page class="page-container">
3
- <slot />
4
- </q-page>
5
- </template>
6
-
7
- <script setup lang="ts"></script>
8
-
9
- <style scoped lang="scss">
10
- .page-container {
11
- display: flex;
12
- flex-direction: column;
13
- padding: 0px 30px;
14
- height: 100%;
15
- }
16
- </style>
1
+ <template>
2
+ <q-page class="page-container">
3
+ <slot />
4
+ </q-page>
5
+ </template>
6
+
7
+ <script setup lang="ts"></script>
8
+
9
+ <style scoped lang="scss">
10
+ .page-container {
11
+ display: flex;
12
+ flex-direction: column;
13
+ padding: 0px 30px;
14
+ height: 100%;
15
+ }
16
+ </style>