@fto-consult/expo-ui 2.46.2 → 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
|
+
"version": "2.46.4",
|
|
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.0",
|
|
62
62
|
"@expo/html-elements": "^0.2.0",
|
|
63
63
|
"@expo/vector-icons": "^13.0.0",
|
|
64
|
-
"@fto-consult/common": "^2.8.
|
|
64
|
+
"@fto-consult/common": "^2.8.3",
|
|
65
65
|
"@gorhom/portal": "^1.0.14",
|
|
66
66
|
"@react-native-async-storage/async-storage": "~1.17.3",
|
|
67
67
|
"@react-native-community/datetimepicker": "6.5.2",
|
|
@@ -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
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
});
|