From 57208d8baab0dd1c882caee06b7439545a253eab Mon Sep 17 00:00:00 2001 From: Scott McDonnell Date: Thu, 27 Jun 2024 16:18:07 +0100 Subject: [PATCH] [admin] add a short name field to Project / Asset Type / TaskType * Add editable production code - useful in Ayon * add TaskType short name * add short_name to Asset Type * add short_name to csv export for Asset Type * add short_name to the locales * AssetType set short_name on edit * Set project code to Short Name for consistency * add production.code for closed productions list --- src/components/lists/AssetTypeList.vue | 6 +++++ src/components/lists/ProductionList.vue | 9 +++++++ src/components/lists/TaskTypeList.vue | 26 ++++++++++++++++++- src/components/modals/EditAssetTypeModal.vue | 11 +++++++- src/components/modals/EditProductionModal.vue | 9 +++++++ src/components/modals/EditTaskTypeModal.vue | 8 ++++++ src/components/pages/AssetTypes.vue | 2 ++ .../pages/production/ProductionParameters.vue | 9 +++++++ .../pages/production/ProductionTaskType.vue | 3 +++ .../pages/production/ProductionTaskTypes.vue | 10 +++++++ src/locales/de.js | 4 ++- src/locales/en.js | 5 +++- src/locales/es.json | 1 + src/locales/fa.js | 6 +++-- src/locales/fr.json | 1 + src/locales/hu.json | 3 ++- src/locales/ja.json | 1 + src/locales/ko.json | 1 + src/locales/nl.json | 1 + src/locales/pt.json | 3 ++- src/locales/ru.json | 1 + src/locales/zh.json | 1 + src/locales/zh_tw.json | 3 ++- src/store/api/assettypes.js | 2 ++ src/store/api/productions.js | 1 + src/store/api/tasktypes.js | 2 ++ 26 files changed, 120 insertions(+), 9 deletions(-) diff --git a/src/components/lists/AssetTypeList.vue b/src/components/lists/AssetTypeList.vue index 3271be78df..b2d97106b0 100644 --- a/src/components/lists/AssetTypeList.vue +++ b/src/components/lists/AssetTypeList.vue @@ -7,6 +7,9 @@ {{ $t('asset_types.fields.name') }} + + {{ $t('asset_types.fields.short_name') }} + {{ $t('asset_types.fields.task_types') }} @@ -18,6 +21,9 @@ {{ entry.name }} + + {{ entry.short_name }} + {{ $t('productions.fields.name') }} + + {{ $t('productions.fields.code') }} + {{ $t('productions.fields.type') }} @@ -40,6 +43,9 @@ :last-production-screen="lastProductionScreen" /> + + {{ entry.code }} + {{ $t(`productions.type.${entry.production_type || 'short'}`) }} @@ -99,6 +105,9 @@ :is-link="false" /> + + {{ entry.code }} + {{ $t(`productions.type.${entry.production_type || 'short'}`) }} diff --git a/src/components/lists/TaskTypeList.vue b/src/components/lists/TaskTypeList.vue index 4fb7875354..a975a4faff 100644 --- a/src/components/lists/TaskTypeList.vue +++ b/src/components/lists/TaskTypeList.vue @@ -7,7 +7,12 @@ {{ $t('task_types.fields.department') }} - {{ $t('task_types.fields.name') }} + + {{ $t('task_types.fields.name') }} + + + {{ $t('task_types.fields.short_name') }} + {{ $t('task_types.fields.allow_timelog') }} @@ -42,6 +47,9 @@ /> + + {{ taskType.short_name }} + @@ -87,6 +95,9 @@ /> + + {{ taskType.short_name }} + @@ -132,6 +143,9 @@ /> + + {{ taskType.short_name }} + @@ -177,6 +191,9 @@ /> + + {{ taskType.short_name }} + @@ -222,6 +239,9 @@ /> + + {{ taskType.short_name }} + @@ -396,6 +416,10 @@ export default { min-width: 300px; } +.short_name { + width: 200px; + min-width: 200px; +} .priority { width: 80px; min-width: 80px; diff --git a/src/components/modals/EditAssetTypeModal.vue b/src/components/modals/EditAssetTypeModal.vue index a81855ca8d..790fd51670 100644 --- a/src/components/modals/EditAssetTypeModal.vue +++ b/src/components/modals/EditAssetTypeModal.vue @@ -25,7 +25,13 @@ @enter="runConfirmation" v-focus /> - + + + [ assetType.type, assetType.name, + assetType.short_name, assetType.task_types.length ? assetType.task_types .map(taskTypeId => this.taskTypeMap.get(taskTypeId)?.name) diff --git a/src/components/pages/production/ProductionParameters.vue b/src/components/pages/production/ProductionParameters.vue index 5cd9af938c..1c619ad8e7 100644 --- a/src/components/pages/production/ProductionParameters.vue +++ b/src/components/pages/production/ProductionParameters.vue @@ -10,6 +10,12 @@ v-focus v-model="form.name" /> +
+ + {{ taskType.short_name }} +