feat(bot): implement household status summary

This commit is contained in:
2026-03-11 01:04:56 +04:00
parent 4dde04ca06
commit 82bab13e61
6 changed files with 402 additions and 19 deletions

View File

@@ -22,9 +22,6 @@ export const ruBotTranslations: BotTranslationCatalog = {
groupHeading: 'Группа дома:',
groupAdminsHeading: 'Админы группы:'
},
bot: {
householdStatusPending: 'Статус дома пока не подключен. Интеграция данных будет следующей.'
},
common: {
unableToIdentifySender: 'Не удалось определить отправителя для этой команды.',
useHelp: 'Отправьте /help, чтобы увидеть доступные команды.'
@@ -147,6 +144,16 @@ export const ruBotTranslations: BotTranslationCatalog = {
`Оплата сохранена: ${kind === 'rent' ? 'аренда' : 'коммуналка'} ${amount} ${currency} за ${period}`,
paymentAddFailed: (message) => `Не удалось сохранить оплату: ${message}`,
noStatementCycle: 'Для выписки период не найден.',
householdStatusTitle: (period) => `Статус дома за ${period}`,
householdStatusRentDirect: (amount, currency) => `Аренда: ${amount} ${currency}`,
householdStatusRentConverted: (sourceAmount, sourceCurrency, displayAmount, displayCurrency) =>
`Аренда: ${sourceAmount} ${sourceCurrency} (~${displayAmount} ${displayCurrency})`,
householdStatusUtilities: (amount, currency) => `Коммуналка: ${amount} ${currency}`,
householdStatusPurchases: (amount, currency) => `Общие покупки: ${amount} ${currency}`,
householdStatusMember: (displayName, due, paid, remaining, currency) =>
`- ${displayName}: должен ${due} ${currency}, оплачено ${paid} ${currency}, осталось ${remaining} ${currency}`,
householdStatusTotals: (due, paid, remaining, currency) =>
`Итого: должен ${due} ${currency}, оплачено ${paid} ${currency}, осталось ${remaining} ${currency}`,
statementTitle: (period) => `Выписка за ${period}`,
statementLine: (displayName, amount, currency) => `- ${displayName}: ${amount} ${currency}`,
statementTotal: (amount, currency) => `Итого: ${amount} ${currency}`,