feat(support): verify the manual assessment request after a C3 refusal

This commit is contained in:
shira committed 2026-10-08 21:26:00 +03:00
1 parent 6bfd7098c3
commit 68286af8b7
20 files changed
+680 -74

No files matched your search

@@ -1,11 +1,28 @@
import type { CatalogGrade } from "../../../shared/api/schemas";
import type { CatalogSpecializationOption } from "../../../entities/specialization";
export function manualAvailabilityMessage(option: CatalogSpecializationOption | null): string {
/**
* Explains, before submission, what the catalog says about the automated bank
* for the chosen target. The catalog describes tests, not the rubric pin, so the
* copy never promises a rubric: the server pins one only when it can identify a
* single current reviewed category, and the created case reports the result.
*/
export function manualAvailabilityMessage(
option: CatalogSpecializationOption | null,
grade: CatalogGrade["code"] | "" = "",
): string {
if (!option) return "Выберите специальность, чтобы увидеть ее доступность.";
if (option.test_availability.status === "in_development") {
return option.test_availability.note
? `${option.test_availability.note} Запрос ручной оценки остается доступен.`
const availability = option.test_availability;
if (availability.status === "in_development") {
return availability.note
? `${availability.note} Запрос ручной оценки остается доступен.`
: "Автоматическая проверка пока не опубликована. Запрос ручной оценки остается доступен.";
}
if (grade && !availability.grades.includes(grade)) {
return "Для выбранного грейда автоматическая проверка не опубликована, поэтому рубрика может не быть зафиксирована. Запрос ручной оценки остается доступен и ждет эксперта.";
}
if (grade) {
return "Для выбранного грейда есть опубликованный банк. Сервер зафиксирует рубрику, только если для цели найдется единственная актуальная категория; запрос в любом случае уйдет эксперту и не запускает тест.";
}
return "Автоматическая проверка опубликована отдельно. Этот запрос направляется эксперту и не запускает тест.";
}