feat: Add dueDate (date+time) to notes and update reminders to datetime

- Add dueDate timestamp field to notes schema
- Update note validators to accept dueDate
- Update note service to handle dueDate in CRUD operations
- Fix company and project controllers to pass dueDate
- Fix route validations to include dueDate field

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
richardtekula
2025-12-15 07:03:29 +01:00
parent 8770a98db8
commit f828af562d
7 changed files with 30 additions and 12 deletions

View File

@@ -208,11 +208,12 @@ export const addCompanyNote = async (req, res, next) => {
try {
const userId = req.userId;
const { companyId } = req.params;
const { content } = req.body;
const { content, dueDate } = req.body;
const note = await noteService.createNote(userId, {
content,
companyId,
dueDate,
});
res.status(201).json({
@@ -232,10 +233,11 @@ export const addCompanyNote = async (req, res, next) => {
export const updateCompanyNote = async (req, res, next) => {
try {
const { noteId } = req.params;
const { content } = req.body;
const { content, dueDate } = req.body;
const note = await noteService.updateNote(noteId, {
content,
dueDate,
});
res.status(200).json({