Profile Management

Welcome to Fans United Profile Management Widget. The widget allows staff members with sufficient permissions to manage user profiles. You can use this widget as it is and embed it in your platform, or you can use the Management Panel to manage user profiles. With successful installation, you can manage user profiles.

Installation and usage

The easiest way to use fansunited-widget-profile-management is to install it from npm as follows:

npm  install  fansunited-widget-profile

or:

yarn  add  fansunited-widget-profile

Here is an example how you can integrate Fans United Profile Management Widget:

import  'fansunited-widget-profile/style.css';
import { ProfileManager } from  'fansunited-widget-profile';

const  App = () => {
return (
<ProfileManager
	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.css file from package folder:

import 'fansunited-widget-profile/style.css';

N.B: If you are using an entry point for importing all your stylings, you need to import fansunited-widget-profile/style.css there as well

Props

type  ProfileManagerProps = {
	fansUnitedApiKey: string;
	fansUnitedClientId: string;
	fansUnitedLanguage?: string;
	fansUnitedEnvironment?: string;
	sportal365Project?: string;
	sportal365Infrastructure?: 'shared' | 'betway';
	labels?: LabelsModel;
	hideSignOutButton?: boolean;
};

Fans United Profile 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 and watg. 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 Profile Management Widget is available in English so if no value is given, the widget will be translated in English.

  • sportal365Project - The Sportal365 project. Used as a request header when communicating with Sportal365 APIs.

  • sportal365Infrastructure - The Sportal365 infrastructure. Used to determine what authorization should be used when communicating with Sportal365 APIs. If no value given (when sportal365Project props is provided) it will be set to shared .

  • hideSignOutButton - By default on the top right corner of the widget will be displayed a sign out button. To hide that button set this prop to true.

Translation

You can easily translate Fans United Profile 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-profile/style.css';
import { ProfileManager } from  'fansunited-widget-profile';

const labels = {
	featureDisabled: 'Feature disabled!',
	noPermissionMessage: 'You have no permission for this feature!',
	tryAgainButton: 'Try again',
	userNotFound: 'User not found. Please try again',
	signOut: 'Sign out',
	searchById: 'Search by ID',
	searchByName: 'Search by name/nickname',
	getProfilesErrorMessage: 'There was a problem with fetching profiles data',
	export: 'Export',
	exportUsers: 'Export users',
	exportUsersDescription: 'Export a list of users who have selected sports-related interest (competitions, teams, players) in their profile settings. Search for teams, players and competitions.',
	exportAll: 'All',
	exportAllText: 'Export profiles that have all of your selected sports interests.',
	exportAtLeastOne: 'At least one',
	exportAtLeastOneText: 'Export profiles that have at least one of your selected sports interests.',
	exportFavourite: 'Favourite',
	exportFavouriteText: 'Export profiles that have all of your selected sports interests marked as favourites.',
	usersExportMessage: 'Users have been exported successfully',
	usersExportErrorMessage: 'There was a problem with exporting users. Please try again',
	user: 'User',
	statistics: 'Statistics',
	actions: 'Actions',
	additionalInformation: 'Additional information',
	banned: 'BANNED',
	points: 'Points',
	predictions: 'Predictions',
	successRate: 'Success rate',
	totalPosts: 'Total posts',
	miniGamesParticipation: 'Mini games participation',
	classicQuizzes: 'Classic Quizzes',
	eitherOrs: 'Either/Ors',
	stats: 'Stats',
	discussions: 'Discussions',
	predictionActivity: 'Prediction Activity',
	miniGames: 'Mini Games',
	comingSoon: 'Coming soon',
	verified: 'Verified',
	staffMember: 'Staff member',
	moderatePosts: 'Moderate posts',
	banFromDiscussions: 'Ban from Discussions',
	unbanFromDiscussions: 'Unban from Discussions',
	verify: 'Verify',
	unverify: 'Unverify',
	markAsStaffMember: 'Mark profile as staff member',
	unmarkAsStaffMember: 'Unmark profile as staff member',
	moderateProfileTitle: 'Moderate user posts',
	moderateProfileDescription: 'The following operation will moderate all posts for the user',		
	reason: 'Reason',
	moderate: 'Moderate',
	moderateProfileMessage: 'User profile has been moderated',
	moderateProfileErrorMessage: 'There was a problem with moderating profile. Please try again',
	banProfileTitle: 'Ban user ',
	unbanProfileTitle: 'Unban user ',
	banPeriod:  'Ban period in days',
	day: 'day',
	days:  'days',
	indefinite: 'INDEFINITE',
	customPeriod: 'Custom period',
	timeFormat: 'DD.MM.YYYY, HH:mm',
	bannedAt: 'Banned at',
	bannedPeriod: 'Banned period',
	bannedReason: 'Banned reason',
	banReason: 'Ban reason',
	unbanReason: 'Unban reason',
	ban: 'Ban',
	unban: 'Unban',
	banProfileMessage: 'User profile has been banned',
	banProfileErrorMessage: 'There was a problem with banning profile. Please try again',
	unbanProfileMessage: 'User profile has been unbanned',
	unbanProfileErrorMessage: 'There was a problem with unbanning profile. Please try again',
	verifyProfileTitle: 'Verify profile',
	verifyProfileDescription: 'Are you sure you want to verify the following profile:',
	unverifyProfileTitle: 'Unverify profile',
	unverifyProfileDescription: 'Are you sure you want to unverify the following profile:',
	verifyProfileMessage: 'User profile has been verified',
	verifyProfileErrorMessage: 'There was a problem with verifying profile. Please try again',
	unverifyProfileMessage: 'User profile has been unverified',
	unverifyProfileErrorMessage = 'There was a problem with unverifying profile. Please try again',
	markAsStaffMemberTitle: 'Mark profile as staff member',
	markAsStaffMemberDescription: 'Are you sure you want to mark the following profile as a staff member:',
	unmarkAsStaffMemberTitle: 'Unmark profile as staff member',
	unmarkAsStaffMemberDescription: 'Are you sure you want to unmark the following profile as a staff member:',
	markAsStaffMemberMessage: 'User has been marked as a staff member',
	markAsStaffMemberErrorMessage: 'There was a problem with marking user as a staff member. Please try again',
	unmarkAsStaffMemberMessage: 'User has been unmarked as a staff member',
	unmarkAsStaffMemberErrorMessage: 'There was a problem with unmarking user as a staff member. Please try again',
	deleteProfileTitle: 'Delete user profile',
	deleteProfileDescription: 'Are you sure you want to permanently delete this profile: __profileName__? This action cannot be undone. Once deleted, you will no longer be able to moderate posts, ban/unban, or perform any other actions on this user.',
	delete: 'Delete',
	deleted: 'DELETED',
	close: 'Close',
	deleteProfileMessage: 'User profile has been deleted',
	deleteProfileErrorMessage: 'There was a problem with deleting profile. Please try again',
};

const  App = () => {
return (
<ProfileManager
	fansUnitedApiKey={'your-api-key'}
	fansUnitedClientId={'your-client-id'}
	labels={labels}/>
);
}

Here is all information about LabelsModel:

KeyDescriptionDefault Value
featureDisabledLabel for no permission card titleFeature disabled!
noPermissionMessageLabel for no permission card paragraphYou have no permission for this feature!
tryAgainButtonLabel for no permission card buttonTry again
userNotFoundOn login screen when client gives invalid information about email or password.User not found. Please try again
signOutUsed as label on sign out buttonSign out
searchByIdSearch by Id option for profile search selectSearch by ID
searchByNameSearch by name option for profile search selectSearch by name/nickname
getProfilesErrorMessageToast error message when problem with fetching profiles data occursThere was a problem with fetching profiles data
exportExport users modal action button titleExport
exportUsersExport users button titleExport users
exportUsersDescriptionExport users modal description textExport a list of users who have selected sports-related interests (competitions, teams, players) in their profile settings. Search for teams, players and competitions.
exportAllExport users type allAll
exportAllTextExport users type all tooltip contentExport profiles that have all of your selected sports interests.
exportAtLeastOneExport users type at least oneAt least one
exportAtLeastOneTextExport users type at least one tooltip contentExport profiles that have at least one of your selected sports interests.
exportFavouriteExport users type favouriteFavourite
exportFavouriteTextExport users type favourite tooltip contentExport profiles that have all of your selected sports interests marked as favourites.
usersExportMessageToast success message when profiles are exportedUsers have been exported successfully
usersExportErrorMessageToas error message when problem occurs while exporting usersThere was a problem with exporting users. Please try again
userTable header labelUser
statisticsTable header labelStatistics
actionsTable header labelActions
pointsTable header labelPoints
predictionsTable header labelPredictions
successRateTable header labelSuccess rate
totalPostsTable header labelTotal posts
miniGamesParticipationTable header labelMini games participation
classicQuizzesRow text in mini games participation columnClassic Quizzes
eitherOrsRow text in mini games participation columnEither/Ors
additionalInformationTooltip text for row expand/collapses buttonAdditional information
statsAdditional information tabs tab nameStats
discussionsAdditional information tabs tab nameDiscussions
predictionActivityAdditional information tabs tab namePrediction Activity
miniGamesAdditional information tabs tab nameMini Games
comingSoonAdditional information tabs chip textComing soon
bannedChip text showing that profile is bannedBANNED
verifiedTooltip for the icon showing that profile is verifiedVerified
staffMemberTooltip for the icon showing that profile is verifiedStaff member
moderatePostsTable row action button optionModerate posts
banFromDiscussionsTable row action button optionBan from Discussions
unbanFromDiscussionsTable row action button optionUnban from Discussions
verifyTable row action button optionVerify
unverifyTable row action button optionUnverify
markAsStaffMemberTable row action button option'Mark profile as staff member
unmarkAsStaffMemberTable row action button optionUnmark profile as staff member
moderateProfileTitleModerate profile posts modal titleModerate user posts
moderateProfileDescriptionModerate profile posts modal description textThe following operation will moderate all posts for the user
reasonModerate modal reason titleReason
moderateModerate modal action button titleModerate
moderateProfileMessageToast success message when user profile has been moderatedUser profile has been moderated
moderateProfileErrorMessageToast error message when problem occurs while moderating profileThere was a problem with moderating profile. Please try again
banProfileTitleBan profile modal titleBan user
unbanProfileTitleUnban profile modal titleUnban user
banPeriodBan profile modal period selector titleBan period in days
dayDay labelday
daysDays labeldays
indefiniteIndefinite period labelINDEFINITE
customPeriodCustom period select optionCustom period
timeFormatTime format using for showing date objectsDD.MM.YYYY, HH:mm
bannedAtBanned profile info row labelBanned at
bannedPeriodBanned profile info row labelBanned period
bannedReasonBanned profile info row labelBanned reason
banReasonBan profile modal reason text titleBan reason
unbanReasonUnban profile modal reason text titleUnban reason
banBan profile modal action button titleBan
unbanUnban profile modal action button titleUnban
banProfileMessageToast success message when profile has been bannedUser profile has been banned
banProfileErrorMessageToast error message when problem occurs while banning a profileThere was a problem with banning profile. Please try again
unbanProfileMessageToast success message when profile has been unbannedUser profile has been unbanned
unbanProfileErrorMessageToast error message when problem occurs while unbanning a profileThere was a problem with unbanning profile. Please try again
verifyProfileTitleVerify profile modal titleVerify profile
verifyProfileDescriptionVerify profile modal descriptionAre you sure you want to verify the following profile:
unverifyProfileTitleUnverify profile modal titleUnverify profile
unverifyProfileDescriptionUnverify profile modal descriptionAre you sure you want to unverify the following profile:
verifyProfileMessageToast success message when profile has been verifiedUser profile has been verified
verifyProfileErrorMessageToast error message when problem occurs while verifying a profileThere was a problem with verifying profile. Please try again
unverifyProfileMessageToast success message when profile has been unverifiedUser profile has been unverified
unverifyProfileErrorMessageToast error message when problem occurs while unverifying a profileThere was a problem with unverifying profile. Please try again
markAsStaffMemberTitleMark profile as staff member modal titleMark profile as staff member
markAsStaffMemberDescriptionMark profile as staff member modal descriptionAre you sure you want to mark the following profile as a staff member:
unmarkAsStaffMemberTitleUnmark profile as staff member modal titleUnmark profile as staff member
unmarkAsStaffMemberDescriptionUnmark profile as staff member modal descriptionAre you sure you want to unmark the following profile as a staff member:
markAsStaffMemberMessageToast success message when profile has been marked as a staff memberUser has been marked as a staff member
markAsStaffMemberErrorMessageToast error message when problem occurs while marking profile as a staff memberThere was a problem with marking user as a staff member. Please try again
unmarkAsStaffMemberMessageToast success message when profile has been unmarked as a staff memberUser has been unmarked as a staff member
unmarkAsStaffMemberErrorMessageToast error message when problem occurs while unmarking profile as a staff memberThere was a problem with unmarking user as a staff member. Please try again
deleteProfileTitleDelete profile modal titleDelete user profile
deleteProfileDescriptionDelete profile modal description text. The placeholder profileName is split so the nickname (or name) of the profile can be displayedAre you sure you want to permanently delete this profile: profileName? This action cannot be undone. Once deleted, you will no longer be able to moderate posts, ban/unban, or perform any other actions on this user.
deleteDelete profile modal action button titleDelete
deletedLabel for deleted chipDELETED
closeClose button titleClose
deleteProfileMessageToast success message when profile has been deletedUser profile has been deleted
deleteProfileErrorMessageToast error message when problem occurs while deleting profileThere was a problem with deleting profile. Please try again