@jetthai/cuora 1.1.195 → 1.1.197
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,10 @@
|
|
|
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.197](https://github.com/jetthai/cuora-module/compare/v1.1.196...v1.1.197) (2023-10-30)
|
|
6
|
+
|
|
7
|
+
### [1.1.196](https://github.com/jetthai/cuora-module/compare/v1.1.195...v1.1.196) (2023-10-24)
|
|
8
|
+
|
|
5
9
|
### [1.1.195](https://github.com/jetthai/cuora-module/compare/v1.1.194...v1.1.195) (2023-10-23)
|
|
6
10
|
|
|
7
11
|
### [1.1.194](https://github.com/jetthai/cuora-module/compare/v1.1.190-krw-1...v1.1.194) (2023-10-23)
|
package/package.json
CHANGED
package/src/api/mailbox.js
CHANGED
|
@@ -10,10 +10,10 @@ export default {
|
|
|
10
10
|
method: 'post',
|
|
11
11
|
params: { groupId, isRead, isDelete },
|
|
12
12
|
}),
|
|
13
|
-
sendMessage: ({ type, category, from, to, title, content }) => ({
|
|
13
|
+
sendMessage: ({ groupId, type, category, from, to, title, content }) => ({
|
|
14
14
|
url: 'mailbox/sendMessage',
|
|
15
15
|
method: 'post',
|
|
16
|
-
params: { type, category, from, to, title, content },
|
|
16
|
+
params: { groupId, type, category, from, to, title, content },
|
|
17
17
|
}),
|
|
18
18
|
getMessage: ({ groupId, limit = 10, pageIdx }) => ({
|
|
19
19
|
url: 'mailbox/getMessage',
|
package/src/api/payment.js
CHANGED
|
@@ -113,6 +113,8 @@ export default {
|
|
|
113
113
|
applyerBankCode,
|
|
114
114
|
applyerAccountNumber,
|
|
115
115
|
applyerHolderName,
|
|
116
|
+
applyerBranch,
|
|
117
|
+
applyerBranchCode,
|
|
116
118
|
targetBankCode,
|
|
117
119
|
targetAccountNumber,
|
|
118
120
|
depositTime,
|
|
@@ -127,6 +129,8 @@ export default {
|
|
|
127
129
|
applyerBankCode,
|
|
128
130
|
applyerAccountNumber,
|
|
129
131
|
applyerHolderName,
|
|
132
|
+
applyerBranch,
|
|
133
|
+
applyerBranchCode,
|
|
130
134
|
targetBankCode,
|
|
131
135
|
targetAccountNumber,
|
|
132
136
|
depositTime,
|
|
@@ -336,7 +336,7 @@ export default function (request, context) {
|
|
|
336
336
|
applyerBankCode: selectedUserBank.bankCode,
|
|
337
337
|
applyerAccountNumber: userAccountNumber,
|
|
338
338
|
applyerHolderName: userAccountName,
|
|
339
|
-
|
|
339
|
+
applyerBranch: userAccountBranchName,
|
|
340
340
|
applyerBranchCode: userAccountBranchCode,
|
|
341
341
|
depositTime,
|
|
342
342
|
receipt,
|
|
@@ -448,7 +448,7 @@ export default function (request) {
|
|
|
448
448
|
applyerBankCode: selectedUserBank.bankCode,
|
|
449
449
|
applyerAccountNumber: userAccountNumber,
|
|
450
450
|
applyerHolderName: userAccountName,
|
|
451
|
-
|
|
451
|
+
applyerBranch: userAccountBranchName,
|
|
452
452
|
applyerBranchCode: userAccountBranchCode,
|
|
453
453
|
depositTime,
|
|
454
454
|
receipt,
|
package/src/machine/inbox.js
CHANGED
|
@@ -38,15 +38,10 @@ const messageState = {
|
|
|
38
38
|
actions: 'showMessage',
|
|
39
39
|
cond: (context, event) => {
|
|
40
40
|
const { currentTab } = context
|
|
41
|
-
const {
|
|
42
|
-
return currentTab === 'CUSTOMER' &&
|
|
41
|
+
const { isRead } = event.data
|
|
42
|
+
return currentTab === 'CUSTOMER' && isRead
|
|
43
43
|
},
|
|
44
44
|
},
|
|
45
|
-
{
|
|
46
|
-
target: 'updating',
|
|
47
|
-
actions: ['showMessage', 'setMessageIsRead'],
|
|
48
|
-
cond: 'isAccountInquiry',
|
|
49
|
-
},
|
|
50
45
|
{
|
|
51
46
|
target: '.shown',
|
|
52
47
|
actions: 'showMessage',
|
|
@@ -80,7 +75,15 @@ const messageState = {
|
|
|
80
75
|
updating: {
|
|
81
76
|
invoke: {
|
|
82
77
|
src: 'updateMessageIsRead',
|
|
83
|
-
onDone: [
|
|
78
|
+
onDone: [
|
|
79
|
+
{
|
|
80
|
+
target: 'fetchingCustomerMessage',
|
|
81
|
+
cond: 'isCustomer',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
target: 'idle.shown',
|
|
85
|
+
},
|
|
86
|
+
],
|
|
84
87
|
onError: {
|
|
85
88
|
target: 'idle.shown',
|
|
86
89
|
},
|
|
@@ -100,6 +103,7 @@ export default function (request) {
|
|
|
100
103
|
tabs: [],
|
|
101
104
|
currentTab: null,
|
|
102
105
|
inbox: {},
|
|
106
|
+
currentMessage: null,
|
|
103
107
|
messageDetail: null,
|
|
104
108
|
hasCustomer: false,
|
|
105
109
|
selectedDeleteMessages: null,
|
|
@@ -231,6 +235,9 @@ export default function (request) {
|
|
|
231
235
|
target: '.sending',
|
|
232
236
|
cond: 'isSendable',
|
|
233
237
|
},
|
|
238
|
+
CLEAR: {
|
|
239
|
+
actions: 'hideMessage',
|
|
240
|
+
},
|
|
234
241
|
},
|
|
235
242
|
},
|
|
236
243
|
{
|
|
@@ -250,9 +257,9 @@ export default function (request) {
|
|
|
250
257
|
isRead: (context, event) => {
|
|
251
258
|
return event.data.isRead
|
|
252
259
|
},
|
|
253
|
-
|
|
254
|
-
const { currentTab
|
|
255
|
-
return currentTab === 'CUSTOMER'
|
|
260
|
+
isCustomer: (context, event) => {
|
|
261
|
+
const { currentTab } = context
|
|
262
|
+
return currentTab === 'CUSTOMER'
|
|
256
263
|
},
|
|
257
264
|
isSendable: (context, event) => {
|
|
258
265
|
const { messageTitle, messageContent } = context
|
|
@@ -265,6 +272,7 @@ export default function (request) {
|
|
|
265
272
|
currentTab: null,
|
|
266
273
|
inbox: {},
|
|
267
274
|
messageDetail: null,
|
|
275
|
+
currentMessage: null,
|
|
268
276
|
}
|
|
269
277
|
}),
|
|
270
278
|
resetPage: assign((context, event) => {
|
|
@@ -273,6 +281,7 @@ export default function (request) {
|
|
|
273
281
|
return {
|
|
274
282
|
inbox,
|
|
275
283
|
messageDetail: null,
|
|
284
|
+
currentMessage: null,
|
|
276
285
|
}
|
|
277
286
|
}),
|
|
278
287
|
setTabs: assign((context, event) => {
|
|
@@ -311,16 +320,17 @@ export default function (request) {
|
|
|
311
320
|
}
|
|
312
321
|
}),
|
|
313
322
|
setCustomerMessage: assign((context, event) => {
|
|
323
|
+
const { data = [] } = event.data
|
|
314
324
|
return {
|
|
315
|
-
messageDetail:
|
|
325
|
+
messageDetail: data,
|
|
326
|
+
messageTitle: data[data.length - 1]?.title,
|
|
316
327
|
}
|
|
317
328
|
}),
|
|
318
329
|
showMessage: assign((context, event) => {
|
|
319
330
|
const { title, content } = event.data
|
|
320
331
|
return {
|
|
332
|
+
currentMessage: event.data,
|
|
321
333
|
messageDetail: event.data,
|
|
322
|
-
messageTitle: title,
|
|
323
|
-
messageContent: content,
|
|
324
334
|
}
|
|
325
335
|
}),
|
|
326
336
|
hideMessage: assign((context, event) => {
|
|
@@ -328,6 +338,7 @@ export default function (request) {
|
|
|
328
338
|
messageTitle: null,
|
|
329
339
|
messageContent: null,
|
|
330
340
|
messageDetail: null,
|
|
341
|
+
currentMessage: null,
|
|
331
342
|
}
|
|
332
343
|
}),
|
|
333
344
|
removeMessage: assign((context, event) => {
|
|
@@ -393,8 +404,8 @@ export default function (request) {
|
|
|
393
404
|
return inbox
|
|
394
405
|
},
|
|
395
406
|
updateMessageIsRead: async (context, event) => {
|
|
396
|
-
const {
|
|
397
|
-
request.send(mailbox.updateMessage({ groupId:
|
|
407
|
+
const { currentMessage } = context
|
|
408
|
+
request.send(mailbox.updateMessage({ groupId: currentMessage.groupId, isRead: true }))
|
|
398
409
|
return true
|
|
399
410
|
},
|
|
400
411
|
deleteMessages: async (context, event) => {
|
|
@@ -407,29 +418,23 @@ export default function (request) {
|
|
|
407
418
|
return await request.send(mailbox.sendMessage({ type: 'CUSTOMER', category: 'DEPOSIT', from, to: 'SYSTEM', title, content }))
|
|
408
419
|
},
|
|
409
420
|
getMessage: async (context, event) => {
|
|
410
|
-
const {
|
|
411
|
-
return await request.send(mailbox.getMessage({ groupId:
|
|
421
|
+
const { currentMessage } = context
|
|
422
|
+
return await request.send(mailbox.getMessage({ groupId: currentMessage.groupId }))
|
|
412
423
|
},
|
|
413
424
|
sendMessage: async (context, event) => {
|
|
414
|
-
const {
|
|
415
|
-
const { from
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
)
|
|
428
|
-
} else {
|
|
429
|
-
return await request.send(
|
|
430
|
-
mailbox.sendMessage({ type: 'CUSTOMER', category: 'MAIL', from, to: 'SYSTEM', title: messageTitle, content: messageContent })
|
|
431
|
-
)
|
|
432
|
-
}
|
|
425
|
+
const { currentMessage, messageTitle, messageContent } = context
|
|
426
|
+
const { from } = event.data
|
|
427
|
+
return await request.send(
|
|
428
|
+
mailbox.sendMessage({
|
|
429
|
+
groupId: currentMessage?.groupId,
|
|
430
|
+
type: 'CUSTOMER',
|
|
431
|
+
category: 'MAIL',
|
|
432
|
+
from,
|
|
433
|
+
to: 'SYSTEM',
|
|
434
|
+
title: messageTitle,
|
|
435
|
+
content: messageContent,
|
|
436
|
+
})
|
|
437
|
+
)
|
|
433
438
|
},
|
|
434
439
|
},
|
|
435
440
|
}
|