1688 PO Automation Project

This commit is contained in:
Dillon Ngo
2025-12-27 17:18:39 +08:00
parent c9c6be56a4
commit aa7f0cd45b
2 changed files with 6 additions and 3 deletions
@@ -164,11 +164,11 @@ export default {
return;
}
if (typeof pdfjsLib === 'undefined') {
await this.loadScript('/js/pdf.js');
pdfjsLib.GlobalWorkerOptions.workerSrc = '/js/pdf.worker.js';
await this.loadScript(window.pdfJsUrl);
pdfjsLib.GlobalWorkerOptions.workerSrc = window.pdfWorkerJsUrl;
}
if (typeof pdf_table_extractor === 'undefined') {
await this.loadScript('/js/pdf-table-extractor.js');
await this.loadScript(window.pdfTableExtractorJsUrl);
}
},
loadScript(src) {
+3
View File
@@ -7,6 +7,9 @@
<!-- End Google Tag Manager -->
<script>
window.LARAVEL_VAPOR_ENABLED = @json(env('LARAVEL_VAPOR_ENABLED', false));
window.pdfJsUrl = "{{ asset('js/pdf.js') }}";
window.pdfWorkerJsUrl = "{{ asset('js/pdf.worker.js') }}";
window.pdfTableExtractorJsUrl = "{{ asset('js/pdf-table-extractor.js') }}";
</script>
<meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
<meta charset="utf-8"/>