shared-ritm 1.2.18 → 1.2.19

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 (35) hide show
  1. package/README.md +103 -103
  2. package/dist/index.css +1 -1
  3. package/dist/shared-ritm.es.js +3834 -3806
  4. package/dist/shared-ritm.umd.js +6 -6
  5. package/dist/types/index.d.ts +2 -1
  6. package/package.json +1 -1
  7. package/src/App.vue +2461 -2445
  8. package/src/api/services/GanttService.ts +17 -17
  9. package/src/api/services/MetricsService.ts +101 -101
  10. package/src/api/settings/ApiService.ts +126 -126
  11. package/src/api/types/Api_Files.ts +1 -1
  12. package/src/api/types/Api_Projects.ts +55 -55
  13. package/src/api/types/Api_Repairs.ts +93 -93
  14. package/src/common/app-checkbox/AppCheckbox.vue +26 -26
  15. package/src/common/app-date-picker/AppDatePicker.vue +81 -81
  16. package/src/common/app-dialogs/AppConfirmDialog.vue +100 -100
  17. package/src/common/app-dropdown/AppDropdown.vue +31 -31
  18. package/src/common/app-input-search/AppInputSearch.vue +170 -170
  19. package/src/common/app-layout/AppLayout.vue +32 -9
  20. package/src/common/app-layout/components/AppLayoutHeader.vue +108 -123
  21. package/src/common/app-layout/components/AppLayoutPage.vue +15 -0
  22. package/src/common/app-select/AppSelect.vue +157 -157
  23. package/src/common/app-sidebar/components/SidebarMenuItem.vue +146 -146
  24. package/src/common/app-toggle/AppToggle.vue +23 -23
  25. package/src/common/app-wrapper/AppWrapper.vue +28 -28
  26. package/src/icons/dialogs/RemoveIcon.vue +12 -12
  27. package/src/icons/dialogs/SafetyIcon.vue +12 -12
  28. package/src/icons/task/attention-icon.vue +13 -13
  29. package/src/icons/task/clock-icon.vue +10 -10
  30. package/src/icons/task/delete-icon.vue +10 -10
  31. package/src/icons/task/fire-icon.vue +16 -16
  32. package/src/index.ts +64 -62
  33. package/src/shared/styles/general.css +96 -96
  34. package/src/utils/confirm.ts +12 -12
  35. package/src/utils/notification.ts +9 -9
@@ -1,157 +1,157 @@
1
- <template>
2
- <q-select
3
- ref="select"
4
- v-model="selected"
5
- :options="filteredOptions"
6
- :option-value="optionValue"
7
- :option-label="optionLabel"
8
- emit-value
9
- map-options
10
- :disable="isDisabled"
11
- :multiple="multiple"
12
- outlined
13
- stack-label
14
- :use-input="search"
15
- :class="[$style.select]"
16
- :label="label"
17
- input-debounce="100"
18
- :popup-content-class="$style['app-select__menu']"
19
- :clearable="clearable"
20
- rounded
21
- autocomplete=""
22
- @filter="filterFn"
23
- >
24
- <template v-if="multiple" #selected-item="scope">
25
- <q-chip
26
- v-if="scope.opt"
27
- removable
28
- class="q-ma-none"
29
- dense
30
- :tabindex="scope.tabindex"
31
- color="white"
32
- text-color="secondary"
33
- @remove="scope.removeAtIndex(scope.index)"
34
- >
35
- {{ scope.opt[`${optionLabel}`] }}
36
- </q-chip>
37
- </template>
38
- <template #no-option>
39
- <q-item>{{ emptyText }}</q-item>
40
- </template>
41
- <q-item v-if="!lcText && type()">{{ placeholder }}</q-item>
42
- </q-select>
43
- </template>
44
- <script setup lang="ts">
45
- import { computed, defineEmits, defineProps, ref, Ref } from 'vue'
46
-
47
- import { QSelect } from 'quasar'
48
-
49
- type Option = Record<string, any>
50
-
51
- interface AppQSelectProps {
52
- modelValue: any
53
- options: Option[]
54
- placeholder: string
55
- emptyText: string
56
- optionLabel?: string
57
- optionValue?: string
58
- label?: string
59
- multiple?: boolean
60
- borderColor: string
61
- isDisabled?: boolean
62
- clearable?: boolean
63
- search?: boolean
64
- }
65
-
66
- const props = defineProps<AppQSelectProps>()
67
- const select = ref({})
68
- const emit = defineEmits(['update:modelValue'])
69
- const selected = computed({
70
- get() {
71
- return props.modelValue
72
- },
73
- set(value) {
74
- emit('update:modelValue', value)
75
- },
76
- })
77
-
78
- const type = () => {
79
- if (Array.isArray(selected.value) && !selected.value.length) return true
80
- return typeof selected.value === 'string' && !selected.value
81
- }
82
-
83
- const lcText: Ref<string> = ref('')
84
- const filteredOptions = computed(() => {
85
- return props.options.filter(x => x[props?.optionLabel || 'label'].toLowerCase().includes(lcText.value))
86
- })
87
-
88
- function filterFn(val: string, update: (arg0: () => void) => void) {
89
- update(() => {
90
- lcText.value = val.toLowerCase()
91
- })
92
- }
93
- </script>
94
- <style module lang="scss">
95
- .wrap {
96
- position: relative;
97
-
98
- &:global(.--option-tree) {
99
- cursor: pointer;
100
- }
101
- }
102
-
103
- .select {
104
- &:global(.q-field--outlined.q-field--rounded .q-field__control) {
105
- border-radius: 14px;
106
- }
107
- &:global(.q-field--outlined .q-field__control:before) {
108
- border-color: v-bind(borderColor);
109
- }
110
- &:global(.q-select .q-field__input) {
111
- padding: 0 6px;
112
- }
113
- //&:global(.q-field--filled .q-field__control) {
114
- // //color: red;
115
- //}
116
- //&:global(.q-field--filled.q-field--focused .q-field__control) {
117
- //}
118
- //&:global(.q-field--filled .q-field__control:after) {
119
- // left: 8px;
120
- // right: 8px;
121
- //}
122
- &:global(.q-field--outlined .q-item) {
123
- color: #1d1d1d;
124
- position: absolute;
125
- padding: 0 4px;
126
- top: 18px;
127
- left: 0;
128
- }
129
- }
130
-
131
- .append-wrapper {
132
- display: flex;
133
- align-items: center;
134
- column-gap: 4px;
135
- }
136
-
137
- .menu-wrap {
138
- padding: 8px;
139
- }
140
-
141
- .search-wrapper {
142
- position: sticky;
143
- top: 0;
144
- padding: 4px;
145
- background: var(--main-bg);
146
- z-index: 1;
147
- }
148
- .app-select__menu {
149
- border-radius: 14px;
150
- .q-item__label {
151
- word-break: break-word;
152
- }
153
- &:global(.q-menu) {
154
- max-height: 200px !important;
155
- }
156
- }
157
- </style>
1
+ <template>
2
+ <q-select
3
+ ref="select"
4
+ v-model="selected"
5
+ :options="filteredOptions"
6
+ :option-value="optionValue"
7
+ :option-label="optionLabel"
8
+ emit-value
9
+ map-options
10
+ :disable="isDisabled"
11
+ :multiple="multiple"
12
+ outlined
13
+ stack-label
14
+ :use-input="search"
15
+ :class="[$style.select]"
16
+ :label="label"
17
+ input-debounce="100"
18
+ :popup-content-class="$style['app-select__menu']"
19
+ :clearable="clearable"
20
+ rounded
21
+ autocomplete=""
22
+ @filter="filterFn"
23
+ >
24
+ <template v-if="multiple" #selected-item="scope">
25
+ <q-chip
26
+ v-if="scope.opt"
27
+ removable
28
+ class="q-ma-none"
29
+ dense
30
+ :tabindex="scope.tabindex"
31
+ color="white"
32
+ text-color="secondary"
33
+ @remove="scope.removeAtIndex(scope.index)"
34
+ >
35
+ {{ scope.opt[`${optionLabel}`] }}
36
+ </q-chip>
37
+ </template>
38
+ <template #no-option>
39
+ <q-item>{{ emptyText }}</q-item>
40
+ </template>
41
+ <q-item v-if="!lcText && type()">{{ placeholder }}</q-item>
42
+ </q-select>
43
+ </template>
44
+ <script setup lang="ts">
45
+ import { computed, defineEmits, defineProps, ref, Ref } from 'vue'
46
+
47
+ import { QSelect } from 'quasar'
48
+
49
+ type Option = Record<string, any>
50
+
51
+ interface AppQSelectProps {
52
+ modelValue: any
53
+ options: Option[]
54
+ placeholder: string
55
+ emptyText: string
56
+ optionLabel?: string
57
+ optionValue?: string
58
+ label?: string
59
+ multiple?: boolean
60
+ borderColor: string
61
+ isDisabled?: boolean
62
+ clearable?: boolean
63
+ search?: boolean
64
+ }
65
+
66
+ const props = defineProps<AppQSelectProps>()
67
+ const select = ref({})
68
+ const emit = defineEmits(['update:modelValue'])
69
+ const selected = computed({
70
+ get() {
71
+ return props.modelValue
72
+ },
73
+ set(value) {
74
+ emit('update:modelValue', value)
75
+ },
76
+ })
77
+
78
+ const type = () => {
79
+ if (Array.isArray(selected.value) && !selected.value.length) return true
80
+ return typeof selected.value === 'string' && !selected.value
81
+ }
82
+
83
+ const lcText: Ref<string> = ref('')
84
+ const filteredOptions = computed(() => {
85
+ return props.options.filter(x => x[props?.optionLabel || 'label'].toLowerCase().includes(lcText.value))
86
+ })
87
+
88
+ function filterFn(val: string, update: (arg0: () => void) => void) {
89
+ update(() => {
90
+ lcText.value = val.toLowerCase()
91
+ })
92
+ }
93
+ </script>
94
+ <style module lang="scss">
95
+ .wrap {
96
+ position: relative;
97
+
98
+ &:global(.--option-tree) {
99
+ cursor: pointer;
100
+ }
101
+ }
102
+
103
+ .select {
104
+ &:global(.q-field--outlined.q-field--rounded .q-field__control) {
105
+ border-radius: 14px;
106
+ }
107
+ &:global(.q-field--outlined .q-field__control:before) {
108
+ border-color: v-bind(borderColor);
109
+ }
110
+ &:global(.q-select .q-field__input) {
111
+ padding: 0 6px;
112
+ }
113
+ //&:global(.q-field--filled .q-field__control) {
114
+ // //color: red;
115
+ //}
116
+ //&:global(.q-field--filled.q-field--focused .q-field__control) {
117
+ //}
118
+ //&:global(.q-field--filled .q-field__control:after) {
119
+ // left: 8px;
120
+ // right: 8px;
121
+ //}
122
+ &:global(.q-field--outlined .q-item) {
123
+ color: #1d1d1d;
124
+ position: absolute;
125
+ padding: 0 4px;
126
+ top: 18px;
127
+ left: 0;
128
+ }
129
+ }
130
+
131
+ .append-wrapper {
132
+ display: flex;
133
+ align-items: center;
134
+ column-gap: 4px;
135
+ }
136
+
137
+ .menu-wrap {
138
+ padding: 8px;
139
+ }
140
+
141
+ .search-wrapper {
142
+ position: sticky;
143
+ top: 0;
144
+ padding: 4px;
145
+ background: var(--main-bg);
146
+ z-index: 1;
147
+ }
148
+ .app-select__menu {
149
+ border-radius: 14px;
150
+ .q-item__label {
151
+ word-break: break-word;
152
+ }
153
+ &:global(.q-menu) {
154
+ max-height: 200px !important;
155
+ }
156
+ }
157
+ </style>
@@ -1,146 +1,146 @@
1
- <template>
2
- <q-expansion-item
3
- v-if="item.items"
4
- :model-value="isRouteActive(item) && expand"
5
- header-class="text-purple"
6
- :class="[$style['menu-item'], { 'expansion-item-active': isRouteActive(item) && minify }]"
7
- @update:model-value="expand = $event"
8
- >
9
- <template #header>
10
- <q-tooltip
11
- v-if="minify"
12
- :delay="100"
13
- transition-show="jump-right"
14
- transition-hide="jump-left"
15
- anchor="center right"
16
- self="center left"
17
- >
18
- {{ item.label }}
19
- </q-tooltip>
20
-
21
- <q-item-section v-if="item.icon" avatar>
22
- <app-icon :name="item.icon" color="white" size="24px" />
23
- </q-item-section>
24
-
25
- <q-item-section :class="$style['menu-item__label']">{{ item.label }}</q-item-section>
26
- </template>
27
-
28
- <sidebar-menu-item
29
- v-for="(subItem, index) in item.items"
30
- :key="index"
31
- :item="subItem"
32
- :main="main"
33
- :is-route-active="isRouteActive"
34
- />
35
- </q-expansion-item>
36
- <q-item
37
- v-else-if="item.name !== 'sign-out'"
38
- v-ripple
39
- :class="$style['menu-item']"
40
- :active="isRouteActive(item)"
41
- active-class="menu-active"
42
- clickable
43
- :to="main ? item.to : ''"
44
- @click="goToRoute(item.to)"
45
- >
46
- <q-item-section v-if="item.icon" avatar>
47
- <app-icon :name="item.icon" color="white" size="24px" />
48
- </q-item-section>
49
-
50
- <q-item-section :class="$style['menu-item__label']">
51
- <p>{{ item.label }}</p>
52
- </q-item-section>
53
- <q-tooltip
54
- :delay="100"
55
- transition-show="jump-right"
56
- transition-hide="jump-left"
57
- anchor="center right"
58
- self="center left"
59
- >
60
- {{ item.label }}
61
- </q-tooltip>
62
- </q-item>
63
- </template>
64
-
65
- <script lang="ts" setup>
66
- import { defineProps, ref } from 'vue'
67
- import AppIcon from '@/common/app-icon/AppIcon.vue'
68
-
69
- interface Props {
70
- minify?: boolean
71
- main: boolean
72
- isRouteActive: (item: any) => boolean
73
- item: {
74
- name: string
75
- label: string
76
- icon: string
77
- href: string
78
- to: string
79
- items: any[]
80
- }
81
- }
82
-
83
- const emits = defineEmits(['goToRoute'])
84
- const props = defineProps<Props>()
85
-
86
- const expand = ref(true)
87
-
88
- const goToRoute = (to: string) => {
89
- if (!props.main) window.location.href = to
90
- }
91
- </script>
92
-
93
- <style lang="scss" scoped>
94
- .expansion-item-active {
95
- background: rgba(243, 249, 253, 0.1);
96
- border-radius: 10px;
97
- }
98
- </style>
99
-
100
- <style lang="scss" module>
101
- .menu-item {
102
- margin: 0 8px;
103
- &:global(.menu-active) {
104
- border-radius: 10px;
105
- background: rgba(243, 249, 253, 0.1);
106
- }
107
- :global(.q-item__section--avatar) {
108
- min-width: 24px;
109
- padding-right: 14px;
110
- }
111
-
112
- :global(.q-expansion-item__content .q-item) {
113
- padding-left: 20px;
114
- }
115
- :global(.q-item__section--main ~ .q-item__section--side) {
116
- color: white;
117
- }
118
- &__label {
119
- color: #fff;
120
- font-family: 'Nunito Sans', sans-serif;
121
- font-size: 16px;
122
- font-weight: 300;
123
- p {
124
- display: inline-block;
125
- max-width: 160px;
126
- white-space: nowrap;
127
- overflow: hidden;
128
- text-overflow: ellipsis;
129
- margin: 0;
130
- }
131
- }
132
- }
133
-
134
- @media (max-width: 1440px) {
135
- .menu-item {
136
- margin: 0 4px;
137
- :global(.q-item__section--avatar) {
138
- min-width: 24px;
139
- padding-right: 10px;
140
- }
141
- &__label {
142
- font-size: 14px;
143
- }
144
- }
145
- }
146
- </style>
1
+ <template>
2
+ <q-expansion-item
3
+ v-if="item.items"
4
+ :model-value="isRouteActive(item) && expand"
5
+ header-class="text-purple"
6
+ :class="[$style['menu-item'], { 'expansion-item-active': isRouteActive(item) && minify }]"
7
+ @update:model-value="expand = $event"
8
+ >
9
+ <template #header>
10
+ <q-tooltip
11
+ v-if="minify"
12
+ :delay="100"
13
+ transition-show="jump-right"
14
+ transition-hide="jump-left"
15
+ anchor="center right"
16
+ self="center left"
17
+ >
18
+ {{ item.label }}
19
+ </q-tooltip>
20
+
21
+ <q-item-section v-if="item.icon" avatar>
22
+ <app-icon :name="item.icon" color="white" size="24px" />
23
+ </q-item-section>
24
+
25
+ <q-item-section :class="$style['menu-item__label']">{{ item.label }}</q-item-section>
26
+ </template>
27
+
28
+ <sidebar-menu-item
29
+ v-for="(subItem, index) in item.items"
30
+ :key="index"
31
+ :item="subItem"
32
+ :main="main"
33
+ :is-route-active="isRouteActive"
34
+ />
35
+ </q-expansion-item>
36
+ <q-item
37
+ v-else-if="item.name !== 'sign-out'"
38
+ v-ripple
39
+ :class="$style['menu-item']"
40
+ :active="isRouteActive(item)"
41
+ active-class="menu-active"
42
+ clickable
43
+ :to="main ? item.to : ''"
44
+ @click="goToRoute(item.to)"
45
+ >
46
+ <q-item-section v-if="item.icon" avatar>
47
+ <app-icon :name="item.icon" color="white" size="24px" />
48
+ </q-item-section>
49
+
50
+ <q-item-section :class="$style['menu-item__label']">
51
+ <p>{{ item.label }}</p>
52
+ </q-item-section>
53
+ <q-tooltip
54
+ :delay="100"
55
+ transition-show="jump-right"
56
+ transition-hide="jump-left"
57
+ anchor="center right"
58
+ self="center left"
59
+ >
60
+ {{ item.label }}
61
+ </q-tooltip>
62
+ </q-item>
63
+ </template>
64
+
65
+ <script lang="ts" setup>
66
+ import { defineProps, ref } from 'vue'
67
+ import AppIcon from '@/common/app-icon/AppIcon.vue'
68
+
69
+ interface Props {
70
+ minify?: boolean
71
+ main: boolean
72
+ isRouteActive: (item: any) => boolean
73
+ item: {
74
+ name: string
75
+ label: string
76
+ icon: string
77
+ href: string
78
+ to: string
79
+ items: any[]
80
+ }
81
+ }
82
+
83
+ const emits = defineEmits(['goToRoute'])
84
+ const props = defineProps<Props>()
85
+
86
+ const expand = ref(true)
87
+
88
+ const goToRoute = (to: string) => {
89
+ if (!props.main) window.location.href = to
90
+ }
91
+ </script>
92
+
93
+ <style lang="scss" scoped>
94
+ .expansion-item-active {
95
+ background: rgba(243, 249, 253, 0.1);
96
+ border-radius: 10px;
97
+ }
98
+ </style>
99
+
100
+ <style lang="scss" module>
101
+ .menu-item {
102
+ margin: 0 8px;
103
+ &:global(.menu-active) {
104
+ border-radius: 10px;
105
+ background: rgba(243, 249, 253, 0.1);
106
+ }
107
+ :global(.q-item__section--avatar) {
108
+ min-width: 24px;
109
+ padding-right: 14px;
110
+ }
111
+
112
+ :global(.q-expansion-item__content .q-item) {
113
+ padding-left: 20px;
114
+ }
115
+ :global(.q-item__section--main ~ .q-item__section--side) {
116
+ color: white;
117
+ }
118
+ &__label {
119
+ color: #fff;
120
+ font-family: 'Nunito Sans', sans-serif;
121
+ font-size: 16px;
122
+ font-weight: 300;
123
+ p {
124
+ display: inline-block;
125
+ max-width: 160px;
126
+ white-space: nowrap;
127
+ overflow: hidden;
128
+ text-overflow: ellipsis;
129
+ margin: 0;
130
+ }
131
+ }
132
+ }
133
+
134
+ @media (max-width: 1440px) {
135
+ .menu-item {
136
+ margin: 0 4px;
137
+ :global(.q-item__section--avatar) {
138
+ min-width: 24px;
139
+ padding-right: 10px;
140
+ }
141
+ &__label {
142
+ font-size: 14px;
143
+ }
144
+ }
145
+ }
146
+ </style>
@@ -1,23 +1,23 @@
1
- <template>
2
- <div>
3
- <q-toggle v-model="value" />
4
- </div>
5
- </template>
6
-
7
- <script setup lang="ts">
8
- import { computed } from 'vue'
9
-
10
- interface Props {
11
- modelValue: any
12
- }
13
-
14
- const props = defineProps<Props>()
15
- const emit = defineEmits(['update:modelValue', 'number'])
16
-
17
- const value = computed({
18
- get: () => props.modelValue,
19
- set: (newValue: any) => emit('update:modelValue', newValue),
20
- })
21
- </script>
22
-
23
- <style module lang="scss"></style>
1
+ <template>
2
+ <div>
3
+ <q-toggle v-model="value" />
4
+ </div>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ import { computed } from 'vue'
9
+
10
+ interface Props {
11
+ modelValue: any
12
+ }
13
+
14
+ const props = defineProps<Props>()
15
+ const emit = defineEmits(['update:modelValue', 'number'])
16
+
17
+ const value = computed({
18
+ get: () => props.modelValue,
19
+ set: (newValue: any) => emit('update:modelValue', newValue),
20
+ })
21
+ </script>
22
+
23
+ <style module lang="scss"></style>