awing-library 2.1.82-beta → 2.1.84-beta
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/lib/ACM-AXN/CampaignSchedule/Components/RowAdvance/component.js +39 -9
- package/lib/ACM-AXN/Directory/DomainDirectory/DomainDirectory.test.js +1 -0
- package/lib/ACM-AXN/Directory/DomainDirectory/FolderDetail.test.js +1 -0
- package/lib/ACM-AXN/Directory/MenuDirectory/MenuDirectory.test.js +1 -0
- package/lib/ACM-AXN/Directory/SystemDirectory/SystemDirectory.test.js +1 -0
- package/lib/ACM-AXN/Directory/components/CreateOrEditFolder.test.js +1 -0
- package/lib/ACM-AXN/Directory/components/Permission/AddAuthen.test.js +2 -0
- package/lib/ACM-AXN/Directory/components/Permission/CreateOrEditPermission.test.js +2 -0
- package/lib/ACM-AXN/Directory/components/Permission/ManagementPermission.test.js +3 -0
- package/lib/ACM-AXN/Directory/components/Permission/MenuPermissions/MenuPermissionManagement.test.js +2 -0
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/Message.d.ts +3 -2
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/Message.js +23 -24
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationContent.d.ts +2 -2
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationContent.js +3 -1
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/index.d.ts +2 -2
- package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/index.js +3 -1
- package/lib/ACM-AXN/Notifications/Types.d.ts +6 -164
- package/lib/ACM-AXN/Notifications/Types.js +1 -278
- package/lib/ACM-AXN/Statistics/ControlPanel.js +4 -4
- package/lib/ACM-AXN/TaskScheduler/Components/TriggerInput.js +4 -2
- package/lib/ACM-AXN/TaskScheduler/Constant.d.ts +0 -107
- package/lib/ACM-AXN/TaskScheduler/Constant.js +1 -105
- package/lib/ACM-AXN/TransactionLog/Container.js +6 -4
- package/lib/ACM-AXN/TransactionLog/Detail.js +3 -1
- package/lib/ACM-AXN/TransactionLog/Types.d.ts +1 -107
- package/lib/ACM-AXN/TransactionLog/Types.js +1 -109
- package/lib/ACM-AXN/TransactionLog/Utils.d.ts +0 -103
- package/lib/ACM-AXN/TransactionLog/Utils.js +1 -104
- package/lib/Context/index.js +1 -0
- package/lib/Context/interface.d.ts +1 -0
- package/package.json +1 -1
|
@@ -118,7 +118,7 @@ var RowAdvanceComponent = function (_a) {
|
|
|
118
118
|
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.TableRow, { className: "".concat((groupNames === null || groupNames === void 0 ? void 0 : groupNames.length) === 0
|
|
119
119
|
? classes.styledNormalRow
|
|
120
120
|
: styledRow(priorityGroupLevel), " ").concat(classes.styledCommonRow), onClick: handleOnClick, children: headCells === null || headCells === void 0 ? void 0 : headCells.map(function (item, index) {
|
|
121
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
121
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
|
|
122
122
|
switch (item.name) {
|
|
123
123
|
case Enum_1.HEAD_CELL_NAMES.CONTROL:
|
|
124
124
|
return ((0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", colSpan: colSpanFirstCell, className: item.id === Enum_1.HEAD_CELL_IDS.CONTROL
|
|
@@ -134,7 +134,10 @@ var RowAdvanceComponent = function (_a) {
|
|
|
134
134
|
groupNames
|
|
135
135
|
.slice(0, priorityGroupLevel - 1)
|
|
136
136
|
.indexOf(Enum_1.HEAD_CELL_NAMES.PLACE) === -1 ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledPlaceField, children: ((_b = options === null || options === void 0 ? void 0 : options.places[row === null || row === void 0 ? void 0 : row.placeId]) === null || _b === void 0 ? void 0 : _b.name) ||
|
|
137
|
-
(row === null || row === void 0 ? void 0 : row.totalPlace)
|
|
137
|
+
((row === null || row === void 0 ? void 0 : row.totalPlace) !==
|
|
138
|
+
0
|
|
139
|
+
? row === null || row === void 0 ? void 0 : row.totalPlace
|
|
140
|
+
: '') })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})) })) }, item.id));
|
|
138
141
|
case Enum_1.HEAD_CELL_NAMES.CAMPAIGN:
|
|
139
142
|
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: fieldNameShowOn ===
|
|
140
143
|
Enum_1.HEAD_CELL_NAMES.CAMPAIGN ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledCampaignField, children: (0, jsx_runtime_1.jsx)(CampaignLabel, { campaignId: row === null || row === void 0 ? void 0 : row.groupKeyId, campaigns: options === null || options === void 0 ? void 0 : options.campaigns, classes: classes }) })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: groupNames
|
|
@@ -165,25 +168,52 @@ var RowAdvanceComponent = function (_a) {
|
|
|
165
168
|
return ((0, jsx_runtime_1.jsx)(material_1.TableCell, { align: "right", children: ctr }, item.id));
|
|
166
169
|
case Enum_1.HEAD_CELL_NAMES.CAMPAIGN_CAMPAIGN:
|
|
167
170
|
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: fieldNameShowOn ===
|
|
168
|
-
Enum_1.HEAD_CELL_NAMES.CAMPAIGN ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledCampaignField, children: (_e = row === null || row === void 0 ? void 0 : row.campaign) === null || _e === void 0 ? void 0 : _e.name
|
|
171
|
+
Enum_1.HEAD_CELL_NAMES.CAMPAIGN ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledCampaignField, children: ((_e = row === null || row === void 0 ? void 0 : row.campaign) === null || _e === void 0 ? void 0 : _e.name) !== ''
|
|
172
|
+
? (_f = row === null || row === void 0 ? void 0 : row.campaign) === null || _f === void 0 ? void 0 : _f.name
|
|
173
|
+
: ((_g = row === null || row === void 0 ? void 0 : row.campaign) === null || _g === void 0 ? void 0 : _g.campaignId) !==
|
|
174
|
+
'0'
|
|
175
|
+
? (_h = row === null || row === void 0 ? void 0 : row.campaign) === null || _h === void 0 ? void 0 : _h.campaignId
|
|
176
|
+
: '' })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: groupNames
|
|
169
177
|
.slice(0, priorityGroupLevel - 1)
|
|
170
|
-
.indexOf(Enum_1.HEAD_CELL_NAMES.
|
|
171
|
-
(0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledCampaignField, children: (
|
|
178
|
+
.indexOf(Enum_1.HEAD_CELL_NAMES.CAMPAIGN_CAMPAIGN) === -1 ? ( // Nếu fieldGroup có index < thằng groupKeyName hiện tại thì hiển thị total hoac name ngược lại phải thụt đầu dòng
|
|
179
|
+
(0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledCampaignField, children: ((_j = row === null || row === void 0 ? void 0 : row.campaign) === null || _j === void 0 ? void 0 : _j.name) !== ''
|
|
180
|
+
? (_k = row === null || row === void 0 ? void 0 : row.campaign) === null || _k === void 0 ? void 0 : _k.name
|
|
181
|
+
: ((_l = row === null || row === void 0 ? void 0 : row.campaign) === null || _l === void 0 ? void 0 : _l.campaignId) !==
|
|
182
|
+
'0'
|
|
183
|
+
? (_m = row === null || row === void 0 ? void 0 : row.campaign) === null || _m === void 0 ? void 0 : _m.campaignId
|
|
184
|
+
: '' })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})) })) }, item.id));
|
|
172
185
|
case Enum_1.HEAD_CELL_NAMES.DOMAIN_CAMPAIGN:
|
|
173
186
|
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: fieldNameShowOn ===
|
|
174
|
-
Enum_1.HEAD_CELL_NAMES.DOMAIN_CAMPAIGN ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledDomainField, children: (
|
|
187
|
+
Enum_1.HEAD_CELL_NAMES.DOMAIN_CAMPAIGN ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledDomainField, children: ((_o = row === null || row === void 0 ? void 0 : row.domain) === null || _o === void 0 ? void 0 : _o.name) !== ''
|
|
188
|
+
? (_p = row === null || row === void 0 ? void 0 : row.domain) === null || _p === void 0 ? void 0 : _p.name
|
|
189
|
+
: ((_q = row === null || row === void 0 ? void 0 : row.domain) === null || _q === void 0 ? void 0 : _q.domainId) !== '0'
|
|
190
|
+
? (_r = row === null || row === void 0 ? void 0 : row.domain) === null || _r === void 0 ? void 0 : _r.domainId
|
|
191
|
+
: '' })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: groupNames
|
|
175
192
|
.slice(0, priorityGroupLevel - 1)
|
|
176
|
-
.indexOf(Enum_1.HEAD_CELL_NAMES.DOMAIN_CAMPAIGN) === -1 ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledDomainField, children: (
|
|
193
|
+
.indexOf(Enum_1.HEAD_CELL_NAMES.DOMAIN_CAMPAIGN) === -1 ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledDomainField, children: ((_s = row === null || row === void 0 ? void 0 : row.domain) === null || _s === void 0 ? void 0 : _s.name) !== ''
|
|
194
|
+
? (_t = row === null || row === void 0 ? void 0 : row.domain) === null || _t === void 0 ? void 0 : _t.name
|
|
195
|
+
: ((_u = row === null || row === void 0 ? void 0 : row.domain) === null || _u === void 0 ? void 0 : _u.domainId) !== '0'
|
|
196
|
+
? (_v = row === null || row === void 0 ? void 0 : row.domain) === null || _v === void 0 ? void 0 : _v.domainId
|
|
197
|
+
: '' })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})) })) }, item.id));
|
|
177
198
|
case Enum_1.HEAD_CELL_NAMES.PLACE_CAMPAIGN:
|
|
178
199
|
return ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: fieldNameShowOn ===
|
|
179
|
-
Enum_1.HEAD_CELL_NAMES.PLACE_CAMPAIGN ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledPlaceField, children: (
|
|
200
|
+
Enum_1.HEAD_CELL_NAMES.PLACE_CAMPAIGN ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledPlaceField, children: ((_w = row === null || row === void 0 ? void 0 : row.place) === null || _w === void 0 ? void 0 : _w.name) !== ''
|
|
201
|
+
? (_x = row === null || row === void 0 ? void 0 : row.place) === null || _x === void 0 ? void 0 : _x.name
|
|
202
|
+
: ((_y = row === null || row === void 0 ? void 0 : row.place) === null || _y === void 0 ? void 0 : _y.placeId) !== '0'
|
|
203
|
+
? (_z = row === null || row === void 0 ? void 0 : row.place) === null || _z === void 0 ? void 0 : _z.placeId
|
|
204
|
+
: '' })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children:
|
|
180
205
|
// Nếu field hiện tại ko phải groupName đang showOn thì 3Th
|
|
181
206
|
// TH1: field nằm trong groupNames nhưng đúng trước fieldNameShowOn hiển thị name
|
|
182
207
|
// TH2: field nằm sau fieldNameShowOn trong groupNames hiển thi total
|
|
183
208
|
// Th3: field ko trong groupNames hiển thị total hoặ thông tin schedule nếu nó là cấp cuối cùng
|
|
184
209
|
groupNames
|
|
185
210
|
.slice(0, priorityGroupLevel - 1)
|
|
186
|
-
.indexOf(Enum_1.HEAD_CELL_NAMES.PLACE_CAMPAIGN) === -1 ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledPlaceField, children: (
|
|
211
|
+
.indexOf(Enum_1.HEAD_CELL_NAMES.PLACE_CAMPAIGN) === -1 ? ((0, jsx_runtime_1.jsx)(material_1.TableCell, { className: classes.styledPlaceField, children: ((_0 = row === null || row === void 0 ? void 0 : row.place) === null || _0 === void 0 ? void 0 : _0.name) !== ''
|
|
212
|
+
? (_1 = row === null || row === void 0 ? void 0 : row.place) === null || _1 === void 0 ? void 0 : _1.name
|
|
213
|
+
: ((_2 = row === null || row === void 0 ? void 0 : row.place) === null || _2 === void 0 ? void 0 : _2.placeId) !==
|
|
214
|
+
'0'
|
|
215
|
+
? (_3 = row === null || row === void 0 ? void 0 : row.place) === null || _3 === void 0 ? void 0 : _3.placeId
|
|
216
|
+
: '' })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {})) })) }, item.id));
|
|
187
217
|
default:
|
|
188
218
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
189
219
|
}
|
|
@@ -74,6 +74,7 @@ describe('DomainDirectory', function () {
|
|
|
74
74
|
i18next: {},
|
|
75
75
|
service: { directoriesGetAll: directoriesGetAll },
|
|
76
76
|
appHelper: {},
|
|
77
|
+
transactionType: {},
|
|
77
78
|
}, children: (0, jsx_runtime_1.jsx)(_1.default, { rootDirectoryId: '0' }) }) }));
|
|
78
79
|
loading = react_1.screen.getByRole('progressbar');
|
|
79
80
|
expect(loading).toBeInTheDocument();
|
|
@@ -22,6 +22,7 @@ describe('DomainDirectory', function () {
|
|
|
22
22
|
service: { directoriesGetChildDirectories: directoriesGetChildDirectories },
|
|
23
23
|
appHelper: {},
|
|
24
24
|
i18next: {},
|
|
25
|
+
transactionType: {},
|
|
25
26
|
}, children: (0, jsx_runtime_1.jsx)(FolderDetail_1.default, { parentId: '0' }) }) }));
|
|
26
27
|
var loading = react_1.screen.getByText('Common.NoData');
|
|
27
28
|
expect(loading).toBeInTheDocument();
|
|
@@ -72,6 +72,7 @@ describe('MenuDirectory', function () {
|
|
|
72
72
|
i18next: {},
|
|
73
73
|
service: { menusGetAll: menusGetAll },
|
|
74
74
|
appHelper: {},
|
|
75
|
+
transactionType: {},
|
|
75
76
|
}, children: (0, jsx_runtime_1.jsx)(_1.default, {}) }) }));
|
|
76
77
|
loading = react_1.screen.getByRole('progressbar');
|
|
77
78
|
expect(loading).toBeInTheDocument();
|
|
@@ -74,6 +74,7 @@ describe('SystemDirectory', function () {
|
|
|
74
74
|
i18next: {},
|
|
75
75
|
service: { systemDirectoriesGetAll: systemDirectoriesGetAll },
|
|
76
76
|
appHelper: {},
|
|
77
|
+
transactionType: {},
|
|
77
78
|
}, children: (0, jsx_runtime_1.jsx)(_1.default, { rootDirectoryId: '0' }) }) }));
|
|
78
79
|
loading = react_1.screen.getByRole('progressbar');
|
|
79
80
|
expect(loading).toBeInTheDocument();
|
|
@@ -53,6 +53,7 @@ describe('CreateOrEditFolder', function () {
|
|
|
53
53
|
},
|
|
54
54
|
appHelper: {},
|
|
55
55
|
i18next: {},
|
|
56
|
+
transactionType: {},
|
|
56
57
|
}, children: (0, jsx_runtime_1.jsx)(CreateOrEditFolder_1.default, { updateDirectory: mockUpdateDirectory }) }) }));
|
|
57
58
|
var loading = react_1.screen.getByText('Common.Loading');
|
|
58
59
|
expect(loading).toBeInTheDocument();
|
|
@@ -66,6 +66,7 @@ describe('AddAuthen', function () {
|
|
|
66
66
|
service: { usersGet: usersGet, groupsGetAll: groupsGetAll },
|
|
67
67
|
appHelper: {},
|
|
68
68
|
i18next: {},
|
|
69
|
+
transactionType: {},
|
|
69
70
|
}, children: (0, jsx_runtime_1.jsx)(AddAuthen_1.default, { oldSelected: [], onSubmit: mockSubmit }) }) }));
|
|
70
71
|
expect(mockGetUser.mock.calls.length).toEqual(1);
|
|
71
72
|
expect(mockGetGroup.mock.calls.length).toEqual(1);
|
|
@@ -80,6 +81,7 @@ describe('AddAuthen', function () {
|
|
|
80
81
|
service: { usersGet: usersGet, groupsGetAll: groupsGetAll },
|
|
81
82
|
appHelper: {},
|
|
82
83
|
i18next: {},
|
|
84
|
+
transactionType: {},
|
|
83
85
|
}, children: (0, jsx_runtime_1.jsx)(AddAuthen_1.default, { oldSelected: [], onSubmit: mockSubmit }) }) }));
|
|
84
86
|
buttonClose = react_1.screen.getByRole('button', { name: 'Close' });
|
|
85
87
|
buttonSave = react_1.screen.getByRole('button', { name: 'Common.Save' });
|
|
@@ -91,6 +91,7 @@ describe('CreateOrEditPermission', function () {
|
|
|
91
91
|
systemDirectoryPermissionPut: systemDirectoryPermissionPut,
|
|
92
92
|
},
|
|
93
93
|
appHelper: {},
|
|
94
|
+
transactionType: {},
|
|
94
95
|
}, children: (0, jsx_runtime_1.jsx)(CreateOrEditPermission_1.default, {}) }) }));
|
|
95
96
|
expect(react_1.screen.getByText('UserOrGroup')).toBeInTheDocument();
|
|
96
97
|
expect(react_1.screen.getByText('SetPermission')).toBeInTheDocument();
|
|
@@ -108,6 +109,7 @@ describe('CreateOrEditPermission', function () {
|
|
|
108
109
|
systemDirectoryPermissionPut: systemDirectoryPermissionPut,
|
|
109
110
|
},
|
|
110
111
|
appHelper: {},
|
|
112
|
+
transactionType: {},
|
|
111
113
|
}, children: (0, jsx_runtime_1.jsx)(CreateOrEditPermission_1.default, { isSystemDirectory: true }) }) }));
|
|
112
114
|
expect(react_1.screen.getByText('UserOrGroup')).toBeInTheDocument();
|
|
113
115
|
expect(react_1.screen.getByText('SetPermission')).toBeInTheDocument();
|
|
@@ -48,6 +48,7 @@ describe('Management', function () {
|
|
|
48
48
|
systemDirectoriesGet: systemDirectoriesGet,
|
|
49
49
|
},
|
|
50
50
|
appHelper: {},
|
|
51
|
+
transactionType: {},
|
|
51
52
|
}, children: (0, jsx_runtime_1.jsx)(Management_1.default, {}) }) }));
|
|
52
53
|
expect(react_1.screen.getByText('Directory.ObjectPermission')).toBeInTheDocument();
|
|
53
54
|
});
|
|
@@ -62,6 +63,7 @@ describe('Management', function () {
|
|
|
62
63
|
systemDirectoriesGet: systemDirectoriesGet,
|
|
63
64
|
},
|
|
64
65
|
appHelper: {},
|
|
66
|
+
transactionType: {},
|
|
65
67
|
}, children: (0, jsx_runtime_1.jsx)(Management_1.default, {}) }) }));
|
|
66
68
|
expect(mockDirectoryGet).toHaveBeenCalled();
|
|
67
69
|
});
|
|
@@ -76,6 +78,7 @@ describe('Management', function () {
|
|
|
76
78
|
systemDirectoriesGet: systemDirectoriesGet,
|
|
77
79
|
},
|
|
78
80
|
appHelper: {},
|
|
81
|
+
transactionType: {},
|
|
79
82
|
}, children: (0, jsx_runtime_1.jsx)(Management_1.default, { isSystemDirectory: true }) }) }));
|
|
80
83
|
expect(mockDirectoryGet).not.toHaveBeenCalled();
|
|
81
84
|
expect(mockSystemDirectoryGet).toHaveBeenCalled();
|
package/lib/ACM-AXN/Directory/components/Permission/MenuPermissions/MenuPermissionManagement.test.js
CHANGED
|
@@ -62,6 +62,7 @@ describe('Menu Management', function () {
|
|
|
62
62
|
menuPermissionPut: menuPermissionPut,
|
|
63
63
|
},
|
|
64
64
|
appHelper: {},
|
|
65
|
+
transactionType: {},
|
|
65
66
|
}, children: (0, jsx_runtime_1.jsx)(MenuPermissionManagement_1.default, {}) }) }));
|
|
66
67
|
expect(react_1.screen.getByText('Directory.ObjectPermission')).toBeInTheDocument();
|
|
67
68
|
});
|
|
@@ -78,6 +79,7 @@ describe('Menu Management', function () {
|
|
|
78
79
|
menuPermissionPut: menuPermissionPut,
|
|
79
80
|
},
|
|
80
81
|
appHelper: {},
|
|
82
|
+
transactionType: {},
|
|
81
83
|
}, children: (0, jsx_runtime_1.jsx)(MenuPermissionManagement_1.default, {}) }) }));
|
|
82
84
|
expect(mockGetMenu).toHaveBeenCalled();
|
|
83
85
|
expect(mockUsersGet).toHaveBeenCalled();
|
package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/Message.d.ts
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* @author dauquan1108@gmail.com on 11/27/2023.
|
|
4
4
|
*
|
|
5
5
|
**/
|
|
6
|
-
import { NotificationMessageField
|
|
7
|
-
|
|
6
|
+
import { NotificationMessageField } from '../../../Types';
|
|
7
|
+
import { SagaTransactionType } from '../../../../../ACM-AXN/TransactionLog/Types';
|
|
8
|
+
export declare const getFullDescription: (type: SagaTransactionType[string], translation: any, fields: NotificationMessageField[], transactionType: SagaTransactionType) => {
|
|
8
9
|
title: import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
url: string;
|
|
10
11
|
};
|
package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/Message.js
CHANGED
|
@@ -4,7 +4,6 @@ exports.getFullDescription = void 0;
|
|
|
4
4
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
var react_router_dom_1 = require("react-router-dom");
|
|
6
6
|
var Constant_1 = require("../../../Constant");
|
|
7
|
-
var Types_1 = require("../../../Types");
|
|
8
7
|
// CampaignAction
|
|
9
8
|
var CampaignActionBuildCreateDescription = function (translation, fields) {
|
|
10
9
|
var _a, _b;
|
|
@@ -334,52 +333,52 @@ var PlaceTransactionBuildPlaceStatusDescription = function (translation, fields)
|
|
|
334
333
|
};
|
|
335
334
|
};
|
|
336
335
|
// End PlaceTransaction
|
|
337
|
-
var getFullDescription = function (type, translation, fields) {
|
|
336
|
+
var getFullDescription = function (type, translation, fields, transactionType) {
|
|
338
337
|
try {
|
|
339
338
|
switch (type) {
|
|
340
|
-
case
|
|
339
|
+
case transactionType.CampaignCreate:
|
|
341
340
|
return CampaignActionBuildCreateDescription(translation, fields);
|
|
342
|
-
case
|
|
341
|
+
case transactionType.CampaignUpdate:
|
|
343
342
|
return CampaignActionBuildUpdateDescription(translation, fields);
|
|
344
|
-
case
|
|
343
|
+
case transactionType.CampaignDelete:
|
|
345
344
|
return CampaignActionBuildDeleteDescription(translation, fields);
|
|
346
|
-
case
|
|
345
|
+
case transactionType.PageCreate:
|
|
347
346
|
return PageActionBuildCreateDescription(translation, fields);
|
|
348
|
-
case
|
|
347
|
+
case transactionType.PageUpdate:
|
|
349
348
|
return PageActionBuildUpdateDescription(translation, fields);
|
|
350
|
-
case
|
|
349
|
+
case transactionType.PageDelete:
|
|
351
350
|
return PageActionBuildDeleteDescription(translation, fields);
|
|
352
|
-
case
|
|
351
|
+
case transactionType.DomainUpdate:
|
|
353
352
|
return DomainActionBuildUpdateDescription(translation, fields);
|
|
354
|
-
case
|
|
353
|
+
case transactionType.DomainJoinRequest:
|
|
355
354
|
return DomainTransactionBuildJoinRequestDescription(translation, fields);
|
|
356
|
-
case
|
|
355
|
+
case transactionType.DomainJoinApprove:
|
|
357
356
|
return DomainTransactionBuildJoinApproveDescription(translation, fields);
|
|
358
|
-
case
|
|
357
|
+
case transactionType.DomainJoinReject:
|
|
359
358
|
return DomainTransactionBuildJoinRejectDescription(translation, fields);
|
|
360
|
-
case
|
|
359
|
+
case transactionType.DomainUnjoinRequest:
|
|
361
360
|
return DomainTransactionBuildUnjoinRequestDescription(translation, fields);
|
|
362
|
-
case
|
|
361
|
+
case transactionType.DomainUnjoinApprove:
|
|
363
362
|
return DomainTransactionBuildUnjoinApproveDescription(translation, fields);
|
|
364
|
-
case
|
|
363
|
+
case transactionType.DomainUnjoinReject:
|
|
365
364
|
return DomainTransactionBuildUnjoinRejectDescription(translation, fields);
|
|
366
|
-
case
|
|
365
|
+
case transactionType.DomainJoinDelete:
|
|
367
366
|
return DomainTransactionBuildJoinDeleteDescription(translation, fields);
|
|
368
|
-
case
|
|
367
|
+
case transactionType.PlaceUpdate:
|
|
369
368
|
return PlaceActionBuildUpdateDescription(translation, fields);
|
|
370
|
-
case
|
|
369
|
+
case transactionType.PlaceJoinRequest:
|
|
371
370
|
return PlaceTransactionBuildJoinRequestDescription(translation, fields);
|
|
372
|
-
case
|
|
371
|
+
case transactionType.PlaceJoinApprove:
|
|
373
372
|
return PlaceTransactionBuildJoinApproveDescription(translation, fields);
|
|
374
|
-
case
|
|
373
|
+
case transactionType.PlaceJoinReject:
|
|
375
374
|
return PlaceTransactionBuildJoinRejectDescription(translation, fields);
|
|
376
|
-
case
|
|
375
|
+
case transactionType.PlaceUnjoinRequest:
|
|
377
376
|
return PlaceTransactionBuildUnjoinRequestDescription(translation, fields);
|
|
378
|
-
case
|
|
377
|
+
case transactionType.PlaceUnjoinApprove:
|
|
379
378
|
return PlaceTransactionBuildUnjoinApproveDescription(translation, fields);
|
|
380
|
-
case
|
|
379
|
+
case transactionType.PlaceUnjoinReject:
|
|
381
380
|
return PlaceTransactionBuildUnjoinRejectDescription(translation, fields);
|
|
382
|
-
case
|
|
381
|
+
case transactionType.PlaceStatusUpdate:
|
|
383
382
|
return PlaceTransactionBuildPlaceStatusDescription(translation, fields);
|
|
384
383
|
default:
|
|
385
384
|
return { title: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), url: '' };
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
*
|
|
5
5
|
**/
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import {
|
|
7
|
+
import { NotificationMessage } from '../../../../../ACM-AXN/Notifications/Types';
|
|
8
8
|
interface PropsNotificationContent {
|
|
9
9
|
status?: boolean;
|
|
10
|
-
notificationMessage:
|
|
10
|
+
notificationMessage: NotificationMessage;
|
|
11
11
|
}
|
|
12
12
|
declare const _default: React.MemoExoticComponent<(props: PropsNotificationContent) => JSX.Element>;
|
|
13
13
|
export default _default;
|
|
@@ -14,9 +14,11 @@ var moment_1 = __importDefault(require("moment"));
|
|
|
14
14
|
var react_i18next_1 = require("react-i18next");
|
|
15
15
|
var material_1 = require("@mui/material");
|
|
16
16
|
var Message_1 = require("./Message");
|
|
17
|
+
var Context_1 = require("../../../../../Context");
|
|
17
18
|
var NotificationContent = function (props) {
|
|
18
19
|
var _a, _b;
|
|
19
20
|
var notificationMessage = props.notificationMessage, _c = props.status, status = _c === void 0 ? false : _c;
|
|
21
|
+
var transactionType = (0, Context_1.useAwing)().transactionType;
|
|
20
22
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
21
23
|
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
22
24
|
display: 'flex',
|
|
@@ -52,7 +54,7 @@ var NotificationContent = function (props) {
|
|
|
52
54
|
textAlign: 'justify',
|
|
53
55
|
},
|
|
54
56
|
},
|
|
55
|
-
], children: (0, Message_1.getFullDescription)(notificationMessage === null || notificationMessage === void 0 ? void 0 : notificationMessage.sagaTransactionType, t, notificationMessage.fields).title }), ((_a = notificationMessage === null || notificationMessage === void 0 ? void 0 : notificationMessage.createdDate) === null || _a === void 0 ? void 0 : _a.seconds) && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", sx: { color: status ? '#ED1D25' : 'inherit' }, children: moment_1.default
|
|
57
|
+
], children: (0, Message_1.getFullDescription)(notificationMessage === null || notificationMessage === void 0 ? void 0 : notificationMessage.sagaTransactionType, t, notificationMessage.fields, transactionType).title }), ((_a = notificationMessage === null || notificationMessage === void 0 ? void 0 : notificationMessage.createdDate) === null || _a === void 0 ? void 0 : _a.seconds) && ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "caption", sx: { color: status ? '#ED1D25' : 'inherit' }, children: moment_1.default
|
|
56
58
|
.unix(Number((_b = notificationMessage === null || notificationMessage === void 0 ? void 0 : notificationMessage.createdDate) === null || _b === void 0 ? void 0 : _b.seconds))
|
|
57
59
|
.locale(t('Common.lg'))
|
|
58
60
|
.format('MM/DD/YYYY hh:mm A') }))] }));
|
package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/index.d.ts
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
*
|
|
5
5
|
**/
|
|
6
6
|
/// <reference types="react" />
|
|
7
|
-
import {
|
|
7
|
+
import { NotificationMessage, NotificationMessageStatus } from '../../../Types';
|
|
8
8
|
interface ValueItem {
|
|
9
9
|
id: number;
|
|
10
10
|
status: NotificationMessageStatus;
|
|
11
11
|
}
|
|
12
12
|
interface PropsNotificationItem {
|
|
13
|
-
notificationMessage:
|
|
13
|
+
notificationMessage: NotificationMessage;
|
|
14
14
|
onUpdateStatus: (dataSent: ValueItem | string) => void;
|
|
15
15
|
}
|
|
16
16
|
declare const NotificationItem: (props: PropsNotificationItem) => JSX.Element;
|
package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/index.js
CHANGED
|
@@ -13,8 +13,10 @@ var watched_svg_1 = __importDefault(require("../../../../../Assets/Images/watche
|
|
|
13
13
|
var Types_1 = require("../../../Types");
|
|
14
14
|
var Message_1 = require("./Message");
|
|
15
15
|
var Router_1 = require("../../../../../AWING/Router");
|
|
16
|
+
var Context_1 = require("../../../../../Context");
|
|
16
17
|
var NotificationItem = function (props) {
|
|
17
18
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
19
|
+
var transactionType = (0, Context_1.useAwing)().transactionType;
|
|
18
20
|
var navigate = (0, Router_1.useNavigate)();
|
|
19
21
|
var notificationMessage = props.notificationMessage, onUpdateStatus = props.onUpdateStatus;
|
|
20
22
|
var sagaTransactionType = notificationMessage.sagaTransactionType, fields = notificationMessage.fields, status = notificationMessage.status, id = notificationMessage.id;
|
|
@@ -24,7 +26,7 @@ var NotificationItem = function (props) {
|
|
|
24
26
|
onUpdateStatus({ id: id, status: status });
|
|
25
27
|
};
|
|
26
28
|
var handleClickNotification = function () {
|
|
27
|
-
navigate((0, Message_1.getFullDescription)(sagaTransactionType, t, fields).url);
|
|
29
|
+
navigate((0, Message_1.getFullDescription)(sagaTransactionType, t, fields, transactionType).url);
|
|
28
30
|
status === Types_1.NotificationMessageStatus.Unread &&
|
|
29
31
|
onUpdateStatus({ id: id, status: status });
|
|
30
32
|
};
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* @author dauquan1108@gmail.com on 04/15/2024.
|
|
4
4
|
*
|
|
5
5
|
**/
|
|
6
|
-
import {
|
|
6
|
+
import { Timestamp } from '../../ACM-AXN/Campaign/Types';
|
|
7
|
+
import { SagaTransactionType } from '../../ACM-AXN/TransactionLog/Types';
|
|
7
8
|
export interface IValueFilterState {
|
|
8
9
|
textSearch: string;
|
|
9
10
|
tabs: string;
|
|
@@ -30,14 +31,8 @@ export interface CancelToken {
|
|
|
30
31
|
reason?: Cancel;
|
|
31
32
|
throwIfRequested(): void;
|
|
32
33
|
}
|
|
33
|
-
export interface AppHelper {
|
|
34
|
-
alert: (message: string, title?: string) => void;
|
|
35
|
-
snackbar: (severity?: AlertColor, message?: string, autoHideDuration?: number) => void;
|
|
36
|
-
confirm: (okFunction?: () => void, cancelFunction?: () => void, message?: string, title?: string) => void;
|
|
37
|
-
}
|
|
38
34
|
export interface NotificationPropsContext {
|
|
39
35
|
service: NotificationService;
|
|
40
|
-
appHelper: AppHelper;
|
|
41
36
|
}
|
|
42
37
|
export interface NotificationService {
|
|
43
38
|
/**
|
|
@@ -61,57 +56,24 @@ export interface NotificationService {
|
|
|
61
56
|
**/
|
|
62
57
|
notificationsCountUnreadMessages: (cancelToken?: CancelToken) => Promise<number>;
|
|
63
58
|
}
|
|
64
|
-
export interface ITimestamp {
|
|
65
|
-
seconds?: string;
|
|
66
|
-
nanos?: number;
|
|
67
|
-
}
|
|
68
|
-
export declare class Timestamp implements ITimestamp {
|
|
69
|
-
seconds?: string;
|
|
70
|
-
nanos?: number;
|
|
71
|
-
constructor(data?: ITimestamp);
|
|
72
|
-
init(_data?: any): void;
|
|
73
|
-
static fromJS(data: any): Timestamp;
|
|
74
|
-
toJSON(data?: any): any;
|
|
75
|
-
}
|
|
76
59
|
export declare enum NotificationMessageStatus {
|
|
77
60
|
Unread = 0,
|
|
78
61
|
Read = 1
|
|
79
62
|
}
|
|
80
|
-
export interface
|
|
63
|
+
export interface NotificationMessage {
|
|
81
64
|
id?: number;
|
|
82
65
|
userId?: string;
|
|
83
|
-
sagaTransactionType?: SagaTransactionType;
|
|
66
|
+
sagaTransactionType?: SagaTransactionType[string];
|
|
84
67
|
fields?: NotificationMessageField[] | undefined;
|
|
85
68
|
status?: NotificationMessageStatus;
|
|
86
69
|
createdDate?: Timestamp;
|
|
87
70
|
}
|
|
88
|
-
export
|
|
89
|
-
id?: number;
|
|
90
|
-
userId?: string;
|
|
91
|
-
sagaTransactionType?: SagaTransactionType;
|
|
92
|
-
readonly fields?: NotificationMessageField[] | undefined;
|
|
93
|
-
status?: NotificationMessageStatus;
|
|
94
|
-
createdDate?: Timestamp;
|
|
95
|
-
constructor(data?: INotificationMessage);
|
|
96
|
-
init(_data?: any): void;
|
|
97
|
-
static fromJS(data: any): NotificationMessage;
|
|
98
|
-
toJSON(data?: any): any;
|
|
99
|
-
}
|
|
100
|
-
export interface INotificationMessageField {
|
|
71
|
+
export interface NotificationMessageField {
|
|
101
72
|
name?: string | undefined;
|
|
102
73
|
value?: string | undefined;
|
|
103
74
|
text?: string | undefined;
|
|
104
75
|
}
|
|
105
|
-
export
|
|
106
|
-
name?: string | undefined;
|
|
107
|
-
value?: string | undefined;
|
|
108
|
-
text?: string | undefined;
|
|
109
|
-
constructor(data?: INotificationMessageField);
|
|
110
|
-
init(_data?: any): void;
|
|
111
|
-
static fromJS(data: any): NotificationMessageField;
|
|
112
|
-
toJSON(data?: any): any;
|
|
113
|
-
}
|
|
114
|
-
export interface IPagedList_1OfNotificationMessage {
|
|
76
|
+
export interface PagedList_1OfNotificationMessage {
|
|
115
77
|
items?: NotificationMessage[] | undefined;
|
|
116
78
|
pageCount?: number;
|
|
117
79
|
totalItemCount?: number;
|
|
@@ -120,123 +82,3 @@ export interface IPagedList_1OfNotificationMessage {
|
|
|
120
82
|
hasPreviousPage?: boolean;
|
|
121
83
|
hasNextPage?: boolean;
|
|
122
84
|
}
|
|
123
|
-
export declare class PagedList_1OfNotificationMessage implements IPagedList_1OfNotificationMessage {
|
|
124
|
-
items?: NotificationMessage[] | undefined;
|
|
125
|
-
pageCount?: number;
|
|
126
|
-
totalItemCount?: number;
|
|
127
|
-
pageNumber?: number;
|
|
128
|
-
pageSize?: number;
|
|
129
|
-
readonly hasPreviousPage?: boolean;
|
|
130
|
-
readonly hasNextPage?: boolean;
|
|
131
|
-
constructor(data?: IPagedList_1OfNotificationMessage);
|
|
132
|
-
init(_data?: any): void;
|
|
133
|
-
static fromJS(data: any): PagedList_1OfNotificationMessage;
|
|
134
|
-
toJSON(data?: any): any;
|
|
135
|
-
}
|
|
136
|
-
export declare enum SagaTransactionType {
|
|
137
|
-
None = 0,
|
|
138
|
-
StartDay = 1,
|
|
139
|
-
CampaignCreate = 1000,
|
|
140
|
-
CampaignUpdate = 1001,
|
|
141
|
-
CampaignDelete = 1002,
|
|
142
|
-
CampaignBlocked = 1003,
|
|
143
|
-
PlaceCreate = 1100,
|
|
144
|
-
PlaceUpdate = 1101,
|
|
145
|
-
PlaceDelete = 1102,
|
|
146
|
-
PlaceJoinRequest = 1103,
|
|
147
|
-
PlaceJoinApprove = 1104,
|
|
148
|
-
PlaceJoinReject = 1105,
|
|
149
|
-
PlaceJoinDelete = 1106,
|
|
150
|
-
PlaceUnjoinRequest = 1107,
|
|
151
|
-
PlaceUnjoinApprove = 1108,
|
|
152
|
-
PlaceUnjoinReject = 1109,
|
|
153
|
-
PlaceUnjoinDelete = 1110,
|
|
154
|
-
PlaceCustomerInfoUpdate = 1111,
|
|
155
|
-
PlaceStatsNeedCalculate = 1112,
|
|
156
|
-
PlaceStatsUpdate = 1113,
|
|
157
|
-
PlaceClearCache = 1114,
|
|
158
|
-
PlaceCustomerInfoCreate = 1115,
|
|
159
|
-
PlaceCustomerInfoDelete = 1116,
|
|
160
|
-
PlaceGroupCreate = 1117,
|
|
161
|
-
PlaceGroupUpdate = 1118,
|
|
162
|
-
PlaceGroupDelete = 1119,
|
|
163
|
-
PlaceStatusUpdate = 1120,
|
|
164
|
-
DomainCreate = 1200,
|
|
165
|
-
DomainUpdate = 1201,
|
|
166
|
-
DomainDelete = 1202,
|
|
167
|
-
DomainJoinRequest = 1203,
|
|
168
|
-
DomainJoinApprove = 1204,
|
|
169
|
-
DomainJoinReject = 1205,
|
|
170
|
-
DomainJoinDelete = 1206,
|
|
171
|
-
DomainJoinUpdate = 1207,
|
|
172
|
-
DomainUnjoinRequest = 1208,
|
|
173
|
-
DomainUnjoinApprove = 1209,
|
|
174
|
-
DomainUnjoinReject = 1210,
|
|
175
|
-
DomainUnjoinDelete = 1211,
|
|
176
|
-
DomainClearCache = 1212,
|
|
177
|
-
PageCreate = 1300,
|
|
178
|
-
PageUpdate = 1301,
|
|
179
|
-
PageDelete = 1302,
|
|
180
|
-
PageArchive = 1303,
|
|
181
|
-
DirectoryCreate = 1400,
|
|
182
|
-
DirectoryUpdate = 1401,
|
|
183
|
-
DirectoryDelete = 1402,
|
|
184
|
-
DirectoryPermissionUpdate = 1501,
|
|
185
|
-
DirectoryPermissionDelete = 1502,
|
|
186
|
-
SystemDirectoryPermissionUpdate = 1551,
|
|
187
|
-
SystemDirectoryPermissionDelete = 1552,
|
|
188
|
-
StaticFileUpload = 1601,
|
|
189
|
-
StaticFileDelete = 1602,
|
|
190
|
-
StaticFileDownload = 1603,
|
|
191
|
-
FolderFileCreate = 1700,
|
|
192
|
-
ScheduleNeedCalculate = 1803,
|
|
193
|
-
ScheduleAllCalculate = 1804,
|
|
194
|
-
ScheduleCampaignCalculate = 1805,
|
|
195
|
-
ApCreate = 1900,
|
|
196
|
-
ApUpdate = 1901,
|
|
197
|
-
ApDelete = 1902,
|
|
198
|
-
ApControllerClearCache = 1903,
|
|
199
|
-
AuthenticationProfileCreate = 2000,
|
|
200
|
-
AuthenticationProfileUpdate = 2001,
|
|
201
|
-
AuthenticationProfileDelete = 2002,
|
|
202
|
-
CaptiveClearCache = 2100,
|
|
203
|
-
GroupCreate = 2200,
|
|
204
|
-
GroupUpdate = 2201,
|
|
205
|
-
GroupDelete = 2202,
|
|
206
|
-
UserCreate = 2300,
|
|
207
|
-
UserUpdate = 2301,
|
|
208
|
-
UserDelete = 2302,
|
|
209
|
-
UserChangePassword = 2303,
|
|
210
|
-
UserAddToDomain = 2304,
|
|
211
|
-
UserRemoveFromDomain = 2305,
|
|
212
|
-
TemplateCreate = 2400,
|
|
213
|
-
TemplateUpdate = 2401,
|
|
214
|
-
TemplateDelete = 2402,
|
|
215
|
-
RemarketingListCreate = 2500,
|
|
216
|
-
RemarketingListUpdate = 2501,
|
|
217
|
-
RemarketingListDelete = 2502,
|
|
218
|
-
UserLogin = 2600,
|
|
219
|
-
UserLogout = 2601,
|
|
220
|
-
WizardCreate = 2700,
|
|
221
|
-
WizardUpdate = 2701,
|
|
222
|
-
WizardDelete = 2702,
|
|
223
|
-
HolidayCreate = 2800,
|
|
224
|
-
HolidayUpdate = 2801,
|
|
225
|
-
HolidayDelete = 2802,
|
|
226
|
-
AttributeCreate = 2900,
|
|
227
|
-
AttributeUpdate = 2901,
|
|
228
|
-
AttributeDelete = 2902,
|
|
229
|
-
InventoryCreate = 3000,
|
|
230
|
-
InventoryUpdate = 3001,
|
|
231
|
-
InventoryDelete = 3002,
|
|
232
|
-
MenuPermissionCreate = 3100,
|
|
233
|
-
MenuPermissionUpdate = 3101,
|
|
234
|
-
MenuPermissionDelete = 3102,
|
|
235
|
-
AudienceSumupCalculate = 3200,
|
|
236
|
-
AttributeTypeCreate = 3300,
|
|
237
|
-
AttributeTypeUpdate = 3301,
|
|
238
|
-
AttributeTypeDelete = 3302,
|
|
239
|
-
TaskSchedulerCreate = 3400,
|
|
240
|
-
TaskSchedulerUpdate = 3401,
|
|
241
|
-
TaskSchedulerDelete = 3402
|
|
242
|
-
}
|