Files
stroy-bot-monorepo/src/webparts/stroyBot/pages/objects/texts.ts
T
Тимур Городецкий d2852df976 refactor: remove drag and drop from the objects tree
Decided during manual testing: the legacy drop-inside zone had zero
height, so drops only worked before/after a node and moves happened by
accident. Sections are re-parented via Edit, as before.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-19 10:07:06 +05:00

64 lines
3.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Тексты страницы «Объекты» — дословно из stroy-bot-objects (ObjectsByProjectWebPart.ts).
export const OBJECTS_TEXTS = {
header: {
label: 'Объекты проекта',
titleLoading: 'Загрузка...',
titleError: 'Ошибка',
addRoot: 'Добавить объект',
addRootTooltip: 'Добавить корневой объект',
export: 'Экспорт',
exporting: 'Экспортируется...',
exportTooltip: 'Скачать в Excel'
},
loading: 'Загружаем данные...',
noProject: 'Вы не выбрали проект',
projectNotFound: (projectId: string): string => `Проект с ID=${projectId} не найден`,
listLoadError: (listName: string): string => `Ошибка загрузки списка "${listName}"`,
loadError: (message: string): string => `Ошибка: ${message}`,
empty: 'Объекты не найдены',
emptyAdd: '+ Добавить объект',
toolbar: {
total: (count: number): string => `${count} объектов`,
expandAll: '↕ Развернуть',
collapseAll: '↙ Свернуть'
},
nodeMenuTooltip: 'Действия',
menu: {
add: 'Добавить объект',
edit: 'Редактировать',
works: 'Работы',
delete: 'Удалить'
},
modal: {
addRootTitle: 'Добавить Объект-пятно',
addTitle: (label: string): string => `Добавить ${label}`,
editTitle: (label: string): string => `Редактировать ${label}`,
/** Что добавляется в узел уровня N. */
childLabels: ['Раздел', 'Вид работ'] as readonly string[],
/** Как называется узел уровня N. */
levelLabels: ['Объект-пятно', 'Раздел', 'Вид работ'] as readonly string[],
fallbackLabel: 'объект',
titleLabel: 'Название',
titlePlaceholder: 'Введите название объекта',
titleRequired: 'Поле обязательно для заполнения',
parentLabel: 'Родительский объект',
parentEmpty: '—',
parentRoot: '— (корневой)',
projectLabel: 'Проект',
cancel: 'Отмена',
add: 'Добавить',
save: 'Сохранить'
},
deleteConfirm: (title: string, childCount: number): string => {
const childWarning =
childCount > 0 ? `\n\n⚠️ У этого объекта есть дочерние элементы (${childCount} шт.).` : '';
return `Удалить объект «${title}»?${childWarning}\n\nЭто действие нельзя отменить.`;
},
deleteFallbackTitle: (id: number): string => `ID ${id}`,
serverError: (status: number): string => `Ошибка сервера: ${status}`,
saveError: (message: string): string => `Ошибка сохранения: ${message}`,
deleteError: (message: string): string => `Не удалось удалить: ${message}`,
exportError: (message: string): string => `Не удалось скачать файл: ${message}`
} as const;