Skip to content

Commit 1c44c61

Browse files
authored
The results will now be a link for admins. (#1649)
Closes SoftUni-Internal/exam-systems-issues#1546
1 parent ef85407 commit 1c44c61

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Servers/UI/OJS.Servers.Ui/ClientApp/src/pages/contests/contest-details/ContestDetailsPage.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,11 @@ const ContestDetailsPage = () => {
189189
<div className={styles.actionBtnWrapper}>
190190
<ContestButton isCompete={isCompete} isDisabled={isDisabled} id={id!} name={name ?? ''} />
191191
{
192-
canViewResults && !isDisabled && data && (isCompete
193-
? data.competeParticipantsCount > 0
194-
: data.practiceParticipantsCount > 0)
192+
(canViewResults && !isDisabled && data &&
193+
(isCompete
194+
? data.competeParticipantsCount > 0
195+
: data.practiceParticipantsCount > 0)) ||
196+
user.isAdmin
195197
? renderResultsAsLink(isCompete)
196198
: renderResultsText(isCompete)
197199
}

0 commit comments

Comments
 (0)