Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
2d26bb4a
by Tony Chemit at 2024-01-25T16:02:07+01:00
21 changed files:
- client/datasource/editor/ps/src/main/i18n/getters/jaxx.getter
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/ActivityUI.jaxx
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/ActivityUI.jcss
- client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/ActivityUIHandler.java
- core/api/dto-decoration/src/main/i18n/getters/labels.getter
- core/api/dto/src/main/java/fr/ird/observe/dto/data/ps/logbook/ActivityDto.java
- core/api/dto/src/main/java/fr/ird/observe/dto/referential/ps/common/VesselActivityReference.java
- core/api/validation/src/main/filtered-resources/META-INF/validators/validation.json
- core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/logbook/ActivityDto-create-error-validation.xml
- core/api/validation/src/main/resources/fr/ird/observe/dto/data/ps/logbook/ActivityDto-update-error-validation.xml
- core/persistence/java/src/main/java/fr/ird/observe/entities/data/ps/logbook/ActivityImpl.java
- core/persistence/java/src/main/java/fr/ird/observe/entities/data/ps/logbook/ActivitySpi.java
- core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/logbook/Activity/validation-create.json
- core/persistence/resources/src/main/resources/fr/ird/observe/entities/data/ps/logbook/Activity/validation-update.json
- core/services/i18n/src/main/i18n/translations/services_en_GB.properties
- core/services/i18n/src/main/i18n/translations/services_es_ES.properties
- core/services/i18n/src/main/i18n/translations/services_fr_FR.properties
- model/src/main/models/Observe/dto/21-data-ps-logbook.model
- model/src/main/models/Observe/dto/attribute/notNullIf.properties
- model/src/main/models/Observe/dto/class/i18nLabels.properties
- model/src/main/models/Observe/persistence/21-data-ps-logbook.model
Changes:
| ... | ... | @@ -158,6 +158,7 @@ observe.data.ps.logbook.Activity.physicalMeasurements |
| 158 | 158 | observe.data.ps.logbook.Activity.setCount
|
| 159 | 159 | observe.data.ps.logbook.Activity.setMeasurements
|
| 160 | 160 | observe.data.ps.logbook.Activity.setSuccessStatus
|
| 161 | +observe.data.ps.logbook.Activity.skipMandatoryCoordinate
|
|
| 161 | 162 | observe.data.ps.logbook.Activity.time
|
| 162 | 163 | observe.data.ps.logbook.Activity.totalWeight
|
| 163 | 164 | observe.data.ps.logbook.Activity.vmsDivergent
|
| ... | ... | @@ -95,7 +95,12 @@ |
| 95 | 95 | </cell>
|
| 96 | 96 | <cell fill="both" columns="2" weightx="1">
|
| 97 | 97 | <JPanel layout="{new BorderLayout()}">
|
| 98 | - <JLabel id='coordinateLabel' constraints='BorderLayout.NORTH' styleClass="center"/>
|
|
| 98 | + <JPanel id="coordinateHeader" layout="{new BorderLayout()}" constraints='BorderLayout.NORTH'>
|
|
| 99 | + |
|
| 100 | + <JLabel id='coordinateLabel' constraints='BorderLayout.NORTH' styleClass="center"/>
|
|
| 101 | + <JToggleButton id="skipMandatoryCoordinate" constraints='BorderLayout.CENTER' styleClass='bold'
|
|
| 102 | + onItemStateChanged="{getHandler().onSkipMandatoryCoordinateChanged(event);}"/>
|
|
| 103 | + </JPanel>
|
|
| 99 | 104 | <CoordinatesEditor id='coordinate' constraints='BorderLayout.CENTER'/>
|
| 100 | 105 | </JPanel>
|
| 101 | 106 | </cell>
|
| ... | ... | @@ -41,6 +41,11 @@ |
| 41 | 41 | horizontalAlignment:{JLabel.CENTER};
|
| 42 | 42 | }
|
| 43 | 43 | |
| 44 | +#skipMandatoryCoordinate {
|
|
| 45 | + i18nProperty:"";
|
|
| 46 | + selected:{bean.isSkipMandatoryCoordinate()};
|
|
| 47 | +}
|
|
| 48 | + |
|
| 44 | 49 | #previousFpaZone {
|
| 45 | 50 | enabled:{bean.isChangedZoneOperation()};
|
| 46 | 51 | }
|
| ... | ... | @@ -31,8 +31,10 @@ import fr.ird.observe.client.datasource.editor.ps.ObservePsKeyStrokes; |
| 31 | 31 | import fr.ird.observe.dto.data.ps.common.TripDto;
|
| 32 | 32 | import fr.ird.observe.dto.data.ps.logbook.ActivityDto;
|
| 33 | 33 | import fr.ird.observe.dto.data.ps.logbook.ActivityReference;
|
| 34 | +import fr.ird.observe.dto.referential.ps.common.VesselActivityReference;
|
|
| 34 | 35 | import io.ultreia.java4all.i18n.I18n;
|
| 35 | 36 | |
| 37 | +import java.awt.event.ItemEvent;
|
|
| 36 | 38 | import java.beans.PropertyChangeListener;
|
| 37 | 39 | import java.util.Objects;
|
| 38 | 40 | |
| ... | ... | @@ -49,11 +51,20 @@ class ActivityUIHandler extends GeneratedActivityUIHandler { |
| 49 | 51 | */
|
| 50 | 52 | private final PropertyChangeListener originalDataModifiedChanged;
|
| 51 | 53 | private final PropertyChangeListener fpaZoneChangedChanged;
|
| 54 | + private final PropertyChangeListener vesselActivityChanged;
|
|
| 52 | 55 | |
| 53 | 56 | public ActivityUIHandler() {
|
| 54 | 57 | originalDataModifiedChanged = evt -> onOriginalDataModifiedChanged((Boolean) evt.getNewValue());
|
| 55 | 58 | fpaZoneChangedChanged = evt -> onFpaZoneChanged((Boolean) evt.getNewValue());
|
| 59 | + vesselActivityChanged = evt -> onVesselActivityChanged((VesselActivityReference) evt.getNewValue());
|
|
| 56 | 60 | }
|
| 61 | + |
|
| 62 | + @Override
|
|
| 63 | + public void onInit(ActivityUI ui) {
|
|
| 64 | + super.onInit(ui);
|
|
| 65 | + ui.getCoordinateHeader().remove(ui.getSkipMandatoryCoordinate());
|
|
| 66 | + }
|
|
| 67 | + |
|
| 57 | 68 | @Override
|
| 58 | 69 | public void startEditUI() {
|
| 59 | 70 | ActivityDto bean = getModel().getStates().getBean();
|
| ... | ... | @@ -62,20 +73,27 @@ class ActivityUIHandler extends GeneratedActivityUIHandler { |
| 62 | 73 | // compute it
|
| 63 | 74 | bean.setMaxNumberAuthorized(getModel().getSource().getParent().getChildCount());
|
| 64 | 75 | }
|
| 76 | + if (getModel().getStates().isCreatingMode()) {
|
|
| 77 | + ui.getCoordinateHeader().add(ui.getSkipMandatoryCoordinate());
|
|
| 78 | + }
|
|
| 65 | 79 | bean.removePropertyChangeListener(ActivityDto.PROPERTY_ORIGINAL_DATA_MODIFIED, originalDataModifiedChanged);
|
| 66 | 80 | bean.removePropertyChangeListener(ActivityDto.PROPERTY_CHANGED_ZONE_OPERATION, fpaZoneChangedChanged);
|
| 81 | + bean.removePropertyChangeListener(ActivityDto.PROPERTY_VESSEL_ACTIVITY, vesselActivityChanged);
|
|
| 67 | 82 | onOriginalDataModifiedChanged(bean.isOriginalDataModified());
|
| 68 | 83 | onFpaZoneChanged(bean.isChangedZoneOperation());
|
| 84 | + onVesselActivityChanged(bean.getVesselActivity());
|
|
| 69 | 85 | getModel().getStates().startEditUI();
|
| 70 | 86 | super.startEditUI();
|
| 71 | 87 | bean.addPropertyChangeListener(ActivityDto.PROPERTY_ORIGINAL_DATA_MODIFIED, originalDataModifiedChanged);
|
| 72 | 88 | bean.addPropertyChangeListener(ActivityDto.PROPERTY_CHANGED_ZONE_OPERATION, fpaZoneChangedChanged);
|
| 89 | + bean.addPropertyChangeListener(ActivityDto.PROPERTY_VESSEL_ACTIVITY, vesselActivityChanged);
|
|
| 73 | 90 | TripDto trip = getClientValidationContext().getCurrentPsCommonTrip();
|
| 74 | 91 | getModel().getStates().setNumberEnabled(Objects.requireNonNull(trip.getActivitiesAcquisitionMode()).isByNumber());
|
| 75 | 92 | }
|
| 76 | 93 | |
| 77 | 94 | @Override
|
| 78 | 95 | public void stopEditUI() {
|
| 96 | + ui.getCoordinateHeader().remove(ui.getSkipMandatoryCoordinate());
|
|
| 79 | 97 | getModel().getStates().stopEditUI();
|
| 80 | 98 | super.stopEditUI();
|
| 81 | 99 | }
|
| ... | ... | @@ -85,7 +103,7 @@ class ActivityUIHandler extends GeneratedActivityUIHandler { |
| 85 | 103 | SaveAction.create(ui, ActivityDto.class)
|
| 86 | 104 | .on(ui.getModel()::toSaveRequest)
|
| 87 | 105 | .call((r, d) -> getOpenableService().save(r.getParentId(), d))
|
| 88 | - .then(new SaveContentOpenableUIAdapter<>(d -> false, ui -> null) {
|
|
| 106 | + .then(new SaveContentOpenableUIAdapter<>(ActivityDto::isSkipMandatoryCoordinate, ActivityUI::getAddFloatingObject) {
|
|
| 89 | 107 | |
| 90 | 108 | @Override
|
| 91 | 109 | protected void afterNodeUpdated(DataSourceEditor dataSourceEditor, ActivityUI ui, NavigationTree tree, ContentOpenableUINavigationNode node, boolean notPersisted, ActivityDto bean) {
|
| ... | ... | @@ -114,6 +132,25 @@ class ActivityUIHandler extends GeneratedActivityUIHandler { |
| 114 | 132 | ui.getCopyFirstCoordinate());
|
| 115 | 133 | }
|
| 116 | 134 | |
| 135 | + private void onVesselActivityChanged(VesselActivityReference vesselActivity) {
|
|
| 136 | + if (!getModel().getStates().isCreatingMode()) {
|
|
| 137 | + return;
|
|
| 138 | + }
|
|
| 139 | + |
|
| 140 | + if (VesselActivityReference.isCoordinateRequiredForVesselActivity(vesselActivity)) {
|
|
| 141 | + ui.getSkipMandatoryCoordinate().setEnabled(false);
|
|
| 142 | + ui.getSkipMandatoryCoordinate().setSelected(false);
|
|
| 143 | + } else {
|
|
| 144 | + ui.getSkipMandatoryCoordinate().setEnabled(true);
|
|
| 145 | + }
|
|
| 146 | + }
|
|
| 147 | + |
|
| 148 | + void onSkipMandatoryCoordinateChanged(ItemEvent newValue) {
|
|
| 149 | + if (!getModel().getStates().isCreatingMode()) {
|
|
| 150 | + return;
|
|
| 151 | + }
|
|
| 152 | + ui.getBean().setSkipMandatoryCoordinate(newValue.getStateChange() == ItemEvent.SELECTED);
|
|
| 153 | + }
|
|
| 117 | 154 | |
| 118 | 155 | private void onOriginalDataModifiedChanged(Boolean newValue) {
|
| 119 | 156 |
| ... | ... | @@ -920,6 +920,7 @@ observe.data.ps.logbook.Activity.physicalMeasurements |
| 920 | 920 | observe.data.ps.logbook.Activity.setCount
|
| 921 | 921 | observe.data.ps.logbook.Activity.setMeasurements
|
| 922 | 922 | observe.data.ps.logbook.Activity.setSuccessStatus
|
| 923 | +observe.data.ps.logbook.Activity.skipMandatoryCoordinate
|
|
| 923 | 924 | observe.data.ps.logbook.Activity.time
|
| 924 | 925 | observe.data.ps.logbook.Activity.title
|
| 925 | 926 | observe.data.ps.logbook.Activity.totalWeight
|
| ... | ... | @@ -37,6 +37,9 @@ import java.util.Date; |
| 37 | 37 | @GenerateJavaBeanDefinition
|
| 38 | 38 | public class ActivityDto extends GeneratedActivityDto {
|
| 39 | 39 | |
| 40 | + public boolean isCoordinateRequiredForVesselActivity() {
|
|
| 41 | + return VesselActivityReference.isCoordinateRequiredForVesselActivity(getVesselActivity());
|
|
| 42 | + }
|
|
| 40 | 43 | |
| 41 | 44 | @Override
|
| 42 | 45 | public void setVesselActivity(VesselActivityReference vesselActivity) {
|
| ... | ... | @@ -38,4 +38,7 @@ public class VesselActivityReference extends GeneratedVesselActivityReference { |
| 38 | 38 | return id != null && ProtectedIdsPs.PS_COMMON_VESSEL_ACTIVITY_ID_FOR_END_OF_SEARCHING.equals(id.getId());
|
| 39 | 39 | }
|
| 40 | 40 | |
| 41 | + public static boolean isCoordinateRequiredForVesselActivity(VesselActivityReference reference) {
|
|
| 42 | + return reference == null || reference.isAllowSet() || !reference.isAllowFad();
|
|
| 43 | + }
|
|
| 41 | 44 | } |
| ... | ... | @@ -10053,7 +10053,7 @@ |
| 10053 | 10053 | "comments": [
|
| 10054 | 10054 | "check latitude format",
|
| 10055 | 10055 | "is latitude required ?",
|
| 10056 | - "latitude is mandatory except if !coordinateRequired"
|
|
| 10056 | + "latitude is mandatory except if !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects)"
|
|
| 10057 | 10057 | ]
|
| 10058 | 10058 | },
|
| 10059 | 10059 | {
|
| ... | ... | @@ -10068,7 +10068,7 @@ |
| 10068 | 10068 | "comments": [
|
| 10069 | 10069 | "check longitude format",
|
| 10070 | 10070 | "is longitude required ?",
|
| 10071 | - "longitude is mandatory except if !coordinateRequired"
|
|
| 10071 | + "longitude is mandatory except if !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects)"
|
|
| 10072 | 10072 | ]
|
| 10073 | 10073 | },
|
| 10074 | 10074 | {
|
| ... | ... | @@ -10112,7 +10112,7 @@ |
| 10112 | 10112 | "comments": [
|
| 10113 | 10113 | "check quadrant (on quadrant)",
|
| 10114 | 10114 | "is quadrant required ?",
|
| 10115 | - "quadrant is mandatory except if !coordinateRequired"
|
|
| 10115 | + "quadrant is mandatory except if !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects)"
|
|
| 10116 | 10116 | ]
|
| 10117 | 10117 | },
|
| 10118 | 10118 | {
|
| ... | ... | @@ -10360,7 +10360,7 @@ |
| 10360 | 10360 | "comments": [
|
| 10361 | 10361 | "check latitude format",
|
| 10362 | 10362 | "is latitude required ?",
|
| 10363 | - "latitude is mandatory except if !coordinateRequired"
|
|
| 10363 | + "latitude is mandatory except if !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects)"
|
|
| 10364 | 10364 | ]
|
| 10365 | 10365 | },
|
| 10366 | 10366 | {
|
| ... | ... | @@ -10375,7 +10375,7 @@ |
| 10375 | 10375 | "comments": [
|
| 10376 | 10376 | "check longitude format",
|
| 10377 | 10377 | "is longitude required ?",
|
| 10378 | - "longitude is mandatory except if !coordinateRequired"
|
|
| 10378 | + "longitude is mandatory except if !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects)"
|
|
| 10379 | 10379 | ]
|
| 10380 | 10380 | },
|
| 10381 | 10381 | {
|
| ... | ... | @@ -10419,7 +10419,7 @@ |
| 10419 | 10419 | "comments": [
|
| 10420 | 10420 | "check quadrant (on quadrant)",
|
| 10421 | 10421 | "is quadrant required ?",
|
| 10422 | - "quadrant is mandatory except if !coordinateRequired"
|
|
| 10422 | + "quadrant is mandatory except if !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects)"
|
|
| 10423 | 10423 | ]
|
| 10424 | 10424 | },
|
| 10425 | 10425 | {
|
| ... | ... | @@ -107,9 +107,9 @@ |
| 107 | 107 | </field>
|
| 108 | 108 | |
| 109 | 109 | <field name="latitude">
|
| 110 | - <!-- latitude is mandatory except if !coordinateRequired -->
|
|
| 110 | + <!-- latitude is mandatory except if !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects) -->
|
|
| 111 | 111 | <field-validator type="mandatory" short-circuit="true">
|
| 112 | - <param name="skip"><![CDATA[ !coordinateRequired ]]></param>
|
|
| 112 | + <param name="skip"><![CDATA[ !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects) ]]></param>
|
|
| 113 | 113 | <message>observe.Common.latitude.validation.required</message>
|
| 114 | 114 | </field-validator>
|
| 115 | 115 | |
| ... | ... | @@ -139,9 +139,9 @@ |
| 139 | 139 | </field>
|
| 140 | 140 | |
| 141 | 141 | <field name="longitude">
|
| 142 | - <!-- longitude is mandatory except if !coordinateRequired -->
|
|
| 142 | + <!-- longitude is mandatory except if !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects) -->
|
|
| 143 | 143 | <field-validator type="mandatory" short-circuit="true">
|
| 144 | - <param name="skip"><![CDATA[ !coordinateRequired ]]></param>
|
|
| 144 | + <param name="skip"><![CDATA[ !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects) ]]></param>
|
|
| 145 | 145 | <message>observe.Common.longitude.validation.required</message>
|
| 146 | 146 | </field-validator>
|
| 147 | 147 | |
| ... | ... | @@ -231,9 +231,9 @@ |
| 231 | 231 | </field>
|
| 232 | 232 | |
| 233 | 233 | <field name="quadrant">
|
| 234 | - <!-- quadrant is mandatory except if !coordinateRequired -->
|
|
| 234 | + <!-- quadrant is mandatory except if !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects) -->
|
|
| 235 | 235 | <field-validator type="mandatory" short-circuit="true">
|
| 236 | - <param name="skip"><![CDATA[ !coordinateRequired ]]></param>
|
|
| 236 | + <param name="skip"><![CDATA[ !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects) ]]></param>
|
|
| 237 | 237 | <message>observe.Common.quadrant.validation.required</message>
|
| 238 | 238 | </field-validator>
|
| 239 | 239 |
| ... | ... | @@ -107,9 +107,9 @@ |
| 107 | 107 | </field>
|
| 108 | 108 | |
| 109 | 109 | <field name="latitude">
|
| 110 | - <!-- latitude is mandatory except if !coordinateRequired -->
|
|
| 110 | + <!-- latitude is mandatory except if !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects) -->
|
|
| 111 | 111 | <field-validator type="mandatory" short-circuit="true">
|
| 112 | - <param name="skip"><![CDATA[ !coordinateRequired ]]></param>
|
|
| 112 | + <param name="skip"><![CDATA[ !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects) ]]></param>
|
|
| 113 | 113 | <message>observe.Common.latitude.validation.required</message>
|
| 114 | 114 | </field-validator>
|
| 115 | 115 | |
| ... | ... | @@ -139,9 +139,9 @@ |
| 139 | 139 | </field>
|
| 140 | 140 | |
| 141 | 141 | <field name="longitude">
|
| 142 | - <!-- longitude is mandatory except if !coordinateRequired -->
|
|
| 142 | + <!-- longitude is mandatory except if !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects) -->
|
|
| 143 | 143 | <field-validator type="mandatory" short-circuit="true">
|
| 144 | - <param name="skip"><![CDATA[ !coordinateRequired ]]></param>
|
|
| 144 | + <param name="skip"><![CDATA[ !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects) ]]></param>
|
|
| 145 | 145 | <message>observe.Common.longitude.validation.required</message>
|
| 146 | 146 | </field-validator>
|
| 147 | 147 | |
| ... | ... | @@ -231,9 +231,9 @@ |
| 231 | 231 | </field>
|
| 232 | 232 | |
| 233 | 233 | <field name="quadrant">
|
| 234 | - <!-- quadrant is mandatory except if !coordinateRequired -->
|
|
| 234 | + <!-- quadrant is mandatory except if !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects) -->
|
|
| 235 | 235 | <field-validator type="mandatory" short-circuit="true">
|
| 236 | - <param name="skip"><![CDATA[ !coordinateRequired ]]></param>
|
|
| 236 | + <param name="skip"><![CDATA[ !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects) ]]></param>
|
|
| 237 | 237 | <message>observe.Common.quadrant.validation.required</message>
|
| 238 | 238 | </field-validator>
|
| 239 | 239 |
| ... | ... | @@ -55,16 +55,7 @@ public class ActivityImpl extends ActivityAbstract { |
| 55 | 55 | * @return {@code true} if coordinate are required, {@code false} otherwise.
|
| 56 | 56 | */
|
| 57 | 57 | @Override
|
| 58 | - public boolean isCoordinateRequired() {
|
|
| 59 | - if (getVesselActivity() == null) {
|
|
| 60 | - return true;
|
|
| 61 | - }
|
|
| 62 | - if (getVesselActivity().isAllowSet()) {
|
|
| 63 | - return true;
|
|
| 64 | - }
|
|
| 65 | - if (!getVesselActivity().isAllowFad()) {
|
|
| 66 | - return true;
|
|
| 67 | - }
|
|
| 58 | + public boolean isCoordinateRequiredForFloatingObjects() {
|
|
| 68 | 59 | if (getFloatingObject() == null) {
|
| 69 | 60 | return true;
|
| 70 | 61 | }
|
| ... | ... | @@ -114,7 +114,7 @@ public class ActivitySpi extends GeneratedActivitySpi { |
| 114 | 114 | public void loadDtoForValidation(ServiceContext context, Route parent, Activity entity, ActivityDto dto) {
|
| 115 | 115 | addRouteDate(parent, dto);
|
| 116 | 116 | // See https://gitlab.com/ultreiaio/ird-observe/-/issues/2663
|
| 117 | - dto.setCoordinateRequired(entity.isCoordinateRequired());
|
|
| 117 | + dto.setCoordinateRequiredForFloatingObjects(entity.isCoordinateRequiredForFloatingObjects());
|
|
| 118 | 118 | }
|
| 119 | 119 | |
| 120 | 120 | @Override
|
| ... | ... | @@ -55,7 +55,7 @@ |
| 55 | 55 | "errors": [
|
| 56 | 56 | "check latitude format",
|
| 57 | 57 | "is latitude required ?",
|
| 58 | - "latitude is mandatory except if !coordinateRequired"
|
|
| 58 | + "latitude is mandatory except if !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects)"
|
|
| 59 | 59 | ]
|
| 60 | 60 | },
|
| 61 | 61 | "latitudeOriginal": {
|
| ... | ... | @@ -68,7 +68,7 @@ |
| 68 | 68 | "errors": [
|
| 69 | 69 | "check longitude format",
|
| 70 | 70 | "is longitude required ?",
|
| 71 | - "longitude is mandatory except if !coordinateRequired"
|
|
| 71 | + "longitude is mandatory except if !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects)"
|
|
| 72 | 72 | ]
|
| 73 | 73 | },
|
| 74 | 74 | "longitudeOriginal": {
|
| ... | ... | @@ -115,7 +115,7 @@ |
| 115 | 115 | "errors": [
|
| 116 | 116 | "check quadrant (on quadrant)",
|
| 117 | 117 | "is quadrant required ?",
|
| 118 | - "quadrant is mandatory except if !coordinateRequired"
|
|
| 118 | + "quadrant is mandatory except if !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects)"
|
|
| 119 | 119 | ]
|
| 120 | 120 | },
|
| 121 | 121 | "quadrantOriginal": {
|
| ... | ... | @@ -60,7 +60,7 @@ |
| 60 | 60 | "errors": [
|
| 61 | 61 | "check latitude format",
|
| 62 | 62 | "is latitude required ?",
|
| 63 | - "latitude is mandatory except if !coordinateRequired"
|
|
| 63 | + "latitude is mandatory except if !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects)"
|
|
| 64 | 64 | ]
|
| 65 | 65 | },
|
| 66 | 66 | "latitudeOriginal": {
|
| ... | ... | @@ -73,7 +73,7 @@ |
| 73 | 73 | "errors": [
|
| 74 | 74 | "check longitude format",
|
| 75 | 75 | "is longitude required ?",
|
| 76 | - "longitude is mandatory except if !coordinateRequired"
|
|
| 76 | + "longitude is mandatory except if !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects)"
|
|
| 77 | 77 | ]
|
| 78 | 78 | },
|
| 79 | 79 | "longitudeOriginal": {
|
| ... | ... | @@ -120,7 +120,7 @@ |
| 120 | 120 | "errors": [
|
| 121 | 121 | "check quadrant (on quadrant)",
|
| 122 | 122 | "is quadrant required ?",
|
| 123 | - "quadrant is mandatory except if !coordinateRequired"
|
|
| 123 | + "quadrant is mandatory except if !coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects)"
|
|
| 124 | 124 | ]
|
| 125 | 125 | },
|
| 126 | 126 | "quadrantOriginal": {
|
| ... | ... | @@ -1118,6 +1118,7 @@ observe.data.ps.logbook.Activity.setMeasurements=Set measurements |
| 1118 | 1118 | observe.data.ps.logbook.Activity.setStat=Count of fishing operation
|
| 1119 | 1119 | observe.data.ps.logbook.Activity.setSuccessStatus=Success
|
| 1120 | 1120 | observe.data.ps.logbook.Activity.setSuccessStatus.validation.required=Mandatory if successful set operation
|
| 1121 | +observe.data.ps.logbook.Activity.skipMandatoryCoordinate=A 'End of signal' or 'End of use' buoy operation is to be created on this activity
|
|
| 1121 | 1122 | observe.data.ps.logbook.Activity.time=Observation time
|
| 1122 | 1123 | observe.data.ps.logbook.Activity.time.validation.required=Mandatory if activities acquisition mode is timestamping
|
| 1123 | 1124 | observe.data.ps.logbook.Activity.title=Activity
|
| ... | ... | @@ -1118,6 +1118,7 @@ observe.data.ps.logbook.Activity.setMeasurements=Fishing operation measurements |
| 1118 | 1118 | observe.data.ps.logbook.Activity.setStat=Count of fishing operation
|
| 1119 | 1119 | observe.data.ps.logbook.Activity.setSuccessStatus=Success \#TODO
|
| 1120 | 1120 | observe.data.ps.logbook.Activity.setSuccessStatus.validation.required=Mandatory if successful set operation \#TODO
|
| 1121 | +observe.data.ps.logbook.Activity.skipMandatoryCoordinate=En esta actividad se debe crear una operación de boya de 'Fin de señal' o 'Fin de uso'
|
|
| 1121 | 1122 | observe.data.ps.logbook.Activity.time=Hora de la observación
|
| 1122 | 1123 | observe.data.ps.logbook.Activity.time.validation.required=Mandatory if activities acquisition mode is timestamping \#TODO
|
| 1123 | 1124 | observe.data.ps.logbook.Activity.title=Actividad
|
| ... | ... | @@ -1118,6 +1118,7 @@ observe.data.ps.logbook.Activity.setMeasurements=Paramètres de calée |
| 1118 | 1118 | observe.data.ps.logbook.Activity.setStat=Nombre de calées
|
| 1119 | 1119 | observe.data.ps.logbook.Activity.setSuccessStatus=Succès
|
| 1120 | 1120 | observe.data.ps.logbook.Activity.setSuccessStatus.validation.required=Obligatoire si opération de pêche réussie
|
| 1121 | +observe.data.ps.logbook.Activity.skipMandatoryCoordinate=Une opération balise 'Perte de signal' ou 'Fin d'utilisation' sera créée sur cette activité
|
|
| 1121 | 1122 | observe.data.ps.logbook.Activity.time=Heure d'observation
|
| 1122 | 1123 | observe.data.ps.logbook.Activity.time.validation.required=Obligatoire si le mode d'acquisition des activités est horodaté
|
| 1123 | 1124 | observe.data.ps.logbook.Activity.title=Activité
|
| ... | ... | @@ -35,7 +35,8 @@ setSuccessStatus {*:0..1} referential.ps.logbook.SetSuccessStatusReference |
| 35 | 35 | reasonForNullSet {*:0..1} referential.ps.common.ReasonForNullSetReference
|
| 36 | 36 | observedSystem {*:*} referential.ps.common.ObservedSystemReference
|
| 37 | 37 | maxNumberAuthorized Integer
|
| 38 | -coordinateRequired boolean
|
|
| 38 | +coordinateRequiredForFloatingObjects boolean
|
|
| 39 | +skipMandatoryCoordinate boolean
|
|
| 39 | 40 | |
| 40 | 41 | data.ps.logbook.ActivityCatch > data.Container
|
| 41 | 42 | catches {*} data.ps.logbook.Catch
|
| ... | ... | @@ -42,9 +42,9 @@ data.ps.common.Trip.attribute.observationsProgram=!observationsEnabled |
| 42 | 42 | data.ps.common.Trip.attribute.observer=!observationsEnabled
|
| 43 | 43 | data.ps.localmarket.Batch.attribute.count=countOrWeightValid
|
| 44 | 44 | data.ps.localmarket.Batch.attribute.weight=countOrWeightValid
|
| 45 | -data.ps.logbook.Activity.attribute.latitude=!coordinateRequired
|
|
| 46 | -data.ps.logbook.Activity.attribute.longitude=!coordinateRequired
|
|
| 47 | -data.ps.logbook.Activity.attribute.quadrant=!coordinateRequired
|
|
| 45 | +data.ps.logbook.Activity.attribute.latitude=!coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects)
|
|
| 46 | +data.ps.logbook.Activity.attribute.longitude=!coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects)
|
|
| 47 | +data.ps.logbook.Activity.attribute.quadrant=!coordinateRequiredForVesselActivity && (skipMandatoryCoordinate || !coordinateRequiredForFloatingObjects)
|
|
| 48 | 48 | data.ps.logbook.Activity.attribute.schoolType=!setEnabled || reasonForNoFishing != null
|
| 49 | 49 | data.ps.logbook.Activity.attribute.setCount=!setEnabled
|
| 50 | 50 | data.ps.logbook.Activity.attribute.setSuccessStatus=!setEnabled || reasonForNoFishing != null
|
| ... | ... | @@ -69,7 +69,7 @@ data.ps.localmarket.SampleSpeciesMeasure=count,sizeClass |
| 69 | 69 | data.ps.localmarket.Survey=number,batches.available,comment,date,surveyPart,generalTab,surveyPartTab,batches.available,batches.selected
|
| 70 | 70 | data.ps.localmarket.SurveyPart=species
|
| 71 | 71 | data.ps.localmarket.WellId=well
|
| 72 | -data.ps.logbook.Activity=date,observedSystem.available,observedSystem.selected,comment,coordinate,coordinateOriginal,currentDirection,currentSpeed,dataQuality,floatingObjectEmpty,currentFpaZone,nextFpaZone,previousFpaZone,informationSource,latitude,latitudeOriginal,longitude,longitudeOriginal,number,observedSystem,originalDataModified,quadrant,quadrantOriginal,relatedObservedActivity,schoolType,seaSurfaceTemperature,setCount,time,totalWeight,vesselActivity,vmsDivergent,wind,windDirection,generalTab,measurementsTab,observedSystemTab,error.no.activity.6,physicalMeasurements,setMeasurements,reasonForNoFishing,setSuccessStatus,reasonForNullSet,latitude.validation.required,longitude.validation.required,quadrant.validation.required
|
|
| 72 | +data.ps.logbook.Activity=date,observedSystem.available,observedSystem.selected,comment,coordinate,coordinateOriginal,currentDirection,currentSpeed,dataQuality,floatingObjectEmpty,currentFpaZone,nextFpaZone,previousFpaZone,informationSource,latitude,latitudeOriginal,longitude,longitudeOriginal,number,observedSystem,originalDataModified,quadrant,quadrantOriginal,relatedObservedActivity,schoolType,seaSurfaceTemperature,setCount,time,totalWeight,vesselActivity,vmsDivergent,wind,windDirection,generalTab,measurementsTab,observedSystemTab,error.no.activity.6,physicalMeasurements,setMeasurements,reasonForNoFishing,setSuccessStatus,reasonForNullSet,latitude.validation.required,longitude.validation.required,quadrant.validation.required,skipMandatoryCoordinate
|
|
| 73 | 73 | data.ps.logbook.ActivityStub=date,comment,latitude,longitude,number,quadrant,seaSurfaceTemperature,time,vesselActivity
|
| 74 | 74 | data.ps.logbook.Catch=comment,species,speciesFate,weight,weightCategory,weightMeasureMethod,well,weight.validation.required,weightMeasureMethod.validation.required
|
| 75 | 75 | data.ps.logbook.FloatingObject=materialsValid,objectOperation,quadrant,supportVesselName,country,vessel,computedBiodegradable,computedNonEntangling,computedSimplifiedObjectType,computedValues,generalTab,buoysTab,materialsTab,notComputed,type.short,computedWhenArrivingBiodegradable,computedWhenLeavingBiodegradable,computedWhenArrivingNonEntangling,computedWhenLeavingNonEntangling,computedWhenArrivingSimplifiedObjectType,computedWhenLeavingSimplifiedObjectType
|
| ... | ... | @@ -33,7 +33,7 @@ reasonForNoFishing {*:0..1} referential.ps.common.ReasonForNoFishing |
| 33 | 33 | setSuccessStatus {*:0..1} referential.ps.logbook.SetSuccessStatus
|
| 34 | 34 | reasonForNullSet {*:0..1} referential.ps.common.ReasonForNullSet
|
| 35 | 35 | getDate() Date
|
| 36 | -isCoordinateRequired() boolean
|
|
| 36 | +isCoordinateRequiredForFloatingObjects() boolean
|
|
| 37 | 37 | |
| 38 | 38 | data.ps.logbook.Catch > data.DataEntity >> fr.ird.observe.dto.data.WellIdAware
|
| 39 | 39 | comment String
|