@dative-gpi/foundation-shared-components 0.0.90 → 0.0.92
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/components/FSChip.vue +34 -5
- package/components/FSClickable.vue +38 -16
- package/components/FSClock.vue +0 -3
- package/components/FSDialog.vue +46 -11
- package/components/FSDialogForm.vue +7 -28
- package/components/FSDialogRemove.vue +2 -1
- package/components/FSDialogSubmit.vue +7 -28
- package/components/FSDivider.vue +16 -6
- package/components/FSFadeOut.vue +49 -59
- package/components/FSSlideGroup.vue +14 -5
- package/components/FSSlider.vue +21 -9
- package/components/FSWindow.vue +13 -1
- package/components/FSWrapGroup.vue +2 -1
- package/components/deviceOrganisations/FSConnectivity.vue +4 -1
- package/components/deviceOrganisations/FSConnectivityCard.vue +31 -12
- package/components/deviceOrganisations/FSStatus.vue +4 -1
- package/components/deviceOrganisations/FSStatusCard.vue +48 -23
- package/components/deviceOrganisations/FSStatusesCarousel.vue +57 -39
- package/components/deviceOrganisations/FSWorstAlert.vue +4 -1
- package/components/deviceOrganisations/FSWorstAlertCard.vue +32 -14
- package/components/fields/FSAutocompleteField.vue +2 -7
- package/components/fields/FSSelectField.vue +1 -0
- package/components/lists/FSDataTableUI.vue +85 -33
- package/components/lists/FSFilterButton.vue +38 -24
- package/components/lists/FSHeaderButton.vue +21 -13
- package/components/lists/FSHiddenButton.vue +33 -15
- package/components/tiles/FSDeviceOrganisationTileUI.vue +3 -1
- package/components/tiles/FSFolderTileUI.vue +1 -1
- package/package.json +4 -4
- package/styles/components/fs_autocomplete_field.scss +7 -2
- package/styles/components/fs_chip.scss +1 -8
- package/styles/components/fs_dialog.scss +6 -18
- package/styles/components/fs_divider.scss +8 -2
- package/styles/components/fs_fade_out.scss +8 -23
- package/styles/components/fs_filter_button.scss +4 -4
- package/styles/components/fs_header_button.scss +4 -0
- package/styles/components/fs_select_field.scss +4 -3
- package/styles/components/fs_text_area.scss +0 -1
- package/styles/components/index.scss +0 -1
- package/styles/globals/overrides.scss +0 -4
- package/themes/default.ts +1 -1
- package/components/FSCarousel.vue +0 -72
- package/styles/components/fs_carousel.scss +0 -9
package/components/FSSlider.vue
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCol>
|
|
3
|
-
<slot
|
|
4
|
-
|
|
3
|
+
<slot
|
|
4
|
+
name="label"
|
|
5
|
+
>
|
|
6
|
+
<FSRow
|
|
7
|
+
:wrap="false"
|
|
8
|
+
>
|
|
5
9
|
<FSSpan
|
|
6
10
|
v-if="$props.label"
|
|
7
11
|
class="fs-slider-label"
|
|
@@ -34,11 +38,19 @@
|
|
|
34
38
|
@update:modelValue="(value) => $emit('update:modelValue', value)"
|
|
35
39
|
v-bind="$attrs"
|
|
36
40
|
>
|
|
37
|
-
<template
|
|
38
|
-
|
|
41
|
+
<template
|
|
42
|
+
v-for="(_, name) in $slots"
|
|
43
|
+
v-slot:[name]="slotData"
|
|
44
|
+
>
|
|
45
|
+
<slot
|
|
46
|
+
:name="name"
|
|
47
|
+
v-bind="slotData"
|
|
48
|
+
/>
|
|
39
49
|
</template>
|
|
40
50
|
</v-slider>
|
|
41
|
-
<slot
|
|
51
|
+
<slot
|
|
52
|
+
name="description"
|
|
53
|
+
>
|
|
42
54
|
<FSSpan
|
|
43
55
|
v-if="$props.description"
|
|
44
56
|
class="fs-slider-description"
|
|
@@ -117,10 +129,10 @@ export default defineComponent({
|
|
|
117
129
|
};
|
|
118
130
|
}
|
|
119
131
|
return {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
132
|
+
"--fs-slider-cursor" : "pointer",
|
|
133
|
+
"--fs-slider-track-color": colors.value.light,
|
|
134
|
+
"--fs-slider-thumb-color": colors.value.base,
|
|
135
|
+
"--fs-slider-color" : darks.base
|
|
124
136
|
};
|
|
125
137
|
});
|
|
126
138
|
|
package/components/FSWindow.vue
CHANGED
|
@@ -5,6 +5,15 @@
|
|
|
5
5
|
:touch="false"
|
|
6
6
|
v-bind="$attrs"
|
|
7
7
|
>
|
|
8
|
+
<template
|
|
9
|
+
v-for="(_, name) in slots"
|
|
10
|
+
v-slot:[name]="slotData"
|
|
11
|
+
>
|
|
12
|
+
<slot
|
|
13
|
+
:name="name"
|
|
14
|
+
v-bind="slotData"
|
|
15
|
+
/>
|
|
16
|
+
</template>
|
|
8
17
|
<v-window-item
|
|
9
18
|
v-for="(component, index) in getChildren()"
|
|
10
19
|
:value="value(component, index)"
|
|
@@ -33,7 +42,9 @@ export default defineComponent({
|
|
|
33
42
|
}
|
|
34
43
|
},
|
|
35
44
|
setup(props) {
|
|
36
|
-
const { getChildren } = useSlots();
|
|
45
|
+
const { slots, getChildren } = useSlots();
|
|
46
|
+
|
|
47
|
+
delete slots.default;
|
|
37
48
|
|
|
38
49
|
const style = computed((): { [key: string] : string | undefined } => ({
|
|
39
50
|
"--fs-window-width": sizeToVar(props.width)
|
|
@@ -44,6 +55,7 @@ export default defineComponent({
|
|
|
44
55
|
};
|
|
45
56
|
|
|
46
57
|
return {
|
|
58
|
+
slots,
|
|
47
59
|
style,
|
|
48
60
|
getChildren,
|
|
49
61
|
value
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
:closeOnContentClick="false"
|
|
4
4
|
v-model="menu"
|
|
5
5
|
>
|
|
6
|
-
<template
|
|
6
|
+
<template
|
|
7
|
+
#activator="{ props }"
|
|
8
|
+
>
|
|
7
9
|
<FSColorIcon
|
|
8
10
|
class="fs-stopclick"
|
|
9
11
|
size="m"
|
|
@@ -16,6 +18,7 @@
|
|
|
16
18
|
</template>
|
|
17
19
|
<FSConnectivityCard
|
|
18
20
|
:deviceConnectivity="$props.deviceConnectivity"
|
|
21
|
+
@close="menu = false"
|
|
19
22
|
/>
|
|
20
23
|
</v-menu>
|
|
21
24
|
</template>
|
|
@@ -1,31 +1,47 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCard
|
|
3
|
+
padding="2px 2px 8px 2px"
|
|
3
4
|
:elevation="true"
|
|
4
5
|
:border="false"
|
|
5
6
|
>
|
|
6
7
|
<FSCol
|
|
7
8
|
align="center-center"
|
|
8
|
-
padding="6px 24px"
|
|
9
9
|
>
|
|
10
10
|
<FSCol
|
|
11
11
|
align="center-center"
|
|
12
|
-
gap="
|
|
12
|
+
gap="0px"
|
|
13
13
|
>
|
|
14
|
-
<FSChip
|
|
15
|
-
:color="$props.deviceConnectivity.color"
|
|
16
|
-
:prependIcon="$props.deviceConnectivity.icon"
|
|
17
|
-
:label="connectivityLabel"
|
|
18
|
-
/>
|
|
19
14
|
<FSRow
|
|
20
|
-
|
|
15
|
+
align="center-right"
|
|
21
16
|
>
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
<FSButton
|
|
18
|
+
icon="mdi-close"
|
|
19
|
+
variant="icon"
|
|
20
|
+
@click="$emit('close')"
|
|
21
|
+
/>
|
|
25
22
|
</FSRow>
|
|
23
|
+
<FSCol
|
|
24
|
+
align="center-center"
|
|
25
|
+
padding="0px 24px"
|
|
26
|
+
gap="12px"
|
|
27
|
+
>
|
|
28
|
+
<FSChip
|
|
29
|
+
:prependIcon="$props.deviceConnectivity.icon"
|
|
30
|
+
:color="$props.deviceConnectivity.color"
|
|
31
|
+
:label="connectivityLabel"
|
|
32
|
+
/>
|
|
33
|
+
<FSRow
|
|
34
|
+
width="hug"
|
|
35
|
+
>
|
|
36
|
+
<FSText>
|
|
37
|
+
{{ $tr("ui.shared.device-connectivity.last-message", "Last message") }}
|
|
38
|
+
</FSText>
|
|
39
|
+
</FSRow>
|
|
40
|
+
</FSCol>
|
|
26
41
|
</FSCol>
|
|
27
42
|
<FSRow
|
|
28
43
|
v-if="deviceTimestamp"
|
|
44
|
+
padding="0px 24px"
|
|
29
45
|
width="hug"
|
|
30
46
|
>
|
|
31
47
|
<FSSpan
|
|
@@ -43,9 +59,10 @@ import { computed, defineComponent, PropType } from "vue";
|
|
|
43
59
|
|
|
44
60
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
45
61
|
import { FSDeviceConnectivity } from "@dative-gpi/foundation-shared-components/models";
|
|
46
|
-
import { ConnectivityStatus } from "@dative-gpi/foundation-shared-domain/models";
|
|
47
62
|
import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
|
|
63
|
+
import { ConnectivityStatus } from "@dative-gpi/foundation-shared-domain/models";
|
|
48
64
|
|
|
65
|
+
import FSButton from "../FSButton.vue";
|
|
49
66
|
import FSCard from "../FSCard.vue";
|
|
50
67
|
import FSChip from "../FSChip.vue";
|
|
51
68
|
import FSText from "../FSText.vue";
|
|
@@ -56,6 +73,7 @@ import FSRow from "../FSRow.vue";
|
|
|
56
73
|
export default defineComponent({
|
|
57
74
|
name: "FSConnectivityCard",
|
|
58
75
|
components: {
|
|
76
|
+
FSButton,
|
|
59
77
|
FSCard,
|
|
60
78
|
FSChip,
|
|
61
79
|
FSText,
|
|
@@ -69,6 +87,7 @@ export default defineComponent({
|
|
|
69
87
|
required: true
|
|
70
88
|
}
|
|
71
89
|
},
|
|
90
|
+
emit: ["close"],
|
|
72
91
|
setup(props) {
|
|
73
92
|
const { epochToLongTimeFormat } = useAppTimeZone();
|
|
74
93
|
const { $tr } = useTranslationsProvider();
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
:closeOnContentClick="false"
|
|
4
4
|
v-model="menu"
|
|
5
5
|
>
|
|
6
|
-
<template
|
|
6
|
+
<template
|
|
7
|
+
#activator="{ props }"
|
|
8
|
+
>
|
|
7
9
|
<FSColorIcon
|
|
8
10
|
class="fs-stopclick"
|
|
9
11
|
size="m"
|
|
@@ -17,6 +19,7 @@
|
|
|
17
19
|
<FSStatusCard
|
|
18
20
|
:modelStatus="$props.modelStatus"
|
|
19
21
|
:statusGroup="$props.statusGroup"
|
|
22
|
+
@close="menu = false"
|
|
20
23
|
/>
|
|
21
24
|
</v-menu>
|
|
22
25
|
</template>
|
|
@@ -1,43 +1,60 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCard
|
|
3
|
+
padding="2px 2px 8px 2px"
|
|
3
4
|
:elevation="true"
|
|
4
5
|
:border="false"
|
|
5
6
|
>
|
|
6
7
|
<FSCol
|
|
7
8
|
align="center-center"
|
|
8
|
-
padding="6px 24px"
|
|
9
9
|
>
|
|
10
10
|
<FSCol
|
|
11
11
|
align="center-center"
|
|
12
|
-
gap="
|
|
12
|
+
gap="0px"
|
|
13
13
|
>
|
|
14
|
-
<FSChip
|
|
15
|
-
:color="$props.statusGroup.color"
|
|
16
|
-
:prependIcon="$props.statusGroup.icon"
|
|
17
|
-
:label="$props.statusGroup.label"
|
|
18
|
-
/>
|
|
19
14
|
<FSRow
|
|
20
|
-
|
|
21
|
-
width="hug"
|
|
15
|
+
align="center-right"
|
|
22
16
|
>
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</FSText>
|
|
17
|
+
<FSButton
|
|
18
|
+
icon="mdi-close"
|
|
19
|
+
variant="icon"
|
|
20
|
+
@click="$emit('close')"
|
|
21
|
+
/>
|
|
29
22
|
</FSRow>
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
<FSCol
|
|
24
|
+
align="center-center"
|
|
25
|
+
padding="0px 24px"
|
|
26
|
+
gap="12px"
|
|
33
27
|
>
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
<FSChip
|
|
29
|
+
:prependIcon="$props.statusGroup.icon"
|
|
30
|
+
:color="$props.statusGroup.color"
|
|
31
|
+
:label="statusLabel"
|
|
32
|
+
/>
|
|
33
|
+
<FSRow
|
|
34
|
+
v-if="$props.statusGroup.value"
|
|
35
|
+
width="hug"
|
|
36
|
+
>
|
|
37
|
+
<FSText
|
|
38
|
+
font="text-button"
|
|
39
|
+
:color="$props.statusGroup.color"
|
|
40
|
+
>
|
|
41
|
+
{{ $props.statusGroup.value }} {{ $props.statusGroup.unit }}
|
|
42
|
+
</FSText>
|
|
43
|
+
</FSRow>
|
|
44
|
+
<FSRow
|
|
45
|
+
v-if="$props.statusGroup.value && $props.modelStatus.groupById && $props.statusGroup.groupByValue"
|
|
46
|
+
width="hug"
|
|
47
|
+
>
|
|
48
|
+
<FSSpan>
|
|
49
|
+
{{ $props.modelStatus.groupByLabel }} {{ $props.statusGroup.groupByValue }}
|
|
50
|
+
</FSSpan>
|
|
51
|
+
</FSRow>
|
|
52
|
+
</FSCol>
|
|
53
|
+
|
|
38
54
|
</FSCol>
|
|
39
55
|
<FSRow
|
|
40
56
|
v-if="deviceTimestamp"
|
|
57
|
+
padding="0px 24px"
|
|
41
58
|
width="hug"
|
|
42
59
|
>
|
|
43
60
|
<FSSpan
|
|
@@ -56,6 +73,7 @@ import { computed, defineComponent, PropType } from "vue";
|
|
|
56
73
|
import { FSDeviceStatusGroup, FSModelStatus } from "@dative-gpi/foundation-shared-components/models";
|
|
57
74
|
import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
|
|
58
75
|
|
|
76
|
+
import FSButton from "../FSButton.vue";
|
|
59
77
|
import FSCard from "../FSCard.vue";
|
|
60
78
|
import FSChip from "../FSChip.vue";
|
|
61
79
|
import FSText from "../FSText.vue";
|
|
@@ -66,6 +84,7 @@ import FSRow from "../FSRow.vue";
|
|
|
66
84
|
export default defineComponent({
|
|
67
85
|
name: "FSStatusCard",
|
|
68
86
|
components: {
|
|
87
|
+
FSButton,
|
|
69
88
|
FSCard,
|
|
70
89
|
FSChip,
|
|
71
90
|
FSText,
|
|
@@ -83,9 +102,14 @@ export default defineComponent({
|
|
|
83
102
|
required: true
|
|
84
103
|
}
|
|
85
104
|
},
|
|
105
|
+
emits: ["close"],
|
|
86
106
|
setup(props) {
|
|
87
107
|
const { epochToLongTimeFormat } = useAppTimeZone();
|
|
88
108
|
|
|
109
|
+
const statusLabel = computed((): string => {
|
|
110
|
+
return props.statusGroup.label || props.modelStatus.label;
|
|
111
|
+
});
|
|
112
|
+
|
|
89
113
|
const deviceTimestamp = computed((): string => {
|
|
90
114
|
if (props.statusGroup.sourceTimestamp) {
|
|
91
115
|
return epochToLongTimeFormat(props.statusGroup.sourceTimestamp);
|
|
@@ -94,7 +118,8 @@ export default defineComponent({
|
|
|
94
118
|
});
|
|
95
119
|
|
|
96
120
|
return {
|
|
97
|
-
deviceTimestamp
|
|
121
|
+
deviceTimestamp,
|
|
122
|
+
statusLabel
|
|
98
123
|
};
|
|
99
124
|
}
|
|
100
125
|
});
|
|
@@ -1,43 +1,41 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
:
|
|
2
|
+
<FSRow
|
|
3
|
+
:wrap="false"
|
|
4
4
|
>
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<template #next="{ props }">
|
|
16
|
-
<FSButton
|
|
17
|
-
v-if="$props.modelStatuses.length > 1"
|
|
18
|
-
icon="mdi-chevron-right"
|
|
19
|
-
class="fs-stopclick"
|
|
20
|
-
variant="icon"
|
|
21
|
-
:color="ColorEnum.Dark"
|
|
22
|
-
@click.prevent.stop="props.onClick"
|
|
23
|
-
/>
|
|
24
|
-
</template>
|
|
25
|
-
<FSRow
|
|
26
|
-
v-for="(modelStatus, index) in $props.modelStatuses"
|
|
27
|
-
align="center-center"
|
|
28
|
-
width="hug"
|
|
29
|
-
gap="4px"
|
|
30
|
-
:key="index"
|
|
31
|
-
:wrap="false"
|
|
5
|
+
<FSButton
|
|
6
|
+
v-if="$props.modelStatuses.length > 1"
|
|
7
|
+
icon="mdi-chevron-left"
|
|
8
|
+
class="fs-stopclick"
|
|
9
|
+
variant="icon"
|
|
10
|
+
@click.prevent.stop="previous"
|
|
11
|
+
/>
|
|
12
|
+
<FSWindow
|
|
13
|
+
width="100%"
|
|
14
|
+
:modelValue="tab"
|
|
32
15
|
>
|
|
33
|
-
<
|
|
34
|
-
v-for="(
|
|
35
|
-
|
|
36
|
-
|
|
16
|
+
<FSRow
|
|
17
|
+
v-for="(modelStatus, index) in $props.modelStatuses"
|
|
18
|
+
align="center-center"
|
|
19
|
+
gap="4px"
|
|
20
|
+
:wrap="false"
|
|
37
21
|
:key="index"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
22
|
+
>
|
|
23
|
+
<FSStatus
|
|
24
|
+
v-for="(statusGroup, index) in deviceStatus(modelStatus)"
|
|
25
|
+
:modelStatus="modelStatus"
|
|
26
|
+
:statusGroup="statusGroup"
|
|
27
|
+
:key="index"
|
|
28
|
+
/>
|
|
29
|
+
</FSRow>
|
|
30
|
+
</FSWindow>
|
|
31
|
+
<FSButton
|
|
32
|
+
v-if="$props.modelStatuses.length > 1"
|
|
33
|
+
icon="mdi-chevron-right"
|
|
34
|
+
class="fs-stopclick"
|
|
35
|
+
variant="icon"
|
|
36
|
+
@click.prevent.stop="next"
|
|
37
|
+
/>
|
|
38
|
+
</FSRow>
|
|
41
39
|
</template>
|
|
42
40
|
|
|
43
41
|
<script lang="ts">
|
|
@@ -46,16 +44,16 @@ import { defineComponent, PropType, ref } from "vue";
|
|
|
46
44
|
import { FSDeviceStatus, FSDeviceStatusGroup, FSModelStatus } from "@dative-gpi/foundation-shared-components/models";
|
|
47
45
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
48
46
|
|
|
49
|
-
import FSCarousel from "../FSCarousel.vue";
|
|
50
47
|
import FSButton from "../FSButton.vue";
|
|
48
|
+
import FSWindow from "../FSWindow.vue";
|
|
51
49
|
import FSStatus from "./FSStatus.vue";
|
|
52
50
|
import FSRow from "../FSRow.vue";
|
|
53
51
|
|
|
54
52
|
export default defineComponent({
|
|
55
53
|
name: "FSStatusesCarousel",
|
|
56
54
|
components: {
|
|
57
|
-
FSCarousel,
|
|
58
55
|
FSButton,
|
|
56
|
+
FSWindow,
|
|
59
57
|
FSStatus,
|
|
60
58
|
FSRow
|
|
61
59
|
},
|
|
@@ -72,6 +70,24 @@ export default defineComponent({
|
|
|
72
70
|
setup(props) {
|
|
73
71
|
const tab = ref(0);
|
|
74
72
|
|
|
73
|
+
const previous = () => {
|
|
74
|
+
if (tab.value > 0) {
|
|
75
|
+
tab.value--;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
tab.value = props.modelStatuses.length - 1;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const next = () => {
|
|
83
|
+
if (tab.value < props.modelStatuses.length - 1) {
|
|
84
|
+
tab.value++;
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
tab.value = 0;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
75
91
|
const deviceStatus = (modelStatus: FSModelStatus): FSDeviceStatusGroup[] => {
|
|
76
92
|
const deviceStatus = props.deviceStatuses
|
|
77
93
|
.find((deviceStatus: FSDeviceStatus) => deviceStatus.modelStatusId === modelStatus.id);
|
|
@@ -91,7 +107,9 @@ export default defineComponent({
|
|
|
91
107
|
return {
|
|
92
108
|
ColorEnum,
|
|
93
109
|
tab,
|
|
94
|
-
deviceStatus
|
|
110
|
+
deviceStatus,
|
|
111
|
+
previous,
|
|
112
|
+
next
|
|
95
113
|
};
|
|
96
114
|
}
|
|
97
115
|
});
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
:closeOnContentClick="false"
|
|
4
4
|
v-model="menu"
|
|
5
5
|
>
|
|
6
|
-
<template
|
|
6
|
+
<template
|
|
7
|
+
#activator="{ props }"
|
|
8
|
+
>
|
|
7
9
|
<FSBadge
|
|
8
10
|
:content="badgeLabel"
|
|
9
11
|
:color="criticityColor"
|
|
@@ -21,6 +23,7 @@
|
|
|
21
23
|
</template>
|
|
22
24
|
<FSWorstAlertCard
|
|
23
25
|
:deviceAlert="deviceAlert"
|
|
26
|
+
@close="menu = false"
|
|
24
27
|
/>
|
|
25
28
|
</v-menu>
|
|
26
29
|
</template>
|
|
@@ -1,31 +1,47 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCard
|
|
3
|
+
padding="2px 2px 8px 2px"
|
|
3
4
|
:elevation="true"
|
|
4
5
|
:border="false"
|
|
5
6
|
>
|
|
6
7
|
<FSCol
|
|
7
8
|
align="center-center"
|
|
8
|
-
padding="6px 24px"
|
|
9
9
|
>
|
|
10
10
|
<FSCol
|
|
11
11
|
align="center-center"
|
|
12
|
-
gap="
|
|
12
|
+
gap="0px"
|
|
13
13
|
>
|
|
14
|
-
<FSChip
|
|
15
|
-
:label="$props.deviceAlert.label"
|
|
16
|
-
:prependIcon="statusIcon"
|
|
17
|
-
:color="criticityColor"
|
|
18
|
-
/>
|
|
19
14
|
<FSRow
|
|
20
|
-
|
|
15
|
+
align="center-right"
|
|
21
16
|
>
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
<FSButton
|
|
18
|
+
icon="mdi-close"
|
|
19
|
+
variant="icon"
|
|
20
|
+
@click="$emit('close')"
|
|
21
|
+
/>
|
|
25
22
|
</FSRow>
|
|
23
|
+
<FSCol
|
|
24
|
+
align="center-center"
|
|
25
|
+
padding="0px 24px"
|
|
26
|
+
gap="12px"
|
|
27
|
+
>
|
|
28
|
+
<FSChip
|
|
29
|
+
:label="$props.deviceAlert.label"
|
|
30
|
+
:prependIcon="statusIcon"
|
|
31
|
+
:color="criticityColor"
|
|
32
|
+
/>
|
|
33
|
+
<FSRow
|
|
34
|
+
width="hug"
|
|
35
|
+
>
|
|
36
|
+
<FSText>
|
|
37
|
+
{{ statusLabel }}
|
|
38
|
+
</FSText>
|
|
39
|
+
</FSRow>
|
|
40
|
+
</FSCol>
|
|
26
41
|
</FSCol>
|
|
27
42
|
<FSRow
|
|
28
43
|
v-if="deviceTimestamp"
|
|
44
|
+
padding="0px 24px"
|
|
29
45
|
width="hug"
|
|
30
46
|
>
|
|
31
47
|
<FSSpan
|
|
@@ -39,14 +55,14 @@
|
|
|
39
55
|
</template>
|
|
40
56
|
|
|
41
57
|
<script lang="ts">
|
|
42
|
-
import { computed, defineComponent, PropType
|
|
58
|
+
import { computed, defineComponent, PropType } from "vue";
|
|
43
59
|
|
|
44
60
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
61
|
+
import { FSDeviceAlert, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
45
62
|
import { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/models";
|
|
46
63
|
import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
|
|
47
|
-
import { FSDeviceAlert } from "@dative-gpi/foundation-shared-components/models";
|
|
48
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
49
64
|
|
|
65
|
+
import FSButton from "../FSButton.vue";
|
|
50
66
|
import FSCard from "../FSCard.vue";
|
|
51
67
|
import FSChip from "../FSChip.vue";
|
|
52
68
|
import FSText from "../FSText.vue";
|
|
@@ -57,6 +73,7 @@ import FSRow from "../FSRow.vue";
|
|
|
57
73
|
export default defineComponent({
|
|
58
74
|
name: "FSWorstAlertCard",
|
|
59
75
|
components: {
|
|
76
|
+
FSButton,
|
|
60
77
|
FSCard,
|
|
61
78
|
FSChip,
|
|
62
79
|
FSText,
|
|
@@ -70,6 +87,7 @@ export default defineComponent({
|
|
|
70
87
|
required: true
|
|
71
88
|
}
|
|
72
89
|
},
|
|
90
|
+
emits: ["close"],
|
|
73
91
|
setup(props) {
|
|
74
92
|
const { epochToLongTimeFormat } = useAppTimeZone();
|
|
75
93
|
const { $tr } = useTranslationsProvider();
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
<FSCheckbox
|
|
75
75
|
v-if="$props.multiple"
|
|
76
76
|
:modelValue="$props.modelValue?.includes(item.raw[$props.itemValue])"
|
|
77
|
-
@click="
|
|
77
|
+
@click="props.onClick"
|
|
78
78
|
/>
|
|
79
79
|
<FSSpan>
|
|
80
80
|
{{ item.raw[$props.itemTitle] }}
|
|
@@ -312,10 +312,6 @@ export default defineComponent({
|
|
|
312
312
|
emit('update:modelValue', value);
|
|
313
313
|
};
|
|
314
314
|
|
|
315
|
-
const test = (props: any, item: any) => {
|
|
316
|
-
console.log(props, item);
|
|
317
|
-
};
|
|
318
|
-
|
|
319
315
|
watch(innerSearch, () => {
|
|
320
316
|
emit("update:search", innerSearch.value);
|
|
321
317
|
});
|
|
@@ -332,8 +328,7 @@ export default defineComponent({
|
|
|
332
328
|
classes,
|
|
333
329
|
slots,
|
|
334
330
|
style,
|
|
335
|
-
onUpdate
|
|
336
|
-
test
|
|
331
|
+
onUpdate
|
|
337
332
|
};
|
|
338
333
|
}
|
|
339
334
|
});
|