mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-05 03:52:59 +00:00
Split components for future recycling.
This commit is contained in:
@@ -41,7 +41,7 @@ export default {
|
||||
props: ['transaction_journal_id'],
|
||||
watch: {
|
||||
transaction_journal_id: function (value) {
|
||||
// console.log('transaction_journal_id changed to ' + value);
|
||||
console.log('transaction_journal_id changed to ' + value);
|
||||
// do upload!
|
||||
if (0 !== value) {
|
||||
this.doUpload();
|
||||
@@ -50,7 +50,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
doUpload: function () {
|
||||
// console.log('Now in doUpload() for ' + this.$refs.att.files.length + ' files.');
|
||||
console.log('Now in doUpload() for ' + this.$refs.att.files.length + ' files.');
|
||||
for (let i in this.$refs.att.files) {
|
||||
if (this.$refs.att.files.hasOwnProperty(i) && /^0$|^[1-9]\d*$/.test(i) && i <= 4294967294) {
|
||||
let current = this.$refs.att.files[i];
|
||||
@@ -73,7 +73,7 @@ export default {
|
||||
.post(uploadUri, new Blob([evt.target.result]))
|
||||
.then(attachmentResponse => {
|
||||
// TODO feedback etc.
|
||||
// console.log('Uploaded a file.');
|
||||
console.log('Uploaded a file. Emit event!');
|
||||
// console.log(attachmentResponse);
|
||||
theParent.$emit('uploaded-attachments', this.transaction_journal_id);
|
||||
});
|
||||
@@ -84,7 +84,7 @@ export default {
|
||||
}
|
||||
}
|
||||
if (0 === this.$refs.att.files.length) {
|
||||
// console.log('No files to upload.');
|
||||
console.log('No files to upload. Emit event!');
|
||||
this.$emit('uploaded-attachments', this.transaction_journal_id);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user