@jetthai/cuora 1.1.232 → 1.1.233
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,8 @@
|
|
|
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.233](https://github.com/jetthai/cuora-module/compare/v1.1.232...v1.1.233) (2024-03-12)
|
|
6
|
+
|
|
5
7
|
### [1.1.232](https://github.com/jetthai/cuora-module/compare/v1.1.231...v1.1.232) (2024-03-11)
|
|
6
8
|
|
|
7
9
|
### [1.1.231](https://github.com/jetthai/cuora-module/compare/v1.1.230...v1.1.231) (2024-03-05)
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ export default function (request) {
|
|
|
6
6
|
{
|
|
7
7
|
id: 'instant_rebate_activity',
|
|
8
8
|
context: {
|
|
9
|
-
|
|
9
|
+
enableCollectButton: false,
|
|
10
10
|
lastCollectTime: null,
|
|
11
11
|
lastEstimateTime: null,
|
|
12
12
|
collectAvailable: false,
|
|
@@ -119,8 +119,8 @@ export default function (request) {
|
|
|
119
119
|
}
|
|
120
120
|
}),
|
|
121
121
|
setInitData: assign((context, event) => {
|
|
122
|
-
const {
|
|
123
|
-
return {
|
|
122
|
+
const { enableCollectButton = false, lastCollectTime = 0, lastEstimateTime = 0 } = event.data
|
|
123
|
+
return { enableCollectButton, lastCollectTime, lastEstimateTime }
|
|
124
124
|
}),
|
|
125
125
|
setEstimateResult: assign((context, event) => {
|
|
126
126
|
const {
|
|
@@ -159,8 +159,8 @@ export default function (request) {
|
|
|
159
159
|
}
|
|
160
160
|
},
|
|
161
161
|
isClaimExhausted: (context, event) => {
|
|
162
|
-
const { collectAvailable, remainingCount } = context
|
|
163
|
-
return !collectAvailable &&
|
|
162
|
+
const { collectAvailable, remainingCount, dailyRedemptionLimit } = context
|
|
163
|
+
return !collectAvailable && parseInt(`${remainingCount}`) === parseInt(`${dailyRedemptionLimit}`)
|
|
164
164
|
},
|
|
165
165
|
isInsufficientAmount: (context, event) => {
|
|
166
166
|
const { collectAvailable, singleMinimumAmountReceive, rebateAmount } = context
|
|
@@ -173,11 +173,11 @@ export default function (request) {
|
|
|
173
173
|
} else {
|
|
174
174
|
combindString = rebateAmount
|
|
175
175
|
}
|
|
176
|
-
const deformatRebateAmount = parseFloat(combindString)
|
|
177
|
-
return !collectAvailable && deformatRebateAmount < singleMinimumAmountReceive
|
|
176
|
+
const deformatRebateAmount = parseFloat(`${combindString}`)
|
|
177
|
+
return !collectAvailable && deformatRebateAmount < parseFloat(`${singleMinimumAmountReceive}`)
|
|
178
178
|
},
|
|
179
179
|
isClaimEnable: (context, event) => {
|
|
180
|
-
const { collectAvailable, remainingCount, rebateAmount, singleMinimumAmountReceive } = context
|
|
180
|
+
const { collectAvailable, remainingCount, dailyRedemptionLimit, rebateAmount, singleMinimumAmountReceive } = context
|
|
181
181
|
let splitArray = rebateAmount?.split(',')
|
|
182
182
|
let combindString = '0'
|
|
183
183
|
if (splitArray?.length > 0) {
|
|
@@ -188,7 +188,11 @@ export default function (request) {
|
|
|
188
188
|
combindString = rebateAmount
|
|
189
189
|
}
|
|
190
190
|
const deformatRebateAmount = parseFloat(combindString)
|
|
191
|
-
return
|
|
191
|
+
return (
|
|
192
|
+
collectAvailable &&
|
|
193
|
+
parseInt(`${remainingCount}`) < parseInt(`${dailyRedemptionLimit}`) &&
|
|
194
|
+
deformatRebateAmount >= parseFloat(`${singleMinimumAmountReceive}`)
|
|
195
|
+
)
|
|
192
196
|
},
|
|
193
197
|
},
|
|
194
198
|
services: {
|