shared-ritm 1.1.37 → 1.1.39
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 +84414 -67622
- package/dist/shared-ritm.umd.js +111 -101
- package/dist/types/api/services/RepairsService.d.ts +1 -0
- package/package.json +1 -1
- package/src/api/services/RepairsService.ts +4 -0
- package/src/common/app-button/AppButton.vue +173 -173
- package/src/common/app-sidebar/components/SidebarMenuItem.vue +1 -1
|
@@ -14,6 +14,7 @@ declare class RepairsService extends ApiService {
|
|
|
14
14
|
moveRepairToArchive(id: string): Promise<void>;
|
|
15
15
|
restoreRepair(id: string): Promise<void>;
|
|
16
16
|
updateRepair(payload: Api_Update_Repair, id: string): Promise<void>;
|
|
17
|
+
copyRepair(id: string): Promise<any>;
|
|
17
18
|
deleteRepair(id: string): Promise<import("axios").AxiosResponse<any, any>>;
|
|
18
19
|
}
|
|
19
20
|
export default function useRepairsService(): RepairsService;
|
package/package.json
CHANGED
|
@@ -81,6 +81,10 @@ class RepairsService extends ApiService {
|
|
|
81
81
|
return this.put<Api_Update_Repair, void>(`/repairs/${id}`, payload)
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
public copyRepair(id: string) {
|
|
85
|
+
return this.post<null, any>(`/repairs/${id}/clone`, null)
|
|
86
|
+
}
|
|
87
|
+
|
|
84
88
|
public deleteRepair(id: string) {
|
|
85
89
|
return this.delete<any>(`/repairs/${id}`)
|
|
86
90
|
}
|
|
@@ -1,173 +1,173 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-btn
|
|
3
|
-
v-bind="$props"
|
|
4
|
-
:class="[$style.wrapper]"
|
|
5
|
-
:disable="isDisabled"
|
|
6
|
-
:no-caps="!uppercase"
|
|
7
|
-
:no-wrap="!wrap"
|
|
8
|
-
class="hover-bg-secondary hover-text-black"
|
|
9
|
-
@click="onClick"
|
|
10
|
-
>
|
|
11
|
-
<slot></slot>
|
|
12
|
-
<q-badge
|
|
13
|
-
v-if="badge"
|
|
14
|
-
style="padding: 6px; top: -10px; right: -10px; font-size: 12px"
|
|
15
|
-
:color="badgeColor"
|
|
16
|
-
:floating="!badgeInline"
|
|
17
|
-
:rounded="true"
|
|
18
|
-
>{{ badgeText }}</q-badge
|
|
19
|
-
>
|
|
20
|
-
<q-tooltip v-if="tooltip" class="text-body2" :delay="400">{{ tooltip }}</q-tooltip>
|
|
21
|
-
</q-btn>
|
|
22
|
-
</template>
|
|
23
|
-
|
|
24
|
-
<script lang="ts" setup>
|
|
25
|
-
import { computed, defineProps, defineEmits } from 'vue'
|
|
26
|
-
|
|
27
|
-
interface QBtnProps {
|
|
28
|
-
size?: string | undefined
|
|
29
|
-
type?: string | undefined
|
|
30
|
-
to?: string | any | undefined
|
|
31
|
-
replace?: boolean | undefined
|
|
32
|
-
href?: string | undefined
|
|
33
|
-
target?: string | undefined
|
|
34
|
-
label?: string | number | undefined
|
|
35
|
-
icon?: string | undefined
|
|
36
|
-
iconRight?: string | undefined
|
|
37
|
-
outline?: boolean | undefined
|
|
38
|
-
flat?: boolean | undefined
|
|
39
|
-
unelevated?: boolean | undefined
|
|
40
|
-
rounded?: boolean | undefined
|
|
41
|
-
push?: boolean | undefined
|
|
42
|
-
square?: boolean | undefined
|
|
43
|
-
glossy?: boolean | undefined
|
|
44
|
-
fab?: boolean | undefined
|
|
45
|
-
fabMini?: boolean | undefined
|
|
46
|
-
padding?: string | undefined
|
|
47
|
-
color?: string | undefined
|
|
48
|
-
textColor?: string | undefined
|
|
49
|
-
noCaps?: boolean | undefined
|
|
50
|
-
noWrap?: boolean | undefined
|
|
51
|
-
dense?: boolean | undefined
|
|
52
|
-
ripple?: boolean | any | undefined
|
|
53
|
-
tabindex?: number | string | undefined
|
|
54
|
-
align?: 'left' | 'right' | 'center' | 'around' | 'between' | 'evenly' | undefined
|
|
55
|
-
stack?: boolean | undefined
|
|
56
|
-
stretch?: boolean | undefined
|
|
57
|
-
loading?: boolean | undefined
|
|
58
|
-
round?: boolean | undefined
|
|
59
|
-
percentage?: number | undefined
|
|
60
|
-
darkPercentage?: boolean | undefined
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
interface Props extends QBtnProps {
|
|
64
|
-
disable?: boolean | ((...args: any[]) => boolean)
|
|
65
|
-
tooltip?: string
|
|
66
|
-
uppercase?: boolean
|
|
67
|
-
xSmall?: boolean
|
|
68
|
-
small?: boolean
|
|
69
|
-
large?: boolean
|
|
70
|
-
fullWidth?: boolean
|
|
71
|
-
wrap?: boolean
|
|
72
|
-
largeIcon?: boolean
|
|
73
|
-
modelValue?: boolean
|
|
74
|
-
badge?: string | boolean | number
|
|
75
|
-
badgeColor?: string
|
|
76
|
-
badgeInline?: boolean
|
|
77
|
-
link?: boolean
|
|
78
|
-
borderColor?: string
|
|
79
|
-
borderRadius?: string
|
|
80
|
-
borderWidth?: string
|
|
81
|
-
width?: string
|
|
82
|
-
height?: string
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
86
|
-
borderRadius: '16px',
|
|
87
|
-
borderWidth: '1px',
|
|
88
|
-
width: 'auto',
|
|
89
|
-
height: 'auto',
|
|
90
|
-
disable: false,
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
const emit = defineEmits(['update:modelValue', 'click'])
|
|
94
|
-
|
|
95
|
-
function onClick(event: any) {
|
|
96
|
-
emit('click', event)
|
|
97
|
-
emit('update:modelValue', !props.modelValue)
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const badgeText = computed(() => {
|
|
101
|
-
if (props.badge === undefined || props.badge === false) return ''
|
|
102
|
-
if (props.badge === true || props.badge === '') return ''
|
|
103
|
-
return props.badge
|
|
104
|
-
})
|
|
105
|
-
|
|
106
|
-
// const btnClasses = computed(() => {
|
|
107
|
-
// return {
|
|
108
|
-
// '--icon': props.icon && !props.label,
|
|
109
|
-
// '--width-left-icon': props.icon && props.label,
|
|
110
|
-
// '--width-right-icon': props.iconRight && props.label,
|
|
111
|
-
// '--default': !props.small && !props.large && !props.xSmall,
|
|
112
|
-
// '--x-small': props.xSmall,
|
|
113
|
-
// '--small': props.small,
|
|
114
|
-
// '--large': props.large,
|
|
115
|
-
// '--full-width': props.fullWidth,
|
|
116
|
-
// '--large-icon': props.largeIcon,
|
|
117
|
-
// '--is-active': props.modelValue,
|
|
118
|
-
// '--link': props.link,
|
|
119
|
-
// '--loading': props.loading,
|
|
120
|
-
// }
|
|
121
|
-
// })
|
|
122
|
-
|
|
123
|
-
const isDisabled = computed(() => {
|
|
124
|
-
return typeof props.disable === 'function' ? props.disable() : props.disable
|
|
125
|
-
})
|
|
126
|
-
</script>
|
|
127
|
-
|
|
128
|
-
<style lang="scss" module>
|
|
129
|
-
.wrapper {
|
|
130
|
-
flex: 0 0 auto;
|
|
131
|
-
width: v-bind(width);
|
|
132
|
-
height: v-bind(height);
|
|
133
|
-
&:global(.q-btn--rounded) {
|
|
134
|
-
border-radius: v-bind(borderRadius);
|
|
135
|
-
}
|
|
136
|
-
&:global(.q-btn--outline:before) {
|
|
137
|
-
border-width: v-bind(borderWidth);
|
|
138
|
-
}
|
|
139
|
-
&:global(.q-btn) {
|
|
140
|
-
color: #0a1629;
|
|
141
|
-
font-size: 16px;
|
|
142
|
-
font-style: normal;
|
|
143
|
-
font-weight: 700;
|
|
144
|
-
font-family: NunitoSansFont, sans-serif;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
&:global(.--loading) {
|
|
148
|
-
span:has(> svg) {
|
|
149
|
-
overflow: hidden;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
:global(.q-icon) {
|
|
154
|
-
font-size: 1.2em;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
&:global(.--large-icon .q-icon) {
|
|
158
|
-
font-size: 1.715em;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
&:global(.--full-width) {
|
|
162
|
-
width: 100%;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
&:global(.--link) {
|
|
166
|
-
padding: 0 8px;
|
|
167
|
-
display: inline;
|
|
168
|
-
min-height: unset;
|
|
169
|
-
font-size: inherit;
|
|
170
|
-
text-decoration: underline;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<q-btn
|
|
3
|
+
v-bind="$props"
|
|
4
|
+
:class="[$style.wrapper]"
|
|
5
|
+
:disable="isDisabled"
|
|
6
|
+
:no-caps="!uppercase"
|
|
7
|
+
:no-wrap="!wrap"
|
|
8
|
+
class="hover-bg-secondary hover-text-black"
|
|
9
|
+
@click="onClick"
|
|
10
|
+
>
|
|
11
|
+
<slot></slot>
|
|
12
|
+
<q-badge
|
|
13
|
+
v-if="badge"
|
|
14
|
+
style="padding: 6px; top: -10px; right: -10px; font-size: 12px"
|
|
15
|
+
:color="badgeColor"
|
|
16
|
+
:floating="!badgeInline"
|
|
17
|
+
:rounded="true"
|
|
18
|
+
>{{ badgeText }}</q-badge
|
|
19
|
+
>
|
|
20
|
+
<q-tooltip v-if="tooltip" class="text-body2" :delay="400">{{ tooltip }}</q-tooltip>
|
|
21
|
+
</q-btn>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script lang="ts" setup>
|
|
25
|
+
import { computed, defineProps, defineEmits } from 'vue'
|
|
26
|
+
|
|
27
|
+
interface QBtnProps {
|
|
28
|
+
size?: string | undefined
|
|
29
|
+
type?: string | undefined
|
|
30
|
+
to?: string | any | undefined
|
|
31
|
+
replace?: boolean | undefined
|
|
32
|
+
href?: string | undefined
|
|
33
|
+
target?: string | undefined
|
|
34
|
+
label?: string | number | undefined
|
|
35
|
+
icon?: string | undefined
|
|
36
|
+
iconRight?: string | undefined
|
|
37
|
+
outline?: boolean | undefined
|
|
38
|
+
flat?: boolean | undefined
|
|
39
|
+
unelevated?: boolean | undefined
|
|
40
|
+
rounded?: boolean | undefined
|
|
41
|
+
push?: boolean | undefined
|
|
42
|
+
square?: boolean | undefined
|
|
43
|
+
glossy?: boolean | undefined
|
|
44
|
+
fab?: boolean | undefined
|
|
45
|
+
fabMini?: boolean | undefined
|
|
46
|
+
padding?: string | undefined
|
|
47
|
+
color?: string | undefined
|
|
48
|
+
textColor?: string | undefined
|
|
49
|
+
noCaps?: boolean | undefined
|
|
50
|
+
noWrap?: boolean | undefined
|
|
51
|
+
dense?: boolean | undefined
|
|
52
|
+
ripple?: boolean | any | undefined
|
|
53
|
+
tabindex?: number | string | undefined
|
|
54
|
+
align?: 'left' | 'right' | 'center' | 'around' | 'between' | 'evenly' | undefined
|
|
55
|
+
stack?: boolean | undefined
|
|
56
|
+
stretch?: boolean | undefined
|
|
57
|
+
loading?: boolean | undefined
|
|
58
|
+
round?: boolean | undefined
|
|
59
|
+
percentage?: number | undefined
|
|
60
|
+
darkPercentage?: boolean | undefined
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
interface Props extends QBtnProps {
|
|
64
|
+
disable?: boolean | ((...args: any[]) => boolean)
|
|
65
|
+
tooltip?: string
|
|
66
|
+
uppercase?: boolean
|
|
67
|
+
xSmall?: boolean
|
|
68
|
+
small?: boolean
|
|
69
|
+
large?: boolean
|
|
70
|
+
fullWidth?: boolean
|
|
71
|
+
wrap?: boolean
|
|
72
|
+
largeIcon?: boolean
|
|
73
|
+
modelValue?: boolean
|
|
74
|
+
badge?: string | boolean | number
|
|
75
|
+
badgeColor?: string
|
|
76
|
+
badgeInline?: boolean
|
|
77
|
+
link?: boolean
|
|
78
|
+
borderColor?: string
|
|
79
|
+
borderRadius?: string
|
|
80
|
+
borderWidth?: string
|
|
81
|
+
width?: string
|
|
82
|
+
height?: string
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
86
|
+
borderRadius: '16px',
|
|
87
|
+
borderWidth: '1px',
|
|
88
|
+
width: 'auto',
|
|
89
|
+
height: 'auto',
|
|
90
|
+
disable: false,
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
const emit = defineEmits(['update:modelValue', 'click'])
|
|
94
|
+
|
|
95
|
+
function onClick(event: any) {
|
|
96
|
+
emit('click', event)
|
|
97
|
+
emit('update:modelValue', !props.modelValue)
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const badgeText = computed(() => {
|
|
101
|
+
if (props.badge === undefined || props.badge === false) return ''
|
|
102
|
+
if (props.badge === true || props.badge === '') return ''
|
|
103
|
+
return props.badge
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
// const btnClasses = computed(() => {
|
|
107
|
+
// return {
|
|
108
|
+
// '--icon': props.icon && !props.label,
|
|
109
|
+
// '--width-left-icon': props.icon && props.label,
|
|
110
|
+
// '--width-right-icon': props.iconRight && props.label,
|
|
111
|
+
// '--default': !props.small && !props.large && !props.xSmall,
|
|
112
|
+
// '--x-small': props.xSmall,
|
|
113
|
+
// '--small': props.small,
|
|
114
|
+
// '--large': props.large,
|
|
115
|
+
// '--full-width': props.fullWidth,
|
|
116
|
+
// '--large-icon': props.largeIcon,
|
|
117
|
+
// '--is-active': props.modelValue,
|
|
118
|
+
// '--link': props.link,
|
|
119
|
+
// '--loading': props.loading,
|
|
120
|
+
// }
|
|
121
|
+
// })
|
|
122
|
+
|
|
123
|
+
const isDisabled = computed(() => {
|
|
124
|
+
return typeof props.disable === 'function' ? props.disable() : props.disable
|
|
125
|
+
})
|
|
126
|
+
</script>
|
|
127
|
+
|
|
128
|
+
<style lang="scss" module>
|
|
129
|
+
.wrapper {
|
|
130
|
+
flex: 0 0 auto;
|
|
131
|
+
width: v-bind(width);
|
|
132
|
+
height: v-bind(height);
|
|
133
|
+
&:global(.q-btn--rounded) {
|
|
134
|
+
border-radius: v-bind(borderRadius);
|
|
135
|
+
}
|
|
136
|
+
&:global(.q-btn--outline:before) {
|
|
137
|
+
border-width: v-bind(borderWidth);
|
|
138
|
+
}
|
|
139
|
+
&:global(.q-btn) {
|
|
140
|
+
color: #0a1629;
|
|
141
|
+
font-size: 16px;
|
|
142
|
+
font-style: normal;
|
|
143
|
+
font-weight: 700;
|
|
144
|
+
font-family: NunitoSansFont, sans-serif;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&:global(.--loading) {
|
|
148
|
+
span:has(> svg) {
|
|
149
|
+
overflow: hidden;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
:global(.q-icon) {
|
|
154
|
+
font-size: 1.2em;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&:global(.--large-icon .q-icon) {
|
|
158
|
+
font-size: 1.715em;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
&:global(.--full-width) {
|
|
162
|
+
width: 100%;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&:global(.--link) {
|
|
166
|
+
padding: 0 8px;
|
|
167
|
+
display: inline;
|
|
168
|
+
min-height: unset;
|
|
169
|
+
font-size: inherit;
|
|
170
|
+
text-decoration: underline;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
</style>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
:model-value="isRouteActive(item) && expand"
|
|
5
5
|
header-class="text-purple"
|
|
6
6
|
:class="[$style['menu-item'], { 'expansion-item-active': isRouteActive(item) && minify }]"
|
|
7
|
-
@update:model-value="
|
|
7
|
+
@update:model-value="expand = $event"
|
|
8
8
|
>
|
|
9
9
|
<template #header>
|
|
10
10
|
<q-tooltip
|