Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small fixes #2026

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions backend/src/components/grad.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async function uploadFile(req, res) {
async function downloadErrorReport(req, res) {
try {
const token = getAccessToken(req);
const url = `${config.get('grad:rootURL')}/reportGeneration/errorReport/${req.params.schoolID}`;
const url = `${config.get('grad:rootURL')}/reportGeneration/errorReport/${req.params.activeIncomingFilesetID}`;

const resData = await getData(token, url);

Expand Down Expand Up @@ -76,10 +76,10 @@ async function getFilesetsPaginated(req, res) {
async function getErrorFilesetStudentPaginated(req, res) {
try {
const search = [];
if(req.params.schoolID) {
if(req.params.activeIncomingFilesetID) {
search.push({
condition: null,
searchCriteriaList: [{ key: 'incomingFileset.schoolID', value: req.params.schoolID, operation: FILTER_OPERATION.EQUAL, valueType: VALUE_TYPE.UUID }]
searchCriteriaList: [{ key: 'incomingFileset.incomingFilesetID', value: req.params.activeIncomingFilesetID, operation: FILTER_OPERATION.EQUAL, valueType: VALUE_TYPE.UUID }]
});
}

Expand Down
4 changes: 2 additions & 2 deletions backend/src/routes/grad.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ router.get('/validation-issue-type-codes', passport.authenticate('jwt', {session
router.post('/school/:schoolID/upload-file', passport.authenticate('jwt', {session: false}, undefined), isValidBackendToken, validateAccessToken,
checkEdxUserPermission(PERMISSION.GRAD_SCH_EDIT), validate(gradFileUploadSchema), scanFilePayload, uploadFile);

router.get('/filesetErrors/:schoolID/paginated', passport.authenticate('jwt', {session: false}, undefined), isValidBackendToken, validateAccessToken,
router.get('/filesetErrors/:activeIncomingFilesetID/paginated', passport.authenticate('jwt', {session: false}, undefined), isValidBackendToken, validateAccessToken,
checkEdxUserPermission(PERMISSION.GRAD_SCH_EDIT), validate(gradErrorFilesetStudentPaginatedSchema),
getErrorFilesetStudentPaginated);

router.get('/fileset/:schoolID/paginated', passport.authenticate('jwt', {session: false}, undefined), isValidBackendToken, validateAccessToken,
checkEdxUserPermission(PERMISSION.GRAD_SCH_EDIT), validate(gradErrorFilesetStudentPaginatedSchema),
getFilesetsPaginated);

router.get('/filesetErrors/:schoolID/errorReportDownload', auth.refreshJWT, isValidBackendToken, validateAccessToken,
router.get('/filesetErrors/:activeIncomingFilesetID/errorReportDownload', auth.refreshJWT, isValidBackendToken, validateAccessToken,
checkEdxUserPermission(PERMISSION.GRAD_SCH_EDIT), validate(gradErrorFilesetStudentPaginatedSchema),
downloadErrorReport);

Expand Down
2 changes: 1 addition & 1 deletion backend/src/validations/grad.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const gradFileBySchoolIDSchema = object({
const gradErrorFilesetStudentPaginatedSchema = object({
body: object().noUnknown(),
params: object({
schoolID: string()
activeIncomingFilesetID: string()
}),
query: object({
pageNumber: number().moreThan(-1).integer().optional(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ export default {
required: false,
default: null
},
activeIncomingFilesetID: {
type: String,
required: false,
default: null
},
},
emits: [],
data() {
Expand Down Expand Up @@ -167,7 +172,7 @@ export default {
},
methods: {
downloadReportURL() {
return `${ApiRoutes.gdc.BASE_URL}/filesetErrors/${this.$route.params.schoolID}/errorReportDownload`;
return `${ApiRoutes.gdc.BASE_URL}/filesetErrors/${this.$route.params.activeIncomingFilesetID}/errorReportDownload`;
},
toggleFilters() {
this.showFilters= !this.showFilters;
Expand All @@ -177,7 +182,7 @@ export default {
},
getErrorFilesetStudentPaginated() {
this.isLoading= true;
ApiService.apiAxios.get(`${ApiRoutes.gdc.BASE_URL}/filesetErrors/${this.$route.params.schoolID}/paginated`, {
ApiService.apiAxios.get(`${ApiRoutes.gdc.BASE_URL}/filesetErrors/${this.$route.params.activeIncomingFilesetID}/paginated`, {
params: {
pageNumber: this.pageNumber - 1,
pageSize: this.pageSize,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<span v-if="column.key === 'errorLink'">
<a
class="ml-1"
@click="navigateToErrors"
@click="navigateToErrors(props.item)"
>View Errors/Warnings</a>
</span>
<span v-else-if="column.key === 'demFileUploadDate' || column.key === 'xamFileUploadDate' || column.key === 'crsFileUploadDate'">
Expand Down Expand Up @@ -439,8 +439,8 @@ export default {
backButtonClick() {
this.$router.push({name: 'graduation', params: {schoolID: this.schoolID}});
},
navigateToErrors() {
this.$router.push({name: 'error', params: {schoolID: this.schoolID}});
navigateToErrors(row) {
this.$router.push({name: 'error', params: {schoolID: this.schoolID, activeIncomingFilesetID: row.incomingFilesetID}});
}

}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ const router = createRouter({
},
},
{
path: 'graduation/:schoolID/errorReport',
path: 'graduation/:schoolID/errorReport/:activeIncomingFilesetID',
name: 'error',
component: GradErrorsView,
props: true,
Expand Down
Loading