Update record toolbar restore logic and add it to all records
This commit is contained in:
parent
eb570463df
commit
ff44788e05
@ -196,11 +196,6 @@ export default {
|
||||
default: () => false,
|
||||
},
|
||||
|
||||
isDeleted: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
|
||||
showRecordModal: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
@ -212,6 +207,10 @@ export default {
|
||||
return this.record && this.record.recordID !== NoID
|
||||
},
|
||||
|
||||
isDeleted () {
|
||||
return this.record && this.record.deletedAt
|
||||
},
|
||||
|
||||
settings () {
|
||||
return this.$Settings.get('compose.ui.record-toolbar', {})
|
||||
},
|
||||
|
||||
@ -36,13 +36,10 @@ export default {
|
||||
|
||||
/**
|
||||
* Tells if given record is deleted; If record not provided, returns undefined
|
||||
* @returns {Boolean|undefined}
|
||||
* @returns {Boolean}
|
||||
*/
|
||||
isDeleted () {
|
||||
if (!this.record) {
|
||||
return
|
||||
}
|
||||
return !!this.record.deletedAt
|
||||
return this.record && this.record.deletedAt
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@ -122,6 +122,7 @@ export default {
|
||||
perPage: 14,
|
||||
fullPageNavigation: true,
|
||||
showTotalCount: true,
|
||||
showDeletedRecordsOption: true,
|
||||
presort: 'createdAt DESC',
|
||||
// Set allrecords configuration
|
||||
allRecords: true,
|
||||
|
||||
@ -76,12 +76,13 @@
|
||||
:processing="processing"
|
||||
:processing-submit="processingSubmit"
|
||||
:processing-delete="processingDelete"
|
||||
:is-deleted="isDeleted"
|
||||
:processing-undelete="processingUndelete"
|
||||
:in-editing="inEditing"
|
||||
@add="handleAdd()"
|
||||
@clone="handleClone()"
|
||||
@edit="handleEdit()"
|
||||
@delete="handleDelete()"
|
||||
@undelete="handleUndelete()"
|
||||
@back="handleBack()"
|
||||
@submit="handleFormSubmitSimple('admin.modules.record.view')"
|
||||
/>
|
||||
|
||||
@ -36,10 +36,7 @@
|
||||
:processing-submit="processingSubmit"
|
||||
:processing-delete="processingDelete"
|
||||
:processing-undelete="processingUndelete"
|
||||
:is-deleted="isDeleted"
|
||||
:in-editing="inEditing"
|
||||
:hide-clone="inCreating"
|
||||
:hide-add="inCreating"
|
||||
:show-record-modal="showRecordModal"
|
||||
@add="handleAdd()"
|
||||
@clone="handleClone()"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user