@asaleh37/ui-base 25.6.2-0.2 → 25.6.2-0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asaleh37/ui-base",
3
- "version": "25.6.20.2",
3
+ "version": "25.6.20.3",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "Ahmed Saleh Mohamed",
@@ -12,7 +12,7 @@ const MyNotificationsPanel: React.FC = () => {
12
12
  const AppLayout = useSelector((state: any) => state.AppLayout);
13
13
  const { handleGetRequest, handlePostRequest } = useAxios();
14
14
  const [notifications, setNotifications] = useState<Array<Notification>>([]);
15
-
15
+ const AppInfo = useSelector((state: any) => state.AppInfo.value);
16
16
  const acknowledgeAllCurrentNotifications = async () => {
17
17
  await handlePostRequest({
18
18
  endPointURI: "api/v1/public/notification/all/notified",
@@ -38,7 +38,13 @@ const MyNotificationsPanel: React.FC = () => {
38
38
  });
39
39
  }
40
40
  };
41
- useInterval(loadUserNotifications, notificationsCheckIntervalSeconds * 1000);
41
+ if (AppInfo?.enableUINotifications === true) {
42
+ useInterval(
43
+ loadUserNotifications,
44
+ notificationsCheckIntervalSeconds * 1000
45
+ );
46
+ }
47
+
42
48
  return (
43
49
  <>
44
50
  <Box
@@ -190,8 +190,11 @@ const TopBar: React.FC = () => {
190
190
  ) : (
191
191
  <></>
192
192
  )}
193
-
194
- <NotificationButton />
193
+ {AppInfo?.enableUINotifications === true ? (
194
+ <NotificationButton />
195
+ ) : (
196
+ <></>
197
+ )}
195
198
  <AttachmentImageViewer
196
199
  showAsAvatar={true}
197
200
  attachmentCode="EMPLOYEE_PHOTOS"
@@ -19,6 +19,7 @@ export type AppInfo = {
19
19
  businessCommonStoresMetaData?: { [key: string]: StoreMetaData };
20
20
  muiPremiumKey: string;
21
21
  enableAdministrationModule: boolean;
22
+ enableUINotifications: Boolean;
22
23
  appTheme?: {
23
24
  light: { primaryColor: string; secondaryColor: string };
24
25
  dark: { primaryColor: string; secondaryColor: string };
@@ -38,6 +39,7 @@ const initialState: AppInfoProp = {
38
39
  appLogo: null,
39
40
  muiPremiumKey: null,
40
41
  enableAdministrationModule: false,
42
+ enableUINotifications: false,
41
43
  businessRoutes: [],
42
44
  businessNavigationItems: [],
43
45
  businessReduxReducers: {},