bfg-common 1.4.485 → 1.4.486

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.
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <common-pages-home-widgets-services-new
3
3
  v-if="isNewView"
4
+ :services="props.services"
4
5
  :loading="false"
5
6
  ></common-pages-home-widgets-services-new>
6
7
 
@@ -3,14 +3,15 @@
3
3
  <template v-if="props.loading">
4
4
  <!-- skeleton -->
5
5
  </template>
6
- <div v-else>
6
+ <div v-else class="services-table">
7
+ <h1>{{ localization.home.services }}</h1>
8
+
7
9
  <ui-data-table
8
- test-id="data-table-main"
10
+ test-id="home-services-table-main"
9
11
  :data="data"
10
12
  :options="options"
11
13
  :loading="props.loading"
12
14
  server-off
13
- class="resent-task-table"
14
15
  >
15
16
  <template #icon="{ item }">
16
17
  <span class="flex-align-center">
@@ -36,6 +37,7 @@ import type {
36
37
  UI_I_DataTableHeader,
37
38
  UI_I_DataTableBody,
38
39
  } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
40
+ import type { UI_I_Service } from '~/components/common/home/lib/models/interfaces'
39
41
  import {
40
42
  options,
41
43
  getHeaderDataFunc,
@@ -43,7 +45,7 @@ import {
43
45
  } from '~/components/common/pages/home/widgets/services/lib/config/config'
44
46
 
45
47
  const props = defineProps<{
46
- tableData: any
48
+ services: UI_I_Service[]
47
49
  loading: boolean
48
50
  }>()
49
51
 
@@ -61,8 +63,8 @@ const resentTaskHeadItems = computed<UI_I_DataTableHeader[]>(() =>
61
63
 
62
64
  const resentTaskBodyItems = ref<UI_I_DataTableBody[]>([])
63
65
  watch(
64
- () => props.tableData,
65
- (newValue) => {
66
+ () => props.services,
67
+ (newValue: UI_I_Service[]) => {
66
68
  if (!newValue?.length) return
67
69
 
68
70
  resentTaskBodyItems.value = getBodyDataFunc(newValue, localization.value)
@@ -72,6 +74,19 @@ watch(
72
74
  </script>
73
75
 
74
76
  <style lang="scss" scoped>
77
+ .services-table {
78
+ :deep(.default-layout) {
79
+ box-shadow: none;
80
+ padding: 0;
81
+ }
82
+ & > h1 {
83
+ color: var(--widget-text-first);
84
+ font-size: 16px;
85
+ font-weight: 500;
86
+ line-height: 19.36px;
87
+ }
88
+ }
89
+
75
90
  .target-link {
76
91
  font-family: Inter, serif;
77
92
  font-size: 13px;
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <common-pages-home-widgets-warnings-new
3
3
  v-if="isNewView"
4
+ :alerts="props.alerts"
4
5
  :loading="false"
5
6
  ></common-pages-home-widgets-warnings-new>
6
7
 
@@ -3,9 +3,14 @@
3
3
  <template v-if="props.loading">
4
4
  <!-- skeleton -->
5
5
  </template>
6
- <div v-else>
6
+ <div v-else class="warnings-table">
7
+ <div class="warnings-table__title">
8
+ <h1>{{ localization.home.objectsWithMostAlerts }}</h1>
9
+ <span>({{ props.alerts.length }})</span>
10
+ </div>
11
+
7
12
  <ui-data-table
8
- test-id="data-table-main"
13
+ test-id="home-warnings-table-main"
9
14
  :data="data"
10
15
  :options="options"
11
16
  :loading="props.loading"
@@ -36,6 +41,7 @@ import type {
36
41
  UI_I_DataTableHeader,
37
42
  UI_I_DataTableBody,
38
43
  } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
44
+ import type { UI_I_Alert } from '~/components/common/home/lib/models/interfaces'
39
45
  import {
40
46
  options,
41
47
  getHeaderDataFunc,
@@ -43,6 +49,7 @@ import {
43
49
  } from '~/components/common/pages/home/widgets/warnings/lib/config/config'
44
50
 
45
51
  const props = defineProps<{
52
+ alerts: UI_I_Alert[]
46
53
  loading: boolean
47
54
  }>()
48
55
 
@@ -60,8 +67,8 @@ const resentTaskHeadItems = computed<UI_I_DataTableHeader[]>(() =>
60
67
 
61
68
  const resentTaskBodyItems = ref<UI_I_DataTableBody[]>([])
62
69
  watch(
63
- () => props.tableData,
64
- (newValue) => {
70
+ () => props.alerts,
71
+ (newValue: UI_I_Alert[]) => {
65
72
  if (!newValue?.length) return
66
73
 
67
74
  resentTaskBodyItems.value = getBodyDataFunc(newValue, localization.value)
@@ -70,4 +77,17 @@ watch(
70
77
  )
71
78
  </script>
72
79
 
73
- <style lang="scss" scoped></style>
80
+ <style lang="scss" scoped>
81
+ .warnings-table {
82
+ :deep(.default-layout) {
83
+ box-shadow: none;
84
+ padding: 0;
85
+ }
86
+ & > h1 {
87
+ color: var(--widget-text-first);
88
+ font-size: 16px;
89
+ font-weight: 500;
90
+ line-height: 19.36px;
91
+ }
92
+ }
93
+ </style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.485",
4
+ "version": "1.4.486",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",