bfg-common 1.5.510 → 1.5.512

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.
@@ -98,6 +98,8 @@
98
98
  :adapters="props.adapters"
99
99
  :is-dark-mode="props.isDarkMode"
100
100
  :is-edit-modal-loading="props.isEditModalLoading"
101
+ :project="props.project"
102
+ :network-type="editableNetworkType"
101
103
  view-name="network-edit"
102
104
  width="1087px"
103
105
  height="662px"
@@ -394,6 +396,13 @@ const removableNetworkType = computed<string>(() =>
394
396
  : ''
395
397
  )
396
398
 
399
+ const editableNetworkType = computed<string>(() =>
400
+ props.isShowNetworkEditSettingsModal
401
+ ? props.networksList.find?.((a) => a.id === props.initialData.id)
402
+ ?.networkType
403
+ : ''
404
+ )
405
+
397
406
  const onRemove = (id: string, type: string) => {
398
407
  let idLocal = id
399
408
  if (type === 'network1') {
@@ -93,10 +93,19 @@ const flagSendData = ref(true)
93
93
  const onSendDataRequest = () => {
94
94
  flagSendData.value = !flagSendData.value
95
95
  }
96
+
97
+ const isSphereProject = computed<boolean>(() => props.project === 'sphere')
98
+
96
99
  const onSendData = (type: string) => {
100
+ const typeLocal = isSphereProject.value
101
+ ? props.networkType
102
+ ? `${type}${props.networkType}`
103
+ : type
104
+ : type
105
+
97
106
  emits(
98
107
  'send-edit-data',
99
- type,
108
+ typeLocal,
100
109
  onHideEditSettingsModal,
101
110
  props.initialData.id || props.title
102
111
  )
@@ -1,4 +1,5 @@
1
1
  import type { UI_I_ItemsWithTotalCounts } from '~/lib/models/interfaces'
2
+ import type { UI_T_Project } from '~/lib/models/types'
2
3
  import type {
3
4
  UI_I_ModalsInitialData,
4
5
  UI_I_SwitchAdapterItem,
@@ -18,4 +19,6 @@ export interface UI_I_PortViewSettingsModalProps {
18
19
  adapters?: UI_I_ItemsWithTotalCounts<UI_I_SwitchAdapterItem>
19
20
  isDarkMode: boolean
20
21
  isEditModalLoading?: boolean
22
+ networkType: string
23
+ project: UI_T_Project
21
24
  }
@@ -271,7 +271,9 @@ export const networkPopupFieldsFunc = (
271
271
  value: 'network-edit-settings',
272
272
  testId: `${testId}-edit`,
273
273
  permission:
274
- networkType === '1' ? 'Networks.UpdateSysx' : 'Networks.UpdatePortGroup',
274
+ networkType === '1'
275
+ ? 'Networks.UpdateInfoSysx'
276
+ : 'Networks.UpdatePortGroup',
275
277
  }
276
278
  const remove = {
277
279
  text: localization.common.remove,
@@ -313,7 +315,9 @@ export const networkPopupFieldsNewFunc = (
313
315
  iconName: 'edit',
314
316
  testId: `${testId}-edit`,
315
317
  permission:
316
- networkType === '1' ? 'Networks.UpdateSysx' : 'Networks.UpdatePortGroup',
318
+ networkType === '1'
319
+ ? 'Networks.UpdateInfoSysx'
320
+ : 'Networks.UpdatePortGroup',
317
321
  }
318
322
  const remove = {
319
323
  text: localization.common.remove,
@@ -323,7 +327,7 @@ export const networkPopupFieldsNewFunc = (
323
327
  textColor: '#ea3223',
324
328
  testId: `${testId}-remove`,
325
329
  permission:
326
- networkType === '1' ? 'Networks.RemoveSysx' : 'Networks.RemovePortGroup',
330
+ networkType === '1' ? 'Networks.RemoveSysx' : 'Networks.RemovePortGroup',
327
331
  // networkType === '1' ? 'network-vkernel-remove' : 'network-port-remove',
328
332
  }
329
333
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.5.510",
4
+ "version": "1.5.512",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",