bfg-common 1.4.353 → 1.4.355
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.
- package/assets/localization/local_be.json +2796 -2806
- package/assets/localization/local_en.json +2800 -2810
- package/assets/localization/local_hy.json +17 -27
- package/assets/localization/local_kk.json +17 -27
- package/assets/localization/local_ru.json +17 -27
- package/assets/localization/local_zh.json +17 -27
- package/components/common/browse/blocks/lib/models/types.ts +1 -1
- package/components/common/browse/lib/models/interfaces.ts +5 -5
- package/components/common/layout/theHeader/feedback/Feedback.vue +7 -12
- package/components/common/layout/theHeader/feedback/FeedbackNew.vue +63 -0
- package/components/common/layout/theHeader/helpMenu/About.vue +72 -45
- package/components/common/layout/theHeader/helpMenu/HelpMenu.vue +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/lib/config/utils.ts +64 -136
- package/components/common/portlets/tag/CreateCategory.vue +276 -0
- package/components/common/portlets/tag/TagAddNew.vue +578 -0
- package/components/common/portlets/tag/TagsNew.vue +450 -0
- package/components/common/portlets/tag/lib/config/config.ts +200 -0
- package/components/common/portlets/tag/lib/models/interfaces.ts +27 -0
- package/components/common/portlets/tag/lib/models/types.ts +16 -0
- package/components/common/spiceConsole/Drawer.vue +0 -28
- package/components/common/wizards/network/add/lib/config/steps.ts +464 -464
- package/lib/models/interfaces.ts +0 -1
- package/package.json +2 -2
- package/components/common/layout/theHeader/feedback/lib/config/sendFeedback.ts +0 -9
- package/components/common/layout/theHeader/feedback/new/New.vue +0 -131
- package/components/common/layout/theHeader/feedback/new/additionalDetails/AdditionalDetails.vue +0 -14
- package/components/common/layout/theHeader/feedback/new/description/Description.vue +0 -58
- package/components/common/layout/theHeader/feedback/new/email/Email.vue +0 -43
- package/components/common/layout/theHeader/feedback/new/subtitle/Subtitle.vue +0 -83
- package/components/common/layout/theHeader/feedback/new/tabs/Tabs.vue +0 -79
- package/components/common/layout/theHeader/feedback/new/tabs/lib/config/tabs.ts +0 -25
- package/components/common/layout/theHeader/feedback/new/tabs/lib/models/interfaces.ts +0 -17
- package/components/common/layout/theHeader/feedback/new/tabs/lib/models/types.ts +0 -1
- package/components/common/layout/theHeader/helpMenu/aboutNew/AboutNew.vue +0 -92
- package/components/common/layout/theHeader/helpMenu/aboutOld/AboutOld.vue +0 -95
|
@@ -499,49 +499,31 @@ const vmItemsFunc = (
|
|
|
499
499
|
},
|
|
500
500
|
{
|
|
501
501
|
id: 2,
|
|
502
|
-
name: localization.inventoryMonitor.
|
|
503
|
-
description: localization.inventoryMonitor.
|
|
504
|
-
measurement: localization.
|
|
502
|
+
name: localization.inventoryMonitor.diskDevicesShares,
|
|
503
|
+
description: localization.inventoryMonitor.amountDiskDevicesShares,
|
|
504
|
+
measurement: localization.inventoryMonitor.usageInNum,
|
|
505
505
|
units: localization.common.num,
|
|
506
|
-
nameEn: '
|
|
507
|
-
testId: 'counters-table-
|
|
506
|
+
nameEn: 'disk devices shares',
|
|
507
|
+
testId: 'counters-table-disk-devices-shares-item',
|
|
508
508
|
},
|
|
509
509
|
{
|
|
510
510
|
id: 3,
|
|
511
|
-
name: localization.inventoryMonitor.
|
|
512
|
-
description: localization.inventoryMonitor.
|
|
513
|
-
measurement: localization.
|
|
511
|
+
name: localization.inventoryMonitor.diskDevicesLimitIOps,
|
|
512
|
+
description: localization.inventoryMonitor.amountDiskDevicesLimitIOps,
|
|
513
|
+
measurement: localization.inventoryMonitor.usageInNum,
|
|
514
514
|
units: localization.common.num,
|
|
515
|
-
nameEn: '
|
|
516
|
-
testId: 'counters-table-
|
|
517
|
-
},
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
// {
|
|
528
|
-
// id: 3,
|
|
529
|
-
// name: localization.inventoryMonitor.diskDevicesLimitIOps,
|
|
530
|
-
// description: localization.inventoryMonitor.amountDiskDevicesLimitIOps,
|
|
531
|
-
// measurement: localization.inventoryMonitor.usageInNum,
|
|
532
|
-
// units: localization.common.num,
|
|
533
|
-
// nameEn: 'disk devices limit iops',
|
|
534
|
-
// testId: 'counters-table-disk-devices-limit-iops-item',
|
|
535
|
-
// },
|
|
536
|
-
// {
|
|
537
|
-
// id: 4,
|
|
538
|
-
// name: localization.inventoryMonitor.diskDevicesSize,
|
|
539
|
-
// description: localization.inventoryMonitor.amountDiskDevicesSize,
|
|
540
|
-
// measurement: localization.inventoryMonitor.usageInKb,
|
|
541
|
-
// units: localization.common.kb,
|
|
542
|
-
// nameEn: 'disk devices size',
|
|
543
|
-
// testId: 'counters-table-disk-devices-size-item',
|
|
544
|
-
// },
|
|
515
|
+
nameEn: 'disk devices limit iops',
|
|
516
|
+
testId: 'counters-table-disk-devices-limit-iops-item',
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
id: 4,
|
|
520
|
+
name: localization.inventoryMonitor.diskDevicesSize,
|
|
521
|
+
description: localization.inventoryMonitor.amountDiskDevicesSize,
|
|
522
|
+
measurement: localization.inventoryMonitor.usageInKb,
|
|
523
|
+
units: localization.common.kb,
|
|
524
|
+
nameEn: 'disk devices size',
|
|
525
|
+
testId: 'counters-table-disk-devices-size-item',
|
|
526
|
+
},
|
|
545
527
|
]
|
|
546
528
|
const network: UI_I_AdvancedCounterItem[] = [
|
|
547
529
|
{
|
|
@@ -677,130 +659,76 @@ const vmItemsFunc = (
|
|
|
677
659
|
const memory: UI_I_AdvancedCounterItem[] = [
|
|
678
660
|
{
|
|
679
661
|
id: 0,
|
|
680
|
-
name: localization.inventoryMonitor.
|
|
681
|
-
description: localization.inventoryMonitor.
|
|
662
|
+
name: localization.inventoryMonitor.memoryLimitMb2,
|
|
663
|
+
description: localization.inventoryMonitor.memoryLimitInMB,
|
|
682
664
|
measurement: localization.inventoryMonitor.usageInMb,
|
|
683
665
|
units: localization.common.mb,
|
|
684
|
-
nameEn: 'memory
|
|
685
|
-
testId: 'counters-table-memory-
|
|
666
|
+
nameEn: 'memory limit mb',
|
|
667
|
+
testId: 'counters-table-memory-limit-mb-item',
|
|
686
668
|
},
|
|
687
669
|
{
|
|
688
670
|
id: 1,
|
|
689
|
-
name: localization.inventoryMonitor.
|
|
690
|
-
description: localization.inventoryMonitor.
|
|
671
|
+
name: localization.inventoryMonitor.memorySizeMb,
|
|
672
|
+
description: localization.inventoryMonitor.sizeAvailableMemoryInMB,
|
|
691
673
|
measurement: localization.inventoryMonitor.usageInMb,
|
|
692
674
|
units: localization.common.mb,
|
|
693
|
-
nameEn: 'memory
|
|
694
|
-
testId: 'counters-table-memory-
|
|
675
|
+
nameEn: 'memory size mb',
|
|
676
|
+
testId: 'counters-table-memory-size-mb-item',
|
|
695
677
|
},
|
|
696
678
|
{
|
|
697
679
|
id: 2,
|
|
698
|
-
name: localization.inventoryMonitor.
|
|
699
|
-
description: localization.inventoryMonitor.
|
|
700
|
-
measurement: localization.
|
|
701
|
-
units: localization.common.
|
|
702
|
-
nameEn: '
|
|
703
|
-
testId: 'counters-table-memory-
|
|
680
|
+
name: localization.inventoryMonitor.memoryReservationMb2,
|
|
681
|
+
description: localization.inventoryMonitor.memoryReservationInMB,
|
|
682
|
+
measurement: localization.inventoryMonitor.usageInMb,
|
|
683
|
+
units: localization.common.mb,
|
|
684
|
+
nameEn: 'memory reservation mb',
|
|
685
|
+
testId: 'counters-table-memory-reservation-mb-item',
|
|
704
686
|
},
|
|
705
687
|
{
|
|
706
688
|
id: 3,
|
|
707
|
-
name: localization.inventoryMonitor.
|
|
708
|
-
description: localization.inventoryMonitor.
|
|
709
|
-
measurement: localization.
|
|
689
|
+
name: localization.inventoryMonitor.memoryDramReadBandwidth,
|
|
690
|
+
description: localization.inventoryMonitor.memoryDramReadBandwidth,
|
|
691
|
+
measurement: localization.inventoryMonitor.usageInNum,
|
|
710
692
|
units: localization.common.num,
|
|
711
|
-
nameEn: '
|
|
712
|
-
testId: 'counters-table-memory-
|
|
693
|
+
nameEn: 'memory dram read bandwidth',
|
|
694
|
+
testId: 'counters-table-memory-dram-read-bandwidth-item',
|
|
713
695
|
},
|
|
714
696
|
{
|
|
715
697
|
id: 4,
|
|
716
|
-
name: localization.
|
|
717
|
-
description: localization.inventoryMonitor.
|
|
718
|
-
measurement: localization.
|
|
719
|
-
units: localization.common.
|
|
720
|
-
nameEn: '
|
|
721
|
-
testId: 'counters-table-memory-
|
|
698
|
+
name: localization.inventoryMonitor.memoryProvisionedMb,
|
|
699
|
+
description: localization.inventoryMonitor.provisionedMemoryInMB,
|
|
700
|
+
measurement: localization.inventoryMonitor.usageInMb,
|
|
701
|
+
units: localization.common.mb,
|
|
702
|
+
nameEn: 'memory provisioned mb',
|
|
703
|
+
testId: 'counters-table-memory-provisioned-mb-item',
|
|
722
704
|
},
|
|
723
705
|
{
|
|
724
706
|
id: 5,
|
|
725
|
-
name: localization.inventoryMonitor.
|
|
726
|
-
description: localization.inventoryMonitor.
|
|
727
|
-
measurement: localization.
|
|
728
|
-
units: localization.common.
|
|
729
|
-
nameEn: '
|
|
730
|
-
testId: 'counters-table-memory-
|
|
707
|
+
name: localization.inventoryMonitor.memoryPMemReadBandwidth,
|
|
708
|
+
description: localization.inventoryMonitor.memoryPMemReadBandwidth,
|
|
709
|
+
measurement: localization.inventoryMonitor.usageInNum,
|
|
710
|
+
units: localization.common.num,
|
|
711
|
+
nameEn: 'memory pmem read bandwidth',
|
|
712
|
+
testId: 'counters-table-memory-pmem-read-bandwidth-item',
|
|
731
713
|
},
|
|
732
714
|
{
|
|
733
715
|
id: 6,
|
|
734
|
-
name: localization.inventoryMonitor.
|
|
735
|
-
description: localization.inventoryMonitor.
|
|
736
|
-
measurement: localization.
|
|
737
|
-
units: localization.common.
|
|
738
|
-
nameEn: '
|
|
739
|
-
testId: 'counters-table-memory-
|
|
716
|
+
name: localization.inventoryMonitor.memoryUsedMb,
|
|
717
|
+
description: localization.inventoryMonitor.usedMemoryInMB,
|
|
718
|
+
measurement: localization.inventoryMonitor.usageInMb,
|
|
719
|
+
units: localization.common.mb,
|
|
720
|
+
nameEn: 'memory used mb',
|
|
721
|
+
testId: 'counters-table-memory-used-mb-item',
|
|
740
722
|
},
|
|
741
723
|
{
|
|
742
724
|
id: 7,
|
|
743
|
-
name: localization.inventoryMonitor.
|
|
744
|
-
description: localization.inventoryMonitor.
|
|
745
|
-
measurement: localization.
|
|
746
|
-
units: localization.common.
|
|
747
|
-
nameEn: '
|
|
748
|
-
testId: 'counters-table-memory-
|
|
749
|
-
},
|
|
750
|
-
// {
|
|
751
|
-
// id: 0,
|
|
752
|
-
// name: localization.inventoryMonitor.memoryLimitMb2,
|
|
753
|
-
// description: localization.inventoryMonitor.memoryLimitInMB,
|
|
754
|
-
// measurement: localization.inventoryMonitor.usageInMb,
|
|
755
|
-
// units: localization.common.mb,
|
|
756
|
-
// nameEn: 'memory limit mb',
|
|
757
|
-
// testId: 'counters-table-memory-limit-mb-item',
|
|
758
|
-
// },
|
|
759
|
-
// {
|
|
760
|
-
// id: 2,
|
|
761
|
-
// name: localization.inventoryMonitor.memoryReservationMb2,
|
|
762
|
-
// description: localization.inventoryMonitor.memoryReservationInMB,
|
|
763
|
-
// measurement: localization.inventoryMonitor.usageInMb,
|
|
764
|
-
// units: localization.common.mb,
|
|
765
|
-
// nameEn: 'memory reservation mb',
|
|
766
|
-
// testId: 'counters-table-memory-reservation-mb-item',
|
|
767
|
-
// },
|
|
768
|
-
// {
|
|
769
|
-
// id: 3,
|
|
770
|
-
// name: localization.inventoryMonitor.memoryDramReadBandwidth,
|
|
771
|
-
// description: localization.inventoryMonitor.memoryDramReadBandwidth,
|
|
772
|
-
// measurement: localization.inventoryMonitor.usageInNum,
|
|
773
|
-
// units: localization.common.num,
|
|
774
|
-
// nameEn: 'memory dram read bandwidth',
|
|
775
|
-
// testId: 'counters-table-memory-dram-read-bandwidth-item',
|
|
776
|
-
// },
|
|
777
|
-
// {
|
|
778
|
-
// id: 4,
|
|
779
|
-
// name: localization.inventoryMonitor.memoryProvisionedMb,
|
|
780
|
-
// description: localization.inventoryMonitor.provisionedMemoryInMB,
|
|
781
|
-
// measurement: localization.inventoryMonitor.usageInMb,
|
|
782
|
-
// units: localization.common.mb,
|
|
783
|
-
// nameEn: 'memory provisioned mb',
|
|
784
|
-
// testId: 'counters-table-memory-provisioned-mb-item',
|
|
785
|
-
// },
|
|
786
|
-
// {
|
|
787
|
-
// id: 5,
|
|
788
|
-
// name: localization.inventoryMonitor.memoryPMemReadBandwidth,
|
|
789
|
-
// description: localization.inventoryMonitor.memoryPMemReadBandwidth,
|
|
790
|
-
// measurement: localization.inventoryMonitor.usageInNum,
|
|
791
|
-
// units: localization.common.num,
|
|
792
|
-
// nameEn: 'memory pmem read bandwidth',
|
|
793
|
-
// testId: 'counters-table-memory-pmem-read-bandwidth-item',
|
|
794
|
-
// },
|
|
795
|
-
// {
|
|
796
|
-
// id: 7,
|
|
797
|
-
// name: localization.inventoryMonitor.memoryResidentSetSizeMb,
|
|
798
|
-
// description: localization.inventoryMonitor.residentSetSizeMemoryInMB,
|
|
799
|
-
// measurement: localization.inventoryMonitor.usageInMb,
|
|
800
|
-
// units: localization.common.mb,
|
|
801
|
-
// nameEn: 'memory resident set size mb',
|
|
802
|
-
// testId: 'counters-table-memory-resident-set-size-mb-item',
|
|
803
|
-
// },
|
|
725
|
+
name: localization.inventoryMonitor.memoryResidentSetSizeMb,
|
|
726
|
+
description: localization.inventoryMonitor.residentSetSizeMemoryInMB,
|
|
727
|
+
measurement: localization.inventoryMonitor.usageInMb,
|
|
728
|
+
units: localization.common.mb,
|
|
729
|
+
nameEn: 'memory resident set size mb',
|
|
730
|
+
testId: 'counters-table-memory-resident-set-size-mb-item',
|
|
731
|
+
},
|
|
804
732
|
]
|
|
805
733
|
const datastore: UI_I_AdvancedCounterItem[] = [
|
|
806
734
|
{
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ui-modal
|
|
3
|
+
v-if="props.isShowModal"
|
|
4
|
+
:title="localization.common.createCategory"
|
|
5
|
+
test-id="modal-create-category"
|
|
6
|
+
width="656px"
|
|
7
|
+
:texts="createCategoryTexts"
|
|
8
|
+
@hide="emits('cancel')"
|
|
9
|
+
@submit="onCreate"
|
|
10
|
+
>
|
|
11
|
+
<template #header></template>
|
|
12
|
+
<template #content>
|
|
13
|
+
<div class="create-category">
|
|
14
|
+
<div class="create-category-name">
|
|
15
|
+
<ui-input
|
|
16
|
+
v-model="data.categoryName"
|
|
17
|
+
test-id="category-name-input"
|
|
18
|
+
:label="localization.common.categoryName"
|
|
19
|
+
size="lg"
|
|
20
|
+
:error="errorText"
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="create-category-description">
|
|
24
|
+
<ui-textarea
|
|
25
|
+
v-model="data.description"
|
|
26
|
+
test-id="description-textarea"
|
|
27
|
+
:label="localization.common.description"
|
|
28
|
+
/>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="create-category-tpo">
|
|
31
|
+
<span class="create-category-tpo-title sub-title">{{
|
|
32
|
+
localization.common.tagsPerObject
|
|
33
|
+
}}</span>
|
|
34
|
+
<div class="create-category-tpo-radio">
|
|
35
|
+
<div class="create-category-tpo-radio-item">
|
|
36
|
+
<ui-radio
|
|
37
|
+
v-model="data.tagsPerObject"
|
|
38
|
+
test-id="tags-per-object-one"
|
|
39
|
+
size="lg"
|
|
40
|
+
:label="localization.common.oneTag"
|
|
41
|
+
value="0"
|
|
42
|
+
/>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="create-category-tpo-radio-item">
|
|
45
|
+
<ui-radio
|
|
46
|
+
v-model="data.tagsPerObject"
|
|
47
|
+
test-id="tags-per-object-many"
|
|
48
|
+
size="lg"
|
|
49
|
+
:label="localization.common.manyTag"
|
|
50
|
+
value="1"
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
<div class="create-category-types">
|
|
56
|
+
<div class="create-category-types-header">
|
|
57
|
+
<span class="create-category-types-header-title sub-title">
|
|
58
|
+
{{ localization.common.associableObjectTypes }}
|
|
59
|
+
</span>
|
|
60
|
+
<span class="create-category-types-header-selection">
|
|
61
|
+
<ui-button
|
|
62
|
+
variant="text"
|
|
63
|
+
is-without-height
|
|
64
|
+
is-without-sizes
|
|
65
|
+
:test-id="
|
|
66
|
+
isAllSelected ? 'deselect-all-tags' : 'select-all-tags'
|
|
67
|
+
"
|
|
68
|
+
@click="onSelectAllTypes"
|
|
69
|
+
>
|
|
70
|
+
{{ selectAllText }}
|
|
71
|
+
</ui-button>
|
|
72
|
+
</span>
|
|
73
|
+
</div>
|
|
74
|
+
<div class="create-category-types-body">
|
|
75
|
+
<div class="create-category-types-body-col">
|
|
76
|
+
<template
|
|
77
|
+
v-for="(type, index) in createCategoryTypes"
|
|
78
|
+
:key="type"
|
|
79
|
+
>
|
|
80
|
+
<div v-if="index % 2 === 0">
|
|
81
|
+
<ui-checkbox
|
|
82
|
+
v-model="data.types[type]"
|
|
83
|
+
:label-text="localization.common[type]"
|
|
84
|
+
:test-id="`checkbox-type-${type}`"
|
|
85
|
+
/>
|
|
86
|
+
</div>
|
|
87
|
+
</template>
|
|
88
|
+
</div>
|
|
89
|
+
<div class="create-category-types-body-col">
|
|
90
|
+
<template
|
|
91
|
+
v-for="(type, index) in createCategoryTypes"
|
|
92
|
+
:key="type"
|
|
93
|
+
>
|
|
94
|
+
<div v-if="index % 2 === 1">
|
|
95
|
+
<ui-checkbox
|
|
96
|
+
v-model="data.types[type]"
|
|
97
|
+
:label-text="localization.common[type]"
|
|
98
|
+
:test-id="`checkbox-type-${type}`"
|
|
99
|
+
/>
|
|
100
|
+
</div>
|
|
101
|
+
</template>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</template>
|
|
107
|
+
<template #footerLeftContent>
|
|
108
|
+
<span></span>
|
|
109
|
+
</template>
|
|
110
|
+
</ui-modal>
|
|
111
|
+
</template>
|
|
112
|
+
|
|
113
|
+
<script setup lang="ts">
|
|
114
|
+
import type {
|
|
115
|
+
UI_I_ArbitraryObject,
|
|
116
|
+
UI_I_Localization,
|
|
117
|
+
} from '~/lib/models/interfaces'
|
|
118
|
+
import type { UI_I_ModalTexts } from '~/node_modules/bfg-uikit/components/ui/modal/models/interfaces'
|
|
119
|
+
import type { I_CreateCategoryData } from '~/components/common/portlets/tag/lib/models/interfaces'
|
|
120
|
+
import {
|
|
121
|
+
createCategoryData,
|
|
122
|
+
createCategoryTypes,
|
|
123
|
+
} from '~/components/common/portlets/tag/lib/config/config'
|
|
124
|
+
|
|
125
|
+
const props = defineProps<{
|
|
126
|
+
isShowModal: boolean
|
|
127
|
+
}>()
|
|
128
|
+
|
|
129
|
+
const emits = defineEmits<{
|
|
130
|
+
(event: 'cancel'): void
|
|
131
|
+
(event: 'create', value: I_CreateCategoryData): void
|
|
132
|
+
}>()
|
|
133
|
+
|
|
134
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
135
|
+
|
|
136
|
+
const createCategoryTexts = computed<UI_I_ModalTexts>(() => ({
|
|
137
|
+
button1: localization.value.common.cancel,
|
|
138
|
+
button2: localization.value.common.create,
|
|
139
|
+
}))
|
|
140
|
+
|
|
141
|
+
const data = ref<I_CreateCategoryData>(useDeepCopy(createCategoryData))
|
|
142
|
+
|
|
143
|
+
const isAllSelected = computed<boolean>(() => {
|
|
144
|
+
let result = true
|
|
145
|
+
|
|
146
|
+
createCategoryTypes.forEach((key) => {
|
|
147
|
+
if (!data.value.types[key]) {
|
|
148
|
+
result = false
|
|
149
|
+
}
|
|
150
|
+
})
|
|
151
|
+
|
|
152
|
+
return result
|
|
153
|
+
})
|
|
154
|
+
|
|
155
|
+
const selectAllText = computed<string>(() =>
|
|
156
|
+
isAllSelected.value
|
|
157
|
+
? localization.value.common.deselectAll
|
|
158
|
+
: localization.value.common.selectAll
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
const isShowValidation = ref<boolean>(false)
|
|
162
|
+
const validationData = computed<boolean>(() => !data.value.categoryName.trim())
|
|
163
|
+
const errorText = computed<string>(() =>
|
|
164
|
+
validationData.value && isShowValidation.value
|
|
165
|
+
? localization.value.common.fieldRequired
|
|
166
|
+
: ''
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
const onCreate = (): void => {
|
|
170
|
+
if (validationData.value) {
|
|
171
|
+
isShowValidation.value = true
|
|
172
|
+
return
|
|
173
|
+
}
|
|
174
|
+
emits('create', data.value)
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
watch(
|
|
178
|
+
() => data.value.categoryName,
|
|
179
|
+
() => {
|
|
180
|
+
isShowValidation.value = false
|
|
181
|
+
}
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
const onSelectAllTypes = (): void => {
|
|
185
|
+
const newData: UI_I_ArbitraryObject<boolean> = {}
|
|
186
|
+
for (const key in data.value.types) {
|
|
187
|
+
newData[key] = !isAllSelected.value
|
|
188
|
+
}
|
|
189
|
+
data.value.types = newData
|
|
190
|
+
}
|
|
191
|
+
</script>
|
|
192
|
+
|
|
193
|
+
<style>
|
|
194
|
+
:root {
|
|
195
|
+
--sub-title-color: #4d5d69;
|
|
196
|
+
--separator-color: #e9ebed;
|
|
197
|
+
}
|
|
198
|
+
:root.dark-theme {
|
|
199
|
+
--sub-title-color: #e9eaec;
|
|
200
|
+
--separator-color: #e9ebed1f;
|
|
201
|
+
}
|
|
202
|
+
</style>
|
|
203
|
+
|
|
204
|
+
<style scoped lang="scss">
|
|
205
|
+
.create-category {
|
|
206
|
+
padding: 16px 32px;
|
|
207
|
+
&-name {
|
|
208
|
+
margin-bottom: 16px;
|
|
209
|
+
}
|
|
210
|
+
&-description {
|
|
211
|
+
margin-bottom: 24px;
|
|
212
|
+
:deep(textarea) {
|
|
213
|
+
height: 68px;
|
|
214
|
+
resize: none;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
&-tpo {
|
|
218
|
+
padding-bottom: 32px;
|
|
219
|
+
border-bottom: 1px solid var(--separator-color);
|
|
220
|
+
|
|
221
|
+
&-title {
|
|
222
|
+
margin-bottom: 16px;
|
|
223
|
+
font-size: 16px;
|
|
224
|
+
font-weight: 500;
|
|
225
|
+
line-height: 20px;
|
|
226
|
+
color: var(--sub-title-color);
|
|
227
|
+
display: inline-block;
|
|
228
|
+
}
|
|
229
|
+
&-radio {
|
|
230
|
+
display: flex;
|
|
231
|
+
column-gap: 16px;
|
|
232
|
+
|
|
233
|
+
&-item {
|
|
234
|
+
width: calc(50% - 8px);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
&-types {
|
|
239
|
+
margin-top: 24px;
|
|
240
|
+
|
|
241
|
+
&-header {
|
|
242
|
+
display: flex;
|
|
243
|
+
justify-content: space-between;
|
|
244
|
+
align-items: center;
|
|
245
|
+
margin-bottom: 16px;
|
|
246
|
+
|
|
247
|
+
&-title {
|
|
248
|
+
font-size: 16px;
|
|
249
|
+
font-weight: 500;
|
|
250
|
+
line-height: 20px;
|
|
251
|
+
color: var(--sub-title-color);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
&-selection {
|
|
255
|
+
:deep(button.ui-btn) {
|
|
256
|
+
line-height: 16px;
|
|
257
|
+
width: fit-content;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
&-body {
|
|
262
|
+
display: flex;
|
|
263
|
+
justify-content: space-between;
|
|
264
|
+
column-gap: 16px;
|
|
265
|
+
|
|
266
|
+
&-col {
|
|
267
|
+
width: calc(50% - 8px);
|
|
268
|
+
|
|
269
|
+
div:not(:last-of-type) {
|
|
270
|
+
margin-bottom: 12px;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
</style>
|