ebta-workflow-prod 4.0.11 → 4.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ebta-workflow-prod",
3
3
  "private": false,
4
- "version": "4.0.11",
4
+ "version": "4.0.12",
5
5
  "description": "",
6
6
  "license": "UNLICENSED",
7
7
  "author": "",
@@ -571,18 +571,19 @@ export default class PDFMapGeneratorActivity implements IActivityHandler {
571
571
  const revField = form.getTextField('Rev.' + i)
572
572
  revField.setText(inputs.Rev)
573
573
  revField.updateAppearances(font)
574
- if (inputs.template=='VMP'){
575
- //supervisor
576
- const supervisorField = form.getTextField('Supervisor')
577
- supervisorField.setText(inputs.extraField['supervisor'])
578
- supervisorField.setAlignment(TextAlignment.Center)
579
- supervisorField.updateAppearances(font)
580
- //UHF
581
- const uhfField = form.getTextField('UHF')
582
- uhfField.setText(inputs.extraField['UHF'])
583
- uhfField.setAlignment(TextAlignment.Center)
584
- uhfField.updateAppearances(font)
585
- }
574
+ if (inputs.template == 'VMP') {
575
+ //supervisor
576
+ const supervisorField = form.getTextField('Supervisor')
577
+ supervisorField.setText(inputs.extraField['supervisor'])
578
+ supervisorField.setAlignment(TextAlignment.Center)
579
+ supervisorField.updateAppearances(font)
580
+ //UHF
581
+ const uhfField = form.getTextField('UHF')
582
+ uhfField.setText(inputs.extraField['UHF'])
583
+ uhfField.setAlignment(TextAlignment.Center)
584
+ uhfField.updateAppearances(font)
585
+ console.log('VMP text inserted successful')
586
+ }
586
587
  //date
587
588
  const today = new Date();
588
589
  const formattedDate = today.toLocaleDateString('en-AU');
@@ -611,23 +612,23 @@ export default class PDFMapGeneratorActivity implements IActivityHandler {
611
612
  }
612
613
  }
613
614
  console.log('Text Fields removal successful')
614
-
615
-
616
615
  const boldFont = await doc.embedFont(StandardFonts.HelveticaBold);
617
-
616
+ console.log('bold font embed successful')
618
617
  if (inputs.template == 'VMP') {
618
+ console.log('start to put text1 in VMP')
619
619
  newPage.drawText('Maximum Speed 10KM/h within Work Area', {
620
- x: (28+150),
620
+ x: (28 + 150),
621
621
  y: 145,
622
622
  size: 10.5,
623
- color: rgb(255, 255, 255), // White color
623
+ color: rgb(1, 1, 1), // White color, IGNORE VSCODE COLOR
624
624
  font: font,
625
625
  });
626
+ console.log('start to put text2 in VMP')
626
627
  newPage.drawText('Maximum Speed 10KM/h within Work Area', {
627
- x: (28+151),
628
+ x: (28 + 151),
628
629
  y: 145,
629
630
  size: 10,
630
- color: rgb(255, 0, 0), // red color
631
+ color: rgb(1, 0, 0), // red color, IGNORE VSCODE COLOR
631
632
  font: boldFont,
632
633
  });
633
634
  console.log('speed limit text inserted')
@@ -647,12 +648,12 @@ export default class PDFMapGeneratorActivity implements IActivityHandler {
647
648
  width: buttonW,
648
649
  height: buttonH,
649
650
  });
650
-
651
+
651
652
  newPage.drawText('Go to EBTA GIS', {
652
653
  x: buttonX + 5,
653
654
  y: buttonY + 22,
654
655
  size: 10,
655
- color: rgb(1, 1, 1), // White color
656
+ color: rgb(1, 1, 1), // White color, VS CODE COLOR PICKER IS WRONG
656
657
  font: boldFont,
657
658
  });
658
659