Skip to content
Snippets Groups Projects
Commit aa50ff30 authored by Timothee P's avatar Timothee P :sunflower:
Browse files

adapt edit button for attributes

parent baba9ce6
No related branches found
No related tags found
No related merge requests found
...@@ -86,11 +86,11 @@ ...@@ -86,11 +86,11 @@
</div> </div>
</div> </div>
<div <div
v-if="checkedFeatures.length > 0 && massMode === 'edit-status'" v-if="checkedFeatures.length > 0 && massMode.includes('edit')"
class="ui dropdown button compact button-hover-green tiny-margin-left" class="ui dropdown button compact button-hover-green tiny-margin-left"
data-tooltip="Modifier le statut des Signalements" :data-tooltip="`Modifier le${massMode.includes('status') ? ' statut' : 's attributs'} des signalements`"
data-position="bottom right" data-position="bottom right"
@click="toggleModifyStatus" @click="editFeatures"
> >
<i <i
class="pencil fitted icon" class="pencil fitted icon"
...@@ -333,11 +333,26 @@ export default { ...@@ -333,11 +333,26 @@ export default {
this.showModifyStatus = false; this.showModifyStatus = false;
}, },
editFeatures() {
switch (this.massMode) {
case 'edit-status':
this.toggleModifyStatus();
break;
case 'edit-attributes':
this.displayAttributesForm();
break;
}
},
toggleModifyStatus() { toggleModifyStatus() {
this.showModifyStatus = !this.showModifyStatus; this.showModifyStatus = !this.showModifyStatus;
this.showAddFeature = false; this.showAddFeature = false;
}, },
displayAttributesForm() {
console.log('TODO : create function to route to form & create attributes form');
},
clickOutsideDropdown(e) { clickOutsideDropdown(e) {
if (!e.target.closest('#button-dropdown')) { if (!e.target.closest('#button-dropdown')) {
this.showModifyStatus = false; this.showModifyStatus = false;
......
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