bfg-common 1.3.386 → 1.3.387

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.
@@ -40,10 +40,26 @@
40
40
  />
41
41
  <span v-else :class="['icon', item.data.iconClassName]"></span>
42
42
  {{ item.text }}
43
+
44
+ <a
45
+ v-if="false"
46
+ id="sensor-item-warning"
47
+ :data-id="item.data.testId"
48
+ href="javascript:void(0)"
49
+ class="row-details__text"
50
+ @click="onShowFieldWarning(item.data.error)"
51
+ >{{ localization.details }}...
52
+ </a>
43
53
  </template>
44
54
  </atoms-table-data-grid>
45
55
  </div>
46
56
  </div>
57
+
58
+ <common-pages-hardware-health-table-view-modal-sensor-warning
59
+ v-if="isShowSensorWarningDetails"
60
+ :error="sensorWarningError"
61
+ @close-modal="isShowSensorWarningDetails = false"
62
+ />
47
63
  </template>
48
64
 
49
65
  <script lang="ts" setup>
@@ -96,6 +112,13 @@ const bodyItems = computed<UI_I_BodyItem[][]>(() => {
96
112
 
97
113
  return table[props.tableMode].bodyItems(tableData, localization.value)
98
114
  })
115
+
116
+ const isShowSensorWarningDetails = ref<boolean>(false)
117
+ const sensorWarningError = ref<string | null>(null)
118
+ const onShowFieldWarning = (error: string): void => {
119
+ isShowSensorWarningDetails.value = true
120
+ sensorWarningError.value = error
121
+ }
99
122
  </script>
100
123
 
101
124
  <style lang="scss" scoped>
@@ -126,6 +149,9 @@ const bodyItems = computed<UI_I_BodyItem[][]>(() => {
126
149
  margin-top: 5px;
127
150
  }
128
151
  }
152
+ &__text {
153
+ margin-left: 8px;
154
+ }
129
155
  }
130
156
  .icon {
131
157
  width: 18px;
@@ -21,7 +21,7 @@ const getItems = (
21
21
  ): [string, boolean, string, string][] => {
22
22
  return [
23
23
  [localization.sensors, true, '330px', hardwareHealthSensorTableKeys[0]],
24
- [localization.status, true, '110px', hardwareHealthSensorTableKeys[1]],
24
+ [localization.status, true, '140px', hardwareHealthSensorTableKeys[1]],
25
25
  [localization.reading, true, '115px', hardwareHealthSensorTableKeys[2]],
26
26
  [localization.categories, true, '130px', hardwareHealthSensorTableKeys[3]],
27
27
  [localization.lastUpdated, true, '195px', hardwareHealthSensorTableKeys[4]],
@@ -0,0 +1,63 @@
1
+ <template>
2
+ <atoms-modal
3
+ show
4
+ width="580px"
5
+ class="feedback-field"
6
+ :title="localization.theOperationFailed"
7
+ test-id="feedback-filed-modal"
8
+ @hide="onCloseModal"
9
+ >
10
+ <template #modalBody>
11
+ <div class="feedback-field__body">
12
+ <atoms-the-icon name="info" class="feedback-field__icon" />
13
+
14
+ <p class="feedback-field__text">
15
+ {{ props.error }}
16
+ </p>
17
+ </div>
18
+ </template>
19
+
20
+ <template #modalFooter>
21
+ <button
22
+ id="sensor-feedback-field-apply-button"
23
+ data-id="sensor-feedback-field-apply-button"
24
+ class="btn btn-primary"
25
+ @click="onCloseModal"
26
+ >
27
+ {{ localization.ok }}
28
+ </button>
29
+ </template>
30
+ </atoms-modal>
31
+ </template>
32
+
33
+ <script setup lang="ts">
34
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
35
+
36
+ const props = defineProps<{
37
+ error: string
38
+ }>()
39
+ const localization = computed<UI_I_Localization>(() => useLocal())
40
+ const emits = defineEmits<{
41
+ (event: 'close-modal'): void
42
+ }>()
43
+ const onCloseModal = (): void => {
44
+ emits('close-modal')
45
+ }
46
+ </script>
47
+
48
+ <style lang="scss" scoped>
49
+ @import 'assets/scss/common/mixins.scss';
50
+ .feedback-field {
51
+ &__body {
52
+ @include flex($align: center);
53
+ }
54
+ &__icon {
55
+ min-width: 40px;
56
+ height: 40px;
57
+ margin-right: 20px;
58
+ }
59
+ &__text {
60
+ @include text($fs: 14px, $fw: 300);
61
+ }
62
+ }
63
+ </style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.3.386",
4
+ "version": "1.3.387",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",