Player Of The Match Results
Welcome to Player of The Match Results Management Widget. The widget allows Fans United staff members to view and analyze player voting results from football matches. It provides a comprehensive interface for filtering matches by competitions and teams, displaying detailed player statistics, and includes features for viewing vote distribution among players. You can use this widget as it is and embed it in your platform, or you can use the Management Panel.
Installation and usage
The easiest way to use fansunited-widget-potm-results-management is to install it from npm as follows:
npm install fansunited-widget-potm-resultsor:
yarn add fansunited-widget-potm-resultsHere is an example how you can integrate Fans United Either/Or Management Widget:
import 'fansunited-widget-potm-results/style.css';
import { PotmResults } from 'fansunited-widget-potm-results';
const App = () => {
return (
<PotmResults
fansUnitedApiKey={'your-api-key'}
fansUnitedClientId={'your-client-id'} />
);
}Notes
-
The widget is bundled as a React component and its usage is as simple as the above example
-
Don't worry about your project's CSS. The widget's styling is done with Joy UI which is based on headless unstyle react components. This means that the widget's CSS will NOT affect yours. One important thing is that you need to import
style.cssfile from package folder:
import 'fansunited-widget-potm-results/style.css';
N.B: If you are using an entry point for importing all your stylings, you need to import fansunited-widget-potm-results/style.css there as well
- Easy translation in every language. For more information check our Translation heading.
Props
type PotmResultsManagerProps = {
fansUnitedApiKey: string;
fansUnitedClientId: string;
fansUnitedLanguage?: string;
fansUnitedEnvironment?: string;
labels?: LabelsModel;
};Fans United Player Of The Match Results Management Widget depends on Fans United JS SDK and Fans United Client API. Thats why fansUnitedApiKey and fansUnitedClientId are required. They will be provided to you from Fans United team. For other optional props here is some information:
-
fansUnitedLanguage- for our sports APIs FansUnited platform supports different languages. For now they are Bulgarian (bg), English (en), Romanian (ro), Greek (el), Slovak (sk), Serbian (sr) and Hungarian (hu). If no value given it will be set to English (en). -
fansUnitedEnvironment- You can run the widget in the following environments: staging, production, watg and yolo. If no value given it will be set to production (prod). -
labels- you can easily translate all labels, UI messages, descriptions, placeholders and etc. with this prop. By default, Fans United Match Quiz Management Widget is available in English so if no value is given, the widget will be translated in English.
Translation
You can easily translate Fans United Player Of The Match Results Management Widget in your language! You just need to pass an object to labels prop with concrete keys and values and that's it! Here's an example how you can do it:
import 'fansunited-widget-potm-results/style.css';
import { PotmResults } from 'fansunited-widget-potm-results';
const labels = {
clientConfigErrorMessage: "There was a problem fetching client's configuration. Please check again your API key and client ID. For more information contact Fans United staff.",
searchCompetitions: 'Search competitions',
competitionsSelectionPlaceholder: 'Search for competitions by their name',
competitionsErrorMessage: 'There was a problem with fetching competitions information',
searchTeams: 'Search teams',
teamsSelectionPlaceholder: 'Search for teams by their name',
searchTeamsErrorMessage: 'There was a problem searching for teams',
fetchMatchesErrorMessage: 'There was a problem while fetching matches. Please try again.',
noMatchesFound: 'No matches found',
itemsPerPage: 'Items per page',
fromDate: 'From date',
toDate: 'To date',
timeFormat: 'DD MMM YYYY HH:mm',
fetchPotmResultsErrorMessage: 'There was a problem with fetching "Player of The Match" results for match: ${matchName}',
noPotmStandingsAvailable: 'No Player of The Match standings available',
totalVotes: 'Total votes',
playerOfTheMatchStandings: 'Player of the match standings',
player: 'Player',
votes: 'Votes',
winner: 'Winner',
action: 'Action',
showStatistics: 'Show statistics',
close: 'Close',
minutesPlayed: 'Minutes played',
yellowCards: 'Yellow cards',
redCards: 'Red cards',
goals: 'Goals',
penaltyGoals: 'Penalty goals',
penaltyCommitted: 'Penalties commited',
penaltyWon: 'Penalties won',
penaltyMissed: 'Penalties missed',
penaltyReceived: 'Penalties received',
penaltySaved: 'Penalties saved',
ownGoals: 'Own goals',
assists: 'Assists',
cleanSheets: 'Clean sheets',
shots: 'Shots',
shotsOn: 'Shots on target',
shotsBlocked: 'Shots blocked',
offsides: 'Offsides',
foulsCommitted: 'Fouls committed',
foulsWon: 'Fouls won',
tackles: 'Tackles',
tacklesBlocks: 'Tackles blocked',
tacklesInterceptions: 'Tackles interceptions',
concededGoals: 'Conceded goals',
caughtBall: 'Gaught balls',
saves: 'Saves',
passes: 'Passes',
crosses: 'Crosses',
interceptions: 'Interceptions',
keyPasses: 'Key passes',
passesAccuracy: 'Passes accuracy',
duels: 'Duels',
duelsWon: 'Duels won',
dribblesAttempts: 'Dribbles attempts',
dribblesSuccess: 'Dribbles success',
dribblesPast: 'Dribbles past',
widgetEmbedCode: 'Widget embed code',
votingWindow: 'Voting window',
votingWindowInfo: 'Determines how many hours after the finish time will voting remain open.',
copyToClipboard: 'Copy to clipboard',
divElementTextInfo: "The generated embed code can be copied directly into your website's HTML. For comprehensive implementation details, visit our documentation: ",
warningTooltipInvalidMatchStatusMessage: `This match is currently with status: "__matchStatus__". The "Player of the Match" widget embed code will not work properly until the match status change to "not started" or "finished".`,
dataProvider: "Data provider",
dataProviderDescription: "Select the data source for match identification.",
dataProviderRemappingIdNotFoundMessage: "No football entity ID was found for the selected provider.",
dataProviderRemappingErrorMessage: "There was a problem with mapping football entity ID. Please try again.",
playersToShow: "Players to show",
all: "All",
playersToShowDescription: "Choose which team’s players to include in the widget.",
embedWidgetInfo: "Embed widget information",
urlCopiedToClipboardMessage: "URL copied to clipboard",
imageDeletedMessage: "Image deleted",
imageResetMessage: "The initial size of the image has been restored",
uploadingImageMessage: "You have successfully uploaded image",
generateSignedInUrlErrorMessage: "There was a problem generating signed in URL to store the image in bucket. Please try again",
uploadingImageErrorMessage: "There was a problem with uploading image to bucket. Please try again",
encryptingImageErrorMessage: "There was a problem with encrypting image before uploading it to bucket. Please try again",
searchSportal365ImagesErrorMessage: "There was a problem with searching images from Sportal 365 API. Please try again",
clearImage: "Clear image",
viewImage: "View image",
cropImage: "Crop image",
uploadImage: "Upload image",
copyUrl: "Copy URL",
sportal365Images: "Sportal365 images",
hideFilters: "Hide filters",
showFilters: "Show filters",
search: "Search",
aspectRatio: "Aspect ratio",
crop: "Crop",
reset: "Reset",
getPlayersErrorMessage: "There was a problem fetching players. Please try again.",
specificPlayers: "Specific players",
specificPlayersDescription: "Select specific players to display in the widget. If no players are selected, all players from the chosen team(s) will be available for voting.",
brandingArea: "Branding area",
image: "Image",
url: "URL",
brandingUrlTooltip: "URL that the branding area will link to when clicked. Opens in a new tab.",
authRequirement: "Auth requirement",
authRequirementDescription: "Determines who can participate in voting. 'None' allows anonymous users, while 'Registered' requires user authentication.",
signInLabel: "Label",
signInLabelDescription: "Custom text displayed on the sign-in button. If empty, defaults to 'Sign in to vote'.",
authenticationHandler: "Authentication handler",
authenticationHandlerDescription: "JavaScript function code that executes when users click the sign-in button. To evaluate the function, provide only the function name. Example: showLoginModal() or window.openAuth(). The function is required otherwise the sign-in button will just log dummy message in the console.",
};
const App = () => {
return (
<PotmResults
fansUnitedApiKey={'your-api-key'}
fansUnitedClientId={'your-client-id'}
labels={labels}/>
);
}Here is all information about LabelsModel:
| Key | Description | Default Value |
|---|---|---|
clientConfigErrorMessage | Toast error message when client is providing invalid value to fansUnitedApiKey or fansUnitedClientId prop. | There was a problem fetching client's configuration. Please check again your API key and client ID. For more information contact Fans United staff. |
searchCompetitions | Filters search competitions autocomplete title | Search competitions |
competitionsSelectionPlaceholder | Filters search competitions autocomplete placeholder | Search for competitions by their name |
competitionsErrorMessage | Toast error message when there is an error while fetching competitions | There was a problem with fetching competitions information |
searchTeams | Filters search teams autocomplete title | Search teams |
teamsSelectionPlaceholder | Filters search teams autocomplete placeholder | Search for teams by their name |
searchTeamsErrorMessage | Toast error message when there is an error while fetching teams | There was a problem searching for teams |
fetchMatchesErrorMessage | Toast error message when there is an error while fetching matches based on filters provided | There was a problem while fetching matches. Please try again. |
noMatchesFound | Info message when there are no matches found by filters provided | No matches found |
itemsPerPage | Filters select title | Items per page |
fromDate | Filters datepicker title | From date |
toDate | Filters datepicker title | To date |
timeFormat | Timeformat for displaying dates. Widgets uses dayjs as a date dependency. | DD.MM.YYYY, HH:mm |
fetchPotmResultsErrorMessage | Toast error message when there is an error while fetching player of the match results for particular game | There was a problem with fetching "Player of The Match" results for match: matchName |
noPotmStandingsAvailable | Info message when there are no standings available | No Player of The Match standings available |
totalVotes | Results table column votes footer | Total votes |
playerOfTheMatchStandings | Header text for results table | Player of the match standings |
player | Title for players info column | Player |
votes | Title for player votes column | Votes |
winner | Chip text for players with most votes | Winner |
minutesPlayed | Text label for player statistics info tooltip | Minutes played |
yellowCards | Text label for player statistics info tooltip | Yellow cards |
redCards | Text label for player statistics info tooltip | Red cards |
goals | Text label for player statistics info tooltip | Goals |
penaltyGoals | Text label for player statistics info tooltip | Penalty goals |
penaltyCommitted | Text label for player statistics info tooltip | Penalties commited |
penaltyWon | Text label for player statistics info tooltip | Penalties won |
penaltyMissed | Text label for player statistics info tooltip | Penalties missed |
penaltyReceived | Text label for player statistics info tooltip | Penalties received |
penaltySaved | Text label for player statistics info tooltip | Penalties saved |
ownGoals | Text label for player statistics info tooltip | Own goals |
assists | Text label for player statistics info tooltip | Assists |
cleanSheets | Text label for player statistics info tooltip | Clean sheets |
shots | Text label for player statistics info tooltip | Shots |
shotsOn | Text label for player statistics info tooltip | Shots on target |
shotsBlocked | Text label for player statistics info tooltip | Shots blocked |
offsides | Text label for player statistics info tooltip | Offsides |
foulsCommitted | Text label for player statistics info tooltip | Fouls committed |
foulsWon | Text label for player statistics info tooltip | Fouls won |
tackles | Text label for player statistics info tooltip | Tackles |
tacklesBlocks | Text label for player statistics info tooltip | Tackles blocked |
tacklesInterceptions | Text label for player statistics info tooltip | Tackles interceptions |
concededGoals | Text label for player statistics info tooltip | Conceded goals |
caughtBall | Text label for player statistics info tooltip | Gaught balls |
saves | Text label for player statistics info tooltip | Saves |
passes | Text label for player statistics info tooltip | Passes |
crosses | Text label for player statistics info tooltip | Crosses |
interceptions | Text label for player statistics info tooltip | Interceptions |
keyPasses | Text label for player statistics info tooltip | Key passes |
passesAccuracy | Text label for player statistics info tooltip | Passes accuracy |
duels | Text label for player statistics info tooltip | Duels |
duelsWon | Text label for player statistics info tooltip | Duels won |
dribblesAttempts | Text label for player statistics info tooltip | Dribbles attempts |
dribblesSuccess | Text label for player statistics info tooltip | Dribbles success |
dribblesPast | Text label for player statistics info tooltip | Dribbles past |
widgetEmbedCode | Header text for widget embed code html card | Widget embed code |
votingWindow | Widget embed code voting window number input title | Voting window |
votingWindowInfo | Widget embed code voting window description | Determines how many hours after the finish time will voting remain open. |
copyToClipboard | Copy to clipboard button tooltip text | Copy to clipboard |
divElementTextInfo | Widget embed code info text | The generated embed code can be copied directly into your website's HTML. For comprehensive implementation details, visit our documentation: |
warningTooltipInvalidMatchStatusMessage | Tooltip warning message when the match is with invalid status. The matchStatus will be replaced by match status information | This match is currently with status: "matchStatus". The "Player of the Match" widget embed code will not work properly until the match status change to "not started" or "finished". |
dataProvider | Label for data provider select | Data provider |
dataProviderDescription | Description for data provider select | Select the data source for match identification. |
dataProviderRemappingIdNotFoundMessage | Toast warning message when no football entity ID was found for the selected provider. | No football entity ID was found for the selected provider. |
dataProviderRemappingErrorMessage | Error toast message when there is an error while mapping football entity ID. | There was a problem with mapping football entity ID. Please try again. |
playersToShow | Label for players to show dropdown. | Players to show |
all | Error toast message when there is an error while mapping football entity ID. | All |
playersToShowDescription | Description for players to show dropdown. | Choose which team’s players to include in the widget. |
embedWidgetInfo | Information text about embedding widgets | Embed widget information |
urlCopiedToClipboardMessage | Toast success message when URL is copied | URL copied to clipboard |
imageDeletedMessage | Toast message when image is deleted | Image deleted |
imageResetMessage | Toast message when image is reset | The initial size of the image has been restored |
uploadingImageMessage | Toast message when image upload is successful | You have successfully uploaded image |
generateSignedInUrlErrorMessage | Toast error message for signed URL generation failure | There was a problem generating signed in URL to store the image in bucket. Please try again |
uploadingImageErrorMessage | Toast error message for image upload failure | There was a problem with uploading image to bucket. Please try again |
encryptingImageErrorMessage | Toast error message for image encryption failure | There was a problem with encrypting image before uploading it to bucket. Please try again |
searchSportal365ImagesErrorMessage | Toast error message for Sportal365 image search failure | There was a problem with searching images from Sportal 365 API. Please try again |
clearImage | Button text for clearing image | Clear image |
viewImage | Button text for viewing image | View image |
cropImage | Button text for cropping image | Crop image |
uploadImage | Button text for uploading image | Upload image |
copyUrl | Button text for copying URL | Copy URL |
sportal365Images | Label for Sportal365 images section | Sportal365 images |
hideFilters | Button text for hiding filters | Hide filters |
showFilters | Button text for showing filters | Show filters |
search | Button text for search action | Search |
aspectRatio | Label for aspect ratio setting | Aspect ratio |
crop | Button text for crop action | Crop |
reset | Button text for reset action | Reset |
getPlayersErrorMessage | Toast error message when fetching players fails | There was a problem fetching players. Please try again. |
specificPlayers | Label for specific players selection | Specific players |
specificPlayersDescription | Description for specific players selection | Select specific players to display in the widget. If no players are selected, all players from the chosen team(s) will be available for voting. |
brandingArea | Label for branding area section | Branding area |
image | Label for image field | Image |
url | Label for URL field | URL |
brandingUrlTooltip | Tooltip text for branding URL field | URL that the branding area will link to when clicked. Opens in a new tab. |
authRequirement | Label for auth requirement field | Auth requirement |
authRequirementDescription | Description for auth requirement field | Determines who can participate in voting. "None" allows anonymous users, while "Registered" requires user authentication. |
signInLabel | Label for sign-in label field | Label |
signInLabelDescription | Description for sign-in label field | Custom text displayed on the sign-in button. If empty, defaults to "Sign in to vote". |
authenticationHandler | Label for authentication handler field | Authentication handler |
authenticationHandlerDescription | Description for authentication handler field | JavaScript function code that executes when users click the sign-in button. To evaluate the function, provide only the function name. Example: showLoginModal() or window.openAuth(). The function is required otherwise the sign-in button will just log dummy message in the console. |
action | Title for action column in results table | Action |
showStatistics | Button text for showing player statistics | Show statistics |
close | Button text for closing modals/dialogs | Close |
Updated 10 days ago
