From 3b0d6ed6b1fbc989f71e46864c0a1b6cab3153a2 Mon Sep 17 00:00:00 2001 From: Nicolas Pennec Date: Mon, 13 Jan 2025 17:04:07 +0100 Subject: [PATCH] [prod] add a read-only production brief page for non-admin users (artist, supervisor, and vendor) --- src/components/pages/Brief.vue | 53 +++++++++++++++++++ src/components/pages/ProductionSettings.vue | 8 ++- .../pages/production/ProductionBrief.vue | 34 +++++------- src/components/tops/Topbar.vue | 18 +++++-- src/components/widgets/KitsuIcon.vue | 1 + src/lib/path.js | 3 +- src/locales/en.js | 1 + src/router/routes.js | 7 +++ src/testrouter/routes.js | 7 +++ 9 files changed, 105 insertions(+), 27 deletions(-) create mode 100644 src/components/pages/Brief.vue diff --git a/src/components/pages/Brief.vue b/src/components/pages/Brief.vue new file mode 100644 index 0000000000..204e9213cc --- /dev/null +++ b/src/components/pages/Brief.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/src/components/pages/ProductionSettings.vue b/src/components/pages/ProductionSettings.vue index 836db135c1..f425dee6da 100644 --- a/src/components/pages/ProductionSettings.vue +++ b/src/components/pages/ProductionSettings.vue @@ -219,6 +219,11 @@ export default { }, mounted() { + if (!this.isCurrentUserManager) { + this.$router.push({ name: 'not-found' }) + return + } + if (this.remainingAssetTypes.length > 0) { this.assetTypeId = this.remainingAssetTypes[0].value } @@ -232,8 +237,9 @@ export default { computed: { ...mapGetters([ - 'currentProduction', 'assetTypes', + 'currentProduction', + 'isCurrentUserManager', 'productionAssetTypes', 'productionTaskStatuses', 'taskStatus' diff --git a/src/components/pages/production/ProductionBrief.vue b/src/components/pages/production/ProductionBrief.vue index 11acc0dd43..e224897607 100644 --- a/src/components/pages/production/ProductionBrief.vue +++ b/src/components/pages/production/ProductionBrief.vue @@ -1,7 +1,7 @@