adata-ui 2.1.40-beta.15 → 2.1.40-beta.17
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/components/elements/status-badge/AStatusBadge.vue +4 -4
- package/components/modals/ReportBugModal.vue +6 -4
- package/components/navigation/pill-tabs/APillTabsV2.vue +23 -3
- package/composables/useHeaderNavigationLinks.ts +6 -0
- package/lang/en.ts +6 -2
- package/lang/kk.ts +6 -2
- package/lang/ru.ts +6 -2
- package/package.json +1 -1
|
@@ -81,11 +81,11 @@ const pointSwitchValues: ViewType = {
|
|
|
81
81
|
|
|
82
82
|
const classes = computed(() =>
|
|
83
83
|
[
|
|
84
|
-
'text-body-md rounded-
|
|
84
|
+
'text-body-md rounded-2xl select-none inline-flex gap-[5.5px] justify-center items-center border',
|
|
85
85
|
typeSwitchValues[props.view][props.type],
|
|
86
|
-
props.size === 'xs' ? 'px-
|
|
87
|
-
props.size === 'sm' ? 'text-body-sm font-semibold
|
|
88
|
-
props.size === 'lg' ? 'px-
|
|
86
|
+
props.size === 'xs' ? 'px-2 py-[2px] text-body-sm font-bold' : '',
|
|
87
|
+
props.size === 'sm' ? 'px-[10px] py-1 text-body-sm font-semibold h-6' : '',
|
|
88
|
+
props.size === 'lg' ? 'px-3 py-[6px] font-semibold' : '',
|
|
89
89
|
])
|
|
90
90
|
|
|
91
91
|
const pointClasses = computed(() =>
|
|
@@ -28,7 +28,6 @@ const form: any = reactive({
|
|
|
28
28
|
const phone = ref(form.phone_number)
|
|
29
29
|
|
|
30
30
|
const scheme = z.object({
|
|
31
|
-
name: z.string().nonempty(t('modals.report_bug.validation.required')),
|
|
32
31
|
email: z.string().nonempty(t('modals.report_bug.validation.required')).email(t('modals.submit_application_modal.rules.email')),
|
|
33
32
|
phone_number: z.string().nonempty(t('modals.report_bug.validation.required')).min(17, t('modals.report_bug.validation.phone', { n: 10 })),
|
|
34
33
|
comment: z.string().nonempty(t('modals.report_bug.validation.required')),
|
|
@@ -88,7 +87,11 @@ async function send() {
|
|
|
88
87
|
</script>
|
|
89
88
|
|
|
90
89
|
<template>
|
|
91
|
-
<a-modal-v2
|
|
90
|
+
<a-modal-v2
|
|
91
|
+
v-model="isOpen"
|
|
92
|
+
width="424px"
|
|
93
|
+
data-test-id="report-form-modal"
|
|
94
|
+
>
|
|
92
95
|
<template #header>
|
|
93
96
|
<h2 class="text-base font-semibold text-gray-900 dark:text-gray-100" data-test-id="report-form-title">
|
|
94
97
|
{{ t('modals.report_bug.title') }}
|
|
@@ -108,7 +111,6 @@ async function send() {
|
|
|
108
111
|
<div class="flex flex-col gap-3">
|
|
109
112
|
<a-input-v2
|
|
110
113
|
v-model="form.name"
|
|
111
|
-
required
|
|
112
114
|
:label="t('modals.report_bug.labels.name')"
|
|
113
115
|
:error="getError('name')"
|
|
114
116
|
data-test-id="report-form-name-input"
|
|
@@ -134,7 +136,7 @@ async function send() {
|
|
|
134
136
|
<a-textarea-v2
|
|
135
137
|
v-model="form.comment"
|
|
136
138
|
required
|
|
137
|
-
:rows="
|
|
139
|
+
:rows="6"
|
|
138
140
|
resize="none"
|
|
139
141
|
:label="t('modals.report_bug.labels.comment')"
|
|
140
142
|
:error="getError('comment')"
|
|
@@ -4,7 +4,7 @@ type CountColor = 'gray' | 'blue' | 'yellow' | 'red' | 'green' | 'neutral'
|
|
|
4
4
|
export interface PillTab {
|
|
5
5
|
key: string
|
|
6
6
|
name: string
|
|
7
|
-
count?: number
|
|
7
|
+
count?: number | string
|
|
8
8
|
countColor?: CountColor
|
|
9
9
|
disabled?: boolean
|
|
10
10
|
hideCount?: boolean
|
|
@@ -14,6 +14,7 @@ const props = withDefaults(defineProps<{
|
|
|
14
14
|
modelValue: string
|
|
15
15
|
options: PillTab[]
|
|
16
16
|
showCount?: boolean
|
|
17
|
+
defaultCountColor?: CountColor
|
|
17
18
|
ariaLabel?: string
|
|
18
19
|
block?: boolean
|
|
19
20
|
disabled?: boolean
|
|
@@ -47,6 +48,25 @@ const COUNT_COLOR_CLASS: Record<CountColor, string> = {
|
|
|
47
48
|
|
|
48
49
|
const { t, te } = useI18n()
|
|
49
50
|
|
|
51
|
+
function hasCount(option: PillTab) {
|
|
52
|
+
if (typeof option.count === 'string') {
|
|
53
|
+
return !!Number(String(option.count).replace(/\s/g, ''))
|
|
54
|
+
}
|
|
55
|
+
return !!option.count
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function formatCount(option: PillTab) {
|
|
59
|
+
if (typeof option.count === 'number') {
|
|
60
|
+
return option.count.toLocaleString('ru-RU')
|
|
61
|
+
}
|
|
62
|
+
return option.count
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function resolveCountColor(option: PillTab): CountColor {
|
|
66
|
+
if (!hasCount(option)) return 'gray'
|
|
67
|
+
return option.countColor ?? props.defaultCountColor ?? 'gray'
|
|
68
|
+
}
|
|
69
|
+
|
|
50
70
|
function localize(label: string) {
|
|
51
71
|
return te(label) ? t(label) : label
|
|
52
72
|
}
|
|
@@ -114,9 +134,9 @@ onMounted(scrollActiveIntoView)
|
|
|
114
134
|
<span
|
|
115
135
|
v-if="showCount && !option.hideCount"
|
|
116
136
|
class="inline-flex min-w-5 shrink-0 items-center justify-center rounded-full px-1.5 text-body-sm font-semibold leading-5"
|
|
117
|
-
:class="COUNT_COLOR_CLASS[option
|
|
137
|
+
:class="COUNT_COLOR_CLASS[resolveCountColor(option)]"
|
|
118
138
|
>
|
|
119
|
-
{{ option
|
|
139
|
+
{{ formatCount(option) }}
|
|
120
140
|
</span>
|
|
121
141
|
</slot>
|
|
122
142
|
</button>
|
|
@@ -349,6 +349,12 @@ export function useHeaderNavigationLinks() {
|
|
|
349
349
|
icon: CheckSb,
|
|
350
350
|
to: urls.compliancemain + PAGES.compliance.sb,
|
|
351
351
|
},
|
|
352
|
+
{
|
|
353
|
+
title: t('header.products.compliance.items.inspection.t'),
|
|
354
|
+
subtitle: t('header.products.compliance.items.inspection.st'),
|
|
355
|
+
icon: AIconShieldVerified,
|
|
356
|
+
to: urls.compliancemain + PAGES.compliance.inspection,
|
|
357
|
+
},
|
|
352
358
|
],
|
|
353
359
|
},
|
|
354
360
|
{
|
package/lang/en.ts
CHANGED
|
@@ -191,7 +191,7 @@ const EnLocale: RuLocale = {
|
|
|
191
191
|
subtitle: 'Evaluate the volume of competitors\' procurements over a certain period',
|
|
192
192
|
},
|
|
193
193
|
activity: {
|
|
194
|
-
title: '
|
|
194
|
+
title: 'Business activity index',
|
|
195
195
|
subtitle: 'Assessment of market risk of current business activity',
|
|
196
196
|
},
|
|
197
197
|
subjects: {
|
|
@@ -228,7 +228,7 @@ const EnLocale: RuLocale = {
|
|
|
228
228
|
st: 'Calculation of Customs Payments. Customs Duties. Customs Fees',
|
|
229
229
|
},
|
|
230
230
|
tr: {
|
|
231
|
-
t: '
|
|
231
|
+
t: 'International market and tariffs',
|
|
232
232
|
st: 'Customs Tariffs and Quotas. Measures for Protecting the Domestic Market. Regulatory Requirements',
|
|
233
233
|
},
|
|
234
234
|
importerMap: {
|
|
@@ -272,6 +272,10 @@ const EnLocale: RuLocale = {
|
|
|
272
272
|
t: 'Security check',
|
|
273
273
|
st: '',
|
|
274
274
|
},
|
|
275
|
+
inspection: {
|
|
276
|
+
t: 'Inspection registry',
|
|
277
|
+
st: '',
|
|
278
|
+
},
|
|
275
279
|
},
|
|
276
280
|
},
|
|
277
281
|
edo: {
|
package/lang/kk.ts
CHANGED
|
@@ -191,7 +191,7 @@ const KkLocale: RuLocale = {
|
|
|
191
191
|
subtitle: 'Бәсекелестердің белгілі бір кезеңдегі сатып алу көлемін бағалау',
|
|
192
192
|
},
|
|
193
193
|
activity: {
|
|
194
|
-
title: '
|
|
194
|
+
title: 'Іскерлік белсенділік индексі',
|
|
195
195
|
subtitle: 'Қазіргі іскерлік белсенділіктің нарықтық тәуекелін бағалау',
|
|
196
196
|
},
|
|
197
197
|
subjects: {
|
|
@@ -228,7 +228,7 @@ const KkLocale: RuLocale = {
|
|
|
228
228
|
st: 'Кедендік төлемдерді есептеу. Кедендік баждар. Кедендік алымдар',
|
|
229
229
|
},
|
|
230
230
|
tr: {
|
|
231
|
-
t: '
|
|
231
|
+
t: 'Халықаралық нарық және тарифтер',
|
|
232
232
|
st: 'Кедендік тарифтер мен квоталар. Ішкі нарықты қорғау шаралары. Нормативтік талаптар',
|
|
233
233
|
},
|
|
234
234
|
importerMap: {
|
|
@@ -272,6 +272,10 @@ const KkLocale: RuLocale = {
|
|
|
272
272
|
t: 'Қауіпсіздік қызметінің тексеруі',
|
|
273
273
|
st: '',
|
|
274
274
|
},
|
|
275
|
+
inspection: {
|
|
276
|
+
t: 'Тексерулер тізілімі',
|
|
277
|
+
st: '',
|
|
278
|
+
},
|
|
275
279
|
},
|
|
276
280
|
},
|
|
277
281
|
edo: {
|
package/lang/ru.ts
CHANGED
|
@@ -190,7 +190,7 @@ const RuLocale = {
|
|
|
190
190
|
'Оцените объем закупок конкурентов за определенный период',
|
|
191
191
|
},
|
|
192
192
|
activity: {
|
|
193
|
-
title: 'Индекс активности',
|
|
193
|
+
title: 'Индекс деловой активности',
|
|
194
194
|
subtitle:
|
|
195
195
|
'Оценка рыночного риска текущей деловой активности',
|
|
196
196
|
},
|
|
@@ -229,7 +229,7 @@ const RuLocale = {
|
|
|
229
229
|
st: 'Расчет таможенных платежей. Таможенные пошлины. Таможенные сборы',
|
|
230
230
|
},
|
|
231
231
|
tr: {
|
|
232
|
-
t: '
|
|
232
|
+
t: 'Международный рынок и тарифы',
|
|
233
233
|
st: 'Таможенные тарифы и квоты. Меры защиты внутреннего рынка. Нормативные требования',
|
|
234
234
|
},
|
|
235
235
|
importerMap: {
|
|
@@ -273,6 +273,10 @@ const RuLocale = {
|
|
|
273
273
|
t: 'Проверка СБ',
|
|
274
274
|
st: '',
|
|
275
275
|
},
|
|
276
|
+
inspection: {
|
|
277
|
+
t: 'Реестр проверок',
|
|
278
|
+
st: '',
|
|
279
|
+
},
|
|
276
280
|
},
|
|
277
281
|
},
|
|
278
282
|
edo: {
|