tg-core-components 6.3.5 → 6.3.7-0
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/es/components/List/index.js +1 -0
- package/es/widgets/BonusWidget/index.js +6 -15
- package/es/widgets/HistoryWidget/index.js +6 -1
- package/lib/components/List/index.js +1 -0
- package/lib/widgets/BonusWidget/index.js +6 -15
- package/lib/widgets/HistoryWidget/index.js +6 -1
- package/package.json +1 -1
|
@@ -46,22 +46,13 @@ var BonusAction = function BonusAction(_ref) {
|
|
|
46
46
|
return React.createElement(
|
|
47
47
|
'div',
|
|
48
48
|
{ className: 'actions' },
|
|
49
|
-
console.log(bonus.Identifier),
|
|
50
|
-
console.log(bonus.Identifier, bonus),
|
|
51
|
-
console.log(bonus.Identifier, ALEACC_BONUS_CLAIM_STATE.includes(bonus.State)),
|
|
52
|
-
console.log('condition: ', bonus.Identifier, ALEACC_BONUS_CLAIM_STATE.includes(bonus.State) || bonus.Type === 'Deposit'),
|
|
53
49
|
(ALEACC_BONUS_CLAIM_STATE.includes(bonus.State) || bonus.Type === 'Deposit') && React.createElement(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
className: 'button primary small',
|
|
61
|
-
onClick: claimBonus,
|
|
62
|
-
isLoading: isLoadingClaim },
|
|
63
|
-
React.createElement(Translate, { id: 'action.bonus.claim', defaultMessage: 'Claim' })
|
|
64
|
-
)
|
|
50
|
+
Button,
|
|
51
|
+
{
|
|
52
|
+
className: 'button primary small',
|
|
53
|
+
onClick: claimBonus,
|
|
54
|
+
isLoading: isLoadingClaim },
|
|
55
|
+
React.createElement(Translate, { id: 'action.bonus.claim', defaultMessage: 'Claim' })
|
|
65
56
|
),
|
|
66
57
|
ALEACC_BONUS_REJECT_STATE.includes(bonus.State) && React.createElement(
|
|
67
58
|
Button,
|
|
@@ -48,6 +48,9 @@ var HistoryWidgetList = function (_React$Component) {
|
|
|
48
48
|
}, _this.createListInfo = function (item, product, isLoading) {
|
|
49
49
|
if (isLoading) return [[React.createElement(SkeletonLine, { bold: true }), React.createElement(SkeletonLine, null)], [React.createElement(SkeletonLine, { bold: true }), React.createElement(SkeletonLine, null)]];
|
|
50
50
|
|
|
51
|
+
// Odds is missing currency, use user currency as a fallback.
|
|
52
|
+
if (!item.Currency) item.Currency = _this.props.currency;
|
|
53
|
+
|
|
51
54
|
if (product === 'casino') {
|
|
52
55
|
return [[React.createElement(
|
|
53
56
|
'div',
|
|
@@ -333,13 +336,15 @@ var HistoryWidget = function HistoryWidget(_ref2) {
|
|
|
333
336
|
var getTransactions = _ref2.getTransactions,
|
|
334
337
|
items = _ref2.items,
|
|
335
338
|
products = _ref2.products,
|
|
336
|
-
limit = _ref2.limit
|
|
339
|
+
limit = _ref2.limit,
|
|
340
|
+
currency = _ref2.currency;
|
|
337
341
|
|
|
338
342
|
var accordionItems = products.map(function (product) {
|
|
339
343
|
return {
|
|
340
344
|
header: getMessage(product),
|
|
341
345
|
content: React.createElement(HistoryWidgetList, {
|
|
342
346
|
product: product,
|
|
347
|
+
currency: currency,
|
|
343
348
|
limit: limit,
|
|
344
349
|
getTransactions: getTransactions[product],
|
|
345
350
|
items: items[product]
|
|
@@ -78,22 +78,13 @@ var BonusAction = function BonusAction(_ref) {
|
|
|
78
78
|
return _react2.default.createElement(
|
|
79
79
|
'div',
|
|
80
80
|
{ className: 'actions' },
|
|
81
|
-
console.log(bonus.Identifier),
|
|
82
|
-
console.log(bonus.Identifier, bonus),
|
|
83
|
-
console.log(bonus.Identifier, ALEACC_BONUS_CLAIM_STATE.includes(bonus.State)),
|
|
84
|
-
console.log('condition: ', bonus.Identifier, ALEACC_BONUS_CLAIM_STATE.includes(bonus.State) || bonus.Type === 'Deposit'),
|
|
85
81
|
(ALEACC_BONUS_CLAIM_STATE.includes(bonus.State) || bonus.Type === 'Deposit') && _react2.default.createElement(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
className: 'button primary small',
|
|
93
|
-
onClick: claimBonus,
|
|
94
|
-
isLoading: isLoadingClaim },
|
|
95
|
-
_react2.default.createElement(_Translate2.default, { id: 'action.bonus.claim', defaultMessage: 'Claim' })
|
|
96
|
-
)
|
|
82
|
+
_Button2.default,
|
|
83
|
+
{
|
|
84
|
+
className: 'button primary small',
|
|
85
|
+
onClick: claimBonus,
|
|
86
|
+
isLoading: isLoadingClaim },
|
|
87
|
+
_react2.default.createElement(_Translate2.default, { id: 'action.bonus.claim', defaultMessage: 'Claim' })
|
|
97
88
|
),
|
|
98
89
|
ALEACC_BONUS_REJECT_STATE.includes(bonus.State) && _react2.default.createElement(
|
|
99
90
|
_Button2.default,
|
|
@@ -83,6 +83,9 @@ var HistoryWidgetList = function (_React$Component) {
|
|
|
83
83
|
}, _this.createListInfo = function (item, product, isLoading) {
|
|
84
84
|
if (isLoading) return [[_react2.default.createElement(_Skeleton.SkeletonLine, { bold: true }), _react2.default.createElement(_Skeleton.SkeletonLine, null)], [_react2.default.createElement(_Skeleton.SkeletonLine, { bold: true }), _react2.default.createElement(_Skeleton.SkeletonLine, null)]];
|
|
85
85
|
|
|
86
|
+
// Odds is missing currency, use user currency as a fallback.
|
|
87
|
+
if (!item.Currency) item.Currency = _this.props.currency;
|
|
88
|
+
|
|
86
89
|
if (product === 'casino') {
|
|
87
90
|
return [[_react2.default.createElement(
|
|
88
91
|
'div',
|
|
@@ -368,13 +371,15 @@ var HistoryWidget = function HistoryWidget(_ref2) {
|
|
|
368
371
|
var getTransactions = _ref2.getTransactions,
|
|
369
372
|
items = _ref2.items,
|
|
370
373
|
products = _ref2.products,
|
|
371
|
-
limit = _ref2.limit
|
|
374
|
+
limit = _ref2.limit,
|
|
375
|
+
currency = _ref2.currency;
|
|
372
376
|
|
|
373
377
|
var accordionItems = products.map(function (product) {
|
|
374
378
|
return {
|
|
375
379
|
header: (0, _message.getMessage)(product),
|
|
376
380
|
content: _react2.default.createElement(HistoryWidgetList, {
|
|
377
381
|
product: product,
|
|
382
|
+
currency: currency,
|
|
378
383
|
limit: limit,
|
|
379
384
|
getTransactions: getTransactions[product],
|
|
380
385
|
items: items[product]
|