Skip to content
Snippets Groups Projects
Commit 0a4cd1bc authored by leandro's avatar leandro
Browse files

add params in request PUT feature and fix label status

parent 597ec394
No related branches found
No related tags found
No related merge requests found
......@@ -118,10 +118,12 @@ const feature = {
...extraFormObject
}
}
if (routeName === "editer-signalement") {
axios
.put(`${rootState.configuration.VUE_APP_DJANGO_API_BASE}features/${state.form.feature_id}/`, geojson)
.put(`${rootState.configuration.VUE_APP_DJANGO_API_BASE}features/${state.form.feature_id}/?` +
`feature_type__slug=${rootState.feature_type.current_feature_type_slug}` +
`&project__slug=${rootState.project_slug}`
, geojson)
.then((response) => {
if (response.status === 200 && response.data) {
if (state.attachmentFormset.length > 0 || state.linkedFormset.length > 0) {
......
......@@ -95,22 +95,10 @@
<td>Statut</td>
<td>
<i
v-if="feature.status === 'archived'"
class="grey archive icon"
v-if="feature.status"
:class="getIconLabelStatus(feature.status, 'icon')"
></i>
<i
v-else-if="feature.status === 'pending'"
class="teal hourglass outline icon"
></i>
<i
v-else-if="feature.status === 'published'"
class="olive check icon"
></i>
<i
v-else-if="feature.status === 'draft'"
class="orange pencil alternate icon"
></i>
{{ feature.get_status_display }}
{{ getIconLabelStatus(feature.status, 'label') }}
</td>
</tr>
<tr>
......@@ -432,6 +420,24 @@ export default {
},
methods: {
getIconLabelStatus(status, type){
if (status === 'archived')
if (type == 'icon')
return "grey archive icon";
else return 'Archivé';
else if (status === 'pending')
if (type == 'icon')
return "teal hourglass outline icon";
else return 'En attente de publication';
else if (status === 'published')
if (type == 'icon')
return "olive check icon";
else return 'Publié';
else if (status === 'draft')
if (type == 'icon')
return "orange pencil alternate icon";
else return 'Brouillon';
},
pushNgo(link) {
this.$router.push({
name: "details-signalement",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment