From d4ef7d5f74075fe28bd54401fa814373f700a9e5 Mon Sep 17 00:00:00 2001 From: alexmcdermid Date: Tue, 9 Jul 2024 10:48:17 -0700 Subject: [PATCH] styling and button functionality when zero files uploaded --- .../stepOneUploadData/StepOneUploadData.vue | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/frontend/src/components/sdcCollection/sdcSchoolCollection/stepOneUploadData/StepOneUploadData.vue b/frontend/src/components/sdcCollection/sdcSchoolCollection/stepOneUploadData/StepOneUploadData.vue index 57ecd5d7f..aefbb9b2d 100644 --- a/frontend/src/components/sdcCollection/sdcSchoolCollection/stepOneUploadData/StepOneUploadData.vue +++ b/frontend/src/components/sdcCollection/sdcSchoolCollection/stepOneUploadData/StepOneUploadData.vue @@ -52,7 +52,7 @@ or Option 1: - Option 2: - Report a zero enrollment for the school. This should only be used if ... - - - - - + Option 2: + +
+ This should only be used if this school does not have a file for this collection. +
@@ -287,7 +290,7 @@ export default { isReadingFile: false, uploadFileValue: null, fileInputError: [], - isDisabled: true, + isDisabled: false, sdcSchoolProgress: null, hasFileAttached: false, fileLoaded: false, @@ -484,6 +487,7 @@ export default { async reportZeroEnrollment(sdcSchoolCollectionId) { ApiService.apiAxios.post(`${ApiRoutes.sdc.BASE_URL}/${sdcSchoolCollectionId}/reportZeroEnrollment`).then(() => { this.setSuccessAlert('Your report of zero enrollment was recorded successfully.'); + this.$emit('refresh-store'); }).catch(e => { console.error(e); this.fileUploadErrorMessage = 'An error has occurred when reporting zero enrollment: ' + e.message; @@ -501,7 +505,9 @@ export default { this.hasFileAttached = false; this.fileLoaded = false; this.processing = false; - this.isDisabled = true; + if (this.schoolCollectionObject?.sdcSchoolCollectionStatusCode !== 'SUBMITTED') { + this.isDisabled = true; + } }else if(this.totalStudents === this.totalProcessed){ //Show summary this.hasFileAttached = true;