@hitsoft/e-donusum 1.0.72 → 1.0.74
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 +10 -5
- package/fesm2015/hitsoft-e-donusum.mjs +18 -12
- package/fesm2015/hitsoft-e-donusum.mjs.map +1 -1
- package/fesm2020/hitsoft-e-donusum.mjs +18 -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
|
@@ -3,10 +3,15 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
export class HitSharedService {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.apiName = 'eDonusum';
|
|
6
|
-
this.previewFile = (
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
this.previewFile = (base64) => {
|
|
7
|
+
const cleanBase64 = base64.includes(',') ? base64.split(',')[1] : base64;
|
|
8
|
+
const bytes = Uint8Array.from(atob(cleanBase64), c => c.charCodeAt(0));
|
|
9
|
+
const blob = new Blob([bytes], { type: 'application/pdf' });
|
|
10
|
+
const url = URL.createObjectURL(blob);
|
|
11
|
+
// Yeni tab (preview)
|
|
12
|
+
window.open(url, '_blank', 'noopener');
|
|
13
|
+
// İstersen kısa süre sonra URL'i serbest bırak (preview açıldıktan sonra)
|
|
14
|
+
setTimeout(() => URL.revokeObjectURL(url), 60000);
|
|
10
15
|
};
|
|
11
16
|
}
|
|
12
17
|
}
|
|
@@ -18,4 +23,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
18
23
|
providedIn: 'root',
|
|
19
24
|
}]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QpLCBjID0+IGMuY2hhckNvZGVBdCgwKSk7XHJcbiAgICAgICAgY29uc3QgYmxvYiA9IG5ldyBCbG9iKFtieXRlc10sIHsgdHlwZTogJ2FwcGxpY2F0aW9uL3BkZicgfSk7XHJcblxyXG4gICAgICAgIGNvbnN0IHVybCA9IFVSTC5jcmVhdGVPYmplY3RVUkwoYmxvYik7XHJcblxyXG4gICAgICAgIC8vIFllbmkgdGFiIChwcmV2aWV3KVxyXG4gICAgICAgIHdpbmRvdy5vcGVuKHVybCwgJ19ibGFuaycsICdub29wZW5lcicpO1xyXG5cclxuICAgICAgICAvLyDEsHN0ZXJzZW4ga8Sxc2Egc8O8cmUgc29ucmEgVVJMJ2kgc2VyYmVzdCBixLFyYWsgKHByZXZpZXcgYcOnxLFsZMSxa3RhbiBzb25yYSlcclxuICAgICAgICBzZXRUaW1lb3V0KCgpID0+IFVSTC5yZXZva2VPYmplY3RVUkwodXJsKSwgNjBfMDAwKTtcclxuICAgIH1cclxufVxyXG4iXX0=
|
|
@@ -9166,10 +9166,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
9166
9166
|
class HitSharedService {
|
|
9167
9167
|
constructor() {
|
|
9168
9168
|
this.apiName = 'eDonusum';
|
|
9169
|
-
this.previewFile = (
|
|
9170
|
-
const
|
|
9171
|
-
|
|
9172
|
-
|
|
9169
|
+
this.previewFile = (base64) => {
|
|
9170
|
+
const cleanBase64 = base64.includes(',') ? base64.split(',')[1] : base64;
|
|
9171
|
+
const bytes = Uint8Array.from(atob(cleanBase64), c => c.charCodeAt(0));
|
|
9172
|
+
const blob = new Blob([bytes], { type: 'application/pdf' });
|
|
9173
|
+
const url = URL.createObjectURL(blob);
|
|
9174
|
+
// Yeni tab (preview)
|
|
9175
|
+
window.open(url, '_blank', 'noopener');
|
|
9176
|
+
// İstersen kısa süre sonra URL'i serbest bırak (preview açıldıktan sonra)
|
|
9177
|
+
setTimeout(() => URL.revokeObjectURL(url), 60000);
|
|
9173
9178
|
};
|
|
9174
9179
|
}
|
|
9175
9180
|
}
|
|
@@ -9361,6 +9366,7 @@ class HitInvoiceComponent {
|
|
|
9361
9366
|
getInvoiceView(record) {
|
|
9362
9367
|
this.invoiceService.getInvoiceView(record.uuId).subscribe(item => {
|
|
9363
9368
|
const source = `data:${item.mimeType};base64,${item.content}`;
|
|
9369
|
+
this.hitSharedService.previewFile(item.content);
|
|
9364
9370
|
const link = document.createElement('a');
|
|
9365
9371
|
link.href = source;
|
|
9366
9372
|
link.download = `${item.filename}`;
|
|
@@ -9375,7 +9381,7 @@ class HitInvoiceComponent {
|
|
|
9375
9381
|
debugger;
|
|
9376
9382
|
this.invoiceService.getInvoicePreview(record.id, record.resourceDocType).subscribe(fatura => {
|
|
9377
9383
|
const source = `data:text/html;base64,${fatura.previewHTML}`;
|
|
9378
|
-
this.hitSharedService.previewFile(fatura.
|
|
9384
|
+
this.hitSharedService.previewFile(fatura.previewHTML);
|
|
9379
9385
|
/* const newTab = window.open();
|
|
9380
9386
|
newTab.document.title = record.id
|
|
9381
9387
|
newTab.document.body.innerHTML = `<iframe src="${source}" width="100%" height="100%" style="border:none;"></iframe>`;
|
|
@@ -9386,7 +9392,7 @@ class HitInvoiceComponent {
|
|
|
9386
9392
|
debugger;
|
|
9387
9393
|
this.invoiceService.getXMLPreview(record.id, record.resourceDocType).subscribe(fatura => {
|
|
9388
9394
|
const source = `data:${fatura.mimeType};base64,${fatura.content}`;
|
|
9389
|
-
this.hitSharedService.previewFile(fatura.
|
|
9395
|
+
this.hitSharedService.previewFile(fatura.content);
|
|
9390
9396
|
/*const link = document.createElement('a');
|
|
9391
9397
|
link.href = source;
|
|
9392
9398
|
link.download = `${fatura.filename}`;
|
|
@@ -9418,7 +9424,7 @@ class HitInvoiceComponent {
|
|
|
9418
9424
|
DownloadFile(record) {
|
|
9419
9425
|
this.invoiceService.downloadFileById(record.contentMasterId).subscribe(item => {
|
|
9420
9426
|
const source = `data:${item.mimeType};base64,${item.content}`;
|
|
9421
|
-
this.hitSharedService.previewFile(item.
|
|
9427
|
+
this.hitSharedService.previewFile(item.content);
|
|
9422
9428
|
/*const link = document.createElement('a');
|
|
9423
9429
|
link.href = source;
|
|
9424
9430
|
link.download = `${item.filename}`;
|
|
@@ -10253,7 +10259,7 @@ class HitInboundInvoiceComponent {
|
|
|
10253
10259
|
debugger;
|
|
10254
10260
|
this.service.getInboundInvoiceView(record.uuId).subscribe(item => {
|
|
10255
10261
|
const source = `data:${item.mimeType};base64,${item.content}`;
|
|
10256
|
-
this.hitSharedService.previewFile(item.
|
|
10262
|
+
this.hitSharedService.previewFile(item.content);
|
|
10257
10263
|
/*const link = document.createElement('a');
|
|
10258
10264
|
link.href = source;
|
|
10259
10265
|
link.download = `${item.filename}`;
|
|
@@ -11141,7 +11147,7 @@ class HitDespatchComponent {
|
|
|
11141
11147
|
debugger;
|
|
11142
11148
|
this.service.getDespatchPreview(record.id, record.resourceDocType).subscribe(fatura => {
|
|
11143
11149
|
const source = `data:text/html;base64,${fatura.previewHTML}`;
|
|
11144
|
-
this.hitSharedService.previewFile(
|
|
11150
|
+
this.hitSharedService.previewFile(fatura.previewHTML);
|
|
11145
11151
|
/*const newTab = window.open();
|
|
11146
11152
|
newTab.document.title = record.id
|
|
11147
11153
|
newTab.document.body.innerHTML = `<iframe src="${source}" width="100%" height="100%" style="border:none;"></iframe>`;
|
|
@@ -11152,7 +11158,7 @@ class HitDespatchComponent {
|
|
|
11152
11158
|
debugger;
|
|
11153
11159
|
this.service.getDespatchXML(record.id, record.resourceDocType).subscribe(irsaliye => {
|
|
11154
11160
|
const source = `data:${irsaliye.mimeType};base64,${irsaliye.content}`;
|
|
11155
|
-
this.hitSharedService.previewFile(irsaliye.
|
|
11161
|
+
this.hitSharedService.previewFile(irsaliye.content);
|
|
11156
11162
|
/*const link = document.createElement('a');
|
|
11157
11163
|
link.href = source;
|
|
11158
11164
|
link.download = `${irsaliye.filename}`;
|
|
@@ -11180,7 +11186,7 @@ class HitDespatchComponent {
|
|
|
11180
11186
|
getDespatchView(record) {
|
|
11181
11187
|
this.service.getDespatchView(record.uuId).subscribe(item => {
|
|
11182
11188
|
const source = `data:${item.mimeType};base64,${item.content}`;
|
|
11183
|
-
this.hitSharedService.previewFile(item.
|
|
11189
|
+
this.hitSharedService.previewFile(item.content);
|
|
11184
11190
|
/*const link = document.createElement('a');
|
|
11185
11191
|
link.href = source;
|
|
11186
11192
|
link.download = `${item.filename}`;
|
|
@@ -11256,7 +11262,7 @@ class HitDespatchComponent {
|
|
|
11256
11262
|
debugger;
|
|
11257
11263
|
this.service.getReceiptAdvicePreview(record.id).subscribe(despatch => {
|
|
11258
11264
|
const source = `data:text/html;base64,${despatch.previewHTML}`;
|
|
11259
|
-
this.hitSharedService.previewFile(
|
|
11265
|
+
this.hitSharedService.previewFile(despatch.previewHTML);
|
|
11260
11266
|
/* const newTab = window.open();
|
|
11261
11267
|
newTab.document.title = record.id
|
|
11262
11268
|
newTab.document.body.innerHTML = `<iframe src="${source}" width="100%" height="100%" style="border:none;"></iframe>`;
|