/* eslint-disable sonarjs/no-duplicate-string */
// eslint-disable-next-line import/no-cycle
import { parseDecimal } from './utils/common';
/**
* @constant STATIC_VERSION
*/
export const STATIC_VERSION = process.env.STATIC_VERSION;
/**
* @constant
*/
export const DEFAULT_PAGE_SIZE = 10;
/**
* @constant
*/
export const MANIPULATIONS = {
RESET_DATE_AND_TIME: 'RESET_DATE_AND_TIME',
};
/**
* @constant
*/
export const PAGES = {
LOGIN: '/login',
HOME: '/',
MAIN: '/app',
COUPONS_PLACED_VIEW: '/app/coupons_placed-coupons',
COUPONS_SETTLED_VIEW: '/app/coupons_settled-coupons',
SHOP_COUPONS_PLACED_VIEW: '/app/coupons_placed-coupons-shop',
SHOP_COUPONS_SETTLED_VIEW: '/app/coupons_settled-coupons-shop',
ROUNDS_VIEW: '/app/round_round-details',
ROUNDS_TURBO_VIEW: '/app/round_round-turbo',
SHOP_ROUNDS_VIEW: '/app/round_round-shop',
ROUND_REPORT_VIEW: '/app/report_round-report',
SHOP_ROUND_REPORT_VIEW: '/app/report_round_shop-report',
TURNOVER_REPORT_VIEW: '/app/report_turnover-report',
FREE_BETS_SHOP_REPORT_VIEW: '/app/free-bets-shop-report',
FREE_BETS_VIEW: '/app/bonus_free-bets',
FREE_BETS_CAMPAIGNS_VIEW: '/app/bonus_shop-free-bets-campaigns',
CLIENT_BONUSES_VIEW: '/app/bonus_client-bonuses',
CLIENT_RANKS_VIEW: '/app/bonus_client-ranks',
BONUS_SETTINGS_VIEW: '/app/bonus_bonus-settings',
RANK_SETTINGS_VIEW: '/app/bonus_rank-settings',
POINT_SETTINGS_VIEW: '/app/bonus_point-settings',
GAMES_SETTINGS_VIEW: '/app/settings_game-settings',
SHOP_GAMES_SETTINGS_VIEW: '/app/settings_game-shop-settings',
ROUND_DURATION_SETTINGS_VIEW: '/app/settings_round-duration-settings',
SETTINGS_LEAGUES_VIEW: '/app/settings_league-settings',
SETTINGS_MARKET_VIEW: '/app/settings_markets-settings',
SHOP_SETTINGS_MARKET_VIEW: '/app/settings_markets-shop-settings',
ODDS_TEMPLATE_FILES_VIEW: '/app/settings_download-odd-template',
SHOP_ODDS_TEMPLATE_VIEW: '/app/settings_shop_download-odd-template',
ODDS_TEMPLATE_FILES_UPLOAD: '/app/settings_upload-odd-template',
STATS_TEMPLATE_VIEW: '/app/settings_stats-template-mobile',
STATS_TEMPLATE_FILES_VIEW: '/app/settings_stats-template-file',
INVALIDATE_ODDS_VIEW: '/app/settings_invalidate-odds',
SETTINGS_MARKET_MARGIN_VIEW: '/app/settings_market-margins',
SETTINGS_VIDEO_ACTION_VIEW: '/app/settings_video-action',
ADMIN_USERS_VIEW: '/app/admin_users',
ADMIN_ROLES_VIEW: '/app/admin_roles',
MY_PROFILE: '/app/profile',
CASHIERS_VIEW: '/app/cashiers_cashier-list',
STATEMENTS_VIEW: '/app/cashiers_statement-list',
JACKPOT_SETTINGS_VIEW: '/app/jackpot_settings',
JACKPOT_WON_VIEW: '/app/jackpot_won',
};
/**
* @constant
*/
export const MENU = {
COUPONS: {
key: 'coupons',
name: 'Coupons',
},
ROUNDS: {
key: 'round',
name: 'Rounds',
},
REPORTS: {
key: 'report',
name: 'Reports',
},
BONUS: {
key: 'bonus',
name: 'Bonus',
},
SETTINGS: {
key: 'settings',
name: 'Settings',
},
ADMIN: {
key: 'admin',
name: 'Admin',
},
CASHIERS: {
key: 'cashiers',
name: 'Cashiers',
},
PROFILE: {
key: 'profile',
name: 'Profile',
},
JACKPOT: {
key: 'jackpot',
name: 'Jackpots',
},
};
/**
* @constant
*/
export const MENU_ROUTES = ['COUPONS', 'ROUNDS', 'REPORTS', 'BONUS', 'JACKPOT', 'SETTINGS', 'CASHIERS', 'ADMIN'];
/**
* @constant
*/
export const MENU_ITEMS = {
COUPONS: {
COUPONS_PLACED_VIEW: {
name: 'Placed Coupons Mobile',
path: PAGES.COUPONS_PLACED_VIEW,
},
COUPONS_SETTLED_VIEW: {
name: 'Settled Coupons Mobile',
path: PAGES.COUPONS_SETTLED_VIEW,
},
SHOP_COUPONS_PLACED_VIEW: {
name: 'Placed Coupons Shop',
path: PAGES.SHOP_COUPONS_PLACED_VIEW,
},
SHOP_COUPONS_SETTLED_VIEW: {
name: 'Settled Coupons Shop',
path: PAGES.SHOP_COUPONS_SETTLED_VIEW,
},
},
ROUNDS: {
ROUNDS_VIEW: {
name: 'Round Mobile',
path: PAGES.ROUNDS_VIEW,
},
ROUNDS_TURBO_VIEW: {
name: 'Round Turbo Mobile',
path: PAGES.ROUNDS_TURBO_VIEW,
},
SHOP_ROUNDS_VIEW: {
name: 'Round Shop',
path: PAGES.SHOP_ROUNDS_VIEW,
},
},
REPORTS: {
ROUND_REPORT_VIEW: {
name: 'Round Report Mobile',
path: PAGES.ROUND_REPORT_VIEW,
},
SHOP_ROUND_REPORT_VIEW: {
name: 'Round Report Shop',
path: PAGES.SHOP_ROUND_REPORT_VIEW,
},
TURNOVER_REPORT_VIEW: {
name: 'Turnover Report',
path: PAGES.TURNOVER_REPORT_VIEW,
},
SHOP_FREE_BET_CAMPAIGNS_REPORTS: {
name: 'Free Bet Report Shop',
path: PAGES.FREE_BETS_SHOP_REPORT_VIEW,
},
},
BONUS: {
FREE_BETS_VIEW: {
name: 'Mobile Free Bets',
path: PAGES.FREE_BETS_VIEW,
},
FREE_BETS_CAMPAIGNS_VIEW: {
name: 'Shop Free Bets Campaigns',
path: PAGES.FREE_BETS_CAMPAIGNS_VIEW,
},
CLIENT_BONUSES_VIEW: {
name: 'Client Bonuses',
path: PAGES.CLIENT_BONUSES_VIEW,
},
CLIENT_RANKS_VIEW: {
name: 'Client Ranks',
path: PAGES.CLIENT_RANKS_VIEW,
},
BONUS_SETTINGS_VIEW: {
name: 'Bonus Settings',
path: PAGES.BONUS_SETTINGS_VIEW,
},
RANK_SETTINGS_VIEW: {
name: 'Rank Settings',
path: PAGES.RANK_SETTINGS_VIEW,
},
POINT_SETTINGS_VIEW: {
name: 'Point Settings',
path: PAGES.POINT_SETTINGS_VIEW,
},
},
SETTINGS: {
GAMES_SETTINGS_VIEW: {
name: 'Game Settings Mobile',
path: PAGES.GAMES_SETTINGS_VIEW,
},
SHOP_GAMES_SETTINGS_VIEW: {
name: 'Game Settings Shop',
path: PAGES.SHOP_GAMES_SETTINGS_VIEW,
},
ROUND_DURATION_SETTINGS_VIEW: {
name: 'Round Duration Settings',
path: PAGES.ROUND_DURATION_SETTINGS_VIEW,
},
SETTINGS_LEAGUES_VIEW: {
name: 'Leagues Settings Mobile',
path: PAGES.SETTINGS_LEAGUES_VIEW,
},
SETTINGS_MARKET_VIEW: {
name: 'Markets Settings Mobile',
path: PAGES.SETTINGS_MARKET_VIEW,
},
SHOP_SETTINGS_MARKET_VIEW: {
name: 'Markets Settings Shop',
path: PAGES.SHOP_SETTINGS_MARKET_VIEW,
},
ODDS_TEMPLATE_FILES_VIEW: {
name: 'Odds Template Files',
path: PAGES.ODDS_TEMPLATE_FILES_VIEW,
},
ODDS_TEMPLATE_FILES_UPLOAD: {
name: 'Odds Template Mobile',
path: PAGES.ODDS_TEMPLATE_FILES_UPLOAD,
},
SHOP_ODDS_TEMPLATE_VIEW: {
name: 'Odds Template Shop',
path: PAGES.SHOP_ODDS_TEMPLATE_VIEW,
},
SETTINGS_MARKET_MARGIN_VIEW: {
name: 'Market Margins',
path: PAGES.SETTINGS_MARKET_MARGIN_VIEW,
},
STATS_TEMPLATE_VIEW: {
name: 'Stats Template Mobile',
path: PAGES.STATS_TEMPLATE_VIEW,
},
STATS_TEMPLATE_FILES_VIEW: {
name: 'Stats Template Files',
path: PAGES.STATS_TEMPLATE_FILES_VIEW,
},
INVALIDATE_ODDS_VIEW: {
name: 'Invalidate Odds',
path: PAGES.INVALIDATE_ODDS_VIEW,
},
SETTINGS_VIDEO_ACTION_VIEW: {
name: 'Shop Video Action',
path: PAGES.SETTINGS_VIDEO_ACTION_VIEW,
},
},
CASHIERS: {
STATEMENTS_VIEW: {
name: 'Statement List',
path: PAGES.STATEMENTS_VIEW,
},
CASHIERS_VIEW: {
name: 'Cashier List',
path: PAGES.CASHIERS_VIEW,
},
},
ADMIN: {
ADMIN_USERS_VIEW: {
name: 'Users',
path: PAGES.ADMIN_USERS_VIEW,
},
ADMIN_ROLES_VIEW: {
name: 'Roles',
path: PAGES.ADMIN_ROLES_VIEW,
},
},
PROFILE: {
MY_PROFILE: {
name: 'My Profile',
path: PAGES.MY_PROFILE,
},
},
JACKPOT: {
JACKPOT_SETTINGS_VIEW: {
name: 'Jackpot Settings',
path: PAGES.JACKPOT_SETTINGS_VIEW,
},
JACKPOT_WON_VIEW: {
name: 'Jackpots Won',
path: PAGES.JACKPOT_WON_VIEW,
},
},
};
/**
* @constant
*/
const API_PATH = process.env.NODE_ENV === 'development' ? '/api/' : process.env.API_URL;
/**
* @constant
*/
export const API_URLS = {
INIT: `${API_PATH}app/init`,
LOGIN: `${API_PATH}session/login`,
LOGOUT: `${API_PATH}session/logout`,
USER_LIST: `${API_PATH}user/list`,
USER_ADD: `${API_PATH}user/create`,
USER_REMOVE: `${API_PATH}user/delete`,
USER_RESET_PASS: `${API_PATH}user/password/reset`,
USER_EDIT_ROLES: `${API_PATH}user/roles`,
USER_EDIT_STATUS: `${API_PATH}user/status`,
USER_EDIT_INFO: `${API_PATH}user/editinfo`,
PLACED_COUPONS: `${API_PATH}coupons/list`,
PLACED_COUPONS_SHOP: `${API_PATH}coupons/listShop`,
EXPORT_COUPONS: `${API_PATH}export/couponsV3`,
ROUNDS_LIST: `${API_PATH}round/list`,
ROUND_DETAILS: `${API_PATH}round/results`,
ROUND_DETAILS_SHOP: `${API_PATH}round/shopResults`,
ROUND_REPORTS: `${API_PATH}reports/rounds`,
ROUND_REPORTS_SHOP: `${API_PATH}reports/shopRounds`,
FREE_BET_SHOP_REPORTS: `${API_PATH}reports/shopFreeBets`,
ROUNDS_TURBO_LIST: `${API_PATH}round/turbo/list`,
ROUNDS_SHOP_LIST: `${API_PATH}round/shop/list`,
TURNOVER_REPORTS: `${API_PATH}reports/turnover`,
ROLES: `${API_PATH}role/list`,
PERMISSIONS: `${API_PATH}permission/list`,
BONUS_SETTINGS: `${API_PATH}bonus/settings`,
RANK_SETTINGS: `${API_PATH}ranksettings/list`,
SAVE_RANK_SETTINGS: `${API_PATH}ranksettings/edit`,
CLIENT_BONUS: `${API_PATH}clientbonuses/list`,
CLIENT_RANKS: `${API_PATH}clientranks/list`,
POINT_SETTINGS: `${API_PATH}pointsettings/list`,
SAVE_POINT_SETTINGS: `${API_PATH}pointsettings/edit`,
MARKETS_SETTINGS: `${API_PATH}settings/markets`,
GOAL_GALORE_SETTINGS: `${API_PATH}settings/extraMarketsShop`,
ROUND_SPECIAL_SETTINGS: `${API_PATH}settings/roundSpecialMarketsShop`,
MARKETS_MARGINS_SETTINGS: `${API_PATH}settings/markets/margins`,
GOAL_GALORE_MARGINS_SETTINGS: `${API_PATH}settings/extra-markets/margins`,
ROUND_SPECIAL_MARGINS_SETTINGS: `${API_PATH}settings/round-special-markets/margins`,
MARKETS_SHOP_SETTINGS: `${API_PATH}settings/marketsShop`,
LEAGUES_SETTINGS: `${API_PATH}settingsleagues/list`,
SAVE_LEAGUES_SETTINGS: `${API_PATH}settingsleagues/edit`,
SAVE_NEW_ROLE: `${API_PATH}role/create`,
REMOVE_ROLE: `${API_PATH}role/remove`,
DISABLE_ENABLE_ROLE: `${API_PATH}role/disableenable`,
ROLE_PERMISSION: `${API_PATH}permission/role`,
SAVE_EDIT_ROLE: `${API_PATH}role/edit`,
FREE_BETS: `${API_PATH}freebet/list`,
ADD_FREE_BETS: `${API_PATH}freebet/add`,
DELETE_FREE_BETS: `${API_PATH}freebet`,
GAMES_SETTINGS: `${API_PATH}gamessettings/list`,
GAMES_SHOP_SETTINGS: `${API_PATH}gamessettings/listShop`,
PROFILE_INFO: `${API_PATH}account/profile`,
CHANGE_USER_PWD: `${API_PATH}account/password/change`,
SAVE_GAMES_SETTTINGS: `${API_PATH}gamessettings/edit`,
SAVE_GAMES_SHOP_SETTTINGS: `${API_PATH}gamessettings/editShop`,
ROUND_DURATION_SETTTINGS: `${API_PATH}app/round-duration-shop`,
ODDS_TEMPLATES_FILES: `${API_PATH}oddstemplatefiles/list`,
DOWNLOAD_ODDS_TEMPLATES_FILE: `${API_PATH}oddstemplatefiles/download`,
UPLOAD_ODDS_TEMPLATES_FILE: `${API_PATH}oddstemplatefiles/upload`,
GET_ODDS_TEMPLATE: `${API_PATH}oddstemplate/list`,
FORCE_TURBO: `${API_PATH}oddstemplate`,
GET_ODDS_SHOP_TEMPLATE: `${API_PATH}oddstemplate/listShop`,
GET_ODDS_TEMPLATE_LIST_EXEL: `${API_PATH}oddstemplate/listexcel`,
GET_ODDS_SHOP_TEMPLATE_LIST_EXEL: `${API_PATH}oddstemplate/listexcelShop`,
GET_STATS_TEMPLATE: `${API_PATH}statstemplate/list`,
GET_STATS_TEMPLATE_LIST_EXEL: `${API_PATH}statstemplate/listexcel`,
STATS_TEMPLATES_FILES: `${API_PATH}statstemplatefiles/list`,
DOWNLOAD_STATS_TEMPLATES_FILE: `${API_PATH}statstemplatefiles/download`,
UPLOAD_STATS_TEMPLATES_FILE: `${API_PATH}statstemplatefiles/upload`,
SAVE_NEW_ODDS_TEMPLATE: `${API_PATH}oddstemplate/new`,
CASHIERS_LIST: `${API_PATH}cashiers/list`,
SAVE_NEW_ODDS_SHOP_TEMPLATE: `${API_PATH}oddstemplate/newShop`,
SAVE_NEW_STATS_TEMPLATE: `${API_PATH}statstemplate/new`,
STATEMENT_LIST: `${API_PATH}statements/list`,
JACKPOT_WON: `${API_PATH}jackpot/won`,
JACKPOT_STATUS_CHANGE: `${API_PATH}jackpot/changeStatus`,
PAY_JACKPOT: `${API_PATH}jackpot/pay`,
JACKPOT_HISTORY: `${API_PATH}jackpot/status/history`,
JACKPOT_SETTINGS: `${API_PATH}jackpotsettings/get`,
EDIT_JACKPOT_SETTINGS: `${API_PATH}jackpotsettings/edit`,
INVALIDATE_ODDS_VIEW: `${API_PATH}settingsleagues/list-all`,
INVALIDATE_ODDS_MOBILE: `${API_PATH}settingsleagues/disable-fixture`,
INVALIDATE_ODDS_SHOP: `${API_PATH}settingsleagues/disable-fixture-shop`,
VOID_COUPON: `${API_PATH}coupons/voidCoupon`,
VOID_LOSING_COUPON: `${API_PATH}coupons/voidLosingCoupon`,
SET_COUPON_TO_WONTPAY: `${API_PATH}coupons/setCouponToWontPay`,
GET_FREE_BETS_CAMPAIGNS: `${API_PATH}shop-fb-campaigns`,
CREATE_FREEBET_CAMPAIGN: `${API_PATH}shop-fb-campaigns/add`,
SHOP_FREE_BET_CAMPAIGNS_ASSIGNATION_TOGGLE: `${API_PATH}shop-fb-campaigns/suspend/assignation`,
SHOP_FREE_BET_CAMPAIGNS_USAGE_TOGGLE: `${API_PATH}shop-fb-campaigns/suspend/usage`,
SHOP_FREE_BET_CAMPAIGNS_UPCOMING_DELETE: `${API_PATH}shop-fb-campaigns/delete`,
SHOP_FREE_BET_CAMPAIGNS_RETRIEVE_DETAILS: `${API_PATH}shop-fb-campaigns/retrieveDetails`,
SHOP_FREE_BET_CAMPAIGNS_REPORTS: `${API_PATH}shop-fb-campaigns`,
SHOP_FREE_BET_CAMPAIGNS_ACTIVE_EDIT_END_DATE: `${API_PATH}shop-fb-campaigns/editEndDate`,
SHOP_FREE_BET_CAMPAIGNS_ACTIVE_EDIT_USERS: `${API_PATH}shop-fb-campaigns/editUsers`,
SHOP_FREE_BET_CAMPAIGNS_UPCOMING_EDIT: `${API_PATH}shop-fb-campaigns/edit`,
VIDEO_ACTION_LIST: `${API_PATH}videoAction/list`,
SAVE_VIDEO_ACTION: `${API_PATH}videoAction/edit`,
};
/**
* @constant
*/
const IMG_PATH = '/img/backoffice';
/**
* @param {string|null} cnt
* @returns {string}
*/
export const CNT_PATH = (cnt) => (process.env.NODE_ENV === 'development' ? IMG_PATH : cnt);
/**
* @constant
*/
export const SVG_ICONS = {
homeIcons: 'home-icons.svg',
pagination: 'pagination-arrow.svg',
utility: 'utility-icon.svg',
switchArrowIcons: 'switch-arrow.svg',
};
/**
* @constant
*/
export const MENU_ICONS = {
COUPONS: 'coupon',
ROUNDS: 'history',
REPORTS: 'news',
BONUS: 'hand',
SETTINGS: 'settings',
CASHIERS: 'cashier',
ADMIN: 'user',
JACKPOT: 'jackpot',
};
/**
* @constant
*/
export const BET_STATUS = {
VOID_REQUESTED: 3,
VOIDED: -3,
WON: 1,
LOST: -1,
CANCELLED: -2,
};
/**
* @constant
*/
export const BET_TYPES = {
1: 'Single',
2: 'Multiple',
3: 'Combination',
4: 'Split',
};
/**
* @constant
*/
export const BET_TYPES_VALUES = {
SINGLE: 'Single',
MULTIPLE: 'Multiple',
COMBINATION: 'Combi',
SPLIT: 'Split',
SYSTEM: 'System',
ROUND_SPECIAL: 'Round Specials',
};
/**
* @constant
*/
export const COUPONS_TYPE = {
PLACED: 1,
SETTLED: 2,
};
/**
* @constant
*/
export const ROUND_STATUS = {
SETTLEMENT_COMPLETED: 'Settlement ended',
};
/**
* @constant
*/
export const ROUND_STATUS_ID = {
IN_PROGRESS: 2,
SETTLEMENT_ENDED: 6,
SLOT_RESULT_GEN_INT_DB: 9,
};
/**
* @constant
*/
export const MODALS = {
USER_ADD: 'MODAL@@USER_ADD',
USER_CONFIRM: 'MODAL@@USER_CONFIRM',
USER_EDIT: 'MODAL@@USER_EDIT',
SUCCESS: 'MODAL@SUCCESS',
ERROR: 'Error',
SESSION_EXPIRED: 'Session Expired',
GENERAL_ERROR: 'Something went wrong!',
EXPORT_FAILED: 'Export failed. Try again.',
FREE_BETS_ADD: 'MODAL@@FREE_BETS_ADD',
FREE_BETS_DELETE: 'MODAL@@FREE_BETS_DELETE',
USER_PWD_CHANGE: 'MODAL@@USER_PWD_CHANGE',
USER_INFO_EDIT: 'MODAL@@USER_INFO_EDIT',
SAVE_BEFORE_NAVIGATION: 'MODAL@@SAVE_BEFORE_NAVIGATION',
JACKPOT_HISTORY: 'MODAL@@JACKPOT_HISTORY',
PROMPT_CONFIRMATION: 'MODAL@@PROMPT_CONFIRMATION',
CREATE_FB_CAMPAIGN: 'MODAL@@CREATE_FB_CAMPAIGN',
PROMPT_TOGGLE_ASSIGNATION: 'MODAL@@TOGGLE_ASSIGNATION',
PROMPT_TOGGLE_USAGE: 'MODAL@@TOGGLE_USAGE',
PROMPT_DELETE_CAMPAIGN: 'MODAL@@PROMPT_DELETE_CAMPAIGN',
SHOP_FB_CAMPAIGN_DETAILS: 'MODAL@@SHOP_FB_CAMPAIGN_DETAILS',
SHOP_FB_CAMPAIGN_REPORT: 'MODAL@@SHOP_FB_CAMPAIGN_REPORT',
SHOP_FB_END_DATE_EDIT_MODAL: 'MODAL@@SHOP_FB_END_DATE_EDIT_MODAL',
SHOP_FB_USERLIST_EDIT_MODAL: 'MODAL@@SHOP_FB_USERLIST_EDIT_MODAL',
SHOP_FB_CAMPAIGN_UPDATE: 'MODAL@@SHOP_FB_CAMPAIGN_UPDATE',
MARKET_SETTINGS_ALL_DISABLED_ERROR: 'Markets Settings Shop should have always at least one Market enabled',
};
/**
* @constant
*/
export const SUCCESS_MODALS = {
RESET_PASSWORD: 'Reset Password',
EDIT_ROLES: 'Edit roles',
EDIT_STATUS: 'Edit status',
EDIT_INFO: 'Edit User',
REMOVE_USER: 'Remove user',
REMOVE_ROLE: 'Remove role',
ADD_USER: 'Add user',
CANCEL_FREE_BET: 'Cancel free bet',
ADD_FREE_BET: 'Free bet added',
ADD_ROLE: 'Add role',
CHANGE_USER_PWD: 'Password change',
SAVE_GAMES_SETTTINGS: 'Games settings saved',
SAVE_MARKET_SETTTINGS: 'Market settings saved',
SAVE_ROUND_SPECIAL_SETTTINGS: 'Round Special settings saved',
SAVE_MARKET_SHOP_SETTTINGS: 'Market shop settings saved',
SAVE_MARKET_MARGINS_SETTTINGS: 'Market margins settings saved',
SAVE_LEAGUES_SETTTINGS: 'Leagues settings saved',
SAVE_BONUS_SETTTINGS: 'Bonus settings saved',
SAVE_RANK_SETTTINGS: 'Rank settings saved',
SAVE_POINT_SETTTINGS: 'Point settings saved',
SAVE_VIDEO_ACTION: 'Shop Video action saved',
UPLOAD_ODDS_TEMPLATES_FILE: 'file uploaded',
SAVE_NEW_ODDS_TEMPLATE: 'Odds applied successfully to all competitions',
SAVE_NEW_STATS_TEMPLATE: 'Stats applied successfully to all selected competitions',
UPDATED_JACKPOT_STATUS: 'Jackpot status successfully updated',
JACKPOT_PAID_SUCCESS: 'Jackpot payment requested successfully',
UPDATED_COUPONS_STATUS_SUCCESS: "The coupon has been set as Won't Pay",
JACKPOT_REFRESH_MSG: 'Please reload the page or come back later to see the updated status for the paid jackpot',
SAVE_JACKPOT_SETTTINGS: 'Jackpot settings saved',
INVALIDATE_ODDS: 'Odds are invalidated for ',
REQUEST_SUBMITTED: 'Your request has been submitted successfully!',
CREATE_FREEBET_CAMPAIGN_SUCCESS: 'Freebet campaign has been created successfully',
EDIT_FREEBET_CAMPAIGN_SUCCESS: 'Freebet campaign has been edited successfully',
ASSIGNATION_TOGGLE_SUCCESS: 'The Assignment for the campaign ',
USAGE_TOGGLE_SUCCESS: 'The Usage of Free Bets generated for the campaign ',
};
/**
* @constant
*/
export const ERRORS = {
SESSION_EXPIRED: 15102,
AUTH_REQUIRED: 15103,
};
/**
* @constant
*/
export const PERMISSIONS = {
ADMIN_USERS_VIEW: 100100,
ADMIN_USERS_ADD: 100101,
ADMIN_USERS_ROLES: 100102,
ADMIN_USERS_RESET_PASSWORD: 100103,
ADMIN_USERS_UPDATE: 100104,
ADMIN_USERS_ENABLE: 100105,
ADMIN_USERS_DELETE: 100106,
ADMIN_ROLES_VIEW: 100200,
ADMIN_ROLES_ADD: 100201,
ADMIN_ROLES_UPDATE: 100202,
ADMIN_ROLES_REMOVE: 100203,
ADMIN_ROLES_DISABLE_ENABLE: 100204,
ADMIN_ROLES_LIST_PERMISSION: 100205,
ADMIN_PERMISSIONS_VIEW: 100300,
COUPONS_PLACED_VIEW: 110100,
COUPONS_SETTLED_VIEW: 110200,
COUPONS_SETTLED_VOID_COUPON: 110201,
COUPONS_SETTLED_VOID_LOSING_COUPON: 110202,
COUPONS_SETTLED_SET_COUPON_TO_WONT_PAY: 110203,
SHOP_COUPONS_PLACED_VIEW: 110300,
SHOP_COUPONS_SETTLED_VIEW: 110400,
SHOP_TURNOVER_REPORT_VIEW: 150201,
ROUNDS_VIEW: 120100,
ROUNDS_TURBO_VIEW: 120200,
SHOP_ROUNDS_VIEW: 120300,
FREE_BETS_VIEW: 130100,
FREE_BETS_ASSIGN: 130101,
FREE_BETS_CANCEL: 130102,
CLIENT_BONUSES_VIEW: 130200,
CLIENT_RANKS_VIEW: 130300,
BONUS_SETTINGS_VIEW: 130400,
BONUS_SETTINGS_EDIT: 130401,
RANK_SETTINGS_VIEW: 130500,
RANK_SETTINGS_EDIT: 130501,
POINT_SETTINGS_VIEW: 130600,
POINT_SETTINGS_EDIT: 130601,
SETTINGS_LEAGUES_VIEW: 140200,
SETTINGS_LEAGUES_EDIT: 140201,
SETTINGS_MARKET_VIEW: 140300,
SETTINGS_MARKET_EDIT: 140301,
SETTINGS_ROUND_SPECIAL_EDIT: 140703,
GOAL_GALORE_SETTINGS_EDIT: 140705,
ROUND_REPORT_VIEW: 150100,
TURNOVER_REPORT_VIEW: 150200,
SHOP_ROUND_REPORT_VIEW: 150300,
GAMES_SETTINGS_VIEW: 140100,
GAMES_SETTINGS_EDIT: 140101,
SETTINGS_LEAGUES_DISABLE_FIXTURES: 140202,
SETTINGS_LEAGUES_DISABLE_SHOP_FIXTURES: 140203,
INVALIDATE_ODDS_VIEW: 140204,
SETTINGS_VIDEO_ACTION_VIEW: 200100,
SETTINGS_VIDEO_ACTION_EDIT: 200101,
ODDS_TEMPLATE_FILES_VIEW: 140400,
ODDS_TEMPLATE_FILES_UPLOAD: 140401,
ODDS_TEMPLATE_FILES_DOWNLOAD: 140402,
ODDS_TEMPLATE_VIEW: 140500,
EXCEL_FILES_VIEW: 140501,
SHOP_GAMES_SETTINGS_VIEW: 140600,
SHOP_GAMES_SETTINGS_EDIT: 140601,
SHOP_ODDS_TEMPLATE_VIEW: 140800,
SHOP_EXCEL_FILES_VIEW: 140801,
SHOP_APPLY_NEW_ODDS_TEMPLATE: 140802,
SHOP_SETTINGS_MARKET_VIEW: 140700,
SHOP_SETTINGS_MARKET_EDIT: 140701,
SETTINGS_MARKET_MARGIN_VIEW: 140302,
SETTINGS_MARKET_MARGIN_CREATE: 140303,
ROUND_SPECIAL_MARKET_MARGIN_VIEW: 140304,
ROUND_SPECIAL_MARKET_MARGIN_CREATE: 140305,
GOAL_GALORE_MARGIN_VIEW: 140306,
GOAL_GALORE_MARGIN_CREATE: 140307,
STATEMENTS_VIEW: 160200,
CASHIERS_VIEW: 160100,
JACKPOT_WON_VIEW: 170100,
JACKPOT_STATUS_EDIT: 170101,
JACKPOT_PAYMENT_INVOKER: 170102,
JACKPOT_SETTINGS_VIEW: 170200,
FREE_BETS_CAMPAIGNS_VIEW: 180100,
CREATE_FREEBET_CAMPAIGN: 180101,
SHOP_FREE_BET_CAMPAIGNS_UPCOMING_EDIT: 180102,
SHOP_FREE_BET_CAMPAIGNS_UPCOMING_DELETE: 180104,
SHOP_FREE_BET_CAMPAIGNS_USAGE_TOGGLE: 180105,
SHOP_FREE_BET_CAMPAIGNS_ASSIGNATION_TOGGLE: 180106,
SHOP_FREE_BET_CAMPAIGNS_ACTIVE_EDIT_USERS: 180107,
SHOP_FREE_BET_CAMPAIGNS_ACTIVE_EDIT_END_DATE: 180108,
SHOP_FREE_BET_CAMPAIGNS_RETRIEVE_DETAILS: 180109,
SHOP_FREE_BET_CAMPAIGNS_REPORTS: 180110,
STATS_TEMPLATE_VIEW: 190100,
APPLY_NEW_STATS_TEMPLATE: 190105,
STATS_EXCEL_FILES_VIEW: 190104,
STATS_TEMPLATE_FILES_VIEW: 190101,
STATS_TEMPLATE_FILES_UPLOAD: 190102,
STATS_TEMPLATE_FILES_DOWNLOAD: 190103,
EXPORT_COUPONS: 110204,
ROUND_DURATION_SETTINGS_VIEW: 140102,
ROUND_DURATION_SETTINGS_EDIT: 140103,
};
/**
* @constant
*/
export const ROLE_STATUS = {
DISABLED: 'DISABLED',
ENABLED: 'ENABLED',
};
/**
* @constant
*/
export const CONFIRM_MODAL_CONTENT = {
REMOVE_ROLE: {
title: 'Are you sure you want to remove the selected role?',
heading: 'Remove role?',
},
DELETE_FREE_BET: {
additionalMessages: [],
title: 'Are you sure you want to cancel the selected free bet?',
heading: 'Cancel Free Bet?',
},
SAVE_CHANGES: {
heading: 'Confirm Change',
subHeading: 'Do you want to save the changes made ?',
additionalMessages: ["Your changes will be lost if you don't save them."],
},
};
/**
* @constant DIGITS
*/
export const DIGITS = [
'Singles',
'Doubles',
'Trebles',
'Four',
'Five',
'Six',
'Seven',
'Eight',
'Nine',
'Ten',
'Eleven',
'Twelve',
];
export const VALIDATION_RULES = {
MANDATORY: 'mandatory',
EQUAL: 'equal',
REG_EXP: 'regExp',
NOT_LESS_THAN: 'notlessThan',
LESS_THAN: 'lessThan',
GREATER_THAN: 'greaterThan',
BETWEEN: 'between',
BETWEEN_X_AND_Y: 'betweenXAndY',
GREATER_THAN_MIN: 'greaterThanMin',
NOT_EMPTY_ARRAY: 'notEmptyArray',
CUSTOM: 'custom',
MANDATORY_NEW: 'mandatory-new',
};
const MultipleBoostMobile = [];
for (let i = 0; i < 20; i += 1) {
MultipleBoostMobile.push({
name: `Percentage [${i + 1}]`,
code: `${i}`,
info: 'Multiple boost percentage',
validationRules: [VALIDATION_RULES.NOT_LESS_THAN],
minValue: 0,
comparatorValue: 0,
comparatorMaxValue: 100,
getValue: (val) => val,
isBoostPercentage: true,
});
}
/**
* @constant
*/
const desc30 = '(Minimum 30 seconds)';
const desc120 = '(Minimum 120 seconds)';
export const GAMES_SETTINGS_FIELDS = {
TimeSettings: [
{
name: 'Round Duration',
code: 'roundInterval',
info: 'Duration of the round in seconds.',
desc: desc30,
validationRules: [VALIDATION_RULES.NOT_LESS_THAN],
comparatorValue: 30,
getValue: (val) => val,
},
{
name: 'Turbo Round Duration',
code: 'turboRoundInterval',
info: 'Duration of the round in seconds for Turbo.',
desc: desc30,
validationRules: [VALIDATION_RULES.NOT_LESS_THAN],
comparatorValue: 30,
getValue: (val) => val,
},
{
name: 'Stop Place Bet Duration',
code: 'noPlaceBetInterval',
info: 'Interval at the end of the round when the user is not allowed to place bets, in seconds.',
desc: '(Minimum 5 Seconds)',
validationRules: [VALIDATION_RULES.NOT_LESS_THAN],
comparatorValue: 5,
getValue: (val) => val,
},
{
name: 'Match Simulation Duration',
code: 'matchLength',
info: 'Match simulation duration, in seconds.',
desc: '(Minimum 15 Seconds and maximum 20 Seconds less than round duration)',
validationRules: [VALIDATION_RULES.BETWEEN],
minValue: 15,
comparatorMinValue: 20,
comparatorMaxValue: 20,
getValue: (val) => val,
},
{
name: 'Turbo Match Simulation Duration',
code: 'turboMatchLength',
info: 'Match simulation duration, in seconds',
desc: '(Minimum 6 seconds)',
validationRules: [VALIDATION_RULES.NOT_LESS_THAN],
comparatorValue: 6,
getValue: (val) => val,
},
],
CashoutSettings: [
{
name: 'Cashout Round Duration',
code: 'cashoutRoundInterval',
info: 'Duration of the round in seconds for Cashout game mode.',
desc: '(Minimum 90 seconds)',
validationRules: [VALIDATION_RULES.NOT_LESS_THAN],
comparatorValue: 90,
getValue: (val) => val,
},
{
name: 'Cashout Stop Placebet Duration',
code: 'cashoutNoPlaceBetInterval',
info: 'Interval at the end of the round for Cashout game mode, when the user is not allowed to place bets, in seconds.',
desc: '(Minimum 5 Seconds)',
validationRules: [VALIDATION_RULES.NOT_LESS_THAN],
comparatorValue: 5,
getValue: (val) => val,
},
{
name: 'No Of Slots',
code: 'cashoutNumberOfSlots',
info: 'Number of slots to be used during the live simulation for Cashout game mode.',
isSelectField: true,
disabled: true,
codeSelectField: 'cashoutNumberOfSlotsList',
getValue: (val) => val,
},
{
name: 'Slots Duration',
code: 'cashoutSlotDuration',
info: 'Duration of each slot in seconds, used to divide the timing during the live simulation for Cashout game mode.',
desc: '(Minimum 5 Seconds, Maximum 10 Seconds)',
validationRules: [VALIDATION_RULES.BETWEEN_X_AND_Y],
minValue: 5,
comparatorMaxValue: 10,
getValue: (val) => val,
},
{
name: 'Slot stop cashout duration',
code: 'cashoutSlotNoCashoutInterval',
info: 'Interval before the end of the slot, when the user cannot request cashout (in seconds)',
desc: '(Minimum 1 Second, Maximum 3 Seconds)',
validationRules: [VALIDATION_RULES.BETWEEN_X_AND_Y],
minValue: 1,
comparatorMaxValue: 3,
getValue: (val) => val,
},
{
name: 'Cashout Multiplier',
code: 'cashoutMultiplier',
info: 'Multiplier applied to the odds ratio to define the Cashout value.',
desc: '(Between 0 And 1)',
validationRules: [VALIDATION_RULES.BETWEEN_X_AND_Y],
minValue: 0,
decimal: true,
comparatorMaxValue: 1,
getValue: (val) => parseDecimal(parseInt(val.replace(/[,.]/g, '')), 100),
},
],
AmtLimitSettings: [
{
name: 'Minimum Stake',
code: 'couponMinStake',
info: 'Minimum coupon total stake.',
desc: '(Minimum 1 %s)',
validationRules: [VALIDATION_RULES.NOT_LESS_THAN],
comparatorValue: 1,
currency: true,
getValue: (val) => parseInt(val.replace(/[,.]/g, '')),
},
{
name: 'Maximum Stake',
code: 'couponMaxStake',
info: 'Maximun coupon total stake.',
desc: '(Not Less Than The Minimum)',
validationRules: [VALIDATION_RULES.NOT_LESS_THAN],
currency: true,
getValue: (val) => parseInt(val.replace(/[,.]/g, '')),
},
{
name: 'Maximum Win',
code: 'winCap',
info: 'The maximum win the user can achieve in one coupon.',
desc: '',
validationRules: [VALIDATION_RULES.GREATER_THAN],
comparatorValue: 0,
currency: true,
getValue: (val) => parseInt(val.replace(/[,.]/g, '')),
},
{
name: 'Minimum Stake Per Combination',
code: 'couponMinStakePerSelection',
info: 'Minimum Stake per Combination',
desc: '(Minimum 1 %s)',
validationRules: [VALIDATION_RULES.MANDATORY],
currency: true,
getValue: (val) => parseInt(val.replace(/[,.]/g, '')),
},
],
BonusSettings: [
{
name: 'Minimum Odds For Multiple Boost Bonus',
code: 'multipleBonusThreshold',
info: 'Minimum odds for an event in order to be considered for multiple boost bonus.',
desc: '(Minimum 1.00)',
validationRules: [VALIDATION_RULES.NOT_LESS_THAN],
comparatorValue: 1,
float: true,
getValue: (val) => parseInt(val.replace(/[,.]/g, '')),
},
],
multipleBonusPercentages: MultipleBoostMobile,
};
const MultipleBoostShop = [];
for (let i = 0; i < 20; i += 1) {
MultipleBoostShop.push({
name: `Percentage [${i + 1}]`,
code: `${i}`,
info: 'Multiple boost percentage',
validationRules: [VALIDATION_RULES.NOT_LESS_THAN],
minValue: 0,
comparatorValue: 0,
comparatorMaxValue: 100,
getValue: (val) => val,
isBoostPercentage: true,
});
}
export const SUPERVISOR_CONFIG_CODE = 'noBetTimeSupervisor';
/**
* @constant
*/
export const GAMES_SETTINGS_SHOP_FIELDS = {
TimeSettings: [
{
name: 'Round Duration',
code: 'roundInterval',
info: 'Duration of the round in seconds.',
desc: desc120,
validationRules: [VALIDATION_RULES.NOT_LESS_THAN],
comparatorValue: 120,
getValue: (val) => val,
},
{
name: 'Stop Place Bet Duration',
code: 'noPlaceBetInterval',
info: 'Interval at the end of the round when the user is not allowed to place bets, in seconds.',
desc: '(Minimum 3 Seconds)',
validationRules: [VALIDATION_RULES.NOT_LESS_THAN],
comparatorValue: 3,
getValue: (val) => val,
},
{
name: 'Match Simulation Duration',
code: 'matchLength',
info: 'Match simulation duration, in seconds.',
desc: '(Minimum 15 Seconds and maximum 20 Seconds less than round duration)',
validationRules: [VALIDATION_RULES.BETWEEN],
minValue: 15,
comparatorMinValue: 20,
comparatorMaxValue: 20,
getValue: (val) => val,
},
],
RoundShift: [
{
name: 'Premier',
code: 'Premier',
info: 'Round Shift for Premier',
desc: '(Less than Round Interval)',
validationRules: [VALIDATION_RULES.LESS_THAN, VALIDATION_RULES.GREATER_THAN_MIN],
minValue: 0,
getValue: (val) => val,
roundShift: true,
},
{
name: 'Liga',
code: 'Liga',
info: 'Round Shift for Liga',
desc: '(Less than Round Interval)',
validationRules: [VALIDATION_RULES.LESS_THAN, VALIDATION_RULES.GREATER_THAN_MIN],
minValue: 0,
getValue: (val) => val,
roundShift: true,
},
{
name: 'Bundesliga',
code: 'Bundesliga',
info: 'Round Shift for Bundesliga',
desc: '(Less than Round Interval)',
validationRules: [VALIDATION_RULES.LESS_THAN, VALIDATION_RULES.GREATER_THAN_MIN],
minValue: 0,
getValue: (val) => val,
roundShift: true,
},
{
name: 'Serie A',
code: 'Serie A',
info: 'Round Shift for Serie A',
desc: '(Less than Round Interval)',
validationRules: [VALIDATION_RULES.LESS_THAN, VALIDATION_RULES.GREATER_THAN_MIN],
minValue: 0,
getValue: (val) => val,
roundShift: true,
},
{
name: 'Ligue 1',
code: 'Ligue 1',
info: 'Round Shift for Ligue1',
desc: '(Less than Round Interval)',
validationRules: [VALIDATION_RULES.LESS_THAN, VALIDATION_RULES.GREATER_THAN_MIN],
minValue: 0,
getValue: (val) => val,
roundShift: true,
},
{
name: 'Primeira',
code: 'Primeira',
info: 'Round Shift for Primeira',
desc: '(Less than Round Interval)',
validationRules: [VALIDATION_RULES.LESS_THAN, VALIDATION_RULES.GREATER_THAN_MIN],
minValue: 0,
getValue: (val) => val,
roundShift: true,
},
],
AmtLimitSettings: [
{
name: 'Minimum Stake',
code: 'couponMinStake',
info: 'Minimum coupon total stake.',
desc: '(Minimum 1 %s)',
validationRules: [VALIDATION_RULES.NOT_LESS_THAN],
comparatorValue: 1,
currency: true,
getValue: (val) => parseInt(val.replace(/[,.]/g, '')),
},
{
name: 'Maximum Stake',
code: 'couponMaxStake',
info: 'Maximun coupon total stake.',
desc: '(Not Less Than The Minimum)',
validationRules: [VALIDATION_RULES.NOT_LESS_THAN],
currency: true,
getValue: (val) => parseInt(val.replace(/[,.]/g, '')),
},
{
name: 'Maximum Win',
code: 'winCap',
info: 'The maximum win the user can achieve in one coupon.',
desc: '',
validationRules: [VALIDATION_RULES.GREATER_THAN],
comparatorValue: 0,
currency: true,
getValue: (val) => parseInt(val.replace(/[,.]/g, '')),
},
{
name: 'Minimum Stake Per Combination',
code: 'couponMinStakePerSelection',
info: 'Minimum Stake per Combination',
desc: '(Minimum 1 %s)',
validationRules: [VALIDATION_RULES.MANDATORY],
currency: true,
getValue: (val) => parseInt(val.replace(/[,.]/g, '')),
},
],
BonusSettings: [
{
name: 'Minimum Odds For Multiple Boost Bonus',
code: 'multipleBonusThreshold',
info: 'Minimum odds for an event in order to be considered for multiple boost bonus.',
desc: '(Minimum 1.00)',
validationRules: [VALIDATION_RULES.NOT_LESS_THAN],
comparatorValue: 1,
float: true,
getValue: (val) => parseInt(val.replace(/[,.]/g, '')),
},
],
multipleBonusPercentages: MultipleBoostShop,
sscConfig: [
{
name: 'Post-Book Logout Time',
code: 'postBookLogoutTime',
info: 'Duration of time in seconds a user is allowed to book before the user is logged out.',
desc: '(Minimum 1)',
validationRules: [VALIDATION_RULES.GREATER_THAN],
comparatorValue: 1,
getValue: (val) => val,
},
{
name: 'Idle Time Allowed',
code: 'idleTimeAllowed',
info: 'Duration of idle time allowed in seconds before the user is logged out.',
desc: '(Minimum 30 seconds, Maximum 180 seconds, Should be greater than Post-Book Logout Time)',
validationRules: [VALIDATION_RULES.BETWEEN, VALIDATION_RULES.CUSTOM],
minValue: 30,
comparatorMaxValue: 180,
getValue: (val) => val,
customValidation: (val, formValues) => {
const postBookLogoutTime = formValues.postBookLogoutTime;
return parseInt(val, 10) > parseInt(postBookLogoutTime, 10);
},
customErrorMessage: 'Idle Time Allowed should be greater than Post-Book Logout Time',
},
{
name: 'Supervisor No Bet Time',
code: SUPERVISOR_CONFIG_CODE,
info: 'Number of seconds remaining when user in no longer allowed to place bets (in supervisor).',
desc: '(Should be greater or equal to No Placebet Interval)',
validationRules: [],
getValue: (val) => val,
},
{
name: 'SSC No Bet Time',
code: 'noBetTime',
info: 'Number of seconds remaining when user in no longer allowed to place bets.',
desc: '(Should be greater than Supervisor No Bet Time)',
validationRules: [VALIDATION_RULES.CUSTOM],
getValue: (val) => val,
customValidation: (val, formValues) => {
const supervisorNoBetTime = formValues.noBetTimeSupervisor;
return parseInt(val, 10) > parseInt(supervisorNoBetTime, 10);
},
customErrorMessage: 'SSC No Bet Time should be greater than Supervisor No Bet Time',
},
{
name: 'SSC Prepaid No Bet Time',
code: 'prepaidNoBetTime',
info: 'Number of seconds remaining when user in no longer allowed to place bets (prepaid).',
desc: '(Should be greater or equal to No Placebet Interval (3))',
validationRules: [VALIDATION_RULES.CUSTOM],
getValue: (val) => val,
customValidation: (val, formValues) => {
const noPlaceBetInterval = formValues.noPlaceBetInterval;
return parseInt(val, 10) >= parseInt(noPlaceBetInterval, 10);
},
customErrorMessage: 'SSC Prepaid No Bet Time should be greater than or equal to No Placebet Interval.',
},
{
name: 'Max Bets Per Booking',
code: 'maxBetsPerBooking',
info: 'Maximum bets that can be placed per booking.',
desc: '(Minimum 1, Maximum 10 bets)',
validationRules: [VALIDATION_RULES.BETWEEN],
minValue: 1,
comparatorMaxValue: 10,
getValue: (val) => val,
},
],
};
/**
* @constant
*/
export const GAME_SETTINGS_SHOP_LEAGUES = ['Premier', 'Liga', 'Bundesliga', 'Serie A', 'Ligue 1', 'Primeira'];
/**
* @constant - Maps league names to their backend data position for round shifts
* backend strings like "160-80-0-170-0-0-0"
*/
export const LEAGUE_POSITION_MAP = {
Premier: 0,
Liga: 1,
Bundesliga: 2,
'Serie A': 3,
'Ligue 1': 4,
Primeira: 5,
};
/**
* @constant - Defines which leagues should have enabled round shift inputs
*/
export const ENABLED_ROUND_SHIFT_LEAGUES_MATCH_DURATION = ['Premier', 'Liga', 'Serie A'];
/**
* @constant
*/
export const ODDS_TEMPLATES_FILES_TXT = {
inputLabel: 'No file selected',
validExtention: 'xlsx',
inputErrorMgs: 'Invalid file format - please upload an Excel file',
};
/**
* @constant
*/
export const STATS_TEMPLATES_FILES_TXT = {
inputLabel: 'No file selected',
validExtention: 'xlsx',
inputErrorMgs: 'Invalid file format - please upload an Excel file',
};
/**
* @constant
*/
export const STATUS_CODE_ERROR_MESSAGE = {
completelyFailed: 'Operation failed for all competitions.',
partlyFailed: 'Odds successfully apply to some competition(s) only',
};
/**
* @constant
*/
export const EDIT_USER_MODAL_MESSAGE = {
sameUser: 'By confirming this change your session will be terminated and you will have to login again.',
differentUser: 'By confirming this change the session of the user will be terminated.',
};
/**
* @constant
*/
export const GAME_STATUS = {
1: 'Classic',
2: 'Turbo',
5: 'Cashout',
TURBO: '2',
};
export const GAME_STATUS_SORT_MAPPING = {
CLASSIC: 1,
TURBO: 2,
CASHOUT: 5,
};
/**
* @constant
*/
export const ROUND_TYPE = {
CLASSIC: '1',
TURBO: '2',
};
/**
* @constant
*/
export const COUNTRIES = {
NG: 'NG',
};
/**
* @constant
*/
export const DEFAULT_TIMEZONE = 'Africa/Lagos';
/**
* @constant
*/
export const COUNTRY_TIMEZONE = {
nigeria: DEFAULT_TIMEZONE,
mamabet: 'Africa/Kinshasa',
};
export const COUNTRY_TIMEZONE_ID = {
nigeria: 2,
mamabet: 5,
};
/**
* @constant
*/
export const COUNTRY_TIMEZONES = [
{ id: 1, name: 'UTC', label: 'UTC' },
{ id: 2, name: DEFAULT_TIMEZONE, label: DEFAULT_TIMEZONE },
{ id: 3, name: 'Europe/Rome', label: 'Europe/Rome' },
{ id: 4, name: 'America/Bogota', label: 'Colombia/Bogotá' },
{ id: 5, name: 'Africa/Kinshasa', label: 'Africa/Kinshasa' },
{ id: 6, name: 'Africa/Lubumbashi', label: 'Africa/Lubumbashi' },
];
/**
* @constant
*/
export const LOCAL_STORAGE_KEYS = {
SELECTED_TIMEZONE: 'selectedTimezone',
};
/**
* @constant
*/
export const COUPON_PAGES = {
PLACED_COUPON_MOBILE: 'PLACED_COUPON_MOBILE',
PLACED_COUPON_SHOP: 'PLACED_COUPON_SHOP',
SETTLED_COUPON_MOBILE: 'SETTLED_COUPON_MOBILE',
SETTLED_COUPON_SHOP: 'SETTLED_COUPON_SHOP',
};
export const TURNOVER_TABLE_DETAILS = {
MOBILE: {
GAME_STATUS: ['classic', 'turbo', 'cashout', 'voided', 'total', 'loyaltyBonus', 'grandTotalMobile'],
},
SHOP: {
GAME_STATUS: ['shopPremier', 'shopLiga', 'shopSeriea', 'totalShop', 'jackpot', 'grandTotalShop'],
},
TOTAL: {
GAME_STATUS: ['grandTotal'],
},
CASHOUT: {
GAME_STATUS: ['cashoutCashedOut'],
},
STATUS_KEYS: {
classic: 'Classic',
turbo: 'Turbo',
total: 'Total',
totalShop: 'Total',
shopPremier: 'Premier',
shopLiga: 'Liga',
grandTotalShop: 'Shop Total',
grandTotal: 'Totals',
jackpot: 'Jackpot',
loyaltyBonus: 'Loyalty Bonus',
grandTotalMobile: 'Mobile Total',
voided: 'Voided Coupons*',
shopSeriea: 'Serie A',
cashout: 'Cashout',
cashoutCashedOut: 'Total',
},
};
export const BOLDED_STATUS = ['total', 'Mobile Total', 'Shop Total', 'Totals'];
export const JACKPOT_TEXTS = {
TITLE_STAKE_PERCENTAGE: 'Jackpots Stake Accumulation Percentages',
INFO_STAKE_PERCENTAGE:
"The percentage of the coupons' stake sets aside to increase the jackpots' amounts. You can specify different percentages for each combination group (singles, doubles, trebles, etc). Values must be between 0 and 100.",
TITLE_ASSIGNMENT_MULTIPLIERS: 'Jackpots Assignment Multipliers',
INFO_ASSIGNMENT_MULTIPLIERS:
'Multipliers to increase the likelihood of a jackpot assignation during a draw for the given combination group (singles, doubles, trebles). It is used to achieve different winning probabilities for different combination groups.',
ACCUMULATION_TITLE: 'Accumulation Enabled',
ACCUMULATION_INFO:
'Globally enable or disable jackpot accumulation. If disabled, the newly placed coupons will not be considered anymore for the jackpots, and the jackpot values will not increase anymore.',
JACKPOT_ASSIGNATION: 'Jackpot Assignation Enabled',
JACKPOT_ASSIGNATION_INFO:
'Globally enable or disable jackpot assignation. If disabled, jackpot draws will not be performed anymore.',
PERCENTAGE_CONSIDERED: 'Percentage Of Coupons Considered For Accumulation',
PERCENTAGE_CONSIDERED_INFO:
'The percentage of coupons processed for the jackpot increases. If set to 100% all the coupons will be considered for jackpot accumulation. It can be set to a lower value for performance reasons, to avoid to process every incoming coupon. If set to a lower value only a sample of the coupons will be processed, and the jackpot amount will be increased according to the sample size. Values must be between 0.1 and 100.',
AUTOMATIC_PAYMENT_TITLE: 'Automatic Payment Threshold',
AUTOMATIC_PAYMENT_INFO:
'Defines the won amount limit after which a jackpot must be manually approved. If a jackpot has a won amount below the threshold it will be paid automatically, otherwise it will require to be approved and pay in the Jackpots Won screen.',
ENABLED_INFO:
'Enable or disable a jackpot. If the jackpot is disabled it will not appear in the TV application, it will not be assigned anymore and it will not receive further increases.',
PRIORITY_INFO:
'When assigning a jackpot in a round, the priority defined in this column is followed. Draws for jackpots with higher priority are performed first. Two jackpots cannot have the same priority.',
STARTING_AMOUNT_INFO: 'The starting amount of a new Jackpot. Max amount is 10000 %s',
STAKE_ACCUMULATON_PERCENTAGE_INFO:
'The portion of the stake set aside for jackpots accumulation is splitted among the jackpots according to these percentages. The sum of the percentages must be 100.',
ASSIGNMENT_PROBABLITITY_INFO: 'The probability that a coupon wins the jackpot. Must be between 0 and 1.',
MIN_COUPONS_INFO:
'The minimum number of placed coupons in a round required to perform the jackpot draw for the given round. If the number of placed coupons in a round is below this value, the jackpot draw will not be performed.',
};
export const JACKPOT_STATUS = {
1: 'Approval pending',
2: 'Approved',
3: 'Not approved',
4: 'Payment requested',
5: 'Paid',
};
export const JACKPOT_STATUS_MAPPED = {
APPROVED: 2,
PAYMENT_REQUESTED: 4,
PAID: 5,
PAYMENT_ERROR: -1,
PAID_MANUALLY: 6,
};
export const GAME_TYPES = {
3: 'Premier',
4: 'Liga',
6: 'Serie A',
};
export const GAME_TYPES_SORT_MAPPING = {
PREMIER: 3,
LIGA: 4,
SERIA_A: 6,
};
export const JACKPOT_POSITION = {
1: 'jackpotsSettingsPearl',
2: 'jackpotsSettingsDiamond',
jackpotsSettingsPearl: 0,
jackpotsSettingsDiamond: 1,
};
const JackpotStakeAccumulation = [];
for (let i = 0; i < 15; i += 1) {
JackpotStakeAccumulation.push({
name: `Stake [${i + 1}]`,
code: `${i + 1}`,
info: 'Stake accumulation percentage',
validationRules: [VALIDATION_RULES.BETWEEN],
minValue: 0,
comparatorMaxValue: 100,
getValue: (val) => val,
isNested: true,
});
}
const JackpotMultipliers = [];
for (let i = 0; i < 15; i += 1) {
JackpotMultipliers.push({
name: `Multiplier [${i + 1}]`,
code: `${i + 1}`,
info: 'Jackpot assignment multipliers',
validationRules: [VALIDATION_RULES.NOT_LESS_THAN],
minValue: 0,
comparatorValue: 0,
comparatorMaxValue: 100,
getValue: (val) => val,
isNested: true,
});
}
export const MARKETS_MARGINS_SETTINGS = {
marketsMarginsSettings: [
{
name: 'Margins',
code: 'flatMargin',
info: 'Margins',
validationRules: [VALIDATION_RULES.MANDATORY, VALIDATION_RULES.BETWEEN_X_AND_Y, VALIDATION_RULES.GREATER_THAN],
comparatorValue: 1,
minValue: 1,
comparatorMaxValue: 2,
getValue: (val) => val,
},
],
LOWER_MARGIN: 1,
UPPER_MARGIN: 2,
};
export const JACKPOT_SETTINGS_FIELDS = {
stakeAccumulation: JackpotStakeAccumulation,
jackpotAssignment: JackpotMultipliers,
percentageCouponsForAccumulation: [
{
name: 'Percentage',
code: '0',
info: 'Percentage coupon for accumulation',
validationRules: [VALIDATION_RULES.BETWEEN, VALIDATION_RULES.MANDATORY],
minValue: 0.1,
comparatorMaxValue: 100,
getValue: (val) => val,
},
],
thresholdJackpotPayment: [
{
name: 'Threshold',
code: '0',
info: 'Automatic payment threshold',
validationRules: [VALIDATION_RULES.NOT_LESS_THAN, VALIDATION_RULES.MANDATORY],
comparatorValue: 0,
getValue: (val) => val,
},
],
jackpotsSettingsPearl: [
{
name: 'Priority',
code: 'priorityOfAssignment',
info: 'Priority Of Assignment',
validationRules: [VALIDATION_RULES.MANDATORY, VALIDATION_RULES.GREATER_THAN],
comparatorValue: 0,
getValue: (val) => val,
isGlobalNested: true,
},
{
name: 'StartingAmount',
code: 'startingAmount',
info: 'Starting Amount',
validationRules: [VALIDATION_RULES.BETWEEN],
minValue: 0,
comparatorMaxValue: 10000,
getValue: (val) => val,
isGlobalNested: true,
},
{
name: 'Percentage',
code: 'stakeAccumulationPercentage',
info: 'Stake Accumulation Percentage',
validationRules: [VALIDATION_RULES.BETWEEN],
minValue: 0,
comparatorMaxValue: 100,
getValue: (val) => val,
isGlobalNested: true,
},
{
name: 'Probablility',
code: 'probabilityOfAssignment',
info: 'Assignment Probability',
validationRules: [VALIDATION_RULES.BETWEEN],
minValue: 0,
comparatorMaxValue: 1,
getValue: (val) => val,
isGlobalNested: true,
},
{
name: 'Number of coupons',
code: 'minimumCouponsForAssignment',
info: 'Min Number of Coupons',
validationRules: [VALIDATION_RULES.MANDATORY, VALIDATION_RULES.NOT_LESS_THAN],
comparatorValue: 0,
getValue: (val) => val,
isGlobalNested: true,
},
],
jackpotsSettingsDiamond: [
{
name: 'Priority',
code: 'priorityOfAssignment',
info: 'Priority Of Assignment',
validationRules: [VALIDATION_RULES.MANDATORY, VALIDATION_RULES.GREATER_THAN],
comparatorValue: 0,
getValue: (val) => val,
isGlobalNested: true,
},
{
name: 'StartingAmount',
code: 'startingAmount',
info: 'Starting Amount',
validationRules: [VALIDATION_RULES.BETWEEN],
minValue: 0,
comparatorMaxValue: 10000,
getValue: (val) => val,
isGlobalNested: true,
},
{
name: 'Percentage',
code: 'stakeAccumulationPercentage',
info: 'Stake Accumulation Percentage',
validationRules: [VALIDATION_RULES.BETWEEN],
minValue: 0,
comparatorMaxValue: 100,
getValue: (val) => val,
isGlobalNested: true,
},
{
name: 'Probablility',
code: 'probabilityOfAssignment',
info: 'Assignment Probability',
validationRules: [VALIDATION_RULES.BETWEEN],
minValue: 0,
comparatorMaxValue: 1,
getValue: (val) => val,
isGlobalNested: true,
},
{
name: 'Number of coupons',
code: 'minimumCouponsForAssignment',
info: 'Min Number of Coupons',
validationRules: [VALIDATION_RULES.MANDATORY, VALIDATION_RULES.NOT_LESS_THAN],
comparatorValue: 0,
getValue: (val) => val,
isGlobalNested: true,
},
],
};
export const SETTLED_COUPON_PAID_STATUS = {
0: 'Not Paid',
1: 'Paid',
2: "Won't Pay",
'-1': 'Payment Error',
PAYMENT_ERROR: -1,
WONT_PAY: 2,
};
export const INVALIDATE_ODDS_GAME_ID = {
MOBILE: 5,
};
export const NOTIFICATIONS = {
TYPES: {
VOID_COUPON: 'VOID_COUPON',
},
STATUS: {
COMPLETED: 'COMPLETED',
},
};
export const CAMPAIGN_ALL_USERS_ID = 1;
export const MENU_OPTIONS = {
RE_ENABLE: 'Re-enable',
SUSPEND: 'Suspend',
};
export const VIDEO_ACTION_STATUS = {
1: 'Active',
'-1': 'Disabled',
};
export const FREE_BET_BASE_PROB_ASSIGN = {
NB_MAX_DECIMALS_FE: 3,
NB_MAX_DECIMALS_BE: 5,
};
export const MARKET_SHOP_SETTINGS_TYPES = {
NORMAL_MARKET_SETTING: 'NORMAL_MARKET_SETTING',
ROUND_SPECIAL_SETTING: 'ROUND_SPECIAL_SETTING',
GOAL_GALORE_SETTING: 'GOAL_GALORE_SETTING',
};
export const MARKETS_ROUND_SPECIAL_IDS = {
GOALS: 10001,
DRAWS: 10003,
};
export const EXTRA_BETS_MARKET_IDS = {
ICE: 100001,
FIRE: 100002,
MEGADRAW: 100003,
};