Skip to content

Commit

Permalink
fix:Income and sport certificate template and data
Browse files Browse the repository at this point in the history
  • Loading branch information
ManojNathIC committed Nov 28, 2024
1 parent 2a16b38 commit e109e96
Show file tree
Hide file tree
Showing 3 changed files with 166 additions and 169 deletions.
315 changes: 156 additions & 159 deletions schemas/sportsParticipationCertificate.json
Original file line number Diff line number Diff line change
@@ -1,164 +1,161 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"properties": {
"sportsParticipationCertificate": {
"$ref": "#/definitions/sportsParticipationCertificate"
}
},
"required": ["sportsParticipationCertificate"],
"title": "SportsParticipationCertificate",
"definitions": {
"sportsParticipationCertificate": {
"$id": "#/properties/sportsParticipationCertificate",
"type": "object",
"title": "SportsParticipationCertificate Schema",
"required": [
"studentId",
"firstName",
"lastName",
"schoolName",
"class",
"eventName",
"eventStartDate",
"eventEndDate",
"typeofSport",
"orgName",
"certificateNumber"
],
"uniqueIndexFields": ["studentId"],
"properties": {
"studentId": {
"type": "string",
"title": "Student Identifier"
},
"schoolId": {
"type": "string",
"title": "School Identifier"
},
"firstName": {
"type": "string",
"title": "First Name"
},
"middleName": {
"type": "string",
"title": "Middle Name"
},
"lastName": {
"type": "string",
"title": "Last Name"
},
"schoolName": {
"type": "string",
"title": "School Name"
},
"class": {
"type": "string",
"title": "Class"
},
"addressLine1": {
"type": "string",
"title": "Address Line 1"
},
"vtc": {
"type": "string",
"title": "Village/Town/City"
},
"district": {
"type": "string",
"title": "District"
},
"pin": {
"type": "string",
"title": "PIN Code"
},
"state": {
"type": "string",
"title": "State"
},
"country": {
"type": "string",
"title": "Country"
},
"organizingVenue": {
"type": "string",
"title": "Organizing Venue"
},
"eventName": {
"type": "string",
"title": "Event Name"
},
"eventStartDate": {
"type": "string",
"format": "date",
"title": "Event Start Date"
},
"eventEndDate": {
"type": "string",
"format": "date",
"title": "Event End Date"
},
"typeofSport": {
"type": "string",
"title": "Type of Sport"
},
"rank": {
"type": "string",
"title": "Rank"
},
"orgName": {
"type": "string",
"title": "Organization Name"
},
"orgCode": {
"type": "string",
"title": "Organization Code"
},
"orgType": {
"type": "string",
"title": "Organization Type"
},
"orgOfficerName": {
"type": "string",
"title": "Organization Officer Name"
},
"orgOfficerRank": {
"type": "string",
"title": "Organization Officer Rank"
},
"orgDistrict": {
"type": "string",
"title": "Organization District"
},
"orgPin": {
"type": "string",
"title": "Organization PIN Code"
},
"orgState": {
"type": "string",
"title": "Organization State"
},
"orgCountry": {
"type": "string",
"title": "Organization Country"
},
"certificateNumber": {
"type": "string",
"title": "Certificate Number"
},
"certificateNo": {
"type": "string",
"title": "Certificate No"
},
"certificateId": {
"type": "string",
"title": "Certificate Id"
}
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"properties": {
"sportsParticipationCertificate": {
"$ref": "#/definitions/sportsParticipationCertificate"
}
},
"required": ["sportsParticipationCertificate"],
"title": "SportsParticipationCertificate",
"definitions": {
"sportsParticipationCertificate": {
"$id": "#/properties/sportsParticipationCertificate",
"type": "object",
"title": "SportsParticipationCertificate Schema",
"required": [
"studentId",
"firstName",
"lastName",
"schoolName",
"class",
"eventName",
"eventStartDate",
"eventEndDate",
"typeofSport",
"orgName",
"certificateNumber"
],
"uniqueIndexFields": ["studentId"],
"properties": {
"studentId": {
"type": "string",
"title": "Student Identifier"
},
"schoolId": {
"type": "string",
"title": "School Identifier"
},
"firstName": {
"type": "string",
"title": "First Name"
},
"middleName": {
"type": "string",
"title": "Middle Name"
},
"lastName": {
"type": "string",
"title": "Last Name"
},
"schoolName": {
"type": "string",
"title": "School Name"
},
"class": {
"type": "string",
"title": "Class"
},
"addressLine1": {
"type": "string",
"title": "Address Line 1"
},
"vtc": {
"type": "string",
"title": "Village/Town/City"
},
"district": {
"type": "string",
"title": "District"
},
"pin": {
"type": "string",
"title": "PIN Code"
},
"state": {
"type": "string",
"title": "State"
},
"country": {
"type": "string",
"title": "Country"
},
"organizingVenue": {
"type": "string",
"title": "Organizing Venue"
},
"eventName": {
"type": "string",
"title": "Event Name"
},
"eventStartDate": {
"type": "string",
"title": "Event Start Date"
},
"eventEndDate": {
"type": "string",
"title": "Event End Date"
},
"typeofSport": {
"type": "string",
"title": "Type of Sport"
},
"rank": {
"type": "string",
"title": "Rank"
},
"orgName": {
"type": "string",
"title": "Organization Name"
},
"orgCode": {
"type": "string",
"title": "Organization Code"
},
"orgType": {
"type": "string",
"title": "Organization Type"
},
"orgOfficerName": {
"type": "string",
"title": "Organization Officer Name"
},
"orgOfficerRank": {
"type": "string",
"title": "Organization Officer Rank"
},
"orgDistrict": {
"type": "string",
"title": "Organization District"
},
"orgPin": {
"type": "string",
"title": "Organization PIN Code"
},
"orgState": {
"type": "string",
"title": "Organization State"
},
"orgCountry": {
"type": "string",
"title": "Organization Country"
},
"certificateNumber": {
"type": "string",
"title": "Certificate Number"
},
"certificateNo": {
"type": "string",
"title": "Certificate No"
},
"certificateId": {
"type": "string",
"title": "Certificate Id"
}
}
},
"_osConfig": {
"inviteRoles": ["anonymous"]
}
},
"_osConfig": {
"inviteRoles": ["anonymous"]
}
}
16 changes: 8 additions & 8 deletions src/Helper/transformers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export const sportsParticipationCertificate = (data) => {
middleName: record.middleName,
lastName: record.lastName,
schoolName: record.schoolName,
class: record.gradeLevel,
class: record.gradeLevel || record.class || record.division,
addressLine1: record.addressLine1,
vtc: record.locality,
district: record.district,
Expand All @@ -188,21 +188,20 @@ export const sportsParticipationCertificate = (data) => {
country: record.country,
organizingVenue: record.landmark,
eventName: record.eventName,
eventStartDate: record.eventStartDate,
eventEndDate: record.eventEndDate,
startDate: record.eventStartDate,
endDate: record.eventEndDate,
typeofSport: record.typeofSport,
rank: record.rank,
orgName: record.organizationName,
orgCode: record.organizationCode,
orgType: record.organizationType,
orgOfficerName: record.authorityName,
orgOfficerRank: record.designationPrincipal,
orgOfficerName: record.orgOfficerName,
orgOfficerRank: record.orgOfficerRank,
orgDistrict: record.organizationDistrict,
orgPin: record.organizationPin,
orgState: record.organizationState,
orgCountry: record.organizationCountry,
issuanceDate: new Date().toISOString(),

certificateNumber:
record.schoolId?.trim(' ') +
'/' +
Expand Down Expand Up @@ -269,7 +268,7 @@ export const incomeCertificate = (data) => {
husbandName: record.husbandName,
wifeName: record.wifeName,
addressLine1: record.addressLine1,
vtc: record.locality,
vtc: record.vtc,
district: record.district,
pin: record.pin,
state: record.state,
Expand All @@ -283,7 +282,8 @@ export const incomeCertificate = (data) => {
incomeFromOtherSources: record.otherIncome,
orgName: record.organizationName,
orgType: record.organizationType,
orgOfficerRank: record.designationPrincipal,
orgCode: record.orgCode,
orgOfficerRank: record.orgOfficerRank,
orgAddressLine1: record.organizationAddress1,
orgAddressLine2: record.organizationAddress2,
orgDistrict: record.organizationDistrict,
Expand Down
4 changes: 2 additions & 2 deletions template/sportsParticipationCertificate.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ <h2>Participant Details</h2>
</tr>
<tr>
<th>Event Start Date</th>
<td>{{eventStartDate}}</td>
<td>{{startDate}}</td>
</tr>
<tr>
<th>Event End Date</th>
<td>{{eventEndDate}}</td>
<td>{{endDate}}</td>
</tr>
<tr>
<th>Type of Sport</th>
Expand Down

0 comments on commit e109e96

Please sign in to comment.