Skip to content

Commit 649ad10

Browse files
Fix Adding Complete Task
- Now when adding a complete task it will have a date completed
1 parent 9be20b8 commit 649ad10

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,7 @@ ipcMain.handle('add-task', (req, data) => {
332332
let sqlStatementIncomplete = 'INSERT INTO tasks (projectID, status, taskTitle, taskDescription, dateCreated, dateModified, dateCompleted) VALUES (?, ?, ?, ?, ' + currentDate + ', ' + currentDate + ', NULL)';
333333

334334
// Choose the appropriate SQL statement based on data.status
335-
let sqlStatement = (data.status === 'Complete') ? sqlStatementComplete : sqlStatementIncomplete;
336-
335+
let sqlStatement = (data.status === 'complete') ? sqlStatementComplete : sqlStatementIncomplete;
337336
// Your database query to get active project names and IDs sorted by dateModified
338337
db.run(sqlStatement,
339338
[data.projectID, data.status, data.taskTitle, data.taskDescription],

0 commit comments

Comments
 (0)