chet novoe
This commit is contained in:
@@ -46,7 +46,6 @@ const toggleDrawer = () => {
|
||||
}
|
||||
|
||||
const transactionUpdate = () => {
|
||||
console.log('my tut 1')
|
||||
emits('transaction-updated')
|
||||
}
|
||||
|
||||
|
||||
@@ -398,15 +398,13 @@ const updateTransactions = async () => {
|
||||
const categories = ref<BudgetCategory[]>([])
|
||||
const fetchBudgetCategories = async () => {
|
||||
categories.value = await getBudgetCategories(route.params.id)
|
||||
console.log(categories.value)
|
||||
categories.value = [...categories.value];
|
||||
updateLoading.value = false
|
||||
}
|
||||
|
||||
const transactionCategoriesSums = computed(() => {
|
||||
// Используем reduce для создания массива сумм по категориям
|
||||
const categorySums = transactions.value.reduce((acc, transaction) => {
|
||||
console.log(transaction.category.name)
|
||||
return transactions.value.reduce((acc, transaction) => {
|
||||
const category = transaction.category;
|
||||
|
||||
// Проверяем, существует ли категория в аккумуляторе
|
||||
@@ -418,13 +416,11 @@ const transactionCategoriesSums = computed(() => {
|
||||
|
||||
} else {
|
||||
// Если категории еще нет в аккумуляторе, добавляем ее
|
||||
acc.push({ category: category, sum: transaction.amount });
|
||||
acc.push({category: category, sum: transaction.amount});
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, []);
|
||||
console.log(categorySums)
|
||||
return categorySums;
|
||||
});
|
||||
|
||||
|
||||
@@ -648,7 +644,6 @@ const incomeExpenseChartOptions = ref({
|
||||
return tooltipItems[0].dataset.label;
|
||||
},
|
||||
label: function (tooltipItems) {
|
||||
console.log(tooltipItems);
|
||||
return formatAmount(tooltipItems.raw) + '₽';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,6 @@ const fetchCategoriesAndTypes = async () => {
|
||||
|
||||
categoryTypes.value = categoryTypesResponse.data;
|
||||
transactionTypes.value = transactionTypesResponse.data;
|
||||
console.log(entireCategories.value)
|
||||
} catch (error) {
|
||||
console.error('Error fetching categories and types:', error);
|
||||
}
|
||||
@@ -259,7 +258,6 @@ onMounted(async () => {
|
||||
loading.value = false;
|
||||
const deviceInfo = platform;
|
||||
isMobile.value = deviceInfo.os.family === 'iOS' || deviceInfo.os.family === 'Android';
|
||||
console.log()
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user