Add delete confirmation modal to checklist items [SCI-7952]

This commit is contained in:
Martin Artnik 2023-02-17 15:59:37 +01:00
parent 5d276c803c
commit 3961d1d6af

View file

@ -42,21 +42,23 @@
<button v-if="!checklistItem.attributes.urls || updateUrl" class="btn icon-btn btn-light" @click="enableTextEdit" tabindex="0">
<i class="fas fa-pen"></i>
</button>
<button v-if="!checklistItem.attributes.urls || deleteUrl" class="btn icon-btn btn-light" @click="deleteElement" tabindex="0">
<button v-if="!checklistItem.attributes.urls || deleteUrl" class="btn icon-btn btn-light" @click="showDeleteModal" tabindex="0">
<i class="fas fa-trash"></i>
</button>
</div>
</div>
<deleteElementModal v-if="confirmingDelete" @confirm="deleteElement" @cancel="closeDeleteModal"/>
</div>
</template>
<script>
import DeleteMixin from 'vue/protocol/mixins/components/delete.js'
import InlineEdit from 'vue/shared/inline_edit.vue'
import deleteElementModal from 'vue/protocol/modals/delete_element.vue'
export default {
name: 'ChecklistItem',
components: { InlineEdit },
components: { InlineEdit, deleteElementModal },
mixins: [DeleteMixin],
props: {
checklistItem: {