Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dashboard
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
dashboard
Commits
319cf540
Commit
319cf540
authored
1 year ago
by
Konrad Mohrfeldt
Browse files
Options
Downloads
Patches
Plain Diff
feat: add editor for the show’s internal notes
refs
#146
parent
db7dc49d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/components/shows/MetaSimpleTypes.vue
+31
-2
31 additions, 2 deletions
src/components/shows/MetaSimpleTypes.vue
src/i18n/de.js
+2
-0
2 additions, 0 deletions
src/i18n/de.js
src/i18n/en.js
+2
-0
2 additions, 0 deletions
src/i18n/en.js
with
35 additions
and
2 deletions
src/components/shows/MetaSimpleTypes.vue
+
31
−
2
View file @
319cf540
...
@@ -74,6 +74,25 @@
...
@@ -74,6 +74,25 @@
<
template
v-else
>
-
</
template
>
<
template
v-else
>
-
</
template
>
</FormGroup>
</FormGroup>
<
template
v-if=
"isSuperuser"
>
<hr
class=
"tw-col-span-3 tw-order-last tw-w-full"
/>
<FormGroup
:label=
"t('showMeta.internalNote')"
:errors=
"internalNoteErrors"
class=
"tw-col-span-2 tw-order-last"
>
<template
#default
="
attrs
"
>
<textarea
ref=
"internalNoteEl"
v-model=
"internalNote"
class=
"tw-min-h-[100px]"
v-bind=
"attrs"
@
blur=
"save"
/>
</
template
>
</FormGroup>
</template>
<Teleport
to=
"body"
>
<Teleport
to=
"body"
>
<FallbackSelector
ref=
"defaultPlaylistSelectorModal"
/>
<FallbackSelector
ref=
"defaultPlaylistSelectorModal"
/>
</Teleport>
</Teleport>
...
@@ -82,18 +101,22 @@
...
@@ -82,18 +101,22 @@
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
computed
,
ref
}
from
'
vue
'
import
{
computed
,
ref
}
from
'
vue
'
import
{
useStore
}
from
'
vuex
'
import
{
useStore
}
from
'
vuex
'
import
{
useTextareaAutosize
}
from
'
@vueuse/core
'
import
{
FundingCategory
,
Playlist
,
Show
,
Type
}
from
'
@/types
'
import
{
FundingCategory
,
Playlist
,
Show
,
Type
}
from
'
@/types
'
import
{
useI18n
}
from
'
@/i18n
'
import
{
useI18n
}
from
'
@/i18n
'
import
{
sanitizeHTML
,
useCopy
,
useSelectedShow
}
from
'
@/util
'
import
{
sanitizeHTML
,
useCopy
,
useSelectedShow
}
from
'
@/util
'
import
FormGroup
from
'
@/components/generic/FormGroup.vue
'
import
{
useAPIObject
,
useServerFieldErrors
}
from
'
@/api
'
import
{
useAPIObject
,
useServerFieldErrors
}
from
'
@/api
'
import
{
usePlaylistStore
}
from
'
@/stores/playlists
'
import
{
usePlaylistStore
}
from
'
@/stores/playlists
'
import
FallbackSelector
from
'
@/components/shows/FallbackSelector.vue
'
import
{
APIError
}
from
'
@/store/api-helper
'
import
{
APIError
}
from
'
@/store/api-helper
'
import
{
useAuthStore
}
from
'
@/stores/auth
'
import
FormGroup
from
'
@/components/generic/FormGroup.vue
'
import
FallbackSelector
from
'
@/components/shows/FallbackSelector.vue
'
const
{
t
}
=
useI18n
()
const
{
t
}
=
useI18n
()
const
store
=
useStore
()
const
store
=
useStore
()
const
selectedShow
=
useSelectedShow
()
const
selectedShow
=
useSelectedShow
()
const
{
isSuperuser
}
=
useAuthStore
()
const
playlistStore
=
usePlaylistStore
()
const
playlistStore
=
usePlaylistStore
()
const
shows
=
computed
<
Show
[]
>
(()
=>
store
.
state
.
shows
.
shows
)
const
shows
=
computed
<
Show
[]
>
(()
=>
store
.
state
.
shows
.
shows
)
const
types
=
computed
<
Type
[]
>
(()
=>
store
.
state
.
shows
.
types
)
const
types
=
computed
<
Type
[]
>
(()
=>
store
.
state
.
shows
.
types
)
...
@@ -102,6 +125,7 @@ const defaultPlaylistSelectorModal = ref()
...
@@ -102,6 +125,7 @@ const defaultPlaylistSelectorModal = ref()
const
email
=
useCopy
(
computed
(()
=>
selectedShow
.
value
.
email
??
''
))
const
email
=
useCopy
(
computed
(()
=>
selectedShow
.
value
.
email
??
''
))
const
cbaSeriesId
=
useCopy
(
computed
(()
=>
selectedShow
.
value
.
cbaSeriesId
))
const
cbaSeriesId
=
useCopy
(
computed
(()
=>
selectedShow
.
value
.
cbaSeriesId
))
const
internalNote
=
useCopy
(
computed
(()
=>
selectedShow
.
value
.
internalNote
))
const
predecessorId
=
useCopy
(
computed
(()
=>
selectedShow
.
value
.
predecessorId
))
const
predecessorId
=
useCopy
(
computed
(()
=>
selectedShow
.
value
.
predecessorId
))
const
typeId
=
useCopy
(
computed
(()
=>
selectedShow
.
value
.
typeId
))
const
typeId
=
useCopy
(
computed
(()
=>
selectedShow
.
value
.
typeId
))
const
fundingCategoryId
=
useCopy
(
computed
(()
=>
selectedShow
.
value
.
fundingCategoryId
))
const
fundingCategoryId
=
useCopy
(
computed
(()
=>
selectedShow
.
value
.
fundingCategoryId
))
...
@@ -119,6 +143,7 @@ const [
...
@@ -119,6 +143,7 @@ const [
typeIdErrors
,
typeIdErrors
,
fundingCategoryIdErrors
,
fundingCategoryIdErrors
,
defaultPlaylistIdErrors
,
defaultPlaylistIdErrors
,
internalNoteErrors
,
]
=
useServerFieldErrors
(
]
=
useServerFieldErrors
(
error
,
error
,
'
email
'
,
'
email
'
,
...
@@ -127,8 +152,11 @@ const [
...
@@ -127,8 +152,11 @@ const [
'
typeId
'
,
'
typeId
'
,
'
fundingCategoryId
'
,
'
fundingCategoryId
'
,
'
defaultPlaylistId
'
,
'
defaultPlaylistId
'
,
'
internalNote
'
,
)
)
const
{
textarea
:
internalNoteEl
}
=
useTextareaAutosize
({
input
:
internalNote
})
function
openDefaultPlaylistSelectorModal
()
{
function
openDefaultPlaylistSelectorModal
()
{
defaultPlaylistSelectorModal
.
value
.
open
(
async
(
id
:
number
|
null
)
=>
{
defaultPlaylistSelectorModal
.
value
.
open
(
async
(
id
:
number
|
null
)
=>
{
defaultPlaylistId
.
value
=
id
defaultPlaylistId
.
value
=
id
...
@@ -146,6 +174,7 @@ async function save() {
...
@@ -146,6 +174,7 @@ async function save() {
typeId
:
typeId
.
value
,
typeId
:
typeId
.
value
,
fundingCategoryId
:
fundingCategoryId
.
value
,
fundingCategoryId
:
fundingCategoryId
.
value
,
defaultPlaylistId
:
defaultPlaylistId
.
value
,
defaultPlaylistId
:
defaultPlaylistId
.
value
,
internalNote
:
internalNote
.
value
,
}
}
try
{
try
{
...
...
This diff is collapsed.
Click to expand it.
src/i18n/de.js
+
2
−
0
View file @
319cf540
...
@@ -256,6 +256,8 @@ export default {
...
@@ -256,6 +256,8 @@ export default {
shortDescriptionPlaceholder
:
'
Gib eine Kurzbeschreibung der Sendereihe ein
'
,
shortDescriptionPlaceholder
:
'
Gib eine Kurzbeschreibung der Sendereihe ein
'
,
editShortDescription
:
'
Kurzbeschreibung bearbeiten
'
,
editShortDescription
:
'
Kurzbeschreibung bearbeiten
'
,
internalNote
:
'
Interne Notiz
'
,
website
:
'
Webseite
'
,
website
:
'
Webseite
'
,
websitePlaceholder
:
'
Gib eine Webseite für die Sendereihe an
'
,
websitePlaceholder
:
'
Gib eine Webseite für die Sendereihe an
'
,
editWebsite
:
'
Webseite bearbeiten
'
,
editWebsite
:
'
Webseite bearbeiten
'
,
...
...
This diff is collapsed.
Click to expand it.
src/i18n/en.js
+
2
−
0
View file @
319cf540
...
@@ -256,6 +256,8 @@ export default {
...
@@ -256,6 +256,8 @@ export default {
shortDescriptionPlaceholder
:
'
Enter a short description of this show
'
,
shortDescriptionPlaceholder
:
'
Enter a short description of this show
'
,
editShortDescription
:
'
Edit short description
'
,
editShortDescription
:
'
Edit short description
'
,
internalNote
:
'
Internal note
'
,
website
:
'
Website
'
,
website
:
'
Website
'
,
websitePlaceholder
:
'
Enter a website for this show
'
,
websitePlaceholder
:
'
Enter a website for this show
'
,
editWebsite
:
'
Edit website
'
,
editWebsite
:
'
Edit website
'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment