From 5202f8669dc55b26e7b1ee2a2f0b4ece79269e21 Mon Sep 17 00:00:00 2001 From: cv <34649812+cpvalente@users.noreply.github.com> Date: Mon, 28 Aug 2023 22:31:32 +0200 Subject: [PATCH] feat: operator view --- apps/client/src/features/operator/Operator.tsx | 2 ++ .../features/operator/operator-event/OperatorEvent.tsx | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/client/src/features/operator/Operator.tsx b/apps/client/src/features/operator/Operator.tsx index b599ad03c..e03ced9dd 100644 --- a/apps/client/src/features/operator/Operator.tsx +++ b/apps/client/src/features/operator/Operator.tsx @@ -44,6 +44,7 @@ export default function Operator() { // get fields which the user subscribed to const subscribe = searchParams.get('subscribe') as keyof UserFields | null; + const subscribedAlias = subscribe ? userFields[subscribe] : ''; const showSeconds = isStringBoolean(searchParams.get('showseconds')); const lastEvent = getLastEvent(data); @@ -64,6 +65,7 @@ export default function Operator() { data={entry} isSelected={featureData.selectedEventId === entry.id} subscribed={subscribe} + subscribedAlias={subscribedAlias} showSeconds={showSeconds} /> ); diff --git a/apps/client/src/features/operator/operator-event/OperatorEvent.tsx b/apps/client/src/features/operator/operator-event/OperatorEvent.tsx index 4da6a4491..29d7d3bf4 100644 --- a/apps/client/src/features/operator/operator-event/OperatorEvent.tsx +++ b/apps/client/src/features/operator/operator-event/OperatorEvent.tsx @@ -12,6 +12,7 @@ interface OperatorEventProps { cue: string; isSelected: boolean; subscribed: keyof UserFields | null; + subscribedAlias: string; showSeconds: boolean; } @@ -22,7 +23,7 @@ function RollingTime() { } export default function OperatorEvent(props: OperatorEventProps) { - const { data, cue, isSelected, subscribed, showSeconds } = props; + const { data, cue, isSelected, subscribed, subscribedAlias, showSeconds } = props; const start = formatTime(data.timeStart, { showSeconds }); const end = formatTime(data.timeEnd, { showSeconds }); @@ -57,7 +58,12 @@ export default function OperatorEvent(props: OperatorEventProps) { -