bfg-common 1.4.341 → 1.4.342

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.
@@ -5,9 +5,7 @@
5
5
  width="560px"
6
6
  test-id="feedback-modal"
7
7
  :title="localization.common.sendFeedback"
8
- :texts="modalFooterButtonNames"
9
8
  class="feedback"
10
- @submit="onSubmit"
11
9
  @hide="onHideModal"
12
10
  >
13
11
  <template #content>
@@ -19,19 +17,52 @@
19
17
  class="metrics-tabs"
20
18
  />
21
19
 
22
- <common-layout-the-header-feedback-new-description
23
- v-model="feedbackForm.description"
24
- v-model:is-valid="isValidForm"
25
- :selected-tab="selectedTab"
26
- />
20
+ <div
21
+ v-if="selectedTab === 'light-bulb'"
22
+ class="feedback__visit-portal"
23
+ >
24
+ {{ localization.common.useOurExternalIdeasPortal }}
25
+ </div>
27
26
 
28
- <common-layout-the-header-feedback-new-email
29
- v-model="feedbackForm.email"
30
- />
27
+ <template v-else>
28
+ <common-layout-the-header-feedback-new-description
29
+ v-model="feedbackForm.description"
30
+ v-model:is-valid="isValidForm"
31
+ :selected-tab="selectedTab"
32
+ />
33
+
34
+ <common-layout-the-header-feedback-new-email
35
+ v-model="feedbackForm.email"
36
+ />
37
+ </template>
31
38
  </ui-modal-block-standard>
32
39
  </template>
33
40
 
34
41
  <template #footerLeftContent><span /></template>
42
+
43
+ <template #footerContent>
44
+ <div class="flex gap-4">
45
+ <ui-button
46
+ v-if="selectedTab !== 'light-bulb'"
47
+ test-id="feedback-modal-hide-btn"
48
+ size="md"
49
+ variant="outline"
50
+ min-width="96px"
51
+ @click="onHideModal"
52
+ >
53
+ {{ localization.common.cancel }}
54
+ </ui-button>
55
+ <ui-button
56
+ test-id="feedback-modal-submit-btn"
57
+ size="md"
58
+ :disabled="!selectedTab"
59
+ min-width="96px"
60
+ @click="onSubmit"
61
+ >
62
+ {{ modalFooterButtonNames }}
63
+ </ui-button>
64
+ </div>
65
+ </template>
35
66
  </ui-modal>
36
67
  </Teleport>
37
68
  </template>
@@ -52,16 +83,25 @@ const emits = defineEmits<{
52
83
 
53
84
  const localization = computed<UI_I_Localization>(() => useLocal())
54
85
 
55
- const modalFooterButtonNames = {
56
- button2: localization.value.common.send,
57
- }
58
86
  const isValidForm = ref<boolean>(true)
59
87
  const selectedTab = ref<UI_T_FeedbackTab>()
60
88
 
89
+ const modalFooterButtonNames = computed(() => {
90
+ return selectedTab.value === 'light-bulb'
91
+ ? localization.value.common.visitIdeasPortal
92
+ : localization.value.common.send
93
+ })
94
+
61
95
  const onHideModal = (): void => {
62
96
  emits('hide')
63
97
  }
64
98
  const onSubmit = (): void => {
99
+ if (selectedTab.value === 'light-bulb') {
100
+ const targetUrl = 'https://customer.aobfg.ru/' // Ваш URL
101
+ window.open(targetUrl, '_blank')
102
+ return
103
+ }
104
+
65
105
  isValidForm.value = !!feedbackForm.value.description
66
106
 
67
107
  if (!isValidForm.value) return
@@ -80,5 +120,12 @@ const onSubmit = (): void => {
80
120
  }
81
121
 
82
122
  .feedback {
123
+ &__visit-portal {
124
+ color: #4d5d69;
125
+ font-size: 13px;
126
+ font-weight: 400;
127
+ line-height: 15.73px;
128
+ margin-top: 24px;
129
+ }
83
130
  }
84
131
  </style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.341",
4
+ "version": "1.4.342",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",