@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
|
@@ -3,10 +3,16 @@ 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 byteCharacters = atob(base64);
|
|
8
|
+
const byteNumbers = new Array(byteCharacters.length);
|
|
9
|
+
for (let i = 0; i < byteCharacters.length; i++) {
|
|
10
|
+
byteNumbers[i] = byteCharacters.charCodeAt(i);
|
|
11
|
+
}
|
|
12
|
+
const byteArray = new Uint8Array(byteNumbers);
|
|
13
|
+
const blob = new Blob([byteArray], { type: 'application/pdf' });
|
|
14
|
+
const url = URL.createObjectURL(blob);
|
|
15
|
+
window.open(url);
|
|
10
16
|
};
|
|
11
17
|
}
|
|
12
18
|
}
|
|
@@ -18,4 +24,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
18
24
|
providedIn: 'root',
|
|
19
25
|
}]
|
|
20
26
|
}] });
|
|
21
|
-
//# sourceMappingURL=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G4gICAgICAgIGNvbnN0IGJ5dGVBcnJheSA9IG5ldyBVaW50OEFycmF5KGJ5dGVOdW1iZXJzKTtcclxuICAgICAgICBjb25zdCBibG9iID0gbmV3IEJsb2IoW2J5dGVBcnJheV0sIHsgdHlwZTogJ2FwcGxpY2F0aW9uL3BkZicgfSk7XHJcblxyXG4gICAgICAgIGNvbnN0IHVybCA9IFVSTC5jcmVhdGVPYmplY3RVUkwoYmxvYik7XHJcblxyXG4gICAgICAgIHdpbmRvdy5vcGVuKHVybCk7IFxyXG4gICAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -9166,10 +9166,16 @@ 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 byteCharacters = atob(base64);
|
|
9171
|
+
const byteNumbers = new Array(byteCharacters.length);
|
|
9172
|
+
for (let i = 0; i < byteCharacters.length; i++) {
|
|
9173
|
+
byteNumbers[i] = byteCharacters.charCodeAt(i);
|
|
9174
|
+
}
|
|
9175
|
+
const byteArray = new Uint8Array(byteNumbers);
|
|
9176
|
+
const blob = new Blob([byteArray], { type: 'application/pdf' });
|
|
9177
|
+
const url = URL.createObjectURL(blob);
|
|
9178
|
+
window.open(url);
|
|
9173
9179
|
};
|
|
9174
9180
|
}
|
|
9175
9181
|
}
|
|
@@ -9361,6 +9367,7 @@ class HitInvoiceComponent {
|
|
|
9361
9367
|
getInvoiceView(record) {
|
|
9362
9368
|
this.invoiceService.getInvoiceView(record.uuId).subscribe(item => {
|
|
9363
9369
|
const source = `data:${item.mimeType};base64,${item.content}`;
|
|
9370
|
+
this.hitSharedService.previewFile(item.content);
|
|
9364
9371
|
const link = document.createElement('a');
|
|
9365
9372
|
link.href = source;
|
|
9366
9373
|
link.download = `${item.filename}`;
|
|
@@ -9375,7 +9382,7 @@ class HitInvoiceComponent {
|
|
|
9375
9382
|
debugger;
|
|
9376
9383
|
this.invoiceService.getInvoicePreview(record.id, record.resourceDocType).subscribe(fatura => {
|
|
9377
9384
|
const source = `data:text/html;base64,${fatura.previewHTML}`;
|
|
9378
|
-
this.hitSharedService.previewFile(fatura.
|
|
9385
|
+
this.hitSharedService.previewFile(fatura.previewHTML);
|
|
9379
9386
|
/* const newTab = window.open();
|
|
9380
9387
|
newTab.document.title = record.id
|
|
9381
9388
|
newTab.document.body.innerHTML = `<iframe src="${source}" width="100%" height="100%" style="border:none;"></iframe>`;
|
|
@@ -9386,7 +9393,7 @@ class HitInvoiceComponent {
|
|
|
9386
9393
|
debugger;
|
|
9387
9394
|
this.invoiceService.getXMLPreview(record.id, record.resourceDocType).subscribe(fatura => {
|
|
9388
9395
|
const source = `data:${fatura.mimeType};base64,${fatura.content}`;
|
|
9389
|
-
this.hitSharedService.previewFile(fatura.
|
|
9396
|
+
this.hitSharedService.previewFile(fatura.content);
|
|
9390
9397
|
/*const link = document.createElement('a');
|
|
9391
9398
|
link.href = source;
|
|
9392
9399
|
link.download = `${fatura.filename}`;
|
|
@@ -9418,7 +9425,7 @@ class HitInvoiceComponent {
|
|
|
9418
9425
|
DownloadFile(record) {
|
|
9419
9426
|
this.invoiceService.downloadFileById(record.contentMasterId).subscribe(item => {
|
|
9420
9427
|
const source = `data:${item.mimeType};base64,${item.content}`;
|
|
9421
|
-
this.hitSharedService.previewFile(item.
|
|
9428
|
+
this.hitSharedService.previewFile(item.content);
|
|
9422
9429
|
/*const link = document.createElement('a');
|
|
9423
9430
|
link.href = source;
|
|
9424
9431
|
link.download = `${item.filename}`;
|
|
@@ -10253,7 +10260,7 @@ class HitInboundInvoiceComponent {
|
|
|
10253
10260
|
debugger;
|
|
10254
10261
|
this.service.getInboundInvoiceView(record.uuId).subscribe(item => {
|
|
10255
10262
|
const source = `data:${item.mimeType};base64,${item.content}`;
|
|
10256
|
-
this.hitSharedService.previewFile(item.
|
|
10263
|
+
this.hitSharedService.previewFile(item.content);
|
|
10257
10264
|
/*const link = document.createElement('a');
|
|
10258
10265
|
link.href = source;
|
|
10259
10266
|
link.download = `${item.filename}`;
|
|
@@ -11141,7 +11148,7 @@ class HitDespatchComponent {
|
|
|
11141
11148
|
debugger;
|
|
11142
11149
|
this.service.getDespatchPreview(record.id, record.resourceDocType).subscribe(fatura => {
|
|
11143
11150
|
const source = `data:text/html;base64,${fatura.previewHTML}`;
|
|
11144
|
-
this.hitSharedService.previewFile(
|
|
11151
|
+
this.hitSharedService.previewFile(fatura.previewHTML);
|
|
11145
11152
|
/*const newTab = window.open();
|
|
11146
11153
|
newTab.document.title = record.id
|
|
11147
11154
|
newTab.document.body.innerHTML = `<iframe src="${source}" width="100%" height="100%" style="border:none;"></iframe>`;
|
|
@@ -11152,7 +11159,7 @@ class HitDespatchComponent {
|
|
|
11152
11159
|
debugger;
|
|
11153
11160
|
this.service.getDespatchXML(record.id, record.resourceDocType).subscribe(irsaliye => {
|
|
11154
11161
|
const source = `data:${irsaliye.mimeType};base64,${irsaliye.content}`;
|
|
11155
|
-
this.hitSharedService.previewFile(irsaliye.
|
|
11162
|
+
this.hitSharedService.previewFile(irsaliye.content);
|
|
11156
11163
|
/*const link = document.createElement('a');
|
|
11157
11164
|
link.href = source;
|
|
11158
11165
|
link.download = `${irsaliye.filename}`;
|
|
@@ -11180,7 +11187,7 @@ class HitDespatchComponent {
|
|
|
11180
11187
|
getDespatchView(record) {
|
|
11181
11188
|
this.service.getDespatchView(record.uuId).subscribe(item => {
|
|
11182
11189
|
const source = `data:${item.mimeType};base64,${item.content}`;
|
|
11183
|
-
this.hitSharedService.previewFile(item.
|
|
11190
|
+
this.hitSharedService.previewFile(item.content);
|
|
11184
11191
|
/*const link = document.createElement('a');
|
|
11185
11192
|
link.href = source;
|
|
11186
11193
|
link.download = `${item.filename}`;
|
|
@@ -11256,7 +11263,7 @@ class HitDespatchComponent {
|
|
|
11256
11263
|
debugger;
|
|
11257
11264
|
this.service.getReceiptAdvicePreview(record.id).subscribe(despatch => {
|
|
11258
11265
|
const source = `data:text/html;base64,${despatch.previewHTML}`;
|
|
11259
|
-
this.hitSharedService.previewFile(
|
|
11266
|
+
this.hitSharedService.previewFile(despatch.previewHTML);
|
|
11260
11267
|
/* const newTab = window.open();
|
|
11261
11268
|
newTab.document.title = record.id
|
|
11262
11269
|
newTab.document.body.innerHTML = `<iframe src="${source}" width="100%" height="100%" style="border:none;"></iframe>`;
|