be-components 7.1.2 → 7.1.5
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/FlashMarket/components/ManageFlashMarket.js +1 -1
- package/lib/commonjs/FlashMarket/components/ManageFlashMarket.js.map +1 -1
- package/lib/commonjs/FlashMarket/index.js +1 -1
- package/lib/commonjs/FlashMarket/index.js.map +1 -1
- package/lib/commonjs/PartnerPortal/api/index.js +373 -0
- package/lib/commonjs/PartnerPortal/api/index.js.map +1 -0
- package/lib/commonjs/PartnerPortal/components/CompetitionSelector.js +120 -0
- package/lib/commonjs/PartnerPortal/components/CompetitionSelector.js.map +1 -0
- package/lib/commonjs/PartnerPortal/components/EmbedManager.js +639 -0
- package/lib/commonjs/PartnerPortal/components/EmbedManager.js.map +1 -0
- package/lib/commonjs/PartnerPortal/components/FlashSelector.js +120 -0
- package/lib/commonjs/PartnerPortal/components/FlashSelector.js.map +1 -0
- package/lib/commonjs/PartnerPortal/components/LeagueSelector.js +113 -0
- package/lib/commonjs/PartnerPortal/components/LeagueSelector.js.map +1 -0
- package/lib/commonjs/PartnerPortal/components/ReferralSelector.js +101 -0
- package/lib/commonjs/PartnerPortal/components/ReferralSelector.js.map +1 -0
- package/lib/commonjs/PartnerPortal/components/SquaresSelector.js +120 -0
- package/lib/commonjs/PartnerPortal/components/SquaresSelector.js.map +1 -0
- package/lib/commonjs/PartnerPortal/index.js +853 -0
- package/lib/commonjs/PartnerPortal/index.js.map +1 -0
- package/lib/commonjs/index.js +14 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types.d.js.map +1 -1
- package/lib/module/FlashMarket/components/ManageFlashMarket.js +1 -1
- package/lib/module/FlashMarket/components/ManageFlashMarket.js.map +1 -1
- package/lib/module/FlashMarket/index.js +1 -1
- package/lib/module/FlashMarket/index.js.map +1 -1
- package/lib/module/PartnerPortal/api/index.js +367 -0
- package/lib/module/PartnerPortal/api/index.js.map +1 -0
- package/lib/module/PartnerPortal/components/CompetitionSelector.js +112 -0
- package/lib/module/PartnerPortal/components/CompetitionSelector.js.map +1 -0
- package/lib/module/PartnerPortal/components/EmbedManager.js +631 -0
- package/lib/module/PartnerPortal/components/EmbedManager.js.map +1 -0
- package/lib/module/PartnerPortal/components/FlashSelector.js +112 -0
- package/lib/module/PartnerPortal/components/FlashSelector.js.map +1 -0
- package/lib/module/PartnerPortal/components/LeagueSelector.js +106 -0
- package/lib/module/PartnerPortal/components/LeagueSelector.js.map +1 -0
- package/lib/module/PartnerPortal/components/ReferralSelector.js +93 -0
- package/lib/module/PartnerPortal/components/ReferralSelector.js.map +1 -0
- package/lib/module/PartnerPortal/components/SquaresSelector.js +112 -0
- package/lib/module/PartnerPortal/components/SquaresSelector.js.map +1 -0
- package/lib/module/PartnerPortal/index.js +845 -0
- package/lib/module/PartnerPortal/index.js.map +1 -0
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.d.js.map +1 -1
- package/lib/typescript/lib/commonjs/PartnerPortal/api/index.d.ts +47 -0
- package/lib/typescript/lib/commonjs/PartnerPortal/api/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/PartnerPortal/components/CompetitionSelector.d.ts +9 -0
- package/lib/typescript/lib/commonjs/PartnerPortal/components/CompetitionSelector.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/PartnerPortal/components/EmbedManager.d.ts +13 -0
- package/lib/typescript/lib/commonjs/PartnerPortal/components/EmbedManager.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/PartnerPortal/components/FlashSelector.d.ts +9 -0
- package/lib/typescript/lib/commonjs/PartnerPortal/components/FlashSelector.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/PartnerPortal/components/LeagueSelector.d.ts +7 -0
- package/lib/typescript/lib/commonjs/PartnerPortal/components/LeagueSelector.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/PartnerPortal/components/ReferralSelector.d.ts +9 -0
- package/lib/typescript/lib/commonjs/PartnerPortal/components/ReferralSelector.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/PartnerPortal/components/SquaresSelector.d.ts +9 -0
- package/lib/typescript/lib/commonjs/PartnerPortal/components/SquaresSelector.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/PartnerPortal/index.d.ts +12 -0
- package/lib/typescript/lib/commonjs/PartnerPortal/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/index.d.ts +2 -0
- package/lib/typescript/lib/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/PartnerPortal/api/index.d.ts +46 -0
- package/lib/typescript/lib/module/PartnerPortal/api/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/PartnerPortal/components/CompetitionSelector.d.ts +9 -0
- package/lib/typescript/lib/module/PartnerPortal/components/CompetitionSelector.d.ts.map +1 -0
- package/lib/typescript/lib/module/PartnerPortal/components/EmbedManager.d.ts +13 -0
- package/lib/typescript/lib/module/PartnerPortal/components/EmbedManager.d.ts.map +1 -0
- package/lib/typescript/lib/module/PartnerPortal/components/FlashSelector.d.ts +9 -0
- package/lib/typescript/lib/module/PartnerPortal/components/FlashSelector.d.ts.map +1 -0
- package/lib/typescript/lib/module/PartnerPortal/components/LeagueSelector.d.ts +7 -0
- package/lib/typescript/lib/module/PartnerPortal/components/LeagueSelector.d.ts.map +1 -0
- package/lib/typescript/lib/module/PartnerPortal/components/ReferralSelector.d.ts +9 -0
- package/lib/typescript/lib/module/PartnerPortal/components/ReferralSelector.d.ts.map +1 -0
- package/lib/typescript/lib/module/PartnerPortal/components/SquaresSelector.d.ts +9 -0
- package/lib/typescript/lib/module/PartnerPortal/components/SquaresSelector.d.ts.map +1 -0
- package/lib/typescript/lib/module/PartnerPortal/index.d.ts +12 -0
- package/lib/typescript/lib/module/PartnerPortal/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/index.d.ts +3 -1
- package/lib/typescript/lib/module/index.d.ts.map +1 -1
- package/lib/typescript/src/PartnerPortal/api/index.d.ts +75 -0
- package/lib/typescript/src/PartnerPortal/api/index.d.ts.map +1 -0
- package/lib/typescript/src/PartnerPortal/components/CompetitionSelector.d.ts +11 -0
- package/lib/typescript/src/PartnerPortal/components/CompetitionSelector.d.ts.map +1 -0
- package/lib/typescript/src/PartnerPortal/components/EmbedManager.d.ts +16 -0
- package/lib/typescript/src/PartnerPortal/components/EmbedManager.d.ts.map +1 -0
- package/lib/typescript/src/PartnerPortal/components/FlashSelector.d.ts +11 -0
- package/lib/typescript/src/PartnerPortal/components/FlashSelector.d.ts.map +1 -0
- package/lib/typescript/src/PartnerPortal/components/LeagueSelector.d.ts +9 -0
- package/lib/typescript/src/PartnerPortal/components/LeagueSelector.d.ts.map +1 -0
- package/lib/typescript/src/PartnerPortal/components/ReferralSelector.d.ts +11 -0
- package/lib/typescript/src/PartnerPortal/components/ReferralSelector.d.ts.map +1 -0
- package/lib/typescript/src/PartnerPortal/components/SquaresSelector.d.ts +11 -0
- package/lib/typescript/src/PartnerPortal/components/SquaresSelector.d.ts.map +1 -0
- package/lib/typescript/src/PartnerPortal/index.d.ts +14 -0
- package/lib/typescript/src/PartnerPortal/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +3 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/FlashMarket/components/ManageFlashMarket.tsx +1 -1
- package/src/FlashMarket/index.tsx +1 -1
- package/src/PartnerPortal/api/index.ts +314 -0
- package/src/PartnerPortal/components/CompetitionSelector.tsx +88 -0
- package/src/PartnerPortal/components/EmbedManager.tsx +364 -0
- package/src/PartnerPortal/components/FlashSelector.tsx +88 -0
- package/src/PartnerPortal/components/LeagueSelector.tsx +76 -0
- package/src/PartnerPortal/components/ReferralSelector.tsx +63 -0
- package/src/PartnerPortal/components/SquaresSelector.tsx +88 -0
- package/src/PartnerPortal/index.tsx +474 -0
- package/src/index.tsx +5 -0
- package/src/types.d.ts +29 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { PollCampaignProps } from "../../types";
|
|
3
|
+
type FlashSelectorProps = {
|
|
4
|
+
company_id: string;
|
|
5
|
+
active_competitions: string[];
|
|
6
|
+
onSelectCompetition: (campaign: PollCampaignProps) => void;
|
|
7
|
+
onDeselectCompetition: (campaign: PollCampaignProps) => void;
|
|
8
|
+
};
|
|
9
|
+
declare const FlashSelector: ({ company_id, active_competitions, onSelectCompetition, onDeselectCompetition }: FlashSelectorProps) => React.JSX.Element;
|
|
10
|
+
export default FlashSelector;
|
|
11
|
+
//# sourceMappingURL=FlashSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlashSelector.d.ts","sourceRoot":"","sources":["../../../../../src/PartnerPortal/components/FlashSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAQrD,KAAK,kBAAkB,GAAG;IACtB,UAAU,EAAC,MAAM,CAAC;IAClB,mBAAmB,EAAC,MAAM,EAAE,CAAC;IAC7B,mBAAmB,EAAC,CAAC,QAAQ,EAAC,iBAAiB,KAAK,IAAI,CAAC;IACzD,qBAAqB,EAAC,CAAC,QAAQ,EAAC,iBAAiB,KAAK,IAAI,CAAA;CAC7D,CAAA;AACD,QAAA,MAAM,aAAa,GAAI,iFAAgF,kBAAkB,sBAsExH,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { LeagueProps } from "../../types";
|
|
3
|
+
type LeagueSelectorProps = {
|
|
4
|
+
active_league_id?: string;
|
|
5
|
+
onSelectLeague: (league: LeagueProps | undefined) => void;
|
|
6
|
+
};
|
|
7
|
+
declare const LeagueSelector: ({ active_league_id, onSelectLeague }: LeagueSelectorProps) => React.JSX.Element;
|
|
8
|
+
export default LeagueSelector;
|
|
9
|
+
//# sourceMappingURL=LeagueSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LeagueSelector.d.ts","sourceRoot":"","sources":["../../../../../src/PartnerPortal/components/LeagueSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAO/C,KAAK,mBAAmB,GAAG;IACvB,gBAAgB,CAAC,EAAC,MAAM,CAAC;IACzB,cAAc,EAAC,CAAC,MAAM,EAAC,WAAW,GAAG,SAAS,KAAK,IAAI,CAAA;CAC1D,CAAA;AACD,QAAA,MAAM,cAAc,GAAI,sCAAqC,mBAAmB,sBA6D/E,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { PlayerReferralProps, PromoProps } from "../../types";
|
|
3
|
+
type ReferralSelectorProps = {
|
|
4
|
+
player_referrals: PlayerReferralProps[];
|
|
5
|
+
active_referral?: PlayerReferralProps;
|
|
6
|
+
promos: PromoProps[];
|
|
7
|
+
onSelectReferral: (player_referral: PlayerReferralProps | undefined) => void;
|
|
8
|
+
};
|
|
9
|
+
declare const ReferralSelector: ({ active_referral, promos, player_referrals, onSelectReferral }: ReferralSelectorProps) => React.JSX.Element;
|
|
10
|
+
export default ReferralSelector;
|
|
11
|
+
//# sourceMappingURL=ReferralSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReferralSelector.d.ts","sourceRoot":"","sources":["../../../../../src/PartnerPortal/components/ReferralSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAOnE,KAAK,qBAAqB,GAAG;IACzB,gBAAgB,EAAC,mBAAmB,EAAE,CAAC;IACvC,eAAe,CAAC,EAAC,mBAAmB,CAAC;IACrC,MAAM,EAAC,UAAU,EAAE,CAAC;IACpB,gBAAgB,EAAC,CAAC,eAAe,EAAC,mBAAmB,GAAG,SAAS,KAAK,IAAI,CAAA;CAC7E,CAAA;AACD,QAAA,MAAM,gBAAgB,GAAI,iEAAgE,qBAAqB,sBA8C9G,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { SquaresCompetitionProps } from "../../types";
|
|
3
|
+
type SquaresSelectorProps = {
|
|
4
|
+
company_id: string;
|
|
5
|
+
active_competitions: string[];
|
|
6
|
+
onSelectCompetition: (sc: SquaresCompetitionProps) => void;
|
|
7
|
+
onDeselectCompetition: (sc: SquaresCompetitionProps) => void;
|
|
8
|
+
};
|
|
9
|
+
declare const SquaresSelector: ({ company_id, active_competitions, onSelectCompetition, onDeselectCompetition }: SquaresSelectorProps) => React.JSX.Element;
|
|
10
|
+
export default SquaresSelector;
|
|
11
|
+
//# sourceMappingURL=SquaresSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SquaresSelector.d.ts","sourceRoot":"","sources":["../../../../../src/PartnerPortal/components/SquaresSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAQ3D,KAAK,oBAAoB,GAAG;IACxB,UAAU,EAAC,MAAM,CAAC;IAClB,mBAAmB,EAAC,MAAM,EAAE,CAAC;IAC7B,mBAAmB,EAAC,CAAC,EAAE,EAAC,uBAAuB,KAAK,IAAI,CAAC;IACzD,qBAAqB,EAAC,CAAC,EAAE,EAAC,uBAAuB,KAAK,IAAI,CAAA;CAC7D,CAAA;AACD,QAAA,MAAM,eAAe,GAAI,iFAAgF,oBAAoB,sBAsE5H,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { BracketCompetitionProps, CompetitionProps, MyPlayerProps, PollCampaignProps, SquaresCompetitionProps } from '../types';
|
|
3
|
+
type PartnerPortalProps = {
|
|
4
|
+
me: MyPlayerProps;
|
|
5
|
+
company_id: string;
|
|
6
|
+
onCreateEngagement: (init_engagement?: string) => void;
|
|
7
|
+
onSelectCompetition: (competition: CompetitionProps) => void;
|
|
8
|
+
onSelectBracketCompetition: (bracket_competition: BracketCompetitionProps) => void;
|
|
9
|
+
onSelectSquaresCompetition: (squares_competition: SquaresCompetitionProps) => void;
|
|
10
|
+
onSelectFlashCampaign: (flash_campaign: PollCampaignProps) => void;
|
|
11
|
+
};
|
|
12
|
+
declare const PartnerPortal: ({ me, company_id, onCreateEngagement, onSelectBracketCompetition, onSelectCompetition, onSelectFlashCampaign, onSelectSquaresCompetition }: PartnerPortalProps) => React.JSX.Element;
|
|
13
|
+
export default PartnerPortal;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/PartnerPortal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,uBAAuB,EAAmC,gBAAgB,EAAoD,aAAa,EAAE,iBAAiB,EAAqB,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAS3O,KAAK,kBAAkB,GAAG;IACtB,EAAE,EAAC,aAAa,CAAC;IACjB,UAAU,EAAC,MAAM,CAAC;IAClB,kBAAkB,EAAE,CAAC,eAAe,CAAC,EAAC,MAAM,KAAK,IAAI,CAAC;IACtD,mBAAmB,EAAE,CAAC,WAAW,EAAC,gBAAgB,KAAK,IAAI,CAAC;IAC5D,0BAA0B,EAAC,CAAC,mBAAmB,EAAC,uBAAuB,KAAK,IAAI,CAAC;IACjF,0BAA0B,EAAE,CAAC,mBAAmB,EAAC,uBAAuB,KAAK,IAAI,CAAC;IAClF,qBAAqB,EAAE,CAAC,cAAc,EAAC,iBAAiB,KAAK,IAAI,CAAA;CACpE,CAAA;AAID,QAAA,MAAM,aAAa,GAAI,4IAA2I,kBAAkB,sBAgcnL,CAAA;AAED,eAAe,aAAa,CAAA"}
|
|
@@ -61,5 +61,7 @@ import CreateEngagement from './CreateEngagement';
|
|
|
61
61
|
import SquaresManager from './SquaresManager';
|
|
62
62
|
import DiscordConnectionManager from './Discord';
|
|
63
63
|
import ManageFlashMarket from './FlashMarket/components/ManageFlashMarket';
|
|
64
|
-
|
|
64
|
+
import PartnerPortal from './PartnerPortal';
|
|
65
|
+
import EmbedManager from './PartnerPortal/components/EmbedManager';
|
|
66
|
+
export { Authenticator, Observer, CreateEngagement, DiscordConnectionManager, BEEventApi, EmbedManager, RankingsCard, ManageFlashMarket, BELinkApi, PartnerPortal, SquaresManager, GuideView, BetMatch, ManageFilter, Ticker, Premium, CreateGroupWizard, LeaderboardCard, GroupComponent, LocationTracker, BEClarity, FlashMarket, ContactsCard, PlayerRecommender, GolfScoreboard, ContactsSelector, Campaign, BEPostHog, ManageBracketCompetitionForm, NotificationModule, FlashHolder, useNotifications, ClaritySmartEvents, ProfileManager, CompetitionManager, Components, SocialComponents, APIOverrides, LinearGradient, usePlayerLocation, BettorSearch, Colors, MyWallet, Share, Checkout, MarketComponents, EventComponents, PollCampaign, PollCampaignApi, PollApi, MarketMaker, CompetitionModule, SeasonManager, CreateCompetitionForm, CreateSeasonForm, SeasonModule, AdminCompetitionList, AdServer, Leaderboard, AdProvider, BracketRoom, SquaresModule, SocketManager, PromotedOrder, EngageModule, CompetitionCard, SquaresCompetitionCard, BracketCompetitionCard, SeasonCard };
|
|
65
67
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,MAAM,iBA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,kBAAkB,CAAC;AAC9C,OAAO,wBAAwB,MAAM,WAAW,CAAC;AACjD,OAAO,iBAAiB,MAAM,4CAA4C,CAAC;AAC3E,OAAO,EACL,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,wBAAwB,EACxB,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,eAAe,EACf,SAAS,EACT,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,4BAA4B,EAC5B,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,OAAO,EACP,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,QAAQ,EACR,WAAW,EACX,UAAU,EACV,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,UAAU,EACX,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAA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ACL,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,wBAAwB,EACxB,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,aAAa,EACb,cAAc,EACd,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,eAAe,EACf,SAAS,EACT,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,4BAA4B,EAC5B,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,OAAO,EACP,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,QAAQ,EACR,WAAW,EACX,UAAU,EACV,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,UAAU,EACX,CAAA"}
|
package/package.json
CHANGED
|
@@ -482,7 +482,7 @@ const ManageFlashMarket = ({ float, header_style, player, onClose, poll_id, onFo
|
|
|
482
482
|
if(active_step != 'question'){ return <></> }
|
|
483
483
|
if(!draft_poll || !poll){ return <></> }
|
|
484
484
|
const is_q_changed = JSON.stringify(poll.poll_question) != JSON.stringify(draft_poll.poll_question) ? true : false
|
|
485
|
-
const edit_allowed =
|
|
485
|
+
const edit_allowed = total_responses == 0 && ['pending','paused'].includes(poll.status) ? true : false
|
|
486
486
|
return (
|
|
487
487
|
<View transparent>
|
|
488
488
|
<View style={{ flexDirection:'row', alignItems:'center', padding:10 }}>
|
|
@@ -344,7 +344,7 @@ const FlashMarket = ({ loading, poll, hide_footer, hide_timer, poll_options, pol
|
|
|
344
344
|
renderItem={renderOptions}
|
|
345
345
|
keyExtractor={(item) => item.poll_option_id.toString()}
|
|
346
346
|
/>
|
|
347
|
-
{is_inactive && is_admin ?
|
|
347
|
+
{is_inactive && !is_admin ?
|
|
348
348
|
<View type='blur' style={{ position:'absolute', top:0, left:0, right:0, bottom:0, justifyContent:'center', alignItems:'center' }}>
|
|
349
349
|
<View float style={{ flexDirection:'row', alignItems:'center', padding:20 }}>
|
|
350
350
|
<Icons.PausedIcon size={35} color={Colors.text.h1} />
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import type { ArticleFeedProps, ArticleProps, BracketCompetitionProps, BracketProps, CompanyEmbedProps, CompanyProps, CompetitionPayoutTypeProps, CompetitionPlayerProps, CompetitionProps, CompetitionRecordProps, CompetitionResultProps, CompetitionResultTypeProps, CompetitionTypeProps, EmbedPropertyProps, EmbedProps, EventProps, ExternalKeyProps, LeagueProps, PlayerReferralProps, PodcastProps, PollCampaignProps, PromoProps, PublicPlayerProps, SquaresCompetitionProps } from "../../types";
|
|
3
|
+
import { APIOverrides } from "../../ApiOverrides";
|
|
4
|
+
import type { CompanyMemberProps } from "../../Authenticator/api/types";
|
|
5
|
+
|
|
6
|
+
let AUTH_SVC_API = '';
|
|
7
|
+
let SOCIAL_SVC_API = '';
|
|
8
|
+
let TP_SVC_API = '';
|
|
9
|
+
let EVENT_SVC_API = '';
|
|
10
|
+
|
|
11
|
+
export { PartnerPortalApi }
|
|
12
|
+
|
|
13
|
+
const PartnerPortalApi = {
|
|
14
|
+
setEnvironment: () => {
|
|
15
|
+
const endpoints = APIOverrides.getEndpoints();
|
|
16
|
+
SOCIAL_SVC_API = endpoints['SOCIAL_SVC_API'] as string;
|
|
17
|
+
AUTH_SVC_API = endpoints['AUTH_SVC_API'] as string;
|
|
18
|
+
TP_SVC_API = endpoints['TP_SVC_API'] as string;
|
|
19
|
+
EVENT_SVC_API = endpoints['EVENT_SVC_API'] as string;
|
|
20
|
+
},
|
|
21
|
+
CompanyApi : {
|
|
22
|
+
getCompanyById: async (company_id: string): Promise<{ company: CompanyProps, company_members: CompanyMemberProps[] } | undefined> => {
|
|
23
|
+
try {
|
|
24
|
+
const resp = await axios.get(`${AUTH_SVC_API}/v1/companies/company/id/${company_id}`)
|
|
25
|
+
return resp.data
|
|
26
|
+
} catch (e) {
|
|
27
|
+
return undefined
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
getApiKeys:async(company_id:string):Promise<ExternalKeyProps[]> => {
|
|
31
|
+
try {
|
|
32
|
+
console.log(company_id)
|
|
33
|
+
const resp = await axios.get(`${AUTH_SVC_API}/v1/keys/me/${company_id}`);
|
|
34
|
+
return resp.data.external_keys
|
|
35
|
+
} catch (e) {
|
|
36
|
+
return []
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
getPodcastsByCompanyId:async(company_id:string, offset:number):Promise<PodcastProps[]> => {
|
|
40
|
+
try {
|
|
41
|
+
const resp = await axios.get(`${SOCIAL_SVC_API}/v1/podcasts/company/${company_id}?offset=${offset}`);
|
|
42
|
+
return resp.data.podcasts
|
|
43
|
+
} catch (e) {
|
|
44
|
+
console.log(e);
|
|
45
|
+
return []
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
getArticlesByCompanyId: async(company_id:string, offset:number):Promise<ArticleProps[]> => {
|
|
49
|
+
try {
|
|
50
|
+
const resp = await axios.get(`${SOCIAL_SVC_API}/v1/articles/company/${company_id}?offset=${offset}`);
|
|
51
|
+
console.log(resp.data)
|
|
52
|
+
return resp.data.articles
|
|
53
|
+
} catch (e) {
|
|
54
|
+
return []
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
getArticleFeedsByCompanyId: async(company_id:string):Promise<ArticleFeedProps[]> => {
|
|
58
|
+
try {
|
|
59
|
+
const resp = await axios.get(`${SOCIAL_SVC_API}/v1/articles/feeds/company/${company_id}`)
|
|
60
|
+
console.log(resp.data)
|
|
61
|
+
return resp.data.article_feeds
|
|
62
|
+
} catch (e) {
|
|
63
|
+
return []
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
getReferralCodesByCompanyId: async(company_id:string):Promise<{ promos:PromoProps[], player_referrals:PlayerReferralProps[] }> => {
|
|
67
|
+
try {
|
|
68
|
+
const resp = await axios.get(`${AUTH_SVC_API}/v1/companies/referrals/${company_id}`);
|
|
69
|
+
return resp.data
|
|
70
|
+
} catch (e) {
|
|
71
|
+
return { promos:[], player_referrals: [] }
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
EngagementApi : {
|
|
76
|
+
getActiveCompetitions: async(company_id:string):Promise<{competitions:CompetitionProps[], competition_players:CompetitionPlayerProps[], competition_records:CompetitionRecordProps[], competition_results:CompetitionResultProps[] }> => {
|
|
77
|
+
try {
|
|
78
|
+
const resp = await axios.get(`${TP_SVC_API}/v2/competitions/company/active/${company_id}`);
|
|
79
|
+
return resp.data
|
|
80
|
+
} catch (e) {
|
|
81
|
+
return { competition_players: [], competition_records: [], competition_results: [], competitions: [] }
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
getActiveSquaresCompetitions: async(company_id:string):Promise<SquaresCompetitionProps[]> => {
|
|
85
|
+
try {
|
|
86
|
+
const resp = await axios.get(`${TP_SVC_API}/v1/squares/company/active/${company_id}`);
|
|
87
|
+
return resp.data.squares_competitions
|
|
88
|
+
} catch (error) {
|
|
89
|
+
return []
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
getActiveBracketCompetitions: async(company_id:string):Promise<BracketCompetitionProps[]> => {
|
|
93
|
+
try {
|
|
94
|
+
const resp = await axios.get(`${TP_SVC_API}/v1/brackets/company/active/${company_id}`);
|
|
95
|
+
console.log(resp.data)
|
|
96
|
+
return resp.data.bracket_competitions
|
|
97
|
+
} catch (e) {
|
|
98
|
+
console.log(e)
|
|
99
|
+
return []
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
getActiveFlashCampaigns: async(company_id:string):Promise<PollCampaignProps[]> => {
|
|
103
|
+
try {
|
|
104
|
+
const resp = await axios.get(`${AUTH_SVC_API}/v2/pm/company/active/${company_id}`);
|
|
105
|
+
return resp.data.poll_campaigns
|
|
106
|
+
} catch (e) {
|
|
107
|
+
return []
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
EmbedApi: {
|
|
112
|
+
getEmbeds: async():Promise<EmbedProps[]> => {
|
|
113
|
+
try {
|
|
114
|
+
const resp = await axios.get(`${AUTH_SVC_API}/v1/embeds/all`);
|
|
115
|
+
return resp.data.embeds
|
|
116
|
+
} catch (e) {
|
|
117
|
+
return []
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
getEmbedById: async(embed_id:string):Promise<{ embed:EmbedProps, embed_properties:EmbedPropertyProps[] }|undefined> => {
|
|
121
|
+
try {
|
|
122
|
+
const resp = await axios.get(`${AUTH_SVC_API}/v1/embeds/id/${embed_id}`);
|
|
123
|
+
return resp.data
|
|
124
|
+
} catch (e) {
|
|
125
|
+
return undefined
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
createEmbed: async(embed:EmbedProps):Promise<EmbedProps|undefined> => {
|
|
129
|
+
try {
|
|
130
|
+
const resp = await axios.post(`${AUTH_SVC_API}/v1/embeds/embed/create`, { embed });
|
|
131
|
+
return resp.data.embed
|
|
132
|
+
} catch (e) {
|
|
133
|
+
return undefined
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
updateEmbed: async(embed:EmbedProps):Promise<EmbedProps|undefined> => {
|
|
137
|
+
try {
|
|
138
|
+
const resp = await axios.post(`${AUTH_SVC_API}/v1/embeds/embed/update`, { embed });
|
|
139
|
+
return resp.data.embed
|
|
140
|
+
} catch (e) {
|
|
141
|
+
return undefined
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
activateEmbed: async(embed_id:string):Promise<EmbedProps|undefined> => {
|
|
145
|
+
try {
|
|
146
|
+
const resp = await axios.post(`${AUTH_SVC_API}/v1/embeds/embed/activate`, { embed_id });
|
|
147
|
+
return resp.data.embed
|
|
148
|
+
} catch (e) {
|
|
149
|
+
return undefined
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
deActivateEmbed: async(embed_id:string):Promise<EmbedProps|undefined> => {
|
|
153
|
+
try {
|
|
154
|
+
const resp = await axios.post(`${AUTH_SVC_API}/v1/embeds/embed/deactivate`, { embed_id });
|
|
155
|
+
return resp.data.embed
|
|
156
|
+
} catch (e) {
|
|
157
|
+
return undefined
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
archiveEmbed: async(embed_id:string):Promise<EmbedProps|undefined> => {
|
|
161
|
+
try {
|
|
162
|
+
const resp = await axios.post(`${AUTH_SVC_API}/v1/embeds/embed/archive`, { embed_id });
|
|
163
|
+
return resp.data.embed
|
|
164
|
+
} catch (e) {
|
|
165
|
+
return undefined
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
createEmbedProperty: async(embed_property:EmbedPropertyProps):Promise<EmbedPropertyProps| undefined> => {
|
|
169
|
+
try {
|
|
170
|
+
const resp = await axios.post(`${AUTH_SVC_API}/v1/embeds/property/create`, { embed_property });
|
|
171
|
+
return resp.data.embed_property
|
|
172
|
+
} catch (e) {
|
|
173
|
+
return undefined
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
updateEmbedProperty: async(embed_property:EmbedPropertyProps):Promise<EmbedPropertyProps| undefined> => {
|
|
177
|
+
try {
|
|
178
|
+
const resp = await axios.post(`${AUTH_SVC_API}/v1/embeds/property/update`, { embed_property });
|
|
179
|
+
return resp.data.embed_property
|
|
180
|
+
} catch (e) {
|
|
181
|
+
return undefined
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
archiveEmbedProperty: async(embed_property_id:string):Promise<EmbedPropertyProps| undefined> => {
|
|
185
|
+
try {
|
|
186
|
+
const resp = await axios.post(`${AUTH_SVC_API}/v1/embeds/property/archive`, { embed_property_id });
|
|
187
|
+
return resp.data.embed_property
|
|
188
|
+
} catch (e) {
|
|
189
|
+
return undefined
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
CompanyEmbedApi: {
|
|
194
|
+
getEmbedsByCompanyId: async(company_id:string, offset:number):Promise<{embed_properties:EmbedPropertyProps[], embeds:EmbedProps[], company_embeds:CompanyEmbedProps[]}> => {
|
|
195
|
+
try {
|
|
196
|
+
const resp = await axios.get(`${AUTH_SVC_API}/v1/embeds/company/id/${company_id}?offset=${offset}`);
|
|
197
|
+
return resp.data
|
|
198
|
+
} catch (e) {
|
|
199
|
+
return { embed_properties: [], embeds:[], company_embeds:[] }
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
getCompanyEmbedById: async(company_embed_id:string):Promise<undefined | { company_embed:CompanyEmbedProps, embed:EmbedProps, embed_properties:EmbedPropertyProps[] }> => {
|
|
203
|
+
try {
|
|
204
|
+
const resp = await axios.get(`${AUTH_SVC_API}/v1/embeds/company/embed/${company_embed_id}`);
|
|
205
|
+
return resp.data
|
|
206
|
+
} catch (e) {
|
|
207
|
+
return undefined
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
createCompanyEmbid: async(company_embed:CompanyEmbedProps):Promise<CompanyEmbedProps|undefined> => {
|
|
211
|
+
try {
|
|
212
|
+
const resp = await axios.post(`${AUTH_SVC_API}/v1/embeds/company/create`, { company_embed });
|
|
213
|
+
return resp.data.company_embed
|
|
214
|
+
} catch (e) {
|
|
215
|
+
return undefined
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
updateCompanyEmbed: async(company_embed:CompanyEmbedProps):Promise<CompanyEmbedProps|undefined> => {
|
|
219
|
+
try {
|
|
220
|
+
const resp = await axios.post(`${AUTH_SVC_API}/v1/embeds/company/update`, { company_embed });
|
|
221
|
+
return resp.data.company_embed
|
|
222
|
+
} catch (e) {
|
|
223
|
+
return undefined
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
addProperty: async(company_embed_id:string, embed_property_id:string, value:string):Promise<CompanyEmbedProps|undefined> => {
|
|
227
|
+
try {
|
|
228
|
+
const resp = await axios.post(`${AUTH_SVC_API}/v1/embeds/company/property/add`, { company_embed_id, embed_property_id, value });
|
|
229
|
+
return resp.data.company_embed
|
|
230
|
+
} catch (e) {
|
|
231
|
+
return undefined
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
removeProperty: async(company_embed_id:string, embed_property_id:string):Promise<CompanyEmbedProps|undefined> => {
|
|
235
|
+
try {
|
|
236
|
+
const resp = await axios.post(`${AUTH_SVC_API}/v1/embeds/company/property/remove`, { company_embed_id, embed_property_id });
|
|
237
|
+
return resp.data.company_embed
|
|
238
|
+
} catch (e) {
|
|
239
|
+
return undefined
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
activateCompanyEmbed:async(company_embed_id:string):Promise<CompanyEmbedProps | undefined> => {
|
|
243
|
+
try {
|
|
244
|
+
const resp = await axios.post(`${AUTH_SVC_API}/v1/embeds/company/activate`, { company_embed_id });
|
|
245
|
+
return resp.data.company_embed
|
|
246
|
+
} catch (e) {
|
|
247
|
+
return undefined
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
deActivateCompanyEmbed:async(company_embed_id:string):Promise<CompanyEmbedProps | undefined> => {
|
|
251
|
+
try {
|
|
252
|
+
const resp = await axios.post(`${AUTH_SVC_API}/v1/embeds/company/deactivate`, { company_embed_id });
|
|
253
|
+
return resp.data.company_embed
|
|
254
|
+
} catch (e) {
|
|
255
|
+
return undefined
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
archiveCompanyEmbed:async(company_embed_id:string):Promise<CompanyEmbedProps | undefined> => {
|
|
259
|
+
try {
|
|
260
|
+
const resp = await axios.post(`${AUTH_SVC_API}/v1/embeds/company/archive`, { company_embed_id });
|
|
261
|
+
return resp.data.company_embed
|
|
262
|
+
} catch (e) {
|
|
263
|
+
return undefined
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
getPlayersByPlayerIds: async (player_ids: string[]): Promise<PublicPlayerProps[]> => {
|
|
268
|
+
if (player_ids.length == 0) { return [] }
|
|
269
|
+
try {
|
|
270
|
+
const resp = await axios.post(`${AUTH_SVC_API}/v1/players/bulk/get`, { player_ids })
|
|
271
|
+
return resp.data.players
|
|
272
|
+
} catch (e) {
|
|
273
|
+
console.log(e);
|
|
274
|
+
return []
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
getLeagues: async():Promise<LeagueProps[]> => {
|
|
278
|
+
try {
|
|
279
|
+
const resp = await axios.get(`${EVENT_SVC_API}/v1/leagues?status=active`)
|
|
280
|
+
return resp.data.leagues
|
|
281
|
+
} catch (e) {
|
|
282
|
+
return []
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
getEventsByEventIds: async(event_ids:string[]):Promise<EventProps[]> => {
|
|
286
|
+
try {
|
|
287
|
+
if(event_ids.length == 0){ return [] }
|
|
288
|
+
const resp = await axios.post(`${EVENT_SVC_API}/v1/events/bulk/get`, { attribute:'event_id', values: event_ids })
|
|
289
|
+
return resp.data.events
|
|
290
|
+
} catch (e) {
|
|
291
|
+
return []
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
getBracketsByIds: async(bracket_ids:string[]):Promise<BracketProps[]> => {
|
|
295
|
+
try {
|
|
296
|
+
if(bracket_ids.length == 0){ return [] }
|
|
297
|
+
const resp = await axios.post(`${EVENT_SVC_API}/v1/brackets/bulk/get`, { bracket_ids })
|
|
298
|
+
return resp.data.brackets
|
|
299
|
+
} catch (e) {
|
|
300
|
+
console.log(e)
|
|
301
|
+
return []
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
getCompetitionOptions: async():Promise<undefined | {competition_types:CompetitionTypeProps[], competition_result_types:CompetitionResultTypeProps[], competition_payout_types:CompetitionPayoutTypeProps[]}> => {
|
|
305
|
+
try {
|
|
306
|
+
const resp = await axios.get(`${TP_SVC_API}/v1/competitions/options`)
|
|
307
|
+
return resp.data
|
|
308
|
+
} catch (e) {
|
|
309
|
+
console.log(e)
|
|
310
|
+
return undefined
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
}
|
|
314
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
|
+
import type { CompetitionProps } from "../../types";
|
|
3
|
+
import { useColors } from "../../constants/useColors";
|
|
4
|
+
import { Button, Text, View } from "../../Components/Themed";
|
|
5
|
+
import { FlatList, Image } from "react-native";
|
|
6
|
+
import { Checkbox, Icons, SearchBox } from "../../Components";
|
|
7
|
+
import moment from "moment-mini";
|
|
8
|
+
import { PartnerPortalApi } from "../api";
|
|
9
|
+
|
|
10
|
+
type CompetitionSelectorProps = {
|
|
11
|
+
company_id:string,
|
|
12
|
+
active_competitions:string[],
|
|
13
|
+
onSelectCompetition:(competition:CompetitionProps) => void,
|
|
14
|
+
onDeselectCompetition:(competition:CompetitionProps) => void
|
|
15
|
+
}
|
|
16
|
+
const CompetitionSelector = ({ company_id, active_competitions, onSelectCompetition, onDeselectCompetition }:CompetitionSelectorProps) => {
|
|
17
|
+
const Colors = useColors();
|
|
18
|
+
const [ visible, setVisible ] = useState(false);
|
|
19
|
+
const [ competitions, setCompetitions ] = useState<CompetitionProps[]>([])
|
|
20
|
+
const [ search, setSearch ] = useState('');
|
|
21
|
+
|
|
22
|
+
const filtered_competitions = competitions.filter(pr => pr.competition_name.toLowerCase().includes(search.toLowerCase())).slice(0,10)
|
|
23
|
+
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
getCompetitions()
|
|
26
|
+
},[company_id]);
|
|
27
|
+
|
|
28
|
+
const getCompetitions = async() => {
|
|
29
|
+
PartnerPortalApi.setEnvironment();
|
|
30
|
+
const s_resp = await PartnerPortalApi.EngagementApi.getActiveCompetitions(company_id);
|
|
31
|
+
setCompetitions(s_resp.competitions);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const renderCompetitions = (data:{ item:CompetitionProps, index:number }) => {
|
|
35
|
+
const selected = active_competitions.includes(data.item.competition_id.toString());
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<Button
|
|
39
|
+
transparent
|
|
40
|
+
style={{ flexDirection:'row', alignItems:'center', padding:10, borderRadius:0, borderBottomWidth:1, borderColor:Colors.borders.light }}
|
|
41
|
+
onPress={() => {
|
|
42
|
+
if(selected){ return onDeselectCompetition(data.item) }
|
|
43
|
+
return onSelectCompetition(data.item);
|
|
44
|
+
}}
|
|
45
|
+
>
|
|
46
|
+
<Image
|
|
47
|
+
source={{ uri: data.item.image?.url }}
|
|
48
|
+
style={{ height: 35, width:35 }}
|
|
49
|
+
resizeMode="cover"
|
|
50
|
+
/>
|
|
51
|
+
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
52
|
+
<Text theme='h1'>{data.item.competition_name}</Text>
|
|
53
|
+
<Text theme='description' style={{ marginTop:3 }}>{data.item.competition_description}</Text>
|
|
54
|
+
</View>
|
|
55
|
+
<Checkbox
|
|
56
|
+
checked={selected}
|
|
57
|
+
disabled
|
|
58
|
+
onSelect={() => console.log('')}
|
|
59
|
+
/>
|
|
60
|
+
</Button>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<View float style={{ padding:15 }}>
|
|
66
|
+
<Button transparent style={{ padding:0, flexDirection:'row', alignItems:'center' }} onPress={() => setVisible(!visible)}>
|
|
67
|
+
<Text style={{ flex:1, marginRight:10 }} theme='h1'>{active_competitions.length} Comeptitions</Text>
|
|
68
|
+
<Icons.ChevronIcon direction={visible?'up':'down'} color={Colors.text.h1} size={8} />
|
|
69
|
+
</Button>
|
|
70
|
+
{visible ?
|
|
71
|
+
<View transparent style={{ marginTop:20 }}>
|
|
72
|
+
<SearchBox
|
|
73
|
+
onChange={(text) => setSearch(text)}
|
|
74
|
+
hide_search_button
|
|
75
|
+
/>
|
|
76
|
+
<FlatList
|
|
77
|
+
data={filtered_competitions.sort((a,b) => moment(a.scheduled_datetime).unix() - moment(b.scheduled_datetime).unix())}
|
|
78
|
+
key={'comp_selector'}
|
|
79
|
+
keyExtractor={item => item.competition_id.toString()}
|
|
80
|
+
renderItem={renderCompetitions}
|
|
81
|
+
/>
|
|
82
|
+
</View>
|
|
83
|
+
:<></>}
|
|
84
|
+
</View>
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export default CompetitionSelector
|