no longer manipulating prop. still can't get formatting to twork

This commit is contained in:
Annika
2022-07-12 16:12:03 -06:00
parent ef06dd057a
commit df80f78072
12 changed files with 265 additions and 22 deletions
+5 -2
View File
@@ -2,7 +2,7 @@
<div class="component">
<div class="flex mt-6 md:mx-40 flex-col">
<h1>Transactions Container</h1>
<Transaction v-for="t in transactions" :key="t._id" :transaction="t" />
<Transaction v-for="t in transactions" :key="t._id" :transaction="t" :categories="categories" />
</div>
</div>
</template>
@@ -11,6 +11,7 @@
<script>
import { computed, onMounted } from 'vue'
import { AppState } from '../AppState'
import { categoriesService } from '../services/CategoriesService'
import { transactionsService } from '../services/TransactionsService'
import { logger } from '../utils/Logger'
@@ -18,13 +19,15 @@ export default {
setup(){
onMounted(async () => {
try {
await categoriesService.getAll()
await transactionsService.getAll()
} catch (error) {
logger.log(error)
}
})
return {
transactions: computed(() => AppState.transactions)
transactions: computed(() => AppState.transactions),
categories: computed(() => AppState.categories)
}
}
}