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

Merge branch 'main' into 'feat/redesign-roadmap'

# Conflicts:
#   src/api/services/GoalService.ts
#   src/api/services/UserService.ts
parents e8411034 ca25ad19
No related branches found
No related tags found
1 merge request!69Feat/redesign roadmap
Pipeline #282314 failed
Showing
with 302 additions and 182 deletions
...@@ -50,11 +50,11 @@ const emitEditEvent = () => { ...@@ -50,11 +50,11 @@ const emitEditEvent = () => {
<p>{{amount}} kr</p> <p>{{amount}} kr</p>
<button class="btn btn-success" data-bs-toggle="collapse" :data-bs-target="'#' + index" aria-expanded="false" aria-controls="editBudgetCollapse"> <button class="btn btn-success" data-bs-toggle="collapse" :data-bs-target="'#' + index" aria-expanded="false" aria-controls="editBudgetCollapse">
<img src="../../assets/icons/edit-button.svg" alt="Edit" height="18" width="18"> <img src="../../assets/icons/edit-button.svg" alt="Edit" height="18" width="18">
Edit Endre
</button> </button>
<button class="btn btn-danger" @click="emitDeleteEvent"> <button class="btn btn-danger" @click="emitDeleteEvent">
<img src="../../assets/icons/trash-can.svg" alt="Edit" height="18" width="18"> <img src="../../assets/icons/trash-can.svg" alt="Edit" height="18" width="18">
Delete Slett
</button> </button>
</div> </div>
...@@ -62,10 +62,10 @@ const emitEditEvent = () => { ...@@ -62,10 +62,10 @@ const emitEditEvent = () => {
<div class="container collapse-container"> <div class="container collapse-container">
<form @submit.prevent="emitEditEvent"> <form @submit.prevent="emitEditEvent">
<div class="input-group"> <div class="input-group">
<span class="input-group-text">Edit expense {{ index+1 }} </span> <span class="input-group-text">Endre utgift {{ index+1 }} </span>
<input type="text" class="form-control" placeholder="Expense description" required v-model="editDescription"> <input type="text" class="form-control" placeholder="Utgift beskrivelse" required v-model="editDescription">
<input type="number" min="0" class="form-control" placeholder="Amount (kr)" required v-model="editAmount"> <input type="number" min="0" class="form-control" placeholder="Amount (kr)" required v-model="editAmount">
<button type="submit" class="btn btn-primary" data-bs-toggle="collapse" :data-bs-target="'#' + index">Confirm</button> <button type="submit" class="btn btn-primary" data-bs-toggle="collapse" :data-bs-target="'#' + index">Bekreft</button>
</div> </div>
</form> </form>
</div> </div>
......
<script setup lang="ts"> <script setup lang="ts">
import { UserService } from '@/api' import { BudgetService } from '@/api'
const emit = defineEmits(['errorEvent', 'deletedEvent']) const emit = defineEmits(['errorEvent', 'deletedEvent'])
const props = defineProps({ const props = defineProps({
...@@ -22,7 +22,7 @@ const props = defineProps({ ...@@ -22,7 +22,7 @@ const props = defineProps({
*/ */
const deleteBudget = async () => { const deleteBudget = async () => {
try { try {
await UserService.deleteBudget({budgetId: props.budgetId}) await BudgetService.deleteBudget({budgetId: props.budgetId})
emit('deletedEvent') emit('deletedEvent')
} catch (error) { } catch (error) {
emit('errorEvent', error) emit('errorEvent', error)
...@@ -36,12 +36,12 @@ const deleteBudget = async () => { ...@@ -36,12 +36,12 @@ const deleteBudget = async () => {
<div class="modal-dialog modal-dialog-centered"> <div class="modal-dialog modal-dialog-centered">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h3>Are you sure you want to delete this budget <i>{{ budgetTitle }}?</i></h3> <h3>Er du sikker på at du vil slette dette budgettet <i>{{ budgetTitle }}?</i></h3>
<button class="btn btn-close" data-bs-dismiss="modal"></button> <button class="btn btn-close" data-bs-dismiss="modal"></button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<button class="btn btn-primary" data-bs-dismiss="modal" @click="deleteBudget">Yes</button> <button class="btn btn-primary" data-bs-dismiss="modal" @click="deleteBudget">Ja</button>
<button class="btn btn-primary" data-bs-dismiss="modal">No</button> <button class="btn btn-primary" data-bs-dismiss="modal">Nei</button>
</div> </div>
</div> </div>
</div> </div>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -7,7 +7,7 @@ import { useRoute } from 'vue-router' ...@@ -7,7 +7,7 @@ import { useRoute } from 'vue-router'
const router = useRouter() const router = useRouter()
// The configuration steps with path and order value. // The configuration steps with path and order value.
const configurationSteps = {'/commitment': 1, '/experience': 2, '/suitable-challenges': 3} const configurationSteps = {'/commitment': 1, '/experience': 2, '/suitable-challenges': 3, '/first-saving-goal': 4, '/finished-configuration': 5}
const length = Object.keys(configurationSteps).length const length = Object.keys(configurationSteps).length
let percentage = ref(1/length); let percentage = ref(1/length);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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