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:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user