-
+
diff --git a/src/components/forms/ScaleQuestion.vue b/src/components/forms/ScaleQuestion.vue
index 60ba22b..3ca6fce 100644
--- a/src/components/forms/ScaleQuestion.vue
+++ b/src/components/forms/ScaleQuestion.vue
@@ -34,7 +34,7 @@
import { ref, computed } from 'vue'
import { PhCardsThree, PhCaretCircleUpDown } from '@phosphor-icons/vue'
-import '@/styles/form/view.scss';
+import '@/styles/form/view.scss'
const props = defineProps({
label: {
diff --git a/src/components/forms/SelectorQuestion.vue b/src/components/forms/SelectorQuestion.vue
index b79b8b5..c06d0e9 100644
--- a/src/components/forms/SelectorQuestion.vue
+++ b/src/components/forms/SelectorQuestion.vue
@@ -10,7 +10,14 @@
- Выберите от {{ minValues }} до {{ Math.min(maxValues, options.length) }} {{ normalizeCountForm(Math.min(maxValues, options.length), ['варианта', 'вариантов', 'вариантов']) }}
+ Выберите от {{ minValues }} до {{ Math.min(maxValues, options.length) }}
+ {{
+ normalizeCountForm(Math.min(maxValues, options.length), [
+ 'варианта',
+ 'вариантов',
+ 'вариантов'
+ ])
+ }}
@@ -37,7 +44,7 @@ import { ref, watch } from 'vue'
import { PhCaretCircleUpDown, PhXCircle } from '@phosphor-icons/vue'
import { normalizeCountForm } from '@/utils/formation'
-import '@/styles/form/view.scss';
+import '@/styles/form/view.scss'
const props = defineProps({
label: {
@@ -99,12 +106,12 @@ function validateSelection() {
error.value = ''
if (selectedIndexes.value.length < props.minValues) {
- error.value = `Необходимо выбрать минимум ${props.minValues} ${normalizeCountForm(props.minValues, ['вариант', 'варианта', 'вариантов']) }.`
+ error.value = `Необходимо выбрать минимум ${props.minValues} ${normalizeCountForm(props.minValues, ['вариант', 'варианта', 'вариантов'])}.`
return
}
if (props.maxValues && selectedIndexes.value.length > props.maxValues) {
- error.value = `Необходимо выбрать не больше ${props.maxValues} ${normalizeCountForm(props.maxValues, ['варианта', 'вариантов', 'вариантов']) }.`
+ error.value = `Необходимо выбрать не больше ${props.maxValues} ${normalizeCountForm(props.maxValues, ['варианта', 'вариантов', 'вариантов'])}.`
return
}
diff --git a/src/components/forms/TextQuestion.vue b/src/components/forms/TextQuestion.vue
index 872121d..8e8c7a3 100644
--- a/src/components/forms/TextQuestion.vue
+++ b/src/components/forms/TextQuestion.vue
@@ -29,7 +29,7 @@ import { PhXCircle } from '@phosphor-icons/vue'
import { validateSNILS, validateTIN } from '@/utils/validators'
import { normalizeCountForm } from '@/utils/formation'
-import '@/styles/form/view.scss';
+import '@/styles/form/view.scss'
const props = defineProps({
label: {
@@ -72,10 +72,10 @@ const error = ref('')
function validateInput() {
error.value = ''
-
+
if (props.isRequired || inputValue.value) {
if (props.minLength && inputValue.value.length < props.minLength) {
- error.value = `Минимальная длина - ${props.minLength} ${normalizeCountForm(props.minValues, ['символ', 'символа', 'символов']) }`
+ error.value = `Минимальная длина - ${props.minLength} ${normalizeCountForm(props.minValues, ['символ', 'символа', 'символов'])}`
}
if (props.validator === 1 && !validateTIN(inputValue.value)) {
error.value = 'Некорректный ИНН'
@@ -116,7 +116,9 @@ function validateInput() {
font-weight: 200;
border-radius: 0.5rem;
outline: 0;
- transition: border, background 0.25s ease;
+ transition:
+ border,
+ background 0.25s ease;
&:hover {
border: 1px solid var(--color-secondary-border);
diff --git a/src/styles/form/view.scss b/src/styles/form/view.scss
index e974506..f0cfd15 100644
--- a/src/styles/form/view.scss
+++ b/src/styles/form/view.scss
@@ -125,4 +125,4 @@
font-size: 1.17em;
}
}
-}
\ No newline at end of file
+}
diff --git a/src/utils/formation.ts b/src/utils/formation.ts
index 89cdd08..d8d92cf 100644
--- a/src/utils/formation.ts
+++ b/src/utils/formation.ts
@@ -1,4 +1,6 @@
-export function normalizeCountForm (number: number, words_arr: Array