@axelor/aos-mobile-core 7.2.4 → 7.2.5
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/api/anomaly-api.js +1 -1
- package/lib/api/attached-files-api.js +1 -1
- package/lib/api/login-api.js +1 -1
- package/lib/api/mail-message-api.js +1 -1
- package/lib/api/menu-config-api.js +2 -2
- package/lib/api/menu-config-api.js.map +1 -1
- package/lib/api/meta-module-api.js +1 -1
- package/lib/api/metafile-api.js +1 -1
- package/lib/api/mobile-config-api.js +1 -1
- package/lib/api/model-api.js +1 -1
- package/lib/api/net-info-utils.js +1 -1
- package/lib/api/traceback-api.js +1 -1
- package/lib/api/user-api.js +1 -1
- package/lib/apiProviders/Action/ActionApiProvider.js +1 -1
- package/lib/apiProviders/Action/ActionProvider.js +1 -1
- package/lib/apiProviders/Action/AosActionApi.js +1 -1
- package/lib/apiProviders/Action/GatewayActionApi.js +1 -1
- package/lib/apiProviders/Action/index.js +1 -1
- package/lib/apiProviders/Action/utils.js +1 -1
- package/lib/apiProviders/Model/AopModelApi.js +1 -1
- package/lib/apiProviders/Model/GatewayModelApi.js +1 -1
- package/lib/apiProviders/Model/ModelApiProvider.js +1 -1
- package/lib/apiProviders/Model/Provider.js +1 -1
- package/lib/apiProviders/Model/index.js +1 -1
- package/lib/apiProviders/Model/utils.js +1 -1
- package/lib/apiProviders/Standard/AxiosProvider.js +1 -1
- package/lib/apiProviders/Standard/ObjectFieldsProvider.js +1 -1
- package/lib/apiProviders/Standard/index.js +1 -1
- package/lib/apiProviders/Standard/requests.helper.js +1 -1
- package/lib/apiProviders/config.js +1 -1
- package/lib/apiProviders/index.js +1 -1
- package/lib/apiProviders/middlewares/fieldParser.js +1 -1
- package/lib/apiProviders/middlewares/index.js +1 -1
- package/lib/apiProviders/middlewares/translation.js +1 -1
- package/lib/apiProviders/utils.js +1 -1
- package/lib/app/Application.js +1 -1
- package/lib/app/ContextedApplication.js +1 -1
- package/lib/app/ContextsProvider.js +1 -1
- package/lib/app/Module.js +1 -1
- package/lib/app/RootNavigator.js +8 -6
- package/lib/app/RootNavigator.js.map +1 -1
- package/lib/app/context.helper.js +1 -1
- package/lib/app/index.js +1 -1
- package/lib/app/module-generation.helper.js +1 -1
- package/lib/app/types.js +1 -1
- package/lib/auth/api/company-api.js +1 -1
- package/lib/auth/api/config-api.js +1 -1
- package/lib/auth/api/index.js +1 -1
- package/lib/auth/api/language-api.js +1 -1
- package/lib/auth/api/user-api.js +1 -1
- package/lib/auth/components/index.js +1 -1
- package/lib/auth/components/molecules/TranslationsButton/TranslationsButton.js +1 -1
- package/lib/auth/components/molecules/index.js +1 -1
- package/lib/auth/features/asyncFunctionsIndex.js +1 -1
- package/lib/auth/features/companySlice.js +1 -1
- package/lib/auth/features/configSlice.js +1 -1
- package/lib/auth/features/index.js +1 -1
- package/lib/auth/features/languageSlice.js +1 -1
- package/lib/auth/features/userSlice.js +1 -1
- package/lib/auth/hooks/use-auth-headers.js +1 -1
- package/lib/auth/index.js +1 -1
- package/lib/auth/models/index.js +1 -1
- package/lib/auth/models/objectFields.js +1 -1
- package/lib/auth/screens/SettingsScreen.js +1 -1
- package/lib/auth/screens/UserScreen.js +1 -1
- package/lib/auth/screens/index.js +1 -1
- package/lib/components/external/Camera/Camera.js +1 -1
- package/lib/components/external/Camera/CaptureButton.js +1 -1
- package/lib/components/external/CameraScanner/CameraScanner.js +1 -1
- package/lib/components/external/CodeHighlighter/CodeHighlighter.js +1 -1
- package/lib/components/external/CodeHighlighter/code-highlighter.helper.js +1 -1
- package/lib/components/external/PlanningView/PlanningView.js +1 -1
- package/lib/components/external/PlanningView/agenda.helpers.js +1 -1
- package/lib/components/external/Scanner/Scanner.js +1 -1
- package/lib/components/external/Stopwatch/Stopwatch.js +1 -1
- package/lib/components/external/Timer/Timer.js +1 -1
- package/lib/components/external/index.js +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/molecules/CameraButton/CameraButton.js +1 -1
- package/lib/components/molecules/DatePicker/DatePicker.js +1 -1
- package/lib/components/molecules/HeaderBand/HeaderBand.js +1 -1
- package/lib/components/molecules/HeaderOptionsMenuItem/HeaderOptionMenuItem.js +1 -1
- package/lib/components/molecules/InputBarCodeCard/InputBarCodeCard.js +1 -1
- package/lib/components/molecules/MailMessageReadIcon/MailMessageReadIcon.js +1 -1
- package/lib/components/molecules/TrackItem/TrackItem.js +1 -1
- package/lib/components/molecules/UploadFileInput/UploadFileInput.js +1 -1
- package/lib/components/molecules/index.js +1 -1
- package/lib/components/organisms/AOSImage/AOSImage.js +1 -1
- package/lib/components/organisms/AOSImageBubble/AOSImageBubble.js +1 -1
- package/lib/components/organisms/AnomalyBubble/AnomalyBubble.js +1 -1
- package/lib/components/organisms/AnomalyList/AnomalyList.js +1 -1
- package/lib/components/organisms/DateInput/DateInput.d.ts +1 -1
- package/lib/components/organisms/DateInput/DateInput.js +2 -2
- package/lib/components/organisms/DateInput/DateInput.js.map +1 -1
- package/lib/components/organisms/DateInput/date-input.helper.js +1 -1
- package/lib/components/organisms/HeaderBandList/HeaderBandList.js +1 -1
- package/lib/components/organisms/HeaderOptionsMenu/HeaderOptionsMenu.js +1 -1
- package/lib/components/organisms/MailMessageCard/MailMessageCard.js +1 -1
- package/lib/components/organisms/MailMessageCommentCard/MailMessageCommentCard.js +1 -1
- package/lib/components/organisms/MailMessageNotificationCard/MailMessageNotificationCard.js +1 -1
- package/lib/components/organisms/ScannerAutocompleteSearch/ScannerAutocompleteSearch.js +1 -1
- package/lib/components/organisms/index.js +1 -1
- package/lib/components/pages/FormView/Alerts/ConstraintsValidatorPopup.js +1 -1
- package/lib/components/pages/FormView/Alerts/index.js +1 -1
- package/lib/components/pages/FormView/Components/Field.js +3 -2
- package/lib/components/pages/FormView/Components/Field.js.map +1 -1
- package/lib/components/pages/FormView/Components/Panel.js +1 -1
- package/lib/components/pages/FormView/Components/index.js +1 -1
- package/lib/components/pages/FormView/Custom/CustomButton.js +1 -1
- package/lib/components/pages/FormView/Custom/CustomPasswordInput.js +1 -1
- package/lib/components/pages/FormView/Custom/CustomPicker.js +1 -1
- package/lib/components/pages/FormView/Custom/CustomSearchBar.js +1 -1
- package/lib/components/pages/FormView/Custom/index.js +1 -1
- package/lib/components/pages/FormView/FormView.js +1 -1
- package/lib/components/pages/index.js +1 -1
- package/lib/components/templates/AttachedFilesView/AttachedFilesView.js +1 -1
- package/lib/components/templates/MailMessageView/MailMessageView.js +2 -2
- package/lib/components/templates/MailMessageView/MailMessageView.js.map +1 -1
- package/lib/components/templates/PopupApplicationInformation/PopupApplicationInformation.js +1 -1
- package/lib/components/templates/PopupMinimalRequiredVersion/PopupMinimalRequiredVersion.js +1 -1
- package/lib/components/templates/SocialNetworkLinks/SocialNetworkLinks.js +1 -1
- package/lib/components/templates/UserSearchBar/UserSearchBar.js +1 -1
- package/lib/components/templates/index.js +1 -1
- package/lib/config/RouterProvider.js +1 -1
- package/lib/config/index.js +1 -1
- package/lib/config/routes.js +1 -1
- package/lib/features/attachedFilesSlice.js +1 -1
- package/lib/features/authSlice.js +1 -1
- package/lib/features/cameraScannerSlice.js +1 -1
- package/lib/features/cameraSlice.js +1 -1
- package/lib/features/formSlice.js +1 -1
- package/lib/features/index.js +1 -1
- package/lib/features/mailMessageSlice.js +1 -1
- package/lib/features/menuConfigSlice.js +1 -1
- package/lib/features/metaJsonFieldSlice.js +1 -1
- package/lib/features/metaModuleSlice.js +1 -1
- package/lib/features/metafileSlice.js +1 -1
- package/lib/features/mobileConfigSlice.js +1 -1
- package/lib/features/onlineSlice.js +1 -1
- package/lib/features/scannerSlice.js +1 -1
- package/lib/features/userSlice.js +1 -1
- package/lib/forms/FormConfigsProvider.d.ts +1 -0
- package/lib/forms/FormConfigsProvider.js +10 -4
- package/lib/forms/FormConfigsProvider.js.map +1 -1
- package/lib/forms/api.helpers.js +1 -1
- package/lib/forms/display.helpers.js +1 -1
- package/lib/forms/index.js +1 -1
- package/lib/forms/register.helpers.js +1 -1
- package/lib/forms/studio/api.helpers.js +1 -1
- package/lib/forms/studio/display.helpers.js +1 -1
- package/lib/forms/studio/formula.helpers.js +1 -1
- package/lib/forms/studio/index.js +1 -1
- package/lib/forms/types.js +1 -1
- package/lib/forms/validation.helpers.js +1 -1
- package/lib/header/HeaderActionsProvider.d.ts +5 -2
- package/lib/header/HeaderActionsProvider.js +22 -19
- package/lib/header/HeaderActionsProvider.js.map +1 -1
- package/lib/header/HeaderBandContext.js +1 -1
- package/lib/header/header-band-context.helper.js +1 -1
- package/lib/header/hooks.js +15 -5
- package/lib/header/hooks.js.map +1 -1
- package/lib/header/index.js +1 -1
- package/lib/header/types.js +1 -1
- package/lib/header/utils.js +1 -1
- package/lib/hooks/use-background-function.js +1 -1
- package/lib/hooks/use-effect-debugger.js +1 -1
- package/lib/hooks/use-header-registers.js +1 -1
- package/lib/hooks/use-navigation.js +1 -1
- package/lib/hooks/use-scan-activator.js +1 -1
- package/lib/i18n/api/translation.js +1 -1
- package/lib/i18n/component/Translator.js +1 -1
- package/lib/i18n/helpers/langages.js +1 -1
- package/lib/i18n/helpers/translations.js +1 -1
- package/lib/i18n/hooks/use-translator.js +1 -1
- package/lib/i18n/i18n.js +1 -1
- package/lib/i18n/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/models/index.js +1 -1
- package/lib/models/objectFields.js +1 -1
- package/lib/models/searchFields.js +1 -1
- package/lib/models/sortFields.js +1 -1
- package/lib/navigator/Navigator.js +4 -5
- package/lib/navigator/Navigator.js.map +1 -1
- package/lib/navigator/drawer/AuthMenuIconButton.js +1 -1
- package/lib/navigator/drawer/BackIcon.js +1 -1
- package/lib/navigator/drawer/DrawerContent.js +1 -1
- package/lib/navigator/drawer/DrawerToggleButton.js +1 -1
- package/lib/navigator/drawer/Header.js +6 -11
- package/lib/navigator/drawer/Header.js.map +1 -1
- package/lib/navigator/drawer/Menu.js +1 -1
- package/lib/navigator/drawer/MenuIconButton.js +1 -1
- package/lib/navigator/drawer/MenuItem.js +1 -1
- package/lib/navigator/drawer/MenuItemEntry.js +1 -1
- package/lib/navigator/drawer/MenuTitle.js +1 -1
- package/lib/navigator/drawer/SubMenuItem.js +1 -1
- package/lib/navigator/drawer/SubMenuItemList.js +1 -1
- package/lib/navigator/menu.helper.js +1 -1
- package/lib/navigator/module.helper.d.ts +1 -1
- package/lib/navigator/module.helper.js +16 -15
- package/lib/navigator/module.helper.js.map +1 -1
- package/lib/navigator/roles.helper.js +1 -1
- package/lib/redux/hooks.js +1 -1
- package/lib/redux/store.js +1 -1
- package/lib/screens/AttachedFilesScreen.js +1 -1
- package/lib/screens/BarcodeDisplayScreen.js +1 -1
- package/lib/screens/ErrorScreen.js +1 -1
- package/lib/screens/JsonFieldScreen.js +1 -1
- package/lib/screens/LoginScreen.js +1 -1
- package/lib/screens/MailMessageScreen.js +1 -1
- package/lib/screens/SessionManagementScreen.js +1 -1
- package/lib/screens/index.js +1 -1
- package/lib/sessions/SessionStorage.js +1 -1
- package/lib/sessions/components/alerts/PopupCreateSession.js +1 -1
- package/lib/sessions/components/alerts/PopupEditSession.js +1 -1
- package/lib/sessions/components/alerts/PopupSession.js +1 -1
- package/lib/sessions/components/alerts/index.js +1 -1
- package/lib/sessions/components/display/LogoImage.js +1 -1
- package/lib/sessions/components/display/SessionCard.js +1 -1
- package/lib/sessions/components/display/SessionListCard.js +1 -1
- package/lib/sessions/components/display/index.js +1 -1
- package/lib/sessions/components/error/ErrorText.js +1 -1
- package/lib/sessions/components/error/index.js +1 -1
- package/lib/sessions/components/index.js +1 -1
- package/lib/sessions/components/inputs/DefaultCheckbox.js +1 -1
- package/lib/sessions/components/inputs/PasswordInput.js +1 -1
- package/lib/sessions/components/inputs/SessionInputs.js +1 -1
- package/lib/sessions/components/inputs/SessionNameInput.js +1 -1
- package/lib/sessions/components/inputs/UrlInput.js +1 -1
- package/lib/sessions/components/inputs/UsernameInput.js +1 -1
- package/lib/sessions/components/inputs/index.js +1 -1
- package/lib/sessions/hook.js +1 -1
- package/lib/sessions/index.js +1 -1
- package/lib/sessions/type.js +1 -1
- package/lib/sessions/utils.js +1 -1
- package/lib/storage/Storage.js +1 -1
- package/lib/tools/ClipboardProvider.js +1 -1
- package/lib/tools/ContactProvider.js +1 -1
- package/lib/tools/FilePicker.js +1 -1
- package/lib/tools/FileViewer.js +1 -1
- package/lib/tools/LinkingProvider.js +1 -1
- package/lib/tools/contact.helper.js +1 -1
- package/lib/tools/index.js +1 -1
- package/lib/tools/linking.helper.js +1 -1
- package/lib/types/anomaly-type.js +1 -1
- package/lib/types/index.js +1 -1
- package/lib/types/mail-message-notification-type.js +1 -1
- package/lib/types/stopwatch-type.js +1 -1
- package/lib/utils/agenda.js +1 -1
- package/lib/utils/api.js +1 -1
- package/lib/utils/date.js +1 -1
- package/lib/utils/displayers.js +1 -1
- package/lib/utils/filter.js +1 -1
- package/lib/utils/formatters.js +1 -1
- package/lib/utils/image.js +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/list.js +1 -1
- package/lib/utils/object.js +1 -1
- package/lib/utils/show-toast-message.js +1 -1
- package/lib/utils/string.js +1 -1
- package/lib/utils/time.js +1 -1
- package/package.json +3 -3
package/lib/header/hooks.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
18
|
import { useNavigation } from '@react-navigation/native';
|
|
19
|
-
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
19
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
20
20
|
import { useDispatch, useSelector } from 'react-redux';
|
|
21
21
|
import { countAttachmentFiles } from '../features/attachedFilesSlice';
|
|
22
22
|
import { countUnreadMailMessages } from '../features/mailMessageSlice';
|
|
@@ -26,10 +26,13 @@ import { fetchModel } from '../api/model-api';
|
|
|
26
26
|
import { useOnline } from '../features/onlineSlice';
|
|
27
27
|
import { getNetInfo } from '../api/net-info-utils';
|
|
28
28
|
import { fetchJsonFieldsOfModel } from '../forms';
|
|
29
|
+
import { useIsFocused } from '../hooks/use-navigation';
|
|
29
30
|
export const useBasicActions = ({ model, modelId, disableMailMessages, disableJsonFields = false, attachedFileScreenTitle, barcodeFieldname = 'barCode', }) => {
|
|
30
31
|
const navigation = useNavigation();
|
|
31
32
|
const I18n = useTranslator();
|
|
32
33
|
const online = useOnline();
|
|
34
|
+
const connectionInterval = useRef();
|
|
35
|
+
const isFocused = useIsFocused();
|
|
33
36
|
const dispatch = useDispatch();
|
|
34
37
|
const { attachments } = useSelector(state => state.attachedFiles);
|
|
35
38
|
const { unreadMessages } = useSelector(state => state.mailMessages);
|
|
@@ -76,9 +79,16 @@ export const useBasicActions = ({ model, modelId, disableMailMessages, disableJs
|
|
|
76
79
|
setIsConnected(_isConnected);
|
|
77
80
|
}, []);
|
|
78
81
|
useEffect(() => {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
if (isFocused) {
|
|
83
|
+
connectionInterval.current = setInterval(checkInternetConnection, 2000);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
clearInterval(connectionInterval.current);
|
|
87
|
+
}
|
|
88
|
+
return () => {
|
|
89
|
+
clearInterval(connectionInterval.current);
|
|
90
|
+
};
|
|
91
|
+
}, [checkInternetConnection, isFocused]);
|
|
82
92
|
const mailMessagesAction = useMemo(() => {
|
|
83
93
|
return {
|
|
84
94
|
key: 'mailMessages',
|
package/lib/header/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/header/hooks.js"],"names":[],"mappings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Y,EAAE,IAAI;SACnB,CAAC;IACJ,CAAC,EAAE;QACD,IAAI;QACJ,iBAAiB;QACjB,iBAAiB;QACjB,MAAM,CAAC,SAAS;QAChB,WAAW;QACX,UAAU;QACV,KAAK;QACL,OAAO;KACR,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,IAAI,eAAe,EAAE;YACnB,OAAO;gBACL,kBAAkB;gBAClB,mBAAmB;gBACnB,aAAa;gBACb,gBAAgB;aACjB,CAAC;SACH;QAED,OAAO;YACL,kBAAkB,EAAE,EAAC,GAAG,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,EAAC;YACvD,mBAAmB,EAAE,EAAC,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,EAAC;YACzD,aAAa,EAAE,EAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAC;YAC7C,gBAAgB,EAAE,EAAC,GAAG,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAC;SACxD,CAAC;IACJ,CAAC,EAAE;QACD,mBAAmB;QACnB,aAAa;QACb,gBAAgB;QAChB,kBAAkB;QAClB,eAAe;KAChB,CAAC,CAAC;AACL,CAAC,CAAC"}
|
package/lib/header/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
package/lib/header/types.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
package/lib/header/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
package/lib/i18n/i18n.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
package/lib/i18n/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
package/lib/models/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
package/lib/models/sortFields.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -21,7 +21,7 @@ import { createDrawerNavigator } from '@react-navigation/drawer';
|
|
|
21
21
|
import { createStackNavigator } from '@react-navigation/stack';
|
|
22
22
|
import { useThemeColor } from '@axelor/aos-mobile-ui';
|
|
23
23
|
import DrawerContent from './drawer/DrawerContent';
|
|
24
|
-
import { filterAuthorizedModules, getDefaultModule, manageOverridingMenus, manageWebCompatibility, moduleHasMenus,
|
|
24
|
+
import { filterAuthorizedModules, getDefaultModule, manageOverridingMenus, manageWebCompatibility, moduleHasMenus, } from './module.helper';
|
|
25
25
|
import { manageSubMenusOverriding, getMenuTitle, hasSubMenus, } from './menu.helper';
|
|
26
26
|
import useTranslator from '../i18n/hooks/use-translator';
|
|
27
27
|
import { useDispatch, useSelector } from 'react-redux';
|
|
@@ -45,7 +45,7 @@ const Navigator = ({ modules, mainMenu, onRefresh, version, versionCheckConfig,
|
|
|
45
45
|
const I18n = useTranslator();
|
|
46
46
|
const Colors = useThemeColor();
|
|
47
47
|
const dispatch = useDispatch();
|
|
48
|
-
const enabledModule = useMemo(() => manageWebCompatibility(manageOverridingMenus(manageSubMenusOverriding(filterAuthorizedModules(modules, mobileConfigs, user))), metaModules), [metaModules, mobileConfigs, modules, user]);
|
|
48
|
+
const enabledModule = useMemo(() => manageWebCompatibility(manageOverridingMenus(manageSubMenusOverriding(filterAuthorizedModules(modules, mobileConfigs, restrictedMenus, user))), metaModules), [metaModules, mobileConfigs, modules, restrictedMenus, user]);
|
|
49
49
|
const [activeModule, setActiveModule] = useState(getDefaultModule(enabledModule, mainMenu));
|
|
50
50
|
useEffect(() => {
|
|
51
51
|
dispatch(fetchMobileConfig());
|
|
@@ -57,10 +57,9 @@ const Navigator = ({ modules, mainMenu, onRefresh, version, versionCheckConfig,
|
|
|
57
57
|
}, [enabledModule]);
|
|
58
58
|
const modulesMenus = useMemo(() => {
|
|
59
59
|
return enabledModule
|
|
60
|
-
.map(_module => updateAccessibleMenus(_module, restrictedMenus, user))
|
|
61
60
|
.filter(moduleHasMenus)
|
|
62
61
|
.reduce((menus, _module) => ({ ...menus, ..._module.menus }), {});
|
|
63
|
-
}, [enabledModule
|
|
62
|
+
}, [enabledModule]);
|
|
64
63
|
const modulesScreens = useMemo(() => modules.reduce((screens, module) => ({ ...screens, ...module.screens }), {
|
|
65
64
|
...BaseScreen,
|
|
66
65
|
}), [modules]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Navigator.js","sourceRoot":"","sources":["../../src/navigator/Navigator.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EACZ,aAAa,EACb,WAAW,EACX,SAAS,EACT,OAAO,EACP,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAC,MAAM,cAAc,CAAC;AAClD,OAAO,EAAC,qBAAqB,EAAC,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAC,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACpD,OAAO,aAAa,MAAM,wBAAwB,CAAC;AACnD,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,cAAc,
|
|
1
|
+
{"version":3,"file":"Navigator.js","sourceRoot":"","sources":["../../src/navigator/Navigator.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EACZ,aAAa,EACb,WAAW,EACX,SAAS,EACT,OAAO,EACP,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAC,MAAM,cAAc,CAAC;AAClD,OAAO,EAAC,qBAAqB,EAAC,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAC,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACpD,OAAO,aAAa,MAAM,wBAAwB,CAAC;AACnD,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,cAAc,GACf,MA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nC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -22,24 +22,19 @@ import DrawerToggleButton from './DrawerToggleButton';
|
|
|
22
22
|
import BackIcon from './BackIcon';
|
|
23
23
|
import { useTranslator } from '../../i18n';
|
|
24
24
|
import { HeaderOptionsMenu } from '../../components';
|
|
25
|
-
import {
|
|
25
|
+
import { headerActionsProvider, useHeaderActions } from '../../header';
|
|
26
26
|
const TIME_BEFORE_RETRY = 500;
|
|
27
27
|
const Header = ({ mainScreen, title, actionID = null, shadedHeader = true }) => {
|
|
28
28
|
const Colors = useThemeColor();
|
|
29
29
|
const I18n = useTranslator();
|
|
30
30
|
let timeOutRequestCall = useRef();
|
|
31
|
-
const { headers } = useHeaderActions();
|
|
31
|
+
const { headers } = useHeaderActions(actionID);
|
|
32
32
|
const [options, setOptions] = useState();
|
|
33
33
|
useEffect(() => {
|
|
34
|
-
setOptions(
|
|
35
|
-
}, [
|
|
34
|
+
setOptions(headers);
|
|
35
|
+
}, [headers]);
|
|
36
36
|
const handleTimeOut = useCallback(() => {
|
|
37
|
-
setOptions(
|
|
38
|
-
if (_current == null) {
|
|
39
|
-
return headerActionsProvider.getHeaderOptions(actionID);
|
|
40
|
-
}
|
|
41
|
-
return _current;
|
|
42
|
-
});
|
|
37
|
+
setOptions(headerActionsProvider.getHeaderOptions(actionID));
|
|
43
38
|
}, [actionID]);
|
|
44
39
|
useEffect(() => {
|
|
45
40
|
const id = setTimeout(handleTimeOut, TIME_BEFORE_RETRY);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../src/navigator/drawer/Header.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/E,OAAO,EAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,IA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AAC,CAAC,CAAC,EAAE;QACzE,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK;QACrC,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,eAAe;QAC/B,UAAU,EAAE,QAAQ;QACpB,YAAY,EAAE,QAAQ;KACvB;IACD,YAAY,EAAE;QACZ,SAAS,EAAE,CAAC;QACZ,aAAa,EAAE,GAAG;QAClB,WAAW,EAAE,MAAM,CAAC,cAAc,CAAC,UAAU;QAC7C,YAAY,EAAE,EAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC;KACpC;IACD,OAAO,EAAE;QACP,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,YAAY,EAAE,QAAQ;KACvB;CACF,CAAC,CAAC;AAEL,eAAe,MAAM,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Module } from '../app';
|
|
2
2
|
import { Compatibility } from '../app/Module';
|
|
3
|
-
export declare function filterAuthorizedModules(modules: any, mobileConfigs: any, user: any): any;
|
|
3
|
+
export declare function filterAuthorizedModules(modules: any, mobileConfigs: any, restrictedMenus: any, user: any): any[];
|
|
4
4
|
export declare function findIndexAndObjectOfModule(modules: Module[], moduleName: string): {
|
|
5
5
|
module: Module;
|
|
6
6
|
index: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Axelor Business Solutions
|
|
3
3
|
*
|
|
4
|
-
* Copyright (C)
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
5
|
*
|
|
6
6
|
* This program is free software: you can redistribute it and/or modify
|
|
7
7
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
@@ -17,26 +17,27 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { isMenuEnabled } from './menu.helper';
|
|
19
19
|
import { userHaveAccessToConfig } from './roles.helper';
|
|
20
|
-
export function filterAuthorizedModules(modules, mobileConfigs, user) {
|
|
21
|
-
if (modules
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
export function filterAuthorizedModules(modules, mobileConfigs, restrictedMenus, user) {
|
|
21
|
+
if (!Array.isArray(modules) || modules.length === 0) {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
else if (!Array.isArray(mobileConfigs) || mobileConfigs.length === 0) {
|
|
25
25
|
return modules;
|
|
26
26
|
}
|
|
27
27
|
const authorizedModules = [];
|
|
28
28
|
modules.forEach(_module => {
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
const updatedModule = updateAccessibleMenus(_module, restrictedMenus, user);
|
|
30
|
+
const mobileConfigForModule = mobileConfigs?.find(config => config.sequence === updatedModule.name);
|
|
31
|
+
if (mobileConfigForModule == null) {
|
|
32
|
+
authorizedModules.push(updatedModule);
|
|
32
33
|
}
|
|
33
|
-
else if (mobileConfigForModule
|
|
34
|
-
if (mobileConfigForModule
|
|
35
|
-
mobileConfigForModule
|
|
36
|
-
authorizedModules.push(
|
|
34
|
+
else if (mobileConfigForModule.isAppEnabled) {
|
|
35
|
+
if (!Array.isArray(mobileConfigForModule.authorizedRoles) ||
|
|
36
|
+
mobileConfigForModule.authorizedRoles.length === 0) {
|
|
37
|
+
authorizedModules.push(updatedModule);
|
|
37
38
|
}
|
|
38
|
-
else if (userHaveAccessToConfig({ config: mobileConfigForModule
|
|
39
|
-
authorizedModules.push(
|
|
39
|
+
else if (userHaveAccessToConfig({ config: mobileConfigForModule, user: user })) {
|
|
40
|
+
authorizedModules.push(updatedModule);
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
});
|