be-components 6.7.8 → 6.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/Authenticator/index.js +1 -0
- package/lib/commonjs/Authenticator/index.js.map +1 -1
- package/lib/commonjs/Competition/components/CompetitionInfoCard.js +13 -0
- package/lib/commonjs/Competition/components/CompetitionInfoCard.js.map +1 -1
- package/lib/commonjs/Competition/components/CompetitionLeaderboard.js +1 -1
- package/lib/commonjs/Competition/components/CompetitionLeaderboard.js.map +1 -1
- package/lib/commonjs/Competition/index.js +26 -43
- package/lib/commonjs/Competition/index.js.map +1 -1
- package/lib/commonjs/CompetitionManager/api/index.js +57 -11
- package/lib/commonjs/CompetitionManager/api/index.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/AdminCompetitionList.js +406 -287
- package/lib/commonjs/CompetitionManager/components/AdminCompetitionList.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/AthleteSelector.js +11 -3
- package/lib/commonjs/CompetitionManager/components/AthleteSelector.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/CompanySelector.js +94 -0
- package/lib/commonjs/CompetitionManager/components/CompanySelector.js.map +1 -0
- package/lib/commonjs/CompetitionManager/components/CompetitionContestsForm.js +135 -107
- package/lib/commonjs/CompetitionManager/components/CompetitionContestsForm.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/CompetitionHeader.js +5 -5
- package/lib/commonjs/CompetitionManager/components/CompetitionHeader.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/CompetitionInfoForm.js +80 -34
- package/lib/commonjs/CompetitionManager/components/CompetitionInfoForm.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/CompetitionMatchMarketCard.js +12 -8
- package/lib/commonjs/CompetitionManager/components/CompetitionMatchMarketCard.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/CompetitionSettingsForm.js +36 -30
- package/lib/commonjs/CompetitionManager/components/CompetitionSettingsForm.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/ContestSelector.js +4 -2
- package/lib/commonjs/CompetitionManager/components/ContestSelector.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/ContestSettingsForm.js +37 -33
- package/lib/commonjs/CompetitionManager/components/ContestSettingsForm.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/GroupSelector.js +94 -0
- package/lib/commonjs/CompetitionManager/components/GroupSelector.js.map +1 -0
- package/lib/commonjs/CompetitionManager/components/MarketSelector.js +21 -12
- package/lib/commonjs/CompetitionManager/components/MarketSelector.js.map +1 -1
- package/lib/commonjs/CompetitionManager/components/PlayerSelector.js +4 -1
- package/lib/commonjs/CompetitionManager/components/PlayerSelector.js.map +1 -1
- package/lib/commonjs/CompetitionManager/index.js +44 -49
- package/lib/commonjs/CompetitionManager/index.js.map +1 -1
- package/lib/commonjs/Components/Toggle.js +2 -1
- package/lib/commonjs/Components/Toggle.js.map +1 -1
- package/lib/commonjs/CreateEngagement/api/index.js +192 -0
- package/lib/commonjs/CreateEngagement/api/index.js.map +1 -0
- package/lib/commonjs/CreateEngagement/index.js +1391 -0
- package/lib/commonjs/CreateEngagement/index.js.map +1 -0
- package/lib/commonjs/MarketComponents/api/index.js +51 -1
- package/lib/commonjs/MarketComponents/api/index.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/LeagueSchedule.js +210 -0
- package/lib/commonjs/MarketComponents/components/LeagueSchedule.js.map +1 -0
- package/lib/commonjs/constants/useColors.js +1 -1
- package/lib/commonjs/constants/useColors.js.map +1 -1
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types.d.js.map +1 -1
- package/lib/module/Authenticator/index.js +1 -0
- package/lib/module/Authenticator/index.js.map +1 -1
- package/lib/module/Competition/components/CompetitionInfoCard.js +13 -0
- package/lib/module/Competition/components/CompetitionInfoCard.js.map +1 -1
- package/lib/module/Competition/components/CompetitionLeaderboard.js +1 -1
- package/lib/module/Competition/components/CompetitionLeaderboard.js.map +1 -1
- package/lib/module/Competition/index.js +26 -43
- package/lib/module/Competition/index.js.map +1 -1
- package/lib/module/CompetitionManager/api/index.js +57 -11
- package/lib/module/CompetitionManager/api/index.js.map +1 -1
- package/lib/module/CompetitionManager/components/AdminCompetitionList.js +391 -272
- package/lib/module/CompetitionManager/components/AdminCompetitionList.js.map +1 -1
- package/lib/module/CompetitionManager/components/AthleteSelector.js +11 -3
- package/lib/module/CompetitionManager/components/AthleteSelector.js.map +1 -1
- package/lib/module/CompetitionManager/components/CompanySelector.js +87 -0
- package/lib/module/CompetitionManager/components/CompanySelector.js.map +1 -0
- package/lib/module/CompetitionManager/components/CompetitionContestsForm.js +135 -107
- package/lib/module/CompetitionManager/components/CompetitionContestsForm.js.map +1 -1
- package/lib/module/CompetitionManager/components/CompetitionHeader.js +5 -5
- package/lib/module/CompetitionManager/components/CompetitionHeader.js.map +1 -1
- package/lib/module/CompetitionManager/components/CompetitionInfoForm.js +80 -34
- package/lib/module/CompetitionManager/components/CompetitionInfoForm.js.map +1 -1
- package/lib/module/CompetitionManager/components/CompetitionMatchMarketCard.js +12 -8
- package/lib/module/CompetitionManager/components/CompetitionMatchMarketCard.js.map +1 -1
- package/lib/module/CompetitionManager/components/CompetitionSettingsForm.js +36 -30
- package/lib/module/CompetitionManager/components/CompetitionSettingsForm.js.map +1 -1
- package/lib/module/CompetitionManager/components/ContestSelector.js +4 -2
- package/lib/module/CompetitionManager/components/ContestSelector.js.map +1 -1
- package/lib/module/CompetitionManager/components/ContestSettingsForm.js +37 -33
- package/lib/module/CompetitionManager/components/ContestSettingsForm.js.map +1 -1
- package/lib/module/CompetitionManager/components/GroupSelector.js +87 -0
- package/lib/module/CompetitionManager/components/GroupSelector.js.map +1 -0
- package/lib/module/CompetitionManager/components/MarketSelector.js +21 -12
- package/lib/module/CompetitionManager/components/MarketSelector.js.map +1 -1
- package/lib/module/CompetitionManager/components/PlayerSelector.js +4 -1
- package/lib/module/CompetitionManager/components/PlayerSelector.js.map +1 -1
- package/lib/module/CompetitionManager/index.js +45 -50
- package/lib/module/CompetitionManager/index.js.map +1 -1
- package/lib/module/Components/Toggle.js +2 -1
- package/lib/module/Components/Toggle.js.map +1 -1
- package/lib/module/CreateEngagement/api/index.js +186 -0
- package/lib/module/CreateEngagement/api/index.js.map +1 -0
- package/lib/module/CreateEngagement/index.js +1383 -0
- package/lib/module/CreateEngagement/index.js.map +1 -0
- package/lib/module/MarketComponents/api/index.js +51 -1
- package/lib/module/MarketComponents/api/index.js.map +1 -1
- package/lib/module/MarketComponents/components/LeagueSchedule.js +202 -0
- package/lib/module/MarketComponents/components/LeagueSchedule.js.map +1 -0
- package/lib/module/constants/useColors.js +1 -1
- package/lib/module/constants/useColors.js.map +1 -1
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.d.js.map +1 -1
- package/lib/typescript/lib/commonjs/Authenticator/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Competition/components/CompetitionInfoCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Competition/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/api/index.d.ts +9 -4
- package/lib/typescript/lib/commonjs/CompetitionManager/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/components/AdminCompetitionList.d.ts +4 -3
- package/lib/typescript/lib/commonjs/CompetitionManager/components/AdminCompetitionList.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/components/AthleteSelector.d.ts +3 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/components/AthleteSelector.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/components/CompanySelector.d.ts +8 -0
- package/lib/typescript/lib/commonjs/CompetitionManager/components/CompanySelector.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/CompetitionManager/components/CompetitionContestsForm.d.ts +2 -2
- package/lib/typescript/lib/commonjs/CompetitionManager/components/CompetitionContestsForm.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/components/CompetitionHeader.d.ts +2 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/components/CompetitionHeader.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/components/CompetitionInfoForm.d.ts +3 -2
- package/lib/typescript/lib/commonjs/CompetitionManager/components/CompetitionInfoForm.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/components/CompetitionMatchMarketCard.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/components/CompetitionSettingsForm.d.ts +1 -2
- package/lib/typescript/lib/commonjs/CompetitionManager/components/CompetitionSettingsForm.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/components/ContestSelector.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/components/ContestSettingsForm.d.ts +1 -2
- package/lib/typescript/lib/commonjs/CompetitionManager/components/ContestSettingsForm.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/components/GroupSelector.d.ts +8 -0
- package/lib/typescript/lib/commonjs/CompetitionManager/components/GroupSelector.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/CompetitionManager/components/MarketSelector.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/components/PlayerSelector.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/index.d.ts +4 -1
- package/lib/typescript/lib/commonjs/CompetitionManager/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Components/Toggle.d.ts +2 -1
- package/lib/typescript/lib/commonjs/Components/Toggle.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/CreateEngagement/api/index.d.ts +39 -0
- package/lib/typescript/lib/commonjs/CreateEngagement/api/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/CreateEngagement/index.d.ts +18 -0
- package/lib/typescript/lib/commonjs/CreateEngagement/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/MarketComponents/api/index.d.ts +8 -0
- package/lib/typescript/lib/commonjs/MarketComponents/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MarketComponents/components/LeagueSchedule.d.ts +8 -0
- package/lib/typescript/lib/commonjs/MarketComponents/components/LeagueSchedule.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/index.d.ts +1 -0
- package/lib/typescript/lib/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Authenticator/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Competition/components/CompetitionInfoCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/Competition/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/api/index.d.ts +9 -4
- package/lib/typescript/lib/module/CompetitionManager/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/components/AdminCompetitionList.d.ts +5 -5
- package/lib/typescript/lib/module/CompetitionManager/components/AdminCompetitionList.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/components/AthleteSelector.d.ts +3 -1
- package/lib/typescript/lib/module/CompetitionManager/components/AthleteSelector.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/components/CompanySelector.d.ts +8 -0
- package/lib/typescript/lib/module/CompetitionManager/components/CompanySelector.d.ts.map +1 -0
- package/lib/typescript/lib/module/CompetitionManager/components/CompetitionContestsForm.d.ts +2 -2
- package/lib/typescript/lib/module/CompetitionManager/components/CompetitionContestsForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/components/CompetitionHeader.d.ts +2 -1
- package/lib/typescript/lib/module/CompetitionManager/components/CompetitionHeader.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/components/CompetitionInfoForm.d.ts +3 -2
- package/lib/typescript/lib/module/CompetitionManager/components/CompetitionInfoForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/components/CompetitionMatchMarketCard.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/components/CompetitionSettingsForm.d.ts +1 -2
- package/lib/typescript/lib/module/CompetitionManager/components/CompetitionSettingsForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/components/ContestSelector.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/components/ContestSettingsForm.d.ts +1 -2
- package/lib/typescript/lib/module/CompetitionManager/components/ContestSettingsForm.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/components/GroupSelector.d.ts +8 -0
- package/lib/typescript/lib/module/CompetitionManager/components/GroupSelector.d.ts.map +1 -0
- package/lib/typescript/lib/module/CompetitionManager/components/MarketSelector.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/components/PlayerSelector.d.ts.map +1 -1
- package/lib/typescript/lib/module/CompetitionManager/index.d.ts +4 -1
- package/lib/typescript/lib/module/CompetitionManager/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/Toggle.d.ts +2 -1
- package/lib/typescript/lib/module/Components/Toggle.d.ts.map +1 -1
- package/lib/typescript/lib/module/CreateEngagement/api/index.d.ts +38 -0
- package/lib/typescript/lib/module/CreateEngagement/api/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/CreateEngagement/index.d.ts +18 -0
- package/lib/typescript/lib/module/CreateEngagement/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/MarketComponents/api/index.d.ts +8 -0
- package/lib/typescript/lib/module/MarketComponents/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/MarketComponents/components/LeagueSchedule.d.ts +8 -0
- package/lib/typescript/lib/module/MarketComponents/components/LeagueSchedule.d.ts.map +1 -0
- package/lib/typescript/lib/module/index.d.ts +2 -1
- package/lib/typescript/lib/module/index.d.ts.map +1 -1
- package/lib/typescript/src/Competition/components/CompetitionInfoCard.d.ts.map +1 -1
- package/lib/typescript/src/Competition/index.d.ts +1 -1
- package/lib/typescript/src/Competition/index.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/api/index.d.ts +13 -5
- package/lib/typescript/src/CompetitionManager/api/index.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/components/AdminCompetitionList.d.ts +5 -1
- package/lib/typescript/src/CompetitionManager/components/AdminCompetitionList.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/components/AthleteSelector.d.ts +4 -2
- package/lib/typescript/src/CompetitionManager/components/AthleteSelector.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/components/CompanySelector.d.ts +10 -0
- package/lib/typescript/src/CompetitionManager/components/CompanySelector.d.ts.map +1 -0
- package/lib/typescript/src/CompetitionManager/components/CompetitionContestsForm.d.ts +1 -2
- package/lib/typescript/src/CompetitionManager/components/CompetitionContestsForm.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/components/CompetitionHeader.d.ts +3 -1
- package/lib/typescript/src/CompetitionManager/components/CompetitionHeader.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/components/CompetitionInfoForm.d.ts +4 -3
- package/lib/typescript/src/CompetitionManager/components/CompetitionInfoForm.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/components/CompetitionMatchMarketCard.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/components/CompetitionSettingsForm.d.ts +1 -2
- package/lib/typescript/src/CompetitionManager/components/CompetitionSettingsForm.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/components/ContestSettingsForm.d.ts +1 -2
- package/lib/typescript/src/CompetitionManager/components/ContestSettingsForm.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/components/GroupSelector.d.ts +10 -0
- package/lib/typescript/src/CompetitionManager/components/GroupSelector.d.ts.map +1 -0
- package/lib/typescript/src/CompetitionManager/components/MarketSelector.d.ts.map +1 -1
- package/lib/typescript/src/CompetitionManager/index.d.ts +5 -1
- package/lib/typescript/src/CompetitionManager/index.d.ts.map +1 -1
- package/lib/typescript/src/Components/Toggle.d.ts +2 -1
- package/lib/typescript/src/Components/Toggle.d.ts.map +1 -1
- package/lib/typescript/src/CreateEngagement/api/index.d.ts +29 -0
- package/lib/typescript/src/CreateEngagement/api/index.d.ts.map +1 -0
- package/lib/typescript/src/CreateEngagement/index.d.ts +21 -0
- package/lib/typescript/src/CreateEngagement/index.d.ts.map +1 -0
- package/lib/typescript/src/MarketComponents/api/index.d.ts +8 -0
- package/lib/typescript/src/MarketComponents/api/index.d.ts.map +1 -1
- package/lib/typescript/src/MarketComponents/components/LeagueSchedule.d.ts +10 -0
- package/lib/typescript/src/MarketComponents/components/LeagueSchedule.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Authenticator/index.tsx +1 -1
- package/src/Competition/components/CompetitionInfoCard.tsx +4 -0
- package/src/Competition/components/CompetitionLeaderboard.tsx +1 -1
- package/src/Competition/index.tsx +16 -29
- package/src/CompetitionManager/api/index.ts +49 -6
- package/src/CompetitionManager/components/AdminCompetitionList.tsx +247 -176
- package/src/CompetitionManager/components/AthleteSelector.tsx +14 -5
- package/src/CompetitionManager/components/CompanySelector.tsx +58 -0
- package/src/CompetitionManager/components/CompetitionContestsForm.tsx +96 -84
- package/src/CompetitionManager/components/CompetitionHeader.tsx +5 -4
- package/src/CompetitionManager/components/CompetitionInfoForm.tsx +59 -29
- package/src/CompetitionManager/components/CompetitionMatchMarketCard.tsx +9 -14
- package/src/CompetitionManager/components/CompetitionSettingsForm.tsx +30 -36
- package/src/CompetitionManager/components/ContestSelector.tsx +2 -2
- package/src/CompetitionManager/components/ContestSettingsForm.tsx +24 -25
- package/src/CompetitionManager/components/GroupSelector.tsx +57 -0
- package/src/CompetitionManager/components/MarketSelector.tsx +14 -13
- package/src/CompetitionManager/components/PlayerSelector.tsx +1 -1
- package/src/CompetitionManager/index.tsx +49 -33
- package/src/Components/Toggle.tsx +3 -2
- package/src/CreateEngagement/api/index.ts +138 -0
- package/src/CreateEngagement/index.tsx +874 -0
- package/src/MarketComponents/api/index.ts +60 -1
- package/src/MarketComponents/components/LeagueSchedule.tsx +161 -0
- package/src/constants/useColors.tsx +1 -1
- package/src/index.tsx +2 -0
- package/src/types.d.ts +8 -2
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { FlatList, Image, ActivityIndicator } from "react-native";
|
|
3
3
|
import { ManageCompetitionApi, ManageCompetitionHelpers } from "../api";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { Icons, Toggle } from "../../Components";
|
|
5
|
+
import { Button, Text, View } from "../../Components/Themed";
|
|
6
|
+
import { useColors } from "../../constants/useColors";
|
|
7
|
+
import Pagination from "../../Components/Pagination";
|
|
8
|
+
const sections = ['header', 'toggle', 'active_past_toggle', 'pagination', 'loading', 'admin_competitions', 'competitions', 'admin_squares', 'squares', 'admin_brackets', 'brackets'];
|
|
7
9
|
const AdminCompetitionList = ({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
header_style,
|
|
11
|
+
float,
|
|
12
|
+
footer_style,
|
|
10
13
|
onClose,
|
|
11
14
|
onCreateNew,
|
|
12
15
|
onSelectCompetition,
|
|
13
16
|
onSelectBracketCompetition,
|
|
14
17
|
onSelectSquaresCompetition
|
|
15
18
|
}) => {
|
|
19
|
+
const Colors = useColors();
|
|
16
20
|
const [list_data, setData] = useState({
|
|
17
21
|
loading: false,
|
|
18
22
|
offset: 0,
|
|
@@ -21,8 +25,13 @@ const AdminCompetitionList = ({
|
|
|
21
25
|
competitions: [],
|
|
22
26
|
competition_players: [],
|
|
23
27
|
competition_records: [],
|
|
28
|
+
show_admin_brackets: false,
|
|
29
|
+
show_admin_competitions: false,
|
|
30
|
+
show_admin_squares: false,
|
|
24
31
|
competition_results: [],
|
|
32
|
+
admin_brackets: [],
|
|
25
33
|
admin_competitions: [],
|
|
34
|
+
admin_squares: [],
|
|
26
35
|
competition_seasons: [],
|
|
27
36
|
competition_season_players: [],
|
|
28
37
|
competition_season_results: [],
|
|
@@ -35,6 +44,11 @@ const AdminCompetitionList = ({
|
|
|
35
44
|
offset,
|
|
36
45
|
active_tab,
|
|
37
46
|
active_engagement,
|
|
47
|
+
show_admin_brackets,
|
|
48
|
+
show_admin_competitions,
|
|
49
|
+
show_admin_squares,
|
|
50
|
+
admin_squares,
|
|
51
|
+
admin_brackets,
|
|
38
52
|
loading,
|
|
39
53
|
competitions,
|
|
40
54
|
admin_competitions,
|
|
@@ -86,20 +100,24 @@ const AdminCompetitionList = ({
|
|
|
86
100
|
return;
|
|
87
101
|
case 'brackets':
|
|
88
102
|
if (active_tab == 'active') {
|
|
103
|
+
const admin_bracks_active = await ManageCompetitionApi.getMyActiveAdminBracketCompetitions();
|
|
89
104
|
const b_resp = await ManageCompetitionApi.getMyActiveBracketCompetitions();
|
|
90
105
|
setData({
|
|
91
106
|
...list_data,
|
|
92
107
|
loading: false,
|
|
108
|
+
admin_brackets: admin_bracks_active,
|
|
93
109
|
bracket_competitions: b_resp.bracket_competitions,
|
|
94
110
|
player_brackets: b_resp.player_brackets,
|
|
95
111
|
competition_player_brackets: b_resp.competition_player_brackets,
|
|
96
112
|
offset
|
|
97
113
|
});
|
|
98
114
|
} else {
|
|
115
|
+
const admin_bracks_history = await ManageCompetitionApi.getMyHistoryAdminBracketCompetitions(offset);
|
|
99
116
|
const b_resp = await ManageCompetitionApi.getMyHistoryBracketCompetitions(offset);
|
|
100
117
|
setData({
|
|
101
118
|
...list_data,
|
|
102
119
|
loading: false,
|
|
120
|
+
admin_brackets: admin_bracks_history,
|
|
103
121
|
bracket_competitions: b_resp.bracket_competitions,
|
|
104
122
|
player_brackets: b_resp.player_brackets,
|
|
105
123
|
competition_player_brackets: b_resp.competition_player_brackets,
|
|
@@ -109,18 +127,22 @@ const AdminCompetitionList = ({
|
|
|
109
127
|
return;
|
|
110
128
|
case 'squares':
|
|
111
129
|
if (active_tab == 'active') {
|
|
130
|
+
const active_admin_squares = await ManageCompetitionApi.getMyActiveAdminSquares();
|
|
112
131
|
const s_resp = await ManageCompetitionApi.getMyActiveSquaresCompetitions();
|
|
113
132
|
setData({
|
|
114
133
|
...list_data,
|
|
115
134
|
loading: false,
|
|
116
135
|
offset,
|
|
136
|
+
admin_squares: active_admin_squares,
|
|
117
137
|
squares_competitions: s_resp.squares_competitions
|
|
118
138
|
});
|
|
119
139
|
} else {
|
|
140
|
+
const past_admin_squares = await ManageCompetitionApi.getMyHistoryAdminSquares(offset);
|
|
120
141
|
const s_resp = await ManageCompetitionApi.getMyHistorySquaresCompetitions(offset);
|
|
121
142
|
setData({
|
|
122
143
|
...list_data,
|
|
123
144
|
loading: false,
|
|
145
|
+
admin_squares: past_admin_squares,
|
|
124
146
|
offset,
|
|
125
147
|
squares_competitions: s_resp.squares_competitions
|
|
126
148
|
});
|
|
@@ -133,12 +155,14 @@ const AdminCompetitionList = ({
|
|
|
133
155
|
const renderCompetitions = data => {
|
|
134
156
|
const competition_result = competition_results.find(cr => cr.competition_id == data.item.competition_id);
|
|
135
157
|
const cl = data.item.market_type == 'FOR_MONEY' ? '$' : 'E';
|
|
136
|
-
return /*#__PURE__*/React.createElement(
|
|
158
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
137
159
|
style: {
|
|
138
|
-
|
|
160
|
+
flexDirection: 'row',
|
|
161
|
+
alignItems: 'center',
|
|
162
|
+
borderRadius: 0,
|
|
139
163
|
padding: 15,
|
|
140
164
|
borderBottomWidth: 1,
|
|
141
|
-
borderColor: Colors.
|
|
165
|
+
borderColor: Colors.borders.light
|
|
142
166
|
},
|
|
143
167
|
onPress: () => onSelectCompetition(data.item)
|
|
144
168
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
@@ -157,12 +181,12 @@ const AdminCompetitionList = ({
|
|
|
157
181
|
marginLeft: 10
|
|
158
182
|
}
|
|
159
183
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
160
|
-
theme: "
|
|
184
|
+
theme: "h2"
|
|
161
185
|
}, data.item.competition_name), /*#__PURE__*/React.createElement(Text, {
|
|
162
186
|
style: {
|
|
163
187
|
marginTop: 3
|
|
164
188
|
},
|
|
165
|
-
theme: "
|
|
189
|
+
theme: "description"
|
|
166
190
|
}, data.item.competition_description)), competition_result ? /*#__PURE__*/React.createElement(View, {
|
|
167
191
|
style: {
|
|
168
192
|
marginRight: 10,
|
|
@@ -170,63 +194,27 @@ const AdminCompetitionList = ({
|
|
|
170
194
|
justifyContent: 'center'
|
|
171
195
|
}
|
|
172
196
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
173
|
-
size: 12
|
|
174
|
-
color: Colors.brand.midnight,
|
|
175
|
-
weight: "bold",
|
|
176
|
-
textAlign: "center"
|
|
197
|
+
size: 12
|
|
177
198
|
}, ManageCompetitionHelpers.formatPlace(competition_result.place)), /*#__PURE__*/React.createElement(Text, {
|
|
178
199
|
size: 12,
|
|
179
|
-
color: Colors.brand.midnight,
|
|
180
|
-
textAlign: "center",
|
|
181
200
|
style: {
|
|
182
201
|
marginTop: 3
|
|
183
202
|
}
|
|
184
203
|
}, cl, competition_result.winnings.toFixed(2))) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(Icons.ChevronIcon, {
|
|
185
204
|
direction: "right",
|
|
186
205
|
size: 8,
|
|
187
|
-
color: Colors.
|
|
206
|
+
color: Colors.text.h1
|
|
188
207
|
}));
|
|
189
208
|
};
|
|
190
|
-
const renderAdminCompetitions = data => {
|
|
191
|
-
return /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
192
|
-
style: {
|
|
193
|
-
borderRadius: 8,
|
|
194
|
-
backgroundColor: Colors.shades.white,
|
|
195
|
-
width: width / 3,
|
|
196
|
-
borderWidth: 1,
|
|
197
|
-
borderColor: Colors.shades.shade600
|
|
198
|
-
},
|
|
199
|
-
onPress: () => onSelectCompetition(data.item)
|
|
200
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
201
|
-
source: {
|
|
202
|
-
uri: data.item.image?.url
|
|
203
|
-
},
|
|
204
|
-
style: {
|
|
205
|
-
height: width / 3 * 0.5,
|
|
206
|
-
width: width / 3,
|
|
207
|
-
borderRadius: 4,
|
|
208
|
-
borderBottomRightRadius: 0,
|
|
209
|
-
borderBottomLeftRadius: 0
|
|
210
|
-
},
|
|
211
|
-
resizeMode: "cover"
|
|
212
|
-
}), /*#__PURE__*/React.createElement(View, {
|
|
213
|
-
style: {
|
|
214
|
-
marginTop: 5,
|
|
215
|
-
padding: 10
|
|
216
|
-
}
|
|
217
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
218
|
-
size: 14,
|
|
219
|
-
textAlign: "center",
|
|
220
|
-
weight: "bold"
|
|
221
|
-
}, data.item.competition_name)));
|
|
222
|
-
};
|
|
223
209
|
const renderSquares = data => {
|
|
224
|
-
return /*#__PURE__*/React.createElement(
|
|
210
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
225
211
|
style: {
|
|
226
|
-
|
|
212
|
+
flexDirection: 'row',
|
|
213
|
+
alignItems: 'center',
|
|
214
|
+
borderRadius: 0,
|
|
227
215
|
padding: 10,
|
|
228
216
|
borderBottomWidth: 1,
|
|
229
|
-
borderColor: Colors.
|
|
217
|
+
borderColor: Colors.borders.light
|
|
230
218
|
},
|
|
231
219
|
onPress: () => onSelectSquaresCompetition(data.item)
|
|
232
220
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
@@ -245,27 +233,29 @@ const AdminCompetitionList = ({
|
|
|
245
233
|
marginLeft: 10
|
|
246
234
|
}
|
|
247
235
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
248
|
-
theme: "
|
|
236
|
+
theme: "h2"
|
|
249
237
|
}, data.item.sq_comp_name), /*#__PURE__*/React.createElement(Text, {
|
|
250
238
|
style: {
|
|
251
239
|
marginTop: 3
|
|
252
240
|
},
|
|
253
|
-
theme: "
|
|
241
|
+
theme: "description"
|
|
254
242
|
}, data.item.sq_comp_description)), /*#__PURE__*/React.createElement(Icons.ChevronIcon, {
|
|
255
243
|
direction: "right",
|
|
256
244
|
size: 8,
|
|
257
|
-
color: Colors.
|
|
245
|
+
color: Colors.text.h1
|
|
258
246
|
}));
|
|
259
247
|
};
|
|
260
248
|
const renderBrackets = data => {
|
|
261
249
|
const competition_player_bracket = competition_player_brackets.find(cpb => cpb.bracket_competition_id == data.item.bracket_competition_id);
|
|
262
250
|
const cl = data.item.market_type == 'FOR_MONEY' ? '$' : 'E';
|
|
263
|
-
return /*#__PURE__*/React.createElement(
|
|
251
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
264
252
|
style: {
|
|
265
|
-
|
|
253
|
+
flexDirection: 'row',
|
|
254
|
+
alignItems: 'center',
|
|
255
|
+
borderRadius: 0,
|
|
266
256
|
padding: 10,
|
|
267
257
|
borderBottomWidth: 1,
|
|
268
|
-
borderColor: Colors.
|
|
258
|
+
borderColor: Colors.borders.light
|
|
269
259
|
},
|
|
270
260
|
onPress: () => onSelectBracketCompetition(data.item)
|
|
271
261
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
@@ -284,12 +274,12 @@ const AdminCompetitionList = ({
|
|
|
284
274
|
marginLeft: 10
|
|
285
275
|
}
|
|
286
276
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
287
|
-
theme: "
|
|
277
|
+
theme: "h2"
|
|
288
278
|
}, data.item.competition_name), /*#__PURE__*/React.createElement(Text, {
|
|
289
279
|
style: {
|
|
290
280
|
marginTop: 3
|
|
291
281
|
},
|
|
292
|
-
theme: "
|
|
282
|
+
theme: "description"
|
|
293
283
|
}, data.item.competition_description)), competition_player_bracket ? /*#__PURE__*/React.createElement(View, {
|
|
294
284
|
style: {
|
|
295
285
|
marginRight: 10,
|
|
@@ -297,240 +287,369 @@ const AdminCompetitionList = ({
|
|
|
297
287
|
justifyContent: 'center'
|
|
298
288
|
}
|
|
299
289
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
300
|
-
size: 12
|
|
301
|
-
color: Colors.brand.midnight,
|
|
302
|
-
weight: "bold",
|
|
303
|
-
textAlign: "center"
|
|
290
|
+
size: 12
|
|
304
291
|
}, ManageCompetitionHelpers.formatPlace(competition_player_bracket.place)), /*#__PURE__*/React.createElement(Text, {
|
|
305
292
|
size: 12,
|
|
306
|
-
color: Colors.brand.midnight,
|
|
307
|
-
textAlign: "center",
|
|
308
293
|
style: {
|
|
309
294
|
marginTop: 3
|
|
310
295
|
}
|
|
311
296
|
}, cl, competition_player_bracket.winnings.toFixed(2))) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(Icons.ChevronIcon, {
|
|
312
297
|
direction: "right",
|
|
313
298
|
size: 8,
|
|
314
|
-
color: Colors.
|
|
299
|
+
color: Colors.text.h1
|
|
315
300
|
}));
|
|
316
301
|
};
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
302
|
+
const renderSections = data => {
|
|
303
|
+
switch (data.item) {
|
|
304
|
+
case 'header':
|
|
305
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
306
|
+
type: "header",
|
|
307
|
+
style: {
|
|
308
|
+
flexDirection: 'row',
|
|
309
|
+
alignItems: 'center',
|
|
310
|
+
padding: 10,
|
|
311
|
+
...header_style
|
|
312
|
+
}
|
|
313
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
314
|
+
transparent: true,
|
|
315
|
+
style: {
|
|
316
|
+
flex: 1
|
|
317
|
+
}
|
|
318
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
319
|
+
theme: "h1"
|
|
320
|
+
}, "My Admin Engagements"), /*#__PURE__*/React.createElement(Text, {
|
|
321
|
+
theme: "description",
|
|
322
|
+
style: {
|
|
323
|
+
marginTop: 3
|
|
324
|
+
}
|
|
325
|
+
}, "Use the buttons below to see your active and past engagements (competitions, brackets, squares, etc)")), /*#__PURE__*/React.createElement(Button, {
|
|
326
|
+
title: "X",
|
|
327
|
+
float: true,
|
|
328
|
+
title_color: Colors.text.error,
|
|
329
|
+
onPress: () => onClose()
|
|
330
|
+
}));
|
|
331
|
+
case 'toggle':
|
|
332
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
333
|
+
style: {
|
|
334
|
+
padding: 10
|
|
335
|
+
}
|
|
336
|
+
}, /*#__PURE__*/React.createElement(Toggle, {
|
|
337
|
+
options: [{
|
|
338
|
+
key: 'competitions',
|
|
339
|
+
label: 'Competitions'
|
|
340
|
+
}, {
|
|
341
|
+
key: 'squares',
|
|
342
|
+
label: 'Squares'
|
|
343
|
+
}, {
|
|
344
|
+
key: 'brackets',
|
|
345
|
+
label: 'Brackets'
|
|
346
|
+
}],
|
|
347
|
+
selected_option: active_engagement,
|
|
348
|
+
onSelectOption: o => setData({
|
|
349
|
+
...list_data,
|
|
350
|
+
active_engagement: o
|
|
351
|
+
})
|
|
352
|
+
}));
|
|
353
|
+
case 'active_past_toggle':
|
|
354
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
355
|
+
style: {
|
|
356
|
+
padding: 10
|
|
357
|
+
}
|
|
358
|
+
}, /*#__PURE__*/React.createElement(Toggle, {
|
|
359
|
+
options: [{
|
|
360
|
+
key: 'closed',
|
|
361
|
+
label: 'Closed'
|
|
362
|
+
}, {
|
|
363
|
+
key: 'active',
|
|
364
|
+
label: 'Active'
|
|
365
|
+
}],
|
|
366
|
+
selected_option: active_tab,
|
|
367
|
+
onSelectOption: o => setData({
|
|
368
|
+
...list_data,
|
|
369
|
+
active_tab: o
|
|
370
|
+
})
|
|
371
|
+
}));
|
|
372
|
+
case 'pagination':
|
|
373
|
+
if (active_tab != 'closed') {
|
|
374
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
375
|
+
}
|
|
376
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
377
|
+
transparent: true
|
|
378
|
+
}, /*#__PURE__*/React.createElement(Pagination, {
|
|
379
|
+
offset: offset,
|
|
380
|
+
onNext: () => getDataFromServer(offset + 1),
|
|
381
|
+
onPrevious: () => getDataFromServer(offset - 1)
|
|
382
|
+
}));
|
|
383
|
+
case 'loading':
|
|
384
|
+
if (!loading) {
|
|
385
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
386
|
+
}
|
|
387
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
388
|
+
transparent: true
|
|
389
|
+
}, /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
390
|
+
style: {
|
|
391
|
+
alignSelf: 'center',
|
|
392
|
+
padding: 20
|
|
393
|
+
},
|
|
394
|
+
size: "large",
|
|
395
|
+
color: Colors.text.h1
|
|
396
|
+
}));
|
|
397
|
+
case 'admin_competitions':
|
|
398
|
+
if (active_engagement != 'competitions') {
|
|
399
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
400
|
+
}
|
|
401
|
+
if (admin_competitions.length == 0) {
|
|
402
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
403
|
+
}
|
|
404
|
+
return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
|
|
405
|
+
type: "header",
|
|
406
|
+
style: {
|
|
407
|
+
flexDirection: 'row',
|
|
408
|
+
alignItems: 'center',
|
|
409
|
+
padding: 10
|
|
410
|
+
}
|
|
411
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
412
|
+
transparent: true,
|
|
413
|
+
style: {
|
|
414
|
+
flex: 1
|
|
415
|
+
}
|
|
416
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
417
|
+
theme: "h1"
|
|
418
|
+
}, "Admin Competitions"), /*#__PURE__*/React.createElement(Text, {
|
|
419
|
+
theme: "description",
|
|
420
|
+
style: {
|
|
421
|
+
marginTop: 3
|
|
422
|
+
}
|
|
423
|
+
}, "Below are the competitions that you are the admin of")), /*#__PURE__*/React.createElement(Button, {
|
|
424
|
+
transparent: true,
|
|
425
|
+
onPress: () => setData({
|
|
426
|
+
...list_data,
|
|
427
|
+
show_admin_competitions: !show_admin_competitions
|
|
428
|
+
})
|
|
429
|
+
}, /*#__PURE__*/React.createElement(Icons.ChevronIcon, {
|
|
430
|
+
size: 10,
|
|
431
|
+
direction: show_admin_competitions ? 'up' : 'down',
|
|
432
|
+
color: Colors.text.action
|
|
433
|
+
}))), show_admin_competitions ? /*#__PURE__*/React.createElement(FlatList, {
|
|
434
|
+
data: admin_competitions,
|
|
435
|
+
key: 'admin_comps_list',
|
|
436
|
+
keyExtractor: item => `admin_${item.competition_id}`,
|
|
437
|
+
renderItem: renderCompetitions
|
|
438
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null));
|
|
439
|
+
case 'competitions':
|
|
440
|
+
if (active_engagement != 'competitions') {
|
|
441
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
442
|
+
}
|
|
443
|
+
if (competitions.length == 0) {
|
|
444
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
445
|
+
}
|
|
446
|
+
return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
|
|
447
|
+
type: "header",
|
|
448
|
+
style: {
|
|
449
|
+
flexDirection: 'row',
|
|
450
|
+
alignItems: 'center',
|
|
451
|
+
padding: 10
|
|
452
|
+
}
|
|
453
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
454
|
+
transparent: true,
|
|
455
|
+
style: {
|
|
456
|
+
flex: 1
|
|
457
|
+
}
|
|
458
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
459
|
+
theme: "h1"
|
|
460
|
+
}, "My Competitions"), /*#__PURE__*/React.createElement(Text, {
|
|
461
|
+
theme: "description",
|
|
462
|
+
style: {
|
|
463
|
+
marginTop: 3
|
|
464
|
+
}
|
|
465
|
+
}, "Below are the competitions that you have joined"))), /*#__PURE__*/React.createElement(FlatList, {
|
|
466
|
+
data: competitions,
|
|
467
|
+
key: 'competitions_list',
|
|
468
|
+
keyExtractor: item => item.competition_id.toString(),
|
|
469
|
+
renderItem: renderCompetitions
|
|
470
|
+
}));
|
|
471
|
+
case 'admin_squares':
|
|
472
|
+
if (active_engagement != 'squares') {
|
|
473
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
474
|
+
}
|
|
475
|
+
if (admin_squares.length == 0) {
|
|
476
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
477
|
+
}
|
|
478
|
+
return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
|
|
479
|
+
type: "header",
|
|
480
|
+
style: {
|
|
481
|
+
flexDirection: 'row',
|
|
482
|
+
alignItems: 'center',
|
|
483
|
+
padding: 10
|
|
484
|
+
}
|
|
485
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
486
|
+
transparent: true,
|
|
487
|
+
style: {
|
|
488
|
+
flex: 1
|
|
489
|
+
}
|
|
490
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
491
|
+
theme: "h1"
|
|
492
|
+
}, "Admin Squares Competitions"), /*#__PURE__*/React.createElement(Text, {
|
|
493
|
+
theme: "description",
|
|
494
|
+
style: {
|
|
495
|
+
marginTop: 3
|
|
496
|
+
}
|
|
497
|
+
}, "Below are the squares competitions that you are the admin of")), /*#__PURE__*/React.createElement(Button, {
|
|
498
|
+
transparent: true,
|
|
499
|
+
onPress: () => setData({
|
|
500
|
+
...list_data,
|
|
501
|
+
show_admin_squares: !show_admin_squares
|
|
502
|
+
})
|
|
503
|
+
}, /*#__PURE__*/React.createElement(Icons.ChevronIcon, {
|
|
504
|
+
size: 10,
|
|
505
|
+
direction: show_admin_squares ? 'up' : 'down',
|
|
506
|
+
color: Colors.text.action
|
|
507
|
+
}))), show_admin_squares ? /*#__PURE__*/React.createElement(FlatList, {
|
|
508
|
+
data: admin_squares,
|
|
509
|
+
key: 'admin_squares_list',
|
|
510
|
+
keyExtractor: item => `admin_${item.sq_comp_id}`,
|
|
511
|
+
renderItem: renderSquares
|
|
512
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null));
|
|
513
|
+
case 'squares':
|
|
514
|
+
if (active_engagement != 'squares') {
|
|
515
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
516
|
+
}
|
|
517
|
+
if (squares_competitions.length == 0) {
|
|
518
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
519
|
+
}
|
|
520
|
+
return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
|
|
521
|
+
type: "header",
|
|
522
|
+
style: {
|
|
523
|
+
flexDirection: 'row',
|
|
524
|
+
alignItems: 'center',
|
|
525
|
+
padding: 10
|
|
526
|
+
}
|
|
527
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
528
|
+
transparent: true,
|
|
529
|
+
style: {
|
|
530
|
+
flex: 1
|
|
531
|
+
}
|
|
532
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
533
|
+
theme: "h1"
|
|
534
|
+
}, "Squares Competitions"), /*#__PURE__*/React.createElement(Text, {
|
|
535
|
+
theme: "description",
|
|
536
|
+
style: {
|
|
537
|
+
marginTop: 3
|
|
538
|
+
}
|
|
539
|
+
}, "Below are the squares competitions that you are participating in"))), /*#__PURE__*/React.createElement(FlatList, {
|
|
540
|
+
data: squares_competitions,
|
|
541
|
+
key: 'squares_list',
|
|
542
|
+
keyExtractor: item => `${item.sq_comp_id}`,
|
|
543
|
+
renderItem: renderSquares
|
|
544
|
+
}));
|
|
545
|
+
case 'admin_brackets':
|
|
546
|
+
if (active_engagement != 'brackets') {
|
|
547
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
548
|
+
}
|
|
549
|
+
if (admin_brackets.length == 0) {
|
|
550
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
551
|
+
}
|
|
552
|
+
return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
|
|
553
|
+
type: "header",
|
|
554
|
+
style: {
|
|
555
|
+
flexDirection: 'row',
|
|
556
|
+
alignItems: 'center',
|
|
557
|
+
padding: 10
|
|
558
|
+
}
|
|
559
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
560
|
+
transparent: true,
|
|
561
|
+
style: {
|
|
562
|
+
flex: 1
|
|
563
|
+
}
|
|
564
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
565
|
+
theme: "h1"
|
|
566
|
+
}, "Admin Bracket Competitions"), /*#__PURE__*/React.createElement(Text, {
|
|
567
|
+
theme: "description",
|
|
568
|
+
style: {
|
|
569
|
+
marginTop: 3
|
|
570
|
+
}
|
|
571
|
+
}, "Below are the bracket competitions that you are the admin of")), /*#__PURE__*/React.createElement(Button, {
|
|
572
|
+
transparent: true,
|
|
573
|
+
onPress: () => setData({
|
|
574
|
+
...list_data,
|
|
575
|
+
show_admin_brackets: !show_admin_brackets
|
|
576
|
+
})
|
|
577
|
+
}, /*#__PURE__*/React.createElement(Icons.ChevronIcon, {
|
|
578
|
+
size: 10,
|
|
579
|
+
direction: show_admin_brackets ? 'up' : 'down',
|
|
580
|
+
color: Colors.text.action
|
|
581
|
+
}))), show_admin_brackets ? /*#__PURE__*/React.createElement(FlatList, {
|
|
582
|
+
data: admin_brackets,
|
|
583
|
+
key: 'admin_brackets_list',
|
|
584
|
+
keyExtractor: item => `admin_${item.bracket_competition_id}`,
|
|
585
|
+
renderItem: renderBrackets
|
|
586
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null));
|
|
587
|
+
case 'brackets':
|
|
588
|
+
if (active_engagement != 'brackets') {
|
|
589
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
590
|
+
}
|
|
591
|
+
if (bracket_competitions.length == 0) {
|
|
592
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
593
|
+
}
|
|
594
|
+
return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(View, {
|
|
595
|
+
type: "header",
|
|
596
|
+
style: {
|
|
597
|
+
flexDirection: 'row',
|
|
598
|
+
alignItems: 'center',
|
|
599
|
+
padding: 10
|
|
600
|
+
}
|
|
601
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
602
|
+
transparent: true,
|
|
603
|
+
style: {
|
|
604
|
+
flex: 1
|
|
605
|
+
}
|
|
606
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
607
|
+
theme: "h1"
|
|
608
|
+
}, "Bracket Competitions"), /*#__PURE__*/React.createElement(Text, {
|
|
609
|
+
theme: "description",
|
|
610
|
+
style: {
|
|
611
|
+
marginTop: 3
|
|
612
|
+
}
|
|
613
|
+
}, "Below are the bracket competitions that you have participated in"))), /*#__PURE__*/React.createElement(FlatList, {
|
|
614
|
+
data: bracket_competitions,
|
|
615
|
+
key: 'brackets_list',
|
|
616
|
+
keyExtractor: item => `${item.bracket_competition_id}`,
|
|
617
|
+
renderItem: renderBrackets
|
|
618
|
+
}));
|
|
619
|
+
default:
|
|
620
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
347
621
|
}
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
backgroundColor: active_engagement == 'competitions' ? Colors.brand.midnight : Colors.shades.white,
|
|
352
|
-
title_weight: active_engagement == 'competitions' ? 'bold' : 'regular',
|
|
353
|
-
borderRadius: 0,
|
|
354
|
-
padding: 10,
|
|
355
|
-
style: {
|
|
356
|
-
flex: 1,
|
|
357
|
-
borderTopLeftRadius: 22,
|
|
358
|
-
borderBottomLeftRadius: 22
|
|
359
|
-
},
|
|
360
|
-
onPress: () => setData({
|
|
361
|
-
...list_data,
|
|
362
|
-
active_engagement: 'competitions'
|
|
363
|
-
})
|
|
364
|
-
}), /*#__PURE__*/React.createElement(Button, {
|
|
365
|
-
title: "SQUARES",
|
|
366
|
-
title_color: active_engagement == 'squares' ? Colors.shades.white : Colors.brand.midnight,
|
|
367
|
-
backgroundColor: active_engagement == 'squares' ? Colors.brand.midnight : Colors.shades.white,
|
|
368
|
-
title_weight: active_engagement == 'squares' ? 'bold' : 'regular',
|
|
369
|
-
borderRadius: 0,
|
|
370
|
-
padding: 10,
|
|
622
|
+
};
|
|
623
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
624
|
+
float: float,
|
|
371
625
|
style: {
|
|
372
626
|
flex: 1
|
|
373
|
-
},
|
|
374
|
-
onPress: () => setData({
|
|
375
|
-
...list_data,
|
|
376
|
-
active_engagement: 'squares'
|
|
377
|
-
})
|
|
378
|
-
}), /*#__PURE__*/React.createElement(Button, {
|
|
379
|
-
title: "BRACKETS",
|
|
380
|
-
title_color: active_engagement == 'brackets' ? Colors.shades.white : Colors.brand.midnight,
|
|
381
|
-
backgroundColor: active_engagement == 'brackets' ? Colors.brand.midnight : Colors.shades.white,
|
|
382
|
-
title_weight: active_engagement == 'brackets' ? 'bold' : 'regular',
|
|
383
|
-
borderRadius: 0,
|
|
384
|
-
padding: 10,
|
|
385
|
-
style: {
|
|
386
|
-
flex: 1,
|
|
387
|
-
borderTopRightRadius: 22,
|
|
388
|
-
borderBottomRightRadius: 22
|
|
389
|
-
},
|
|
390
|
-
onPress: () => setData({
|
|
391
|
-
...list_data,
|
|
392
|
-
active_engagement: 'brackets'
|
|
393
|
-
})
|
|
394
|
-
})), /*#__PURE__*/React.createElement(ScrollView, {
|
|
395
|
-
style: {
|
|
396
|
-
...view_styles.section_body,
|
|
397
|
-
padding: 0
|
|
398
|
-
}
|
|
399
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
400
|
-
style: {
|
|
401
|
-
...view_styles.section_header,
|
|
402
|
-
backgroundColor: Colors.shades.shade100
|
|
403
627
|
}
|
|
404
628
|
}, /*#__PURE__*/React.createElement(View, {
|
|
405
|
-
|
|
406
|
-
flex: 1,
|
|
407
|
-
marginRight: 10
|
|
408
|
-
}
|
|
409
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
410
|
-
theme: "header"
|
|
411
|
-
}, "Showing ", active_tab, " ", active_engagement), /*#__PURE__*/React.createElement(Text, {
|
|
412
|
-
style: {
|
|
413
|
-
marginTop: 3
|
|
414
|
-
},
|
|
415
|
-
theme: "body"
|
|
416
|
-
}, "Use the toggle to the right to see active / closed engagements")), /*#__PURE__*/React.createElement(View, {
|
|
417
|
-
style: {
|
|
418
|
-
flexDirection: 'row'
|
|
419
|
-
}
|
|
420
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
421
|
-
title: "ACTIVE",
|
|
422
|
-
title_color: active_tab == 'active' ? Colors.shades.white : Colors.brand.midnight,
|
|
423
|
-
backgroundColor: active_tab == 'active' ? Colors.utility.success : Colors.shades.white,
|
|
424
|
-
title_weight: active_tab == 'active' ? 'bold' : 'regular',
|
|
425
|
-
borderRadius: 0,
|
|
426
|
-
style: {
|
|
427
|
-
borderTopLeftRadius: 22,
|
|
428
|
-
borderBottomLeftRadius: 22
|
|
429
|
-
},
|
|
430
|
-
padding: 10,
|
|
431
|
-
onPress: () => setData({
|
|
432
|
-
...list_data,
|
|
433
|
-
active_tab: 'active'
|
|
434
|
-
})
|
|
435
|
-
}), /*#__PURE__*/React.createElement(Button, {
|
|
436
|
-
title: "CLOSED",
|
|
437
|
-
title_color: active_tab == 'closed' ? Colors.shades.white : Colors.brand.midnight,
|
|
438
|
-
backgroundColor: active_tab == 'closed' ? Colors.utility.error : Colors.shades.white,
|
|
439
|
-
title_weight: active_tab == 'closed' ? 'bold' : 'regular',
|
|
440
|
-
borderRadius: 0,
|
|
441
|
-
padding: 10,
|
|
442
|
-
style: {
|
|
443
|
-
borderTopRightRadius: 22,
|
|
444
|
-
borderBottomRightRadius: 22
|
|
445
|
-
},
|
|
446
|
-
onPress: () => setData({
|
|
447
|
-
...list_data,
|
|
448
|
-
active_tab: 'closed'
|
|
449
|
-
})
|
|
450
|
-
}))), active_tab == 'closed' ? /*#__PURE__*/React.createElement(View, {
|
|
451
|
-
style: {
|
|
452
|
-
...view_styles.section_footer
|
|
453
|
-
}
|
|
454
|
-
}, offset > 0 ? /*#__PURE__*/React.createElement(Button, {
|
|
455
|
-
title: "PREV",
|
|
456
|
-
title_color: Colors.brand.electric,
|
|
457
|
-
backgroundColor: "transparent",
|
|
458
|
-
onPress: () => getDataFromServer(offset - 1)
|
|
459
|
-
}) : /*#__PURE__*/React.createElement(View, null), /*#__PURE__*/React.createElement(View, {
|
|
629
|
+
transparent: true,
|
|
460
630
|
style: {
|
|
461
631
|
flex: 1
|
|
462
632
|
}
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
}))
|
|
469
|
-
|
|
470
|
-
padding: 20,
|
|
471
|
-
alignSelf: 'center'
|
|
472
|
-
},
|
|
473
|
-
size: "large",
|
|
474
|
-
color: Colors.brand.midnight
|
|
475
|
-
}) : /*#__PURE__*/React.createElement(React.Fragment, null), active_engagement == 'competitions' ? /*#__PURE__*/React.createElement(View, null, admin_competitions.length > 0 ? /*#__PURE__*/React.createElement(View, {
|
|
633
|
+
}, /*#__PURE__*/React.createElement(FlatList, {
|
|
634
|
+
data: sections,
|
|
635
|
+
key: 'admin_list',
|
|
636
|
+
keyExtractor: item => item,
|
|
637
|
+
renderItem: renderSections
|
|
638
|
+
})), /*#__PURE__*/React.createElement(View, {
|
|
639
|
+
type: "footer",
|
|
476
640
|
style: {
|
|
641
|
+
flexDirection: 'row',
|
|
642
|
+
alignItems: 'center',
|
|
477
643
|
padding: 10,
|
|
478
|
-
|
|
479
|
-
}
|
|
480
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
481
|
-
style: {
|
|
482
|
-
padding: 10
|
|
483
|
-
}
|
|
484
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
485
|
-
theme: "header_2"
|
|
486
|
-
}, "Admin Competitions"), /*#__PURE__*/React.createElement(Text, {
|
|
487
|
-
style: {
|
|
488
|
-
marginTop: 4
|
|
489
|
-
},
|
|
490
|
-
theme: "body"
|
|
491
|
-
}, "These are the competitions you are an admin of")), /*#__PURE__*/React.createElement(FlatList, {
|
|
492
|
-
key: "admin_competition",
|
|
493
|
-
data: admin_competitions,
|
|
494
|
-
horizontal: true,
|
|
495
|
-
renderItem: renderAdminCompetitions,
|
|
496
|
-
keyExtractor: item => item.competition_id.toString()
|
|
497
|
-
})) : /*#__PURE__*/React.createElement(React.Fragment, null), /*#__PURE__*/React.createElement(FlatList, {
|
|
498
|
-
key: 'my_competitions',
|
|
499
|
-
data: competitions,
|
|
500
|
-
renderItem: renderCompetitions,
|
|
501
|
-
keyExtractor: item => item.competition_id.toString()
|
|
502
|
-
})) : active_engagement == 'brackets' ? /*#__PURE__*/React.createElement(FlatList, {
|
|
503
|
-
data: bracket_competitions,
|
|
504
|
-
renderItem: renderBrackets,
|
|
505
|
-
keyExtractor: item => item.bracket_competition_id.toString()
|
|
506
|
-
}) : active_engagement == 'squares' ? /*#__PURE__*/React.createElement(FlatList, {
|
|
507
|
-
data: squares_competitions,
|
|
508
|
-
renderItem: renderSquares,
|
|
509
|
-
keyExtractor: item => item.sq_comp_id.toString()
|
|
510
|
-
}) : /*#__PURE__*/React.createElement(React.Fragment, null)), /*#__PURE__*/React.createElement(View, {
|
|
511
|
-
style: {
|
|
512
|
-
...view_styles.section_footer
|
|
644
|
+
...footer_style
|
|
513
645
|
}
|
|
514
646
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
515
|
-
title: "CREATE NEW",
|
|
516
647
|
style: {
|
|
517
|
-
flex: 1
|
|
518
|
-
marginRight: 5
|
|
519
|
-
},
|
|
520
|
-
title_color: Colors.shades.white,
|
|
521
|
-
backgroundColor: Colors.utility.success,
|
|
522
|
-
padding: 15,
|
|
523
|
-
onPress: () => onCreateNew(active_engagement)
|
|
524
|
-
}), /*#__PURE__*/React.createElement(Button, {
|
|
525
|
-
title: "CLOSE",
|
|
526
|
-
title_color: Colors.shades.white,
|
|
527
|
-
style: {
|
|
528
|
-
flex: 2,
|
|
529
|
-
marginRight: 8
|
|
648
|
+
flex: 1
|
|
530
649
|
},
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
650
|
+
onPress: () => onCreateNew(active_engagement),
|
|
651
|
+
type: "success",
|
|
652
|
+
title: "CREATE NEW ENGAGEMENT"
|
|
534
653
|
})));
|
|
535
654
|
};
|
|
536
655
|
export default AdminCompetitionList;
|