Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
generatePdf = (ulbLogo, stateLogo, ulbName) => {
let { data } = this.props;
let { getAdvocateNames } = this;
//assigning fonts
pdfMake.fonts = fonts;
var addres = data.summon.courtName.address.addressLine1 ? data.summon.courtName.address.addressLine1 + ', ' : '';
addres += data.summon.courtName.address.city ? data.summon.courtName.address.city + ', ' : '';
addres += data.summon.courtName.address.addressLine2 ? data.summon.courtName.address.addressLine2 : '';
// console.log(data.witness);
//console.log(data);
var d = new Date(data.vakalatnamaGenerationDate);
var monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
var dayNames = [
'First',
'Second',
'Third',
'Fourth',
'Fifth',
import {Table} from 'react-bootstrap';
import Dialog from 'material-ui/Dialog';
import {Card, CardHeader, CardText} from 'material-ui/Card';
import FlatButton from 'material-ui/FlatButton';
import {translate, epochToDate} from '../../../common/common';
import Api from '../../../../api/api';
import styles from '../../../../styles/material-ui';
import $ from 'jquery';
import JSZip from 'jszip/dist/jszip';
import pdfMake from "pdfmake/build/pdfmake";
import pdfFonts from "pdfmake/build/vfs_fonts";
import 'datatables.net-buttons/js/buttons.html5.js';// HTML 5 file export
import 'datatables.net-buttons/js/buttons.flash.js';// Flash file export
import {fonts} from '../../../common/pdf-generation/PdfConfig';
pdfMake.fonts = fonts;
window.JSZip = JSZip;
export default class NoticeSearchResult extends Component{
constructor(){
super();
this.state={
open:false
};
}
componentDidMount(){
for(var k in this.props.noticeSearch){
if(!this.props.noticeSearch[k])
delete this.props.noticeSearch[k];
}
this.getSearchNotice(this.props.searchParams);
}
generatePdf = (ulbLogo, stateLogo, certificateConfigDetails, ulbName) => {
let {license} = this.props;
//assigning fonts
pdfMake.fonts = fonts;
//document defintion
var docDefinition = {
pageSize: 'A4',
pageMargins: [ 30, 30, 30, 30 ],
content: [
//Pdf header
{
columns: [
{
width: 60,
fit:[60,60],
image : ulbLogo,
alignment:'left'
},
{
generatePdf = (ulbLogo, stateLogo, certificateConfigDetails, ulbName) => {
var departmentName = certificateConfigDetails[CONFIG_DEPT_KEY];
var license = this.props.license;
var _this=this;
//assigning fonts
pdfMake.fonts = fonts;
//document defintion
var docDefinition = {
pageSize: 'A4',
pageMargins: [ 30, 30, 30, 30 ],
content: [
//Pdf header
{
columns: [
{
width: 60,
fit:[60,60],
image : ulbLogo,
alignment:'left'
},
{
generatePdf = (ulbLogo, stateLogo, certificateConfigDetails, ulbName, receiptDetails) => {
let license = this.props.license;
var _this = this;
var departmentName = certificateConfigDetails[CONFIG_DEPT_KEY];
var municipalActDetails = certificateConfigDetails[CONFIG_MUNICIPAL_ACT_KEY];
var receiptNumber = receiptDetails.Bill[0].billDetails[0].receiptNumber;
var receiptDate = receiptDetails.Bill[0].billDetails[0].receiptDate;
//assigning fonts
pdfMake.fonts = fonts;
//document defintion
var docDefinition = {
pageSize: 'A4',
pageMargins: [ 30, 30, 30, 30 ],
content: [
//Pdf header
{
columns: [
{
width: 60,
fit:[60,60],
image : ulbLogo,
alignment:'left'
},
{
generatePdf = (ulbLogo, stateLogo, ulbName) => {
let {grievance} = this.props;
let obj = grievance[0].attribValues.find(o => o.key === 'systemApprovalComments');
var _this=this;
//assigning fonts
pdfMake.fonts = fonts;
//document defintion
var docDefinition = {
pageSize: 'A4',
pageMargins: [ 50, 30, 50, 30 ],
content: [
//Pdf header
{
columns: [
{
width: 60,
fit:[60,60],
image : ulbLogo,
alignment:'left'
},
{
function initPdfMake(data: any): void {
pdfMake.fonts = {
PdfFont: data.fonts
};
pdfMake.vfs = data.vfs;
}
generatePdf = (ulbLogo, stateLogo, certificateConfigDetails, ulbName, receiptDetails) => {
let license = this.props.license;
var _this = this;
var departmentName = certificateConfigDetails[CONFIG_DEPT_KEY];
var municipalActDetails = certificateConfigDetails[CONFIG_MUNICIPAL_ACT_KEY];
var receiptNumber = receiptDetails.Bill[0].billDetails[0].receiptNumber;
var receiptDate = receiptDetails.Bill[0].billDetails[0].receiptDate;
//assigning fonts
pdfMake.fonts = fonts;
//document defintion
var docDefinition = {
pageSize: 'A4',
pageMargins: [ 30, 30, 30, 30 ],
content: [
//Pdf header
{
columns: [
{
width: 60,
fit:[60,60],
image : ulbLogo,
alignment:'left'
},
{
generatePdf = (ulbLogo, stateLogo, certificateConfigDetails, ulbName) => {
let {license} = this.props;
//assigning fonts
pdfMake.fonts = fonts;
//document defintion
var docDefinition = {
pageSize: 'A4',
pageMargins: [ 30, 30, 30, 30 ],
content: [
//Pdf header
{
columns: [
{
width: 60,
fit:[60,60],
image : ulbLogo,
alignment:'left'
},
{
generatePdf = (ulbLogo, stateLogo, ulbName) => {
let { grievance } = this.props;
let obj = grievance[0].attribValues.find(o => o.key === 'systemApprovalComments');
var _this = this;
//assigning fonts
pdfMake.fonts = fonts;
//document defintion
var docDefinition = {
pageSize: 'A4',
pageMargins: [50, 30, 50, 30],
content: [
//Pdf header
{
columns: [
{
width: 60,
fit: [60, 60],
image: ulbLogo,
alignment: 'left',
},
{