Code refactoring
This commit is contained in:
parent
32894e7151
commit
d145d41ae6
@ -127,11 +127,10 @@ export default {
|
|||||||
this.$emit('change', this.real_model);
|
this.$emit('change', this.real_model);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
real_model: function(val) {
|
|
||||||
this.real_model = val;
|
|
||||||
|
|
||||||
this.$emit('interface', this.real_model);
|
watch: {
|
||||||
|
value: function(val) {
|
||||||
|
this.real_model = val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -235,6 +235,7 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
attachments: function (attachments) {
|
attachments: function (attachments) {
|
||||||
attachments.forEach((attachment) => {
|
attachments.forEach((attachment) => {
|
||||||
|
if(attachment.length != undefined) {
|
||||||
var mockFile = {
|
var mockFile = {
|
||||||
id: attachment[0].id,
|
id: attachment[0].id,
|
||||||
name: attachment[0].name,
|
name: attachment[0].name,
|
||||||
@ -243,15 +244,11 @@ export default {
|
|||||||
download: attachment[0].downloadPath,
|
download: attachment[0].downloadPath,
|
||||||
dropzone: 'edit',
|
dropzone: 'edit',
|
||||||
};
|
};
|
||||||
|
|
||||||
this.dropzone.emit("addedfile", mockFile);
|
this.dropzone.emit("addedfile", mockFile);
|
||||||
this.dropzone.options.thumbnail.call(this.dropzone, mockFile, attachment[0].path);
|
this.dropzone.options.thumbnail.call(this.dropzone, mockFile, attachment[0].path);
|
||||||
|
|
||||||
// Make sure that there is no progress bar, etc...
|
// Make sure that there is no progress bar, etc...
|
||||||
this.dropzone.emit("complete", mockFile);
|
this.dropzone.emit("complete", mockFile);
|
||||||
}, this);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.files.forEach(async (attachment) => {
|
this.files.forEach(async (attachment) => {
|
||||||
if (attachment.download) {
|
if (attachment.download) {
|
||||||
@ -265,6 +262,9 @@ export default {
|
|||||||
document.querySelector("#dropzone-" + this._uid).classList.add("dz-max-files-reached");
|
document.querySelector("#dropzone-" + this._uid).classList.add("dz-max-files-reached");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}, this);
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
altInput: true,
|
altInput: true,
|
||||||
altFormat: 'j F',
|
altFormat: 'j F',
|
||||||
}"
|
}"
|
||||||
v-model="company.financial_start"
|
v-model="real_date"
|
||||||
></akaunting-date>
|
></akaunting-date>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 mb-4">
|
<div class="col-12 mb-4">
|
||||||
@ -133,7 +133,6 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
debugger;
|
|
||||||
if (this.company != undefined) {
|
if (this.company != undefined) {
|
||||||
let logo_arr = [
|
let logo_arr = [
|
||||||
{
|
{
|
||||||
@ -163,6 +162,7 @@ export default {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
this.logo.push(logo_arr);
|
this.logo.push(logo_arr);
|
||||||
|
|
||||||
this.real_date = company.financial_start;
|
this.real_date = company.financial_start;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user