Build frontend

This commit is contained in:
James Cole
2021-02-10 06:55:56 +01:00
parent 1558da60aa
commit 416f8e2855
75 changed files with 496 additions and 250 deletions

View File

@@ -41,6 +41,7 @@ export default {
props: ['transaction_journal_id'],
watch: {
transaction_journal_id: function (value) {
// console.log('transaction_journal_id changed to ' + value);
// do upload!
if (0 !== value) {
this.doUpload();
@@ -49,7 +50,7 @@ export default {
},
methods: {
doUpload: function () {
let uploads = [];
// 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];
@@ -72,7 +73,9 @@ export default {
.post(uploadUri, new Blob([evt.target.result]))
.then(attachmentResponse => {
// TODO feedback etc.
theParent.$emit('uploaded-attachments');
// console.log('Uploaded a file.');
// console.log(attachmentResponse);
theParent.$emit('uploaded-attachments', this.transaction_journal_id);
});
});
}
@@ -81,6 +84,7 @@ export default {
}
}
if (0 === this.$refs.att.files.length) {
// console.log('No files to upload.');
this.$emit('uploaded-attachments', this.transaction_journal_id);
}
}