Commit 3f8a0255 authored by hypsug0's avatar hypsug0
Browse files

feat: confirm sighting delete

parent 22a6de21
......@@ -55,7 +55,7 @@ Observations de la session {{object.name}}
</div>
<div v-else>
<div class="">
<div id="listSpecie" :class="is == selectedItem ? 'bg-default' : ''" v-for="(s, is) in data" class=""
<div id="listSpecie" :class="is == selectedItem ? 'bg-info' : ''" v-for="(s, is) in data" class=""
@click="selectItem(is)">
<h4 class="m-2 p-2" style="size: 2rem;">
......@@ -70,7 +70,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="delSighting(is)" class="text-danger "><i class="fa fa-fw fa-trash"></i></span>
<span @click="sightingToDelete = 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'):'-' ]]
......@@ -83,6 +83,29 @@ Observations de la session {{object.name}}
</div>
</div>
</div>
<div v-if="sightingToDelete > -1" class="modal" id="delSightingModal" style="display: block;">
<div class="modal-dialog">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header bg-danger">
<button type="button" class="close" @click="sightingToDelete = -1" data-dismiss="modal">×</button>
<h3 class="modal-title">Suppression d'une observation</h4>
</div>
<!-- Modal body -->
<div class="modal-body">
Êtes-vous certain de vouloir supprimer l'observation #[[data[sightingToDelete].id_sighting||'-']] de <strong>[[getSpecieValue(data[selectedItem].codesp, 'common_name_fr')||'taxon non configuré']]</strong>
</div>
<!-- Modal footer -->
<div class="modal-footer">
<button type="button" @click="sightingToDelete = -1" class="btn btn-info" data-dismiss="modal">Fermer</button>
<button type="button" @click="delSighting(sightingToDelete)" class="btn btn-danger" data-dismiss="modal">Supprimer</button>
</div>
</div>
</div>
</div>
<span @click="addNewSighting()" class="btn btn-primary btn-block"><i class="fa fa-plus"></i> <strong>Nouveau taxon</strong></span>
</div>
<div id="sessionSightingEditFormDetails" class="col-sm-8 col-md-9">
......@@ -90,7 +113,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="delSighting(selectedItem)">
<span class="btn btn-xs btn-danger pull-right" @click="sightingToDelete = selectedItem">
<i class="fa fa-fw fa-trash"></i> Supprimer
</span>
{% comment %} <span class="text-info pull-right" @click="postOneData(selectedItem)"><i
......@@ -220,7 +243,7 @@ Observations de la session {{object.name}}
</validation-provider>
<div v-if="form_fields.includes('transmitter')" class="form-group" class="form-group" :class='classes'>
<div v-if="form_fields.includes('transmitter')" class="form-group" class="form-group" >
<label class="control-label" for="Precision">Transmetteur</label>
<transmitter-select id="transmitter" class="form-control" v-model="cd.transmitter"/>
</div>
......@@ -420,11 +443,12 @@ Observations de la session {{object.name}}
</validation-observer>
</div>
<div class="btn-group" role="group">
<span class="btn btn-warning btn-xs " @click="showRawData = !showRawData">raw</span>
<span class="btn btn-xs " @click="showRawData = !showRawData"><></span>
</div>
<pre v-if="showRawData">[[species]]</pre>
<pre v-if="showRawData">[[data]]</pre>
<pre v-if="showRawData">Species:[[species]]
</pre>
<pre v-if="showRawData">Data:[[data]]</pre>
</div>
<script type="application/javascript">
......
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