bfg-common 1.4.229 → 1.4.231

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.
@@ -13,6 +13,7 @@
13
13
  <template #modalBody="{ selectedStep }">
14
14
  <atoms-loader v-show="!vmSettings" id="loader" />
15
15
  <div v-if="vmSettings" class="vm-context">
16
+ <!-- TODO refactoring-->
16
17
  <templates-inventory-vm-configure-scheduled-tasks-modals-common-new-task-form
17
18
  v-show="selectedStep.id === dynamicSteps.scheduledTasks"
18
19
  v-model="newTaskForm"
@@ -180,11 +181,6 @@ const title = computed<string>(() => {
180
181
  return result
181
182
  })
182
183
 
183
- // const { id, type } = useRoute().params
184
- // const selectedVirtualMachine = computed<string>(() => {
185
- // return $store.getters['inventory/getNodeByTypeAndId'](type, id)?.name || ''
186
- // })
187
-
188
184
  const dynamicSteps = ref<I_DynamicSteps>(
189
185
  getDynamicSteps(props.isScheduledTasks)
190
186
  )
@@ -292,12 +288,12 @@ const checkName = async (
292
288
  return new Promise((resolve) => {
293
289
  nameFormSubmit.value = (isValid: boolean) => {
294
290
  if (!isValid) {
295
- stepHasError = wizard.setValidation(0, 'name', {
291
+ stepHasError = wizard.setValidation(dynamicSteps.value.selectName, 'name', {
296
292
  fieldMessage: 'aaa',
297
293
  alertMessage: 'aaa',
298
294
  })
299
- } else if (wizard.hasMessage(0, 'name')) {
300
- value = wizard.removeValidation(0, 'name', value)
295
+ } else if (wizard.hasMessage(dynamicSteps.value.selectName, 'name')) {
296
+ value = wizard.removeValidation(dynamicSteps.value.selectName, 'name', value)
301
297
  }
302
298
 
303
299
  resolve({
@@ -316,12 +312,12 @@ const checkStorage = async (
316
312
  return new Promise((resolve) => {
317
313
  storageSubmit.value = (isValid: boolean) => {
318
314
  if (!isValid) {
319
- stepHasError = wizard.setValidation(1, 'storage', {
315
+ stepHasError = wizard.setValidation(dynamicSteps.value.selectStorage, 'storage', {
320
316
  fieldMessage: 'aaa',
321
317
  alertMessage: 'aaa',
322
318
  })
323
- } else if (wizard.hasMessage(1, 'storage')) {
324
- value = wizard.removeValidation(1, 'storage', value)
319
+ } else if (wizard.hasMessage(dynamicSteps.value.selectStorage, 'storage')) {
320
+ value = wizard.removeValidation(dynamicSteps.value.selectStorage, 'storage', value)
325
321
  }
326
322
 
327
323
  resolve({
@@ -340,12 +336,12 @@ const checkCustomizeHardware = async (
340
336
  return new Promise((resolve) => {
341
337
  customizeHardwareSubmit.value = (isValid: boolean) => {
342
338
  if (!isValid) {
343
- stepHasError = wizard.setValidation(3, 'customizeHardware', {
339
+ stepHasError = wizard.setValidation(dynamicSteps.value.customizeHardware, 'customizeHardware', {
344
340
  fieldMessage: 'aaa',
345
341
  alertMessage: 'aaa',
346
342
  })
347
- } else if (wizard.hasMessage(3, 'customizeHardware')) {
348
- value = wizard.removeValidation(3, 'customizeHardware', value)
343
+ } else if (wizard.hasMessage(dynamicSteps.value.customizeHardware, 'customizeHardware')) {
344
+ value = wizard.removeValidation(dynamicSteps.value.customizeHardware, 'customizeHardware', value)
349
345
  }
350
346
 
351
347
  resolve({
@@ -86,10 +86,7 @@ export const stepsFunc = (
86
86
  },
87
87
  ]
88
88
 
89
- console.log(isScheduledTasks, 111111);
90
-
91
89
  if (!isScheduledTasks) {
92
- console.log(2222222);
93
90
  result.shift()
94
91
  result[0].status = UI_E_WIZARD_STATUS.SELECTED
95
92
  result = result.map((item) => {
@@ -98,15 +95,9 @@ export const stepsFunc = (
98
95
  })
99
96
  }
100
97
 
101
- console.log(result, 33333333);
102
-
103
98
  return result
104
99
  }
105
100
 
106
- // export const stepsSchemeInitial = [
107
- // [0, 1, 2, 3, 4], // Procurator
108
- // ]
109
-
110
101
  export const stepsSchemeInitial = (isScheduledTasks: boolean): number[][] => {
111
102
  const resultWithOutScheduledTasks = [0, 1, 2, 3, 4]
112
103
  const resultWithScheduledTasks = [0, 1, 2, 3, 4, 5]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.229",
4
+ "version": "1.4.231",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",