From 4fa9bac73c2a1ffe2ca86832d80001f5b2acd2b5 Mon Sep 17 00:00:00 2001 From: Daeng Deni Mardaeni Date: Sun, 3 Nov 2024 08:16:07 +0700 Subject: [PATCH] Add pdfobject and laravel-dompdf dependencies Added `pdfobject` to npm dependencies and `barryvdh/laravel-dompdf` to composer dependencies. Corrected import order in `app.js` and streamlined dependency imports. --- composer.json | 5 +++-- package.json | 1 + resources/js/app.js | 11 ++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index e624d0b..7048874 100644 --- a/composer.json +++ b/composer.json @@ -6,13 +6,14 @@ "license": "MIT", "require": { "php": "^8.2", + "barryvdh/laravel-dompdf": "^3.0", "daengdeni/authentication-module": "dev-master", + "daengdeni/basicdata-module": "dev-master", "daengdeni/laravel-id-generator": "^1.0", "daengdeni/location-module": "dev-master", "daengdeni/logs-module": "dev-master", - "daengdeni/basicdata-module": "dev-master", - "daengdeni/usermanagement-module": "dev-master", "daengdeni/lpj-module": "dev-staging", + "daengdeni/usermanagement-module": "dev-master", "diglactic/laravel-breadcrumbs": "^9.0", "joshbrw/laravel-module-installer": "^2.0", "laravel/framework": "^11.9", diff --git a/package.json b/package.json index 9ed914b..9e7a1b0 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "jquery": "^3.7.1", "mini-svg-data-uri": "^1.4.4", "notie": "^4.3.1", + "pdfobject": "^2.3.0", "sweetalert2": "^11.14.3", "toastr": "^2.1.4", "tom-select": "^2.3.1" diff --git a/resources/js/app.js b/resources/js/app.js index 75753c5..55681c3 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -1,19 +1,18 @@ import "./bootstrap"; - import "../metronic/core/index"; import "../metronic/app/layouts/base.js"; - import $ from "jquery"; +import Swal from "sweetalert2"; +import TomSelect from "tom-select"; +import toast from "toastr"; +import "toastr/build/toastr.css"; window.jQuery = $; window.$ = $; -import Swal from "sweetalert2"; window.Swal = Swal; window.swal = Swal; -import TomSelect from "tom-select"; - document.querySelectorAll(".tomselect").forEach((el) => { let settings = { plugins: ["dropdown_input"], @@ -25,9 +24,7 @@ document.querySelectorAll(".tomselect").forEach((el) => { new TomSelect(el, settings); }); -import toast from "toastr"; window.toast = toast; -import "toastr/build/toastr.css"; document.querySelectorAll(".toastr").forEach((el) => { toast.options = {