@jetthai/cuora 1.1.251 → 1.1.252
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 +2 -0
- package/package.json +1 -1
- package/src/machine/inbox.js +3 -3
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.252](https://github.com/jetthai/cuora-module/compare/v1.1.251...v1.1.252) (2024-04-17)
|
|
6
|
+
|
|
5
7
|
### [1.1.251](https://github.com/jetthai/cuora-module/compare/v1.1.250...v1.1.251) (2024-04-17)
|
|
6
8
|
|
|
7
9
|
### [1.1.250](https://github.com/jetthai/cuora-module/compare/v1.1.249...v1.1.250) (2024-04-16)
|
package/package.json
CHANGED
package/src/machine/inbox.js
CHANGED
|
@@ -291,10 +291,10 @@ export default function (request) {
|
|
|
291
291
|
}
|
|
292
292
|
}),
|
|
293
293
|
setTabs: assign((context, event) => {
|
|
294
|
-
let { currentTab } = context
|
|
294
|
+
let { currentTab, hasCustomer } = context
|
|
295
295
|
if (!currentTab) {
|
|
296
296
|
const customerTab = event.data?.find((tab) => tab === 'CUSTOMER')
|
|
297
|
-
if (!!customerTab) {
|
|
297
|
+
if (!!customerTab && hasCustomer) {
|
|
298
298
|
currentTab = 'CUSTOMER'
|
|
299
299
|
} else {
|
|
300
300
|
currentTab = event.data?.[0]
|
|
@@ -411,7 +411,7 @@ export default function (request) {
|
|
|
411
411
|
return tabs
|
|
412
412
|
},
|
|
413
413
|
fetchMessages: async (context, event) => {
|
|
414
|
-
const { isRewardListEnable, currentTab, inbox
|
|
414
|
+
const { isRewardListEnable, currentTab, inbox } = JSON.parse(JSON.stringify(context))
|
|
415
415
|
if (isRewardListEnable && (currentTab === 'REWARD' || currentTab === 'DIAMOND')) {
|
|
416
416
|
const { data } = await request.send(activity.getRewardList({ count: 30, appSecret }))
|
|
417
417
|
inbox[currentTab] = { data, page: 0, totalPage: 1 }
|