Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
AURA
dashboard
Commits
af21bda5
Commit
af21bda5
authored
Dec 15, 2020
by
Richard Blechinger
Browse files
More translation adjustments, gray out past emissions, prevent deletion of old timeslots
parent
c297d5c3
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/components/emissions/ModalEdit.vue
View file @
af21bda5
...
...
@@ -152,24 +152,26 @@
class=
"tw-w-full tw-flex tw-justify-between tw-items-center"
>
<div
class=
"tw-space-x-2"
>
<b-button
variant=
"danger"
size=
"sm"
@
click=
"deleteFullSchedule(schedule.id)"
>
<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
>
{{
$t
(
'
scheduleEditor.delete.scheduleTimeslots
'
)
}}
</span>
</b-button>
<b-button
v-if=
"schedule.rrule > 1 && scheduleTimeslots.length > 1"
variant=
"danger"
size=
"sm"
@
click=
"deleteSingleTimeslot(schedule.id, timeslot.id)"
>
{{
$t
(
'
scheduleEditor.delete.timeslot
'
)
}}
</b-button>
<template
v-if=
"isInTheFuture(timeslot)"
>
<b-button
variant=
"danger"
size=
"sm"
@
click=
"deleteFullSchedule(schedule.id)"
>
<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
>
{{
$t
(
'
scheduleEditor.delete.scheduleTimeslots
'
)
}}
</span>
</b-button>
<b-button
v-if=
"schedule.rrule > 1 && scheduleTimeslots.length > 1"
variant=
"danger"
size=
"sm"
@
click=
"deleteSingleTimeslot(schedule.id, timeslot.id)"
>
{{
$t
(
'
scheduleEditor.delete.timeslot
'
)
}}
</b-button>
</
template
>
<b-button
v-if=
"schedule.rrule > 1 && scheduleTimeslots.length > 1"
...
...
@@ -269,11 +271,19 @@
return
''
;
}
return
item
.
id
===
this
.
timeslot
.
id
?
'
table-info
'
:
''
},
isInTheFuture
(
timeslot
)
{
const
start
=
new
Date
(
timeslot
.
start
);
const
now
=
new
Date
();
return
start
>
now
;
},
createRepetitionSchedule
()
{
const
{
onlyBusinessDays
,
addNoOfDays
}
=
this
.
getRepetitionParameters
();
const
{
dstart
,
tstart
,
tend
,
rrule
,
until
,
fallback_id
,
automation_id
,
byweekday
}
=
this
.
schedule
;
...
...
src/components/shows/Timeslots.vue
View file @
af21bda5
...
...
@@ -73,13 +73,13 @@
variant=
"outline-danger"
@
click=
"resetFilter()"
>
{{
$t
(
'
showTimeslots.
apply
Filters
'
)
}}
{{
$t
(
'
showTimeslots.
reset
Filters
'
)
}}
</b-btn>
<b-btn
variant=
"outline-success"
@
click=
"applyFilter()"
>
{{
$t
(
'
showTimeslots.
reset
Filters
'
)
}}
{{
$t
(
'
showTimeslots.
apply
Filters
'
)
}}
</b-btn>
</b-container>
</b-collapse>
...
...
@@ -96,6 +96,7 @@
outlined
:fields=
"notesTableArrayFields"
:items=
"notesTableArray"
:tbody-tr-class=
"notesTableRowClass"
>
<template
v-slot:cell(thumbnail)=
"data"
>
<div
...
...
@@ -124,14 +125,14 @@
<!-- And here all the buttons for editing and doing other things
with the displayed timeslot -->
<
template
v-slot:cell(options)=
"data"
>
<span
class=
"timeslotEditLink"
@
click=
"editTimeslotNote(data.item.options.id, data.item.options.schedule)"
><img
src=
"/assets/16x16/emblem-system.png"
:alt=
"$t('showTimeslots.editDescription')"
:title=
"$t('showTimeslots.editDescription')"
></span>
<span
class=
"timeslotEditLink"
@
click=
"editTimeslotNote(data.item.options.id, data.item.options.schedule)"
><img
src=
"/assets/16x16/emblem-system.png"
:alt=
"$t('showTimeslots.editDescription')"
:title=
"$t('showTimeslots.editDescription')"
></span>
<span
class=
"timeslotEditLink"
@
click=
"editTimeslotPlaylist(selectedShow, data.item.options.schedule, data.item.options.id)"
...
...
@@ -259,10 +260,14 @@
}
}
const
{
duration
,
minutes
}
=
this
.
prettyDuration
(
timeslot
.
start
,
timeslot
.
end
);
rows
.
push
({
title
:
note
?
note
.
title
:
null
,
startTimestamp
:
timeslot
.
start
,
starts
:
this
.
prettyDateTime
(
timeslot
.
start
),
duration
:
this
.
prettyDuration
(
timeslot
.
start
,
timeslot
.
end
),
duration
,
durationInMinutes
:
minutes
,
thumbnail
:
note
?
process
.
env
.
VUE_APP_BASEURI_MEDIA
+
note
.
thumbnails
[
2
]
:
null
,
options
:
{
id
:
timeslot
.
id
,
...
...
@@ -300,6 +305,19 @@
},
methods
:
{
notesTableRowClass
(
item
)
{
const
minutesInMs
=
item
.
durationInMinutes
*
60
*
1000
;
const
now
=
new
Date
()
const
startDate
=
new
Date
(
item
.
startTimestamp
);
const
endDate
=
new
Date
(
startDate
.
getTime
()
+
minutesInMs
)
console
.
log
(
now
,
endDate
,
now
>
endDate
);
if
(
now
>
endDate
)
{
return
'
tw-opacity-50
'
}
},
// Apply the newly set filter parameters for our timeslot table
applyFilter
()
{
this
.
timeslotmeta
.
page
=
1
...
...
src/i18n/de.js
View file @
af21bda5
...
...
@@ -193,7 +193,7 @@ export default {
},
'
showTimeslots
'
:
{
'
toggleFilters
'
:
'
Sendeplatz
-Filter ein-/ausblenden
'
,
'
toggleFilters
'
:
'
Ausstrahlungs
-Filter ein-/ausblenden
'
,
'
applyFilters
'
:
'
Filter anwenden
'
,
'
resetFilters
'
:
'
Filter zurücksetzen
'
,
...
...
@@ -204,7 +204,7 @@ export default {
'
uploadToCba
'
:
'
Aufnahme zum CBA hochladen
'
,
'
switchToEmissions
'
:
'
Zur Austrahlungsverwaltung wechseln
'
,
'
numberOfSlots
'
:
'
Anzahl an
Sendeplätz
en
'
,
'
numberOfSlots
'
:
'
Anzahl an
Ausstrahlung
en
'
,
'
from
'
:
'
Von
'
,
'
to
'
:
'
Bis (exklusive)
'
,
},
...
...
@@ -390,7 +390,7 @@ export default {
'
both
'
:
'
Beide löschen
'
,
'
scheduleTimeslots
'
:
'
Programm und alle Sendeplätze löschen
'
,
'
timeslot
'
:
'
Sendeplatz löschen
'
,
'
allTimeslots
'
:
'
Alle Sendeplätze löschen
'
,
'
allTimeslots
'
:
'
Alle
zukünftigen
Sendeplätze löschen
'
,
},
'
repetition
'
:
{
...
...
src/i18n/en.js
View file @
af21bda5
...
...
@@ -390,7 +390,7 @@ export default {
'
both
'
:
'
Delete both
'
,
'
scheduleTimeslots
'
:
'
Delete schedule and all timeslots
'
,
'
timeslot
'
:
'
Delete timeslot
'
,
'
allTimeslots
'
:
'
Delete all timeslots
'
,
'
allTimeslots
'
:
'
Delete all
future
timeslots
'
,
},
'
repetition
'
:
{
...
...
src/mixins/prettyDate.js
View file @
af21bda5
...
...
@@ -85,7 +85,7 @@ export default {
duration
+=
seconds
-
60
*
minutes
duration
+=
'
sec
'
}
return
duration
return
{
duration
,
minutes
}
},
durationInSeconds
:
function
(
ns
)
{
const
durationInMilliseconds
=
Math
.
floor
(
ns
/
1000
/
1000
);
...
...
Richard Blechinger
@pretzelhands
mentioned in issue
#71 (closed)
·
Dec 15, 2020
mentioned in issue
#71 (closed)
mentioned in issue #71
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment