mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-20 18:21:21 +00:00
Update meta files for new release.
This commit is contained in:
@@ -97,7 +97,7 @@
|
||||
|
||||
<GenericLocation :disabled="submitting" v-model="location" :title="$t('form.location')" :errors="errors.location"
|
||||
v-on:set-field="storeField($event)"/>
|
||||
|
||||
<!-- attachments -->
|
||||
<GenericAttachments :disabled="submitting" :title="$t('form.attachments')" field-name="attachments" :errors="errors.attachments"
|
||||
v-on:selected-attachments="selectedAttachments($event)"
|
||||
v-on:selected-no-attachments="selectedNoAttachments($event)"
|
||||
@@ -275,6 +275,8 @@ export default {
|
||||
this.hasAttachments = false;
|
||||
},
|
||||
uploadedAttachments: function (e) {
|
||||
console.log('Response to event uploaded-attachments');
|
||||
console.log(e);
|
||||
this.finishSubmission();
|
||||
},
|
||||
submitForm: function (e) {
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-6 col-sm-12 col-xs-12">
|
||||
<!-- Custom Tabs -->
|
||||
<!--
|
||||
<div class="card">
|
||||
<div class="card-header d-flex p-0">
|
||||
<h3 class="card-title p-3">Tabs</h3>
|
||||
@@ -31,36 +32,34 @@
|
||||
<li class="nav-item"><a class="nav-link" href="#budgets" data-toggle="tab">Budgets</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#categories" data-toggle="tab">Categories</a></li>
|
||||
</ul>
|
||||
</div><!-- /.card-header -->
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="main_chart">
|
||||
1: main chart
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="budgets">
|
||||
2: tree map from/to budget
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="categories">
|
||||
2: tree map from/to cat
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div><!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./card -->
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<TransactionListLarge
|
||||
:entries="rawTransactions"
|
||||
:page="currentPage"
|
||||
ref="list"
|
||||
:total="total"
|
||||
:per-page="perPage"
|
||||
:sort-desc="sortDesc"
|
||||
v-on:jump-page="jumpToPage($event)"
|
||||
v-on:refreshed-cache-key="refreshedKey"
|
||||
/>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 col-md-6 col-sm-12 col-xs-12">
|
||||
@@ -106,7 +105,7 @@ export default {
|
||||
perPage: 51,
|
||||
locale: 'en-US',
|
||||
api: null,
|
||||
nameLoading:false
|
||||
nameLoading: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -132,16 +131,23 @@ export default {
|
||||
.then(response => {
|
||||
let start = new Intl.DateTimeFormat(this.locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(this.start);
|
||||
let end = new Intl.DateTimeFormat(this.locale, {year: 'numeric', month: 'long', day: 'numeric'}).format(this.end);
|
||||
document.getElementById('page-subTitle').innerText = this.$t('firefly.journals_in_period_for_account_js', {start: start, end: end, title: response.data.data.attributes.name});
|
||||
document.getElementById('page-subTitle').innerText = this.$t('firefly.journals_in_period_for_account_js', {
|
||||
start: start,
|
||||
end: end,
|
||||
title: response.data.data.attributes.name
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
refreshedKey: function () {
|
||||
this.loading = false;
|
||||
this.getTransactions();
|
||||
this.updatePageTitle();
|
||||
},
|
||||
getTransactions: function () {
|
||||
if (this.showReady && !this.loading) {
|
||||
|
||||
|
||||
this.loading = true;
|
||||
configureAxios().then(async (api) => {
|
||||
// console.log('Now getTransactions() x Start');
|
||||
@@ -149,8 +155,7 @@ export default {
|
||||
let endStr = format(this.end, 'y-MM-dd');
|
||||
this.rawTransactions = [];
|
||||
|
||||
let url = './api/v1/accounts/' + this.accountId + '/transactions?page=1&limit=' + this.perPage + '&start=' + startStr + '&end=' + endStr;
|
||||
|
||||
let url = './api/v1/accounts/' + this.accountId + '/transactions?page=1&limit=' + this.perPage + '&start=' + startStr + '&end=' + endStr + '&cache=' + this.cacheKey;
|
||||
|
||||
api.get(url)
|
||||
.then(response => {
|
||||
|
||||
@@ -97,22 +97,22 @@ export default {
|
||||
// });
|
||||
|
||||
// new code
|
||||
// console.log('start of new');
|
||||
console.log('start of new');
|
||||
let files = this.$refs.att.files;
|
||||
this.uploads = files.length;
|
||||
// loop all files and create attachments.
|
||||
for (let i in files) {
|
||||
if (files.hasOwnProperty(i) && /^0$|^[1-9]\d*$/.test(i) && i <= 4294967294) {
|
||||
// console.log('Now at file ' + (parseInt(i) + 1) + ' / ' + files.length);
|
||||
console.log('Now at file ' + (parseInt(i) + 1) + ' / ' + files.length);
|
||||
// read file into file reader:
|
||||
let current = files[i];
|
||||
let fileReader = new FileReader();
|
||||
let theParent = this; // dont ask me why i need to do this.
|
||||
fileReader.onloadend = evt => {
|
||||
if (evt.target.readyState === FileReader.DONE) {
|
||||
// console.log('I am done reading file ' + (parseInt(i) + 1));
|
||||
console.log('I am done reading file ' + (parseInt(i) + 1));
|
||||
this.createAttachment(current.name).then(response => {
|
||||
// console.log('Created attachment. Now upload (1)');
|
||||
console.log('Created attachment. Now upload (1)');
|
||||
return theParent.uploadAttachment(response.data.data.id, new Blob([evt.target.result]));
|
||||
}).then(theParent.countAttachment);
|
||||
}
|
||||
@@ -121,7 +121,7 @@ export default {
|
||||
}
|
||||
}
|
||||
if (0 === files.length) {
|
||||
// console.log('No files to upload. Emit event!');
|
||||
console.log('No files to upload. Emit event!');
|
||||
this.$emit('uploaded-attachments', this.transaction_journal_id);
|
||||
}
|
||||
// Promise.all(promises).then(response => {
|
||||
@@ -138,15 +138,15 @@ export default {
|
||||
methods: {
|
||||
countAttachment: function () {
|
||||
this.uploaded++;
|
||||
// console.log('Uploaded ' + this.uploaded + ' / ' + this.uploads);
|
||||
console.log('Uploaded ' + this.uploaded + ' / ' + this.uploads);
|
||||
if (this.uploaded >= this.uploads) {
|
||||
// console.log('All files uploaded. Emit event for ' + this.transaction_journal_id + '(' + this.index + ')');
|
||||
this.$emit('uploaded-attachments', this.transaction_journal_id);
|
||||
console.log('All files uploaded. Emit event for ' + this.uploadObjectId);
|
||||
this.$emit('uploaded-attachments', this.uploadObjectId);
|
||||
}
|
||||
},
|
||||
uploadAttachment: function (attachmentId, data) {
|
||||
this.created++;
|
||||
// console.log('Now in uploadAttachment()');
|
||||
console.log('Now in uploadAttachment()');
|
||||
const uploadUri = './api/v1/attachments/' + attachmentId + '/upload';
|
||||
return axios.post(uploadUri, data)
|
||||
},
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<!--
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
@@ -36,6 +37,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<!-- page is ignored for the time being -->
|
||||
<TransactionListLarge
|
||||
:entries="rawTransactions"
|
||||
@@ -44,7 +46,9 @@
|
||||
:per-page="perPage"
|
||||
:sort-desc="sortDesc"
|
||||
v-on:jump-page="jumpToPage($event)"
|
||||
v-on:refreshed-cache-key="refreshedKey"
|
||||
/>
|
||||
<!--
|
||||
<div class="row">
|
||||
<div class="col-xl-2 col-lg-4 col-sm-6 col-xs-12" v-for="range in ranges">
|
||||
<div class="card">
|
||||
@@ -56,7 +60,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -141,13 +147,12 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
...mapMutations('root', ['refreshCacheKey',]),
|
||||
newCacheKey: function () {
|
||||
this.refreshCacheKey();
|
||||
refreshedKey: function () {
|
||||
this.downloaded = false;
|
||||
this.accounts = [];
|
||||
this.rawTransactions = [];
|
||||
this.getTransactionList();
|
||||
},
|
||||
jumpToPage: function(event) {
|
||||
jumpToPage: function (event) {
|
||||
// console.log('noticed a change!');
|
||||
this.currentPage = event.page;
|
||||
this.downloadTransactionList(event.page);
|
||||
|
||||
@@ -220,21 +220,26 @@ export default {
|
||||
this.$emit('jump-page', {page: value});
|
||||
},
|
||||
entries: function (value) {
|
||||
console.log('detected new transactions!');
|
||||
this.parseTransactions();
|
||||
},
|
||||
value: function(value) {
|
||||
console.log('Watch value!');
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapMutations('root', ['refreshCacheKey',]),
|
||||
parseTransactions: function () {
|
||||
this.transactions = [];
|
||||
// console.log('Start of parseTransactions. Count of entries is ' + this.entries.length + ' and page is ' + this.page);
|
||||
// console.log('Reported total is ' + this.total);
|
||||
if (0 === this.entries.length) {
|
||||
// console.log('Will not render now');
|
||||
console.log('Will not render now');
|
||||
return;
|
||||
}
|
||||
// console.log('Now have ' + this.transactions.length + ' transactions');
|
||||
console.log('Now have ' + this.transactions.length + ' transactions');
|
||||
for (let i = 0; i < this.total; i++) {
|
||||
this.transactions.push({dummy: true});
|
||||
this.transactions.push({dummy: true,type: 'x'});
|
||||
// console.log('Push dummy to index ' + i);
|
||||
// console.log('Now have ' + this.transactions.length + ' transactions');
|
||||
}
|
||||
@@ -259,8 +264,9 @@ export default {
|
||||
this.loading = false;
|
||||
},
|
||||
newCacheKey: function () {
|
||||
alert('TODO');
|
||||
this.refreshCacheKey();
|
||||
console.log('Cache key is now ' + this.cacheKey);
|
||||
this.$emit('refreshed-cache-key');
|
||||
},
|
||||
updateFieldList: function () {
|
||||
this.fields = [
|
||||
@@ -314,6 +320,7 @@ export default {
|
||||
let info = transaction.attributes.transactions[i];
|
||||
let split = {};
|
||||
row.amount = row.amount + parseFloat(info.amount);
|
||||
split.type = info.type;
|
||||
split.description = info.description;
|
||||
split.amount = info.amount;
|
||||
split.currency_code = info.currency_code;
|
||||
|
||||
Reference in New Issue
Block a user