2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 11:29:03 +00:00

fix: ignore click when making entries

This commit is contained in:
18alantom 2022-03-01 14:27:51 +05:30 committed by Alan
parent 309010bdf5
commit 0b19304d19

View File

@ -320,8 +320,8 @@
</HowTo>
</div>
<Loading
v-if="openLoading"
:open="openLoading"
v-if="isMakingEntries"
:open="isMakingEntries"
:percent="percentLoading"
:message="messageLoading"
/>
@ -358,7 +358,7 @@ export default {
file: null,
importer: null,
importType: '',
openLoading: false,
isMakingEntries: false,
percentLoading: 0,
messageLoading: '',
};
@ -532,6 +532,10 @@ export default {
this.importer.updateValue(event.target.value, i, j);
},
async importData() {
if (this.isMakingEntries || this.complete) {
return;
}
if (this.isRequiredUnassigned) {
showMessageDialog({
message: this.t`Required Fields not Assigned`,
@ -573,7 +577,7 @@ export default {
this.importer = new Importer(this.labelDoctypeMap[this.importType]);
},
setLoadingStatus(isMakingEntries, entriesMade, totalEntries) {
this.openLoading = isMakingEntries;
this.isMakingEntries = isMakingEntries;
this.percentLoading = entriesMade / totalEntries;
this.messageLoading = isMakingEntries
? `${entriesMade} entries made out of ${totalEntries}...`