@fto-consult/expo-ui 5.8.2 → 5.8.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": "5.8.
|
|
3
|
+
"version": "5.8.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.6",
|
|
62
62
|
"@expo/html-elements": "^0.2.0",
|
|
63
63
|
"@expo/vector-icons": "^13.0.0",
|
|
64
|
-
"@fto-consult/common": "^3.10.
|
|
64
|
+
"@fto-consult/common": "^3.10.71",
|
|
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",
|
|
@@ -376,7 +376,7 @@ export default class CommonDatagridComponent extends AppComponent {
|
|
|
376
376
|
}
|
|
377
377
|
/*** si l'on peut récuperer à distance, les colonnes seulement visibles */
|
|
378
378
|
canFetchOnlyVisibleColumns(){
|
|
379
|
-
return this.isTableData() && this.props.canFetchOnlyVisibleColumns !== false && true || false;
|
|
379
|
+
return this.isTableData() && this.props.canFetchOnlyVisibleColumns !== false && this.props.filterable !==false && true || false;
|
|
380
380
|
}
|
|
381
381
|
isFetchOnlyVisibleColumnsEnabled(){
|
|
382
382
|
return this.canFetchOnlyVisibleColumns() && !!this.state.fetchOnlyVisibleColumns;
|
|
@@ -244,6 +244,13 @@ export default class TableDataScreenComponent extends FormDataScreen{
|
|
|
244
244
|
if((disabledOnEditing === true)){
|
|
245
245
|
currentField.disabled = true;
|
|
246
246
|
}
|
|
247
|
+
const visibleOnlyOnCreate = typeof currentField.visibleOnlyOnCreate =='function'? currentField.visibleOnlyOnCreate(cArgs) : currentField.visibleOnlyOnCreate;
|
|
248
|
+
if((visibleOnlyOnCreate === false)){
|
|
249
|
+
currentField.form = false;
|
|
250
|
+
}
|
|
251
|
+
if(currentField.primaryKey === true){
|
|
252
|
+
currentField.readOnly = true;
|
|
253
|
+
}
|
|
247
254
|
}
|
|
248
255
|
if(field.primaryKey ===true){
|
|
249
256
|
this.primaryKeyFields[columnField] = true;
|
package/src/navigation/utils.js
CHANGED
|
@@ -9,6 +9,8 @@ export const tableDataRouteName = 'TableData';
|
|
|
9
9
|
|
|
10
10
|
export const structDataRouteName = 'StructData';
|
|
11
11
|
|
|
12
|
+
const canCheckNavPerms = ()=> appConfig.get("checkNavigationPermsOnTableOrStructData")
|
|
13
|
+
|
|
12
14
|
const navigateToTableOrStructData = function(tableName,params,actionType){
|
|
13
15
|
if(isNonNullString(tableName)){
|
|
14
16
|
tableName = {tableName};
|
|
@@ -25,7 +27,7 @@ const navigateToTableOrStructData = function(tableName,params,actionType){
|
|
|
25
27
|
const isTableData = actionType =='tabledata';
|
|
26
28
|
if(isNonNullString(perm)){
|
|
27
29
|
isAllowed = Auth.isAllowedFromStr(perm)
|
|
28
|
-
} else if(
|
|
30
|
+
} else if(canCheckNavPerms() !== false){
|
|
29
31
|
if(actionType =='structdata') {
|
|
30
32
|
isAllowed = Auth.isStructDataAllowed({table:tableName})
|
|
31
33
|
} else if(isTableData){
|
|
@@ -84,9 +86,9 @@ export const getTableDataListScreenName = getTableDataListRouteName;
|
|
|
84
86
|
export const navigateToTableDataList = function (tableName,params){
|
|
85
87
|
const route = getTableDataListRouteName(tableName);
|
|
86
88
|
if(isNonNullString(route)){
|
|
87
|
-
if(!Auth.isTableDataAllowed({table:tableName,action:'read'})){
|
|
89
|
+
if(canCheckNavPerms() !== false && !Auth.isTableDataAllowed({table:tableName,action:'read'})){
|
|
88
90
|
return Auth.showError()
|
|
89
|
-
|
|
91
|
+
}
|
|
90
92
|
return navigate({routeName:route,params});
|
|
91
93
|
}
|
|
92
94
|
return false;
|
|
@@ -130,7 +130,7 @@ PermLines.propTypes = {
|
|
|
130
130
|
perms : PropTypes.object,
|
|
131
131
|
})
|
|
132
132
|
).isRequired,
|
|
133
|
-
perms : PropTypes.object
|
|
133
|
+
perms : PropTypes.object,//la liste des permissions qui peuvent associer au compte d'un utilisaters
|
|
134
134
|
/*** si les élements de permissions seront modifiable où non */
|
|
135
135
|
disabled : PropTypes.bool,
|
|
136
136
|
tablePermPrefix : PropTypes.string,/*** le prefixe de permission à jouter à chaque permissions de table de donénes, exemple : 'table/', pour le prefix des permissions de type table de données */
|