diff --git a/src/app/dashboard/download-certificate/download-certificate.component.html b/src/app/dashboard/download-certificate/download-certificate.component.html index 33f664e..5018d9b 100644 --- a/src/app/dashboard/download-certificate/download-certificate.component.html +++ b/src/app/dashboard/download-certificate/download-certificate.component.html @@ -1,344 +1,420 @@ - - - - - - - - +
+
+
-
-
-
-
- - - RTO COPY - -
- -
-
+ + + + + +
+
+
+
+
+ + + + - - - - - - - - - - - - - +

+ This is certified that, AIS 140 compliant vehicle location + tracking device with panic button(SOS) has been installed properly + as per AIS-140 guidelines device has been configured to state + approval server +

+ + + +
+ To
+ Regional Transport Authority
+ Kolkata
+ West Bengal Only
+
+
+
+ FITMENT CERTIFICATE +
+
-
- -
- TAC Reg.No    
- CoP No.    
- CoP Validity upto  
- Fitment Date   
- Fitment Renewal Date  
-
- : CK8077
- : CC0GR8739
- : 30 September 2023
- : {{ kycApprovalDate ? (kycApprovalDate | date: "dd/MM/yyyy") : "" - }}
- : {{ esim_validity ? esim_validity : "" }}
-
-
- AIS 140 COMPLIANCE VLT INSTALLATION CERTIFICATE -
-
- Fitment Certificate No.
- Chassis No.
- Engine No.
- Vehicle OEM
- Vehicle Model
- Vehicle Reg/temp
- Voltage
- Panic Button Model
- Panic Button fitted
- Dealer Name/fitted by
- Device Model No.
- GNSS Module
- Vahan ID
- Device IMEI
- GSM Module
- ICCID
- Primary SIM
- Primary SIM Valid till
- Secondary SIM
- Secondary SIM Valid till
-
- : {{ fitmentCertificateNo ? fitmentCertificateNo : "" }}
- : {{ ChassisNo ? ChassisNo : "" }}
- : {{ engineNo ? engineNo : "" }}
- : {{ manufacturingCompany ? manufacturingCompany : "" }}
- : {{ model ? model : "" }}
- : {{ devName ? devName : "" }}
- : 12V & 24V
- : NSS-1821
- : {{ numberOfSOS ? numberOfSOS : "" }}
- : {{ dealerName ? dealerName : "" }}
- : {{ devicetype ? devicetype : "" }}
- : {{ gnnsModule ? gnnsModule : 0 }}
- : {{ vahanID ? vahanID : "" }}
- : {{ deviceID ? deviceID : "" }}
- : {{ gsmModule ? gsmModule : "Telit GE910" }}
- : {{ ICCICD ? ICCICD : "" }}
- : {{ simNum ? simNum : "" }}
- : {{ esim_validity ? (esim_validity) : "" - }}
- : {{ simNum1 ? simNum1 : "" }}
- : {{ esim_validity ? (esim_validity) : "" - }}
-
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VEHICLE DETAILS
VEHICLE REG.NO{{ devName ? devName : "" }}
VEHICLE REG.DATE{{data.deviceInfo && data.deviceInfo.vehicleRegDate?data.deviceInfo.vehicleRegDate:''}}
ENGINE NO{{ engineNo ? engineNo : "" }}
CHASSIS NO{{ ChassisNo ? ChassisNo : "" }}
VEHICLE MAKE{{data && data.deviceInfo && data.deviceInfo.manufacturingCompany ? data.deviceInfo.manufacturingCompany :'-'}}
VEHICLE MODEL{{ model ? model : "" }}
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FITMENT DETAILS
FITMENT DATE{{ kycApprovalDate ? (kycApprovalDate | date : "dd/MM/yyyy") : "" + }}
FITMENT RENEWAL DATE{{ esim_validity ? esim_validity : "" }}
FITMENT CERT.NO{{ fitmentCertificateNo ? fitmentCertificateNo : "" }}
INVOICE NO.{{data.deviceInfo && data.deviceInfo.invoiceNumber?data.deviceInfo.invoiceNumber:''}}
INVOCE DATE{{data.deviceInfo && data.deviceInfo.invoiceDate?data.deviceInfo.invoiceDate:''}}
RTO CODE{{data.deviceInfo && data.deviceInfo.rto?data.deviceInfo.rto:''}}
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PRODUCT DETAILS
VTS SR.NO/UINO{{ ICCICD ? ICCICD : "" }}
VTS MODEL TRACK{{ devicetype ? devicetype : "" }}
Test Report NO.-
TAC NO.CK8077
COP NO.CC0GR8739
COP Validity upto30 September 2023
+
+
+ + + + + + + + - - + + + + + + + + + + + + + + + + + + + + +
SERVICE/ESIM DETAILS
+
IMEI NO.{{ deviceID ? deviceID : "" }}
ICCID NO/SIM NO{{ ICCICD ? ICCICD : "" }}
Sim Card Service Provider{{data.deviceInfo && data.deviceInfo.sim_provider? data.deviceInfo.sim_provider : ''}}
No. Of Panic Button{{ numberOfSOS ? numberOfSOS : "" }}
Sim No.{{ simNum ? simNum : "" }}
+
+
+ + + + + + + + + + + + + + + +
+ + + + + +
Device ImageReg.Certificate ImageVehicle Front Image
+ - - - - - - - - +
+
PRODUCT SATISFACTION REPORT
+
+

This is to acknowledge confirm that we have got our vehicle bearing registration no {{vahanID}} VTS Device manufactured by NIPPON AUDIOTRONIX bearing Sr.No + {{engineNo}} We have checked the performance ot the vehicle after fitment of the said VTS device the unit is sealed and functioning as per normslaid out in AIS 140.We + have satisfied with the performance of the unit in all respects.We undertake not to reseany dispute or any legal claims against NIPPON AUDIOTRONIX in the event that the + above mentioned seals atfound broken/tampered.

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Dealer Name: + + {{ data.deviceInfo && data.deviceInfo.Dealer && data.deviceInfo.Dealer.first_name ? data.deviceInfo.Dealer.first_name : "" }} + {{ data.deviceInfo && data.deviceInfo.Dealer && data.deviceInfo.Dealer.last_name ? data.deviceInfo.Dealer.last_name : "" }} + + Dealer Contact no: + + + + Dealer Addresse: + + {{ data.deviceInfo && data.deviceInfo.Dealer && data.deviceInfo.Dealer.address ? data.deviceInfo.Dealer.address : "" }} +
+ Customer Name: + + {{ user.first_name ? user.first_name : "" }} + {{ user.last_name ? user.last_name : "" }} + + Customer Contact no: + + {{ user.phone ? user.phone : "" }} + + Customer Addresse: + + {{ user.address ? user.address : "" }} +
+ Device Installed By + + + + Dealer Sign: + + .............................. + + RTA/MVI/STA: + + ............................... +
+ - - - - -

- This is certified that, AIS 140 compliant vehicle location tracking - device with panic button(SOS) has been installed properly as per - AIS-140 guidelines device has been configured to state approval server -

- - - - Authorised - - - Undertaking - - - -

- This is certified that the device and panic button (SOS) installation - has been carried out to my satisfaction and explained about the - functionality of Device, I undertake that I will not temper the device - and panic button (SOS) -

- - - - - Customer Name : {{ user.first_name ? user.first_name : "" }} - {{ user.last_name ? user.last_name : "" }}
- Contact/Login ID : {{ user.phone ? user.phone : "" }} - - - Customer Address: {{ user.address ? user.address : "" }}
- Customer Sign : - - - - +
+
+
- - + + + +
+ + + TAC Reg.No    
+ CoP No.    
+ CoP Validity upto  
+ Fitment Date   
+ Fitment Renewal Date  
+ + + : CK8077
+ : CC0GR8739
+ : 30 September 2023
+ :
+ :
+ + + + +
+ AIS 140 COMPLIANCE VLT INSTALLATION CERTIFICATE +
+ + + + + Fitment Certificate No.
+ Chassis No.
+ + Vehicle OEM
+ Vehicle Model
+ Vehicle Reg/temp
+ Voltage
+ Panic Button Model
+ Panic Button fitted
+ Dealer Name/fitted by
+ Device Model No.
+ GNSS Module
+ Vahan ID
+ Device IMEI
+ GSM Module
+ ICCID
+ Primary SIM
+ Primary SIM Valid till
+ Secondary SIM
+ Secondary SIM Valid till
+ + + : {{ fitmentCertificateNo ? fitmentCertificateNo : "" }}
+ :
+ :
+ : {{ manufacturingCompany ? manufacturingCompany : "" }}
+ : {{ model ? model : "" }}
+ : {{ devName ? devName : "" }}
+ : 12V & 24V
+ : NSS-1821
+ : panic button
+ : {{ dealerName ? dealerName : "" }}
+ : {{ devicetype ? devicetype : "" }}
+ : {{ gnnsModule ? gnnsModule : 0 }}
+ : {{ vahanID ? vahanID : "" }}
+ : {{ deviceID ? deviceID : "" }}
+ : {{ gsmModule ? gsmModule : "Telit GE910" }}
+ : {{ ICCICD ? ICCICD : "" }}
+ : {{ simNum ? simNum : "" }}
+ : {{ esim_validity ? esim_validity : "" }}
+ : {{ simNum1 ? simNum1 : "" }}
+ : {{ esim_validity ? esim_validity : "" }}
+ + + + + + + + + + + + + Authorised + + + Undertaking + + + +

+ This is certified that the device and panic button (SOS) installation + has been carried out to my satisfaction and explained about the + functionality of Device, I undertake that I will not temper the device + and panic button (SOS) +

+ + + + + Customer Name :
+ Contact/Login ID : + + + Customer Address:
+ Customer Sign : + + + +
diff --git a/src/app/dashboard/download-certificate/download-certificate.component.scss b/src/app/dashboard/download-certificate/download-certificate.component.scss index 5b2f821..10ad477 100644 --- a/src/app/dashboard/download-certificate/download-certificate.component.scss +++ b/src/app/dashboard/download-certificate/download-certificate.component.scss @@ -2,3 +2,33 @@ width: 3000px !important; height: 3000px !important; } +.t-mp-heading { + font-size: 16px;font-weight: 700; + text-align: center; +} +.table.table-bordered tr td:first-child{ + font-weight: 700; +} +.fitment-heading{ + font-size: 12px; + border: 3px solid; + padding: 5px; + display: inline; + font-weight: 700; + width: fit-content; + margin-top: -12px; +} +.to-head { + font-size: 14px; + font-weight: 600; +} +#testPdf .table td, #testPdf .table th { + padding: 0.25rem;} + + .table.table-borderless td{ + border:none; + font-size: 10px; +} +.fix-width-20 td{ + width: 16%; +} diff --git a/src/app/dashboard/download-certificate/download-certificate.component.ts b/src/app/dashboard/download-certificate/download-certificate.component.ts index c87882d..7d49369 100644 --- a/src/app/dashboard/download-certificate/download-certificate.component.ts +++ b/src/app/dashboard/download-certificate/download-certificate.component.ts @@ -1,7 +1,10 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MdDialogRef, MD_DIALOG_DATA } from '@angular/material'; declare var jsPDF: any; +declare var pdfMake: any; declare var html2canvas: any; + +declare var html2pdf: any; import * as moment from 'moment'; import { ContactService } from '../../contact.service'; declare var $: any; @@ -375,7 +378,7 @@ export class DownloadCertificateComponent implements OnInit { // img.onload = function(){ console.log("-1"); doc.setPage(1); - doc.addImage(that.img, 'png', 15, 9, 50, 40) + doc.addImage(that.img, 'png', 75, 9, 50, 40) // }; // doc.text("Customer Copy", 110, 12); @@ -386,13 +389,14 @@ export class DownloadCertificateComponent implements OnInit { tableWidth: 'auto', - // styles : { - // cellWidth : 10, - // overflow: "linebreak" - // }, + styles : { + cellWidth : 35, + overflow: "linebreak" + }, willDrawCell: data => { + console.log('manojpatidar',data); if (data.row.index === 0) { - data.row.height = 30; + data.row.height = 40; doc.setFontStyle('bold'); data.row.cells[0].styles.halign = 'center'; data.row.cells[0].styles.fontSize = 25; @@ -403,15 +407,16 @@ export class DownloadCertificateComponent implements OnInit { // } // doc.addImage(this.supAdmin.imageDoc,'JPEG', 140, 9,40,40); - doc.setPage(1); - doc.addImage(this.imgURL, 'JPEG', 150, 9, 50, 40); + } if (data.row.index === 1) { // data.row.cells[0].styles.halign = 'center'; doc.halign = 'center'; doc.setFontStyle('bold'); - doc.cellPadding = 50 + doc.cellPadding = 50; + doc.setPage(1); + doc.addImage(this.imgURL, 'JPEG', 150, 45, 50, 40); } if (data.row.index === 3) { @@ -550,5 +555,61 @@ export class DownloadCertificateComponent implements OnInit { xhr.responseType = 'blob'; xhr.send(); } + public convetToPDF() +{ +var data = document.getElementById('testPdf'); + +var opt = { + margin: [0, 0.2, 0.2, 0.2], + filename: this.devName +'.pdf', + image: { type: 'jpeg', quality: 0.98 }, + html2canvas: { scale: 4 , useCORS: true}, + jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' } +}; + +// New Promise-based usage: +html2pdf().set(opt).from(data).save(); + + + +// html2canvas(data, { +// useCORS: true, +// scale: 2, +// scrollY: -window.scrollY, +// height:'3000px', +// onrendered: (canvas) =>{ +// var data = canvas.toDataURL(); + +// let img = new Image(); +// img.src = this.org.imageDoc ? this.org.imageDoc : ''; +// img.crossOrigin = "anonymous"; +// //canvas.addImage(img, 'png', 75, 9, 50, 40) + +// var docDefinition = { +// content: [{ +// image: data, +// width: 500 +// }] +// }; +// pdfMake.createPdf(docDefinition).download("JSON.pdf"); + + +// } +// }); + +// html2canvas(data).then(canvas => { +// // Few necessary setting options +// var imgWidth = 208; +// var pageHeight = 295; +// var imgHeight = canvas.height * imgWidth / canvas.width; +// var heightLeft = imgHeight; + +// const contentDataURL = canvas.toDataURL('image/png') +// let pdf = new jsPDF('p', 'mm', 'a4'); // A4 size page of PDF +// var position = 0; +// pdf.addImage(contentDataURL, 'PNG', 0, position, imgWidth, imgHeight) +// pdf.save('new-file.pdf'); // Generated PDF +// }); +} } \ No newline at end of file diff --git a/src/index.html b/src/index.html index 3536612..eded6a3 100644 --- a/src/index.html +++ b/src/index.html @@ -257,7 +257,8 @@ - + +