Add explaining comments to confirmation modal

This commit is contained in:
Wolfgang Huß 2022-08-02 08:30:54 +02:00
parent 8f336a0d13
commit 33026ba3e0
2 changed files with 5 additions and 3 deletions

View File

@ -22,6 +22,7 @@
:name="name"
@close="close"
/>
<!-- "id", "type", and "name" props are only used for compatibility with the other modals -->
<confirm-modal
v-if="open === 'confirm'"
:id="data.resource.id"
@ -57,6 +58,7 @@ export default {
open: 'modal/open',
}),
name() {
// REFACTORING: This gets unneccesary if we use "modalData" in all modals by probaply replacing them all by "confirm-modal"
if (!this.data || !this.data.resource) return ''
const {
resource: { name, title, author },

View File

@ -41,10 +41,10 @@ export default {
SweetalertIcon,
},
props: {
name: { type: String, default: '' },
type: { type: String, required: true },
name: { type: String, default: '' }, // only used for compatibility with the other modals in 'Modal.vue'
type: { type: String, required: true }, // only used for compatibility with the other modals in 'Modal.vue'
modalData: { type: Object, required: true },
id: { type: String, required: true },
id: { type: String, required: true }, // only used for compatibility with the other modals in 'Modal.vue'
},
data() {
return {