bfg-common 1.3.100 → 1.3.101

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.
@@ -34,12 +34,11 @@
34
34
  <script setup lang="ts">
35
35
  import { UI_I_Localization } from '~/lib/models/interfaces'
36
36
  import {
37
- UI_I_Switch,
38
- UI_I_SelectedSwitch, UI_I_BodyItems,
37
+ UI_I_Switch,
38
+ UI_I_SelectedSwitch,
39
+ UI_I_BodyItems,
39
40
  } from '~/components/common/wizards/network/add/lib/models/interfaces'
40
- import {
41
- selectStandardSwitchTableHeadFunc
42
- } from '~/components/common/wizards/network/add/lib/config'
41
+ import { selectStandardSwitchTableHeadFunc } from '~/components/common/wizards/network/add/lib/config'
43
42
 
44
43
  interface I_SelectSwitchModalProps {
45
44
  show: boolean
@@ -90,8 +89,8 @@ const onHideErrorMessageAlert = (): void => {
90
89
  isShowErrorMessageAlert.value = false
91
90
  }
92
91
 
93
- const onSelectRow = (index: number): void => {
94
- selectedRowData.value = bodyItems.value[index]
92
+ const onSelectRow = (_index: number, item: UI_I_SelectedSwitch[]): void => {
93
+ selectedRowData.value = item
95
94
  }
96
95
 
97
96
  const onSelectSwitch = (): void => {
@@ -99,6 +98,7 @@ const onSelectSwitch = (): void => {
99
98
  selectedRowData.value &&
100
99
  selectedRowData.value[0] &&
101
100
  selectedRowData.value[0].id
101
+
102
102
  if (!selectedSwitchId) {
103
103
  isShowErrorMessageAlert.value = true
104
104
  return
@@ -285,7 +285,10 @@
285
285
  </template>
286
286
 
287
287
  <script setup lang="ts">
288
- import { UI_I_ArbitraryObject, UI_I_Localization } from '~/lib/models/interfaces'
288
+ import {
289
+ UI_I_ArbitraryObject,
290
+ UI_I_Localization,
291
+ } from '~/lib/models/interfaces'
289
292
  import {
290
293
  UI_I_TargetDevice,
291
294
  UI_I_Switch,
@@ -379,7 +382,9 @@ watch(
379
382
  (newStandardSwitchesInitial) => {
380
383
  !fields.value.standardSwitch &&
381
384
  (fields.value.standardSwitch =
382
- newStandardSwitchesInitial?.[0]?.name || '')
385
+ newStandardSwitchesInitial?.sort((prev, next) =>
386
+ prev.name.localeCompare(next.name)
387
+ )[0]?.name || '')
383
388
  },
384
389
  { deep: true, immediate: true }
385
390
  )
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.3.100",
4
+ "version": "1.3.101",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",