From 2bda15d264882b06152870f9e8c49195192cc4a8 Mon Sep 17 00:00:00 2001 From: florianfederspiel Date: Fri, 27 Dec 2024 11:05:59 +0100 Subject: [PATCH] Deprecated Events as non Standard Entity Repaired query Reparied Document Show --- components/EntityEdit.vue | 19 +++++++++-- components/EntityShow.vue | 37 +++++++++++++++------ components/MainNav.vue | 2 +- composables/useRole.js | 12 +++++++ composables/useSupabase.js | 46 ++++++++++++++++++++++++++ stores/data.js | 66 +++++++++++++++++++++++++++++++++----- 6 files changed, 161 insertions(+), 21 deletions(-) diff --git a/components/EntityEdit.vue b/components/EntityEdit.vue index 3f06527..3884fd8 100644 --- a/components/EntityEdit.vue +++ b/components/EntityEdit.vue @@ -32,6 +32,7 @@ defineShortcuts({ const router = useRouter() +const route = useRoute() const dataStore = useDataStore() const profileStore = useProfileStore() const supabase = useSupabaseClient() @@ -64,9 +65,23 @@ const setupCreate = () => { }) } - setupCreate() +const setupQuery = () => { + if(route.query) { + console.log(route.query) + + Object.keys(route.query).forEach(key => { + if(["customer","contract","plant","contact"].includes(key)){ + props.item[key] = Number(route.query[key]) + } else { + props.item[key] = route.query[key] + } + }) + } +} +setupQuery() + const loadedOptions = ref({}) const loadOptions = async () => { let optionsToLoad = dataType.templateColumns.filter(i => i.selectDataType).map(i => { @@ -315,7 +330,7 @@ const contentChanged = (content, datapoint) => {