Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
generateAndStoreDocumentReference(questionnaireResponse, dataBundle) {
var pdfMake = require('pdfmake/build/pdfmake.js');
var pdfFonts = require('pdfmake/build/vfs_fonts.js');
pdfMake.vfs = pdfFonts.pdfMake.vfs;
var docDefinition = {
content: [
{
text: 'QuestionnaireResponse: ' + questionnaireResponse.id + ' (' + questionnaireResponse.authored + ')\n',
style: 'header'
},
{
text: JSON.stringify(questionnaireResponse, undefined, 4),
style: 'body'
}
],
styles: {
header: {
fontSize: 13,
bold: true
import { Component, OnInit } from '@angular/core';
import { OrdersService } from '../../../core/services/orders.service';
import { Order } from '../../../core/classes/order';
import { TranslateService } from '@ngx-translate/core';
import { isArray } from 'lodash';
import * as pdfMake from 'pdfmake/build/pdfmake.js';
import * as pdfFonts from 'pdfmake/build/vfs_fonts.js';
import { UtilsService } from '../../../shared/services/utils.service';
pdfMake.vfs = pdfFonts.pdfMake.vfs;
declare var numeral: any;
@Component({
selector: 'storaji-orders-report',
templateUrl: './report.component.html',
styles: []
})
export class ReportComponent implements OnInit {
orders: Order[];
currency = numeral();
constructor(
private _ordersService: OrdersService,
public translate: TranslateService,
private utils: UtilsService
) { }
var pdfMake = require('pdfmake/build/pdfmake.js');
var pdfFonts = require('pdfmake/build/vfs_fonts.js');
pdfMake.vfs = pdfFonts.pdfMake.vfs;
import * as Trello from './trello'
var content = [];
/**
* initialize content
* @param {string} name
*/
function initialize(name) {
content = [{
text: name,
style: 'header',
alignment: 'center'
}]
}
import { Component, OnInit, OnDestroy } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { Subscription } from 'rxjs/Subscription';
import * as pdfMake from 'pdfmake/build/pdfmake.js';
import * as pdfFonts from 'pdfmake/build/vfs_fonts.js';
import { isArray } from 'lodash';
import { ProductsService } from '../../../core/services/products.service';
import { Product } from '../../../core/classes/product';
import { UtilsService } from '../../../shared/services/utils.service';
pdfMake.vfs = pdfFonts.pdfMake.vfs;
declare var numeral: any;
@Component({
selector: 'storaji-products-report',
templateUrl: './report.component.html',
styles: []
})
export class ReportComponent implements OnInit, OnDestroy {
products: Product[];
currency = numeral();
private _sub: Subscription = undefined;
constructor(
private _productService: ProductsService,
public translate: TranslateService,
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, ParamMap } from '@angular/router';
import { Location } from '@angular/common';
import 'rxjs/add/operator/switchMap';
import { TranslateService } from '@ngx-translate/core';
import * as pdfMake from 'pdfmake/build/pdfmake.js';
import * as pdfFonts from 'pdfmake/build/vfs_fonts.js';
import { isObject } from 'lodash';
import { OrdersService } from '../../../core/services/orders.service';
import { Order } from '../../../core/classes/order';
import { UtilsService } from '../../../shared/services/utils.service';
pdfMake.vfs = pdfFonts.pdfMake.vfs;
declare var numeral: any;
@Component({
selector: 'storaji-orders-overview',
templateUrl: './overview.component.html',
styles: []
})
export class OverviewComponent implements OnInit {
order: Order;
currency = numeral();
constructor(
private routes: ActivatedRoute,
private location: Location,
private _ordersService: OrdersService,
public translate: TranslateService,