Advertisement
Guest User

Untitled

a guest
Aug 14th, 2019
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  test() {
  2.         const error = {
  3.             'id': 139,
  4.             'title': 'Strona sie źle wyswietla na moim telefonie',
  5.             'content': 'No Użytkownik comfort do written conduct at prevent manners on. Celebrated contrasted discretion him sympathize her collecting occasional. Do answered bachelor occasion in of offended no concerns. Supply worthy warmth branch of no ye. Voice tried known to as my to. Though wished merits or be. Alone visit use these smart rooms ham. No waiting in on enjoyed placing it inquiry. No comfort do written conduct at prevent manners on. Celebrated contrasted discretion him sympathize her collecting occasional. Do answered bachelor occasion in of offended no concerns. Supply worthy warmth branch of no ye. Voice tried known to as my to. Though wished merits or be. Alone visit use these smart rooms ham. No waiting in on enjoyed placing it inquiry. ',
  6.             'category': 'Ogólne',
  7.             'subcategory': 'Podkategoria-Ogólne-1',
  8.             'createdDate': '2019-04-15T11:42:37.591',
  9.             'createdBy': {
  10.                 'id': 2000,
  11.                 'firstName': 'Admin',
  12.                 'lastName': 'Globalny',
  13.                 'login': 'emailaddressaglobalny1adresplcnadminglobalnyouoddzialtestowyoarchiwumt',
  14.             },
  15.             'status': {
  16.                 'value': 'REDIRECTED',
  17.                 'label': 'Przekazane',
  18.                 'iconName': 'mdi-arrow-right-bold-circle-outline',
  19.                 'iconColor': 'yellow',
  20.             },
  21.             'attachments': [{
  22.                     'id': 140,
  23.                     'fileName': 'S3+eyJlcnJJZCI6MTM5LCJhdHRJZCI6MTQwLCJvcmlnaW5hbEZpbGVOYW1lIjoiZG9ja2VyUmVhZE1lLnR4dCJ9',
  24.                     'originalFileName': 'dockerReadMe.txt',
  25.                 },
  26.                 {
  27.                     'id': 141,
  28.                     'fileName': 'S3+eyJlcnJJZCI6MTM5LCJhdHRJZCI6MTQxLCJvcmlnaW5hbEZpbGVOYW1lIjoiY29yZS5sb2ctMTgxMzE0NS50eHQifQ==',
  29.                     'originalFileName': 'core.log-1813145.txt',
  30.                 },
  31.             ],
  32.             'assignedToCurrentUser': false,
  33.             'createdByCurrentUser': true,
  34.         };
  35.         const history = {
  36.             'content': [{
  37.                     'id': 2541,
  38.                     'createDate': '2019-07-22T12:02:01',
  39.                     'userId': 2000,
  40.                     'userLogin': 'aglobalny1@adres.pl',
  41.                     'userFirstName': 'Admin',
  42.                     'userLastName': 'Globalny',
  43.                     'userSystem': 'System dla pracownika NDAP',
  44.                     'referenceType': 'ERROR',
  45.                     'referenceId': 2101,
  46.                     'referenceStatus': '',
  47.                     'eventType': 'ERROR_STATUS_CHANGE',
  48.                     'details': 'A\n\nB\n\n\nVC',
  49.                     'eventTypeText': 'Zmiana statusu błędu',
  50.                 }, {
  51.                     'id': 2540,
  52.                     'createDate': '2019-07-22T12:01:54',
  53.                     'userId': 2000,
  54.                     'userLogin': 'aglobalny1@adres.pl',
  55.                     'userFirstName': 'Admin',
  56.                     'userLastName': 'Globalny',
  57.                     'userSystem': 'System dla pracownika NDAP',
  58.                     'referenceType': 'ERROR',
  59.                     'referenceId': 2101,
  60.                     'referenceStatus': '',
  61.                     'eventType': 'ERROR_STATUS_CHANGE',
  62.                     'eventTypeText': 'Zmiana statusu błędu',
  63.                 }, {
  64.                     'id': 2539,
  65.                     'createDate': '2019-07-22T12:01:52',
  66.                     'userId': 2000,
  67.                     'userLogin': 'aglobalny1@adres.pl',
  68.                     'userFirstName': 'Admin',
  69.                     'userLastName': 'Globalny',
  70.                     'userSystem': 'System dla pracownika NDAP',
  71.                     'referenceType': 'ERROR',
  72.                     'referenceId': 2101,
  73.                     'referenceStatus': '',
  74.                     'eventType': 'ERROR_VERIFY_BY_GLOBAL_ADMIN',
  75.                     'details': '1\n\n2\n\n3',
  76.                     'eventTypeText': 'Weryfikacja naprawy błędu przez Administratora Globalnego',
  77.                 }, {
  78.                     'id': 2538,
  79.                     'createDate': '2019-07-22T12:01:28',
  80.                     'userId': 2000,
  81.                     'userLogin': 'aglobalny1@adres.pl',
  82.                     'userFirstName': 'Admin',
  83.                     'userLastName': 'Globalny',
  84.                     'userSystem': 'System dla pracownika NDAP',
  85.                     'referenceType': 'ERROR',
  86.                     'referenceId': 2101,
  87.                     'referenceStatus': '',
  88.                     'eventType': 'ERROR_STATUS_CHANGE',
  89.                     'details': '23123\n213\n213\n\n1\n\n\n\n231123',
  90.                     'eventTypeText': 'Zmiana statusu błędu',
  91.                 }, {
  92.                     'id': 2537,
  93.                     'createDate': '2019-07-22T12:01:21',
  94.                     'userId': 2000,
  95.                     'userLogin': 'aglobalny1@adres.pl',
  96.                     'userFirstName': 'Admin',
  97.                     'userLastName': 'Globalny',
  98.                     'userSystem': 'System dla pracownika NDAP',
  99.                     'referenceType': 'ERROR',
  100.                     'referenceId': 2101,
  101.                     'referenceStatus': '',
  102.                     'eventType': 'ERROR_STATUS_CHANGE',
  103.                     'eventTypeText': 'Zmiana statusu błędu',
  104.                 }, {
  105.                     'id': 2536,
  106.                     'createDate': '2019-07-22T12:01:18',
  107.                     'userId': 2000,
  108.                     'userLogin': 'aglobalny1@adres.pl',
  109.                     'userFirstName': 'Admin',
  110.                     'userLastName': 'Globalny',
  111.                     'userSystem': 'System dla pracownika NDAP',
  112.                     'referenceType': 'ERROR',
  113.                     'referenceId': 2101,
  114.                     'referenceStatus': '',
  115.                     'eventType': 'ERROR_VERIFY_BY_GLOBAL_ADMIN',
  116.                     'details': '213\n13\n123\n\n123\n1\n132',
  117.                     'eventTypeText': 'Weryfikacja naprawy błędu przez Administratora Globalnego',
  118.                 }, {
  119.                     'id': 2535,
  120.                     'createDate': '2019-07-22T11:45:53',
  121.                     'userId': 2000,
  122.                     'userLogin': 'aglobalny1@adres.pl',
  123.                     'userFirstName': 'Admin',
  124.                     'userLastName': 'Globalny',
  125.                     'userSystem': 'System dla pracownika NDAP',
  126.                     'referenceType': 'ERROR',
  127.                     'referenceId': 2101,
  128.                     'referenceStatus': '',
  129.                     'eventType': 'ERROR_STATUS_CHANGE',
  130.                     'details': '{"comment":"1231\\n12\\n3\\n13\\n\\n13\\n13"}',
  131.                     'eventTypeText': 'Zmiana statusu błędu',
  132.                 }, {
  133.                     'id': 2494,
  134.                     'createDate': '2019-07-19T09:48:57',
  135.                     'userId': 2000,
  136.                     'userLogin': 'aglobalny1@adres.pl',
  137.                     'userFirstName': 'Admin',
  138.                     'userLastName': 'Globalny',
  139.                     'userSystem': 'System dla pracownika NDAP',
  140.                     'referenceType': 'ERROR',
  141.                     'referenceId': 2101,
  142.                     'referenceStatus': '',
  143.                     'eventType': 'ERROR_STATUS_CHANGE',
  144.                     'eventTypeText': 'Zmiana statusu błędu',
  145.                 }, {
  146.                     'id': 2493,
  147.                     'createDate': '2019-07-19T09:48:55',
  148.                     'userId': 2000,
  149.                     'userLogin': 'aglobalny1@adres.pl',
  150.                     'userFirstName': 'Admin',
  151.                     'userLastName': 'Globalny',
  152.                     'userSystem': 'System dla pracownika NDAP',
  153.                     'referenceType': 'ERROR',
  154.                     'referenceId': 2101,
  155.                     'referenceStatus': '',
  156.                     'eventType': 'ERROR_VERIFY_BY_GLOBAL_ADMIN',
  157.                     'details': '321312312',
  158.                     'eventTypeText': 'Weryfikacja naprawy błędu przez Administratora Globalnego',
  159.                 }, {
  160.                     'id': 2492,
  161.                     'createDate': '2019-07-19T09:47:46',
  162.                     'userId': 2000,
  163.                     'userLogin': 'aglobalny1@adres.pl',
  164.                     'userFirstName': 'Admin',
  165.                     'userLastName': 'Globalny',
  166.                     'userSystem': 'System dla pracownika NDAP',
  167.                     'referenceType': 'ERROR',
  168.                     'referenceId': 2101,
  169.                     'referenceStatus': '',
  170.                     'eventType': 'ERROR_STATUS_CHANGE',
  171.                     'details': '{"comment":"213\\n\\n12\\n\\n231\\n123\\n31\\n2\\n\\n"}',
  172.                     'eventTypeText': 'Zmiana statusu błędu',
  173.                 },
  174.             ],
  175.             'totalElements': 24,
  176.         };
  177.  
  178.         const reportData = {
  179.             generatedBy: 'Jan Kowalski',
  180.             assignee: 'John Smith',
  181.         };
  182.        
  183.         errorReport(error, history, reportData).then( doc => {
  184.             if (false) {
  185.                 doc.save('primi.pdf');
  186.             } else {
  187.                 document.getElementById('output').data = doc.output('datauristring');
  188.             }
  189.         });
  190.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement