aboutsummaryrefslogtreecommitdiff
path: root/src/features/todo/reducer.js
diff options
context:
space:
mode:
authorAdrián Oliva <adrian.oliva@cimat.mx>2023-05-27 14:26:14 -0600
committerAdrián Oliva <adrian.oliva@cimat.mx>2023-05-27 14:26:14 -0600
commit19f07e834e68c6924e19589641e5b138b0535e53 (patch)
treee186ec1980f5e74cb1d4a72903970b907ef7f966 /src/features/todo/reducer.js
parente04bff29bf8146bb709a76fc187e0683065e4f03 (diff)
downloadToDo-App-FE-19f07e834e68c6924e19589641e5b138b0535e53.tar.gz
ToDo-App-FE-19f07e834e68c6924e19589641e5b138b0535e53.zip
"Done" can now only be changed on table.
Not on "edit to do" or "new to do".
Diffstat (limited to 'src/features/todo/reducer.js')
-rw-r--r--src/features/todo/reducer.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/features/todo/reducer.js b/src/features/todo/reducer.js
index d62e599..16fc427 100644
--- a/src/features/todo/reducer.js
+++ b/src/features/todo/reducer.js
@@ -24,7 +24,7 @@ export const todo_slice = createSlice({
id: ++state.last_id,
text: action.payload.text,
due_date: action.payload.due_date,
- done: action.payload.done,
+ done: false,
priority: action.payload.priority,
creation_date: action.payload.creation_date,
},
@@ -79,7 +79,6 @@ export const todo_slice = createSlice({
state.todos[selected_todo].text = action.payload.text;
state.todos[selected_todo].due_date = action.payload.due_date;
- state.todos[selected_todo].done = action.payload.done;
state.todos[selected_todo].priority = action.payload.priority;
},