Unverified Commit 759e9b1a authored by Ankit Verma's avatar Ankit Verma Committed by GitHub
Browse files

Merge pull request #105 from JeslyJoseph/diplomaDownloadIssue

Diploma download issue
Showing with 76 additions and 17 deletions
+76 -17
...@@ -69,6 +69,7 @@ export class RegnDiplomaCertDetailsComponent { ...@@ -69,6 +69,7 @@ export class RegnDiplomaCertDetailsComponent {
osid: string; osid: string;
Updateosid:string;
entity: string; entity: string;
name: string; name: string;
finalYearRollNo: string; finalYearRollNo: string;
...@@ -182,8 +183,8 @@ export class RegnDiplomaCertDetailsComponent { ...@@ -182,8 +183,8 @@ export class RegnDiplomaCertDetailsComponent {
} }
this.baseService.getStudentosid$(this.studentosIdBody).subscribe((response)=>{ this.baseService.getStudentosid$(this.studentosIdBody).subscribe((response)=>{
if (Array.isArray(response)) { if (Array.isArray(response)) {
this.osid = response[0].osid; this.Updateosid = response[0].osid;
console.log("osid",this.osid) console.log("osid",this.Updateosid)
} }
...@@ -386,9 +387,11 @@ export class RegnDiplomaCertDetailsComponent { ...@@ -386,9 +387,11 @@ export class RegnDiplomaCertDetailsComponent {
this.name = this.candetails.name; this.name = this.candetails.name;
this.finalYearRollNo =this.candetails.finalYearRollNo; this.finalYearRollNo =this.candetails.finalYearRollNo;
this.email=this.candetails.email; this.email=this.candetails.email;
this.osid=this.candetails.osid;
this.getStudentOsid(); this.getStudentOsid();
// if (!!this.urlDataResponse) { // if (!!this.urlDataResponse) {
// this.urlData = this.urlDataResponse?.split(",").filter(url => url.trim() !== ""); // this.urlData = this.urlDataResponse?.split(",").filter(url => url.trim() !== "");
// if (this.urlData.length) { // if (this.urlData.length) {
...@@ -559,7 +562,6 @@ export class RegnDiplomaCertDetailsComponent { ...@@ -559,7 +562,6 @@ export class RegnDiplomaCertDetailsComponent {
onNewRegCourseDetailsformSubmit(value: any) { onNewRegCourseDetailsformSubmit(value: any) {
if (this.newRegCertDetailsformGroup.dirty || this.newRegCourseDetailsformGroup.dirty) { if (this.newRegCertDetailsformGroup.dirty || this.newRegCourseDetailsformGroup.dirty) {
const joinDate = new Date(this.newRegCourseDetailsformGroup.get('joinDate')?.value); const joinDate = new Date(this.newRegCourseDetailsformGroup.get('joinDate')?.value);
const passDate = new Date(this.newRegCourseDetailsformGroup.get('passDate')?.value); const passDate = new Date(this.newRegCourseDetailsformGroup.get('passDate')?.value);
const jMonth = joinDate.getMonth(); const jMonth = joinDate.getMonth();
const pMonth = passDate.getMonth(); const pMonth = passDate.getMonth();
...@@ -623,15 +625,15 @@ export class RegnDiplomaCertDetailsComponent { ...@@ -623,15 +625,15 @@ export class RegnDiplomaCertDetailsComponent {
} }
if (this.osid) { if (this.Updateosid) {
const paymentData = { const paymentData = {
osId: this.osid, osId: this.Updateosid,
origin: this.stateData?.origin, origin: this.stateData?.origin,
endPointUrl: this.endPointUrl, endPointUrl: this.endPointUrl,
} }
localStorage.setItem('payData', JSON.stringify(paymentData)) localStorage.setItem('payData', JSON.stringify(paymentData))
this.baseService.updateStudent$(this.osid, this.updateStudentBody, this.endPointUrl) this.baseService.updateStudent$(this.Updateosid, this.updateStudentBody, this.endPointUrl)
.subscribe( .subscribe(
(response) => { (response) => {
this.paymentDetails = true; this.paymentDetails = true;
......
...@@ -18,6 +18,8 @@ export class PaymentSuccessFailureComponent implements OnInit { ...@@ -18,6 +18,8 @@ export class PaymentSuccessFailureComponent implements OnInit {
transactionAmt: string = '' transactionAmt: string = ''
transactionId: string = '' transactionId: string = ''
type: string; type: string;
diplomaBody: any;
candetails: any;
constructor(private router: Router, constructor(private router: Router,
private route: ActivatedRoute, private route: ActivatedRoute,
private baseService: BaseServiceService, private baseService: BaseServiceService,
...@@ -151,14 +153,72 @@ export class PaymentSuccessFailureComponent implements OnInit { ...@@ -151,14 +153,72 @@ export class PaymentSuccessFailureComponent implements OnInit {
} }
this.baseService.diplomaPayment$(diplomaPaymentBody).subscribe({ this.baseService.diplomaPayment$(diplomaPaymentBody).subscribe({
next: (response) => { next: (response) => {
const updatediplomaBody = { this.diplomaBody = {
"paymentStatus": "SUCCESS" filters: {
finalYearRollNo: {
eq: this.dipData.regNum
},
dateOfBirth: {
eq: this.dipData.dod
},
email: {
eq: this.dipData.email
}
}
} }
this.baseService.updateDiploma$(this.dipData.osId,updatediplomaBody).subscribe((response) => { this.baseService.getDiploma$(this.diplomaBody).subscribe((response) => {
console.log(response) console.log(response)
if (Array.isArray(response)) {
this.candetails = response[0]
console.log(response[0])
const updatediplomaBody = {
"paymentStatus": "SUCCESS",
"aadhaarNo":this.candetails.aadhaarNo,
"address":this.candetails.address,
"barcode":this.candetails.barcode,
"candidatePic":this.candetails.candidatePic,
"candidateSignature":this.candetails.candidateSignature,
"centerCode":this.candetails.centerCode,
"certificateNumber":this.candetails.certificateNumber,
"council":this.candetails.council,
"country":this.candetails.country,
"courseName":this.candetails.courseName,
"credType":this.candetails.credType,
"date":this.candetails.date,
"dateOfBirth":this.candetails.dateOfBirth,
"district":this.candetails.district,
"docproof":this.candetails.docproof,
"email":this.candetails.email,
"examBody":this.candetails.examBody,
"examYear": this.candetails.examYear,
"fathersName":this.candetails.fathersName,
"feeReciptNo":this.candetails.feeReciptNo,
"finalYearRollNo":this.candetails.finalYearRollNo,
"gender":this.candetails.gender,
"joiningMonth":this.candetails.joiningMonth,
"joiningYear":this.candetails.joiningYear,
"mothersName":this.candetails.mothersName,
"name":this.candetails.name,
"nursingCollage":this.candetails.nursingCollage,
"passingMonth":this.candetails.passingMonth,
"passingYear":this.candetails.passingYear,
"phoneNumber":this.candetails.phoneNumber ,
"pincode":this.candetails.pincode,
"state":this.candetails.state,
"university":this.candetails.university,
"validityUpto":this.candetails.validityUpto
}
this.baseService.updateDiploma$(this.dipData.osId, updatediplomaBody).subscribe((response) => {
console.log(response)
})
}
}) })
console.log(response) console.log(response)
this.type='diploma'; this.type = 'diploma';
localStorage.setItem('dipresData', JSON.stringify(response)) localStorage.setItem('dipresData', JSON.stringify(response))
...@@ -166,23 +226,20 @@ export class PaymentSuccessFailureComponent implements OnInit { ...@@ -166,23 +226,20 @@ export class PaymentSuccessFailureComponent implements OnInit {
error: (err) => { error: (err) => {
console.log(err); console.log(err);
} }
// if(response.params['status'] === 'SUCCESSFUL'){
// localStorage.removeItem('payData');
// }
}
)
})
} }
} }
navigateToHome() { navigateToHome() {
if(this.type==='diploma'){ if (this.type === 'diploma') {
this.router.navigate(['/claims/regn-diploma-cert-details']) this.router.navigate(['/claims/regn-diploma-cert-details'])
} }
else{ else {
this.router.navigate(['/claims/manage']) this.router.navigate(['/claims/manage'])
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment