X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Fepisodes%2FItem.js;h=c911bc3b6e1f54e3ff15d09ceb76de4abbccefd0;hb=33157cf7893e1faf8006f4296eb99dd7adf5bc37;hp=19760ee6c5624cb859cb5b65438558f067a56761;hpb=b3beaab812bf23fec423d1d0823b2a25b137ccae;p=alttp.git
diff --git a/resources/js/components/episodes/Item.js b/resources/js/components/episodes/Item.js
index 19760ee..c911bc3 100644
--- a/resources/js/components/episodes/Item.js
+++ b/resources/js/components/episodes/Item.js
@@ -9,7 +9,7 @@ import Crew from './Crew';
import MultiLink from './MultiLink';
import Players from './Players';
import Icon from '../common/Icon';
-import { canRestreamEpisode } from '../../helpers/permissions';
+import { canApplyForEpisode, canRestreamEpisode } from '../../helpers/permissions';
import { withUser } from '../../helpers/UserContext';
const isActive = episode => {
@@ -20,7 +20,7 @@ const isActive = episode => {
return start.isBefore(now) && end.isAfter(now);
};
-const Item = ({ episode, onAddRestream, onEditRestream, user }) => {
+const Item = ({ episode, onAddRestream, onApply, onEditRestream, user }) => {
const { t } = useTranslation();
const classNames = [
@@ -93,8 +93,10 @@ const Item = ({ episode, onAddRestream, onEditRestream, user }) => {
{hasPlayers ?
: null}
- {episode.crew && episode.crew.length ?
-
+ {(episode.crew && episode.crew.length)
+ || canApplyForEpisode(user, episode, 'commentary')
+ || canApplyForEpisode(user, episode, 'tracking') ?
+
: null}
;
@@ -116,6 +118,7 @@ Item.propTypes = {
title: PropTypes.string,
}),
onAddRestream: PropTypes.func,
+ onApply: PropTypes.func,
onEditRestream: PropTypes.func,
user: PropTypes.shape({
}),