Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe

Commits:

11 changed files:

Changes:

  • client/datasource/editor/ps/src/main/i18n/getters/navigation.getter
    ... ... @@ -169,6 +169,8 @@ observe.data.ps.logbook.WellActivity.action.save
    169 169
     observe.data.ps.logbook.WellActivity.action.save.tip
    
    170 170
     observe.data.ps.logbook.WellActivity.activity
    
    171 171
     observe.data.ps.logbook.WellActivity.activity.short
    
    172
    +observe.data.ps.logbook.WellActivity.computedTotalWeight
    
    173
    +observe.data.ps.logbook.WellActivity.computedTotalWeight.short
    
    172 174
     observe.data.ps.logbook.WellActivity.wellActivitySpecies
    
    173 175
     observe.data.ps.logbook.WellActivity.wellActivitySpecies.short
    
    174 176
     observe.data.ps.observation.Activity.action.create
    

  • client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/WellActivityUIHandler.java
    ... ... @@ -47,4 +47,10 @@ public class WellActivityUIHandler extends GeneratedWellActivityUIHandler {
    47 47
             }
    
    48 48
             return ui.getWellActivitySpeciesTable();
    
    49 49
         }
    
    50
    +
    
    51
    +    @Override
    
    52
    +    protected void onTableModelChanged() {
    
    53
    +        super.onTableModelChanged();
    
    54
    +        getUi().getTable().invalidate();
    
    55
    +    }
    
    50 56
     }

  • client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/WellActivityUITableModel.java
    ... ... @@ -25,7 +25,6 @@ package fr.ird.observe.client.datasource.editor.ps.data.logbook;
    25 25
     import fr.ird.observe.client.datasource.editor.api.content.EditableContentUI;
    
    26 26
     import fr.ird.observe.client.util.UIHelper;
    
    27 27
     import fr.ird.observe.client.util.table.EditableListProperty;
    
    28
    -import fr.ird.observe.dto.data.ps.logbook.WellActivityDto;
    
    29 28
     import fr.ird.observe.dto.data.ps.logbook.WellActivitySpeciesDto;
    
    30 29
     import fr.ird.observe.dto.data.ps.logbook.WellDto;
    
    31 30
     
    
    ... ... @@ -76,6 +75,7 @@ public class WellActivityUITableModel extends GeneratedWellActivityUITableModel
    76 75
             getValidator().doValidate();
    
    77 76
             getValidator().setChanged(false);
    
    78 77
             wellActivitySpeciesTableModel.setModified(false);
    
    78
    +        fireTableDataChanged();
    
    79 79
         }
    
    80 80
     
    
    81 81
         @Override
    
    ... ... @@ -83,9 +83,4 @@ public class WellActivityUITableModel extends GeneratedWellActivityUITableModel
    83 83
             super.startEditTableEditBeanOnInlineModels();
    
    84 84
             wellActivitySpeciesTableModel.validate();
    
    85 85
         }
    
    86
    -
    
    87
    -    @Override
    
    88
    -    protected void onSelectedRowChanged(WellActivityUI ui, int editingRow, WellActivityDto tableEditBean, WellActivityDto previousRowBean, boolean notPersisted, boolean newRow) {
    
    89
    -        super.onSelectedRowChanged(ui, editingRow, tableEditBean, previousRowBean, notPersisted, newRow);
    
    90
    -    }
    
    91 86
     }

  • core/api/dto-decoration/src/main/i18n/getters/labels.getter
    ... ... @@ -1023,6 +1023,8 @@ observe.data.ps.logbook.WellActivity.action.save
    1023 1023
     observe.data.ps.logbook.WellActivity.action.save.tip
    
    1024 1024
     observe.data.ps.logbook.WellActivity.activity
    
    1025 1025
     observe.data.ps.logbook.WellActivity.activity.short
    
    1026
    +observe.data.ps.logbook.WellActivity.computedTotalWeight
    
    1027
    +observe.data.ps.logbook.WellActivity.computedTotalWeight.short
    
    1026 1028
     observe.data.ps.logbook.WellActivity.title
    
    1027 1029
     observe.data.ps.logbook.WellActivity.type
    
    1028 1030
     observe.data.ps.logbook.WellActivity.wellActivitySpecies
    

  • core/api/dto/src/main/java/fr/ird/observe/dto/data/ps/logbook/WellActivityDto.java
    ... ... @@ -28,6 +28,7 @@ import io.ultreia.java4all.decoration.DecoratorProvider;
    28 28
     
    
    29 29
     @GenerateJavaBeanDefinition
    
    30 30
     public class WellActivityDto extends GeneratedWellActivityDto {
    
    31
    +
    
    31 32
         @Override
    
    32 33
         public void registerDecorator(Decorator decorator) {
    
    33 34
             super.registerDecorator(decorator);
    
    ... ... @@ -36,4 +37,9 @@ public class WellActivityDto extends GeneratedWellActivityDto {
    36 37
                 DecoratorProvider.registerDecorator(ActivityStubDto.class, decorator.getLocale(), activity);
    
    37 38
             }
    
    38 39
         }
    
    40
    +
    
    41
    +    @Override
    
    42
    +    public Float getComputedTotalWeight() {
    
    43
    +        return (float)getWellActivitySpecies().stream().mapToDouble(WellActivitySpeciesDto::getWeight).sum();
    
    44
    +    }
    
    39 45
     }

  • core/services/i18n/src/main/i18n/translations/services_en_GB.properties
    ... ... @@ -1227,6 +1227,8 @@ observe.data.ps.logbook.WellActivity.action.save=Insert
    1227 1227
     observe.data.ps.logbook.WellActivity.action.save.tip=Insert the well activity
    
    1228 1228
     observe.data.ps.logbook.WellActivity.activity=Activity
    
    1229 1229
     observe.data.ps.logbook.WellActivity.activity.short=Activity
    
    1230
    +observe.data.ps.logbook.WellActivity.computedTotalWeight=Total weight (in t)
    
    1231
    +observe.data.ps.logbook.WellActivity.computedTotalWeight.short=Total weight (in t)
    
    1230 1232
     observe.data.ps.logbook.WellActivity.title=Well activity
    
    1231 1233
     observe.data.ps.logbook.WellActivity.type=Well activity
    
    1232 1234
     observe.data.ps.logbook.WellActivity.wellActivitySpecies=Well activity species
    

  • core/services/i18n/src/main/i18n/translations/services_es_ES.properties
    ... ... @@ -1227,6 +1227,8 @@ observe.data.ps.logbook.WellActivity.action.save=Insert
    1227 1227
     observe.data.ps.logbook.WellActivity.action.save.tip=Insert the well activity
    
    1228 1228
     observe.data.ps.logbook.WellActivity.activity=Activity
    
    1229 1229
     observe.data.ps.logbook.WellActivity.activity.short=Activity
    
    1230
    +observe.data.ps.logbook.WellActivity.computedTotalWeight=Peso (en t)
    
    1231
    +observe.data.ps.logbook.WellActivity.computedTotalWeight.short=Peso (en t)
    
    1230 1232
     observe.data.ps.logbook.WellActivity.title=Well activity
    
    1231 1233
     observe.data.ps.logbook.WellActivity.type=Well activity
    
    1232 1234
     observe.data.ps.logbook.WellActivity.wellActivitySpecies=Well activity species
    

  • core/services/i18n/src/main/i18n/translations/services_fr_FR.properties
    ... ... @@ -1227,6 +1227,8 @@ observe.data.ps.logbook.WellActivity.action.save=Insérer
    1227 1227
     observe.data.ps.logbook.WellActivity.action.save.tip=Insérer cette cuve-calée
    
    1228 1228
     observe.data.ps.logbook.WellActivity.activity=Activité
    
    1229 1229
     observe.data.ps.logbook.WellActivity.activity.short=Activité
    
    1230
    +observe.data.ps.logbook.WellActivity.computedTotalWeight=Poids total (en t)
    
    1231
    +observe.data.ps.logbook.WellActivity.computedTotalWeight.short=Poids total (en t)
    
    1230 1232
     observe.data.ps.logbook.WellActivity.title=Cuve-calée
    
    1231 1233
     observe.data.ps.logbook.WellActivity.type=Cuve-calée
    
    1232 1234
     observe.data.ps.logbook.WellActivity.wellActivitySpecies=Espèces
    

  • model/src/main/models/Observe/dto/21-data-ps-logbook.model
    ... ... @@ -143,6 +143,7 @@ wellActivity + {*} data.ps.logbook.WellActivity
    143 143
     data.ps.logbook.WellActivity > data.ContainerChild >> data.ps.logbook.ActivityLabelAware
    
    144 144
     activity {*:1} data.ps.logbook.ActivityStub
    
    145 145
     wellActivitySpecies + {*} data.ps.logbook.WellActivitySpecies
    
    146
    +computedTotalWeight Float
    
    146 147
     
    
    147 148
     data.ps.logbook.WellActivitySpecies > data.Data >> data.InlineDataDto
    
    148 149
     species {*:1} referential.common.SpeciesReference
    

  • model/src/main/models/Observe/dto/class/containerChildDataDtoProperties.properties
    ... ... @@ -41,7 +41,7 @@ data.ps.localmarket.Batch=species,packaging,count,weight
    41 41
     data.ps.localmarket.SampleSpecies=species,sizeMeasureType,measuredCount,comment
    
    42 42
     data.ps.logbook.Catch=species,weightCategory,speciesFate,well,weight,count,comment
    
    43 43
     data.ps.logbook.SampleSpecies=subSampleNumber,species,sizeMeasureType,measuredCount,totalCount,comment
    
    44
    -data.ps.logbook.WellActivity=activity,wellActivitySpecies
    
    44
    +data.ps.logbook.WellActivity=activity,wellActivitySpecies,computedTotalWeight
    
    45 45
     data.ps.observation.Catch=species,speciesFate,reasonForDiscard,catchWeight,totalCount,weightMeasureMethod,minWeight,maxWeight,meanWeight,meanLength,well,informationSource,comment
    
    46 46
     data.ps.observation.NonTargetCatchRelease=species,sex,speciesGroupReleaseMode,conformity,releasingTime,length,comment
    
    47 47
     data.ps.observation.ObjectObservedSpecies=species,speciesStatus,count
    

  • model/src/main/models/Observe/dto/class/i18nLabels.properties
    ... ... @@ -82,7 +82,7 @@ data.ps.logbook.SampleSpecies=comment,measuredCount,sampleSpeciesMeasure,sizeMea
    82 82
     data.ps.logbook.SampleSpeciesMeasure=count,sizeClass
    
    83 83
     data.ps.logbook.TransmittingBuoy=comment,code,transmittingBuoyOwnership,transmittingBuoyType,transmittingBuoyOperation,country,vessel,latitude,longitude,quadrant
    
    84 84
     data.ps.logbook.Well=well,wellVessel,wellFactory,wellSamplingConformity,wellSamplingStatus,generalTab,wellActivityTab,action.save,action.save.tip,wellVessel.short,wellFactory.short,wellAlternativeNumbering
    
    85
    -data.ps.logbook.WellActivity=activity,wellActivitySpecies
    
    85
    +data.ps.logbook.WellActivity=activity,wellActivitySpecies,computedTotalWeight,computedTotalWeight.short
    
    86 86
     data.ps.logbook.WellActivitySpecies=species,weight,weightCategory,count,setSpeciesNumber
    
    87 87
     data.ps.observation.Activity=date,coordinate,observedSystem.available,observedSystem.selected,comment,comment2,currentFpaZone,dataQuality,detectionMode,ersId,floatingObjectEmpty,latitude,longitude,nextFpaZone,nonTargetCatchSpecies,observedSystem,observedSystemDistance,previousFpaZone,quadrant,reasonForNoFishing,seaSurfaceTemperature,surroundingActivity,time,vesselActivity,vesselSpeed,wind,generalTab,error.no.activity.6,measurementsTab,observedSystemTab
    
    88 88
     data.ps.observation.Catch=catchWeight,catchWeightTotalCount,meanWeightMeanLength,comment,informationSource,sizeMeasureMethod,meanLength,minWeight,maxWeight,meanWeight,minMaxWeight,reasonForDiscard,species,speciesFate,totalCount,weightMeasureMethod,well,catchWeightComputed.computed.tip,catchWeightComputed.observed.tip,meanLengthComputed.computed.tip,meanLengthComputed.observed.tip,meanWeightComputed.computed.tip,meanWeightComputed.observed.tip,totalCountComputed.computed.tip,totalCountComputed.observed.tip,meanLengthComputedSource,totalCountComputedSource,meanWeightComputedSource