From 06e80baff83dabe2bd5aaad1b301b8b44e53bd7f Mon Sep 17 00:00:00 2001
From: Denis Voinovich
Date: Mon, 2 Jun 2025 10:58:09 +0300
Subject: [PATCH] =?UTF-8?q?fix=20[P-237]:=20=D0=BE=D0=BA=D0=BE=D0=BD=D1=87?=
=?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=B5=20=D0=B4=D0=BB=D1=8F=20=D0=BC=D0=B8?=
=?UTF-8?q?=D0=BD=D1=83=D1=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/testing/BodyDetailTesting.vue | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/front/src/components/testing/BodyDetailTesting.vue b/src/front/src/components/testing/BodyDetailTesting.vue
index 8b5145784..ee00baa5c 100644
--- a/src/front/src/components/testing/BodyDetailTesting.vue
+++ b/src/front/src/components/testing/BodyDetailTesting.vue
@@ -12,7 +12,7 @@
{{ data?.description }}
- Время на прохождение — {{ data?.time }} минут
+ Время на прохождение — {{ data?.time }} {{ timeWordDeclension }}
@@ -43,12 +43,25 @@ export default {
default: false
}
},
- setup() {
+ setup(props) {
const route = useRoute();
const isExamMode = computed(() => route.query.mode === 'exam');
+ const timeWordDeclension = computed(() => {
+ if (!props.data?.time) return 'минут';
+
+ const lastDigit = props.data.time % 10;
+ const lastTwoDigits = props.data.time % 100;
+
+ if (lastTwoDigits >= 11 && lastTwoDigits <= 14) return 'минут';
+ if (lastDigit === 1) return 'минута';
+ if (lastDigit >= 2 && lastDigit <= 4) return 'минуты';
+ return 'минут';
+ });
+
return {
- isExamMode
+ isExamMode,
+ timeWordDeclension
};
}
};