X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Fresults%2FItem.js;h=0d73105edd21ac13268223742196ca9bbdfe3daa;hb=855decfd62b51ed500c8a5903f4b263c4c9afb5c;hp=84395222407e1d50854e283a282a31002b73a328;hpb=d32516335ea2534e15256c948e9c38d3de40794b;p=alttp.git diff --git a/resources/js/components/results/Item.js b/resources/js/components/results/Item.js index 8439522..0d73105 100644 --- a/resources/js/components/results/Item.js +++ b/resources/js/components/results/Item.js @@ -16,13 +16,13 @@ const getIcon = (result, maySee) => { if (result.forfeit && maySee) { return ; } - if (result.placement === 1) { + if (result.placement === 1 && maySee) { return ; } - if (result.placement === 2) { + if (result.placement === 2 && maySee) { return ; } - if (result.placement === 3) { + if (result.placement === 3 && maySee) { return ; } return ; @@ -41,6 +41,19 @@ const getTime = (result, maySee) => { return '?'; }; +const getClassName = result => { + const classNames = ['status']; + if (result && result.has_finished) { + classNames.push('finished'); + if (result.comment) { + classNames.push('has-comment'); + } + } else { + classNames.push('pending'); + } + return classNames.join(' '); +}; + const Item = ({ participant, round, @@ -51,7 +64,10 @@ const Item = ({ const maySee = maySeeResults(user, tournament, round); return
-
+
{getTime(result, maySee)}