@jetthai/cuora 1.1.336-dev-1 → 1.1.336-dev-3

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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.1.336-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.336-dev-2...v1.1.336-dev-3) (2025-01-16)
6
+
7
+ ### [1.1.336](https://github.com/jetthai/cuora-module/compare/v1.1.333-dev-8...v1.1.336) (2025-01-14)
8
+
9
+ ### [1.1.336-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.336-dev-1...v1.1.336-dev-2) (2025-01-15)
10
+
5
11
  ### [1.1.336-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.333-dev-8...v1.1.336-dev-1) (2025-01-15)
6
12
 
7
13
  ### [1.1.335](https://github.com/jetthai/cuora-module/compare/v1.1.334...v1.1.335) (2025-01-13)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.336-dev-1",
3
+ "version": "1.1.336-dev-3",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -344,9 +344,9 @@ export default function (request) {
344
344
  const isCustomerReply = data[0]?.from === 'SYSTEM'
345
345
  let combindedContent = ''
346
346
  if (isCustomerReply) {
347
- combindedContent = '-\n-------------------------\n' + data[0]?.content || '' + '\n-------------------------\n' + data[1]?.content || ''
347
+ combindedContent = data[0]?.content || '' + '\n' + data[1]?.content || ''
348
348
  } else {
349
- combindedContent = `-\n-------------------------\n${data[0]?.content || ''}`
349
+ combindedContent = `${data[0]?.content || ''}`
350
350
  }
351
351
  return {
352
352
  messageDetail: data,
@@ -30,6 +30,7 @@ export default function (request) {
30
30
  withdrawRules: [],
31
31
  withdrawRule: {},
32
32
  withdrawCheck: {},
33
+ freeGameDetail: [],
33
34
  amount: null,
34
35
  calculation: null,
35
36
 
@@ -407,7 +408,7 @@ export default function (request) {
407
408
  }
408
409
  }),
409
410
  updateWithdrawCondition: assign((context, event) => {
410
- const { enableWithdraw, enableWithdrawAmount, currentWithdrawLimit, targetWithdrawLimit, balance } = event.data
411
+ const { enableWithdraw, enableWithdrawAmount, currentWithdrawLimit, targetWithdrawLimit, balance, freeGameDetail } = event.data
411
412
  const withdrawRules = event.data?.rules || []
412
413
  const rules = withdrawRules.filter((rule) => rule.maxWithdrawAmount > 0)
413
414
  const lastMatchedIndex = findLastIndex(rules, (rule) => balance >= rule.greaterEqualThen)
@@ -431,6 +432,7 @@ export default function (request) {
431
432
  enableWithdrawAmount: +enableWithdrawAmount,
432
433
  enableWithdraw,
433
434
  withdrawRules,
435
+ freeGameDetail,
434
436
  }
435
437
  }),
436
438
  setWithdrawRulePreview: assign((context, event) => {
@@ -507,8 +509,13 @@ export default function (request) {
507
509
  return !context.boundBanks?.length
508
510
  },
509
511
  isConvertible: (context, event) => {
510
- const { enableWithdraw } = context
511
- return enableWithdraw
512
+ const { enableWithdraw, freeGameDetail } = context
513
+ const isFreeGame = freeGameDetail?.length > 0
514
+ if (isFreeGame) {
515
+ return freeGameDetail[0]?.freeGameCount === freeGameDetail[0]?.freeGameUsedCount
516
+ } else {
517
+ return enableWithdraw
518
+ }
512
519
  },
513
520
  isNotWithdrawable: (context, event) => {
514
521
  const { balance, enableWithdraw, paymentDetail } = context