bfg-common 1.3.617 → 1.3.619

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.
@@ -20,7 +20,7 @@
20
20
 
21
21
  <div class="clr-form-control clr-row">
22
22
  <label for="" class="clr-control-label clr-col-md-2">
23
- {{ localization.name }}
23
+ {{ localization.common.name }}
24
24
  </label>
25
25
 
26
26
  <div
@@ -10,7 +10,7 @@
10
10
 
11
11
  <div class="clr-form-control clr-row">
12
12
  <label for="" class="clr-control-label clr-col-md-2">
13
- {{ localization.name }}
13
+ {{ localization.common.name }}
14
14
  </label>
15
15
 
16
16
  <div class="clr-control-container" :class="nameErrorText && 'clr-error'">
@@ -111,7 +111,7 @@ import type {
111
111
  import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
112
112
  import type { UI_I_CreateDatastoreHosts } from '~/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/models/interfaces'
113
113
  import { UI_T_DatastoreType } from '~/components/common/wizards/datastoreNew/add/lib/models/types'
114
- import { hostsOptionsFunc } from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/config/selectOptions'
114
+ import { hostsOptionsFunc } from '~/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/config/selectOptions'
115
115
 
116
116
  const props = defineProps<{
117
117
  project: UI_T_Project
@@ -1,14 +1,23 @@
1
1
  import { UI_I_Localization } from '~/lib/models/interfaces'
2
2
  import { UI_I_SelectHostOptions } from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces'
3
3
 
4
+ const constructHostListFunc = (
5
+ data: { host: string; id: string }[]
6
+ ): UI_I_SelectHostOptions[] => {
7
+ return data.map((item) => ({
8
+ text: item.host,
9
+ value: item.id,
10
+ disabled: false,
11
+ }))
12
+ }
13
+
4
14
  export const hostsOptionsFunc = (
5
15
  localization: UI_I_Localization,
6
- data: UI_I_SelectHostOptions[] | undefined
16
+ hosts: { host: string; id: string }[] | undefined
7
17
  ): UI_I_SelectHostOptions[] => {
8
- if(!data) return []
18
+ if (!hosts) return []
19
+
20
+ const data = constructHostListFunc(hosts)
9
21
 
10
- return [
11
- { text: localization.selectHost, value: '', disabled: true },
12
- ...data,
13
- ]
22
+ return [{ text: localization.selectHost, value: '', disabled: true }, ...data]
14
23
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.3.617",
4
+ "version": "1.3.619",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",