+
{{ $t('productions.brief.empty') }}
- {{ $t('productions.brief.edit.errorText') }}
+ {{ $t('productions.brief.edit_error') }}
{
// Needed because of the v-if
@@ -92,17 +89,16 @@ export default {
async editBrief() {
this.isLoading = true
+ this.errors.editBrief = false
try {
await this.editProduction({
id: this.currentProduction.id,
description: this.brief
})
+ this.isEditing = false
} catch {
this.errors.editBrief = true
- this.isLoading = false
- return
}
- this.isEditing = false
this.isLoading = false
},
@@ -118,7 +114,7 @@ export default {
}
}
-.brief {
+.production-brief {
flex: 1;
}
@@ -139,8 +135,4 @@ export default {
.editor {
height: 100%;
}
-
-.textarea {
- color: red;
-}
diff --git a/src/components/tops/Topbar.vue b/src/components/tops/Topbar.vue
index 227398e06..bbaa243fd 100644
--- a/src/components/tops/Topbar.vue
+++ b/src/components/tops/Topbar.vue
@@ -45,12 +45,11 @@
-
@@ -445,7 +444,9 @@ export default {
options.push({ label: this.$t('news.title'), value: 'newsFeed' })
}
- options = options.concat([{ label: 'separator', value: 'separator' }])
+ if (!this.isCurrentUserClient) {
+ options.push({ label: 'separator', value: 'separator' })
+ }
// Add sequences
if (isNotOnlyAssets) {
@@ -483,11 +484,19 @@ export default {
}
options.push({ label: this.$t('people.team'), value: 'team' })
- if (this.isCurrentUserAdmin || this.isCurrentUserManager) {
+ if (this.isCurrentUserManager) {
options = options.concat([
{ label: 'separator', value: 'separator' },
{ label: this.$t('settings.title'), value: 'production-settings' }
])
+ } else {
+ options = options.concat([
+ { label: 'separator', value: 'separator' },
+ {
+ label: this.$t('productions.brief.title'),
+ value: 'brief'
+ }
+ ])
}
}
@@ -732,6 +741,7 @@ export default {
section !== 'news-feed' &&
section !== 'schedule' &&
section !== 'production-settings' &&
+ section !== 'brief' &&
section !== 'episodes'
if (isEpisodeContext) {
route.name = `episode-${section}`
diff --git a/src/components/widgets/KitsuIcon.vue b/src/components/widgets/KitsuIcon.vue
index 2d95316de..c9df9bc99 100644
--- a/src/components/widgets/KitsuIcon.vue
+++ b/src/components/widgets/KitsuIcon.vue
@@ -76,6 +76,7 @@ const icons = {
'big-thumbnail': bigThumbnail,
box,
breakdown,
+ brief: infos,
compare,
concepts,
custom,
diff --git a/src/lib/path.js b/src/lib/path.js
index 431311866..b48b36331 100644
--- a/src/lib/path.js
+++ b/src/lib/path.js
@@ -166,7 +166,8 @@ export const getProductionPath = (
'team',
'episodes',
'episode-stats',
- 'concepts'
+ 'concepts',
+ 'brief'
].includes(section)
) {
route = episodifyRoute(route, episodeId || 'all')
diff --git a/src/locales/en.js b/src/locales/en.js
index c4d2629c8..8abad59a3 100644
--- a/src/locales/en.js
+++ b/src/locales/en.js
@@ -1077,6 +1077,7 @@ export default {
},
brief: {
+ edit_error: 'An error occurred while editing the brief.',
empty: 'There is no brief yet. How about creating one?',
title: 'Brief'
},
diff --git a/src/router/routes.js b/src/router/routes.js
index 19179bea2..0bf4a6ff2 100644
--- a/src/router/routes.js
+++ b/src/router/routes.js
@@ -28,6 +28,7 @@ const AssetTypes = () => import('@/components/pages/AssetTypes.vue')
const Backgrounds = () => import('@/components/pages/Backgrounds.vue')
const Bots = () => import('@/components/pages/Bots.vue')
const Breakdown = () => import('@/components/pages/Breakdown.vue')
+const Brief = () => import('@/components/pages/Brief.vue')
const Concepts = () => import('@/components/pages/Concepts.vue')
const CustomActions = () => import('@/components/pages/CustomActions.vue')
const Departments = () => import('@/components/pages/Departments.vue')
@@ -451,6 +452,12 @@ export const routes = [
name: 'production-settings'
},
+ {
+ path: 'productions/:production_id/brief',
+ component: Brief,
+ name: 'brief'
+ },
+
{
path: 'productions/:production_id/quota',
component: ProductionQuota,
diff --git a/src/testrouter/routes.js b/src/testrouter/routes.js
index 5e690e92f..cbbb4e0df 100644
--- a/src/testrouter/routes.js
+++ b/src/testrouter/routes.js
@@ -27,6 +27,7 @@ import AssetTypes from '@/components/pages/AssetTypes.vue'
import Backgrounds from '@/components/pages/Backgrounds.vue'
import Bots from '@/components/pages/Bots.vue'
import Breakdown from '@/components/pages/Breakdown.vue'
+import Brief from '@/components/pages/Brief.vue'
import Concepts from '@/components/pages/Concepts.vue'
import CustomActions from '@/components/pages/CustomActions.vue'
import Departments from '@/components/pages/departments/Departments.vue'
@@ -498,6 +499,12 @@ export const routes = [
name: 'production-settings'
},
+ {
+ path: 'productions/:production_id/brief',
+ component: Brief,
+ name: 'brief'
+ },
+
{
path: 'productions/:production_id/quota',
component: ProductionQuota,