at the end of the day, it was inevitable
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
import GenericTableModule from './genericTable'
|
||||
import * as api from '../../../../../api/notificationsApi'
|
||||
|
||||
class PublishedEmailsTable extends GenericTableModule {
|
||||
|
||||
constructor () {
|
||||
super(api)
|
||||
this.updateRestrictionsAfterDelete = true
|
||||
}
|
||||
|
||||
getNamespace () {
|
||||
return '[Published Emails]'
|
||||
}
|
||||
|
||||
getTableState (state) {
|
||||
return state.getIn(['appState', 'share', 'tables', 'publishedEmails'])
|
||||
}
|
||||
|
||||
getLoadTableRequestPayload (tableState) {
|
||||
return {
|
||||
...super.getLoadTableRequestPayload(tableState),
|
||||
onlyPublished: true
|
||||
}
|
||||
}
|
||||
|
||||
defineActions () {
|
||||
const toggleSubscribe = this.asyncToggleFieldAction(this.api.subscribeItems, 'subscribed')
|
||||
return {
|
||||
...super.defineActions(),
|
||||
toggleSubscribe
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const instance = new PublishedEmailsTable()
|
||||
instance.init()
|
||||
export default instance
|
||||
Reference in New Issue
Block a user