Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
volar committed Dec 5, 2023
1 parent 3f7a446 commit b484950
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,18 @@ onMounted(() => {
class="system-border-b pr-1"
>
<div class="text-subtitle-2 d-flex px-2">
<div>DAM upload</div>
<div
v-if="isUploading"
class="text-subtitle-2"
>
{{ t('common.damImage.upload.title') }}
</div>
<div
v-else
class="text-subtitle-2 text-green-darken-3 font-weight-bold"
>
{{ t('common.damImage.upload.titleDone') }}
</div>
</div>
<VSpacer />
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type { DocId } from '@/types/common'
import type { DamAssetType } from '@/types/coreDam/Asset'
import UploadQueueDialogSingleSidebarMetadataContent from '@/components/damImage/uploadQueue/components/UploadQueueDialogSingleSidebarMetadataContent.vue'
import { ADamAssetMetadataValidationScopeSymbol } from '@/components/damImage/uploadQueue/composables/uploadValidations'
import { useAlerts } from '@/composables/system/alerts'
withDefaults(
defineProps<{
Expand All @@ -27,11 +28,23 @@ const { t } = useI18n()
const v$ = useVuelidate({}, {}, { $scope: ADamAssetMetadataValidationScopeSymbol })
const { showValidationError } = useAlerts()
const onSave = async () => {
v$.value.$touch()
if (v$.value.$invalid) {
showValidationError()
return
}
emit('onSave')
}
const onSaveAndApply = async () => {
v$.value.$touch()
if (v$.value.$invalid) {
showValidationError()
return
}
emit('onSaveAndApply')
}
</script>
Expand All @@ -48,11 +61,11 @@ const onSaveAndApply = async () => {
</ABtnSecondary>
<ABtnPrimary
type="submit"
class="ml-2"
class="mx-2"
data-cy="button-save-and-apply"
@click.stop="onSaveAndApply"
>
Save and apply
{{ t('common.damImage.upload.saveAndApply') }}
</ABtnPrimary>
</AssetDetailSidebarActionsWrapper>
<UploadQueueDialogSingleSidebarMetadataContent :queue-key="queueKey" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@ import ASystemEntityScope from '@/components/form/ASystemEntityScope.vue'
import { useDamConfigState } from '@/components/damImage/uploadQueue/composables/damConfigState'
import AssetCustomMetadataForm from '@/components/damImage/uploadQueue/components/AssetCustomMetadataForm.vue'
import AssetImage from '@/components/damImage/uploadQueue/components/AssetImage.vue'
import AssetLinkExternal from '@/components/damImage/uploadQueue/components/AssetLinkExternal.vue'
import AssetFileFailReasonChip from '@/components/damImage/uploadQueue/components/AssetFileFailReasonChip.vue'
import AuthorRemoteAutocompleteWithCached
from '@/components/damImage/uploadQueue/author/AuthorRemoteAutocompleteWithCached.vue'
import AuthorRemoteAutocompleteWithCached from '@/components/damImage/uploadQueue/author/AuthorRemoteAutocompleteWithCached.vue'
import { ADamAssetMetadataValidationScopeSymbol } from '@/components/damImage/uploadQueue/composables/uploadValidations'
import KeywordRemoteAutocompleteWithCached
from '@/components/damImage/uploadQueue/keyword/KeywordRemoteAutocompleteWithCached.vue'
import KeywordRemoteAutocompleteWithCached from '@/components/damImage/uploadQueue/keyword/KeywordRemoteAutocompleteWithCached.vue'
const props = withDefaults(
defineProps<{
Expand Down Expand Up @@ -246,6 +243,14 @@ const showCancel = computed(() => {
<span v-if="item.file?.size">&nbsp;({{ prettyBytes(item.file.size) }})</span>
</VCol>
</VRow>
<VRow
v-if="item.isDuplicate"
class="text-caption text-warning"
>
<VCol class="pt-0">
{{ t('common.damImage.asset.detail.info.status.duplicate') }}
</VCol>
</VRow>
<VForm :disabled="!item.canEditMetadata">
<AssetCustomMetadataForm
v-if="item"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ export function useDamConfigState(client: undefined | (() => AxiosInstance) = un
throw new Error('Unable to load dam ext system config. Incorrect response body.')
}
setDamConfigExtSystem(config, extSystemId)
damConfigExtSystem.value.image.authors.required = true
console.log(damConfigExtSystem.value)
resolve(true)
})
.catch((err) => {
Expand Down

0 comments on commit b484950

Please sign in to comment.