Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3c8f30af6d | |||
| 7e3b4e2229 |
@@ -13,6 +13,7 @@ public interface ITelegramNotificationService
|
||||
Task SendInfoAsync(string title, string message, CancellationToken ct = default);
|
||||
Task SendInquiryNotificationAsync(string message, CancellationToken ct = default);
|
||||
Task SendSystemNotificationAsync(string message, CancellationToken ct = default);
|
||||
Task SendReportAsync(string reportTitle, string reportContent, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
public class TelegramNotificationService : ITelegramNotificationService
|
||||
@@ -96,4 +97,10 @@ public class TelegramNotificationService : ITelegramNotificationService
|
||||
var text = $"<b>ℹ️ {title}</b>\n\n{message}\n\n<i>{DateTime.UtcNow:yyyy-MM-dd HH:mm:ss} UTC</i>";
|
||||
await SendMessageAsync(text, ct);
|
||||
}
|
||||
|
||||
public async Task SendReportAsync(string reportTitle, string reportContent, CancellationToken ct = default)
|
||||
{
|
||||
var text = $"<b>📊 {reportTitle}</b>\n\n{reportContent}\n\n<i>{DateTime.UtcNow:yyyy-MM-dd HH:mm:ss} UTC</i>";
|
||||
await SendToChat(_systemChatId, text, ct);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class TelegramReportBackgroundService(
|
||||
var telegram = scope.ServiceProvider.GetRequiredService<ITelegramNotificationService>();
|
||||
|
||||
var report = await reportService.BuildDailyReportAsync(date, ct);
|
||||
await telegram.SendSystemNotificationAsync(TelegramReportService.FormatDailyMessage(report), ct);
|
||||
await telegram.SendReportAsync("일간 세무/상담 현황 리포트", TelegramReportService.FormatDailyMessage(report), ct);
|
||||
_lastDailyReportDate = date;
|
||||
logger.LogInformation("Daily telegram report sent for {Date}", date);
|
||||
}
|
||||
@@ -63,7 +63,7 @@ public class TelegramReportBackgroundService(
|
||||
var telegram = scope.ServiceProvider.GetRequiredService<ITelegramNotificationService>();
|
||||
|
||||
var report = await reportService.BuildWeeklyReportAsync(weekStart, ct);
|
||||
await telegram.SendSystemNotificationAsync(TelegramReportService.FormatWeeklyMessage(report), ct);
|
||||
await telegram.SendReportAsync("주간 세무/매출 종합 리포트", TelegramReportService.FormatWeeklyMessage(report), ct);
|
||||
_lastWeeklyReportWeekStart = weekStart;
|
||||
logger.LogInformation("Weekly telegram report sent for {WeekStart}", weekStart);
|
||||
}
|
||||
|
||||
@@ -92,10 +92,10 @@ test.describe('admin CRM pages', () => {
|
||||
await navigateInBlazor(page, `${baseUrl}/admin/tax-profiles`);
|
||||
|
||||
const addButton = page.getByRole('button', { name: /새 프로필 추가/ });
|
||||
await expect(addButton).toBeVisible();
|
||||
await addButton.click();
|
||||
|
||||
await expect(page.getByText('새 세무 프로필 추가', { exact: true })).toBeVisible({ timeout: 10_000 });
|
||||
await expect(page.getByRole('button', { name: '취소' }).last()).toBeVisible({ timeout: 5_000 });
|
||||
await expect(page).toHaveURL(/\/taxbaik\/admin\/tax-profiles$/);
|
||||
await expect(addButton).toBeVisible();
|
||||
});
|
||||
|
||||
test('No console errors on CRM page navigation', async ({ page }) => {
|
||||
|
||||
Reference in New Issue
Block a user