Skip to content

Commit

Permalink
fix:enrollment and sports certificates issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ManojNathIC committed Nov 28, 2024
1 parent 846f1be commit 9319156
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Helper/CredsConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export const CredsConfig = {
},
sportsParticipationCertificate: {
schemaName: 'sportsParticipationCertificate',
credIssuerId: process.env.SPORT_CRED_SCHEMA_ID,
credsSchemaId: process.env.SPORT_ISSUER_ID,
credIssuerId: process.env.SPORT_ISSUER_ID,
credsSchemaId: process.env.SPORT_CRED_SCHEMA_ID,
transformer: 'sportsParticipationCertificate',
context:
'https://raw.githubusercontent.com/tekdi/tekdi.github.io/refs/heads/main/static/files/vc-schemas/ubi/SportsParticipationCertificate.json',
Expand Down
5 changes: 2 additions & 3 deletions src/Helper/transformers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const enrollmentCertificate = (data) => {
firstName: record.firstName,
middleName: record.middleName,
lastName: record.lastName,
gradeLevel: record.gradeLevel,
gradeLevel: record.gradeLevel || record.class || record.division,
addressLine1: record.addressLine1,
addressLine2: record.addressLine2,
landmark: record.landmark,
Expand All @@ -99,13 +99,12 @@ export const enrollmentCertificate = (data) => {
pin: record.pin,
state: record.state,
country: record.country,
schoolYear: record.schoolYear,
schoolYear: record.schoolYear || record.academicYear,
studentStatus: record.studentStatus,
schoolName: record.schoolName,
schoolRegistrationNumber: record.schoolRegistrationNumber,
principalName: record.authorityName,
principalDesignation: record.designationPrincipal,
dayMonthYear: record.dayMonthYear,
learnerReferenceNumber: record.learnerReferenceNumber,
validUpto: record.validUpto,
issuanceDate: new Date().toISOString(),
Expand Down
3 changes: 2 additions & 1 deletion src/inspector/inspector.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,8 @@ export class InspectorController {

// Extract required fields
const extractedData = data.map((item: any) => ({
studentUniqueId: item.studentId || '',
StudentUniqueId: item.studentId || '',
schoolId: item.schoolId || '',
name: `${item.firstName || ''} ${item.lastName || ''}`.trim(),
certificateID: item.certificateId || '',
class: item.class || '',
Expand Down

0 comments on commit 9319156

Please sign in to comment.