From b7e0cb3ec22bdeb10d3c78b7eba24af0e43e5685 Mon Sep 17 00:00:00 2001 From: volar Date: Thu, 14 Dec 2023 12:06:37 +0100 Subject: [PATCH] wip --- .../AssetCustomMetadataForm.vue | 20 ++++++++++++++----- .../components/AssetDetailDialogSidebar.vue | 12 ++++++++--- .../distribution/DistributionBlockedBy.vue | 12 ++++++++--- .../DistributionListItemCustom.vue | 12 ++++++++--- .../distribution/DistributionListItemJw.vue | 12 ++++++++--- .../DistributionListItemYoutube.vue | 12 ++++++++--- .../distribution/DistributionNewDialog.vue | 12 ++++++++--- .../DistributionNewDialogCustom.vue | 7 +++++-- .../author/composables/authorConfig.ts | 15 ++++++++++---- ...DistributionCategorySelectOptionSelect.vue | 12 ++++++++--- .../externalProviderAssetListActions.ts | 16 ++++++++++----- .../keyword/composables/keywordConfig.ts | 15 ++++++++++---- 12 files changed, 116 insertions(+), 41 deletions(-) diff --git a/src/components/coreDam/customMetadata/AssetCustomMetadataForm.vue b/src/components/coreDam/customMetadata/AssetCustomMetadataForm.vue index 46823ef1..4dc7418a 100644 --- a/src/components/coreDam/customMetadata/AssetCustomMetadataForm.vue +++ b/src/components/coreDam/customMetadata/AssetCustomMetadataForm.vue @@ -1,7 +1,8 @@ diff --git a/src/views/coreDam/asset/detail/components/AssetDetailDialogSidebar.vue b/src/views/coreDam/asset/detail/components/AssetDetailDialogSidebar.vue index bc1a99c3..70a4aaa2 100644 --- a/src/views/coreDam/asset/detail/components/AssetDetailDialogSidebar.vue +++ b/src/views/coreDam/asset/detail/components/AssetDetailDialogSidebar.vue @@ -2,7 +2,7 @@ import AssetDetailSidebarMetadata from '@/views/coreDam/asset/detail/components/AssetDetailSidebarMetadata.vue' import AssetDetailSidebarROI from '@/views/coreDam/asset/detail/components/AssetDetailSidebarROI.vue' import { AssetDetailTab, useAssetDetailTab } from '@/composables/system/assetDetailTab' -import type { DamAssetStatus, DamAssetType } from '@anzusystems/common-admin' +import { type DamAssetStatus, type DamAssetType, isUndefined } from '@anzusystems/common-admin' import { type AssetFileFailReason, type AssetFileProcessStatus, @@ -20,6 +20,7 @@ import DistributionCategoryWidget from '@/views/coreDam/distributionCategory/com import AssetDetailSidebarImagePreview from '@/views/coreDam/asset/detail/components/AssetDetailSidebarImagePreview.vue' import AssetDetailSidebarVideoShow from '@/views/coreDam/asset/detail/components/videoShow/AssetDetailSidebarVideoShow.vue' import { ACL } from '@/types/Permission' +import { useCurrentExtSystem } from '@/composables/system/currentExtSystem' const props = withDefaults( defineProps<{ @@ -52,10 +53,15 @@ const { t } = useI18n() const { activeTab } = useAssetDetailTab() -const { damConfigExtSystem } = useDamConfigState() +const { getDamConfigExtSystem } = useDamConfigState() +const { currentExtSystemId } = useCurrentExtSystem() +const configExtSystem = getDamConfigExtSystem(currentExtSystemId.value) +if (isUndefined(configExtSystem)) { + throw new Error('Ext system must be initialised.') +} const typeHasDistributions = computed(() => { - return damConfigExtSystem.value[props.assetType].distribution.distributionServices.length > 0 + return configExtSystem[props.assetType].distribution.distributionServices.length > 0 }) diff --git a/src/views/coreDam/asset/detail/components/distribution/DistributionBlockedBy.vue b/src/views/coreDam/asset/detail/components/distribution/DistributionBlockedBy.vue index 40cb400a..c5864f9c 100644 --- a/src/views/coreDam/asset/detail/components/distribution/DistributionBlockedBy.vue +++ b/src/views/coreDam/asset/detail/components/distribution/DistributionBlockedBy.vue @@ -1,5 +1,5 @@ diff --git a/src/views/coreDam/asset/detail/components/distribution/DistributionListItemJw.vue b/src/views/coreDam/asset/detail/components/distribution/DistributionListItemJw.vue index 04c00ab1..262e0781 100644 --- a/src/views/coreDam/asset/detail/components/distribution/DistributionListItemJw.vue +++ b/src/views/coreDam/asset/detail/components/distribution/DistributionListItemJw.vue @@ -1,11 +1,12 @@ diff --git a/src/views/coreDam/asset/detail/components/distribution/DistributionListItemYoutube.vue b/src/views/coreDam/asset/detail/components/distribution/DistributionListItemYoutube.vue index ca1216e3..696fec72 100644 --- a/src/views/coreDam/asset/detail/components/distribution/DistributionListItemYoutube.vue +++ b/src/views/coreDam/asset/detail/components/distribution/DistributionListItemYoutube.vue @@ -1,11 +1,12 @@ diff --git a/src/views/coreDam/asset/detail/components/distribution/DistributionNewDialog.vue b/src/views/coreDam/asset/detail/components/distribution/DistributionNewDialog.vue index 39e199f0..3c1df794 100644 --- a/src/views/coreDam/asset/detail/components/distribution/DistributionNewDialog.vue +++ b/src/views/coreDam/asset/detail/components/distribution/DistributionNewDialog.vue @@ -1,6 +1,6 @@