From f8eec04a537a618d2137dc50c36352a856974766 Mon Sep 17 00:00:00 2001 From: petersutter Date: Wed, 11 Dec 2024 17:00:01 +0100 Subject: [PATCH] fix value access of ref --- frontend/src/composables/useProjectContext.js | 4 ++-- frontend/src/views/GAdministration.vue | 4 ++-- frontend/src/views/GProjectList.vue | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/composables/useProjectContext.js b/frontend/src/composables/useProjectContext.js index 72089fa428..905aac0d21 100644 --- a/frontend/src/composables/useProjectContext.js +++ b/frontend/src/composables/useProjectContext.js @@ -62,9 +62,9 @@ export function createProjectContextComposable (options = {}) { function createProjectManifest () { manifest.value = {} - if (openMFP.accountId) { + if (openMFP.accountId.value) { set(manifest.value, ['metadata', 'label', 'openmfp.org/managed-by'], 'true') - set(manifest.value, ['metadata', 'annotations', 'openmfp.org/account-id'], openMFP.accountId) + set(manifest.value, ['metadata', 'annotations', 'openmfp.org/account-id'], openMFP.accountId.value) } initialManifest.value = cloneDeep(normalizedManifest.value) } diff --git a/frontend/src/views/GAdministration.vue b/frontend/src/views/GAdministration.vue index e7c9aff86c..160acd6ea9 100644 --- a/frontend/src/views/GAdministration.vue +++ b/frontend/src/views/GAdministration.vue @@ -651,9 +651,9 @@ async function updateProperty (key, value, options = {}) { metadata: { name }, spec: { namespace }, } - if (openMFP.accountId && !get(projectStore.project, ['metadata', 'annotations', 'openmfp.org/account-id'])) { + if (openMFP.accountId.value && !get(projectStore.project, ['metadata', 'annotations', 'openmfp.org/account-id'])) { set(mergePatchDocument, ['metadata', 'labels', 'openmfp.org/managed-by'], 'true') - set(mergePatchDocument, ['metadata', 'annotations', 'openmfp.org/account-id'], openMFP.accountId) + set(mergePatchDocument, ['metadata', 'annotations', 'openmfp.org/account-id'], openMFP.accountId.value) } set(mergePatchDocument, ['spec', key], value) await projectStore.patchProject(mergePatchDocument) diff --git a/frontend/src/views/GProjectList.vue b/frontend/src/views/GProjectList.vue index c45d2bbb6b..5280d00887 100644 --- a/frontend/src/views/GProjectList.vue +++ b/frontend/src/views/GProjectList.vue @@ -153,8 +153,8 @@ const canCreateProject = toRef(authzStore, 'canCreateProject') const projectDialog = ref(false) const projectList = computed(() => { - const belongsToAccount = project => openMFP.accountId === get(project, ['metadata', 'annotations', 'openmfp.org/account-id']) - return !openMFP.accountId + const belongsToAccount = project => openMFP.accountId.value === get(project, ['metadata', 'annotations', 'openmfp.org/account-id']) + return !openMFP.accountId.value ? projectStore.projectList : filter(projectStore.projectList, belongsToAccount) })