diff --git a/src/Pages/AddOrEditPlaylist.vue b/src/Pages/AddOrEditPlaylist.vue index 90d7a0515f2f077420de55dec3f0705456cd8e6b..0f84ba9b56151a92268ef523f26cbb35ec67507f 100644 --- a/src/Pages/AddOrEditPlaylist.vue +++ b/src/Pages/AddOrEditPlaylist.vue @@ -73,11 +73,11 @@ <template #cell(source)="data"> <span v-if="data.item.file"> <span class="tw-font-bold">{{ - getFileTitleForPlaylist(data.item.file.show, data.item.file.id) + getFileTitleForPlaylist(data.item.file.showName, data.item.file.id) }}</span ><br /> <span class="tw-text-gray-700" - >(file://{{ data.item.file.show }}/{{ data.item.file.id }})</span + >(file://{{ data.item.file.showName }}/{{ data.item.file.id }})</span > </span> @@ -184,7 +184,7 @@ <b-dropdown-item v-for="(file, index) in files" :key="index" - @click="addPlaylistItemFile(file.show, file.id)" + @click="addPlaylistItemFile(file.showName, file.id)" > {{ file.id }}: {{ file.metadata.title ? file.metadata.title : '' }} ({{ prettyNanoseconds(file.duration) @@ -467,7 +467,7 @@ export default { const entry = {} if (playlist.entries[i].file) { entry.file = {} - entry.file.show = playlist.entries[i].file.show + entry.file.showName = playlist.entries[i].file.showName entry.file.id = playlist.entries[i].file.id } else { entry.uri = playlist.entries[i].uri @@ -486,7 +486,7 @@ export default { if (this.playlistEditor.mode === 'add') { this.$store.dispatch('playlists/add', { - slug: this.selectedShow.slug, + showSlug: this.selectedShow.slug, playlist: playlist, callback: () => { this.$root.$emit('bv::refresh::table', 'playlistsTable') @@ -496,8 +496,8 @@ export default { }) } else if (this.playlistEditor.mode === 'edit') { this.$store.dispatch('playlists/update', { - slug: this.selectedShow.slug, - id: this.playlistEditor.id, + showSlug: this.selectedShow.slug, + playlistId: this.playlistEditor.id, playlist: playlist, callback: () => { this.$root.$emit('bv::refresh::table', 'playlistsTable') diff --git a/src/Pages/EmissionManager.vue b/src/Pages/EmissionManager.vue index 0c43e39ab39c6cfd058eb8961812d6c8734aa390..894a7ef5847fd8f22556eada7706ba214c888bbd 100644 --- a/src/Pages/EmissionManager.vue +++ b/src/Pages/EmissionManager.vue @@ -23,24 +23,24 @@ <h4>{{ $t('conflictResolution.title') }}</h4> <p :class="{ - 'tw-mb-4': resolveData.schedule.rrule === 1, - 'tw-mb-0': resolveData.schedule.rrule !== 1, + 'tw-mb-4': resolveData.schedule.rruleId === 1, + 'tw-mb-0': resolveData.schedule.rruleId !== 1, }" v-html=" $t('conflictResolution.newSchedule', { - firstDate: prettyDate(resolveData.schedule.first_date), - startTime: resolveData.schedule.start_time, - endTime: resolveData.schedule.end_time, + firstDate: prettyDate(resolveData.schedule.firstDate), + startTime: resolveData.schedule.startTime, + endTime: resolveData.schedule.endTime, }) " /> <p - v-if="resolveData.schedule.rrule !== 1" + v-if="resolveData.schedule.rruleId !== 1" v-html=" $t('conflictResolution.recurringSchedule', { - rrule: rruleRender(resolveData.schedule.rrule), - lastDate: prettyDate(resolveData.schedule.last_date), + rrule: rruleRender(resolveData.schedule.rruleId), + lastDate: prettyDate(resolveData.schedule.lastDate), }) " /> @@ -145,20 +145,20 @@ </p> <span class="tw-text-sm"> {{ prettyTime(timeslot.start) }} - {{ prettyTime(timeslot.end) }} - <span v-if="timeslot.repetition_of" class="tw-text-gray-400">{{ + <span v-if="timeslot.repetitionOfId" class="tw-text-gray-400">{{ $t('calendar.repetition') }}</span> </span> </div> <div v-if="loaded.playlists"> - <div v-if="!timeslot.playlist_id"> - <span v-if="timeslot.show.default_playlist_id" class="tw-leading-none"> + <div v-if="!timeslot.playlistId"> + <span v-if="timeslot.show.defaultPlaylistId" class="tw-leading-none"> <span class="tw-block"> <strong>{{ $t('emissionTable.playlist') }}:</strong> {{ - getPlaylistById(timeslot.show.default_playlist_id)?.description || - timeslot.show.default_playlist_id + getPlaylistById(timeslot.show.defaultPlaylistId)?.description || + timeslot.show.defaultPlaylistId }} </span> <span class="tw-text-xs tw-text-red-500">{{ $t('calendar.fallback') }}</span> @@ -170,7 +170,7 @@ <div v-else-if="timeslot.playlist" class="tw-leading-none"> <span class="tw-block"> <strong>{{ $t('emissionTable.playlist') }}:</strong> - {{ timeslot.playlist.description || timeslot.playlist_id }} + {{ timeslot.playlist.description || timeslot.playlistId }} </span> <span class="tw-text-sm"> <strong>{{ $t('emissionTable.duration') }}:</strong> @@ -289,10 +289,10 @@ export default { getISODateString(new Date(timeslot.start)) === getISODateString(this.selectedDay), ) .map((timeslot) => { - const id = timeslot.show + const id = timeslot.showId const show = this.getShow({ id }) - const playlist = timeslot.playlist_id - ? this.getPlaylistById(timeslot.playlist_id) ?? null + const playlist = timeslot.playlistId + ? this.getPlaylistById(timeslot.playlistId) ?? null : null return { @@ -387,7 +387,7 @@ export default { immediate: true, handler(newShow) { if (newShow) { - this.$store.dispatch('playlists/fetch', { slug: newShow.slug }) + this.$store.dispatch('playlists/fetch', { showSlug: newShow.slug }) this.loadTimeslots() } }, @@ -478,10 +478,10 @@ export default { timeslotClicked(slot) { const timeslot = { ...slot } - timeslot.show = slot.show.id + timeslot.showId = slot.show.id - if (timeslot.show !== this.selectedShow.id) { - this.switchShow(this.getShowIndexById(timeslot.show)) + if (timeslot.showId !== this.selectedShow.id) { + this.switchShow(this.getShowIndexById(timeslot.showId)) } else { this.$refs.appModalEmissionManagerEdit.open(timeslot) } @@ -506,8 +506,8 @@ export default { else { const selectedTimeslotId = event.extendedProps.id const timeslot = this.timeslots.find((slot) => slot.id === selectedTimeslotId) - if (timeslot.show !== this.selectedShow.id) { - this.switchShow(this.getShowIndexById(timeslot.show)) + if (timeslot.showId !== this.selectedShow.id) { + this.switchShow(this.getShowIndexById(timeslot.showId)) } else { this.$refs.appModalEmissionManagerEdit.open(timeslot) } @@ -554,20 +554,20 @@ export default { if (projectedTimeslot.collisions.length > 0) { newSlot.className = 'conflict' - newSlot.extendedProps.solutionChoices = projectedTimeslot.solution_choices + newSlot.extendedProps.solutionChoices = projectedTimeslot.solutionChoices for (const collision of projectedTimeslot.collisions) { const conflictingSlot = { id: collision.id, start: collision.start, end: collision.end, - title: collision.show_name, + title: collision.showName, className: 'otherShow', editable: false, extendedProps: { id: collision.id, start: collision.start, end: collision.end, - title: collision.show_name, + title: collision.showName, }, } this.calendarSlots.push(conflictingSlot) @@ -721,23 +721,23 @@ export default { // submit a conflict-resolved schedule to steering async resolveSubmit() { // TODO: check why steering returns undefined and null values here - if (this.resolveData.schedule.add_business_days_only === undefined) { - this.resolveData.schedule.add_business_days_only = false + if (this.resolveData.schedule.addBusinessDaysOnly === undefined) { + this.resolveData.schedule.addBusinessDaysOnly = false } - if (this.resolveData.schedule.add_days_no === null) { - this.resolveData.schedule.add_days_no = 0 + if (this.resolveData.schedule.addDaysNo === null) { + this.resolveData.schedule.addDaysNo = 0 } - if (this.resolveData.schedule.is_repetition === undefined) { - this.resolveData.schedule.is_repetition = false + if (this.resolveData.schedule.isRepetition === undefined) { + this.resolveData.schedule.isRepetition = false } - if (this.resolveData.schedule.default_playlist_id === null) { - this.resolveData.schedule.default_playlist_id = 0 + if (this.resolveData.schedule.defaultPlaylistId === null) { + this.resolveData.schedule.defaultPlaylistId = 0 } - if (this.resolveData.schedule.automation_id === null) { - this.resolveData.schedule.automation_id = 0 + if (this.resolveData.schedule.automationId === null) { + this.resolveData.schedule.automationId = 0 } - if (this.resolveData.schedule.by_weekday === undefined) { - this.resolveData.schedule.by_weekday = 0 + if (this.resolveData.schedule.byWeekday === undefined) { + this.resolveData.schedule.byWeekday = 0 } // create the resolved schedule object including solutions @@ -769,11 +769,11 @@ export default { loadCalendarSlots() { this.calendarSlots = [] for (const timeslot of this.timeslots) { - const isEmpty = !timeslot.playlist_id + const isEmpty = !timeslot.playlistId let emptyText = '' let highlighting = 'otherShow' - if (timeslot.show === this.selectedShow.id) { + if (timeslot.showId === this.selectedShow.id) { highlighting = 'currentShow ' highlighting += isEmpty ? 'emptySlot' : '' emptyText = isEmpty ? this.$t('calendar.empty') : '' @@ -783,13 +783,13 @@ export default { id: timeslot.id, start: timeslot.start, end: timeslot.end, - title: this.getShowTitleById(timeslot.show) + `\n${emptyText}`, + title: this.getShowTitleById(timeslot.showId) + `\n${emptyText}`, className: highlighting, extendedProps: { id: timeslot.id, start: timeslot.start, end: timeslot.end, - title: this.getShowTitleById(timeslot.show) + `\n${emptyText}`, + title: this.getShowTitleById(timeslot.showId) + `\n${emptyText}`, }, }) } diff --git a/src/Pages/FileManager.vue b/src/Pages/FileManager.vue index 5a8d98f254a5317fa4dcd80d060ba335ffe9e160..9a1f72b8ac2af86844496a1a7e40ee871f6ec4c2 100644 --- a/src/Pages/FileManager.vue +++ b/src/Pages/FileManager.vue @@ -69,8 +69,8 @@ export default { immediate: true, handler(newShow) { if (newShow) { - this.$store.dispatch('files/fetchFiles', { slug: newShow.slug }) - this.$store.dispatch('playlists/fetch', { slug: newShow.slug }) + this.$store.dispatch('files/fetchFiles', { showSlug: newShow.slug }) + this.$store.dispatch('playlists/fetch', { showSlug: newShow.slug }) } }, }, diff --git a/src/Pages/ShowManager.vue b/src/Pages/ShowManager.vue index 65f2b9cb462a9374fdc125bb7ba7c3fb881c5019..b1519a4e37b8546c78d37646ecf4d8999de1e436 100644 --- a/src/Pages/ShowManager.vue +++ b/src/Pages/ShowManager.vue @@ -54,7 +54,7 @@ function loadShowInfos() { return } - store.dispatch('playlists/fetch', { slug: selectedShow.value.slug }) + store.dispatch('playlists/fetch', { showSlug: selectedShow.value.slug }) }, }) store.dispatch('shows/fetchMetaArray', { property: 'types', onlyActive: true }) diff --git a/src/api.ts b/src/api.ts index 9782b12ede86121483e491abcf0d0a9037a883ea..981111c21f902b4603d6fc1c8c37a9fa62520ed9 100644 --- a/src/api.ts +++ b/src/api.ts @@ -179,7 +179,7 @@ export function APIListPaginated<T extends APIObject>( query.set('limit', limit.toString()) query.set('offset', ((page - 1) * limit).toString()) } else { - query.set('page_size', limit.toString()) + query.set('pageSize', limit.toString()) query.set('page', page.toString()) } const res = await fetch(api.createRequest(api.endpoint(query), requestInit)) diff --git a/src/components/emissions/ModalCreate.vue b/src/components/emissions/ModalCreate.vue index 7c9930d5598c3099d538c083c000f4e6035529b1..2fb4c485f133b1422c87b3b42b1b3ae811d412b0 100644 --- a/src/components/emissions/ModalCreate.vue +++ b/src/components/emissions/ModalCreate.vue @@ -18,7 +18,7 @@ <b-col cols="12"> <label class="tw-w-full tw-font-bold"> <span class="tw-inline-block tw-pb-2">{{ $t('rrule.rrule') }}</span> - <b-form-select v-model="valuePick.rrule" :options="rruleOptions" /> + <b-form-select v-model="valuePick.rruleId" :options="rruleOptions" /> </label> </b-col> </b-row> @@ -30,7 +30,7 @@ <b-form-input v-model="valuePick.firstDate" type="date" /> </label> </b-col> - <b-col v-if="valuePick.rrule !== 1" cols="3"> + <b-col v-if="valuePick.rruleId !== 1" cols="3"> <label class="tw-w-full tw-font-bold"> <span class="tw-inline-block tw-pb-2" v-html="$t('scheduleEditor.toDate')" /> <b-form-input v-model="valuePick.lastDate" type="date" /> @@ -100,7 +100,7 @@ export default { startTime: null, endTime: null, lastDate: null, - rrule: 1, + rruleId: 1, }, } }, @@ -147,12 +147,12 @@ export default { } // take all values that have been picked and put them into our new // schedule. so far we do not need any transformations. - this.newSchedule.schedule.first_date = this.valuePick.firstDate - this.newSchedule.schedule.start_time = this.valuePick.startTime - this.newSchedule.schedule.end_time = this.valuePick.endTime - this.newSchedule.schedule.last_date = this.valuePick.lastDate - this.newSchedule.schedule.rrule = this.valuePick.rrule - this.newSchedule.schedule.by_weekday = this.getWeekdayFromApiDate(this.valuePick.firstDate) + this.newSchedule.schedule.firstDate = this.valuePick.firstDate + this.newSchedule.schedule.startTime = this.valuePick.startTime + this.newSchedule.schedule.endTime = this.valuePick.endTime + this.newSchedule.schedule.lastDate = this.valuePick.lastDate + this.newSchedule.schedule.rruleId = this.valuePick.rruleId + this.newSchedule.schedule.byWeekday = this.getWeekdayFromApiDate(this.valuePick.firstDate) // ok then, let's submit and see if any conflicts arise this.submitting = true @@ -197,18 +197,18 @@ export default { this.initialLastDate = lastDate this.newSchedule = { schedule: { - rrule: 1, - show: 0, - by_weekday: 0, - first_date: firstDate, - start_time: startTime, - end_time: endTime, - last_date: lastDate, - is_repetition: false, - add_days_no: 0, - add_business_days_only: false, - default_playlist_id: 0, - automation_id: 0, + rruleId: 1, + showId: 0, + byWeekday: 0, + firstDate: firstDate, + startTime: startTime, + endTime: endTime, + lastDate: lastDate, + isRepetition: false, + addDaysNo: 0, + addBusinessDaysOnly: false, + defaultPlaylistId: 0, + automationId: 0, }, } this.loadedModal = true diff --git a/src/components/emissions/ModalEdit.vue b/src/components/emissions/ModalEdit.vue index 13c13cffdd6890caeb711ab5ea90cfc98bf79386..987b194db58173b4ca6c2d26d00eeeffeaa3ec45 100644 --- a/src/components/emissions/ModalEdit.vue +++ b/src/components/emissions/ModalEdit.vue @@ -19,7 +19,7 @@ " /> - <div v-if="schedule.rrule === 1"> + <div v-if="schedule.rruleId === 1"> <p> {{ $t('scheduleEditor.singleEmission') }} <span v-if="!loaded.scheduleTimeslots"> @@ -54,8 +54,8 @@ <p v-html=" $t('scheduleEditor.recurringSchedule', { - rrule: rruleRender(schedule.rrule), - lastDate: prettyDate(schedule.last_date), + rrule: rruleRender(schedule.rruleId), + lastDate: prettyDate(schedule.lastDate), }) " /> @@ -164,12 +164,14 @@ <span v-if="scheduleTimeslots.length === 1">{{ $t('scheduleEditor.delete.delete') }}</span> - <span v-else-if="schedule.rrule === 1">{{ $t('scheduleEditor.delete.both') }}</span> + <span v-else-if="schedule.rruleId === 1">{{ + $t('scheduleEditor.delete.both') + }}</span> <span v-else>{{ $t('scheduleEditor.delete.scheduleTimeslots') }}</span> </b-button> <b-button - v-if="schedule.rrule > 1 && scheduleTimeslots.length > 1" + v-if="schedule.rruleId > 1 && scheduleTimeslots.length > 1" variant="danger" size="sm" @click="deleteSingleTimeslot(schedule.id, timeslot.id)" @@ -179,7 +181,7 @@ </template> <b-button - v-if="schedule.rrule > 1 && scheduleTimeslots.length > 1" + v-if="schedule.rruleId > 1 && scheduleTimeslots.length > 1" variant="danger" size="sm" @click="deleteAllFutureTimeslots(schedule.id, timeslot.id)" @@ -282,33 +284,33 @@ export default { async createRepetitionSchedule() { const { onlyBusinessDays, addNoOfDays } = this.getRepetitionParameters() - const { first_date, rrule, last_date, default_playlist_id, automation_id, by_weekday } = + const { firstDate, rruleId, lastDate, defaultPlaylistId, automationId, byWeekday } = this.schedule - let { time_start, time_end } = this.schedule + let { startTime, endTime } = this.schedule if (this.repetitionTime.length > 0) { const newStartTime = `${this.repetitionTime}:00` const newStartTimeNs = this.hmsToNanoseconds(newStartTime) - const oldStartTimeNs = this.hmsToNanoseconds(time_start) - const oldEndTimeNs = this.hmsToNanoseconds(time_end) + const oldStartTimeNs = this.hmsToNanoseconds(startTime) + const oldEndTimeNs = this.hmsToNanoseconds(endTime) - time_start = newStartTime - time_end = this.prettyNanoseconds(newStartTimeNs + (oldEndTimeNs - oldStartTimeNs)) + startTime = newStartTime + endTime = this.prettyNanoseconds(newStartTimeNs + (oldEndTimeNs - oldStartTimeNs)) } const newSchedule = { schedule: { - first_date, - time_start, - time_end, - rrule, - last_date, - default_playlist_id, - automation_id, - by_weekday, - is_repetition: true, - add_business_days_only: onlyBusinessDays, - add_days_no: parseInt(addNoOfDays, 10), + firstDate, + startTime, + endTime, + rruleId, + lastDate, + defaultPlaylistId, + automationId, + byWeekday, + isRepetition: true, + addBusinessDaysOnly: onlyBusinessDays, + addDaysNo: parseInt(addNoOfDays, 10), }, } @@ -333,8 +335,8 @@ export default { deleteFullSchedule(id) { this.$store.dispatch('shows/deleteSchedule', { - show: this.selectedShow.id, - schedule: id, + showId: this.selectedShow.id, + scheduleId: id, callback: () => { this.$emit('update') this.$refs.modalEmissionManagerEdit.hide() @@ -344,9 +346,9 @@ export default { deleteSingleTimeslot(scheduleId, timeslotId) { this.$store.dispatch('shows/deleteTimeslot', { - show: this.selectedShow.id, - schedule: scheduleId, - timeslot: timeslotId, + showId: this.selectedShow.id, + scheduleId: scheduleId, + timeslotId: timeslotId, callback: () => { this.$emit('update') this.$refs.modalEmissionManagerEdit.hide() @@ -374,9 +376,9 @@ export default { for (const i in toDelete) { this.$log.debug('Deleting timeslot', toDelete[i]) this.$store.dispatch('shows/deleteTimeslot', { - show: this.selectedShow.id, - schedule: scheduleId, - timeslot: toDelete[i], + showId: this.selectedShow.id, + scheduleId: scheduleId, + timeslotId: toDelete[i], callback: () => { this.deletion.count++ this.$log.debug('deleted ' + this.deletion.count + ' timeslots') @@ -393,8 +395,8 @@ export default { loadSchedule(scheduleId) { this.$store.dispatch('shows/fetchSchedule', { - show: this.selectedShow.id, - schedule: scheduleId, + showId: this.selectedShow.id, + scheduleId, callback: () => { this.loadScheduleTimeslots(scheduleId) }, @@ -404,9 +406,9 @@ export default { loadScheduleTimeslots(scheduleId) { this.$store.dispatch('shows/fetchTimeslots', { id: this.selectedShow.id, - schedule: scheduleId, - start: this.schedule.first_date, - end: this.schedule.last_date, + scheduleId, + start: this.schedule.firstDate, + end: this.schedule.lastDate, }) }, @@ -446,7 +448,7 @@ export default { this.timeslot = timeslot this.currentPage = timeslotPage this.$refs.modalEmissionManagerEdit.show() - this.loadSchedule(timeslot.schedule) + this.loadSchedule(timeslot.scheduleId) }, }, } diff --git a/src/components/emissions/ModalResolve.vue b/src/components/emissions/ModalResolve.vue index 5f20accb7d9a1781b103235acc632c478dbc8a81..12064a4967a08e0fa3a82ba0d5c3a4236df5bf8c 100644 --- a/src/components/emissions/ModalResolve.vue +++ b/src/components/emissions/ModalResolve.vue @@ -139,7 +139,7 @@ export default { collisionFields() { return [ - { key: 'show_name', label: this.$t('conflictResolution.showName') }, + { key: 'showName', label: this.$t('conflictResolution.showName') }, { key: 'start', label: this.$t('conflictResolution.from') }, { key: 'end', label: this.$t('conflictResolution.to') }, ] diff --git a/src/components/filemanager/Files.vue b/src/components/filemanager/Files.vue index a0158d7024288b2db0b97243be8e9db6d64cbf22..c44c819715e477e7fb3e83e5fa09e25b04a977b2 100644 --- a/src/components/filemanager/Files.vue +++ b/src/components/filemanager/Files.vue @@ -328,8 +328,8 @@ export default { this.filemeta.title !== file.metadata.title ) { this.$store.dispatch('files/updateFile', { - show: this.selectedShow.slug, - file: this.filemeta.id, + showSlug: this.selectedShow.slug, + fileId: this.filemeta.id, metadata: { artist: this.filemeta.artist ? this.filemeta.artist : null, album: this.filemeta.album ? this.filemeta.album : null, @@ -344,14 +344,14 @@ export default { deleteFile: function (id) { this.$store.dispatch('files/deleteFile', { - show: this.selectedShow.slug, - file: id, + showSlug: this.selectedShow.slug, + fileId: id, }) }, addFile() { this.$store.dispatch('files/addFile', { - show: this.selectedShow.slug, + showSlug: this.selectedShow.slug, addNewFileURI: this.addNewFileURI, uploadSourceURI: this.uploadSourceURI, uploadSourceFile: this.uploadSourceFile, @@ -368,7 +368,7 @@ export default { fetchImports() { this.$store.dispatch('files/fetchImports', { - show: this.selectedShow.slug, + showSlug: this.selectedShow.slug, callback: (response) => { // if all imports are done, we will receive an empty result set and stop // polling the server again. then we can also refetch all file statuses. @@ -406,7 +406,7 @@ export default { }, fetchFiles() { - this.$store.dispatch('files/fetchFiles', { slug: this.selectedShow.slug }) + this.$store.dispatch('files/fetchFiles', { showSlug: this.selectedShow.slug }) }, }, } diff --git a/src/components/filemanager/ImportLog.vue b/src/components/filemanager/ImportLog.vue index cab678260019f7a5252bde51bd94bae2300013a4..137e20a82eef6d000e5a277235c529b998622f02 100644 --- a/src/components/filemanager/ImportLog.vue +++ b/src/components/filemanager/ImportLog.vue @@ -57,8 +57,8 @@ export default { this.error = false this.$bvModal.show('modal-file-manager-log') this.$store.dispatch('files/fetchLog', { - slug: this.selectedShow.slug, - file: fileId, + showSlug: this.selectedShow.slug, + fileId: fileId, callbackCancel: () => { this.error = true }, diff --git a/src/components/filemanager/Jumbotron.vue b/src/components/filemanager/Jumbotron.vue index 625922c1710ba8db86ee542ac5ad1d9720900c8d..88fe88930b5a15aabdde3685798bfd16db7b8784 100644 --- a/src/components/filemanager/Jumbotron.vue +++ b/src/components/filemanager/Jumbotron.vue @@ -10,7 +10,7 @@ <span v-else>{{ $t('loading') }}</span> </template> <template #lead> - <span v-if="loaded.shows">{{ selectedShow.short_description }}</span> + <span v-if="loaded.shows">{{ selectedShow.shortDescription }}</span> </template> <hr /> <div align="center"> diff --git a/src/components/filemanager/Playlists.vue b/src/components/filemanager/Playlists.vue index 88ce239721e6846cc89085b0d67a7a7f306e4e35..dcec9dfbde1f9f8b8ebb4ac6799a7f107833c606 100644 --- a/src/components/filemanager/Playlists.vue +++ b/src/components/filemanager/Playlists.vue @@ -145,8 +145,8 @@ export default { deletePlaylist(id) { // TODO: add mechanism to indicate the running delete request in the files table this.$store.dispatch('playlists/delete', { - slug: this.selectedShow.slug, - id: id, + showSlug: this.selectedShow.slug, + playlistId: id, }) }, }, diff --git a/src/components/images/ImageBrowser.vue b/src/components/images/ImageBrowser.vue index 562b92c2dd41ae8ee0aea44f6ef485c7e6ee5d0b..88237775aa33ba73e848153790c8429d2dd9004e 100644 --- a/src/components/images/ImageBrowser.vue +++ b/src/components/images/ImageBrowser.vue @@ -6,7 +6,7 @@ <li v-for="image in imageStore.items" :key="image.id" class="tw-block"> <ImagePreview :url="image.image" - :alt="image.alt_text ?? ''" + :alt="image.altText ?? ''" class="tw-h-full tw-aspect-square tw-cursor-pointer tw-border tw-border-gray-200 tw-origin-center tw-transition-all tw-ring-blue-200 tw-ring-offset-2 tw-rounded tw-overflow-hidden hover:tw-z-20 hover:tw-ring-4 focus:tw-ring-4 focus:tw-outline-none" tabindex="0" @enter.stop.prevent="emit('input', image)" diff --git a/src/components/images/ImageEditor.vue b/src/components/images/ImageEditor.vue index 30218432584afd6cce0eb8937ff54d9d7be80ecf..70291de4cca9c838a0b2eed7011779b9229b1640 100644 --- a/src/components/images/ImageEditor.vue +++ b/src/components/images/ImageEditor.vue @@ -11,7 +11,7 @@ {{ t('image.altText') }} <textarea ref="descriptionEl" - v-model="image.alt_text" + v-model="image.altText" rows="1" class="form-control" ></textarea> @@ -48,7 +48,7 @@ const image = useUpdatableState<Image | NewImage>( (image) => ({ ...image }), ) -const { textarea: descriptionEl } = useTextareaAutosize({ watch: () => image.value.alt_text }) +const { textarea: descriptionEl } = useTextareaAutosize({ watch: () => image.value.altText }) </script> <script lang="ts"> diff --git a/src/components/images/ImagePickerDialog.vue b/src/components/images/ImagePickerDialog.vue index 0f87e2f1f30d776b5d03684b4139a4923aecdd63..88067e4ecfa0444fa26d74725c16f8bca1a47eb3 100644 --- a/src/components/images/ImagePickerDialog.vue +++ b/src/components/images/ImagePickerDialog.vue @@ -112,7 +112,7 @@ const { isProcessing: isSaving, fn: saveAndSelectImage } = useAsyncFunction( error.value = undefined const data = new FormData() data.set('ppoi', image.ppoi) - data.set('alt_text', image.alt_text ?? '') + data.set('altText', image.altText ?? '') data.set('credits', image.credits ?? '') let newOrUpdatedImage: Image try { diff --git a/src/components/images/ImageUploader.vue b/src/components/images/ImageUploader.vue index 07017dc1d5517f98fd45051c5c73308aa6d09967..56810a12ed63755847b82bac685b7480d7898ec6 100644 --- a/src/components/images/ImageUploader.vue +++ b/src/components/images/ImageUploader.vue @@ -47,7 +47,7 @@ function newImage(file: File, content: string): NewImage { return { image: content, file, - alt_text: file.name, + altText: file.name, credits: '', width: 0, height: 0, diff --git a/src/components/shows/AddShowModal.vue b/src/components/shows/AddShowModal.vue index 75949975ac7917734f153d8959019ea5d5c15283..86963b1d847c9cf7665c2c5ba5a25088116ef746 100644 --- a/src/components/shows/AddShowModal.vue +++ b/src/components/shows/AddShowModal.vue @@ -30,7 +30,7 @@ <b-col cols="3"> {{ $t('showMeta.shortDescription') }}: </b-col> <b-col cols="9"> <b-form-input - v-model="newShow.short_description" + v-model="newShow.shortDescription" type="text" data-testid="add-show-modal:show-description" :placeholder="$t('showMeta.shortDescriptionPlaceholder')" @@ -47,7 +47,7 @@ </div> <div v-else> <b-form-select - v-model="newShow.type" + v-model="newShow.typeId" :options="showTypeSelector" data-testid="add-show-modal:show-type" /> @@ -68,7 +68,7 @@ </div> <div v-else> <b-form-select - v-model="newShow.funding_category" + v-model="newShow.fundingCategoryId" :options="showFundingCategorySelector" data-testid="add-show-modal:show-funding-category" /> @@ -98,15 +98,15 @@ export default { newShow: { name: '', slug: '', - short_description: '', - type: 0, - funding_category: 0, - category: [], - hosts: [], - owners: [], - language: [], - topic: [], - music_focus: [], + shortDescription: '', + typeId: 0, + fundingCategoryId: 0, + categoryIds: [], + hostIds: [], + ownerIds: [], + languageIds: [], + topicIds: [], + musicFocusIds: [], }, } }, @@ -149,19 +149,19 @@ export default { // it out through the existing show manager modals, after the show is created addShow() { // only try to add a new show if name and short description are filled out - if (this.newShow.name.trim() === '' || this.newShow.short_description.trim() === '') { + if (this.newShow.name.trim() === '' || this.newShow.shortDescription.trim() === '') { // TODO: make this nicer UI-wise (red text annotations next to input fields instead of simple alert) alert('Please provide at least a title and a short description for this show.') return } // also the type and funding category have to be set - if (this.types.findIndex((type) => type.id === this.newShow.type) === -1) { + if (this.types.findIndex((type) => type.id === this.newShow.typeId) === -1) { // TODO: make this nicer UI-wise (red text annotations next to input fields instead of simple alert) alert('Please choose a type for this show.') return } if ( - this.fundingCategories.findIndex((cat) => cat.id === this.newShow.funding_category) === -1 + this.fundingCategories.findIndex((cat) => cat.id === this.newShow.fundingCategoryId) === -1 ) { // TODO: make this nicer UI-wise (red text annotations next to input fields instead of simple alert) alert('Please choose a funding category for this show.') @@ -185,7 +185,7 @@ export default { openModal() { this.newShow.name = '' this.newShow.slug = '' - this.newShow.short_description = '' + this.newShow.shortDescription = '' this.$refs.modalAddShow.show() }, }, diff --git a/src/components/shows/FallbackSelector.vue b/src/components/shows/FallbackSelector.vue index 9686320bec447bca88c8c4bb7515910d38d54c94..9e1d712c12d5aef70a8ef672d902c44aea2494d6 100644 --- a/src/components/shows/FallbackSelector.vue +++ b/src/components/shows/FallbackSelector.vue @@ -7,13 +7,13 @@ > <p v-if="loaded"> {{ $t('playlistSelector.currentPlaylistLabel') }}: - <span v-if="selectedShow.default_playlist_id === null"> + <span v-if="selectedShow.defaultPlaylistId === null"> <i ><small>{{ $t('noneSetFeminine') }}</small></i > </span> <span v-else> - {{ selectedShow.default_playlist_id }}, + {{ selectedShow.defaultPlaylistId }}, <br /> <span v-if="currentPlaylistDescription"> {{ $t('showMeta.description') }}: <b>{{ currentPlaylistDescription }}</b> @@ -49,7 +49,7 @@ <template #cell(actions)="data"> <b-button-group size="sm"> <b-button - v-if="data.item.id !== selectedShow.default_playlist_id" + v-if="data.item.id !== selectedShow.defaultPlaylistId" variant="info" @click="choose(data.item.id)" > @@ -106,9 +106,9 @@ export default { currentPlaylistDescription() { let description = false - if (this.selectedShow.default_playlist_id !== null) { + if (this.selectedShow.defaultPlaylistId !== null) { const choosenList = this.playlists.find( - (list) => list.id === this.selectedShow.default_playlist_id, + (list) => list.id === this.selectedShow.defaultPlaylistId, ) if (choosenList && choosenList.description.length > 0) { description = choosenList.description diff --git a/src/components/shows/Jumbotron.vue b/src/components/shows/Jumbotron.vue index 4a50ab1c76599630bf3570d27a2e7b3f142bf9f5..9bd1bb0398651ac4fa4be2b33ca58febac5dcb5a 100644 --- a/src/components/shows/Jumbotron.vue +++ b/src/components/shows/Jumbotron.vue @@ -15,7 +15,7 @@ </template> <!-- The short description of the show goes into the jumbotron lead --> <template #lead> - <span v-if="loaded.shows">{{ selectedShow.short_description }}</span> + <span v-if="loaded.shows">{{ selectedShow.shortDescription }}</span> <img src="/assets/edit.svg" class="tw-w-6 tw-cursor-pointer" @@ -44,7 +44,7 @@ </div> <div v-if="isSuperuser" align="center"> - <div v-if="selectedShow.is_active"> + <div v-if="selectedShow.isActive"> <b-button variant="danger" size="sm" @click="openModalDeactivate()"> {{ $t('showJumbotron.deactivateShow') }} </b-button> @@ -168,8 +168,8 @@ export default { this.$refs.modalName.show() }, openModalShortDescription() { - if (this.selectedShow.short_description !== null) { - this.string = this.selectedShow.short_description + if (this.selectedShow.shortDescription !== null) { + this.string = this.selectedShow.shortDescription } else { this.string = '' } @@ -208,7 +208,7 @@ export default { }, saveShortDescription(event) { - this.saveProperty('short_description', this.string, this.$refs.modalShortDescription, event) + this.saveProperty('shortDescription', this.string, this.$refs.modalShortDescription, event) }, saveDescription(event) { @@ -216,11 +216,11 @@ export default { }, deactivateShow(event) { - this.saveProperty('is_active', false, this.$refs.modalDeactivate, event) + this.saveProperty('isActive', false, this.$refs.modalDeactivate, event) }, activateShow() { - this.saveProperty('is_active', true, null, event) + this.saveProperty('isActive', true, null, event) }, }, } diff --git a/src/components/shows/MetaArrays.vue b/src/components/shows/MetaArrays.vue index 8e373ceefde5edde603ecf8b92494fbb9c69b73f..04bac84a95d7c4cfb7f88ef7e72b25c163339c1a 100644 --- a/src/components/shows/MetaArrays.vue +++ b/src/components/shows/MetaArrays.vue @@ -279,8 +279,8 @@ import { mapGetters } from 'vuex' import { mapStores } from 'pinia' import { useAuthStore } from '@/stores/auth' -function mapChoices({ id, is_active, name }) { - return { value: id, text: name, disabled: !is_active } +function mapChoices({ id, isActive, name }) { + return { value: id, text: name, disabled: !isActive } } function getUsedObjects(objectIds, objects) { @@ -319,31 +319,31 @@ export default { return this.categories.map(mapChoices) }, categoryNames() { - return getUsedObjects(this.selectedShow.category, this.categories) + return getUsedObjects(this.selectedShow.categoryIds, this.categories) }, topicSelector() { return this.topics.map(mapChoices) }, topicNames() { - return getUsedObjects(this.selectedShow.topic, this.topics) + return getUsedObjects(this.selectedShow.topicIds, this.topics) }, musicFocusSelector() { return this.musicFocus.map(mapChoices) }, musicFocusNames() { - return getUsedObjects(this.selectedShow.music_focus, this.musicFocus) + return getUsedObjects(this.selectedShow.musicFocusIds, this.musicFocus) }, languageSelector() { return this.languages.map(mapChoices) }, languageNames() { - return getUsedObjects(this.selectedShow.language, this.languages) + return getUsedObjects(this.selectedShow.languageIds, this.languages) }, hostSelector() { return this.hosts.map(mapChoices) }, hostNames() { - return getUsedObjects(this.selectedShow.hosts, this.hosts) + return getUsedObjects(this.selectedShow.hostIds, this.hosts) }, ...mapGetters({ selectedShow: 'shows/selectedShow', @@ -356,23 +356,23 @@ export default { }, methods: { openModalCategories() { - this.array = this.selectedShow.category + this.array = this.selectedShow.categoryIds this.$refs.modalCategories.show() }, openModalTopics() { - this.array = this.selectedShow.topic + this.array = this.selectedShow.topicIds this.$refs.modalTopics.show() }, openModalMusicFocus() { - this.array = this.selectedShow.music_focus + this.array = this.selectedShow.musicFocusIds this.$refs.modalMusicFocus.show() }, openModalLanguages() { - this.array = this.selectedShow.language + this.array = this.selectedShow.languageIds this.$refs.modalLanguages.show() }, openModalHosts() { - this.array = this.selectedShow.hosts + this.array = this.selectedShow.hostIds this.$refs.modalHosts.show() }, @@ -394,19 +394,19 @@ export default { }, saveCategories(event) { - this.saveArray('category', this.array, this.$refs.modalCategories, event) + this.saveArray('categoryIds', this.array, this.$refs.modalCategories, event) }, saveTopics(event) { - this.saveArray('topic', this.array, this.$refs.modalTopics, event) + this.saveArray('topicIds', this.array, this.$refs.modalTopics, event) }, saveMusicFocus(event) { - this.saveArray('music_focus', this.array, this.$refs.modalMusicFocus, event) + this.saveArray('musicFocusIds', this.array, this.$refs.modalMusicFocus, event) }, saveLanguages(event) { - this.saveArray('language', this.array, this.$refs.modalLanguages, event) + this.saveArray('languageIds', this.array, this.$refs.modalLanguages, event) }, saveHosts(event) { - this.saveArray('hosts', this.array, this.$refs.modalHosts, event) + this.saveArray('hostIds', this.array, this.$refs.modalHosts, event) }, }, } diff --git a/src/components/shows/MetaImages.vue b/src/components/shows/MetaImages.vue index 01f4d43ea4172bcb404b6ccbc2f8e98e08a48563..2e83e2b1c7f3c45a7e74d168f5c5481f36546842 100644 --- a/src/components/shows/MetaImages.vue +++ b/src/components/shows/MetaImages.vue @@ -27,14 +27,14 @@ const store = useStore() const { t } = useI18n() const selectedShow = useSelectedShow() const logoId = useUpdatableState( - computed(() => selectedShow.value.logo), - (imageId) => updateImage('logo', imageId), + computed(() => selectedShow.value.logoId), + (imageId) => updateImage('logoId', imageId), ) const imageId = useUpdatableState( - computed(() => selectedShow.value.image), - (imageId) => updateImage('image', imageId), + computed(() => selectedShow.value.imageId), + (imageId) => updateImage('imageId', imageId), ) -async function updateImage(property: 'logo' | 'image', imageId: number | null) { +async function updateImage(property: 'logoId' | 'imageId', imageId: number | null) { await store.dispatch('shows/updateProperty', { id: selectedShow.value.id, property, diff --git a/src/components/shows/MetaOwners.vue b/src/components/shows/MetaOwners.vue index 4360b28e1aa6351b47ad2b70fefb138a1587c4a0..7d937325d9c14d9b0465a4d0a824583bb0e3a54d 100644 --- a/src/components/shows/MetaOwners.vue +++ b/src/components/shows/MetaOwners.vue @@ -13,7 +13,7 @@ </b-col> <b-col lg="9"> <div v-if="users.length > 0"> - <p v-if="selectedShow.owners.length === 0"> + <p v-if="selectedShow.ownerIds.length === 0"> <small ><i>{{ $t('showMeta.owners') }}</i></small > @@ -21,7 +21,7 @@ <!-- TODO: make link on name; when user clicks, open modal to edit host --> <ul v-else> <li v-for="owner in ownerDetails" :key="owner.id"> - {{ owner.first_name }} {{ owner.last_name }} + {{ owner.firstName }} {{ owner.lastName }} <b-badge variant="light"> {{ $t('showMeta.username') }}: </b-badge> <small>{{ owner.username }}</small> @@ -61,7 +61,7 @@ <div v-else> <b-table striped hover :items="owners" :fields="ownersTableFields"> <template #cell(name)="data"> - {{ data.item.first_name }} {{ data.item.last_name }} + {{ data.item.firstName }} {{ data.item.lastName }} </template> <template #cell(username)="data"> <small>{{ data.value }}</small> @@ -86,7 +86,7 @@ <p>{{ $t('showMeta.addNewUsers') }}:</p> <b-table striped hover :items="users" :fields="ownersTableFields"> <template #cell(name)="data"> - {{ data.item.first_name }} {{ data.item.last_name }} + {{ data.item.firstName }} {{ data.item.lastName }} </template> <template #cell(username)="data"> <small>{{ data.value }}</small> @@ -135,7 +135,7 @@ export default { ownerDetails() { const owners = [] - for (const id of this.selectedShow.owners) { + for (const id of this.selectedShow.ownerIds) { owners.push(this.users.find((o) => o.id === id)) } return owners @@ -159,7 +159,7 @@ export default { methods: { openModalOwners() { this.owners = [] - for (const id of this.selectedShow.owners) { + for (const id of this.selectedShow.ownerIds) { this.owners.push(this.users.find((o) => o.id === id)) } this.$refs.modalOwners.show() @@ -167,14 +167,10 @@ export default { saveOwners(event) { event.preventDefault() - const newOwners = [] - for (const i in this.owners) { - newOwners.push(this.owners[i].id) - } this.$store.dispatch('shows/updateProperty', { id: this.selectedShow.id, - property: 'owners', - value: newOwners, + property: 'ownerIds', + value: this.owners.map(({ id }) => id), callback: () => { this.$refs.modalOwners.hide() }, diff --git a/src/components/shows/MetaSimpleTypes.vue b/src/components/shows/MetaSimpleTypes.vue index 173da46d950cab6db3a712135cfceddd8bc18731..b276514b3c2de13987208a82daca496579848cad 100644 --- a/src/components/shows/MetaSimpleTypes.vue +++ b/src/components/shows/MetaSimpleTypes.vue @@ -26,7 +26,7 @@ </b-badge> <!-- TODO: discuss: should this be visible to show owners or only to administrators? --> <span v-if="loaded.types"> - <span v-if="selectedShow.type === null" + <span v-if="selectedShow.typeId === null" ><small ><i>{{ $t('noneSetFeminine') }}</i></small ></span @@ -73,7 +73,7 @@ <!-- TODO: discuss: should this be visible to show owners or only to administrators? --> <!-- TODO: fetch name for predecessor from steering api --> <b-badge variant="light"> {{ $t('showMeta.predecessor') }}: </b-badge> - <span v-if="selectedShow.predecessor === null" + <span v-if="selectedShow.predecessorId === null" ><small ><i>{{ $t('showMeta.noPredecessor') }}</i></small ></span @@ -91,12 +91,12 @@ <b-col lg="6"> <p> <b-badge variant="light"> {{ $t('showMeta.cbaSeriesId') }}: </b-badge> - <span v-if="selectedShow.cba_series_id === null" + <span v-if="selectedShow.cbaSeriesId === null" ><small ><i>{{ $t('noneSetFeminine') }}</i></small ></span > - <span v-else>{{ selectedShow.cba_series_id }}</span> + <span v-else>{{ selectedShow.cbaSeriesId }}</span> <img src="/assets/edit.svg" class="tw-w-4 tw-cursor-pointer" @@ -109,7 +109,7 @@ <b-col lg="6"> <p> <b-badge variant="light"> {{ $t('showMeta.defaultPlaylistId') }}: </b-badge> - <span v-if="!selectedShow.default_playlist_id" + <span v-if="!selectedShow.defaultPlaylistId" ><small ><i>{{ $t('noneSetFeminine') }}</i></small ></span @@ -266,10 +266,10 @@ export default { }, fundingCategorySelector: function () { - return this.fundingCategories.map(({ id, is_active, name }) => ({ + return this.fundingCategories.map(({ id, isActive, name }) => ({ value: id, text: name, - disabled: !is_active, + disabled: !isActive, })) }, @@ -282,7 +282,7 @@ export default { // loading our initial shows as well. predecessorName: function () { for (const show of this.shows) { - if (show.id === this.selectedShow.predecessor) { + if (show.id === this.selectedShow.predecessorId) { return show.name } } @@ -299,11 +299,11 @@ export default { }, type: function () { - return this.types.find((t) => t.id === this.selectedShow.type)?.name ?? null + return this.types.find((t) => t.id === this.selectedShow.typeId)?.name ?? null }, fundingCategory: function () { const { selectedShow, fundingCategories } = this - return fundingCategories.find((c) => c.id === selectedShow.funding_category)?.name ?? null + return fundingCategories.find((c) => c.id === selectedShow.fundingCategoryId)?.name ?? null }, validId() { @@ -311,9 +311,9 @@ export default { }, fallbackInfo() { - const list = this.playlists.find((p) => p.id === this.selectedShow.default_playlist_id) + const list = this.playlists.find((p) => p.id === this.selectedShow.defaultPlaylistId) if (!list) { - return this.selectedShow.default_playlist_id + return this.selectedShow.defaultPlaylistId } else { return list.description + ' (ID: ' + list.id + ')' } @@ -339,7 +339,7 @@ export default { }, openModalCBAid() { - this.id = this.selectedShow.cba_series_id + this.id = this.selectedShow.cbaSeriesId this.$refs.modalCBAid.show() }, @@ -348,17 +348,17 @@ export default { }, openModalPredecessor() { - this.id = this.selectedShow.predecessor + this.id = this.selectedShow.predecessorId this.$refs.modalPredecessor.show() }, openModalFundingCategory() { - this.id = this.selectedShow.funding_category + this.id = this.selectedShow.fundingCategoryId this.$refs.modalFundingCategory.show() }, openModalType() { - this.id = this.selectedShow.type + this.id = this.selectedShow.typeId this.$refs.modalType.show() }, @@ -394,7 +394,7 @@ export default { saveCBAid(event) { if (this.validId) { const id = this.id === '' ? null : this.id - this.saveProperty('cba_series_id', id, this.$refs.modalCBAid, event) + this.saveProperty('cbaSeriesId', id, this.$refs.modalCBAid, event) } else { event.preventDefault() alert(this.$t('showMeta.invalidCbaSeriesId')) @@ -402,21 +402,21 @@ export default { }, saveFallback(id) { - this.saveProperty('default_playlist_id', id, this.$refs.modalFallback) + this.saveProperty('defaultPlaylistId', id, this.$refs.modalFallback) this.$log.debug(this.playlists) }, savePredecessor(event) { const id = this.id === '' ? null : this.id - this.saveProperty('predecessor', id, this.$refs.modalPredecessor, event) + this.saveProperty('predecessorId', id, this.$refs.modalPredecessor, event) }, saveFundingCategory(event) { - this.saveProperty('funding_category', this.id, this.$refs.modalFundingCategory, event) + this.saveProperty('fundingCategoryId', this.id, this.$refs.modalFundingCategory, event) }, saveShowType(event) { - this.saveProperty('type', this.id, this.$refs.modalType, event) + this.saveProperty('typeId', this.id, this.$refs.modalType, event) }, // Just a placeholder function we can use in the UI, to signal if something diff --git a/src/components/shows/NoteEditorModal.vue b/src/components/shows/NoteEditorModal.vue index eaeb2ddc03e48fc19701f1f5033604ff92a7496d..b0f2ba0a02a12b175d0f5542cd7c8f245b3ba856 100644 --- a/src/components/shows/NoteEditorModal.vue +++ b/src/components/shows/NoteEditorModal.vue @@ -47,8 +47,8 @@ </template> </FormGroup> - <FormGroup :label="t('noteEditor.image')" :errors="errors.image" custom-control> - <ImagePicker v-model="noteData.image" class="tw-flex-none tw-w-min" /> + <FormGroup :label="t('noteEditor.image')" :errors="errors.imageId" custom-control> + <ImagePicker v-model="noteData.imageId" class="tw-flex-none tw-w-min" /> </FormGroup> </FormTable> </template> @@ -67,7 +67,7 @@ </template> <script lang="ts" setup> -import { computed, ref, toRefs, watchEffect } from 'vue' +import { computed, ref, watchEffect } from 'vue' import { useTextareaAutosize } from '@vueuse/core' import { useAPIObject, useServerErrors } from '@/api' import { useI18n } from '@/i18n' diff --git a/src/components/shows/PlaylistSelector.vue b/src/components/shows/PlaylistSelector.vue index 4edeb6634eb20b02081b58ae31b3101111e9b2cf..2b15a38c9f3a6c447aec554bd25bc28e22bc539c 100644 --- a/src/components/shows/PlaylistSelector.vue +++ b/src/components/shows/PlaylistSelector.vue @@ -9,13 +9,13 @@ <p v-if="loaded"> {{ $t('playlistSelector.currentPlaylistLabel') }}: - <span v-if="timeslot === null || timeslot.playlist_id === null"> + <span v-if="timeslot === null || timeslot.playlistId === null"> <i ><small>{{ $t('noneSetFeminine') }}</small></i > </span> <span v-else> - {{ timeslot.playlist_id }}<br /> + {{ timeslot.playlistId }}<br /> <span v-if="currentPlaylistDescription"> {{ $t('showMeta.description') }}: <b>{{ currentPlaylistDescription }}</b></span > @@ -54,7 +54,7 @@ <template #cell(actions)="data"> <b-button-group size="sm"> <b-button - v-if="data.item.id !== timeslot.playlist_id" + v-if="data.item.id !== timeslot.playlistId" variant="info" @click="choose(data)" > @@ -151,8 +151,8 @@ export default { currentPlaylistDescription() { let description = false - if (this.timeslot && this.timeslot.playlist_id !== null) { - const choosenList = this.playlists.find((list) => list.id === this.timeslot.playlist_id) + if (this.timeslot && this.timeslot.playlistId !== null) { + const choosenList = this.playlists.find((list) => list.id === this.timeslot.playlistId) if (choosenList && choosenList.description.length > 0) { description = choosenList.description } @@ -180,7 +180,7 @@ export default { this.audioUpload = false this.$store.dispatch('files/addFile', { - show: this.selectedShow.slug, + showSlug: this.selectedShow.slug, uploadSourceFile: this.audioFile, callback: this.handleUploadedFile, }) @@ -188,7 +188,7 @@ export default { handleUploadedFile() { this.$store.dispatch('files/fetchFiles', { - slug: this.selectedShow.slug, + showSlug: this.selectedShow.slug, callback: this.createPlaylistForUploadedFile, }) }, @@ -230,10 +230,10 @@ export default { if (confirmed) { const ts = { ...this.timeslot } - ts.playlist_id = id + ts.playlistId = id this.$store.dispatch('shows/updateTimeslot', { - show: this.selectedShow.id, - schedule: this.scheduleId, + showId: this.selectedShow.id, + scheduleId: this.scheduleId, timeslot: ts, callback: () => { this.timeslot = this.getTimeslotById(ts.id) diff --git a/src/components/shows/Schedules.vue b/src/components/shows/Schedules.vue index af6c56f67120490be2bbe6660f2ecf1f54c4d012..0fa47e3875c8cd1d8b2cb2eadae134de583496b2 100644 --- a/src/components/shows/Schedules.vue +++ b/src/components/shows/Schedules.vue @@ -31,11 +31,11 @@ {{ renderRruleForSchedule(schedule) }} </td> <td class="text-right"> - <template v-if="schedule.first_date === schedule.last_date"> - {{ prettyDate(parseISO(schedule.first_date)) }} <br /> + <template v-if="schedule.firstDate === schedule.lastDate"> + {{ prettyDate(parseISO(schedule.firstDate)) }} <br /> </template> - {{ prettyHours(schedule.start_time) }} - {{ prettyHours(schedule.end_time) }} + {{ prettyHours(schedule.startTime) }} - {{ prettyHours(schedule.endTime) }} </td> </tr> </tbody> @@ -73,29 +73,29 @@ const isCollapsed = ref(true) function isPossiblyPastSchedule(schedule) { // Recurrence rules get very complex very fast, so we only give - // a definitive answer if a last_date is set for this schedule. - if (!schedule.last_date) { + // a definitive answer if a lastDate is set for this schedule. + if (!schedule.lastDate) { return false } - const lastDate = parseISO(schedule.last_date) - const [hours, minutes, seconds] = (schedule.end_time ?? '00:00:00').split(':') + const lastDate = parseISO(schedule.lastDate) + const [hours, minutes, seconds] = (schedule.endTime ?? '00:00:00').split(':') lastDate.setHours(parseInt(hours ?? '0'), parseInt(minutes ?? '0'), parseInt(seconds ?? '0')) return new Date() > lastDate } function updateSchedules() { if (selectedShow.value) { - store.dispatch('shows/fetchSchedules', { show: selectedShow.value.id }) + store.dispatch('shows/fetchSchedules', { showId: selectedShow.value.id }) } } function renderRruleForSchedule(schedule) { - if (schedule.rrule < 3) { - return uppercaseFirst(rruleRender(schedule.rrule)) + if (schedule.rruleId < 3) { + return uppercaseFirst(rruleRender(schedule.rruleId)) } - const rrule = uppercaseFirst(rruleRender(schedule.rrule)) - const weekday = lowercaseFirst(prettyWeekday(schedule.by_weekday)) + const rrule = uppercaseFirst(rruleRender(schedule.rruleId)) + const weekday = lowercaseFirst(prettyWeekday(schedule.byWeekday)) return `${rrule} ${weekday}s` } diff --git a/src/components/shows/ShowSelector.vue b/src/components/shows/ShowSelector.vue index 914f073b8c4de4db16f4365c37bbc4110f8ccc59..c8db634aa70b2d55c66d04a0ae81fc0aa3c704e9 100644 --- a/src/components/shows/ShowSelector.vue +++ b/src/components/shows/ShowSelector.vue @@ -20,13 +20,13 @@ </span> </p> <span - v-if="!show.is_active" + v-if="!show.isActive" class="tw-text-sm tw-rounded-full tw-bg-black/10 tw-text-black/75 tw-px-2 tw-inline-block tw-float-right tw-m-0 tw-ml-1 tw-mb-1" > {{ t('showSelector.showState.inactive') }} </span> <p v-show="activeIndex === index" class="tw-my-1 tw-text-sm tw-opacity-90"> - {{ show.short_description }} + {{ show.shortDescription }} </p> <span class="tw-clear-both" /> </li> @@ -75,9 +75,9 @@ import AddShowModal from '@/components/shows/AddShowModal.vue' type Show = { id: number - is_active: boolean + isActive: boolean name: string - short_description: string + shortDescription: string } const keys = useMagicKeys() @@ -94,13 +94,13 @@ const areShowsLoading = computed(() => !store.state.shows.loaded.shows) const hasShows = computed(() => shows.value.length > 0) const sortedShows = computed(() => { return sort(shows.value).by([ - { desc: (show) => show.is_active }, + { desc: (show) => show.isActive }, { asc: (show) => show.name.toLowerCase() }, ]) }) const filteredShows = computed(() => { return sortedShows.value - .filter((show) => (filterActive.value !== null ? show.is_active === filterActive.value : true)) + .filter((show) => (filterActive.value !== null ? show.isActive === filterActive.value : true)) .filter( (show) => show.name.toLocaleLowerCase().includes(showSearchQuery.value) || diff --git a/src/components/shows/TimeSlotRow.vue b/src/components/shows/TimeSlotRow.vue index d0745661044a1abe2aee6804a238dfbc30d3776d..92c14bfa22baf50db344d2a1f0ddc76fb1826582 100644 --- a/src/components/shows/TimeSlotRow.vue +++ b/src/components/shows/TimeSlotRow.vue @@ -99,13 +99,13 @@ const store = useStore() const noteStore = useNoteStore() // TODO: once the timeslot store is migrated to pinia we actually want to trigger // an API update for this timeslot. -const localNoteId = ref(props.timeslot.note_id) +const localNoteId = ref(props.timeslot.noteId) const { obj: note, isLoading: isLoadingNote } = useAPIObject<Note>(noteStore, localNoteId) -const noteImage = useImage(computed(() => note.value?.image ?? null)) +const noteImage = useImage(computed(() => note.value?.imageId ?? null)) const time = computed(() => prettyDuration(props.timeslot.start, props.timeslot.end)) const playlist = computed<{ id: number; description: string } | null>(() => - props.timeslot.playlist_id - ? store.getters['playlists/getPlaylistById'](props.timeslot.playlist_id) ?? null + props.timeslot.playlistId + ? store.getters['playlists/getPlaylistById'](props.timeslot.playlistId) ?? null : null, ) const rowClass = computed(() => { @@ -126,7 +126,7 @@ function editNote() { } function editPlaylist() { - playlistModal.value.open(props.timeslot.schedule, props.timeslot.id) + playlistModal.value.open(props.timeslot.scheduleId, props.timeslot.id) } </script> diff --git a/src/steering-types.ts b/src/steering-types.ts index e69ee8ee9502ef11d8f2d60eeb9d0db8b1661ddd..6c62882bf43dd2a6e3a32374249742c29aca66a3 100644 --- a/src/steering-types.ts +++ b/src/steering-types.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /* - * This file was auto-generated by `make update-types` at 2023-04-04 14:48:55.450Z. + * This file was auto-generated by `make update-types` at 2023-06-08 12:39:02.896Z. * DO NOT make changes to this file. */ @@ -54,16 +54,31 @@ export interface paths { patch: operations['hosts_partial_update'] } '/api/v1/images/': { + /** List all images. */ get: operations['images_list'] - /** @description Create an Image instance. Any user can create an image. */ + /** + * Create a new image. + * @description Create an Image instance. Any user can create an image. + */ post: operations['images_create'] } '/api/v1/images/{id}/': { + /** Retrieve a single image. */ get: operations['images_retrieve'] - /** @description Update an Image instance. Only the creator can update an image. */ + /** + * Update an existing image. + * @description Only `alt_text`, `credits`, and `ppoi` can be updated. + */ put: operations['images_update'] - /** @description Destroy an Image instance. Only the owner can delete an image. */ + /** + * Delete an existing image. + * @description Destroy an Image instance. Only the owner can delete an image. + */ delete: operations['images_destroy'] + /** + * Partially update an existing image. + * @description Only `alt_text`, `credits`, and `ppoi` can be updated. + */ patch: operations['images_partial_update'] } '/api/v1/languages/': { @@ -133,24 +148,15 @@ export interface paths { '/api/v1/notes/': { /** List all notes. */ get: operations['notes_list'] - /** - * Create a new note. - * @description Only admins can create new notes. - */ + /** Create a new note. */ post: operations['notes_create'] } '/api/v1/notes/{id}/': { /** Retrieve a single note. */ get: operations['notes_retrieve'] - /** - * Update an existing note. - * @description Only admins can update existing notes. - */ + /** Update an existing note. */ put: operations['notes_update'] - /** - * Delete an existing note. - * @description Only admins can delete existing notes. - */ + /** Delete an existing note. */ delete: operations['notes_destroy'] /** * Partially update an existing note. @@ -262,24 +268,15 @@ export interface paths { '/api/v1/shows/{show_pk}/notes/': { /** List all notes. */ get: operations['shows_notes_list'] - /** - * Create a new note. - * @description Only admins can create new notes. - */ + /** Create a new note. */ post: operations['shows_notes_create'] } '/api/v1/shows/{show_pk}/notes/{id}/': { /** Retrieve a single note. */ get: operations['shows_notes_retrieve'] - /** - * Update an existing note. - * @description Only admins can update existing notes. - */ + /** Update an existing note. */ put: operations['shows_notes_update'] - /** - * Delete an existing note. - * @description Only admins can delete existing notes. - */ + /** Delete an existing note. */ delete: operations['shows_notes_destroy'] /** * Partially update an existing note. @@ -367,24 +364,15 @@ export interface paths { '/api/v1/shows/{show_pk}/schedules/{schedule_pk}/timeslots/{timeslot_pk}/note/': { /** List all notes. */ get: operations['shows_schedules_timeslots_note_list'] - /** - * Create a new note. - * @description Only admins can create new notes. - */ + /** Create a new note. */ post: operations['shows_schedules_timeslots_note_create'] } '/api/v1/shows/{show_pk}/schedules/{schedule_pk}/timeslots/{timeslot_pk}/note/{id}/': { /** Retrieve a single note. */ get: operations['shows_schedules_timeslots_note_retrieve'] - /** - * Update an existing note. - * @description Only admins can update existing notes. - */ + /** Update an existing note. */ put: operations['shows_schedules_timeslots_note_update'] - /** - * Delete an existing note. - * @description Only admins can delete existing notes. - */ + /** Delete an existing note. */ delete: operations['shows_schedules_timeslots_note_destroy'] /** * Partially update an existing note. @@ -417,24 +405,15 @@ export interface paths { '/api/v1/shows/{show_pk}/timeslots/{timeslot_pk}/note/': { /** List all notes. */ get: operations['shows_timeslots_note_list'] - /** - * Create a new note. - * @description Only admins can create new notes. - */ + /** Create a new note. */ post: operations['shows_timeslots_note_create'] } '/api/v1/shows/{show_pk}/timeslots/{timeslot_pk}/note/{id}/': { /** Retrieve a single note. */ get: operations['shows_timeslots_note_retrieve'] - /** - * Update an existing note. - * @description Only admins can update existing notes. - */ + /** Update an existing note. */ put: operations['shows_timeslots_note_update'] - /** - * Delete an existing note. - * @description Only admins can delete existing notes. - */ + /** Delete an existing note. */ delete: operations['shows_timeslots_note_destroy'] /** * Partially update an existing note. @@ -557,10 +536,10 @@ export interface components { Category: { description?: string id: number - is_active?: boolean + isActive?: boolean name: string slug: string - subtitle?: string | null + subtitle?: string } Collision: { id: number @@ -568,23 +547,23 @@ export interface components { start: string /** Format: date-time */ end: string - playlist_id: number | null - show: number - show_name: string - repetition_of: number | null - schedule: number + playlistId: number | null + showId: number + showName: string + repetitionOfId: number | null + scheduleId: number memo: string - note_id: number | null + noteId: number | null } DryRunTimeSlot: { id: number | null - schedule: number | null - playlist_id: number | null + scheduleId: number | null + playlistId: number | null /** Format: date */ start: string /** Format: date */ end: string - repetition_of: number | null + repetitionOfId: number | null memo: string } Error: { @@ -593,25 +572,25 @@ export interface components { } FundingCategory: { id: number - is_active?: boolean + isActive?: boolean name: string slug: string } Host: { - biography?: string | null + biography?: string /** Format: email */ email?: string id: number - image?: number - is_active?: boolean + imageId?: number | null + isActive?: boolean links?: components['schemas']['HostLink'][] name: string /** Format: date-time */ - created_at: string - created_by: string + createdAt: string + createdBy: string /** Format: date-time */ - updated_at: string | null - updated_by: string | null + updatedAt: string | null + updatedBy: string } HostLink: { type: string @@ -619,19 +598,25 @@ export interface components { url: string } Image: { - alt_text?: string | null - credits?: string | null + altText?: string + credits?: string /** Format: uri */ image?: string | null + ppoi?: string height: number | null id: number - ppoi: string - thumbnails: readonly string[] + thumbnails: readonly { + /** Format: double */ + width: number + /** Format: double */ + height: number + url: string + }[] width: number | null } Language: { id: number - is_active?: boolean + isActive?: boolean name: string } LicenseType: { @@ -648,29 +633,30 @@ export interface components { } MusicFocus: { id: number - is_active?: boolean + isActive?: boolean name: string slug: string } Note: { - cba_id?: number | null + cbaId?: number | null content: string - contributors: number[] - image?: number + contributorIds: number[] + id: number + imageId?: number | null links?: components['schemas']['NoteLink'][] - owner: number - playlist?: string | null + ownerId: number + playlistId?: number slug: string summary?: string - tags?: string | null - timeslot: number + tags?: string + timeslotId?: number title: string /** Format: date-time */ - created_at: string - created_by: string + createdAt: string + createdBy: string /** Format: date-time */ - updated_at: string | null - updated_by: string | null + updatedAt: string | null + updatedBy: string } NoteLink: { type: string @@ -757,47 +743,53 @@ export interface components { PatchedCategory: { description?: string id?: number - is_active?: boolean + isActive?: boolean name?: string slug?: string - subtitle?: string | null + subtitle?: string } PatchedFundingCategory: { id?: number - is_active?: boolean + isActive?: boolean name?: string slug?: string } PatchedHost: { - biography?: string | null + biography?: string /** Format: email */ email?: string id?: number - image?: number - is_active?: boolean + imageId?: number | null + isActive?: boolean links?: components['schemas']['HostLink'][] name?: string /** Format: date-time */ - created_at?: string - created_by?: string + createdAt?: string + createdBy?: string /** Format: date-time */ - updated_at?: string | null - updated_by?: string | null + updatedAt?: string | null + updatedBy?: string } PatchedImage: { - alt_text?: string | null - credits?: string | null + altText?: string + credits?: string /** Format: uri */ image?: string | null + ppoi?: string height?: number | null id?: number - ppoi?: string - thumbnails?: readonly string[] + thumbnails?: readonly { + /** Format: double */ + width: number + /** Format: double */ + height: number + url: string + }[] width?: number | null } PatchedLanguage: { id?: number - is_active?: boolean + isActive?: boolean name?: string } PatchedLicenseType: { @@ -814,29 +806,30 @@ export interface components { } PatchedMusicFocus: { id?: number - is_active?: boolean + isActive?: boolean name?: string slug?: string } PatchedNote: { - cba_id?: number | null + cbaId?: number | null content?: string - contributors?: number[] - image?: number + contributorIds?: number[] + id?: number + imageId?: number | null links?: components['schemas']['NoteLink'][] - owner?: number - playlist?: string | null + ownerId?: number + playlistId?: number slug?: string summary?: string - tags?: string | null - timeslot?: number + tags?: string + timeslotId?: number title?: string /** Format: date-time */ - created_at?: string - created_by?: string + createdAt?: string + createdBy?: string /** Format: date-time */ - updated_at?: string | null - updated_by?: string | null + updatedAt?: string | null + updatedBy?: string } PatchedRRule: { id?: number @@ -866,59 +859,58 @@ export interface components { } } PatchedShow: { - category?: number[] - cba_series_id?: number | null - default_playlist_id?: number | null - description?: string | null + categoryIds?: number[] + cbaSeriesId?: number | null + defaultPlaylistId?: number | null + description?: string /** Format: email */ email?: string | null - funding_category?: number - hosts?: number[] + fundingCategoryId?: number + hostIds?: number[] id?: number - image?: number - internal_note?: string | null - is_active?: boolean - is_public?: boolean - language?: number[] + imageId?: number | null + internalNote?: string + isActive?: boolean + isPublic?: boolean + languageIds?: number[] links?: components['schemas']['HostLink'][] - /** Format: uri */ - logo?: string | null - music_focus?: number[] + logoId?: number | null + musicFocusIds?: number[] name?: string - owners?: number[] - predecessor?: number | null - short_description?: string + ownerIds?: number[] + predecessorId?: number | null + shortDescription?: string slug?: string - topic?: number[] - type?: number + topicIds?: number[] + typeId?: number /** Format: date-time */ - created_at?: string - created_by?: string + createdAt?: string + createdBy?: string /** Format: date-time */ - updated_at?: string | null - updated_by?: string | null + updatedAt?: string | null + updatedBy?: string } PatchedTimeSlot: { + memo?: string + playlistId?: number | null + repetitionOfId?: number | null + id?: number /** Format: date-time */ end?: string - memo?: string - note_id?: number | null - playlist_id?: number | null - repetition_of?: number - schedule?: number - show?: number + scheduleId?: number + showId?: number /** Format: date-time */ start?: string } PatchedTopic: { id?: number - is_active?: boolean + isActive?: boolean name?: string slug?: string } PatchedType: { id?: number - is_active?: boolean + isActive?: boolean name?: string slug?: string } @@ -929,25 +921,25 @@ export interface components { */ email?: string /** Vorname */ - first_name?: string + firstName?: string id?: number /** * Aktiv * @description Legt fest, ob dieser Benutzer aktiv ist. Kann deaktiviert werden, anstatt Benutzer zu löschen. */ - is_active?: boolean + isActive?: boolean /** * Mitarbeiter-Status * @description Legt fest, ob sich der Benutzer an der Administrationsseite anmelden kann. */ - is_staff?: boolean + isStaff?: boolean /** * Administrator-Status * @description Legt fest, dass der Benutzer alle Berechtigungen hat, ohne diese einzeln zuweisen zu müssen. */ - is_superuser?: boolean + isSuperuser?: boolean /** Nachname */ - last_name?: string + lastName?: string /** Passwort */ password?: string profile?: components['schemas']['Profile'] @@ -958,16 +950,16 @@ export interface components { username?: string } Profile: { - user: number - cba_username?: string + cbaUsername?: string /** CBA Token */ - cba_user_token?: string + cbaUserToken?: string /** Format: date-time */ - created_at: string - created_by: string + createdAt: string + createdBy: string /** Format: date-time */ - updated_at: string | null - updated_by: string | null + updatedAt: string | null + updatedBy: string + userId: number } ProjectedTimeSlot: { hash: string @@ -977,7 +969,7 @@ export interface components { end: string collisions: components['schemas']['Collision'][] error: string | null - solution_choices: components['schemas']['SolutionChoicesEnum'][] + solutionChoices: components['schemas']['SolutionChoicesEnum'][] } RRule: { id: number @@ -985,40 +977,40 @@ export interface components { } Schedule: { /** @description Whether to add add_days_no but skipping the weekends. E.g. if weekday is Friday, the date returned will be the next Monday. */ - add_business_days_only?: boolean + addBusinessDaysOnly?: boolean /** @description Add a number of days to the generated dates. This can be useful for repetitions, like 'On the following day'. */ - add_days_no?: number | null + addDaysNo?: number | null /** @description Number of the Weekday. */ - by_weekday?: components['schemas']['ByWeekdayEnum'] | components['schemas']['NullEnum'] + byWeekday?: components['schemas']['ByWeekdayEnum'] | components['schemas']['NullEnum'] /** @description A tank ID in case the timeslot's playlist_id is empty. */ - default_playlist_id?: number | null + defaultPlaylistId?: number | null /** * Format: time * @description End time of schedule. */ - end_time: string + endTime?: string | null /** * Format: date * @description Start date of schedule. */ - first_date: string + firstDate: string id: number /** @description Whether the schedule is a repetition. */ - is_repetition?: boolean + isRepetition?: boolean /** * Format: date * @description End date of schedule. */ - last_date: string + lastDate?: string | null /** @description A recurrence rule. */ - rrule: number + rruleId: number /** @description Show the schedule belongs to. */ - show: number + showId: number /** * Format: time * @description Start time of schedule. */ - start_time: string + startTime: string } ScheduleConflictResponse: { projected: components['schemas']['ProjectedTimeSlot'][] @@ -1074,41 +1066,41 @@ export interface components { } ScheduleInRequest: { /** @description Whether to add add_days_no but skipping the weekends. E.g. if weekday is Friday, the date returned will be the next Monday. */ - add_business_days_only?: boolean + addBusinessDaysOnly?: boolean /** @description Add a number of days to the generated dates. This can be useful for repetitions, like 'On the following day'. */ - add_days_no?: number | null + addDaysNo?: number | null /** @description Number of the Weekday. */ - by_weekday?: components['schemas']['ByWeekdayEnum'] | components['schemas']['NullEnum'] + byWeekday?: components['schemas']['ByWeekdayEnum'] | components['schemas']['NullEnum'] /** @description A tank ID in case the timeslot's playlist_id is empty. */ - default_playlist_id?: number | null + defaultPlaylistId?: number | null /** @description Whether to simulate the database changes. If true, no database changes will occur. Instead a list of objects that would be created, updated and deleted if dryrun was false will be returned. */ dryrun?: boolean /** * Format: time * @description End time of schedule. */ - end_time: string + endTime?: string | null /** * Format: date * @description Start date of schedule. */ - first_date: string + firstDate: string /** @description Whether the schedule is a repetition. */ - is_repetition?: boolean + isRepetition?: boolean /** * Format: date * @description End date of schedule. */ - last_date: string + lastDate?: string | null /** @description A recurrence rule. */ - rrule: number + rruleId: number /** @description Show the schedule belongs to. */ - show: number + showId: number /** * Format: time * @description Start time of schedule. */ - start_time: string + startTime: string } ScheduleResponse: { projected: components['schemas']['ProjectedTimeSlot'][] @@ -1135,37 +1127,36 @@ export interface components { schedule: components['schemas']['Schedule'] } Show: { - category: number[] - cba_series_id?: number | null - default_playlist_id?: number | null - description?: string | null + categoryIds: number[] + cbaSeriesId?: number | null + defaultPlaylistId?: number | null + description?: string /** Format: email */ email?: string | null - funding_category: number - hosts: number[] + fundingCategoryId: number + hostIds: number[] id: number - image?: number - internal_note?: string | null - is_active?: boolean - is_public?: boolean - language: number[] + imageId?: number | null + internalNote?: string + isActive?: boolean + isPublic?: boolean + languageIds: number[] links?: components['schemas']['HostLink'][] - /** Format: uri */ - logo?: string | null - music_focus: number[] + logoId?: number | null + musicFocusIds: number[] name: string - owners: number[] - predecessor?: number | null - short_description: string + ownerIds: number[] + predecessorId?: number | null + shortDescription: string slug: string - topic: number[] - type: number + topicIds: number[] + typeId: number /** Format: date-time */ - created_at: string - created_by: string + createdAt: string + createdBy: string /** Format: date-time */ - updated_at: string | null - updated_by: string | null + updatedAt: string | null + updatedBy: string } /** * @description **theirs**: Discard projected timeslot. Keep existing timeslot(s). @@ -1205,65 +1196,65 @@ export interface components { | 'theirs-both' | 'ours-both' TimeSlot: { + memo?: string + playlistId?: number | null + repetitionOfId?: number | null + id: number /** Format: date-time */ end: string - memo?: string - note_id: number | null - playlist_id?: number | null - repetition_of: number - schedule: number - show: number + scheduleId?: number + showId?: number /** Format: date-time */ start: string } Topic: { id: number - is_active?: boolean + isActive?: boolean name: string slug: string } Type: { id: number - is_active?: boolean + isActive?: boolean name: string slug: string } UnsavedSchedule: { /** @description Whether to add add_days_no but skipping the weekends. E.g. if weekday is Friday, the date returned will be the next Monday. */ - add_business_days_only?: boolean + addBusinessDaysOnly?: boolean /** @description Add a number of days to the generated dates. This can be useful for repetitions, like 'On the following day'. */ - add_days_no?: number | null + addDaysNo?: number | null /** @description Number of the Weekday. */ - by_weekday?: components['schemas']['ByWeekdayEnum'] | components['schemas']['NullEnum'] + byWeekday?: components['schemas']['ByWeekdayEnum'] | components['schemas']['NullEnum'] /** @description A tank ID in case the timeslot's playlist_id is empty. */ - default_playlist_id?: number | null + defaultPlaylistId?: number | null /** * Format: time * @description End time of schedule. */ - end_time: string + endTime?: string | null /** * Format: date * @description Start date of schedule. */ - first_date: string + firstDate: string id: number | null /** @description Whether the schedule is a repetition. */ - is_repetition?: boolean + isRepetition?: boolean /** * Format: date * @description End date of schedule. */ - last_date: string + lastDate?: string | null /** @description A recurrence rule. */ - rrule: number + rruleId: number /** @description Show the schedule belongs to. */ - show: number + showId: number /** * Format: time * @description Start time of schedule. */ - start_time: string + startTime: string } User: { /** @@ -1272,25 +1263,25 @@ export interface components { */ email?: string /** Vorname */ - first_name?: string + firstName?: string id: number /** * Aktiv * @description Legt fest, ob dieser Benutzer aktiv ist. Kann deaktiviert werden, anstatt Benutzer zu löschen. */ - is_active?: boolean + isActive?: boolean /** * Mitarbeiter-Status * @description Legt fest, ob sich der Benutzer an der Administrationsseite anmelden kann. */ - is_staff?: boolean + isStaff?: boolean /** * Administrator-Status * @description Legt fest, dass der Benutzer alle Berechtigungen hat, ohne diese einzeln zuweisen zu müssen. */ - is_superuser?: boolean + isSuperuser?: boolean /** Nachname */ - last_name?: string + lastName?: string /** Passwort */ password: string profile?: components['schemas']['Profile'] @@ -1325,9 +1316,9 @@ export interface operations { /** Create a new category. */ requestBody: { content: { - 'application/json': components['schemas']['Category'] 'application/x-www-form-urlencoded': components['schemas']['Category'] 'multipart/form-data': components['schemas']['Category'] + 'application/json': components['schemas']['Category'] } } responses: { @@ -1364,9 +1355,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['Category'] 'application/x-www-form-urlencoded': components['schemas']['Category'] 'multipart/form-data': components['schemas']['Category'] + 'application/json': components['schemas']['Category'] } } responses: { @@ -1400,9 +1391,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedCategory'] 'application/x-www-form-urlencoded': components['schemas']['PatchedCategory'] 'multipart/form-data': components['schemas']['PatchedCategory'] + 'application/json': components['schemas']['PatchedCategory'] } } responses: { @@ -1427,9 +1418,9 @@ export interface operations { /** Create a new funding category. */ requestBody: { content: { - 'application/json': components['schemas']['FundingCategory'] 'application/x-www-form-urlencoded': components['schemas']['FundingCategory'] 'multipart/form-data': components['schemas']['FundingCategory'] + 'application/json': components['schemas']['FundingCategory'] } } responses: { @@ -1466,9 +1457,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['FundingCategory'] 'application/x-www-form-urlencoded': components['schemas']['FundingCategory'] 'multipart/form-data': components['schemas']['FundingCategory'] + 'application/json': components['schemas']['FundingCategory'] } } responses: { @@ -1502,9 +1493,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedFundingCategory'] 'application/x-www-form-urlencoded': components['schemas']['PatchedFundingCategory'] 'multipart/form-data': components['schemas']['PatchedFundingCategory'] + 'application/json': components['schemas']['PatchedFundingCategory'] } } responses: { @@ -1537,9 +1528,9 @@ export interface operations { /** Create a new host. */ requestBody: { content: { - 'application/json': components['schemas']['Host'] 'application/x-www-form-urlencoded': components['schemas']['Host'] 'multipart/form-data': components['schemas']['Host'] + 'application/json': components['schemas']['Host'] } } responses: { @@ -1576,9 +1567,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['Host'] 'application/x-www-form-urlencoded': components['schemas']['Host'] 'multipart/form-data': components['schemas']['Host'] + 'application/json': components['schemas']['Host'] } } responses: { @@ -1612,9 +1603,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedHost'] 'application/x-www-form-urlencoded': components['schemas']['PatchedHost'] 'multipart/form-data': components['schemas']['PatchedHost'] + 'application/json': components['schemas']['PatchedHost'] } } responses: { @@ -1626,6 +1617,7 @@ export interface operations { } } images_list: { + /** List all images. */ parameters?: { /** @description Number of results to return per page. */ /** @description The initial index from which to return the results. */ @@ -1643,12 +1635,15 @@ export interface operations { } } images_create: { - /** @description Create an Image instance. Any user can create an image. */ + /** + * Create a new image. + * @description Create an Image instance. Any user can create an image. + */ requestBody?: { content: { - 'application/json': components['schemas']['Image'] 'application/x-www-form-urlencoded': components['schemas']['Image'] 'multipart/form-data': components['schemas']['Image'] + 'application/json': components['schemas']['Image'] } } responses: { @@ -1660,6 +1655,7 @@ export interface operations { } } images_retrieve: { + /** Retrieve a single image. */ parameters: { /** @description A unique integer value identifying this image. */ path: { @@ -1675,7 +1671,10 @@ export interface operations { } } images_update: { - /** @description Update an Image instance. Only the creator can update an image. */ + /** + * Update an existing image. + * @description Only `alt_text`, `credits`, and `ppoi` can be updated. + */ parameters: { /** @description A unique integer value identifying this image. */ path: { @@ -1684,9 +1683,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['Image'] 'application/x-www-form-urlencoded': components['schemas']['Image'] 'multipart/form-data': components['schemas']['Image'] + 'application/json': components['schemas']['Image'] } } responses: { @@ -1698,7 +1697,10 @@ export interface operations { } } images_destroy: { - /** @description Destroy an Image instance. Only the owner can delete an image. */ + /** + * Delete an existing image. + * @description Destroy an Image instance. Only the owner can delete an image. + */ parameters: { /** @description A unique integer value identifying this image. */ path: { @@ -1711,6 +1713,10 @@ export interface operations { } } images_partial_update: { + /** + * Partially update an existing image. + * @description Only `alt_text`, `credits`, and `ppoi` can be updated. + */ parameters: { /** @description A unique integer value identifying this image. */ path: { @@ -1719,9 +1725,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedImage'] 'application/x-www-form-urlencoded': components['schemas']['PatchedImage'] 'multipart/form-data': components['schemas']['PatchedImage'] + 'application/json': components['schemas']['PatchedImage'] } } responses: { @@ -1746,9 +1752,9 @@ export interface operations { /** Create a new language. */ requestBody: { content: { - 'application/json': components['schemas']['Language'] 'application/x-www-form-urlencoded': components['schemas']['Language'] 'multipart/form-data': components['schemas']['Language'] + 'application/json': components['schemas']['Language'] } } responses: { @@ -1785,9 +1791,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['Language'] 'application/x-www-form-urlencoded': components['schemas']['Language'] 'multipart/form-data': components['schemas']['Language'] + 'application/json': components['schemas']['Language'] } } responses: { @@ -1821,9 +1827,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedLanguage'] 'application/x-www-form-urlencoded': components['schemas']['PatchedLanguage'] 'multipart/form-data': components['schemas']['PatchedLanguage'] + 'application/json': components['schemas']['PatchedLanguage'] } } responses: { @@ -1848,9 +1854,9 @@ export interface operations { /** Create a new license type. */ requestBody: { content: { - 'application/json': components['schemas']['LicenseType'] 'application/x-www-form-urlencoded': components['schemas']['LicenseType'] 'multipart/form-data': components['schemas']['LicenseType'] + 'application/json': components['schemas']['LicenseType'] } } responses: { @@ -1887,9 +1893,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['LicenseType'] 'application/x-www-form-urlencoded': components['schemas']['LicenseType'] 'multipart/form-data': components['schemas']['LicenseType'] + 'application/json': components['schemas']['LicenseType'] } } responses: { @@ -1923,9 +1929,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedLicenseType'] 'application/x-www-form-urlencoded': components['schemas']['PatchedLicenseType'] 'multipart/form-data': components['schemas']['PatchedLicenseType'] + 'application/json': components['schemas']['PatchedLicenseType'] } } responses: { @@ -1950,9 +1956,9 @@ export interface operations { /** Create a new link type. */ requestBody: { content: { - 'application/json': components['schemas']['LinkType'] 'application/x-www-form-urlencoded': components['schemas']['LinkType'] 'multipart/form-data': components['schemas']['LinkType'] + 'application/json': components['schemas']['LinkType'] } } responses: { @@ -1989,9 +1995,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['LinkType'] 'application/x-www-form-urlencoded': components['schemas']['LinkType'] 'multipart/form-data': components['schemas']['LinkType'] + 'application/json': components['schemas']['LinkType'] } } responses: { @@ -2025,9 +2031,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedLinkType'] 'application/x-www-form-urlencoded': components['schemas']['PatchedLinkType'] 'multipart/form-data': components['schemas']['PatchedLinkType'] + 'application/json': components['schemas']['PatchedLinkType'] } } responses: { @@ -2052,9 +2058,9 @@ export interface operations { /** Create a new music focus. */ requestBody: { content: { - 'application/json': components['schemas']['MusicFocus'] 'application/x-www-form-urlencoded': components['schemas']['MusicFocus'] 'multipart/form-data': components['schemas']['MusicFocus'] + 'application/json': components['schemas']['MusicFocus'] } } responses: { @@ -2091,9 +2097,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['MusicFocus'] 'application/x-www-form-urlencoded': components['schemas']['MusicFocus'] 'multipart/form-data': components['schemas']['MusicFocus'] + 'application/json': components['schemas']['MusicFocus'] } } responses: { @@ -2127,9 +2133,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedMusicFocus'] 'application/x-www-form-urlencoded': components['schemas']['PatchedMusicFocus'] 'multipart/form-data': components['schemas']['PatchedMusicFocus'] + 'application/json': components['schemas']['PatchedMusicFocus'] } } responses: { @@ -2143,11 +2149,21 @@ export interface operations { notes_list: { /** List all notes. */ parameters?: { + /** @description Return only notes matching the specified id(s). */ /** @description Number of results to return per page. */ /** @description The initial index from which to return the results. */ + /** @description Return only notes that belong to the specified owner(s). */ + /** @description Return only notes that belong to the specified show(s). */ + /** @description Return only notes by show the specified owner(s): all notes the user may edit. */ + /** @description Return only notes that belong to the specified timeslot(s). */ query?: { + ids?: number[] limit?: number offset?: number + ownerIds?: number[] + showIds?: number[] + showOwnerIds?: number[] + timeslotIds?: number[] } } responses: { @@ -2159,15 +2175,12 @@ export interface operations { } } notes_create: { - /** - * Create a new note. - * @description Only admins can create new notes. - */ + /** Create a new note. */ requestBody: { content: { - 'application/json': components['schemas']['Note'] 'application/x-www-form-urlencoded': components['schemas']['Note'] 'multipart/form-data': components['schemas']['Note'] + 'application/json': components['schemas']['Note'] } } responses: { @@ -2195,10 +2208,7 @@ export interface operations { } } notes_update: { - /** - * Update an existing note. - * @description Only admins can update existing notes. - */ + /** Update an existing note. */ parameters: { /** @description A unique integer value identifying this note. */ path: { @@ -2207,9 +2217,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['Note'] 'application/x-www-form-urlencoded': components['schemas']['Note'] 'multipart/form-data': components['schemas']['Note'] + 'application/json': components['schemas']['Note'] } } responses: { @@ -2221,10 +2231,7 @@ export interface operations { } } notes_destroy: { - /** - * Delete an existing note. - * @description Only admins can delete existing notes. - */ + /** Delete an existing note. */ parameters: { /** @description A unique integer value identifying this note. */ path: { @@ -2249,9 +2256,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedNote'] 'application/x-www-form-urlencoded': components['schemas']['PatchedNote'] 'multipart/form-data': components['schemas']['PatchedNote'] + 'application/json': components['schemas']['PatchedNote'] } } responses: { @@ -2275,9 +2282,9 @@ export interface operations { rrules_create: { requestBody?: { content: { - 'application/json': components['schemas']['RRule'] 'application/x-www-form-urlencoded': components['schemas']['RRule'] 'multipart/form-data': components['schemas']['RRule'] + 'application/json': components['schemas']['RRule'] } } responses: { @@ -2313,9 +2320,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['RRule'] 'application/x-www-form-urlencoded': components['schemas']['RRule'] 'multipart/form-data': components['schemas']['RRule'] + 'application/json': components['schemas']['RRule'] } } responses: { @@ -2347,9 +2354,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedRRule'] 'application/x-www-form-urlencoded': components['schemas']['PatchedRRule'] 'multipart/form-data': components['schemas']['PatchedRRule'] + 'application/json': components['schemas']['PatchedRRule'] } } responses: { @@ -2404,9 +2411,9 @@ export interface operations { */ requestBody: { content: { - 'application/json': components['schemas']['ScheduleCreateUpdateRequest'] 'application/x-www-form-urlencoded': components['schemas']['ScheduleCreateUpdateRequest'] 'multipart/form-data': components['schemas']['ScheduleCreateUpdateRequest'] + 'application/json': components['schemas']['ScheduleCreateUpdateRequest'] } } responses: { @@ -2504,9 +2511,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['ScheduleCreateUpdateRequest'] 'application/x-www-form-urlencoded': components['schemas']['ScheduleCreateUpdateRequest'] 'multipart/form-data': components['schemas']['ScheduleCreateUpdateRequest'] + 'application/json': components['schemas']['ScheduleCreateUpdateRequest'] } } responses: { @@ -2543,9 +2550,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedScheduleCreateUpdateRequest'] 'application/x-www-form-urlencoded': components['schemas']['PatchedScheduleCreateUpdateRequest'] 'multipart/form-data': components['schemas']['PatchedScheduleCreateUpdateRequest'] + 'application/json': components['schemas']['PatchedScheduleCreateUpdateRequest'] } } responses: { @@ -2687,37 +2694,37 @@ export interface operations { shows_list: { /** List all shows. */ parameters?: { - /** @description Return only currently running shows (with timeslots in the future) if true or past or upcoming shows if false. */ /** @description Return only shows of the given category or categories. */ /** @description Return only shows of the given category slug. */ /** @description Return only shows assigned to the given host(s). */ + /** @description Return only currently running shows (with timeslots in the future) if true or past or upcoming shows if false. */ + /** @description Return only shows that are public/non-public. */ /** @description Return only shows of the given language(s). */ /** @description Number of results to return per page. */ /** @description Return only shows with given music focus(es). */ /** @description Return only shows with the give music focus slug. */ /** @description The initial index from which to return the results. */ /** @description Return only shows that belong to the given owner(s). */ - /** @description Return only shows that are public/non-public. */ /** @description Return only shows of the given topic(s). */ /** @description Return only shows of the given topic slug. */ /** @description Return only shows of a given type. */ /** @description Return only shows of the given type slug. */ query?: { - active?: boolean - category?: number[] - category__slug?: string - host?: number[] - language?: number[] + categoryIds?: string[] + categorySlug?: string + hostIds?: number[] + isActive?: boolean + isPublic?: boolean + languageIds?: string[] limit?: number - music_focus?: number[] - music_focus__slug?: string + musicFocusIds?: number[] + musicFocusSlug?: string offset?: number - owner?: number[] - public?: boolean - topic?: number[] - topic__slug?: string - type?: number[] - type__slug?: string + ownerIds?: number[] + topicIds?: string[] + topicSlug?: string + typeId?: string[] + typeSlug?: string } } responses: { @@ -2735,9 +2742,9 @@ export interface operations { */ requestBody: { content: { - 'application/json': components['schemas']['Show'] 'application/x-www-form-urlencoded': components['schemas']['Show'] 'multipart/form-data': components['schemas']['Show'] + 'application/json': components['schemas']['Show'] } } responses: { @@ -2777,9 +2784,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['Show'] 'application/x-www-form-urlencoded': components['schemas']['Show'] 'multipart/form-data': components['schemas']['Show'] + 'application/json': components['schemas']['Show'] } } responses: { @@ -2816,9 +2823,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedShow'] 'application/x-www-form-urlencoded': components['schemas']['PatchedShow'] 'multipart/form-data': components['schemas']['PatchedShow'] + 'application/json': components['schemas']['PatchedShow'] } } responses: { @@ -2832,11 +2839,21 @@ export interface operations { shows_notes_list: { /** List all notes. */ parameters: { + /** @description Return only notes matching the specified id(s). */ /** @description Number of results to return per page. */ /** @description The initial index from which to return the results. */ + /** @description Return only notes that belong to the specified owner(s). */ + /** @description Return only notes that belong to the specified show(s). */ + /** @description Return only notes by show the specified owner(s): all notes the user may edit. */ + /** @description Return only notes that belong to the specified timeslot(s). */ query?: { + ids?: number[] limit?: number offset?: number + ownerIds?: number[] + showIds?: number[] + showOwnerIds?: number[] + timeslotIds?: number[] } path: { show_pk: string @@ -2851,10 +2868,7 @@ export interface operations { } } shows_notes_create: { - /** - * Create a new note. - * @description Only admins can create new notes. - */ + /** Create a new note. */ parameters: { path: { show_pk: string @@ -2862,9 +2876,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['Note'] 'application/x-www-form-urlencoded': components['schemas']['Note'] 'multipart/form-data': components['schemas']['Note'] + 'application/json': components['schemas']['Note'] } } responses: { @@ -2893,10 +2907,7 @@ export interface operations { } } shows_notes_update: { - /** - * Update an existing note. - * @description Only admins can update existing notes. - */ + /** Update an existing note. */ parameters: { /** @description A unique integer value identifying this note. */ path: { @@ -2906,9 +2917,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['Note'] 'application/x-www-form-urlencoded': components['schemas']['Note'] 'multipart/form-data': components['schemas']['Note'] + 'application/json': components['schemas']['Note'] } } responses: { @@ -2920,10 +2931,7 @@ export interface operations { } } shows_notes_destroy: { - /** - * Delete an existing note. - * @description Only admins can delete existing notes. - */ + /** Delete an existing note. */ parameters: { /** @description A unique integer value identifying this note. */ path: { @@ -2950,9 +2958,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedNote'] 'application/x-www-form-urlencoded': components['schemas']['PatchedNote'] 'multipart/form-data': components['schemas']['PatchedNote'] + 'application/json': components['schemas']['PatchedNote'] } } responses: { @@ -3017,9 +3025,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['ScheduleCreateUpdateRequest'] 'application/x-www-form-urlencoded': components['schemas']['ScheduleCreateUpdateRequest'] 'multipart/form-data': components['schemas']['ScheduleCreateUpdateRequest'] + 'application/json': components['schemas']['ScheduleCreateUpdateRequest'] } } responses: { @@ -3119,9 +3127,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['ScheduleCreateUpdateRequest'] 'application/x-www-form-urlencoded': components['schemas']['ScheduleCreateUpdateRequest'] 'multipart/form-data': components['schemas']['ScheduleCreateUpdateRequest'] + 'application/json': components['schemas']['ScheduleCreateUpdateRequest'] } } responses: { @@ -3160,9 +3168,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedScheduleCreateUpdateRequest'] 'application/x-www-form-urlencoded': components['schemas']['PatchedScheduleCreateUpdateRequest'] 'multipart/form-data': components['schemas']['PatchedScheduleCreateUpdateRequest'] + 'application/json': components['schemas']['PatchedScheduleCreateUpdateRequest'] } } responses: { @@ -3259,11 +3267,11 @@ export interface operations { show_pk: number } } - requestBody: { + requestBody?: { content: { - 'application/json': components['schemas']['TimeSlot'] 'application/x-www-form-urlencoded': components['schemas']['TimeSlot'] 'multipart/form-data': components['schemas']['TimeSlot'] + 'application/json': components['schemas']['TimeSlot'] } } responses: { @@ -3304,9 +3312,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedTimeSlot'] 'application/x-www-form-urlencoded': components['schemas']['PatchedTimeSlot'] 'multipart/form-data': components['schemas']['PatchedTimeSlot'] + 'application/json': components['schemas']['PatchedTimeSlot'] } } responses: { @@ -3320,11 +3328,21 @@ export interface operations { shows_schedules_timeslots_note_list: { /** List all notes. */ parameters: { + /** @description Return only notes matching the specified id(s). */ /** @description Number of results to return per page. */ /** @description The initial index from which to return the results. */ + /** @description Return only notes that belong to the specified owner(s). */ + /** @description Return only notes that belong to the specified show(s). */ + /** @description Return only notes by show the specified owner(s): all notes the user may edit. */ + /** @description Return only notes that belong to the specified timeslot(s). */ query?: { + ids?: number[] limit?: number offset?: number + ownerIds?: number[] + showIds?: number[] + showOwnerIds?: number[] + timeslotIds?: number[] } path: { schedule_pk: number @@ -3341,10 +3359,7 @@ export interface operations { } } shows_schedules_timeslots_note_create: { - /** - * Create a new note. - * @description Only admins can create new notes. - */ + /** Create a new note. */ parameters: { path: { schedule_pk: number @@ -3354,9 +3369,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['Note'] 'application/x-www-form-urlencoded': components['schemas']['Note'] 'multipart/form-data': components['schemas']['Note'] + 'application/json': components['schemas']['Note'] } } responses: { @@ -3387,10 +3402,7 @@ export interface operations { } } shows_schedules_timeslots_note_update: { - /** - * Update an existing note. - * @description Only admins can update existing notes. - */ + /** Update an existing note. */ parameters: { /** @description A unique integer value identifying this note. */ path: { @@ -3402,9 +3414,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['Note'] 'application/x-www-form-urlencoded': components['schemas']['Note'] 'multipart/form-data': components['schemas']['Note'] + 'application/json': components['schemas']['Note'] } } responses: { @@ -3416,10 +3428,7 @@ export interface operations { } } shows_schedules_timeslots_note_destroy: { - /** - * Delete an existing note. - * @description Only admins can delete existing notes. - */ + /** Delete an existing note. */ parameters: { /** @description A unique integer value identifying this note. */ path: { @@ -3450,9 +3459,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedNote'] 'application/x-www-form-urlencoded': components['schemas']['PatchedNote'] 'multipart/form-data': components['schemas']['PatchedNote'] + 'application/json': components['schemas']['PatchedNote'] } } responses: { @@ -3546,11 +3555,11 @@ export interface operations { show_pk: number } } - requestBody: { + requestBody?: { content: { - 'application/json': components['schemas']['TimeSlot'] 'application/x-www-form-urlencoded': components['schemas']['TimeSlot'] 'multipart/form-data': components['schemas']['TimeSlot'] + 'application/json': components['schemas']['TimeSlot'] } } responses: { @@ -3589,9 +3598,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedTimeSlot'] 'application/x-www-form-urlencoded': components['schemas']['PatchedTimeSlot'] 'multipart/form-data': components['schemas']['PatchedTimeSlot'] + 'application/json': components['schemas']['PatchedTimeSlot'] } } responses: { @@ -3605,11 +3614,21 @@ export interface operations { shows_timeslots_note_list: { /** List all notes. */ parameters: { + /** @description Return only notes matching the specified id(s). */ /** @description Number of results to return per page. */ /** @description The initial index from which to return the results. */ + /** @description Return only notes that belong to the specified owner(s). */ + /** @description Return only notes that belong to the specified show(s). */ + /** @description Return only notes by show the specified owner(s): all notes the user may edit. */ + /** @description Return only notes that belong to the specified timeslot(s). */ query?: { + ids?: number[] limit?: number offset?: number + ownerIds?: number[] + showIds?: number[] + showOwnerIds?: number[] + timeslotIds?: number[] } path: { show_pk: string @@ -3625,10 +3644,7 @@ export interface operations { } } shows_timeslots_note_create: { - /** - * Create a new note. - * @description Only admins can create new notes. - */ + /** Create a new note. */ parameters: { path: { show_pk: string @@ -3637,9 +3653,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['Note'] 'application/x-www-form-urlencoded': components['schemas']['Note'] 'multipart/form-data': components['schemas']['Note'] + 'application/json': components['schemas']['Note'] } } responses: { @@ -3669,10 +3685,7 @@ export interface operations { } } shows_timeslots_note_update: { - /** - * Update an existing note. - * @description Only admins can update existing notes. - */ + /** Update an existing note. */ parameters: { /** @description A unique integer value identifying this note. */ path: { @@ -3683,9 +3696,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['Note'] 'application/x-www-form-urlencoded': components['schemas']['Note'] 'multipart/form-data': components['schemas']['Note'] + 'application/json': components['schemas']['Note'] } } responses: { @@ -3697,10 +3710,7 @@ export interface operations { } } shows_timeslots_note_destroy: { - /** - * Delete an existing note. - * @description Only admins can delete existing notes. - */ + /** Delete an existing note. */ parameters: { /** @description A unique integer value identifying this note. */ path: { @@ -3729,9 +3739,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedNote'] 'application/x-www-form-urlencoded': components['schemas']['PatchedNote'] 'multipart/form-data': components['schemas']['PatchedNote'] + 'application/json': components['schemas']['PatchedNote'] } } responses: { @@ -3820,11 +3830,11 @@ export interface operations { id: number } } - requestBody: { + requestBody?: { content: { - 'application/json': components['schemas']['TimeSlot'] 'application/x-www-form-urlencoded': components['schemas']['TimeSlot'] 'multipart/form-data': components['schemas']['TimeSlot'] + 'application/json': components['schemas']['TimeSlot'] } } responses: { @@ -3861,9 +3871,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedTimeSlot'] 'application/x-www-form-urlencoded': components['schemas']['PatchedTimeSlot'] 'multipart/form-data': components['schemas']['PatchedTimeSlot'] + 'application/json': components['schemas']['PatchedTimeSlot'] } } responses: { @@ -3888,9 +3898,9 @@ export interface operations { /** Create a new topic. */ requestBody: { content: { - 'application/json': components['schemas']['Topic'] 'application/x-www-form-urlencoded': components['schemas']['Topic'] 'multipart/form-data': components['schemas']['Topic'] + 'application/json': components['schemas']['Topic'] } } responses: { @@ -3927,9 +3937,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['Topic'] 'application/x-www-form-urlencoded': components['schemas']['Topic'] 'multipart/form-data': components['schemas']['Topic'] + 'application/json': components['schemas']['Topic'] } } responses: { @@ -3963,9 +3973,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedTopic'] 'application/x-www-form-urlencoded': components['schemas']['PatchedTopic'] 'multipart/form-data': components['schemas']['PatchedTopic'] + 'application/json': components['schemas']['PatchedTopic'] } } responses: { @@ -3990,9 +4000,9 @@ export interface operations { /** Create a new type. */ requestBody: { content: { - 'application/json': components['schemas']['Type'] 'application/x-www-form-urlencoded': components['schemas']['Type'] 'multipart/form-data': components['schemas']['Type'] + 'application/json': components['schemas']['Type'] } } responses: { @@ -4029,9 +4039,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['Type'] 'application/x-www-form-urlencoded': components['schemas']['Type'] 'multipart/form-data': components['schemas']['Type'] + 'application/json': components['schemas']['Type'] } } responses: { @@ -4065,9 +4075,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedType'] 'application/x-www-form-urlencoded': components['schemas']['PatchedType'] 'multipart/form-data': components['schemas']['PatchedType'] + 'application/json': components['schemas']['PatchedType'] } } responses: { @@ -4098,9 +4108,9 @@ export interface operations { */ requestBody: { content: { - 'application/json': components['schemas']['User'] 'application/x-www-form-urlencoded': components['schemas']['User'] 'multipart/form-data': components['schemas']['User'] + 'application/json': components['schemas']['User'] } } responses: { @@ -4143,9 +4153,9 @@ export interface operations { } requestBody: { content: { - 'application/json': components['schemas']['User'] 'application/x-www-form-urlencoded': components['schemas']['User'] 'multipart/form-data': components['schemas']['User'] + 'application/json': components['schemas']['User'] } } responses: { @@ -4169,9 +4179,9 @@ export interface operations { } requestBody?: { content: { - 'application/json': components['schemas']['PatchedUser'] 'application/x-www-form-urlencoded': components['schemas']['PatchedUser'] 'multipart/form-data': components['schemas']['PatchedUser'] + 'application/json': components['schemas']['PatchedUser'] } } responses: { diff --git a/src/store/modules/files.js b/src/store/modules/files.js index d3828d3dd525f0ca27ceafeeebf66825cfe70e19..02e88de826159f1021c6fd821883cde8a7b64c2f 100644 --- a/src/store/modules/files.js +++ b/src/store/modules/files.js @@ -71,7 +71,7 @@ const actions = { // Fetch all files for a given show from the AuRa tank API fetchFiles(ctx, data) { ctx.commit('loading', 'files') - const uri = createTankURL('shows', data.slug, 'files') + const uri = createTankURL('shows', data.showSlug, 'files') axios .get(uri) .then((response) => { @@ -93,7 +93,7 @@ const actions = { fetchLog(ctx, data) { ctx.commit('loading', 'log') - const uri = createTankURL('shows', data.slug, 'files', data.file, 'logs') + const uri = createTankURL('shows', data.showSlug, 'files', data.fileId, 'logs') axios .get(uri) .then((response) => { @@ -118,7 +118,7 @@ const actions = { // more active imports are available the corresponding updateInterval // should be cleared again. fetchImports(ctx, data) { - const uri = createTankURL('shows', data.show, 'imports') + const uri = createTankURL('shows', data.showSlug, 'imports') axios .get(uri) .then((response) => { @@ -135,12 +135,12 @@ const actions = { }, updateFile(ctx, data) { - const uri = createTankURL('shows', data.show, 'files', data.file) + const uri = createTankURL('shows', data.showSlug, 'files', data.fileId) // TODO: add mechanism to indicate the running patch request in the files table axios .patch(uri, data.metadata) .then((response) => { - ctx.commit('setFileMeta', { id: data.file, metadata: response.data.metadata }) + ctx.commit('setFileMeta', { id: data.fileId, metadata: response.data.metadata }) if (data && typeof data.callback === 'function') { data.callback() } @@ -155,24 +155,24 @@ const actions = { // With this function we add a new file in the AuRa tank by calling its API. // Depending on wheter we add a remote file which tank then imports by itself, - // or if we want to upload a local file, the source-uri has to look different. + // or if we want to upload a local file, the sourceURI has to look different. // And for uploading a local file this is just the first step. Afterwards the // actual upload has to be started with the startUpload function. addFile(ctx, data) { - const uri = createTankURL('shows', data.show, 'files') + const uri = createTankURL('shows', data.showSlug, 'files') const payload = {} if (data.addNewFileURI) { - payload['source-uri'] = data.uploadSourceURI + payload['sourceURI'] = data.uploadSourceURI } else { - payload['source-uri'] = encodeURI(encodeURI('upload://' + data.uploadSourceFile.name)) + payload['sourceURI'] = encodeURI(encodeURI('upload://' + data.uploadSourceFile.name)) } axios .post(uri, payload) .then((response) => { if (!data.addNewFileURI) { ctx.dispatch('startUpload', { - show: data.show, - file: response.data.id, + showSlug: data.showSlug, + fileId: response.data.id, ...data, }) } @@ -196,10 +196,10 @@ const actions = { // fetching the import endpoint of this file and then call the upload // function, which atually puts the file onto the server. startUpload(ctx, data) { - const uri = createTankURL('shows', data.show, 'files', data.file, 'import') + const uri = createTankURL('shows', data.showSlug, 'files', data.fileId, 'import') axios .get(uri, { - params: { 'wait-for': 'running' }, + params: { waitFor: 'running' }, }) .then(ctx.dispatch('upload', data)) .catch((error) => { @@ -231,7 +231,7 @@ const actions = { flow.upload() */ - const uri = createTankURL('shows', data.show, 'files', data.file, 'upload') + const uri = createTankURL('shows', data.showSlug, 'files', data.fileId, 'upload') axios .put(uri, data.uploadSourceFile, { headers: { @@ -262,12 +262,12 @@ const actions = { // Deletes a file with a specific ID calling the AuRa tank API deleteFile(ctx, data) { - const uri = createTankURL('shows', data.show, 'files', data.file) + const uri = createTankURL('shows', data.showSlug, 'files', data.fileId) // TODO: add mechanism to indicate the running delete request in the files table axios .delete(uri) .then(() => { - ctx.commit('deleteFile', data.file) + ctx.commit('deleteFile', data.fileId) if (data && typeof data.callback === 'function') { data.callback() } diff --git a/src/store/modules/playlists.js b/src/store/modules/playlists.js index 454df925b4ec04f7eed00c0d1ec106d9eced4ebe..b491ba1b72d411a071bfec9a5ea5b17ddcdb6e22 100644 --- a/src/store/modules/playlists.js +++ b/src/store/modules/playlists.js @@ -60,7 +60,7 @@ const getters = { const actions = { fetch(ctx, data) { ctx.commit('loading', 'playlists') - const uri = createTankURL('shows', data.slug, 'playlists') + const uri = createTankURL('shows', data.showSlug, 'playlists') axios .get(uri) .then((response) => { @@ -81,7 +81,7 @@ const actions = { }, add(ctx, data) { - const uri = createTankURL('shows', data.slug, 'playlists') + const uri = createTankURL('shows', data.showSlug, 'playlists') axios .post(uri, data.playlist) .then((response) => { @@ -99,12 +99,12 @@ const actions = { }, update(ctx, data) { - const uri = createTankURL('shows', data.slug, 'playlists', data.id) + const uri = createTankURL('shows', data.showSlug, 'playlists', data.playlistId) axios .put(uri, data.playlist) .then((response) => { ctx.commit('updatePlaylist', { - id: data.id, + id: data.playlistId, playlist: response.data, }) if (data && typeof data.callback === 'function') { @@ -120,11 +120,11 @@ const actions = { }, delete(ctx, data) { - const uri = createTankURL('shows', data.slug, 'playlists', data.id) + const uri = createTankURL('shows', data.showSlug, 'playlists', data.playlistId) axios .delete(uri) .then(() => { - ctx.commit('deletePlaylist', data.id) + ctx.commit('deletePlaylist', data.playlistId) if (data && typeof data.callback === 'function') { data.callback() } diff --git a/src/store/modules/shows.js b/src/store/modules/shows.js index 266fa2549c380847ad3923496caa3228b31268cb..9ef7189dfb93589ccc5ef8c6904fc1eacd964d9b 100644 --- a/src/store/modules/shows.js +++ b/src/store/modules/shows.js @@ -8,22 +8,19 @@ import decamelize from 'decamelize' const cloneMinimalShowObject = function (show) { /* returns a new minimal object from the current show object with all properties needed for a PUT request to the /show/ endpoint */ - const s = {} - s.name = show.name - s.slug = show.slug - s.short_description = show.short_description - s.funding_category = show.funding_category - s.type = show.type - // we do not want the arrays do be passed as references, because the - // current show object should not get modified when the update object - // gets modified, therefore we use slice to clone the arrays - s.category = show.category.slice() - s.hosts = show.hosts.slice() - s.owners = show.owners.slice() - s.language = show.language.slice() - s.topic = show.topic.slice() - s.music_focus = show.music_focus.slice() - return s + return { + name: show.name, + slug: show.slug, + shortDescription: show.shortDescription, + fundingCategoryId: show.fundingCategoryId, + typeId: show.typeId, + categoryIds: Array.from(show.categoryIds), + hostIds: Array.from(show.hostIds), + ownerIds: Array.from(show.ownerIds), + languageIds: Array.from(show.languageIds), + topicIds: Array.from(show.topicIds), + musicFocusIds: Array.from(show.musicFocusIds), + } } const state = { @@ -132,7 +129,7 @@ const mutations = { }, setShortDescription(state, data) { const index = state.shows.findIndex((s) => s.id === data.id) - state.shows[index].short_description = data.text + state.shows[index].shortDescription = data.text }, setDescription(state, data) { const index = state.shows.findIndex((s) => s.id === data.id) @@ -140,7 +137,7 @@ const mutations = { }, setActive(state, data) { const index = state.shows.findIndex((s) => s.id === data.id) - state.shows[index].is_active = data.active + state.shows[index].isActive = data.active }, setProperty(state, data) { const index = state.shows.findIndex((s) => s.id === data.id) @@ -173,7 +170,7 @@ const actions = { let uri = createSteeringURL('shows') // normal users should only see their own shows, only superusers see all shows if (!authStore.isSuperuser) { - uri += '?owner=' + user.id + uri += '?ownerIds=' + user.id } axios .get(uri) @@ -195,7 +192,7 @@ const actions = { fetchSchedule(ctx, data) { ctx.commit('loading', 'schedule') - const uri = createSteeringURL('shows', data.show, 'schedules', data.schedule) + const uri = createSteeringURL('shows', data.showId, 'schedules', data.scheduleId) axios .get(uri) .then((response) => { @@ -215,7 +212,7 @@ const actions = { fetchSchedules(ctx, data) { ctx.commit('loading', 'schedule') - const uri = createSteeringURL('shows', data.show, 'schedules') + const uri = createSteeringURL('shows', data.showId, 'schedules') axios .get(uri) .then((response) => { @@ -234,7 +231,7 @@ const actions = { }, fetchTimeslots(ctx, data) { - if (data.schedule !== undefined) { + if (data.scheduleId !== undefined) { ctx.commit('loading', 'scheduleTimeslots') } else { ctx.commit('loading', 'timeslots') @@ -252,8 +249,8 @@ const actions = { } const uri = - data.id && data.schedule - ? createSteeringURL('shows', data.id, 'schedules', data.schedule, 'timeslots', query) + data.id && data.scheduleId + ? createSteeringURL('shows', data.id, 'schedules', data.scheduleId, 'timeslots', query) : data.id ? createSteeringURL('shows', data.id, 'timeslots', query) : createSteeringURL('timeslots', query) @@ -261,7 +258,7 @@ const actions = { axios .get(uri) .then((response) => { - if (data.schedule !== undefined) { + if (data.scheduleId !== undefined) { ctx.commit('setScheduleTimeslots', response.data) ctx.commit('finishLoading', 'scheduleTimeslots') } else { @@ -289,7 +286,7 @@ const actions = { const subPath = decamelize(data.property, { separator: '-' }) let uri = createSteeringURL(subPath) if (data.onlyActive === true) { - uri += '?active=true' + uri += '?isActive=true' } axios .get(uri) @@ -384,9 +381,9 @@ const actions = { updateTimeslot(ctx, data) { const uri = createSteeringURL( 'shows', - data.show, + data.showId, 'schedules', - data.schedule, + data.scheduleId, 'timeslots', data.timeslot.id, ) @@ -407,7 +404,7 @@ const actions = { }, deleteSchedule(ctx, data) { - const uri = createSteeringURL('shows', data.show, 'schedules', data.schedule) + const uri = createSteeringURL('shows', data.showId, 'schedules', data.scheduleId) axios .delete(uri) .then(() => { @@ -426,11 +423,11 @@ const actions = { deleteTimeslot(ctx, data) { const uri = createSteeringURL( 'shows', - data.show, + data.showId, 'schedules', - data.schedule, + data.scheduleId, 'timeslots', - data.timeslot, + data.timeslotId, ) axios .delete(uri) diff --git a/src/stores/auth.ts b/src/stores/auth.ts index 9711815f9cc8a932d90fca4d8015e0eac4eabe47..deac4b6916893f1a84bff318687f2bec534fa296 100644 --- a/src/stores/auth.ts +++ b/src/stores/auth.ts @@ -57,7 +57,7 @@ export const useAuthStore = defineStore('auth', () => { const currentUser = ref<CurrentUser>() const _steeringUser = ref<steeringTypes['schemas']['User']>() const steeringUser = computed(() => (currentUser.value ? _steeringUser.value : undefined)) - const isSuperuser = computed(() => steeringUser.value?.is_superuser === true) + const isSuperuser = computed(() => steeringUser.value?.isSuperuser === true) async function loadUser() { const oidcUser = await getUser() diff --git a/src/stores/images.ts b/src/stores/images.ts index 83d6eff4725644fc08570dc5a9f2583c1501002f..97cf455408364953e9166ce04ff2a7eb340ba127 100644 --- a/src/stores/images.ts +++ b/src/stores/images.ts @@ -15,7 +15,7 @@ import { export type Image = { id: number - alt_text: string + altText: string credits: string image: string file?: File diff --git a/src/stores/notes.ts b/src/stores/notes.ts index 6627fd369fb8a38d5197404481e20198f09cd1da..d39a7cb874c5adb3e7995b2737025340d070fd03 100644 --- a/src/stores/notes.ts +++ b/src/stores/notes.ts @@ -17,35 +17,35 @@ export type Note = { slug: string summary: string content: string - image: number | null - cba_id: number | null - contributors: number[] + imageId: number | null + cbaId: number | null + contributorIds: number[] links: { type: string; url: string }[] - owner: number + ownerId: number playlist: string tags: string - timeslot: number - created_at: string - created_by: string - updated_at: string - updated_by: string + timeslotId: number + createdAt: string + createdBy: string + updatedAt: string + updatedBy: string } -type ReadonlyAttrs = 'id' | 'created_at' | 'created_by' | 'updated_at' | 'updated_by' | 'owner' +type ReadonlyAttrs = 'id' | 'createdAt' | 'createdBy' | 'updatedAt' | 'updatedBy' | 'ownerId' export type NewNote = Omit<Note, ReadonlyAttrs> type NoteCreateData = Omit<Note, ReadonlyAttrs> type NoteUpdateData = Partial<Omit<Note, ReadonlyAttrs>> -export function newNote(timeslotID: number): NewNote { +export function newNote(timeslotId: number): NewNote { return { title: '', slug: '', summary: '', content: '', - image: null, - cba_id: null, - contributors: [], + imageId: null, + cbaId: null, + contributorIds: [], links: [], - timeslot: timeslotID, + timeslotId, tags: '', playlist: '', } diff --git a/src/tank-types.ts b/src/tank-types.ts index 7c2665c99e53909a3ad32a14219750f7960cc9a4..d63d627485808578b5bbd5c3c7bd7bc7310330e6 100644 --- a/src/tank-types.ts +++ b/src/tank-types.ts @@ -1,6 +1,6 @@ /* eslint-disable */ /* - * This file was auto-generated by `make update-types`. + * This file was auto-generated by `make update-types` at 2023-06-07 10:59:39.668Z. * DO NOT make changes to this file. */ @@ -154,7 +154,7 @@ export interface paths { parameters: { /** @description If given, all files and playlists will be copied from the show */ query?: { - 'clone-from'?: string + cloneFrom?: string } /** @description Name of the show to be created */ path: { @@ -290,7 +290,7 @@ export interface paths { parameters: { /** @description running|done - If given, return not before import has the given state */ query?: { - 'wait-for'?: string + waitFor?: string } /** @description Name of the show */ path: { @@ -506,7 +506,7 @@ export interface paths { parameters: { /** @description running|done - If given, return not before import has the given state */ query?: { - 'wait-for'?: string + waitFor?: string } /** @description Name of the show */ /** @description ID of the file */ @@ -1450,12 +1450,12 @@ export interface components { created?: string id?: number progress?: number - 'ref-id'?: string + refID?: string show?: string source?: components['schemas']['importer.SourceURL'] started?: number state?: number - user?: string + username?: string } 'importer.SourceURL': string 'main.Health': { @@ -1468,7 +1468,7 @@ export interface components { duration?: number id?: number metadata?: components['schemas']['store.FileMetadata'] - show?: string + showName?: string size?: number source?: components['schemas']['store.FileSource'] updated?: string @@ -1499,8 +1499,8 @@ export interface components { description?: string entries?: components['schemas']['store.PlaylistEntry'][] id?: number - 'playout-mode'?: string - show?: string + playoutMode?: string + showName?: string updated?: string } 'store.PlaylistEntry': { @@ -1520,7 +1520,7 @@ export interface components { } 'v1.FileCreateRequest': { /** @enum {string} */ - 'source-uri'?: 'upload://<filename>' | 'https://<host>/<path>' | 'file:///<path>' + sourceURI?: 'upload://<filename>' | 'https://<host>/<path>' | 'file:///<path>' } 'v1.FileImportLogs': { results?: components['schemas']['store.ImportLogs'] diff --git a/src/types.ts b/src/types.ts index 4230618a4e535a7464638b165e092fae54507deb..53bf191a47f25f0b7572dd8861c1f16c42df94ae 100644 --- a/src/types.ts +++ b/src/types.ts @@ -16,11 +16,11 @@ export type PaginationData = { export type TimeSlot = { id: number memo: string - note_id: number | null - playlist_id: number | null - repetition_of: number | null - schedule: number - show: number + noteId: number | null + playlistId: number | null + repetitionOfId: number | null + scheduleId: number + showId: number start: string end: string | null }