@jetthai/cuora 1.1.97 → 1.1.98

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.98](https://github.com/jetthai/cuora-module/compare/v1.1.97...v1.1.98) (2023-05-18)
6
+
5
7
  ### [1.1.97](https://github.com/jetthai/cuora-module/compare/v1.1.96...v1.1.97) (2023-05-16)
6
8
 
7
9
  ### [1.1.96](https://github.com/jetthai/cuora-module/compare/v1.1.95...v1.1.96) (2023-05-15)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.97",
3
+ "version": "1.1.98",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -43,8 +43,9 @@ export default function (request, context) {
43
43
  },
44
44
  },
45
45
  loaded: {
46
- always: [{ target: 'awardable', cond: 'isAwardable' }, { target: 'awarded' }],
46
+ always: [{ target: 'limitDepositedUser', cond: 'isDepositedUser' }, { target: 'awardable', cond: 'isAwardable' }, { target: 'awarded' }],
47
47
  },
48
+ limitDepositedUser: {},
48
49
  awardable: {
49
50
  entry: 'setDuration',
50
51
  on: {
@@ -138,8 +139,9 @@ export default function (request, context) {
138
139
  }),
139
140
  },
140
141
  guards: {
141
- hasActivityNo: (context, event) => {
142
- return context.activityNo
142
+ isDepositedUser: (context, event) => {
143
+ const { userType = 0, receiveStatus = 0 } = context.activityDetail
144
+ return userType === 1 && receiveStatus === 0
143
145
  },
144
146
  isAwardable: (context, event) => {
145
147
  return context.activityDetail?.receiveStatus === 2