From aa0e79bcf382653cc51d9ed36ea51aa1024324a7 Mon Sep 17 00:00:00 2001 From: David Whittaker Date: Tue, 19 Dec 2023 15:20:33 -0800 Subject: [PATCH] Conditionally load pro module --- src/dispatch/static/dispatch/src/forms/EditForm.vue | 7 +------ .../static/dispatch/src/forms/table/AttorneyEditForm.vue | 7 +------ src/dispatch/static/dispatch/src/main.js | 6 +++++- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/dispatch/static/dispatch/src/forms/EditForm.vue b/src/dispatch/static/dispatch/src/forms/EditForm.vue index fd748eef5e8c..160857c493c7 100644 --- a/src/dispatch/static/dispatch/src/forms/EditForm.vue +++ b/src/dispatch/static/dispatch/src/forms/EditForm.vue @@ -33,12 +33,7 @@ Exit without saving - + You will lose any changes. Continue? diff --git a/src/dispatch/static/dispatch/src/forms/table/AttorneyEditForm.vue b/src/dispatch/static/dispatch/src/forms/table/AttorneyEditForm.vue index 80165e15b91b..7cb39573a182 100644 --- a/src/dispatch/static/dispatch/src/forms/table/AttorneyEditForm.vue +++ b/src/dispatch/static/dispatch/src/forms/table/AttorneyEditForm.vue @@ -62,12 +62,7 @@ Exit without saving - + You will lose any changes. Continue? diff --git a/src/dispatch/static/dispatch/src/main.js b/src/dispatch/static/dispatch/src/main.js index 9f04b886bf2e..c8e014dd2645 100644 --- a/src/dispatch/static/dispatch/src/main.js +++ b/src/dispatch/static/dispatch/src/main.js @@ -4,7 +4,11 @@ import { vuetifyPlugin } from "./vuetify/" import router from "./router/" import store from "./store" import "@formkit/themes/genesis" -import "@formkit/pro/genesis" +if (import.meta.env.VITE_FORMKIT_PRO_PROJECT_KEY) { + import("@formkit/pro/genesis").then((module) => { + new module() + }) +} import { createProPlugin, inputs } from "@formkit/pro" import { plugin, defaultConfig } from "@formkit/vue"