Skip to content

Commit

Permalink
IP-306: Create a new .js file for the page that will declare the Vue …
Browse files Browse the repository at this point in the history
…component.
  • Loading branch information
papandrk committed Nov 27, 2024
1 parent 76f8d00 commit d7df06a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
23 changes: 23 additions & 0 deletions resources/assets/js/project/manage-project-problem-solutions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import SolutionsManagement from "../vue-components/backoffice/management/solution/SolutionsManagement.vue";
import { createApp } from "vue";
import store from "../store/store";
import DOMPurify from "dompurify";

const app = createApp({
components: {
SolutionsManagement,
},
});

// Register the "sane-html" directive globally
app.directive("sane-html", {
updated(el, binding) {
el.innerHTML = DOMPurify.sanitize(binding.value);
},
mounted(el, binding) {
el.innerHTML = DOMPurify.sanitize(binding.value);
},
});

app.use(store);
app.mount("#app");
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
</div>
</div>

<problems-management></problems-management>
<solutions-management></solutions-management>
@endsection
@push('scripts')
@vite('resources/assets/js/project/manage-project-problems.js')
@vite('resources/assets/js/project/manage-project-problem-solutions.js')
@endpush
1 change: 1 addition & 0 deletions vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export default defineConfig({
"resources/assets/js/project/landing-page.js",
"resources/assets/js/project/manage-project.js",
"resources/assets/js/project/manage-project-problems.js",
"resources/assets/js/project/manage-project-problem-solutions.js",
"resources/assets/js/questionnaire/manage-questionnaires.js",
"resources/assets/js/questionnaire/my-questionnaire-responses.js",
"resources/assets/js/questionnaire/questionnaire-create-edit.js",
Expand Down

0 comments on commit d7df06a

Please sign in to comment.