add reminders notes and notification in sidebar

This commit is contained in:
richardtekula
2025-11-25 11:29:03 +01:00
parent f4397bc0de
commit cf4df9d314
3 changed files with 62 additions and 1 deletions

View File

@@ -295,3 +295,29 @@ export const deleteCompanyReminder = async (req, res) => {
res.status(error.statusCode || 500).json(errorResponse);
}
};
export const getReminderSummary = async (_req, res) => {
try {
const summary = await companyReminderService.getReminderSummary();
res.status(200).json({
success: true,
data: summary,
});
} catch (error) {
const errorResponse = formatErrorResponse(error, process.env.NODE_ENV === 'development');
res.status(error.statusCode || 500).json(errorResponse);
}
};
export const getReminderCountsByCompany = async (_req, res) => {
try {
const counts = await companyReminderService.getReminderCountsByCompany();
res.status(200).json({
success: true,
data: counts,
});
} catch (error) {
const errorResponse = formatErrorResponse(error, process.env.NODE_ENV === 'development');
res.status(error.statusCode || 500).json(errorResponse);
}
};