Skip to content
Snippets Groups Projects
Commit 0ce5bf15 authored by Victor Ekholt Gunrell Kaste's avatar Victor Ekholt Gunrell Kaste
Browse files

feat: Makes goal refresh upon regeneration or change of unit price.

parent 5763ae70
No related branches found
No related tags found
1 merge request!92Feat/regenerate challenge
...@@ -60,6 +60,15 @@ export default { ...@@ -60,6 +60,15 @@ export default {
this.savingGoalClicked = true; this.savingGoalClicked = true;
this.keyForList++ this.keyForList++
}, 100); }, 100);
},
async refreshSpareSti() {
try {
this.selectedGoal = await GoalService.getGoal({id: this.selectedGoal.id as number})
console.log("yessir")
this.key++;
} catch (error) {
console.log(error)
}
} }
}, },
}; };
...@@ -82,7 +91,7 @@ export default { ...@@ -82,7 +91,7 @@ export default {
</div> </div>
</div> </div>
<saving-goal-create @createGoalClicked="handleCreateGoalClicked" v-if="createClicked"></saving-goal-create> <saving-goal-create @createGoalClicked="handleCreateGoalClicked" v-if="createClicked"></saving-goal-create>
<saving-goal-roadmap :key="key" :selected-goal="selectedGoal" v-else-if="savingGoalClicked"></saving-goal-roadmap> <saving-goal-roadmap @refreshSavingGoal="refreshSpareSti" :key="key" :selected-goal="selectedGoal" v-else-if="savingGoalClicked"></saving-goal-roadmap>
<saving-goal-default v-else></saving-goal-default> <saving-goal-default v-else></saving-goal-default>
</div> </div>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment