@fto-consult/expo-ui 2.46.3 → 2.46.4

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": "@fto-consult/expo-ui",
3
- "version": "2.46.3",
3
+ "version": "2.46.4",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -6,6 +6,7 @@ import DatabaseStatistic from "./DatabaseStatistic";
6
6
  import theme from "$theme";
7
7
  import PropTypes from "prop-types";
8
8
  import Auth from "$cauth";
9
+ import Surface from "$ecomponents/Surface";
9
10
 
10
11
  export const title = 'Statistiques en BD';
11
12
  export default function DatabaseStatisticScreen ({withScreen,fetchDataProps,tableFilter,fetchCount,fetchData,title:customTitle,contentProps,containerProps,tables,Component,...props}){
@@ -31,20 +32,23 @@ export default function DatabaseStatisticScreen ({withScreen,fetchDataProps,tabl
31
32
  }
32
33
  if(table.databaseStatistic === false || table.databaseStatistics === false) return null;
33
34
  const chartAllowedPerm = defaultStr(table.chartAllowedPerm);
35
+ const testID = "RN_DatabaseStatisticsCell_"+index;
34
36
  if((chartAllowedPerm && !Auth.isAllowedFromStr(chartAllowedPerm)) || (!Auth.isTableDataAllowed({table:tableName}))) return null;
35
- content.push(<Cell elevation = {5} withSurface mobileSize={12} desktopSize={3} tabletSize={4} {...contentProps} key = {index} >
36
- <DatabaseStatistic
37
- icon = {table.icon}
38
- key = {index}
39
- table = {table}
40
- fetchData = {fetchData}
41
- fetchDataProps = {fetchDataProps}
42
- index = {suffix}
43
- title = {defaultStr(table.text,table.label,table.title)}
44
- fetchCount = {table.fetchCount|| typeof fetchCount =='function'? (a,b)=>{
45
- return fetchCount({table,tableName})
46
- }:undefined}
47
- ></DatabaseStatistic>
37
+ content.push(<Cell elevation = {5} withSurface mobileSize={12} desktopSize={3} tabletSize={4} {...contentProps} testID={testID} key = {index} >
38
+ <Surface testID = {testID+"_Surface"} elevation = {5} style={[theme.styles.w100]}>
39
+ <DatabaseStatistic
40
+ icon = {table.icon}
41
+ key = {index}
42
+ table = {table}
43
+ fetchData = {fetchData}
44
+ fetchDataProps = {fetchDataProps}
45
+ index = {suffix}
46
+ title = {defaultStr(table.text,table.label,table.title)}
47
+ fetchCount = {table.fetchCount|| typeof fetchCount =='function'? (a,b)=>{
48
+ return fetchCount({table,tableName})
49
+ }:undefined}
50
+ ></DatabaseStatistic>
51
+ </Surface>
48
52
  </Cell>
49
53
  )
50
54
  });