@hitsoft/e-donusum 1.0.72 → 1.0.73
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/esm2020/lib/components/hit-despatches/hit-despatch.component.mjs +5 -5
- package/esm2020/lib/components/hit-inbound-invoices/hit-inbound-invoice.component.mjs +2 -2
- package/esm2020/lib/components/hit-invoices/hit-invoice.component.mjs +5 -4
- package/esm2020/lib/hit-proxy/shared/hit-shared.service.mjs +11 -5
- package/fesm2015/hitsoft-e-donusum.mjs +19 -12
- package/fesm2015/hitsoft-e-donusum.mjs.map +1 -1
- package/fesm2020/hitsoft-e-donusum.mjs +19 -12
- package/fesm2020/hitsoft-e-donusum.mjs.map +1 -1
- package/lib/hit-proxy/shared/hit-shared.service.d.ts +1 -1
- package/package.json +1 -1
|
@@ -9308,10 +9308,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
9308
9308
|
class HitSharedService {
|
|
9309
9309
|
constructor() {
|
|
9310
9310
|
this.apiName = 'eDonusum';
|
|
9311
|
-
this.previewFile = (
|
|
9312
|
-
const
|
|
9313
|
-
|
|
9314
|
-
|
|
9311
|
+
this.previewFile = (base64) => {
|
|
9312
|
+
const byteCharacters = atob(base64);
|
|
9313
|
+
const byteNumbers = new Array(byteCharacters.length);
|
|
9314
|
+
for (let i = 0; i < byteCharacters.length; i++) {
|
|
9315
|
+
byteNumbers[i] = byteCharacters.charCodeAt(i);
|
|
9316
|
+
}
|
|
9317
|
+
const byteArray = new Uint8Array(byteNumbers);
|
|
9318
|
+
const blob = new Blob([byteArray], { type: 'application/pdf' });
|
|
9319
|
+
const url = URL.createObjectURL(blob);
|
|
9320
|
+
window.open(url);
|
|
9315
9321
|
};
|
|
9316
9322
|
}
|
|
9317
9323
|
}
|
|
@@ -9503,6 +9509,7 @@ class HitInvoiceComponent {
|
|
|
9503
9509
|
getInvoiceView(record) {
|
|
9504
9510
|
this.invoiceService.getInvoiceView(record.uuId).subscribe(item => {
|
|
9505
9511
|
const source = `data:${item.mimeType};base64,${item.content}`;
|
|
9512
|
+
this.hitSharedService.previewFile(item.content);
|
|
9506
9513
|
const link = document.createElement('a');
|
|
9507
9514
|
link.href = source;
|
|
9508
9515
|
link.download = `${item.filename}`;
|
|
@@ -9517,7 +9524,7 @@ class HitInvoiceComponent {
|
|
|
9517
9524
|
debugger;
|
|
9518
9525
|
this.invoiceService.getInvoicePreview(record.id, record.resourceDocType).subscribe(fatura => {
|
|
9519
9526
|
const source = `data:text/html;base64,${fatura.previewHTML}`;
|
|
9520
|
-
this.hitSharedService.previewFile(fatura.
|
|
9527
|
+
this.hitSharedService.previewFile(fatura.previewHTML);
|
|
9521
9528
|
/* const newTab = window.open();
|
|
9522
9529
|
newTab.document.title = record.id
|
|
9523
9530
|
newTab.document.body.innerHTML = `<iframe src="${source}" width="100%" height="100%" style="border:none;"></iframe>`;
|
|
@@ -9528,7 +9535,7 @@ class HitInvoiceComponent {
|
|
|
9528
9535
|
debugger;
|
|
9529
9536
|
this.invoiceService.getXMLPreview(record.id, record.resourceDocType).subscribe(fatura => {
|
|
9530
9537
|
const source = `data:${fatura.mimeType};base64,${fatura.content}`;
|
|
9531
|
-
this.hitSharedService.previewFile(fatura.
|
|
9538
|
+
this.hitSharedService.previewFile(fatura.content);
|
|
9532
9539
|
/*const link = document.createElement('a');
|
|
9533
9540
|
link.href = source;
|
|
9534
9541
|
link.download = `${fatura.filename}`;
|
|
@@ -9560,7 +9567,7 @@ class HitInvoiceComponent {
|
|
|
9560
9567
|
DownloadFile(record) {
|
|
9561
9568
|
this.invoiceService.downloadFileById(record.contentMasterId).subscribe(item => {
|
|
9562
9569
|
const source = `data:${item.mimeType};base64,${item.content}`;
|
|
9563
|
-
this.hitSharedService.previewFile(item.
|
|
9570
|
+
this.hitSharedService.previewFile(item.content);
|
|
9564
9571
|
/*const link = document.createElement('a');
|
|
9565
9572
|
link.href = source;
|
|
9566
9573
|
link.download = `${item.filename}`;
|
|
@@ -10392,7 +10399,7 @@ class HitInboundInvoiceComponent {
|
|
|
10392
10399
|
debugger;
|
|
10393
10400
|
this.service.getInboundInvoiceView(record.uuId).subscribe(item => {
|
|
10394
10401
|
const source = `data:${item.mimeType};base64,${item.content}`;
|
|
10395
|
-
this.hitSharedService.previewFile(item.
|
|
10402
|
+
this.hitSharedService.previewFile(item.content);
|
|
10396
10403
|
/*const link = document.createElement('a');
|
|
10397
10404
|
link.href = source;
|
|
10398
10405
|
link.download = `${item.filename}`;
|
|
@@ -11274,7 +11281,7 @@ class HitDespatchComponent {
|
|
|
11274
11281
|
debugger;
|
|
11275
11282
|
this.service.getDespatchPreview(record.id, record.resourceDocType).subscribe(fatura => {
|
|
11276
11283
|
const source = `data:text/html;base64,${fatura.previewHTML}`;
|
|
11277
|
-
this.hitSharedService.previewFile(
|
|
11284
|
+
this.hitSharedService.previewFile(fatura.previewHTML);
|
|
11278
11285
|
/*const newTab = window.open();
|
|
11279
11286
|
newTab.document.title = record.id
|
|
11280
11287
|
newTab.document.body.innerHTML = `<iframe src="${source}" width="100%" height="100%" style="border:none;"></iframe>`;
|
|
@@ -11285,7 +11292,7 @@ class HitDespatchComponent {
|
|
|
11285
11292
|
debugger;
|
|
11286
11293
|
this.service.getDespatchXML(record.id, record.resourceDocType).subscribe(irsaliye => {
|
|
11287
11294
|
const source = `data:${irsaliye.mimeType};base64,${irsaliye.content}`;
|
|
11288
|
-
this.hitSharedService.previewFile(irsaliye.
|
|
11295
|
+
this.hitSharedService.previewFile(irsaliye.content);
|
|
11289
11296
|
/*const link = document.createElement('a');
|
|
11290
11297
|
link.href = source;
|
|
11291
11298
|
link.download = `${irsaliye.filename}`;
|
|
@@ -11313,7 +11320,7 @@ class HitDespatchComponent {
|
|
|
11313
11320
|
getDespatchView(record) {
|
|
11314
11321
|
this.service.getDespatchView(record.uuId).subscribe(item => {
|
|
11315
11322
|
const source = `data:${item.mimeType};base64,${item.content}`;
|
|
11316
|
-
this.hitSharedService.previewFile(item.
|
|
11323
|
+
this.hitSharedService.previewFile(item.content);
|
|
11317
11324
|
/*const link = document.createElement('a');
|
|
11318
11325
|
link.href = source;
|
|
11319
11326
|
link.download = `${item.filename}`;
|
|
@@ -11389,7 +11396,7 @@ class HitDespatchComponent {
|
|
|
11389
11396
|
debugger;
|
|
11390
11397
|
this.service.getReceiptAdvicePreview(record.id).subscribe(despatch => {
|
|
11391
11398
|
const source = `data:text/html;base64,${despatch.previewHTML}`;
|
|
11392
|
-
this.hitSharedService.previewFile(
|
|
11399
|
+
this.hitSharedService.previewFile(despatch.previewHTML);
|
|
11393
11400
|
/* const newTab = window.open();
|
|
11394
11401
|
newTab.document.title = record.id
|
|
11395
11402
|
newTab.document.body.innerHTML = `<iframe src="${source}" width="100%" height="100%" style="border:none;"></iframe>`;
|