remove category action stubbed out
This commit is contained in:
Generated
+6
-6
@@ -1920,9 +1920,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.14.4",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz",
|
||||
"integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g==",
|
||||
"version": "1.15.1",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz",
|
||||
"integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
@@ -5091,9 +5091,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"follow-redirects": {
|
||||
"version": "1.14.4",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz",
|
||||
"integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g=="
|
||||
"version": "1.15.1",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz",
|
||||
"integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA=="
|
||||
},
|
||||
"fraction.js": {
|
||||
"version": "4.2.0",
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<div class="component p-2">
|
||||
<div class="flex justify-between">
|
||||
<h3 :class="`text-3xl ${totalSpent() > category.budgeted ? 'text-red-400' : 'text-green-300'}`">{{category.name}}</h3>
|
||||
<i v-show="category._id" class="text-3xl mdi mdi-delete hover:bg-red-400 hover:text-stone-900 cursor-pointer" @click="removeCategory()"></i>
|
||||
</div>
|
||||
<h4 class="text-2xl">Spent: ${{totalSpent()}}</h4>
|
||||
<h4 class="text-2xl">Budgeted: ${{category.budgeted}}</h4>
|
||||
</div>
|
||||
@@ -21,11 +24,16 @@ export default {
|
||||
return 0
|
||||
}
|
||||
for (let t = 0; t < this.category.transactions.length; t++) {
|
||||
total += this.category.transactions[t].amount // TODO count inflow and outflow seperately
|
||||
total += this.category.transactions[t].amount // TODO count inflow and outflow seperately... ornot?
|
||||
}
|
||||
return total
|
||||
},
|
||||
category: computed(() => AppState.activeCategory)
|
||||
category: computed(() => AppState.activeCategory),
|
||||
async removeCategory() {
|
||||
if (!AppState.activeCategory._id) {
|
||||
console.log('trying to delete overview...')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user