Commit ed851362 authored by hypsug0's avatar hypsug0
Browse files

fix: delete unsaved new sighting

parent 1094427d
......@@ -1619,7 +1619,7 @@ const sigthingFormApp = (id_session, type_contact) => {
})
})
},
deleteSighting(i) {
delSighting(i) {
id = this.data[i].id_sighting
if (id) {
$http
......@@ -1629,6 +1629,9 @@ const sigthingFormApp = (id_session, type_contact) => {
this.data.splice(i, 1)
})
}
else {
this.data.splice(i, 1)
}
},
postOneData(i) {
this.postSighting(this.data[i])
......
......@@ -73,7 +73,7 @@ Observations de la session {{object.name}}
<div class="">
<div class="btn-group btn-sm pull-right">
{% comment %} <span @click="postOneData(is)" class="text-info"><i class="fas fa-fw fa-save"></i></span> {% endcomment %}
<span @click="deleteSighting(is)" class="text-danger "><i class="fa fa-fw fa-trash"></i></span>
<span @click="delSighting(is)" class="text-danger "><i class="fa fa-fw fa-trash"></i></span>
</div>
<span class="label label-info text-uppercase">
[[ s.codesp ? getSpecieValue(s.codesp,'codesp'):'-' ]]
......@@ -93,7 +93,7 @@ Observations de la session {{object.name}}
<div class="panel-heading">
<h3 class="panel-title">
<span class="btn-group pull-right">
<span class="btn btn-xs btn-danger pull-right" @click="deleteSighting(selectedItem)">
<span class="btn btn-xs btn-danger pull-right" @click="delSighting(selectedItem)">
<i class="fa fa-fw fa-trash"></i> Supprimer
</span>
{% comment %} <span class="text-info pull-right" @click="postOneData(selectedItem)"><i
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment