Skip to content
Snippets Groups Projects
Commit 55cbee53 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Add Observation is positive [VIPSUTV-471]

parent 7e86e38b
No related branches found
No related tags found
No related merge requests found
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
<div class="form-group row"> <div class="form-group row">
<label for="strDateObservation" class="col-1 col-form-label"> <label for="strDateObservation" class="col-1 col-form-label">
<font-awesome-icon style="font-size: x-large;" icon="calendar-days" /></label> <font-awesome-icon style="font-size: x-large;" icon="calendar-days" /></label>
<div class="col-7"> <div class="col-7">
...@@ -58,6 +57,14 @@ ...@@ -58,6 +57,14 @@
v-on:change="capturedTime($event)" /> v-on:change="capturedTime($event)" />
</div> </div>
</div> </div>
<div class="form-group">
<div class="checkbox">
<label>
<input type="checkbox" v-model="observation.isPositive" name="isPositive">
</label>
{{ $t("observation.is_positive.label") }}
</div>
</div>
<div v-if="pest.pestId" class="row"> <div v-if="pest.pestId" class="row">
<div class="col-1"> <div class="col-1">
...@@ -159,6 +166,7 @@ ...@@ -159,6 +166,7 @@
isStrDateObservationEmpty: false, isStrDateObservationEmpty: false,
isObservationHeaderEmpty: false, isObservationHeaderEmpty: false,
isDeleteBttnVisible: true, isDeleteBttnVisible: true,
isPositive: true,
isQuantification: false, isQuantification: false,
isMounted: false, isMounted: false,
msg: this.$i18n.t("observation.msg"), msg: this.$i18n.t("observation.msg"),
...@@ -321,6 +329,10 @@ ...@@ -321,6 +329,10 @@
else { else {
jsonObservation = lstObservations.find(({observationId}) => observationId === id); // Selection Observation jsonObservation = lstObservations.find(({observationId}) => observationId === id); // Selection Observation
this.observation = jsonObservation; this.observation = jsonObservation;
if(this.observation.isPositive == undefined)
{
this.observation.isPositive = true;
}
this.observation.observationData = JSON.parse(jsonObservation.observationData); this.observation.observationData = JSON.parse(jsonObservation.observationData);
if (jsonObservation.statusTypeId) {} if (jsonObservation.statusTypeId) {}
else { else {
...@@ -581,6 +593,7 @@ ...@@ -581,6 +593,7 @@
this.observationForStore.cropOrganismId = this.observation.cropOrganismId; this.observationForStore.cropOrganismId = this.observation.cropOrganismId;
this.observationForStore.organismId = this.observation.organismId; this.observationForStore.organismId = this.observation.organismId;
this.observationForStore.timeOfObservation = this.strDateObservation; this.observationForStore.timeOfObservation = this.strDateObservation;
this.observationForStore.isPositive= this.observation.isPositive;
this.observationForStore.statusChangedTime = this.strDateObservation; this.observationForStore.statusChangedTime = this.strDateObservation;
if (this.observation.statusTypeId) { if (this.observation.statusTypeId) {
this.observationForStore.statusTypeId = this.observation.statusTypeId; this.observationForStore.statusTypeId = this.observation.statusTypeId;
...@@ -615,6 +628,7 @@ ...@@ -615,6 +628,7 @@
jobservation.cropOrganismId = localObservationForStore.cropOrganismId; jobservation.cropOrganismId = localObservationForStore.cropOrganismId;
jobservation.organismId = localObservationForStore.organismId; jobservation.organismId = localObservationForStore.organismId;
jobservation.timeOfObservation = localObservationForStore.timeOfObservation; jobservation.timeOfObservation = localObservationForStore.timeOfObservation;
jobservation.isPositive = localObservationForStore.isPositive;
jobservation.statusChangedTime = localObservationForStore.statusChangedTime; jobservation.statusChangedTime = localObservationForStore.statusChangedTime;
jobservation.statusTypeId = localObservationForStore.statusTypeId; jobservation.statusTypeId = localObservationForStore.statusTypeId;
jobservation.isQuantified = localObservationForStore.isQuantified; jobservation.isQuantified = localObservationForStore.isQuantified;
...@@ -769,6 +783,7 @@ ...@@ -769,6 +783,7 @@
this.observation.observationId = newObservationId; this.observation.observationId = newObservationId;
this.observation.observationData = ''; this.observation.observationData = '';
this.observation.broadcastMessage = true; this.observation.broadcastMessage = true;
this.observation.isPositive = true;
this.getNewObservation(); this.getNewObservation();
this.observation.observationIllustrationSet = []; this.observation.observationIllustrationSet = [];
} }
......
...@@ -573,6 +573,7 @@ ...@@ -573,6 +573,7 @@
observationForStore.cropOrganismId = observation.cropOrganismId; observationForStore.cropOrganismId = observation.cropOrganismId;
observationForStore.organismId = observation.organismId observationForStore.organismId = observation.organismId
observationForStore.timeOfObservation = observation.timeOfObservation; observationForStore.timeOfObservation = observation.timeOfObservation;
observationForStore.isPositive = observation.isPositive;
observationForStore.statusChangedTime = observation.statusChangedTime; observationForStore.statusChangedTime = observation.statusChangedTime;
observationForStore.statusTypeId = observation.statusTypeId; observationForStore.statusTypeId = observation.statusTypeId;
observationForStore.isQuantified = observation.isQuantified; observationForStore.isQuantified = observation.isQuantified;
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
"login.forgotpassword.button.label": "Send e-mail address", "login.forgotpassword.button.label": "Send e-mail address",
"login.forgotpassword.success.msg": "Your request has been accepted. An e-mail with further instructions has been sent.", "login.forgotpassword.success.msg": "Your request has been accepted. An e-mail with further instructions has been sent.",
"observation.date.label": "Observation Date", "observation.date.label": "Observation Date",
"observation.is_positive.label": "Pest presence confirmed",
"observation.quantification.label": "Quantify", "observation.quantification.label": "Quantify",
"observation.quantification.form.label": "Observasjon quantification", "observation.quantification.form.label": "Observasjon quantification",
"observation.detail.heading.placeholder": "Heading (What was found and where?)", "observation.detail.heading.placeholder": "Heading (What was found and where?)",
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
"login.forgotpassword.button.label": "Send e-postadresse", "login.forgotpassword.button.label": "Send e-postadresse",
"login.forgotpassword.success.msg": "Din henvendelse er behandlet og akseptert. En e-post med flere instruksjoner har blitt sendt til den registrerte e-postadressen. Vennligst sjekk alle spamfiltre hvis du ikke har mottatt den innen kort tid.", "login.forgotpassword.success.msg": "Din henvendelse er behandlet og akseptert. En e-post med flere instruksjoner har blitt sendt til den registrerte e-postadressen. Vennligst sjekk alle spamfiltre hvis du ikke har mottatt den innen kort tid.",
"observation.date.label": "Observasjonsdato", "observation.date.label": "Observasjonsdato",
"observation.is_positive.label": "Skadegjører påvist",
"observation.quantification.label": "Tell/kvantifiser", "observation.quantification.label": "Tell/kvantifiser",
"observation.quantification.form.label": "Observasjonsspesifikke detaljer", "observation.quantification.form.label": "Observasjonsspesifikke detaljer",
"observation.detail.heading.placeholder": "Overskrift (Hva er funnet hvor?)", "observation.detail.heading.placeholder": "Overskrift (Hva er funnet hvor?)",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment