ver 2
This commit is contained in:
@@ -39,10 +39,6 @@ const props = defineProps({
|
||||
categoryType: {
|
||||
type: String,
|
||||
required: false
|
||||
},
|
||||
transactions: {
|
||||
type: Array as () => Array<Transaction>,
|
||||
required: false
|
||||
}
|
||||
});
|
||||
|
||||
@@ -258,7 +254,7 @@ const closeDrawer = () => emit('close-drawer');
|
||||
const keyboardOpen = ref(false);
|
||||
const isMobile = ref(false);
|
||||
const userAgent = ref(null);
|
||||
const transactions = ref<Transaction[]>(props.transactions);
|
||||
const transactions = ref<Transaction[]>(null);
|
||||
// Мониторинг при монтировании
|
||||
onMounted(async () => {
|
||||
loading.value = true;
|
||||
@@ -267,10 +263,12 @@ onMounted(async () => {
|
||||
|
||||
prepareData();
|
||||
|
||||
console.log("is editing " + !isEditing.value)
|
||||
if ( !isEditing.value) {
|
||||
await getTransactions('INSTANT', 'EXPENSE',null, user.value.id ).then(transactionsResponse => transactions.value = transactionsResponse.data);
|
||||
transactions.value = transactions.value.slice(0,3)
|
||||
console.log(transactions.value.slice(0,3))
|
||||
console.log("here blyat")
|
||||
await getTransactions('INSTANT', 'EXPENSE',null, user.value.id, false, 3 )
|
||||
.then(transactionsResponse => transactions.value = transactionsResponse.data);
|
||||
|
||||
}
|
||||
loading.value = false;
|
||||
const deviceInfo = platform;
|
||||
|
||||
Reference in New Issue
Block a user