From 7cf1c86f2e2f3c417cb5d9918888fa7bfd5e8711 Mon Sep 17 00:00:00 2001 From: I Made Setia Baruna Date: Sun, 10 Jan 2021 17:20:07 +0800 Subject: [PATCH] Add original todo value for future use --- src/routes/calculator/_character.svelte | 6 ++++++ src/routes/calculator/_weapon.svelte | 5 +++++ src/stores/todo.js | 2 ++ 3 files changed, 13 insertions(+) diff --git a/src/routes/calculator/_character.svelte b/src/routes/calculator/_character.svelte index 37cbdc68..eb5dc31d 100644 --- a/src/routes/calculator/_character.svelte +++ b/src/routes/calculator/_character.svelte @@ -386,6 +386,12 @@ ...ascensionRes, ...talentRes, }, + original: { + mora: moraNeeded, + ...levelRes, + ...ascensionRes, + ...talentRes, + }, }); addedToTodo = true; diff --git a/src/routes/calculator/_weapon.svelte b/src/routes/calculator/_weapon.svelte index 754c1da3..cd4260b4 100644 --- a/src/routes/calculator/_weapon.svelte +++ b/src/routes/calculator/_weapon.svelte @@ -314,6 +314,11 @@ ...levelRes, ...ascensionRes, }, + original: { + mora: moraNeeded, + ...levelRes, + ...ascensionRes, + }, }); addedToTodo = true; diff --git a/src/stores/todo.js b/src/stores/todo.js index 0032f7ae..644a09da 100644 --- a/src/stores/todo.js +++ b/src/stores/todo.js @@ -20,6 +20,7 @@ export function addTodo(data) { value[itemsIndex] = { type: 'item', resources: items, + original: items, }; } else { const items = { [data.item.id]: data.amount }; @@ -27,6 +28,7 @@ export function addTodo(data) { value.push({ type: 'item', resources: items, + original: items, }); }