@jetthai/cuora 1.1.205 → 1.1.207
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,10 @@
|
|
|
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.207](https://github.com/jetthai/cuora-module/compare/v1.1.206...v1.1.207) (2023-11-23)
|
|
6
|
+
|
|
7
|
+
### [1.1.206](https://github.com/jetthai/cuora-module/compare/v1.1.205...v1.1.206) (2023-11-21)
|
|
8
|
+
|
|
5
9
|
### [1.1.205](https://github.com/jetthai/cuora-module/compare/v1.1.204...v1.1.205) (2023-11-21)
|
|
6
10
|
|
|
7
11
|
### [1.1.204](https://github.com/jetthai/cuora-module/compare/v1.1.203...v1.1.204) (2023-11-15)
|
package/package.json
CHANGED
|
@@ -10,6 +10,7 @@ export default function (request) {
|
|
|
10
10
|
activityNo: null,
|
|
11
11
|
activityDetail: null,
|
|
12
12
|
conditions: null,
|
|
13
|
+
rebateType: null,
|
|
13
14
|
currentReachLevel: null,
|
|
14
15
|
nextReachLevel: null,
|
|
15
16
|
lastPeriod: null,
|
|
@@ -76,6 +77,7 @@ export default function (request) {
|
|
|
76
77
|
}),
|
|
77
78
|
setInitData: assign((context, event) => {
|
|
78
79
|
const {
|
|
80
|
+
rebateType,
|
|
79
81
|
conditions = [],
|
|
80
82
|
currentReachLevel = {},
|
|
81
83
|
nextReachLevel = {},
|
|
@@ -99,22 +101,40 @@ export default function (request) {
|
|
|
99
101
|
rebate: '-',
|
|
100
102
|
},
|
|
101
103
|
],
|
|
102
|
-
rebatePercentageSetting:
|
|
104
|
+
rebatePercentageSetting: '-',
|
|
103
105
|
rewardType: conditions?.[0]?.rewardType,
|
|
104
106
|
title: 'PLASTIC',
|
|
105
107
|
turnoverLimit: '-',
|
|
106
108
|
withdrawRule: conditions?.[0]?.withdrawRule,
|
|
107
109
|
})
|
|
108
110
|
|
|
111
|
+
let nextDepositLimit = '0'
|
|
112
|
+
let nextTurnoverLimit = '0'
|
|
113
|
+
let currentTurnover = '0'
|
|
114
|
+
let currentDeposit = '0'
|
|
115
|
+
// 若已達到最高等級,所有數值皆以最高等級顯示
|
|
116
|
+
if (currentReachLevel?.title === conditions?.[conditions?.length - 1]?.title) {
|
|
117
|
+
currentDeposit = conditions[conditions.length - 1].depositLimit
|
|
118
|
+
currentTurnover = conditions[conditions.length - 1].turnoverLimit
|
|
119
|
+
nextDepositLimit = conditions[conditions.length - 1].depositLimit
|
|
120
|
+
nextTurnoverLimit = conditions[conditions.length - 1].turnoverLimit
|
|
121
|
+
} else {
|
|
122
|
+
currentDeposit = currentTotalDeposit
|
|
123
|
+
currentTurnover = currentTotalTurnover
|
|
124
|
+
nextDepositLimit = nextReachLevel?.depositLimit
|
|
125
|
+
nextTurnoverLimit = nextReachLevel?.turnoverLimit
|
|
126
|
+
}
|
|
127
|
+
|
|
109
128
|
return {
|
|
129
|
+
rebateType,
|
|
110
130
|
conditions: copiedData,
|
|
111
131
|
currentReachLevel,
|
|
112
132
|
nextReachLevel,
|
|
113
133
|
lastPeriod,
|
|
114
|
-
nextDepositLimit
|
|
115
|
-
nextTurnoverLimit
|
|
116
|
-
currentTotalDeposit,
|
|
117
|
-
currentTotalTurnover,
|
|
134
|
+
nextDepositLimit,
|
|
135
|
+
nextTurnoverLimit,
|
|
136
|
+
currentTotalDeposit: currentDeposit,
|
|
137
|
+
currentTotalTurnover: currentTurnover,
|
|
118
138
|
retainAmount,
|
|
119
139
|
yesterdayReward,
|
|
120
140
|
calculateWalletMode,
|
|
@@ -268,8 +268,9 @@ export default function (request, context) {
|
|
|
268
268
|
},
|
|
269
269
|
isSubmittable: (context, event) => {
|
|
270
270
|
const { selectedAmount, userAccountNumber, userAccountName, userAccountBranchCode, depositTime, receipt } = context
|
|
271
|
-
const { branchCodeEnable = '0' } = context.siteConfig
|
|
272
|
-
const defaultCheck =
|
|
271
|
+
const { branchCodeEnable = '0', bankDepositProofIsOptional = '1' } = context.siteConfig
|
|
272
|
+
const defaultCheck =
|
|
273
|
+
selectedAmount && userAccountNumber && userAccountName && depositTime && (receipt || bankDepositProofIsOptional === '0')
|
|
273
274
|
|
|
274
275
|
if (branchCodeEnable === '1') {
|
|
275
276
|
return defaultCheck && userAccountBranchCode
|
|
@@ -382,8 +382,8 @@ export default function (request) {
|
|
|
382
382
|
},
|
|
383
383
|
isSubmittable: (context, event) => {
|
|
384
384
|
const { amount, userAccountNumber, userAccountName, userAccountBranchCode, depositTime, receipt } = context
|
|
385
|
-
const { branchCodeEnable = '0' } = context.siteConfig
|
|
386
|
-
const defaultCheck = amount && userAccountNumber && userAccountName && depositTime && receipt
|
|
385
|
+
const { branchCodeEnable = '0', bankDepositProofIsOptional = '1' } = context.siteConfig
|
|
386
|
+
const defaultCheck = amount && userAccountNumber && userAccountName && depositTime && (receipt || bankDepositProofIsOptional)
|
|
387
387
|
if (branchCodeEnable === '1') {
|
|
388
388
|
return defaultCheck && userAccountBranchCode
|
|
389
389
|
} else {
|