@jetthai/cuora 1.1.219 → 1.1.220

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.220](https://github.com/jetthai/cuora-module/compare/v1.1.219...v1.1.220) (2024-01-17)
6
+
5
7
  ### [1.1.219](https://github.com/jetthai/cuora-module/compare/v1.1.218...v1.1.219) (2024-01-16)
6
8
 
7
9
  ### [1.1.218](https://github.com/jetthai/cuora-module/compare/v1.1.217...v1.1.218) (2024-01-16)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.219",
3
+ "version": "1.1.220",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -17,9 +17,18 @@ export default function (request) {
17
17
  remainingCount: 0,
18
18
  dailyRedemptionLimit: 0,
19
19
  collectAmount: 0,
20
+ activityNo: null,
20
21
  },
21
- initial: 'loading',
22
+ initial: 'idle',
22
23
  states: {
24
+ idle: {
25
+ on: {
26
+ SET_ACTIVITY_NO: {
27
+ target: 'loading',
28
+ actions: 'setActivityNo',
29
+ },
30
+ },
31
+ },
23
32
  loading: {
24
33
  invoke: {
25
34
  src: 'fetchCollectTime',
@@ -93,36 +102,20 @@ export default function (request) {
93
102
  claimed: {},
94
103
  fail: {},
95
104
  },
105
+ on: {
106
+ START: {
107
+ target: '.loading',
108
+ },
109
+ STOP: {
110
+ target: '.idle',
111
+ },
112
+ },
96
113
  },
97
114
  {
98
115
  actions: {
99
- reset: assign((context, event) => {
100
- const {
101
- diableCollectButton = false,
102
- lastCollectTime = 0,
103
- lastEstimateTime = 0,
104
- collectAvailable = false,
105
- settlementTime = 0,
106
- validTurnover = '0',
107
- rebateAmount = '0',
108
- singleMinimumAmountReceive = 0,
109
- remainingCount = 0,
110
- dailyRedemptionLimit = 0,
111
- collectAmount = 0,
112
- } = context
113
-
116
+ setActivityNo: assign((context, event) => {
114
117
  return {
115
- diableCollectButton,
116
- lastCollectTime,
117
- lastEstimateTime,
118
- collectAvailable,
119
- settlementTime,
120
- validTurnover,
121
- rebateAmount,
122
- singleMinimumAmountReceive,
123
- remainingCount,
124
- dailyRedemptionLimit,
125
- collectAmount,
118
+ activityNo: event.data,
126
119
  }
127
120
  }),
128
121
  setInitData: assign((context, event) => {