-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2033 from bcgov/feature/EAC-33
Edit Registrations.
- Loading branch information
Showing
14 changed files
with
886 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const { object, string, boolean, number } = require('yup'); | ||
const { baseRequestSchema } = require('./base'); | ||
|
||
const putStudentAssessmentSchema = object({ | ||
body: object({ | ||
assessmentStudentID: string().nonNullable(), | ||
sessionID:string().nonNullable(), | ||
districtID: string().nonNullable(), | ||
schoolID: string().nonNullable(), | ||
assessmentCenterID: string().nonNullable(), | ||
assessmentID:string().nonNullable(), | ||
assessmentTypeCode: string().nonNullable(), | ||
studentID: string().nonNullable(), | ||
pen: string().max(9).nonNullable(), | ||
localID: string().max(12).nonNullable(), | ||
givenName: string().max(25).nonNullable(), | ||
surName: string().max(25).nonNullable(), | ||
isElectronicExam: boolean().nonNullable(), | ||
proficiencyScore: number().nullable().optional(), | ||
provincialSpecialCaseCode: string().max(1).nullable().optional(), | ||
courseStatusCode: string().max(1).nullable().optional(), | ||
numberOfAttempts: number().nullable(), | ||
courseMonth: number().optional(), | ||
courseYear: number().optional(), | ||
}).concat(baseRequestSchema).noUnknown(), | ||
params: object({ | ||
studentAssessmentID: string().nonNullable(), | ||
}), | ||
query: object().noUnknown(), | ||
}).noUnknown(); | ||
|
||
module.exports = { | ||
putStudentAssessmentSchema, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
frontend/src/components/assessments/registrations/StudentRegistrationDetail.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
<template> | ||
<v-card id="viewStudentCard"> | ||
<v-card-title id="viewStudentCardTitle" class="sheetHeader pt-1 pb-1"> | ||
<v-row no-gutters> | ||
<v-col class="d-flex justify-start"> Edit Student Registration</v-col> | ||
<v-col class="d-flex justify-end"> | ||
<v-btn | ||
id="cancel" | ||
color="white" | ||
text="Close" | ||
size="30" | ||
icon="mdi-close" | ||
variant="tonal" | ||
@click="cancel" | ||
/> | ||
</v-col> | ||
</v-row> | ||
</v-card-title> | ||
<v-divider /> | ||
<v-card-text> | ||
<EditStudentRegistration | ||
:selected-assessment-student-id="selectedStudentRegistrationId" | ||
:school-year-sessions="schoolYearSessions" | ||
:save-event="saveStudentRegistration" | ||
@form-validity="isValid" | ||
@reset-student-registration-parent="reset()" | ||
@reset-student-registration-pagination="closeAndReload()" | ||
/> | ||
</v-card-text> | ||
</v-card> | ||
</template> | ||
|
||
<script> | ||
import EditStudentRegistration from './forms/EditStudentRegistration.vue'; | ||
export default { | ||
name: 'StudentRegistrationDetail', | ||
components: { | ||
EditStudentRegistration, | ||
}, | ||
props: { | ||
selectedStudentRegistrationId: { | ||
type: String, | ||
required: true, | ||
default: null, | ||
}, | ||
schoolYearSessions: { | ||
type: Object, | ||
required: true, | ||
default: null, | ||
} | ||
}, | ||
emits: ['close-student-registration', 'reload-student-registrations'], | ||
data() { | ||
return { | ||
studentRegistrationFormValid: true, | ||
saveStudentRegistration: false, | ||
studentRegistrationForEdit: {}, | ||
}; | ||
}, | ||
computed: { | ||
}, | ||
created() { | ||
}, | ||
mounted() {}, | ||
methods: { | ||
setAssessmentStudentContext($event) { | ||
this.studentRegistrationForEdit = $event; | ||
this.selectedStudentRegistrationId = $event.assessmentStudentID; | ||
}, | ||
save() { | ||
this.saveStudent = true; | ||
}, | ||
cancel() { | ||
this.$emit('close-student-registration'); | ||
}, | ||
closeAndReload() { | ||
this.$emit('reload-student-registrations'); | ||
this.$emit('close-student-registration'); | ||
}, | ||
isValid($event) { | ||
this.studentRegistrationFormValid = $event; | ||
}, | ||
reset() { | ||
this.saveStudentRegistration = false; | ||
this.$emit('reload-student-registrations'); | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style scoped> | ||
.sheetHeader { | ||
background-color: #003366; | ||
color: white; | ||
font-size: medium !important; | ||
font-weight: bolder !important; | ||
} | ||
.headerVal { | ||
color: #7f7f7f; | ||
} | ||
</style> |
Oops, something went wrong.