@jetthai/cuora 1.1.353 → 1.1.354

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.354](https://github.com/jetthai/cuora-module/compare/v1.1.353...v1.1.354) (2025-04-14)
6
+
5
7
  ### [1.1.353](https://github.com/jetthai/cuora-module/compare/v1.1.352...v1.1.353) (2025-04-02)
6
8
 
7
9
  ### [1.1.352](https://github.com/jetthai/cuora-module/compare/v1.1.351...v1.1.352) (2025-04-02)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.353",
3
+ "version": "1.1.354",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -292,8 +292,12 @@ export default function (request) {
292
292
  return { announcementList: { data } }
293
293
  }),
294
294
  setFeeds: assign((context, event) => {
295
- const { announcementList, broadcastList, mailBoxInfo } = event.data
295
+ const { announcementList, broadcastList, mailBoxInfo, siteConfig } = event.data
296
296
  const promotions = announcementList?.announcements?.filter?.((item) => item.category === 3) || []
297
+ const customerMessageEnable = siteConfig?.csChat?.some((item) => item.enable && item.name === 'customermessage')
298
+ if (!customerMessageEnable) {
299
+ mailBoxInfo.rows -= mailBoxInfo.detailRows?.CUSTOMER || 0
300
+ }
297
301
  return { broadcastList, mailBoxInfo, promotions }
298
302
  }),
299
303
  setBroadcast: assign((context, event) => {
@@ -17,6 +17,9 @@ export default function () {
17
17
  idle: {},
18
18
  },
19
19
  on: {
20
+ DEFAULT_SETTING: {
21
+ actions: 'setSetting',
22
+ },
20
23
  MODIFY_SETTING: {
21
24
  actions: 'saveSetting',
22
25
  },
@@ -29,6 +32,10 @@ export default function () {
29
32
  const setting = JSON.parse(localStorage.getItem('setting')) || { sound: soundPlay, music: musicPlay }
30
33
  return { ...setting }
31
34
  }),
35
+ setSetting: assign((context, event) => {
36
+ const { sound, music, locale } = event.data
37
+ return { sound, music, locale }
38
+ }),
32
39
  saveSetting: assign((context, event) => {
33
40
  const { sound, music, locale } = event.data
34
41
  localStorage.setItem('setting', JSON.stringify({ sound, music, locale }))