@jetthai/cuora 1.1.445 → 1.1.446

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.446](https://github.com/jetthai/cuora-module/compare/v1.1.445...v1.1.446) (2026-07-07)
6
+
5
7
  ### [1.1.445](https://github.com/jetthai/cuora-module/compare/v1.1.444...v1.1.445) (2026-07-06)
6
8
 
7
9
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.445",
3
+ "version": "1.1.446",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -125,4 +125,14 @@ export default {
125
125
  method: 'get',
126
126
  params: { activityNo, appSecret },
127
127
  }),
128
+ getProgressSummary: ({ appSecret }) => ({
129
+ url: 'activities/progress-summary',
130
+ method: 'get',
131
+ params: { appSecret },
132
+ }),
133
+ getProgressDetail: ({ appSecret }) => ({
134
+ url: 'activities/progress-details',
135
+ method: 'get',
136
+ params: { appSecret },
137
+ }),
128
138
  }
@@ -11,6 +11,7 @@ export default function (request) {
11
11
  context: {
12
12
  tick: 2000,
13
13
  activityList: [],
14
+ progressSummary: {},
14
15
  tournamentList: [],
15
16
  promotionList: [],
16
17
  uidSite: '',
@@ -24,7 +25,7 @@ export default function (request) {
24
25
  src: 'fetchList',
25
26
  onDone: {
26
27
  target: 'checking',
27
- actions: ['setActivityList', 'setTournamentList', 'setPromotionList'],
28
+ actions: ['setActivityList', 'setTournamentList', 'setPromotionList', 'setProgressSummary'],
28
29
  },
29
30
  onError: {
30
31
  target: 'pending',
@@ -96,6 +97,12 @@ export default function (request) {
96
97
  activityList: list,
97
98
  }
98
99
  }),
100
+ setProgressSummary: assign((context, event) => {
101
+ const { progressSummary } = event.data
102
+ return {
103
+ progressSummary: progressSummary || null,
104
+ }
105
+ }),
99
106
  setPromotionList: assign((context, event) => {
100
107
  const { promotionList } = event.data
101
108
  return {
@@ -154,12 +161,20 @@ export default function (request) {
154
161
  services: {
155
162
  fetchList: async (context, event) => {
156
163
  const hasToken = request.getToken()
157
- const [{ data }, promotionList] = await Promise.all([
164
+ const siteConfig = window?.$nuxt?.$store?.state?.siteConfig
165
+ const isProgressEnable = siteConfig?.frontendActivityProgressEnable
166
+
167
+ const [{ data }, promotionList, progressSummaryRes] = await Promise.all([
158
168
  hasToken ? request.send(activity.getActivityList({ appSecret })) : request.send(activity.getAllActivityList({ appSecret })),
159
169
  hasToken ? request.send(payment.getPromotionsList()) : [],
170
+ hasToken && isProgressEnable ? request.send(activity.getProgressSummary({ appSecret })).catch(() => null) : null,
160
171
  ])
161
172
 
162
- return { activityList: data, promotionList }
173
+ return {
174
+ activityList: data,
175
+ promotionList,
176
+ progressSummary: progressSummaryRes?.data || null,
177
+ }
163
178
  },
164
179
  fetchActivityDetailList: async (context, event) => {
165
180
  await new Promise((resolve) => setTimeout(resolve, 1000)) // delay 1 second