awing-library 2.1.7 → 2.1.8

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.
Files changed (22) hide show
  1. package/lib/ACM-AXN/DomainPreview/PreviewButton.js +13 -13
  2. package/lib/ACM-AXN/GroupUser/Container.js +1 -1
  3. package/lib/ACM-AXN/GroupUser/CreateOrEdit.js +8 -10
  4. package/lib/ACM-AXN/Notifications/Constant.js +1 -1
  5. package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/ButtonTabs.js +8 -4
  6. package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/MenuNotification.js +1 -1
  7. package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/index.d.ts +1 -0
  8. package/lib/ACM-AXN/Notifications/NotificationDetail/HeaderInfo/index.js +6 -7
  9. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationEmpty.js +2 -2
  10. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationAvatar.js +2 -2
  11. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/NotificationContent.js +7 -4
  12. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/NotificationItem/index.js +2 -2
  13. package/lib/ACM-AXN/Notifications/NotificationDetail/NotificationList/index.js +1 -1
  14. package/lib/ACM-AXN/Notifications/NotificationDetail/index.d.ts +5 -2
  15. package/lib/ACM-AXN/Notifications/NotificationDetail/index.js +11 -5
  16. package/lib/ACM-AXN/Notifications/NotificationPopover/Container.js +1 -1
  17. package/lib/ACM-AXN/Statistics/ControlPanel.js +20 -24
  18. package/lib/ACM-AXN/TaskScheduler/Container.js +1 -1
  19. package/lib/ACM-AXN/User/Container.js +1 -1
  20. package/lib/translate/en/translation.json +2 -0
  21. package/lib/translate/vi/translation.json +2 -0
  22. package/package.json +1 -1
@@ -105,7 +105,8 @@ var PreviewCampaignContainer = function (props) {
105
105
  service
106
106
  .domainsGetAll()
107
107
  .then(function (res) {
108
- setDomains(res.slice(0, 4));
108
+ setAllDomain(res);
109
+ setDomains(res.slice(0, 5));
109
110
  })
110
111
  .finally(function () { return setLoadingFlags(false); });
111
112
  }
@@ -146,15 +147,16 @@ var PreviewCampaignContainer = function (props) {
146
147
  };
147
148
  // eslint-disable-next-line react-hooks/exhaustive-deps
148
149
  var handleSearch = (0, react_1.useCallback)((0, lodash_1.debounce)(setSearchDomainString, 300), []);
149
- return ((0, jsx_runtime_1.jsxs)(material_1.Menu, { id: "long-menu", anchorEl: anchorEl, keepMounted: true, open: open, onClose: handlePreviewClose, PaperProps: {
150
- style: {
151
- maxHeight: 48 * 4.5,
152
- width: '25ch',
153
- },
154
- }, children: [loadingFlags ? ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { children: (0, jsx_runtime_1.jsx)(AWING_1.CircularProgress, {}) })) : ((domains && domains.map(function (domain) { return ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: function (event) {
155
- handlePreviewClose(event);
156
- handlePreviewDomain(event, domain.domainId);
157
- }, children: domain.name }, domain.domainId)); }))), !loadingFlags && ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: toggleDrawer(true), children: translationText.other })), (0, jsx_runtime_1.jsx)(material_1.Drawer, { anchor: 'right', open: openDrawer, onClose: function () {
150
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Menu, { id: "long-menu", anchorEl: anchorEl, keepMounted: true, open: open, onClose: handlePreviewClose, PaperProps: {
151
+ style: {
152
+ maxHeight: 48 * 4.5,
153
+ width: '25ch',
154
+ },
155
+ }, children: [loadingFlags ? ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { children: (0, jsx_runtime_1.jsx)(AWING_1.CircularProgress, {}) })) : (domains &&
156
+ domains.map(function (domain) { return ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: function (event) {
157
+ handlePreviewClose(event);
158
+ handlePreviewDomain(event, domain.domainId);
159
+ }, children: domain.name }, domain.domainId)); })), !loadingFlags && ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { onClick: toggleDrawer(true), children: translationText.other }))] }), (0, jsx_runtime_1.jsx)(material_1.Drawer, { anchor: 'right', open: openDrawer, onClose: function () {
158
160
  toggleDrawer(false);
159
161
  handlePreviewClose({ stopPropagation: function () { } });
160
162
  }, onClick: function (e) { return e.stopPropagation(); }, sx: {
@@ -163,9 +165,7 @@ var PreviewCampaignContainer = function (props) {
163
165
  width: function (t) { return t.spacing(60); },
164
166
  }, children: (0, jsx_runtime_1.jsx)(AWING_1.CircularProgress, {}) }) })) : ((0, jsx_runtime_1.jsxs)(material_1.List, { className: classes.drawer, children: [(0, jsx_runtime_1.jsx)(material_1.ListItem, { component: "div", children: (0, jsx_runtime_1.jsx)(material_1.TextField, { fullWidth: true, placeholder: translationText.searchPlaceholder, inputProps: { 'aria-label': 'search' }, InputProps: {
165
167
  startAdornment: (0, jsx_runtime_1.jsx)(icons_material_1.Search, {}),
166
- }, onChange: function (e) {
167
- return handleSearch(e.target.value);
168
- } }) }), (0, jsx_runtime_1.jsx)(material_1.Divider, {}), allDomain &&
168
+ }, onChange: function (e) { return handleSearch(e.target.value); } }) }), (0, jsx_runtime_1.jsx)(material_1.Divider, {}), allDomain &&
169
169
  allDomain
170
170
  .filter(function (d) {
171
171
  return d.name
@@ -16,7 +16,7 @@ var GroupUserContainer = function () {
16
16
  var service = (0, Hooks_1.default)().service;
17
17
  var _a = (0, Context_1.useAwing)().appHelper, confirm = _a.confirm, snackbar = _a.snackbar;
18
18
  var navigate = (0, Router_1.useNavigate)();
19
- var _b = (0, react_1.useState)(false), loading = _b[0], setLoading = _b[1];
19
+ var _b = (0, react_1.useState)(true), loading = _b[0], setLoading = _b[1];
20
20
  var _c = (0, react_1.useState)(), userGroups = _c[0], setUserGroups = _c[1];
21
21
  var handleNavigate = function () {
22
22
  navigate(Constants_1.CREATE_PATH);
@@ -10,15 +10,6 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
14
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
15
- if (ar || !(i in from)) {
16
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
17
- ar[i] = from[i];
18
- }
19
- }
20
- return to.concat(ar || Array.prototype.slice.call(from));
21
- };
22
13
  var __importDefault = (this && this.__importDefault) || function (mod) {
23
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
24
15
  };
@@ -87,7 +78,14 @@ var CreateOrEdit = function () {
87
78
  ], oldValue: businessUnitdata === null || businessUnitdata === void 0 ? void 0 : businessUnitdata.group, onUpdate: handleUpdate }), (0, jsx_runtime_1.jsx)(UserComponent_1.default, { rows: users.filter(function (user) { var _a; return (_a = businessUnitdata === null || businessUnitdata === void 0 ? void 0 : businessUnitdata.userIds) === null || _a === void 0 ? void 0 : _a.includes(user.userId); }), onChangeAddUser: function (userIds) {
88
79
  setBusinessUnitData(function (prev) { return (__assign(__assign({}, prev), { userIds: userIds })); });
89
80
  } })] })) }), (0, jsx_runtime_1.jsx)(Router_1.Routes, { children: (0, jsx_runtime_1.jsx)(Router_1.Route, { path: Constants_1.ADD_USER_TO_GROUP, element: (0, jsx_runtime_1.jsx)(SearchUser_1.default, { onChangeAddUser: function (userIds) {
90
- setBusinessUnitData(function (prev) { return (__assign(__assign({}, prev), { userIds: __spreadArray(__spreadArray([], prev.userIds, true), userIds, true) })); });
81
+ setBusinessUnitData(function (prev) {
82
+ console.log('prev', prev);
83
+ // return {
84
+ // ...prev,
85
+ // userIds: [...prev.userIds, ...userIds],
86
+ // }
87
+ return prev;
88
+ });
91
89
  }, listUserId: (businessUnitdata === null || businessUnitdata === void 0 ? void 0 : businessUnitdata.userIds) || [], users: users }) }, Constants_1.ADD_USER_TO_GROUP) })] }));
92
90
  };
93
91
  exports.default = CreateOrEdit;
@@ -15,7 +15,7 @@ exports.Constants = {
15
15
  ALL: 'All',
16
16
  ALL_STATUS: undefined,
17
17
  UNREAD: 'Unread',
18
- UNREAD_STATUS: 1,
18
+ UNREAD_STATUS: 0,
19
19
  SELECT_ALL: 'SelectAll',
20
20
  NOTIFICATIONS_PATH: 'Notifications',
21
21
  NOTIFICATION_SETTING_SCREEN_PATH: 'Notification',
@@ -14,8 +14,10 @@ var ButtonTabs = function (props) {
14
14
  };
15
15
  return ((0, jsx_runtime_1.jsxs)(material_1.Box, { mt: 2, component: "div", children: [(0, jsx_runtime_1.jsx)(material_1.Button, { onClick: handleUpdateTabs, sx: [
16
16
  {
17
- fontWeight: '600',
17
+ fontSize: '14px',
18
+ fontWeight: 700,
18
19
  borderRadius: '24px',
20
+ textTransform: 'none',
19
21
  color: tabActive === Constant_1.Constants.ALL ? '#FFF' : '#000',
20
22
  backgroundColor: tabActive === Constant_1.Constants.ALL ? '#ED1D25' : 'inherit',
21
23
  },
@@ -26,11 +28,13 @@ var ButtonTabs = function (props) {
26
28
  : 'inherit',
27
29
  },
28
30
  },
29
- ], "data-tabs": Constant_1.Constants.ALL, children: t('Common.All') }), (0, jsx_runtime_1.jsx)(material_1.Button, { onClick: handleUpdateTabs, "data-tabs": Constant_1.Constants.UNREAD, sx: [
31
+ ], "data-tabs": Constant_1.Constants.ALL, children: t('Notification.All') }), (0, jsx_runtime_1.jsx)(material_1.Button, { onClick: handleUpdateTabs, "data-tabs": Constant_1.Constants.UNREAD, sx: [
30
32
  {
33
+ fontSize: '14px',
31
34
  marginLeft: '8px',
32
- fontWeight: '600',
35
+ fontWeight: 700,
33
36
  borderRadius: '24px',
37
+ textTransform: 'none',
34
38
  color: tabActive === Constant_1.Constants.UNREAD ? '#FFF' : '#000',
35
39
  backgroundColor: tabActive === Constant_1.Constants.UNREAD
36
40
  ? '#ED1D25'
@@ -43,6 +47,6 @@ var ButtonTabs = function (props) {
43
47
  : 'inherit',
44
48
  },
45
49
  },
46
- ], children: t('Common.Unread') })] }));
50
+ ], children: t('Notification.Unread') })] }));
47
51
  };
48
52
  exports.default = ButtonTabs;
@@ -73,6 +73,6 @@ var MenuNotification = function (props) {
73
73
  }, children: menuData().map(function (item) { return ((0, jsx_runtime_1.jsxs)(material_1.MenuItem, { onClick: selectMenuItem, "data-value": item.value, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { mr: 2, style: {
74
74
  display: 'flex',
75
75
  justifyContent: 'center',
76
- }, children: (item === null || item === void 0 ? void 0 : item.icon) && ((0, jsx_runtime_1.jsx)("img", { alt: "", src: item.icon, style: { width: '20px', height: '20px' } })) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "inherit", children: item.title })] }, item.id)); }) })] }));
76
+ }, children: (item === null || item === void 0 ? void 0 : item.icon) && ((0, jsx_runtime_1.jsx)("img", { alt: "", src: item.icon, style: { width: '20px', height: '20px' } })) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "inherit", sx: { fontSize: '15px', fontWeight: 400 }, children: item.title })] }, item.id)); }) })] }));
77
77
  };
78
78
  exports.default = react_1.default.memo(MenuNotification);
@@ -10,6 +10,7 @@ interface PropsHeaderInfo {
10
10
  textSearch: string;
11
11
  tabs: string;
12
12
  };
13
+ onClosePopover?: () => void;
13
14
  onUpdateStatus: (dataSent: IValueItem | string) => void;
14
15
  onValueFilter: (textSearch: string, tabs: string) => void;
15
16
  }
@@ -20,11 +20,15 @@ var Router_1 = require("../../../../AWING/Router");
20
20
  var HeaderInfo = function (props) {
21
21
  var navigate = (0, Router_1.useNavigate)();
22
22
  var t = (0, react_i18next_1.useTranslation)().t;
23
- var valueFilter = props.valueFilter, _a = props.onValueFilter, onValueFilter = _a === void 0 ? function () { return null; } : _a, _b = props.onUpdateStatus, onUpdateStatus = _b === void 0 ? function () { return null; } : _b;
23
+ var valueFilter = props.valueFilter, _a = props.onValueFilter, onValueFilter = _a === void 0 ? function () { return null; } : _a, _b = props.onUpdateStatus, onUpdateStatus = _b === void 0 ? function () { return null; } : _b, _c = props.onClosePopover, onClosePopover = _c === void 0 ? function () { return null; } : _c;
24
24
  var handleUpdateMenuItem = function (value) {
25
25
  if (value === Constant_1.Constants.SELECT_ALL) {
26
26
  onUpdateStatus(Constant_1.Constants.ALL);
27
27
  }
28
+ else if (value === Constant_1.Constants.NOTIFICATION_SETTING_SCREEN_PATH) {
29
+ navigate("".concat(value));
30
+ onClosePopover();
31
+ }
28
32
  else {
29
33
  // Chuyển đến trang tương ứng
30
34
  navigate("".concat(value));
@@ -40,15 +44,10 @@ var HeaderInfo = function (props) {
40
44
  display: 'flex',
41
45
  flexDirection: 'row',
42
46
  justifyContent: 'space-between',
43
- }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h1", style: {
44
- fontWeight: '700',
45
- fontSize: '1.5em',
46
- }, children: t('Common.Notification') }), (0, jsx_runtime_1.jsx)(MenuNotification_1.default, { onUpdateMenuItem: handleUpdateMenuItem })] }), (0, jsx_runtime_1.jsx)(SearchBox_1.default, { variantPaper: "outlined", onSearch: handleKeyWordPassing, stylePaper: {
47
+ }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { component: "h1", variant: "h5", color: "inherit", noWrap: true, fontWeight: 'bold', children: t('Common.Notification') }), (0, jsx_runtime_1.jsx)(MenuNotification_1.default, { onUpdateMenuItem: handleUpdateMenuItem })] }), (0, jsx_runtime_1.jsx)(SearchBox_1.default, { onSearch: handleKeyWordPassing, stylePaper: {
47
48
  flex: 1,
48
49
  width: 'auto',
49
50
  maxWidth: '100%',
50
- borderRadius: '24px',
51
- padding: '2px 20px 2px 10px',
52
51
  } }), (0, jsx_runtime_1.jsx)(ButtonTabs_1.default, { tabActive: valueFilter.tabs, onUpdateTabActive: handleUpdateTabActive })] }));
53
52
  };
54
53
  exports.default = HeaderInfo;
@@ -24,9 +24,9 @@ var NotificationEmpty = function (props) {
24
24
  alignItems: 'center',
25
25
  justifyContent: 'space-between',
26
26
  }, children: [(0, jsx_runtime_1.jsx)("img", { src: (isSearch ? binoculars_svg_1.default : bell_svg_1.default), alt: isSearch ? 'iconBinoculars' : 'iconBell', style: { width: '80px', height: '80px' } }), (0, jsx_runtime_1.jsx)(material_1.Typography, { style: {
27
- fontSize: '1.3em',
27
+ fontSize: '20px',
28
28
  color: '#65676B',
29
- fontWeight: '600',
29
+ fontWeight: 600,
30
30
  marginTop: '10px',
31
31
  textAlign: 'center',
32
32
  }, children: isSearch
@@ -25,8 +25,8 @@ var material_1 = require("@mui/material");
25
25
  var NotificationAvatar = function (props) {
26
26
  var url = props.url, name = props.name;
27
27
  var styleAvatar = {
28
- width: '56px',
29
- height: '56px',
28
+ width: '54px',
29
+ height: '54px',
30
30
  border: '1px solid #0000001a',
31
31
  };
32
32
  if (!url) {
@@ -29,23 +29,26 @@ var NotificationContent = function (props) {
29
29
  textOverflow: 'ellipsis',
30
30
  display: '-webkit-box',
31
31
  WebkitBoxOrient: 'vertical',
32
- WebkitLineClamp: 2,
32
+ WebkitLineClamp: 5,
33
33
  margin: '0 0 2px 0',
34
34
  lineHeight: 1.2,
35
- fontSize: '1rem',
35
+ fontSize: '14px',
36
+ fontWeight: 400,
36
37
  justifyContent: 'space-between',
37
38
  },
38
39
  {
39
40
  '& h1, h2, h3, h4, h5, h6, p, span, b, strong, small, em, i, big': {
40
41
  marginTop: 0,
41
42
  marginBottom: 0,
42
- fontSize: '1rem',
43
+ fontSize: '14px',
44
+ fontWeight: 400,
43
45
  textAlign: 'justify',
44
46
  },
45
47
  '& a': {
46
48
  color: '#1a0dab',
47
49
  textDecoration: 'none',
48
- fontSize: '1rem',
50
+ fontSize: '14px',
51
+ fontWeight: 400,
49
52
  textAlign: 'justify',
50
53
  },
51
54
  },
@@ -25,10 +25,10 @@ var NotificationItem = function (props) {
25
25
  };
26
26
  var handleClickNotification = function () {
27
27
  navigate((0, Message_1.getFullDescription)(sagaTransactionType, t, fields).url);
28
- status === Types_1.NotificationMessageStatus.Read &&
28
+ status === Types_1.NotificationMessageStatus.Unread &&
29
29
  onUpdateStatus({ id: id, status: status });
30
30
  };
31
- var itemStatus = status === Types_1.NotificationMessageStatus.Read;
31
+ var itemStatus = status === Types_1.NotificationMessageStatus.Unread;
32
32
  return ((0, jsx_runtime_1.jsxs)(material_1.Box, { color: "inherit", onClick: handleClickNotification, sx: [
33
33
  {
34
34
  display: 'flex',
@@ -44,7 +44,7 @@ var NotificationList = function (props) {
44
44
  var _c = (0, react_1.useState)(notificationMessage), notifications = _c[0], setNotifications = _c[1];
45
45
  (0, react_1.useLayoutEffect)(function () {
46
46
  setNotifications(valueFilter.tabs === Constant_1.Constants.UNREAD
47
- ? notificationMessage.filter(function (item) { return item.status === Types_1.NotificationMessageStatus.Read; })
47
+ ? notificationMessage.filter(function (item) { return item.status === Types_1.NotificationMessageStatus.Unread; })
48
48
  : notificationMessage);
49
49
  }, [notificationMessage, valueFilter.tabs]);
50
50
  if (!notifications.length && !isLoading) {
@@ -3,6 +3,9 @@
3
3
  * @author dauquan1108@gmail.com on 11/27/2023.
4
4
  *
5
5
  **/
6
- import React from 'react';
7
- declare const NotificationDetail: React.FC;
6
+ /// <reference types="react" />
7
+ interface NotificationDetailProps {
8
+ onClosePopover?: () => void;
9
+ }
10
+ declare const NotificationDetail: (props: NotificationDetailProps) => JSX.Element;
8
11
  export default NotificationDetail;
@@ -61,8 +61,9 @@ var Constant_1 = require("../Constant");
61
61
  var Hooks_1 = __importDefault(require("../Hooks"));
62
62
  var NotificationList_1 = __importDefault(require("./NotificationList"));
63
63
  var Types_1 = require("../Types");
64
- var NotificationDetail = function () {
64
+ var NotificationDetail = function (props) {
65
65
  var service = (0, Hooks_1.default)().service;
66
+ var onClosePopover = props.onClosePopover;
66
67
  var _a = (0, react_1.useState)({
67
68
  textSearch: '',
68
69
  tabs: Constant_1.Constants.ALL,
@@ -71,6 +72,7 @@ var NotificationDetail = function () {
71
72
  var _b = react_1.default.useState(false), isLoading = _b[0], setIsLoading = _b[1];
72
73
  var _c = react_1.default.useState(-1), count = _c[0], setCount = _c[1];
73
74
  var _d = (0, react_1.useState)([]), notificationMessage = _d[0], setNotificationMessage = _d[1];
75
+ var totalItemCount = (0, react_1.useRef)(0);
74
76
  (0, react_1.useEffect)(function () {
75
77
  var observer = new IntersectionObserver(handleIntersection);
76
78
  var lastItem = document.getElementById('last-Item');
@@ -85,7 +87,9 @@ var NotificationDetail = function () {
85
87
  };
86
88
  }, []);
87
89
  (0, react_1.useEffect)(function () {
88
- if (count >= 0) {
90
+ if (count >= 0 &&
91
+ (totalItemCount.current > notificationMessage.length ||
92
+ notificationMessage.length === 0)) {
89
93
  setIsLoading(true);
90
94
  service
91
95
  .notificationsPaging(count, Constant_1.Constants.PAGE_SIZE_DEFAULT, valueFilter.textSearch, valueFilter.status, [])
@@ -96,6 +100,7 @@ var NotificationDetail = function () {
96
100
  });
97
101
  return __spreadArray(__spreadArray([], prevMessages, true), newItems, true);
98
102
  });
103
+ totalItemCount.current = res.totalItemCount;
99
104
  })
100
105
  .finally(function () {
101
106
  setIsLoading(false);
@@ -112,6 +117,7 @@ var NotificationDetail = function () {
112
117
  var handleValueFilter = function (textSearch, tabs) {
113
118
  textSearch.length === 0 ? setCount(0) : setCount(-1);
114
119
  setNotificationMessage([]);
120
+ totalItemCount.current = 0;
115
121
  setValueFilter({
116
122
  textSearch: textSearch,
117
123
  tabs: tabs,
@@ -123,12 +129,12 @@ var NotificationDetail = function () {
123
129
  var handleUpdateStatus = (0, react_1.useCallback)(function (dataSent) {
124
130
  if (typeof dataSent === 'string') {
125
131
  var isCheckStatus = notificationMessage.some(function (item) {
126
- return item.status === Types_1.NotificationMessageStatus.Read;
132
+ return item.status === Types_1.NotificationMessageStatus.Unread;
127
133
  });
128
134
  if (isCheckStatus) {
129
135
  service.notificationsReadAll().then(function () {
130
136
  setNotificationMessage(function (prevNotifications) {
131
- return prevNotifications.map(function (item) { return (__assign(__assign({}, item), { status: Types_1.NotificationMessageStatus.Unread })); });
137
+ return prevNotifications.map(function (item) { return (__assign(__assign({}, item), { status: Types_1.NotificationMessageStatus.Read })); });
132
138
  });
133
139
  });
134
140
  }
@@ -153,6 +159,6 @@ var NotificationDetail = function () {
153
159
  });
154
160
  }
155
161
  }, [notificationMessage, service]);
156
- return ((0, jsx_runtime_1.jsxs)(react_i18next_1.I18nextProvider, { i18n: i18n_1.default, children: [(0, jsx_runtime_1.jsx)(Box_1.default, { pt: 2, pl: 2, pr: 2, pb: 1, component: "div", children: (0, jsx_runtime_1.jsx)(HeaderInfo_1.default, { valueFilter: valueFilter, onValueFilter: handleValueFilter, onUpdateStatus: handleUpdateStatus }) }), (0, jsx_runtime_1.jsx)(Box_1.default, { pl: 1, pr: 1, pb: 1, component: "div", children: (0, jsx_runtime_1.jsx)(NotificationList_1.default, { isLoading: isLoading, valueFilter: valueFilter, notificationMessage: notificationMessage, onUpdateStatus: handleUpdateStatus }) }), (0, jsx_runtime_1.jsx)(Box_1.default, { id: "last-Item", component: "div", sx: { height: '20px' } })] }));
162
+ return ((0, jsx_runtime_1.jsxs)(react_i18next_1.I18nextProvider, { i18n: i18n_1.default, children: [(0, jsx_runtime_1.jsx)(Box_1.default, { pt: 2, pl: 2, pr: 2, pb: 1, component: "div", children: (0, jsx_runtime_1.jsx)(HeaderInfo_1.default, { valueFilter: valueFilter, onClosePopover: onClosePopover, onValueFilter: handleValueFilter, onUpdateStatus: handleUpdateStatus }) }), (0, jsx_runtime_1.jsx)(Box_1.default, { pl: 1, pr: 1, pb: 1, component: "div", children: (0, jsx_runtime_1.jsx)(NotificationList_1.default, { isLoading: isLoading, valueFilter: valueFilter, notificationMessage: notificationMessage, onUpdateStatus: handleUpdateStatus }) }), (0, jsx_runtime_1.jsx)(Box_1.default, { id: "last-Item", component: "div", sx: { height: '20px' } })] }));
157
163
  };
158
164
  exports.default = NotificationDetail;
@@ -144,6 +144,6 @@ var Container = function () {
144
144
  backgroundColor: '#c1c1c1',
145
145
  },
146
146
  },
147
- ], children: (0, jsx_runtime_1.jsx)(NotificationDetail_1.default, {}) }) })] }));
147
+ ], children: (0, jsx_runtime_1.jsx)(NotificationDetail_1.default, { onClosePopover: handleClose }) }) })] }));
148
148
  };
149
149
  exports.default = Container;
@@ -212,29 +212,25 @@ function ControlPanel(_a) {
212
212
  var onShowFilterEnhanced = function () {
213
213
  setIsHideFieldAdvanced(!isShowFilterEnhanced);
214
214
  };
215
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, justifyContent: "flex-end", spacing: 2, children: [(0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: 10, spacing: 2, sx: { paddingRight: '0.5rem' }, children: (0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, justifyContent: "flex-end", spacing: 2, children: elementInputs
216
- .filter(function (item) {
217
- return item.isEnhanced === false ||
218
- item.isEnhanced === undefined;
219
- })
220
- .map(function (fieldFilterEnhanced, idx) {
221
- return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: (fieldFilterEnhanced === null || fieldFilterEnhanced === void 0 ? void 0 : fieldFilterEnhanced.col)
222
- ? fieldFilterEnhanced === null || fieldFilterEnhanced === void 0 ? void 0 : fieldFilterEnhanced.col
223
- : 3 }, ((fieldFilterEnhanced === null || fieldFilterEnhanced === void 0 ? void 0 : fieldFilterEnhanced.type) ===
224
- Enums_1.TYPE_FILTERS.DATE_RANGE_PICKER
225
- ? {
226
- sx: {
227
- '& .MuiInputBase-input': {
228
- height: '1.25rem',
229
- },
230
- },
231
- }
232
- : {}), { children: fieldFilterEnhanced === null || fieldFilterEnhanced === void 0 ? void 0 : fieldFilterEnhanced.component }), idx) }));
233
- }) }) }), (0, jsx_runtime_1.jsxs)(material_1.Grid, { item: true, xs: 2, style: {
234
- paddingTop: '24px',
235
- display: 'flex',
236
- flex: 'none',
237
- }, justifyContent: "flex-end", children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "primary", onClick: getView, style: { height: '40px' }, disabled: (isLoadings === null || isLoadings === void 0 ? void 0 : isLoadings.chartLoading) ||
215
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Grid, { container: true, justifyContent: "flex-end", spacing: 2, children: [elementInputs
216
+ .filter(function (item) {
217
+ return item.isEnhanced === false ||
218
+ item.isEnhanced === undefined;
219
+ })
220
+ .map(function (fieldFilterEnhanced, idx) {
221
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, __assign({ item: true, xs: (fieldFilterEnhanced === null || fieldFilterEnhanced === void 0 ? void 0 : fieldFilterEnhanced.col)
222
+ ? fieldFilterEnhanced === null || fieldFilterEnhanced === void 0 ? void 0 : fieldFilterEnhanced.col
223
+ : 3 }, ((fieldFilterEnhanced === null || fieldFilterEnhanced === void 0 ? void 0 : fieldFilterEnhanced.type) ===
224
+ Enums_1.TYPE_FILTERS.DATE_RANGE_PICKER
225
+ ? {
226
+ sx: {
227
+ '& .MuiInputBase-input': {
228
+ height: '1.25rem',
229
+ },
230
+ },
231
+ }
232
+ : {}), { children: fieldFilterEnhanced === null || fieldFilterEnhanced === void 0 ? void 0 : fieldFilterEnhanced.component }), idx) }));
233
+ }), (0, jsx_runtime_1.jsxs)(material_1.Grid, { item: true, sx: { paddingTop: '24px !important' }, children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", color: "primary", onClick: getView, style: { height: '40px' }, disabled: (isLoadings === null || isLoadings === void 0 ? void 0 : isLoadings.chartLoading) ||
238
234
  (queryInput === null || queryInput === void 0 ? void 0 : queryInput.domainId) === '0', children: t('Common.View') }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", title: t('Common.Download'), onClick: function () { return onChangeExportInput(queryInput); }, color: "inherit", disabled: (isLoadings === null || isLoadings === void 0 ? void 0 : isLoadings.exportLoading) ||
239
235
  (queryInput === null || queryInput === void 0 ? void 0 : queryInput.domainId) === '0', style: {
240
236
  marginLeft: '16px',
@@ -246,7 +242,7 @@ function ControlPanel(_a) {
246
242
  width: '25px !important',
247
243
  height: '25px !important',
248
244
  } })) : ((0, jsx_runtime_1.jsx)(GetApp_1.default, {})) }), elementInputs.filter(function (item) { return item.isEnhanced === true; })
249
- .length > 0 && ((0, jsx_runtime_1.jsx)("div", { style: { marginLeft: '10px' }, children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: onShowFilterEnhanced, children: isShowFilterEnhanced ? ((0, jsx_runtime_1.jsx)(icons_material_1.ExpandMore, {})) : ((0, jsx_runtime_1.jsx)(icons_material_1.ExpandLess, {})) }) }))] })] }), isShowFilterEnhanced && ((0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, justifyContent: "flex-end", spacing: 2, sx: { paddingRight: '3rem' }, children: elementInputs
245
+ .length > 0 && ((0, jsx_runtime_1.jsx)(material_1.IconButton, { sx: { marginLeft: '10px' }, onClick: onShowFilterEnhanced, children: isShowFilterEnhanced ? ((0, jsx_runtime_1.jsx)(icons_material_1.ExpandMore, {})) : ((0, jsx_runtime_1.jsx)(icons_material_1.ExpandLess, {})) }))] })] }), isShowFilterEnhanced && ((0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, justifyContent: "flex-end", spacing: 2, sx: { paddingRight: '3rem' }, children: elementInputs
250
246
  .filter(function (item) { return item.isEnhanced === true; })
251
247
  .map(function (fieldFilterEnhanced, idx) {
252
248
  return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.Grid, { item: true, xs: (fieldFilterEnhanced === null || fieldFilterEnhanced === void 0 ? void 0 : fieldFilterEnhanced.col)
@@ -16,7 +16,7 @@ var TaskSchedulerContainer = function () {
16
16
  var navigate = (0, react_router_dom_1.useNavigate)();
17
17
  var t = (0, react_i18next_1.useTranslation)(undefined, { i18n: i18n_1.default }).t;
18
18
  var service = (0, Context_2.useTaskSchedulerProps)().service;
19
- var _a = react_1.default.useState(false), loading = _a[0], setloading = _a[1];
19
+ var _a = react_1.default.useState(true), loading = _a[0], setloading = _a[1];
20
20
  var _b = react_1.default.useState({ jobs: [], total: 0 }), data = _b[0], setData = _b[1];
21
21
  var appHelper = (0, Context_1.useAwing)().appHelper;
22
22
  var handleGetJob = function (queryParams) {
@@ -16,7 +16,7 @@ var Container = function () {
16
16
  var t = (0, react_i18next_1.useTranslation)().t;
17
17
  var _a = (0, Hook_1.default)(), service = _a.service, currentUser = _a.currentUser;
18
18
  var _b = (0, Context_1.useAwing)().appHelper, confirm = _b.confirm, snackbar = _b.snackbar;
19
- var _c = (0, react_1.useState)(false), loading = _c[0], setLoading = _c[1];
19
+ var _c = (0, react_1.useState)(true), loading = _c[0], setLoading = _c[1];
20
20
  var _d = (0, react_1.useState)(), users = _d[0], setUsers = _d[1];
21
21
  var handleNavigate = function () {
22
22
  window.open("".concat(window.REACT_APP_ID_DOMAIN, "/organization/").concat(currentUser.userId, "/User"), '_blank');
@@ -657,6 +657,8 @@
657
657
  "CampaignDefault": "Campaign Default"
658
658
  },
659
659
  "Notification": {
660
+ "All": "All",
661
+ "Unread": "Unread",
660
662
  "TitleManagement": "Notification Management",
661
663
  "TitleDetail": "Reciever detail",
662
664
  "TitleAddReceiver": "Add User/Group User",
@@ -659,6 +659,8 @@
659
659
  "CampaignDefault": "Chiến dịch mặc định"
660
660
  },
661
661
  "Notification": {
662
+ "All": "Tất cả",
663
+ "Unread": "Chưa đọc",
662
664
  "TitleManagement": "Quản trị thông báo",
663
665
  "TitleDetail": "Chi tiết người nhận thông báo",
664
666
  "TitleAddReceiver": "Thêm người dùng/nhóm người dùng",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "awing-library",
3
- "version": "2.1.7",
3
+ "version": "2.1.8",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",