@fto-consult/expo-ui 6.73.4 → 6.73.6
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
@@ -30,6 +30,9 @@ export default class FormComponent extends React.AppComponent {
|
|
30
30
|
getErrorText(){
|
31
31
|
return defaultStr(this.___errorText);
|
32
32
|
}
|
33
|
+
getErrorLabel(){
|
34
|
+
return defaultStr(this.___errorText);
|
35
|
+
}
|
33
36
|
/*** vérifie si la form est valide */
|
34
37
|
isValid () {
|
35
38
|
let fields = this.getFields();
|
package/src/layouts/Fab/index.js
CHANGED
@@ -26,7 +26,7 @@ const FabLayoutComponent = React.forwardRef((p,ref)=>{
|
|
26
26
|
const addText = defaultStr(table.newElementLabel,"Nouveau");
|
27
27
|
const tableName = defaultStr(table.table,table.tableName);
|
28
28
|
if(!table || !icon || !text || !Auth.isTableDataAllowed({table:tableName,action:'create'})) return;
|
29
|
-
let fabProps = typeof table.fabProps ==='function'? table.fabProps({tableName}) : defaultObj(table.fabProps);;
|
29
|
+
let fabProps = typeof table.fabProps ==='function'? table.fabProps({tableName,table:tableName}) : defaultObj(table.fabProps);;
|
30
30
|
if(fabProps === false) return;
|
31
31
|
fabProps = defaultObj(fabProps);
|
32
32
|
const cSuffix = theme.Colors.getSuffix(index);
|
@@ -175,5 +175,5 @@ MainScreenScreenWithoutAuthContainer.propTypes = {
|
|
175
175
|
contentContainerStyle : StyleProp,
|
176
176
|
withFab : PropTypes.bool,
|
177
177
|
withDrawer : PropTypes.bool,//si l'on doit afficher un drawer dans le contenu
|
178
|
-
fabProps : PropTypes.object,
|
178
|
+
//fabProps : PropTypes.object,
|
179
179
|
}
|
@@ -261,6 +261,7 @@ export default class TableDataScreenComponent extends FormDataScreen{
|
|
261
261
|
...rest
|
262
262
|
} = this.prepareComponentProps({...props,tableName,context:this,fields:extendObj(true,{},this.fields,props.fields),isUpdated,isUpdate:isUpdated,data,datas,currentIndex});
|
263
263
|
const sessionName = this.getSessionName();
|
264
|
+
const generatedColumnsProps = this.getGeneratedColumnsProperties();
|
264
265
|
///on effectue une mutator sur le champ en cours de modification
|
265
266
|
Object.map(preparedFields,(field,i,counterIndex)=>{
|
266
267
|
const currentField = isObj(field)?Object.clone(field):field;
|
@@ -270,7 +271,7 @@ export default class TableDataScreenComponent extends FormDataScreen{
|
|
270
271
|
if(currentField.visibleOnlyOnEditing === true && !isUpdated){
|
271
272
|
currentField.form = false;
|
272
273
|
}
|
273
|
-
|
274
|
+
generatedColumnsProps.map((f)=>{
|
274
275
|
//on affiche les champs générés uniquement en cas de mise à jour
|
275
276
|
if(currentField[f] === true){
|
276
277
|
currentField.visible = isUpdated ? true : false;
|
@@ -376,6 +377,10 @@ export default class TableDataScreenComponent extends FormDataScreen{
|
|
376
377
|
}
|
377
378
|
return rActionsArg;
|
378
379
|
}
|
380
|
+
/*** retourne la liste des colones générées comme createdDate,updateDate et bien d'autres */
|
381
|
+
getGeneratedColumnsProperties(){
|
382
|
+
return generatedColumnsProperties;
|
383
|
+
}
|
379
384
|
renderTabs(args){
|
380
385
|
const tabs = this.props.tabs;
|
381
386
|
if(typeof tabs =='function'){
|
@@ -573,7 +578,7 @@ export default class TableDataScreenComponent extends FormDataScreen{
|
|
573
578
|
if(typeof this.props.clone ==='function' && this.props.clone(data,this) === false) return data;
|
574
579
|
this.showPreloader();
|
575
580
|
delete data.approved;
|
576
|
-
Object.map(['_rev',...
|
581
|
+
Object.map(['_rev','_id',this.getGeneratedColumnsProperties(),...Object.keys(this.primaryKeyFields)],(idx)=>{
|
577
582
|
data[idx] = undefined;
|
578
583
|
delete data[idx];
|
579
584
|
});
|
@@ -6,7 +6,8 @@ import { COPY_ICON,PRINT_ICON} from "$ecomponents/Icon";
|
|
6
6
|
import {getTableDataRouteName} from "$enavigation/utils";
|
7
7
|
|
8
8
|
//@seee : https://github.com/typeorm/typeorm/blob/master/src/entity-schema/EntitySchemaColumnOptions.ts
|
9
|
-
|
9
|
+
///'_rev','_id','code',
|
10
|
+
export const generatedColumnsProperties = ["createDate","updateDate","createdBy","updateBy",'updatedDate','updatedHour','createdHour','createdDate']
|
10
11
|
|
11
12
|
export const renderTabsContent = ({tabs,context,data,sessionName,isMobile,props,firstTab,tabKey,tabProps,tabsProps})=>{
|
12
13
|
let tabsArr = [],hasFirstTab = false;
|