Skip to content

Commit 18c8053

Browse files
Fixed new report links
1 parent 52e6979 commit 18c8053

File tree

6 files changed

+75
-20
lines changed

6 files changed

+75
-20
lines changed

backend/src/components/sdc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,8 @@ async function downloadSdcReport(req, res) {
628628

629629
function getFileDetails(reportType, mincode) {
630630
const mappings = {
631+
'ALL_STUDENT_ERRORS_WARNS_SCHOOL_CSV': { filename: `AllSchoolStudentsWithErrorsWarns_${mincode}.csv`, contentType: 'text/csv' },
632+
'ALL_STUDENT_ERRORS_WARNS_DIS_CSV': { filename: `AllDistrictStudentsWithErrorsWarns_${mincode}.csv`, contentType: 'text/csv' },
631633
'ALL_STUDENT_DIS_CSV': { filename: `AllDistrictStudents_${mincode}.csv`, contentType: 'text/csv' },
632634
'ALL_STUDENT_SCHOOL_CSV': { filename: `AllSchoolStudents_${mincode}.csv`, contentType: 'text/csv' },
633635
'ELL_HEADCOUNT': { filename: `ELLHeadcount_${mincode}.pdf`, contentType: 'application/pdf' },

backend/src/util/constants.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ const reportTypeValues = [
204204
['career-per-school_dis', 'DIS_CAREER_HEADCOUNT_PER_SCHOOL'],
205205
['csv_school', 'ALL_STUDENT_SCHOOL_CSV'],
206206
['csv_dis', 'ALL_STUDENT_DIS_CSV'],
207+
['csv_school_errors_warns', 'ALL_STUDENT_ERRORS_WARNS_SCHOOL_CSV'],
208+
['csv_dis_errors_warns', 'ALL_STUDENT_ERRORS_WARNS_DIS_CSV'],
207209
['zero-fte-summary_dis','DIS_ZERO_FTE_SUMMARY']
208210
];
209211
const REPORT_TYPE_CODE_MAP = Object.freeze(new Map(reportTypeValues));

frontend/src/components/sdcCollection/sdcDistrictCollection/SDCDistrictCollectionView.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ import {authStore} from '../../../store/modules/auth';
299299
import StepSevenFinalSubmission from './StepSevenFinalSubmission.vue';
300300
import ApiService from '../../../common/apiService';
301301
import {ApiRoutes} from '../../../utils/constants';
302-
import {LocalDate, LocalDateTime} from '@js-joda/core';
303302
304303
export default defineComponent({
305304
name: 'SDCDistrictCollectionView',
@@ -413,11 +412,10 @@ export default defineComponent({
413412
async getActiveSdcDistrictCollection() {
414413
await ApiService.apiAxios.get(ApiRoutes.sdc.SDC_COLLECTION_BY_DISTRICT_ID + '/' + this.districtID)
415414
.then(response => {
416-
const isMigratedCollection = response.data.createDate ? LocalDateTime.parse(response.data.createDate).toLocalDate().isBefore(LocalDate.parse(this.config.SLD_MIGRATION_DATE)) : false;
417415
this.setCurrentCollectionSubmissionDueDate(response.data.submissionDueDate);
418416
this.setCurrentCollectionResolveDupDueDate(response.data.duplicationResolutionDueDate);
419417
this.setCurrentCollectionSignOffDueDate(response.data.signOffDueDate);
420-
this.isSdcDistrictCollectionActive = response.data.sdcDistrictCollectionID === this.districtCollectionObject?.sdcDistrictCollectionID && !isMigratedCollection;
418+
this.isSdcDistrictCollectionActive = response.data.sdcDistrictCollectionID === this.districtCollectionObject?.sdcDistrictCollectionID;
421419
422420
this.submissionDueDate = 'Due: ' + formatSubmissionDate(sdcCollectionStore().currentCollectionSubmissionDueDate);
423421
this.duplicationResolutionDueDate = 'Due: ' + formatSubmissionDate(sdcCollectionStore().currentCollectionResolveDupDueDate);

frontend/src/components/sdcCollection/sdcDistrictCollection/stepThreeVerifyData/DetailComponent.vue

Lines changed: 50 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,20 @@
1111
class="bold"
1212
>Students Found: {{ totalElements }}
1313
</span>
14-
<router-link
15-
v-if="showExportBtn"
16-
class="ml-2"
17-
:to="{ path: downloadReportURL() }"
18-
target="_blank"
19-
>
20-
<v-icon
21-
small
22-
class="ml-1"
23-
color="#003366"
24-
>
25-
mdi-tray-arrow-down
26-
</v-icon>
27-
<span class="export">Export All Student Records</span>
28-
</router-link>
2914
</v-col>
3015
<v-col
3116
cols="8"
3217
class="d-flex justify-end"
3318
>
19+
<v-btn
20+
id="export"
21+
color="#003366"
22+
text="Export"
23+
class="mr-2 mb-1"
24+
prepend-icon="mdi-tray-arrow-down"
25+
variant="elevated"
26+
@click="showExportDialog = true"
27+
/>
3428
<v-btn
3529
id="filters"
3630
color="#003366"
@@ -101,6 +95,32 @@
10195
@close="closeAndLoadStudents"
10296
/>
10397
</v-bottom-sheet>
98+
<v-dialog
99+
v-model="showExportDialog"
100+
:max-width="443"
101+
>
102+
<v-card>
103+
<v-card-title>
104+
Export Student Records
105+
</v-card-title>
106+
<v-card-actions>
107+
<v-btn
108+
color="#003366"
109+
variant="elevated"
110+
style="white-space: pre-wrap;"
111+
text="Students Only"
112+
@click="downloadStudentReport"
113+
/>
114+
<v-btn
115+
color="#003366"
116+
variant="elevated"
117+
style="white-space: pre-wrap;"
118+
text="Students with Errors & Warnings"
119+
@click="downloadStudentWithErrorsReport"
120+
/>
121+
</v-card-actions>
122+
</v-card>
123+
</v-dialog>
104124
</template>
105125

106126
<script>
@@ -149,6 +169,7 @@ export default {
149169
chip: true,
150170
pageNumber: 1,
151171
pageSize: 15,
172+
showExportDialog: false,
152173
studentList: [],
153174
isLoading: false,
154175
totalElements: 0,
@@ -185,9 +206,22 @@ export default {
185206
}
186207
this.reloadStudentsFlag = false;
187208
},
188-
downloadReportURL() {
209+
downloadStudentReport(){
210+
const routeData = this.$router.resolve({path: this.downloadStudentOnlyReportURL()});
211+
window.open(routeData.href, '_blank');
212+
this.showExportDialog = false;
213+
},
214+
downloadStudentWithErrorsReport(){
215+
const routeData = this.$router.resolve({path: this.downloadStudentErrorsReportURL()});
216+
window.open(routeData.href, '_blank');
217+
this.showExportDialog = false;
218+
},
219+
downloadStudentOnlyReportURL() {
189220
return `${ApiRoutes.sdc.SDC_DISTRICT_COLLECTION}/${this.$route.params.sdcDistrictCollectionID}/report/csv_dis/download`;
190221
},
222+
downloadStudentErrorsReportURL() {
223+
return `${ApiRoutes.sdc.SDC_DISTRICT_COLLECTION}/${this.$route.params.sdcDistrictCollectionID}/report/csv_dis_errors_warns/download`;
224+
},
191225
editStudent($event) {
192226
const selectedStudent = cloneDeep($event);
193227
this.studentForEdit.splice(0);

frontend/src/components/sdcCollection/sdcSchoolCollection/stepTwoValidateData/StepTwoViewDataIssues.vue

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,22 @@
202202
<v-row
203203
class="pt-3 pb-3"
204204
>
205+
<v-col class="mt-4">
206+
<router-link
207+
class="ml-2"
208+
:to="{ path: downloadReportURL() }"
209+
target="_blank"
210+
>
211+
<v-icon
212+
small
213+
class="ml-1"
214+
color="#003366"
215+
>
216+
mdi-tray-arrow-down
217+
</v-icon>
218+
<span class="export ml-1">Export Student Records With Errors/Warnings</span>
219+
</router-link>
220+
</v-col>
205221
<v-col
206222
v-if="studentListData?.length > 0"
207223
class="text-right"
@@ -453,6 +469,9 @@ export default {
453469
canMoveForward(){
454470
return this.isStepComplete || this.hasEditPermission;
455471
},
472+
downloadReportURL() {
473+
return `${ApiRoutes.sdc.BASE_URL}/${this.$route.params.schoolCollectionID}/report/csv_school_errors_warns/download`;
474+
},
456475
applyFilters($event) {
457476
this.filterSearchParams.moreFilters = cloneDeep($event);
458477
this.getSummaryCounts();

frontend/src/components/sdcCollection/sdcSchoolCollection/steppers/SchoolSteps.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ import StepTwoViewDataIssues from '../stepTwoValidateData/StepTwoViewDataIssues.
9595
import StepThreeVerifyData from '../stepThreeVerifyData/StepThreeVerifyData.vue';
9696
9797
export default defineComponent({
98-
name: 'IndySchoolSteps',
98+
name: 'SchoolSteps',
9999
components: {
100100
StepThreeVerifyData,
101101
StepTwoViewDataIssues,

0 commit comments

Comments
 (0)