@fto-consult/expo-ui 5.8.1 → 5.8.2

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/appConfig.txt CHANGED
@@ -21,4 +21,6 @@
21
21
  getTableData : {function(tableName)=>table} retourne l'ojet table data,
22
22
  swrRefreshTimeout : {number} le délai d'inactivité auquel, une fois l'application active, les données de type listData sont rafraichies
23
23
  handleHelpScreen : {boolean}, //if Help screen will be added on navigation's main drawer
24
+
25
+ checkNavigationPermsOnTableOrStructData : {boolean}, si le test de la permission sur la table data où sur la struct data sera effectuée lorsqu'on appelera la fonction navigateToTableData ou navigateToStructData
24
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "5.8.1",
3
+ "version": "5.8.2",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -61,7 +61,7 @@
61
61
  "@emotion/native": "^11.10.6",
62
62
  "@expo/html-elements": "^0.2.0",
63
63
  "@expo/vector-icons": "^13.0.0",
64
- "@fto-consult/common": "^3.11.3",
64
+ "@fto-consult/common": "^3.10.70",
65
65
  "@gorhom/portal": "^1.0.14",
66
66
  "@react-native-async-storage/async-storage": "^1.17.11",
67
67
  "@react-native-community/datetimepicker": "^6.7.3",
@@ -3,7 +3,7 @@
3
3
  // license that can be found in the LICENSE file.
4
4
  import {navigate,sanitizeName} from "$cnavigation";
5
5
  import {isNonNullString,defaultStr,defaultObj,isObj} from "$cutils";
6
-
6
+ import appConfig from "$capp/config";
7
7
 
8
8
  export const tableDataRouteName = 'TableData';
9
9
 
@@ -25,10 +25,12 @@ const navigateToTableOrStructData = function(tableName,params,actionType){
25
25
  const isTableData = actionType =='tabledata';
26
26
  if(isNonNullString(perm)){
27
27
  isAllowed = Auth.isAllowedFromStr(perm)
28
- } else if(actionType =='structdata') {
29
- isAllowed = Auth.isStructDataAllowed({table:tableName})
30
- } else if(isTableData){
31
- isAllowed = Auth.isTableDataAllowed({table:tableName});
28
+ } else if(appConfig.checkNavigationPermsOnTableOrStructData !== false){
29
+ if(actionType =='structdata') {
30
+ isAllowed = Auth.isStructDataAllowed({table:tableName})
31
+ } else if(isTableData){
32
+ isAllowed = Auth.isTableDataAllowed({table:tableName});
33
+ }
32
34
  }
33
35
  if(!isAllowed){
34
36
  return Auth.showError();