X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Fusers%2FParticipation.js;h=9b7228e7f2a34f46024645f323af82641fdac4f7;hb=aa5f285a5fd3c1047c428b3e9f843b900b966f98;hp=e45fcf668e2fcc26c1bb0121ea6a77bc36a54e68;hpb=beccf752aafd468c3753c6d48ae30bccd946c3b9;p=alttp.git
diff --git a/resources/js/components/users/Participation.js b/resources/js/components/users/Participation.js
index e45fcf6..9b7228e 100644
--- a/resources/js/components/users/Participation.js
+++ b/resources/js/components/users/Participation.js
@@ -1,11 +1,29 @@
import PropTypes from 'prop-types';
import React from 'react';
-import { Alert, Button } from 'react-bootstrap';
+import { Alert, Button, Table } from 'react-bootstrap';
import { withTranslation } from 'react-i18next';
import { useNavigate } from 'react-router-dom';
+import Icon from '../common/Icon';
+import { isRunner } from '../../helpers/Participant';
import i18n from '../../i18n';
+const getIcon = participant => {
+ if (!isRunner(participant)) {
+ return 'â';
+ }
+ if (participant.placement === 1) {
+ return
{i18n.t('participants.tournament')} | +{i18n.t('participants.placement')} | +{i18n.t('participants.roles')} | +
---|---|---|
+ + | ++ {getIcon(p)} + {!p.tournament.locked && isRunner(p) ? + * + : null} + {p.tournament.no_record ? + â + : null} + | ++ {p.roles ? p.roles.map((role, index) => + + {index === 0 ? '' : ', '} + {i18n.t(`participants.roleNames.${role}`)} + + ) : null} + | +