Skip to content

Commit

Permalink
Merge pull request #1048 from bcgov/fix/edx-1830
Browse files Browse the repository at this point in the history
EDX-1830: corrected logic for disabling the next button on the file u…
  • Loading branch information
mightycox authored Sep 20, 2023
2 parents 432b951 + 6957239 commit fc95391
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions frontend/src/components/sdcCollection/StepOneUploadData.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@
type="info"
class="pa-2"
>
<p style="color: #003366">The date in the uploaded file is <strong>{{ fileReportDateFormatted }}</strong>. Please ensure that you have uploaded the correct data for this collection before continuing.</p>
<p style="color: #003366">
The date in the uploaded file is <strong>{{ fileReportDateFormatted }}</strong>. Please ensure that you have uploaded the correct data for this collection before continuing.
</p>
</v-alert>
</v-col>
</v-row>
Expand Down Expand Up @@ -338,7 +340,7 @@ export default {
},
getFileRules() {
this.fileRules = [
value => {
value => {
let ret = !value || value.length === 0 || value[0].size < 10485760 || `File size should not be larger than ${humanFileSize(10485760)}!`;
if (ret !== true) {
this.setFailureAlert(ret);
Expand All @@ -356,7 +358,7 @@ export default {
this.setFailureAlert(failMessage);
return failMessage;
}
]
];
},
next() {
if(this.currentStepInCollectionProcess.isComplete) {
Expand Down Expand Up @@ -393,6 +395,7 @@ export default {
},
async importFile() {
if(this.uploadFileValue) {
this.isDisabled = true;
this.isReadingFile = true;
let data = null;
Expand Down Expand Up @@ -442,6 +445,7 @@ export default {
this.hasFileAttached = false;
this.fileLoaded = false;
this.processing = false;
this.isDisabled = true;
}else if(this.totalStudents === this.totalProcessed){
//Show summary
this.hasFileAttached = true;
Expand All @@ -450,12 +454,12 @@ export default {
this.fileName = this.sdcSchoolProgress.fileName;
this.isDisabled = false;
clearInterval(this.interval);
this.isDisabled = false;
}else{
//Show in progress
this.hasFileAttached = true;
this.fileLoaded = false;
this.processing = true;
this.isDisabled = true;
this.progress = Math.floor(this.totalProcessed/this.totalStudents * 100);
}
});
Expand Down

0 comments on commit fc95391

Please sign in to comment.